:root {
  --bg: #f5f5f2;
  --surface: #fff;
  --surface-2: #f0f1ec;
  --text: #11120f;
  --muted: #70736c;
  --line: #dedfd8;
  --deal: #ff5a36;
  --deal-soft: #fff0eb;
  --green: #087f5b;
  --shadow: 0 18px 50px rgba(20, 21, 18, .07);
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic UI", "Yu Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(222, 223, 216, .8);
  background: rgba(245, 245, 242, .86);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--text);
  font-size: 17px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ghost-btn {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, .65);
  font-size: 12px;
  font-weight: 750;
}

.count-badge {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 5px;
  border-radius: 50%;
  color: #fff;
  background: #080a09;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.count-badge[hidden] {
  display: none;
}

.hero {
  padding: 28px 0 16px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  align-items: center;
  gap: 28px;
}

.hero-intro {
  min-width: 0;
}

.hero-intro .hero-copy {
  margin-bottom: 0;
}

.hero-layout .search-grid {
  grid-template-columns: 1fr;
}

.hero-layout .search-btn {
  grid-column: auto;
  min-height: 56px;
}

.hero-layout .filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .55);
  font-size: 13px;
  font-weight: 700;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--deal);
  box-shadow: 0 0 0 5px rgba(255, 90, 54, .1);
}

h1 {
  max-width: none;
  margin: 14px 0 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Yu Gothic UI", "Yu Gothic", sans-serif;
  font-size: clamp(40px, 7.0vw, 95px);
  font-weight: 900;
  font-synthesis: weight;
  line-height: .94;
  letter-spacing: -.065em;
  -webkit-text-stroke: .2px currentColor;
}

.hero-title-line {
  display: block;
  width: fit-content;
  white-space: nowrap;
}

.hero-copy {
  max-width: 800px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.5;
}

.search-panel {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-grid {
  display: grid;
  grid-template-columns: 1.15fr .9fr auto;
  align-items: stretch;
  gap: 10px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.advanced-search {
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.advanced-search summary,
.sort-more summary {
  width: fit-content;
  padding: 10px 4px 2px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.advanced-search .filter-grid {
  margin-top: 8px;
}

.field {
  min-width: 0;
  padding: 12px 15px;
  border-radius: 18px;
  background: var(--surface-2);
}

.field.compact {
  padding: 9px 13px;
  border-radius: 14px;
}

.field label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
  font-weight: 750;
}

.field.compact select {
  font-size: 13px;
}

.search-btn {
  min-width: 190px;
  padding: 0 22px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: var(--text);
  font-weight: 800;
  transition: transform .2s ease, opacity .2s ease;
}

.search-btn:hover {
  transform: translateY(-1px);
}

.search-btn:disabled {
  cursor: wait;
  opacity: .5;
}

.search-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 4px 2px;
}

.chip,
.tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.chip {
  padding: 8px 11px;
  font-size: 12px;
}

.chip.active,
.tab.active {
  border-color: var(--text);
  color: #fff;
  background: var(--text);
}

.notice {
  display: none;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #ffd8a8;
  border-radius: 14px;
  color: #7b4a00;
  background: #fff4e6;
  line-height: 1.6;
}

.notice.show {
  display: block;
}

.section {
  padding: 28px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -.045em;
}

.section-sub {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.muted-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.deal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.deal-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 17px;
  border: 1px solid #272c29;
  border-radius: 22px;
  color: #fff;
  background: #080a09;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .1);
}

.deal-body {
  display: grid;
  gap: 6px;
}

.deal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  color: #1b0700;
  background: #ff6a3d;
  box-shadow: 0 0 0 1px rgba(255, 133, 91, .55), 0 7px 22px rgba(255, 75, 36, .35);
  font-size: 11px;
  font-weight: 850;
}

.deal-badge.real {
  color: #001b10;
  background: #45e6a1;
  box-shadow: 0 0 0 1px rgba(125, 255, 199, .5), 0 7px 22px rgba(69, 230, 161, .25);
}

.destination {
  margin: 14px 0 2px;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -.035em;
}

.country,
.deal-meta {
  color: var(--muted);
  font-size: 12px;
}

.country {
  font-size: 13px;
}

.deal-card .country,
.deal-card .deal-meta {
  color: #aeb6b1;
}

.deal-card .country {
  border-color: #2c312e;
}

.deal-route {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 8px;
  border: 1px solid #353c37;
  border-radius: 999px;
  color: #e8edea;
  background: #1b201d;
  font-size: 11px;
  font-weight: 800;
}

.deal-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  color: #d9dedb;
  font-size: 11px;
  font-weight: 750;
}

