/* =========================================================
   AERIS · 航线雷达
   A quiet flight-finding interface.
   ========================================================= */

:root {
  --paper: #f3f0e8;
  --paper-deep: #eae5da;
  --surface: #fffdf8;
  --surface-soft: #f8f5ee;
  --ink: #181a16;
  --ink-soft: #44473f;
  --muted: #707368;
  --muted-light: #999b8d;
  --line: rgba(24, 26, 22, 0.11);
  --line-strong: rgba(24, 26, 22, 0.22);
  --accent: #e95732;
  --accent-deep: #ce4523;
  --accent-soft: #f4dcd1;
  --moss: #536747;
  --moss-soft: #e6ebdf;
  --shadow-panel: 0 28px 80px rgba(53, 43, 25, 0.09), 0 3px 10px rgba(53, 43, 25, 0.03);
  --shadow-card: 0 18px 46px rgba(44, 37, 23, 0.08);
  --font-sans: "Helvetica Neue", "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Iowan Old Style", "Baskerville", "Songti SC", "STSong", "Noto Serif SC",
    "Source Han Serif SC", "SimSun", serif;
  --shell: min(1280px, calc(100% - 64px));
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  background-image: radial-gradient(rgba(24, 26, 22, 0.055) 0.55px, transparent 0.6px);
  background-size: 4px 4px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  margin: 0;
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

button,
select {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-size: 14.5px;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: relative;
  z-index: 30;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 88px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 31px;
  height: 31px;
  color: var(--ink);
  transition: transform 0.5s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-16deg);
}

.brand-word {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.18em;
  line-height: 1;
}

.brand-cn {
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.18em;
  line-height: 1.2;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  position: relative;
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.header-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.28s var(--ease);
}

.header-nav a:hover {
  color: var(--ink);
}

.header-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-status {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 3px rgba(83, 103, 71, 0.12);
}