.deal-route-path {
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.deal-price {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.deal-meta {
  margin-top: 4px;
}

.deal-card .deal-meta strong {
  color: #fff;
}

.deal-actions {
  display: grid;
  gap: 7px;
  margin-top: auto;
}

.deal-book-btn,
.deal-compare-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.deal-book-btn {
  border: 1px solid #fff;
  color: #050706;
  background: #fff;
}

.deal-book-btn:hover,
.deal-book-btn:focus-visible {
  color: #050706;
  background: #dfffee;
}

.deal-compare-btn {
  border: 1px solid #353c37;
  color: #d9dedb;
  background: #171b19;
}

.deal-compare-btn:hover,
.deal-compare-btn:focus-visible {
  border-color: #7f8983;
  color: #fff;
}

.sort-controls {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tabs,
.tabs-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs {
  padding-bottom: 2px;
}

.sort-more summary {
  margin: 0;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  list-style: none;
}

.sort-more summary::-webkit-details-marker {
  display: none;
}

.tabs-extra {
  margin-top: 8px;
}

.tab {
  padding: 9px 13px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.results {
  display: grid;
  gap: 12px;
}

.route-card {
  display: grid;
  grid-template-columns: 72px 1fr 300px;
  align-items: start;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.route-card.seed-offer {
  border-color: #93d5c0;
  box-shadow: 0 0 0 2px rgba(8, 127, 91, .08);
}

.rank {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  font-weight: 900;
}

.rank-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.route-main {
  min-width: 0;
}

.route-destination {
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 900;
}

.route-country {
  margin-left: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.route-line,
.route-flags,
.route-stats {
  display: flex;
  flex-wrap: wrap;
}

.route-line {
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 850;
}

.route-path {
  display: inline-block;
  letter-spacing: .01em;
}

.route-return {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.airport {
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--surface-2);
}

.arrow {
  color: var(--muted);
}

.route-flags {
  gap: 7px;
  margin-top: 10px;
}

.flag {
  padding: 6px 8px;
  border-radius: 999px;
  color: #5e615a;
  background: #f2f3f0;
  font-size: 11px;
  font-weight: 750;
}

.flag.warn {
  color: #8d5a00;
  background: #fff4dc;
}

.flag.deal {
  color: var(--deal);
  background: var(--deal-soft);
}

.route-stats {
  gap: 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.route-stats strong {
  color: var(--text);
}

.price-wrap {
  text-align: right;
}

.price-wrap .book-btn,
.price-wrap .save-btn,
.price-wrap .alert-btn {
  margin-top: 8px;
  padding: 7px 10px;
  font-size: 11px;
}

.price {
  font-size: 31px;
  font-weight: 900;
  letter-spacing: -.045em;
}

.compare {
  margin-top: 3px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.book-btn,
.save-btn,
.alert-btn,
.more-btn,
.dialog-btn {
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid var(--text);
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.save-btn,
.alert-btn {
  margin-left: 5px;
  border-color: var(--line);
  color: var(--muted);
}

.more-btn {
  display: none;
  margin: 18px auto 0;
  padding: 11px 22px;
  background: var(--surface);
}

.route-detail {
  display: none;
  grid-column: 1 / -1;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid #e7e7e7;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.detail-grid.single {
  grid-template-columns: 1fr;
}

.detail-grid strong,
.date-item strong,
.date-item span {
  display: block;
}

.detail-grid strong {
  margin-bottom: 2px;
}

.date-summary {
  display: none;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.date-summary.show {
  display: grid;
}

.date-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.date-item.best {
  border-color: #93d5c0;
  background: #eefaf6;
}

.date-item span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.loading {
  pointer-events: none;
  opacity: .5;
}

.empty {
  padding: 40px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, .5);
  text-align: center;
}

.insight-grid {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 12px;
}

.insight {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 290px;
  padding: 28px;
  border-radius: 28px;
  color: #fff;
  background: var(--text);
}

.insight.light {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
}

.insight-kicker {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .66;
}

.insight h3 {
  max-width: 650px;
  margin: 10px 0;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -.055em;
}

.insight p {
  max-width: 620px;
  margin: 0;
  line-height: 1.7;
  opacity: .7;
}

.drop {
  font-size: 68px;
  font-weight: 900;
  letter-spacing: -.06em;
}

.alert-dialog {
  width: min(620px, calc(100% - 24px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(20, 21, 18, .22);
}

.alert-dialog::backdrop {
  background: rgba(17, 18, 15, .46);
  backdrop-filter: blur(5px);
}

.dialog-inner {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.04em;
}

.dialog-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: var(--surface-2);
  font-size: 20px;
}

.alert-explanation,
.alert-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.global-push-card {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid rgba(5, 46, 88, .18);
  border-radius: 16px;
  background: linear-gradient(145deg, #eef8ff, #fff);
}

.global-push-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.global-push-head h3 { margin: 4px 0 0; font-size: 1.25rem; }
.push-kicker { color: #0873c4; font-size: .74rem; font-weight: 800; letter-spacing: .08em; }
.push-state { padding: 5px 9px; border-radius: 999px; background: #e3e8ed; color: #51606e; font-size: .76rem; font-weight: 800; }
.push-state.active { background: #052e58; color: #fff; }
.global-push-card p { margin: 12px 0; color: #3f5060; line-height: 1.65; }
.global-push-card small { display: block; margin-top: 10px; color: #667684; line-height: 1.5; }
.push-fixed { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.push-fixed span { padding: 6px 9px; border-radius: 999px; background: #fff; border: 1px solid #cddbe6; font-size: .78rem; font-weight: 750; }
.push-setting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.email-toggle { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; font-weight: 800; }
.email-toggle input { width: 18px; height: 18px; }
.push-email-fields { margin-bottom: 12px; }
.email-code-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; margin-top: 10px; }
#pushDisableBtn { margin-top: 8px; }
.country-alert-details { margin-top: 14px; border-top: 1px solid #dce3e8; padding-top: 14px; }
.country-alert-details summary { cursor: pointer; font-weight: 800; }

.alert-form {
  display: grid;
  grid-template-columns: 1.25fr .75fr auto;
  align-items: end;
  gap: 8px;
}

.alert-form .field {
  padding: 10px 12px;
  border: 1px solid transparent;
}

.dialog-btn {
  min-height: 55px;
  margin: 0;
  padding-inline: 18px;
  color: #fff;
  background: var(--text);
}

.dialog-btn.secondary {
  min-height: auto;
  justify-self: start;
  color: var(--text);
  background: var(--surface);
}

.alert-list {
  display: grid;
  gap: 8px;
  max-height: 310px;
  overflow: auto;
}

.alert-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.alert-item.triggered {
  border-color: #93d5c0;
  background: #eefaf6;
}

.alert-item strong,
.alert-item span {
  display: block;
}

.alert-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.alert-remove {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
}

footer {
  padding: 55px 0 80px;
  color: var(--muted);
  font-size: 12px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  line-height: 1.7;
}

@media (max-width: 1180px) {
  .deal-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .search-grid {
    grid-template-columns: 1fr 1fr;
  }

  .search-btn {
    grid-column: span 2;
    min-height: 58px;
  }

  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .route-card {
    grid-template-columns: 72px 1fr;
  }

  .price-wrap {
    grid-column: 2;
    text-align: left;
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .date-summary {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .deal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-layout .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100% - 20px, 1240px);
  }

  .nav {
    height: auto;
    min-height: 64px;
    padding: 9px 0;
  }

  .brand span {
    display: none;
  }

  .hero {
    padding-top: 26px;
  }

  h1 {
    font-size: clamp(33px, 9.4vw, 42px);
    letter-spacing: -.06em;
  }

  .search-grid,
  .filter-grid,
  .route-card,
  .alert-form {
    grid-template-columns: 1fr;
  }

  .deal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-layout .filter-grid {
    grid-template-columns: 1fr;
  }

  .search-btn {
    grid-column: auto;
    min-height: 56px;
  }

  .route-card {
    gap: 12px;
  }

  .price-wrap {
    grid-column: auto;
  }

  .rank {
    justify-content: space-between;
  }

  .section-head,
  .result-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .date-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .dialog-inner {
    padding: 18px;
  }

  .footer-grid {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .deal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 32px;
  }

  .ghost-btn {
    padding-inline: 10px;
  }
}