.status-date {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -120px 0 0;
  background: radial-gradient(ellipse 55% 75% at 75% 12%, rgba(255, 253, 248, 0.82), transparent 72%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: end;
  gap: 66px;
  padding: 70px 0 66px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.eyebrow-rule {
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--ink);
}

.hero h1 {
  margin: 26px 0 28px;
  font-size: clamp(56px, 7.2vw, 96px);
  font-weight: 560;
  letter-spacing: -0.072em;
  line-height: 0.98;
}

.hero-title-second {
  display: block;
  padding-left: 0.48em;
}

.headline-dot {
  display: inline-block;
  width: 0.145em;
  height: 0.145em;
  margin-left: 0.1em;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.075em;
}

.hero-lede {
  max-width: 470px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

.hero-notes {
  position: relative;
  z-index: 2;
  width: 100%;
  align-self: end;
  padding-top: 17px;
  border-top: 1px solid var(--ink);
}

.hero-note-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 24px 0 21px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-stat strong {
  color: var(--ink);
  font-size: 35px;
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hero-stat span {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.hero-note-caption {
  margin: 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
  letter-spacing: 0.02em;
}

.hero-note-caption span {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.hero-route {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--ink);
  opacity: 0.25;
  pointer-events: none;
}

.hero-orbit {
  position: absolute;
  z-index: -1;
  top: -190px;
  right: -130px;
  width: 540px;
  height: 540px;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}

.hero-orbit::before {
  content: "";
  position: absolute;
  top: 73px;
  right: 74px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* =========================================================
   Search panel
   ========================================================= */

.search-section {
  position: relative;
  z-index: 20;
}

.search-panel {
  display: grid;
  grid-template-columns: 1.08fr 1.34fr 1.14fr 164px;
  align-items: stretch;
  padding: 9px;
  border: 1px solid rgba(24, 26, 22, 0.08);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.97);
  box-shadow: var(--shadow-panel);
}

.search-field {
  position: relative;
  min-width: 0;
  padding: 15px 21px 14px;
  border-radius: 18px;
  transition: background-color 0.25s ease;
}

.search-field:focus-within {
  background: rgba(243, 240, 232, 0.58);
}

.search-field + .search-field::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 0;
  width: 1px;
  background: var(--line);
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.field-label {
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: 0.06em;
}

.field-label-en {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.city-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.city-trigger-copy {
  display: block;
  min-width: 0;
}

.city-trigger-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.city-trigger-top strong {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.iata-chip {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.city-trigger-sub {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-left: 8px;
  color: var(--muted);
  transition: transform 0.28s var(--ease);
}

.city-trigger[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.date-range {
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-input {
  flex: 1 1 0;
  min-width: 0;
}

.date-input input {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 520;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}

.date-input input::-webkit-calendar-picker-indicator {
  width: 14px;
  height: 14px;
  margin-left: 1px;
  opacity: 0.36;
  cursor: pointer;
  filter: grayscale(1);
}

.date-input input::-webkit-datetime-edit {
  padding: 0;
}

.date-input input:focus {
  outline: none;
}

.date-separator {
  flex: 0 0 auto;
  color: var(--muted-light);
  font-size: 14px;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 7px;
}

.price-input {
  display: flex;
  flex: 1 1 0;
  align-items: baseline;
  min-width: 0;
  gap: 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.price-input input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  font-weight: 540;
  letter-spacing: -0.025em;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.price-input input::-webkit-outer-spin-button,
.price-input input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.price-input input::placeholder {
  color: var(--muted-light);
  font-weight: 400;
}

.price-separator {
  flex: 0 0 auto;
  color: var(--muted-light);
  font-size: 14px;
}

.field-foot {
  overflow: hidden;
  margin: 6px 0 0;
  color: var(--muted-light);
  font-size: 12.5px;
  letter-spacing: 0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-foot.is-error {
  color: var(--accent-deep);
}

.search-submit {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 5px;
  padding: 0 19px;
  border: 0;
  border-radius: 18px;
  background: var(--ink);
  color: var(--surface);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition:
    background-color 0.25s ease,
    transform 0.25s var(--ease);
}

.search-submit svg {
  width: 21px;
  height: 21px;
  transition: transform 0.3s var(--ease);
}

.search-submit:hover {
  background: var(--accent);
}

.search-submit:hover svg {
  transform: translateX(3px);
}

.search-submit:active {
  transform: scale(0.985);
}

.search-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 6px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-foot > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-transform: none;
  letter-spacing: 0.02em;
}

.mini-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* =========================================================
   City picker
   ========================================================= */

.city-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  left: 9px;
  width: 382px;
  max-width: calc(100vw - 40px);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 26px 80px rgba(39, 32, 20, 0.18);
  animation: popoverIn 0.22s var(--ease) both;
}

.city-popover.opens-up {
  top: auto;
  bottom: calc(100% + 8px);
  animation-name: popoverInUp;
}

@keyframes popoverIn {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes popoverInUp {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 550;
}

.popover-head em {
  color: var(--muted);
  font-size: 12.5px;
  font-style: normal;
  letter-spacing: 0.06em;
}

.multi-hint {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}

.city-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--paper);
}

.city-search svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.city-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.city-search input::placeholder {
  color: var(--muted-light);
}

.city-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.city-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 292px;
  margin-top: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.city-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  transition: background-color 0.16s ease;
}

.city-option:hover,
.city-option:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.city-option.is-selected {
  background: var(--paper);
}

.option-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.option-name {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.015em;
}

.option-name em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.09em;
}

.option-airport {
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-side {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.option-price {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.option-price.is-demand {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.option-check {
  width: 14px;
  height: 14px;
  color: var(--accent);
  opacity: 0;
}

.city-option.is-selected .option-check {
  opacity: 1;
}

.city-option.is-selected .option-price {
  color: var(--ink-soft);
}

.city-empty {
  margin: 18px 4px;
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}

.popover-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  padding: 10px 4px 0;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* =========================================================
   Results
   ========================================================= */

.results {
  padding-top: 88px;
  scroll-margin-top: 22px;
}

.results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line-strong);
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-kicker > span:first-child {
  color: var(--accent);
}

.section-kicker-rule {
  width: 23px;
  height: 1px;
  background: var(--line-strong);
}

.results-head h2 {
  margin: 14px 0 10px;
  font-size: clamp(31px, 3.5vw, 44px);
  font-weight: 540;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.results-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  letter-spacing: 0.015em;
}

.results-summary i {
  color: var(--muted-light);
  font-style: normal;
}

.results-summary strong {
  color: var(--ink);
  font-weight: 600;
}

.results-summary .count-number {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.015em;
  line-height: 1.5;
  white-space: nowrap;
}

.source-chip::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.results-tools {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding-bottom: 3px;
}

.data-freshness {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.freshness-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-light);
  transition: background-color 0.2s ease;
}

.data-freshness.is-live .freshness-dot {
  background: var(--moss);
  box-shadow: 0 0 0 3px rgba(83, 103, 71, 0.12);
}

.data-freshness.is-loading .freshness-dot {
  background: var(--accent);
  animation: freshnessPulse 1.1s ease-in-out infinite;
}

.data-freshness.is-error {
  color: var(--accent-deep);
}

.data-freshness.is-error .freshness-dot {
  background: var(--accent);
}

.data-freshness.is-stale {
  color: var(--muted);
}

.data-freshness.is-stale .freshness-dot {
  background: var(--muted-light);
}

@keyframes freshnessPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.refresh-prices {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 31px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.015em;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.refresh-prices svg {
  width: 13px;
  height: 13px;
}

.refresh-prices:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.refresh-prices:disabled {
  color: var(--muted-light);
  cursor: not-allowed;
  opacity: 0.62;
}

.refresh-prices.is-refreshing {
  border-color: var(--line-strong);
  color: var(--muted);
  opacity: 1;
}

.refresh-prices.is-refreshing svg {
  animation: refreshSpin 0.85s linear infinite;
}

@keyframes refreshSpin {
  to {
    transform: rotate(360deg);
  }
}

.sort-label {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.select-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.select-shell select {
  height: 37px;
  padding: 0 32px 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.01em;
  cursor: pointer;
  appearance: none;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.select-shell select:hover {
  border-color: var(--line-strong);
  background: rgba(255, 253, 248, 0.5);
}

.select-shell svg {
  position: absolute;
  right: 11px;
  width: 13px;
  height: 13px;
  color: var(--muted);
  pointer-events: none;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 22px;
}

.route-card {
  --card-delay: 0ms;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 288px;
  padding: 21px 21px 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  animation: cardIn 0.56s var(--ease) both;
  animation-delay: var(--card-delay);
  transition:
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    transform 0.28s var(--ease);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.route-card:hover {
  z-index: 2;
  border-color: rgba(24, 26, 22, 0.23);
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

.route-grid.is-quiet .route-card {
  animation: none;
}

.time-block sup {
  position: relative;
  top: -0.5em;
  margin-left: 1px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.route-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 70px;
  height: 70px;
  background: radial-gradient(circle at 100% 0%, rgba(233, 87, 50, 0.06), transparent 70%);
  pointer-events: none;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.region-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.region-label::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.destination {
  margin-top: 8px;
}

.destination h3 {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 570;
  letter-spacing: -0.05em;
  line-height: 1.12;
}

.destination p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  letter-spacing: 0.015em;
}

.destination .airport-code {
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.price-block {
  flex: 0 0 auto;
  text-align: right;
}

.price-amount {
  display: block;
  color: var(--ink);
  font-size: 27px;
  font-weight: 560;
  letter-spacing: -0.055em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.price-amount .currency {
  display: inline-block;
  margin-right: 1px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: 8px;
}

.price-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.flightline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
}

.time-block {
  flex: 0 0 auto;
  min-width: 48px;
}

.time-block strong {
  display: block;
  font-size: 17px;
  font-weight: 580;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.time-block span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.09em;
}

.time-block-arrival {
  text-align: right;
}

.route-path {
  position: relative;
  flex: 1 1 auto;
  min-width: 40px;
  height: 26px;
}

.route-path-duration {
  position: absolute;
  top: -2px;
  left: 50%;
  z-index: 1;
  padding: 0 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  transform: translateX(-50%);
  white-space: nowrap;
}

.route-path-line {
  position: absolute;
  top: 17px;
  right: 0;
  left: 0;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    var(--line-strong) 0 4px,
    transparent 4px 9px
  );
}

.route-path::before,
.route-path::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 15px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.route-path::before {
  left: 0;
}

.route-path::after {
  right: 0;
  border-color: var(--ink);
  background: var(--ink);
}

.route-path-plane {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 2;
  width: 14px;
  height: 14px;
  color: var(--accent);
  background: var(--surface);
  transform: translateX(-50%);
  transition: transform 0.3s var(--ease);
}

.route-card:hover .route-path-plane {
  transform: translateX(-50%) translateX(3px);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
  letter-spacing: 0.005em;
}

.meta-date {
  color: var(--ink-soft);
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.meta-divider {
  width: 2px;
  height: 2px;
  margin: 0 1px;
  border-radius: 50%;
  background: var(--muted-light);
}

.meta-flight {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.035em;
}

.deal-note {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--moss-soft);
  color: var(--moss);
  font-size: 12px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.card-detail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  letter-spacing: 0.015em;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.card-detail:hover {
  border-color: var(--muted);
  color: var(--ink);
}

.card-buy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 35px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition:
    background-color 0.22s ease,
    transform 0.22s var(--ease);
}

.card-buy svg {
  width: 12px;
  height: 12px;
  transition: transform 0.22s var(--ease);
}

.card-buy:hover {
  background: var(--accent);
}

.card-buy:hover svg {
  transform: translate(1.5px, -1.5px);
}

/* Skeleton */

.skeleton-card {
  position: relative;
  min-height: 288px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.skeleton-card::before {
  content: "";
  position: absolute;
  inset: 21px;
  background:
    linear-gradient(var(--paper-deep) 0 0) 0 0 / 36% 15px no-repeat,
    linear-gradient(var(--paper-deep) 0 0) 0 32px / 44% 26px no-repeat,
    linear-gradient(var(--paper-deep) 0 0) 0 78px / 65% 10px no-repeat,
    linear-gradient(var(--paper-deep) 0 0) 0 116px / 100% 1px no-repeat,
    linear-gradient(var(--paper-deep) 0 0) 0 142px / 100% 18px no-repeat,
    linear-gradient(var(--paper-deep) 0 0) 0 184px / 52% 10px no-repeat,
    linear-gradient(var(--paper-deep) 0 0) 0 232px / 100% 33px no-repeat;
  border-radius: 8px;
  opacity: 0.8;
}

.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.55) 48%, transparent 75%);
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

/* Empty state */

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 24px 58px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.48);
  text-align: center;
}

.empty-illustration {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin-bottom: 21px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
}

.empty-illustration svg {
  width: 25px;
  height: 25px;
}

.empty-state h3 {
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 540;
  letter-spacing: -0.035em;
}

.empty-state p {
  max-width: 420px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.empty-state code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.button-outline,
.button-solid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.button-outline {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.button-outline:hover {
  border-color: var(--ink);
  background: var(--surface);
}

.button-solid {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.button-solid:hover {
  border-color: var(--accent);
  background: var(--accent);
}

/* Load more */

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 30px;
}

.load-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 43px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13.5px;
  letter-spacing: 0.015em;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.load-more:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.load-more-count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.load-more:hover .load-more-count {
  color: rgba(255, 253, 248, 0.65);
}

.load-more svg {
  width: 15px;
  height: 15px;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  margin-top: 92px;
  padding: 62px 0 24px;
  border-radius: 34px 34px 0 0;
  background: var(--ink);
  color: rgba(255, 253, 248, 0.92);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.05fr 1.55fr 0.7fr;
  gap: 56px;
  padding-bottom: 54px;
  border-bottom: 1px solid rgba(255, 253, 248, 0.14);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--surface);
}

.footer-brand svg {
  width: 32px;
  height: 32px;
}

.footer-brand span {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.19em;
}

.footer-slogan {
  margin: 27px 0 0;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.35;
}

.footer-copy h3,
.footer-meta h3 {
  margin-bottom: 18px;
  color: rgba(255, 253, 248, 0.46);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-copy p {
  max-width: 540px;
  margin-bottom: 12px;
  color: rgba(255, 253, 248, 0.69);
  font-size: 14px;
  line-height: 1.9;
}

.footer-copy p:last-child {
  margin-bottom: 0;
}

.footer-copy span {
  color: rgba(255, 253, 248, 0.84);
  font-variant-numeric: tabular-nums;
}

.footer-meta nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-meta nav a {
  color: rgba(255, 253, 248, 0.76);
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-meta nav a:hover {
  color: var(--surface);
}

.footer-stamp {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 30px;
  color: rgba(255, 253, 248, 0.32);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 21px;
  color: rgba(255, 253, 248, 0.31);
  font-size: 12px;
  letter-spacing: 0.09em;
}

/* =========================================================
   Flight detail dialog
   ========================================================= */

.flight-dialog {
  width: min(980px, calc(100vw - 48px));
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 50px 130px rgba(16, 16, 12, 0.32);
}

.flight-dialog[open] {
  animation: dialogIn 0.4s var(--ease) both;
}

.flight-dialog::backdrop {
  background: rgba(19, 20, 16, 0.46);
  backdrop-filter: blur(8px);
  animation: backdropIn 0.3s ease both;
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes backdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.dialog-scroll {
  max-height: calc(100dvh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 30px 29px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

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

.dialog-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.dialog-kicker i {
  margin: 0 6px;
  color: var(--accent);
  font-style: normal;
}

.dialog-kicker span {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.dialog-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.25s var(--ease);
}

.dialog-close:hover {
  border-color: var(--ink);
  background: var(--paper);
  transform: rotate(90deg);
}

.dialog-close svg {
  width: 17px;
  height: 17px;
}

.dialog-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-top: 22px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.dialog-route-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog-heading h2 {
  margin-bottom: 8px;
  font-size: 43px;
  font-weight: 540;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.dialog-sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dialog-price {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 1px;
  text-align: right;
}

.dialog-price-currency {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.dialog-price strong {
  font-size: 44px;
  font-weight: 560;
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dialog-price-label {
  flex-basis: 100%;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(280px, 0.82fr);
  gap: 28px;
  min-width: 0;
  margin-top: 24px;
}

.dialog-main,
.booking-panel,
.detail-ticket,
.other-dates,
.ticket-route,
.ticket-path,
.date-chip-list {
  min-width: 0;
}

.detail-ticket {
  position: relative;
  overflow: hidden;
  padding: 20px 21px 17px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 96% -10%, rgba(233, 87, 50, 0.36), transparent 39%),
    var(--ink);
  color: var(--surface);
}

.detail-ticket::after {
  content: "";
  position: absolute;
  top: 38%;
  right: -22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  opacity: 0.99;
  clip-path: inset(0 0 0 50%);
}

.ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(255, 253, 248, 0.18);
  color: rgba(255, 253, 248, 0.46);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ticket-top span:last-child {
  color: rgba(255, 253, 248, 0.7);
  letter-spacing: 0.04em;
}

.ticket-route {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 26px 0 24px;
}

.ticket-end {
  flex: 0 0 auto;
  min-width: 90px;
  max-width: 140px;
}

.ticket-end strong {
  display: block;
  font-size: 30px;
  font-weight: 530;
  letter-spacing: -0.05em;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}

.ticket-end span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 253, 248, 0.87);
  font-size: 13px;
  font-weight: 500;
}

.ticket-end small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: rgba(255, 253, 248, 0.41);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-end-arrival {
  text-align: right;
}

.ticket-path {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 40px;
  color: rgba(255, 253, 248, 0.55);
}

.ticket-path > span {
  margin-bottom: -12px;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.ticket-path > i {
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 14px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 253, 248, 0.32) 0 3px,
    transparent 3px 8px
  );
}

.ticket-path > svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  padding: 3px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--accent);
  transform: translate(-50%, -50%);
}

.ticket-path > small {
  margin-top: 0;
  color: rgba(255, 253, 248, 0.38);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.ticket-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 253, 248, 0.18);
  color: rgba(255, 253, 248, 0.55);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.other-dates {
  margin-top: 27px;
}

.other-dates-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.other-dates-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.other-dates-head span {
  color: var(--muted);
  font-size: 12px;
}

.date-chip-list {
  display: flex;
  gap: 7px;
  max-width: 100%;
  padding-bottom: 7px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.date-chip {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  text-align: left;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}

.date-chip:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.date-chip.is-selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.date-chip-date {
  font-size: 13px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.date-chip-price {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.date-chip.is-selected .date-chip-price {
  color: rgba(255, 253, 248, 0.63);
}

.detail-note {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.booking-panel {
  align-self: start;
  padding: 19px;
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.section-kicker-dark {
  color: var(--muted);
}

.section-kicker-dark > span:first-child {
  color: var(--accent);
}

.booking-head h3 {
  margin: 16px 0 7px;
  font-size: 26px;
  font-weight: 540;
  letter-spacing: -0.045em;
  line-height: 1.14;
}

.booking-head > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.booking-head > p strong {
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.booking-source {
  position: relative;
  display: block;
  margin: 0 0 11px;
  padding: 10px 12px 10px 24px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.booking-source::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.booking-source strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.platform-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.platform-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface);
  transition:
    border-color 0.18s ease,
    transform 0.18s var(--ease);
}

.platform-link:hover {
  border-color: var(--line-strong);
  transform: translateX(2px);
}

.platform-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.platform-link[data-platform="tongcheng"] .platform-mark {
  background: #f9e6d8;
  color: #bb5d21;
}

.platform-link[data-platform="ctrip"] .platform-mark {
  background: #e4edfb;
  color: #3367bb;
}

.platform-link[data-platform="qunar"] .platform-mark {
  background: #def0e8;
  color: #28705a;
}

.platform-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.platform-copy strong {
  font-size: 14.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
}

.platform-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-arrow {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--muted-light);
  transition:
    color 0.18s ease,
    transform 0.2s var(--ease);
}

.platform-link:hover .platform-arrow {
  color: var(--ink);
  transform: translate(1.5px, -1.5px);
}

.copy-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 37px;
  margin-top: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.copy-button:hover {
  border-color: var(--ink);
  background: var(--surface);
  color: var(--ink);
}

.copy-button.is-copied {
  border-style: solid;
  border-color: var(--moss);
  background: var(--moss-soft);
  color: var(--moss);
}

.copy-button svg {
  width: 13px;
  height: 13px;
}

.booking-fineprint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.booking-fineprint b {
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* =========================================================
   Toast
   ========================================================= */

body.has-dialog {
  overflow: hidden;
}

.toast {
  position: fixed;
  z-index: 500;
  bottom: 26px;
  left: 50%;
  max-width: calc(100vw - 36px);
  padding: 11px 17px;
  border: 1px solid rgba(255, 253, 248, 0.12);
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 16px 48px rgba(16, 16, 12, 0.25);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  text-align: center;
  transform: translateX(-50%);
  animation: toastIn 0.26s var(--ease) both;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1160px) {
  :root {
    --shell: min(1280px, calc(100% - 48px));
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 42px;
  }

  .search-panel {
    grid-template-columns: 1fr 1.22fr 1.08fr;
  }

  .search-submit {
    grid-column: 1 / -1;
    min-height: 52px;
    margin: 5px 5px 4px;
    border-radius: 15px;
    flex-direction: row;
  }

  .search-submit span {
    margin-inline: auto;
  }

  .search-field:nth-child(3)::before {
    display: none;
  }

  .search-field:nth-child(3) {
    padding-left: 21px;
  }

  .search-field:nth-child(3)::before {
    display: block;
    left: 0;
  }

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

  .route-card {
    min-height: 282px;
  }
}

@media (max-width: 880px) {
  .shell {
    width: calc(100% - 40px);
  }

  .header-inner {
    height: 74px;
  }

  .header-nav {
    display: none;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .header-status {
    font-size: 12px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px 0 43px;
  }

  .hero h1 {
    margin-top: 22px;
    font-size: clamp(54px, 11vw, 84px);
  }

  .hero-notes {
    width: min(100%, 390px);
    padding-top: 14px;
  }

  .hero-stats {
    padding: 18px 0 17px;
  }

  .hero-stat strong {
    font-size: 29px;
  }

  .hero-route {
    opacity: 0.16;
  }

  .hero-orbit {
    top: -260px;
    right: -240px;
    opacity: 0.7;
  }

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

  .search-field:nth-child(3) {
    border-top: 1px solid var(--line);
  }

  .search-field:nth-child(3)::before {
    display: none;
  }

  .search-field:nth-child(3) {
    grid-column: 1 / -1;
    padding-left: 21px;
  }

  .search-field:nth-child(3)::before {
    display: none;
  }

  .search-submit {
    grid-column: 1 / -1;
  }

  .results {
    padding-top: 68px;
  }

  .results-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 21px;
    padding-bottom: 20px;
  }

  .results-tools {
    align-self: stretch;
    justify-content: flex-end;
    padding-bottom: 0;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 38px;
  }

  .footer-copy {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 253, 248, 0.12);
  }

  .footer-meta {
    justify-self: end;
    text-align: right;
  }

  .footer-meta nav {
    align-items: flex-end;
  }

  .footer-stamp {
    align-items: flex-end;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

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

  .booking-panel {
    margin-top: 1px;
  }
}

@media (max-width: 680px) {
  :root {
    --shell: calc(100% - 28px);
  }

  .brand-cn {
    display: none;
  }

  .brand-word {
    font-size: 15px;
  }

  .header-status {
    gap: 6px;
  }

  .hero-grid {
    padding-top: 36px;
    padding-bottom: 31px;
    gap: 35px;
  }

  .eyebrow {
    gap: 9px;
    font-size: 11.5px;
    letter-spacing: 0.14em;
  }

  .eyebrow-rule {
    width: 23px;
  }

  .hero h1 {
    margin: 18px 0 21px;
    font-size: clamp(50px, 16vw, 70px);
    letter-spacing: -0.075em;
    line-height: 1.02;
  }

  .hero-title-second {
    padding-left: 0.33em;
  }

  .headline-dot {
    width: 0.13em;
    height: 0.13em;
  }

  .hero-lede {
    font-size: 14.5px;
    line-height: 1.8;
  }

  .hero-notes {
    width: 100%;
    padding-top: 12px;
  }

  .hero-note-label {
    font-size: 11.5px;
  }

  .hero-stats {
    gap: 10px;
    padding: 16px 0 13px;
  }

  .hero-stat strong {
    font-size: 27px;
  }

  .hero-stat span {
    font-size: 12px;
  }

  .hero-note-caption {
    display: none;
  }

  .search-panel {
    display: block;
    padding: 5px;
    border-radius: 21px;
  }

  .search-field {
    padding: 14px 14px 12px;
    border-radius: 16px;
  }

  .search-field + .search-field {
    border-top: 1px solid var(--line);
  }

  .search-field + .search-field::before,
  .search-field:nth-child(3)::before {
    display: none;
  }

  .search-field:nth-child(3) {
    padding-left: 14px;
  }

  .field-head {
    margin-bottom: 9px;
  }

  .city-trigger-top strong {
    font-size: 21px;
  }

  .date-input input {
    font-size: 15px;
  }

  .price-input input {
    font-size: 17px;
  }

  .search-submit {
    width: calc(100% - 10px);
    min-height: 50px;
    margin: 5px;
    padding: 0 18px;
    border-radius: 15px;
  }

  .search-submit span {
    margin-inline: 0;
  }

  .search-submit svg {
    margin-left: auto;
  }

  .search-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 11px 4px 0;
    font-size: 11.5px;
    letter-spacing: 0.05em;
  }

  .city-popover,
  .city-popover.opens-up {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    display: flex;
    flex-direction: column;
    width: auto;
    max-width: none;
    max-height: min(72vh, 560px);
    padding: 13px;
    border-radius: 19px;
    animation-name: sheetPopoverIn;
  }

  .city-options {
    flex: 1 1 auto;
    max-height: none;
    min-height: 120px;
  }

  @keyframes sheetPopoverIn {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .results {
    padding-top: 58px;
  }

  .section-kicker {
    font-size: 12px;
  }

  .results-head h2 {
    margin: 12px 0 8px;
    font-size: 31px;
  }

  .results-summary {
    font-size: 13px;
    line-height: 1.7;
  }

  .results-tools {
    align-self: stretch;
    width: 100%;
    justify-content: space-between;
    gap: 7px;
    margin-top: 2px;
  }

  .sort-label {
    display: none;
  }

  .data-freshness {
    font-size: 12px;
  }

  .refresh-prices {
    height: 33px;
    padding: 0 10px;
    font-size: 12.5px;
  }

  .select-shell select {
    height: 33px;
    font-size: 13px;
  }

  .route-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 16px;
  }

  .route-card {
    min-height: 271px;
    padding: 18px 17px 14px;
    border-radius: 17px;
  }

  .destination h3 {
    font-size: 27px;
  }

  .price-amount {
    font-size: 26px;
  }

  .flightline {
    margin-top: 22px;
  }

  .card-meta {
    margin-top: 14px;
    padding-top: 11px;
  }

  .card-footer {
    padding-top: 12px;
  }

  .load-more {
    height: 40px;
    font-size: 13px;
  }

  .site-footer {
    margin-top: 62px;
    padding: 45px 0 20px;
    border-radius: 26px 26px 0 0;
  }

  .footer-top {
    display: flex;
    flex-direction: column;
    gap: 29px;
    padding-bottom: 33px;
  }

  .footer-slogan {
    margin-top: 19px;
    font-size: 30px;
  }

  .footer-copy {
    order: 3;
    padding-top: 23px;
  }

  .footer-meta {
    order: 2;
    justify-self: auto;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 253, 248, 0.12);
    text-align: left;
  }

  .footer-meta nav {
    align-items: flex-start;
  }

  .footer-stamp {
    display: none;
  }

  .footer-copy h3,
  .footer-meta h3 {
    margin-bottom: 12px;
  }

  .footer-copy p {
    font-size: 13px;
    line-height: 1.85;
  }

  .footer-bottom {
    font-size: 11px;
    line-height: 1.6;
  }

  .flight-dialog {
    inset: auto 0 0;
    width: 100%;
    max-height: 92dvh;
    margin: 0;
    border-radius: 24px 24px 0 0;
  }

  .flight-dialog[open] {
    animation: sheetIn 0.38s var(--ease) both;
  }

  @keyframes sheetIn {
    from {
      opacity: 0;
      transform: translateY(40px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .dialog-scroll {
    max-height: 92dvh;
    padding: 17px 17px 23px;
  }

  .dialog-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 16px;
    padding-bottom: 19px;
  }

  .dialog-heading h2 {
    font-size: 34px;
  }

  .dialog-price {
    align-items: baseline;
  }

  .dialog-price strong {
    font-size: 35px;
  }

  .flight-dialog {
    overflow-x: hidden;
  }

  .detail-ticket {
    padding: 17px 15px 14px;
    border-radius: 16px;
  }

  .ticket-route {
    gap: 7px;
    padding: 24px 0 21px;
  }

  .ticket-end {
    min-width: 67px;
    max-width: 100px;
  }

  .ticket-end strong {
    font-size: 26px;
  }

  .ticket-end span {
    font-size: 12.5px;
  }

  .ticket-end small {
    max-width: 100px;
    font-size: 11.5px;
  }

  .ticket-path > span {
    font-size: 11.5px;
  }

  .ticket-path > small {
    font-size: 11px;
  }

  .ticket-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
  }

  .other-dates {
    margin-top: 21px;
  }

  .other-dates-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
  }

  .booking-panel {
    padding: 16px;
    border-radius: 16px;
  }

  .detail-note {
    font-size: 12.5px;
  }

  .ticket-end small {
    font-size: 12px;
  }

  .ticket-path > span {
    font-size: 12px;
  }

  .ticket-path > small {
    font-size: 11.5px;
  }

  .dialog-sub {
    font-size: 13px;
  }

  .toast {
    bottom: 17px;
    font-size: 13px;
  }
}

/* ---------------------------------------------------------
   Trip type & multi-origin controls
   --------------------------------------------------------- */

.trip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.trip-option {
  padding: 3px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

.trip-option:hover {
  color: var(--ink);
}

.trip-option.is-active {
  background: var(--ink);
  color: var(--paper);
}

.trip-option:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.city-trigger-top {
  min-width: 0;
}

.city-trigger-top strong {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iata-chip {
  flex: 0 0 auto;
}

.city-limit {
  margin: 9px 5px 0;
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  line-height: 1.5;
}

.city-limit[hidden] {
  display: none;
}

.apply-origins {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    opacity 0.18s ease;
}

.apply-origins:hover {
  background: var(--accent-deep);
}

.apply-origins:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.apply-origins span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------
   Round-trip route cards
   --------------------------------------------------------- */

.card-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.origin-badge {
  display: inline-flex;
  align-items: center;
  height: 15px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
}

.route-card.is-roundtrip {
  min-height: 344px;
}

.roundtrip-legs {
  display: flex;
  flex-direction: column;
  margin: 15px 0 3px;
  border-top: 1px solid var(--line);
}

.rt-card-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}

.rt-card-row:last-child {
  border-bottom: 0;
}

.rt-card-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.rt-card-tag-out {
  background: var(--ink);
  color: var(--paper);
}

.rt-card-tag-back {
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.rt-card-main {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.rt-card-date {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.rt-card-route {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rt-card-route strong {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 560;
  letter-spacing: -0.025em;
}

.rt-card-route i {
  margin: 0 3px;
  color: var(--muted-light);
  font-style: normal;
}

.rt-card-route sup {
  font-size: 11px;
  vertical-align: super;
}

.rt-card-sub {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
  text-align: right;
  white-space: nowrap;
}

.date-chip-roundtrip {
  min-width: 108px;
}

/* ---------------------------------------------------------
   Round-trip ticket
   --------------------------------------------------------- */

.detail-ticket.is-roundtrip .ticket-route {
  display: none;
}

.ticket-roundtrip {
  display: flex;
  flex-direction: column;
  padding: 4px 0 2px;
}

.ticket-roundtrip[hidden] {
  display: none;
}

.ticket-rt-leg {
  padding: 14px 0 13px;
  border-bottom: 1px dashed rgba(255, 253, 248, 0.16);
}

.ticket-rt-leg:last-child {
  border-bottom: 0;
}

.ticket-rt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ticket-rt-head > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.ticket-rt-head em {
  color: rgba(255, 253, 248, 0.43);
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.03em;
}

.ticket-rt-route {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticket-rt-end {
  flex: 0 0 auto;
  min-width: 82px;
}

.ticket-rt-end strong {
  display: block;
  font-size: 25px;
  font-weight: 530;
  letter-spacing: -0.045em;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}

.ticket-rt-end span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 253, 248, 0.72);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.ticket-rt-end-right {
  text-align: right;
}

.ticket-rt-path {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 5px;
  min-width: 0;
  color: rgba(255, 253, 248, 0.4);
  font-size: 11.5px;
  white-space: nowrap;
}

.ticket-rt-path i {
  flex: 1 1 auto;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 253, 248, 0.38) 0 3px,
    transparent 3px 7px
  );
}

.ticket-rt-path small {
  font-size: 11.5px;
}

.ticket-rt-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  color: rgba(255, 253, 248, 0.46);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

@media (max-width: 680px) {
  .trip-option {
    padding: 4px 9px;
    font-size: 12px;
  }

  .popover-foot {
    gap: 8px;
  }

  .apply-origins {
    padding: 8px 10px;
  }

  .route-card.is-roundtrip {
    min-height: 0;
  }

  .rt-card-sub {
    max-width: 112px;
    overflow: hidden;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.45;
  }

  .rt-card-route {
    font-size: 12.5px;
  }

  .rt-card-route strong {
    font-size: 14.5px;
  }

  .ticket-rt-end {
    min-width: 70px;
  }

  .ticket-rt-end strong {
    font-size: 22px;
  }

  .ticket-rt-path {
    gap: 3px;
  }

  .date-chip-roundtrip {
    min-width: 103px;
  }
}

@media (max-width: 640px) {
  .results-summary {
    gap: 4px 9px;
    line-height: 1.65;
  }

  .results-summary i {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
