/* Fly South Pacific — design system cloned from southpacificflights.com
   (Tailwind v4 oklch theme, DM Sans + Space Grotesk, sky-deep/sky-mid/sun) */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --radius: .5rem;
  --background: oklch(98% .004 200);
  --foreground: oklch(25% .025 210);
  --card: oklch(100% 0 0);
  --card-foreground: oklch(22% .04 240);
  --popover: oklch(100% 0 0);
  --popover-foreground: oklch(22% .04 240);
  --primary: oklch(40% .075 200);
  --primary-foreground: oklch(98% .01 85);
  --secondary: oklch(94% .02 220);
  --secondary-foreground: oklch(30% .07 235);
  --muted: oklch(95% .006 200);
  --muted-foreground: oklch(50% .03 240);
  --accent: oklch(78% .16 65);
  --accent-foreground: oklch(22% .05 50);
  --destructive: oklch(57.7% .245 27.325);
  --border: oklch(90% .008 200);
  --input: oklch(85% .012 200);
  --ring: oklch(60% .12 235);
  --sky-deep: oklch(26% .08 240);
  --sky-mid: oklch(42% .11 230);
  --sun: oklch(80% .16 65);
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100svh;
  font-size: 15px; line-height: 1.5;
}
a { color: inherit; text-decoration: inherit; }
h1, h2, h3 { font-family: var(--font-display); }
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }

.muted { color: var(--muted-foreground); }
.font-display { font-family: var(--font-display); }

/* ── Page shell ────────────────────────────────────── */
.shell { flex: 1; display: flex; flex-direction: column; min-height: 100svh; }
main.page { width: 100%; max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; flex: 1; }

/* ── Header with banner ───────────────────────────── */
.site-header { background: var(--sky-deep); }
.header-banner { position: relative; overflow: hidden; }
.header-banner img {
  width: 100%; height: clamp(140px, 26vw, 260px); object-fit: cover; object-position: center 65%;
  opacity: .5;
}
.header-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 20%, color-mix(in oklab, var(--sky-deep) 85%, transparent));
}
.header-bar {
  position: relative; z-index: 1; margin-top: -58px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.header-inner {
  width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
/* IslandtoHub wordmark: white/turquoise lettering, always on its navy plate. */
.site-logo {
  display: inline-flex; align-items: center; justify-content: center;
  background-color: #071f47; border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 10px; padding: 4px 10px; line-height: 0;
}
.site-logo img { display: block; height: 100%; width: auto; }
.site-logo--header { height: 42px; }
.site-logo--footer { height: 30px; padding: 3px 7px; border-radius: 8px; }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff;
  letter-spacing: .01em;
}
.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a {
  color: color-mix(in oklab, var(--primary-foreground) 80%, transparent);
  font-weight: 500; font-size: 14px; padding: 8px 13px; border-radius: 10px;
}
.nav a:hover { background: color-mix(in oklab, var(--primary-foreground) 10%, transparent); color: #fff; }
.nav a.active { background: color-mix(in oklab, var(--primary-foreground) 18%, transparent); color: #fff; }

/* ── Footer ───────────────────────────────────────── */
.site-footer { background: var(--sky-deep); color: #fff; margin-top: auto; }
.footer-inner {
  max-width: 72rem; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 14px; border-top: 1px solid color-mix(in oklab, var(--primary-foreground) 15%, transparent);
}
.footer-brand { font-family: var(--font-display); font-weight: 600; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer nav a {
  color: color-mix(in oklab, var(--primary-foreground) 80%, transparent); font-weight: 500;
}
.site-footer nav a:hover { color: var(--sun); text-decoration: underline; text-underline-offset: 4px; }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 10px;
  background: var(--accent); color: var(--accent-foreground);
  font-weight: 700; font-size: 14.5px; cursor: pointer; border: 0;
  font-family: var(--font); transition: filter .12s, transform .05s;
}
.btn:hover { filter: brightness(.95); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn.ghost { background: transparent; color: var(--primary); padding: 0 10px; height: 40px; }
.btn.sm { height: 36px; font-size: 13px; padding: 0 13px; }
.btn.block { width: 100%; }
.btn.link-ish { background: none; border: 0; color: var(--primary); cursor: pointer; font-weight: 600; padding: 0; font-size: 13px; }

/* ── Cards / fields ───────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px); padding: 18px;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,.06);
}
.field { margin-bottom: 12px; min-width: 0; }
.field > label {
  display: block; font-size: 10px; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 4px;
}
.field input, .field select {
  width: 100%; height: 40px; border: 1px solid var(--input); border-radius: 9px;
  padding: 0 10px; font-size: 14px; background: var(--card); min-width: 0;
}
.field input:focus, .field select:focus { outline: 2px solid var(--ring); outline-offset: -1px; }

.kicker {
  font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted-foreground);
}
.section-title {
  font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted-foreground); margin: 24px 0 10px;
}
.page-h1 { font-size: 30px; font-weight: 700; letter-spacing: -.025em; margin: 0; }
.page-sub { color: var(--muted-foreground); margin: 4px 0 0; }

.badge { display: inline-block; border: 1px solid; border-radius: 999px; padding: 2px 10px; font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.badge.confirmed { color: oklch(55% .14 150); border-color: oklch(55% .14 150); }
.badge.awaiting_payment { color: oklch(60% .13 75); border-color: oklch(60% .13 75); }
.badge.cancelled { color: var(--destructive); border-color: var(--destructive); }

/* ── Toast ────────────────────────────────────────── */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(16px);
  background: var(--sky-deep); color: #fff; padding: 10px 16px; border-radius: 11px;
  font-size: 13.5px; font-weight: 500; opacity: 0; pointer-events: none;
  transition: all .25s ease; z-index: 300; max-width: min(480px, calc(100vw - 40px)); text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: var(--destructive); }

/* ── Spinner / empty ──────────────────────────────── */
.spinner { text-align: center; padding: 56px 0; color: var(--muted-foreground); font-size: 14px; }
.spinner .ring {
  width: 32px; height: 32px; margin: 0 auto 10px;
  border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 44px 18px; }
.empty .icon { font-size: 40px; }
.empty h3 { margin: 8px 0 4px; font-size: 17px; }
.empty p { margin: 0; color: var(--muted-foreground); font-size: 14px; }

/* ── Home hero + search form ──────────────────────── */
.home-hero { margin: 8px 0 14px; }
.home-hero h1 {
  font-size: clamp(30px, 6vw, 48px); font-weight: 700; letter-spacing: -.025em;
  line-height: 1.05; margin: 0;
}
.home-hero .tagline {
  font-size: clamp(16px, 2.4vw, 19px); color: var(--foreground); margin: 10px 0 2px; line-height: 1.4;
}
.home-hero .tagline strong { color: var(--accent-foreground); }
.home-hero .sub { color: var(--muted-foreground); font-size: 15px; margin: 0; }

.search-form {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; box-shadow: 0 25px 50px -12px rgba(10,30,50,.25);
}
.search-grid { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; align-items: end; }
.search-row2 {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,.85fr) minmax(0,1.15fr);
  gap: 4px; margin-top: 8px; align-items: end;
}
.search-form .btn.submit {
  margin-top: 8px; height: 44px; width: 100%; font-size: 15px; border-radius: 10px;
}
@media (max-width: 640px) {
  .search-grid { grid-template-columns: 1fr; }
  .swap-btn { justify-self: center; }
  .search-row2 { grid-template-columns: 1fr 1fr; }
}

.place-wrap { position: relative; min-width: 0; }
.place-input { position: relative; }
.place-input input {
  height: 44px; border: 1px solid var(--input); border-radius: 10px; width: 100%;
  padding: 0 10px; font-size: 14px; background: var(--card);
}
.place-input input.filled {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  color: var(--primary); letter-spacing: .02em;
}
@media (min-width: 640px) {
  .place-input input.filled { font-family: var(--font); font-weight: 400; font-size: 14px; color: var(--foreground); }
}
.place-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--popover); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(10,30,50,.16); overflow: hidden auto; max-height: 256px;
  width: min(18rem, calc(100vw - 3.5rem));
}
.place-list.right { left: auto; right: 0; }
.place-list button {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 0; background: none; cursor: pointer; text-align: left;
  font-size: 14px; white-space: normal;
}
.place-list button:hover { background: var(--muted); }
.place-list button + button { border-top: 1px solid var(--muted); }
.place-list .code { font-family: var(--font-display); font-weight: 700; color: var(--primary); }
.place-list .country { display: block; color: var(--muted-foreground); font-size: 12px; margin-top: 1px; }
.origin-hint { margin: 0 0 4px; font-size: 11px; color: var(--muted-foreground); min-height: 14px; }

.swap-btn {
  width: 40px; height: 44px; border-radius: 10px; border: 0; cursor: pointer;
  background: transparent; color: var(--primary); font-size: 17px;
}
.swap-btn:hover { background: var(--muted); }

.date-btn {
  width: 100%; height: 44px; border: 1px solid var(--input); border-radius: 10px;
  background: var(--card); cursor: pointer; font-size: 14px; color: var(--foreground);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.pax-btn {
  width: 100%; height: 44px; border: 1px solid var(--input); border-radius: 10px;
  background: var(--card); cursor: pointer; font-size: 13px; color: var(--foreground);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.pax-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50;
  background: var(--popover); border: 1px solid var(--border); border-radius: 13px;
  box-shadow: 0 12px 30px rgba(10,30,50,.18); padding: 13px; width: 250px;
}
.counter-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; }
.counter-row .label { font-size: 14px; }
.counter-row .ctrl { display: flex; align-items: center; gap: 10px; }
.counter-row button {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--muted); font-size: 17px; cursor: pointer; color: var(--primary);
}
.counter-row .val { min-width: 18px; text-align: center; font-weight: 500; }

.popular-routes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.popular-routes button {
  display: block; text-align: left; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 11px 13px; cursor: pointer; font-family: var(--font);
  transition: background .15s, border-color .15s;
}
.popular-routes button:hover { border-color: var(--primary); }
.popular-routes .route-label { font-weight: 500; font-size: 14px; }
.popular-routes .route-codes { color: var(--muted-foreground); font-size: 12px; margin-top: 3px; }

/* ── Results ──────────────────────────────────────── */
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.results-head h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.filters-bar {
  display: flex; gap: 18px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--border);
  border-radius: 13px; padding: 11px 13px; margin-bottom: 12px;
}
.filter-group .kicker { display: block; margin-bottom: 6px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: var(--card); color: var(--muted-foreground);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer;
  font-family: var(--font); transition: all .12s;
}
.chip:hover { border-color: var(--primary); color: var(--foreground); }
.chip.active { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }

.offer {
  background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 8px);
  overflow: hidden; margin-bottom: 12px;
  display: grid; grid-template-columns: minmax(0,1fr) 240px;
}
@media (max-width: 768px) { .offer { grid-template-columns: 1fr; } }
.offer-main { min-width: 0; cursor: pointer; padding: 14px 16px; }
.offer-airline {
  font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-foreground); margin-bottom: 10px;
}
.slice-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.carrier-badge {
  width: 48px; height: 48px; border-radius: 12px; background: var(--muted);
  border: 1px solid var(--border); display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--primary);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.08);
}
.slice-times { flex: 1; display: grid; grid-template-columns: 56px minmax(0,1fr) 56px; gap: 8px; align-items: center; min-width: 0; }
.slice-times .time { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.slice-times .code { color: var(--muted-foreground); font-size: 12px; }
.slice-times .right { text-align: right; }
.slice-mid { text-align: center; color: var(--muted-foreground); font-size: 12px; min-width: 0; overflow-wrap: break-word; }
.slice-mid .rail { position: relative; height: 1px; background: var(--border); margin: 5px 0; }
.slice-mid .rail i {
  position: absolute; top: -3.5px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); transform: translateX(-50%);
}
.offer-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.offer-meta .total { font-size: 12px; color: var(--muted-foreground); }
.toggle-details { background: none; border: 0; color: var(--primary); font-weight: 500; font-size: 12.5px; cursor: pointer; font-family: var(--font); padding: 0; }
.toggle-details:hover { text-decoration: underline; text-underline-offset: 4px; }
.offer-detail { background: var(--muted); border-radius: 10px; padding: 12px 13px; margin-top: 10px; font-size: 12.5px; }
.offer-detail .slice-label { font-weight: 500; margin-bottom: 6px; color: var(--foreground); }
.offer-detail p { margin: 3px 0; color: var(--foreground); }
.offer-detail .sub { color: var(--muted-foreground); }
.offer-detail .layover { color: oklch(60% .13 75); font-weight: 500; }

.offer-buy {
  border-left: 1px solid var(--border); background: color-mix(in oklab, var(--secondary) 50%, transparent);
  padding: 14px; display: flex; flex-direction: column; gap: 5px; align-items: stretch;
}
@media (max-width: 768px) { .offer-buy { border-left: 0; border-top: 1px solid var(--border); } }
.offer-buy .kicker { color: var(--primary); font-weight: 500; }
.offer-price { font-family: var(--font-display); font-size: 21px; font-weight: 800; color: var(--foreground); }
.offer-price-sub { font-size: 12px; color: var(--muted-foreground); margin-bottom: 6px; }
.offer-buy .btn { height: 40px; font-size: 13.5px; }
.gate-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.gate-row button { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font); color: var(--foreground); font-size: 13px; }
.gate-row button:hover { text-decoration: underline; text-underline-offset: 3px; }
.gate-row .price { font-weight: 500; color: var(--foreground); }
.show-more { background: none; border: 0; color: var(--primary); font-size: 12px; font-weight: 500; cursor: pointer; text-align: left; padding: 2px 0; font-family: var(--font); }
.show-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Fare calendar popover (OneTwoTrip-style) ─────── */
.fare-cal {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  background: var(--popover); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(10,30,50,.22);
  width: min(660px, calc(100vw - 32px));
}
@media (max-width: 700px) { .fare-cal { left: 50%; transform: translateX(-50%); } }
.fare-cal-inner { display: flex; overflow: hidden; border-radius: 12px; }

/* month sidebar */
.fare-cal-months {
  width: 132px; flex-shrink: 0; border-right: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 55%, transparent);
  max-height: 460px; overflow-y: auto; padding: 6px;
}
.fc-month {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 7px 10px; border-radius: 8px; cursor: pointer; font-family: var(--font);
  font-size: 12.5px; color: var(--foreground); white-space: nowrap;
}
.fc-month:hover { background: var(--muted); }
.fc-month.active { background: var(--secondary); font-weight: 600; }
@media (max-width: 520px) { .fare-cal-months { display: none; } }

/* grids */
.fare-cal-grids { flex: 1; min-width: 0; padding: 12px 14px 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-range { font-family: var(--font-display); font-size: 13.5px; }
.cal-nav {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border); cursor: pointer;
  background: var(--card); color: var(--primary); font-size: 19px; line-height: 1;
}
.cal-nav:hover { background: var(--muted); }
.cal-month { margin-bottom: 10px; }
.cal-month-label { font-family: var(--font-display); font-weight: 700; font-size: 14px; margin: 2px 0 6px; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 3px; }
.cal-dow span { text-align: center; font-size: 10.5px; font-weight: 500; color: var(--muted-foreground); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }

/* day cell: date top-left, fare beneath */
.cal-cell {
  min-height: 46px; border: 0; border-radius: 9px; background: none; cursor: pointer;
  font-family: var(--font); display: flex; flex-direction: column; align-items: flex-start;
  justify-content: flex-start; padding: 4px 5px; min-width: 0; gap: 2px;
  transition: background .1s;
}
.cal-cell.pad { pointer-events: none; }
.cal-cell:hover:not(:disabled) { background: var(--muted); }
.cal-cell:disabled { opacity: .32; cursor: not-allowed; }
.cal-day .cd { font-size: 12.5px; color: var(--foreground); line-height: 1; }
.cal-day.today .cd { font-weight: 700; color: var(--primary); }
.cal-day.sel { background: var(--primary); border-radius: 9px; }
.cal-day.sel .cd { color: var(--primary-foreground); font-weight: 700; }
.cal-day.sel .cf { color: color-mix(in oklab, var(--primary-foreground) 88%, transparent); }

/* fare tiers under the date */
.cal-day .cf { font-size: 9.5px; line-height: 1; font-weight: 600; }
.cal-day .cf.none { visibility: hidden; } /* keep cell height uniform */
.cf.tier-cheapest { color: oklch(58% .16 150); border-bottom: 1.5px solid oklch(58% .16 150); padding-bottom: 1px; }
.cf.tier-mid { color: oklch(55% .11 190); }
.cf.tier-high { color: var(--muted-foreground); }

/* legend + note */
.cal-legend { display: flex; gap: 14px; justify-content: center; margin-top: 4px; }
.cal-legend .lg { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted-foreground); }
.cal-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cal-legend .dot.tier-cheapest { background: oklch(58% .16 150); }
.cal-legend .dot.tier-mid { background: oklch(55% .11 190); }
.cal-legend .dot.tier-high { background: var(--muted-foreground); }
.cal-note { font-size: 10.5px; color: var(--muted-foreground); text-align: center; margin-top: 6px; line-height: 1.4; }

/* ── Locate button (origin auto-detect) ───────────── */
.field > label { display: flex !important; align-items: center; gap: 6px; }
.locate-btn {
  border: 0; background: none; cursor: pointer; font-size: 13px; line-height: 1;
  padding: 2px 4px; border-radius: 6px; opacity: .85;
}
.locate-btn:hover { opacity: 1; background: var(--muted); }
.locate-btn:disabled { opacity: .4; cursor: wait; }

/* ── IATA airport directory popup ─────────────────── */
.dir-modal { width: min(680px, 100%); max-height: min(680px, calc(100svh - 40px)); display: flex; flex-direction: column; padding-bottom: 14px; }
.dir-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.dir-tab {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border);
  background: var(--card); border-radius: 999px; padding: 6px 12px; cursor: pointer;
  font-family: var(--font); font-size: 12.5px; font-weight: 500; color: var(--foreground);
  transition: all .12s;
}
.dir-tab:hover { border-color: var(--primary); }
.dir-tab.active { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.dir-tab .dt-icon { font-size: 13px; }
.dir-tab .dt-count {
  font-size: 10px; background: color-mix(in oklab, var(--primary-foreground) 18%, transparent);
  border-radius: 999px; padding: 1px 7px; color: var(--primary-foreground);
}
.dir-tab:not(.active) .dt-count { background: var(--muted); color: var(--muted-foreground); }

/* featured (Melanesia / South Pacific) groups lead and glow */
.dir-sp-badge {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-foreground); background: var(--accent);
  border-radius: 999px; padding: 3px 10px;
}
.dir-tab.featured { border-color: color-mix(in oklab, var(--accent) 60%, var(--border)); }
.dir-tab.featured .dt-star { color: var(--accent-foreground); font-size: 10px; margin-left: 2px; }
.dir-tab.featured:not(.active) { background: color-mix(in oklab, var(--accent) 10%, var(--card)); }
.dir-tab.featured:not(.active) .dt-star { color: var(--sun-deep); }
.dir-tab.featured:not(.active) .dt-count {
  background: color-mix(in oklab, var(--accent) 25%, var(--card));
  color: var(--accent-foreground);
}
.dir-group.featured .dir-group-head { color: var(--primary); }
.dir-group.featured .dir-group-head .dgh-star {
  font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-foreground); background: var(--accent);
  border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: middle;
}
.dir-group.featured .dir-list {
  background: color-mix(in oklab, var(--accent) 4%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--border));
  border-radius: 12px; padding: 6px;
}
.dir-airport.hub { border-color: color-mix(in oklab, var(--primary) 40%, var(--border)); }
.dir-airport.hub .da-city { color: var(--primary); }

.dir-filter { padding: 0 24px; margin-bottom: 10px; }
.dir-filter input {
  width: 100%; height: 38px; border: 1.5px solid var(--input); border-radius: 10px;
  padding: 0 12px; font-size: 13.5px; background: var(--card);
}
.dir-filter input:focus { outline: 2px solid var(--ring); outline-offset: -1px; }

.dir-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 24px; }
.dir-group-head {
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  margin: 6px 0 8px; color: var(--foreground);
}
.dir-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; margin-bottom: 14px; }
.dir-airport {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  text-align: left; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 10px; cursor: pointer; font-family: var(--font);
  transition: border-color .12s, background .12s; min-width: 0;
}
.dir-airport:hover { border-color: var(--primary); background: color-mix(in oklab, var(--primary) 4%, var(--card)); }
.da-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-city { font-size: 13px; font-weight: 600; color: var(--foreground); }
.da-name { font-size: 11.5px; color: var(--muted-foreground); }
.da-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.da-country { font-size: 10.5px; color: var(--muted-foreground); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-code {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: var(--accent-foreground); background: var(--accent);
  border-radius: 7px; padding: 2px 8px; letter-spacing: .04em;
}

/* ── Booking / confirmation ───────────────────────── */
.book-summary { margin-bottom: 4px; }
.book-summary .route { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin: 2px 0; }
.book-summary .meta { font-size: 13px; color: var(--muted-foreground); }
.methods { display: grid; gap: 8px; }
.method {
  display: flex; align-items: center; gap: 13px; text-align: left;
  background: var(--card); border: 1.5px solid var(--input); border-radius: 13px;
  padding: 13px; cursor: pointer; font-family: var(--font);
  transition: border-color .12s, background .12s;
}
.method:hover { border-color: var(--primary); }
.method.selected { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 5%, transparent); }
.method .m-icon { font-size: 22px; }
.method .m-name { font-weight: 700; font-size: 15px; }
.method .m-hint { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.method .radio { margin-left: auto; width: 21px; height: 21px; border-radius: 50%; border: 2px solid var(--input); flex-shrink: 0; display: grid; place-items: center; }
.method.selected .radio { border-color: var(--accent); }
.method.selected .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.total-row { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 12px; }
.total-row .label { font-weight: 500; font-size: 14.5px; }
.total-row .amount { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.fine-print { font-size: 11.5px; color: var(--muted-foreground); text-align: center; margin-top: 12px; line-height: 1.5; }
.form-error { color: var(--destructive); font-weight: 500; font-size: 13.5px; margin: 8px 0; }

.confirm-hero { text-align: center; margin: 22px 0 18px; }
.confirm-hero .tick {
  width: 62px; height: 62px; line-height: 62px; margin: 0 auto 10px; border-radius: 50%;
  background: oklch(55% .14 150); color: #fff; font-size: 30px; font-weight: 700;
}
.confirm-hero h1 { margin: 0 0 4px; font-size: 26px; }
.confirm-hero p { margin: 0; color: var(--muted-foreground); }

.ref-card { text-align: left; }
.ref-card .ref {
  font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: .1em;
  color: var(--foreground); margin: 2px 0 4px; word-break: break-all;
}
.copy-btn { margin-left: auto; flex-shrink: 0; }

.itinerary-slice { background: var(--muted); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; margin-bottom: 10px; }
.itinerary-slice .head { font-weight: 500; font-size: 13px; margin-bottom: 6px; }
.itinerary-slice p { margin: 3px 0; font-size: 13px; }
.itinerary-slice .sub { color: var(--muted-foreground); font-size: 12px; }

/* ── Airline logos & partner icons on results ─────── */
.airline-logo {
  display: inline-grid; place-items: center; flex-shrink: 0;
  border-radius: 10px; background: var(--card); border: 1px solid var(--line, var(--border));
  overflow: hidden;
}
.airline-logo img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  image-rendering: -webkit-optimize-contrast;
}
/* carrier-code tile when the CDN has no logo */
.al-fallback {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
  color: var(--primary); background: var(--muted);
}

.slice-row .airline-logo { width: 52px; height: 52px; margin-right: 12px; }
.offer-airline { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.offer-airline .airline-logo { border: 0; border-radius: 7px; }
.offer-airline span:last-child {
  font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-foreground);
}

/* partner favicon chips */
.gate-icon {
  display: inline-grid; place-items: center; width: 20px; height: 20px;
  border-radius: 5px; overflow: hidden; flex-shrink: 0;
  background: var(--muted);
}
.gate-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gi-fallback {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-size: 9px; font-weight: 800; color: var(--primary-foreground); background: var(--primary);
  font-family: var(--font-display); letter-spacing: .02em;
}
.gate-row a { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.gate-row .gate-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Book Now with logo prefix */
.book-btn img {
  width: 18px; height: 18px; border-radius: 5px; background: #fff;
  padding: 1.5px; object-fit: contain; display: block; flex-shrink: 0;
}

/* ── Booking stepper & pre-payment extras ─────────── */
.bk-stepper { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.bk-step {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--card);
  font-size: 12.5px; font-weight: 500; color: var(--muted-foreground);
}
.bk-step .bs-num {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--muted); color: var(--muted-foreground); font-size: 11px; font-weight: 700;
}
.bk-step.current { border-color: var(--primary); color: var(--primary); background: color-mix(in oklab, var(--primary) 5%, var(--card)); }
.bk-step.current .bs-num { background: var(--primary); color: var(--primary-foreground); }
.bk-step.done { color: var(--foreground); }
.bk-step.done .bs-num { background: oklch(55% .14 150); color: #fff; }

/* seat map */
.seatmap { display: flex; gap: 5px; justify-content: center; padding: 14px; background: var(--muted); border-radius: 12px; overflow-x: auto; }
.seat-col { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.sc-letter { font-size: 10.5px; font-weight: 700; color: var(--muted-foreground); }
.seat {
  width: 24px; height: 22px; border-radius: 5px 5px 7px 7px;
  background: var(--card); border: 1.5px solid var(--border);
}
.seat.window { border-color: color-mix(in oklab, var(--sky-light, var(--primary)) 45%, var(--border)); }
.seat.premium { background: color-mix(in oklab, var(--accent) 30%, var(--card)); border-color: var(--accent); }
.seat-aisle { width: 16px; }
.seat-legend { display: flex; gap: 14px; justify-content: center; margin: 10px 0 4px; font-size: 11px; color: var(--muted-foreground); }
.seat-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sl { width: 12px; height: 11px; border-radius: 3px; display: inline-block; border: 1.5px solid var(--border); background: var(--card); }
.sl.premium { background: color-mix(in oklab, var(--accent) 30%, var(--card)); border-color: var(--accent); }
.sl.window { border-color: color-mix(in oklab, var(--sky-light, var(--primary)) 45%, var(--border)); }

/* extras radio cards */
.extras-list { display: grid; gap: 7px; }
.extra-opt {
  display: flex; align-items: center; gap: 11px; text-align: left; width: 100%;
  background: var(--card); border: 1.5px solid var(--input); border-radius: 12px;
  padding: 11px 13px; cursor: pointer; font-family: var(--font);
  transition: border-color .12s, background .12s;
}
.extra-opt:hover { border-color: var(--primary); }
.extra-opt.selected { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 5%, transparent); }
.eo-radio {
  width: 19px; height: 19px; border-radius: 50%; border: 2px solid var(--input);
  flex-shrink: 0; display: grid; place-items: center;
}
.extra-opt.selected .eo-radio { border-color: var(--accent); }
.extra-opt.selected .eo-radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.eo-main { min-width: 0; flex: 1; }
.eo-label { font-size: 14px; font-weight: 600; color: var(--foreground); }
.eo-desc { display: block; font-size: 11.5px; color: var(--muted-foreground); margin-top: 1px; }
.eo-price { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; color: var(--foreground); flex-shrink: 0; }
.eo-price small { display: block; font-size: 9.5px; font-weight: 500; color: var(--muted-foreground); text-align: right; }

/* live price bar */
.bk-pricebar {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 15px; margin-top: 16px;
}
.pb-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted-foreground); padding: 2.5px 0; }
.pb-total {
  display: flex; justify-content: space-between; margin-top: 8px; padding-top: 9px;
  border-top: 1px solid var(--border); font-family: var(--font-display);
  font-weight: 800; font-size: 17px; color: var(--foreground);
}
.bk-nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* ── My bookings ──────────────────────────────────── */
.booking-card { margin-bottom: 12px; }
.booking-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.booking-top .route { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.booking-top .date { font-size: 12.5px; color: var(--muted-foreground); margin-top: 2px; }
.ref-row {
  display: flex; align-items: center; gap: 10px; background: var(--muted);
  border-radius: 9px; padding: 9px 11px; margin-bottom: 10px; flex-wrap: wrap;
}
.ref-row .kicker { margin: 0; }
.ref-row .val { font-family: var(--font-display); font-weight: 700; letter-spacing: .1em; font-size: 15px; }
.booking-price { font-family: var(--font-display); font-size: 21px; font-weight: 800; }
.booking-airline { font-size: 12.5px; color: var(--muted-foreground); }
.booking-pax { font-size: 13px; margin-top: 10px; }
.booking-contact { font-size: 12.5px; color: var(--muted-foreground); margin-top: 3px; overflow-wrap: break-word; }

/* ── Settings ─────────────────────────────────────── */
.settings-links { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 6px; }
.settings-links button {
  background: none; border: 0; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  color: var(--foreground); font-family: var(--font); font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.settings-links button:hover { background: var(--secondary); }
.settings-links button.active { background: var(--secondary); }
.currency-grid { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Info pages (about / contact / faq) ───────────── */
.prose-page { max-width: 48rem; }
.prose-page h2 { font-size: 19px; margin: 26px 0 8px; letter-spacing: -.01em; }
.prose-page p { color: var(--muted-foreground); line-height: 1.625; margin: 0 0 10px; }
.prose-page p strong { color: var(--foreground); }
.contact-block {
  background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 8px);
  padding: 16px; margin-bottom: 12px;
}
.contact-block h3 { font-size: 16px; margin: 0 0 6px; }
.contact-block p { color: var(--muted-foreground); font-size: 14px; margin: 0 0 8px; line-height: 1.6; }
.mailto-btn { display: inline-flex; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 0; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: none; border: 0; padding: 14px 2px; cursor: pointer; text-align: left;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--foreground);
}
.faq-q .chev { transition: transform .2s; color: var(--muted-foreground); flex-shrink: 0; }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 2px 14px; color: var(--muted-foreground); font-size: 14px; line-height: 1.625; }
.faq-item.open .faq-a { display: block; }

/* ── Landing (marketing) extras ───────────────────── */
.landing-hero {
  border-radius: 22px; overflow: hidden; color: #fff; text-align: center; position: relative;
  padding: 64px 22px; margin-bottom: 26px;
  background: radial-gradient(ellipse at 80% 0%, var(--sun), transparent 55%),
              linear-gradient(160deg, var(--sky-deep), var(--sky-mid));
}
.landing-hero .kicker { color: var(--sun); }
.landing-hero h1 { margin: 10px auto 12px; max-width: 620px; font-size: clamp(28px, 6vw, 44px); line-height: 1.08; letter-spacing: -.025em; }
.landing-hero p { margin: 0 auto 24px; max-width: 520px; color: color-mix(in oklab, var(--primary-foreground) 85%, transparent); font-size: 15.5px; line-height: 1.55; }
.hero-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px; background: #fff; color: var(--foreground);
  border-radius: 13px; padding: 10px 18px; font-size: 14px; font-weight: 700; cursor: pointer;
  border: 0; font-family: var(--font); box-shadow: 0 10px 26px rgba(10,30,50,.3); transition: transform .1s;
  text-decoration: none;
}
.store-btn:hover { transform: translateY(-2px); }
.store-btn .s-icon { font-size: 22px; }
.store-btn small { display: block; font-weight: 400; font-size: 10.5px; color: var(--muted-foreground); text-align: left; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.feature .f-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--muted);
  display: grid; place-items: center; font-size: 21px; margin-bottom: 11px;
}
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted-foreground); font-size: 13.5px; line-height: 1.55; }

.region-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 12px; }
.region {
  border-radius: 16px; padding: 20px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(140deg, var(--sky-mid), var(--sky-deep));
}
.region h3 { margin: 0 0 6px; font-size: 16.5px; }
.region p { margin: 0; font-size: 13px; line-height: 1.5; color: color-mix(in oklab, var(--primary-foreground) 85%, transparent); }
.region .r-icon { font-size: 24px; margin-bottom: 7px; display: block; }

/* ── Modal base (notify popup + airport directory) ── */
.modal-backdrop {
  position: fixed; inset: 0; background: color-mix(in oklab, var(--sky-deep) 85%, transparent); z-index: 200;
  display: grid; place-items: center; padding: 20px; animation: fade .18s ease;
  overflow: hidden;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--card); border-radius: 18px; padding: 24px; width: min(420px, 100%); position: relative;
  box-shadow: 0 24px 60px rgba(10,30,50,.4); animation: pop .2s ease;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal h3 { margin: 0 0 6px; font-size: 19px; }
.modal .m-sub { color: var(--muted-foreground); font-size: 13.5px; margin: 0 0 14px; line-height: 1.5; }
.modal .close-x {
  position: absolute; top: 12px; right: 14px; border: 0; background: none;
  font-size: 19px; cursor: pointer; color: var(--muted-foreground);
}
.success-note { text-align: center; padding: 8px 0; }
.success-note .big { font-size: 38px; }
.success-note p { color: var(--muted-foreground); margin: 8px 0 0; }

/* utility: hide elements toggled by popups (pax counter, fare calendar,
   autocomplete lists, directory groups) */
.hidden { display: none !important; }

/* ── JetSet additions (cloned site uses <a> route tiles, <div> badge rows) ── */
.popular-routes a {
  display: block; text-align: left; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 11px 13px; cursor: pointer; font-family: var(--font);
  transition: background .15s, border-color .15s;
}
.popular-routes a:hover { border-color: var(--primary); }
.booking-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; padding: 14px 16px;
}
.counter-row { padding: 10px 0; }
.store-btn { cursor: pointer; }
.offer-detail p.sub, .offer-detail .sub { color: var(--muted-foreground); font-size: 13px; margin: 2px 0 10px; }
.offer-detail p { margin: 6px 0 0; font-size: 14px; }

/* ── Hero city picker (rotating top banner) ───────────────────── */
.hero-caption {
  position: absolute; left: 20px; bottom: 64px; z-index: 2;
  display: flex; flex-direction: column; gap: 2px;
  text-shadow: 0 2px 14px rgba(4,16,31,.65);
  pointer-events: none;
}
.hero-caption strong { font-family: var(--font-display); font-size: clamp(20px, 3vw, 30px); color: #fff; font-weight: 700; letter-spacing: .01em; }
.hero-caption span { font-size: 12.5px; color: rgba(255,255,255,.85); }

.hero-picker {
  position: absolute; right: 16px; bottom: 62px; z-index: 3;
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
  max-width: min(66%, 620px);
}
.hero-dot {
  height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.35); background: rgba(4,16,31,.38);
  color: rgba(255,255,255,.88); font-size: 12.5px; font-weight: 600;
  font-family: var(--font); backdrop-filter: blur(6px);
  transition: background .15s, border-color .15s, color .15s;
}
.hero-dot:hover { border-color: #fff; background: rgba(4,16,31,.55); }
.hero-dot.active { background: #fff; color: var(--foreground); border-color: #fff; }
@media (max-width: 720px) {
  .hero-caption { bottom: 56px; left: 14px; }
  .hero-picker { left: 14px; right: 14px; justify-content: flex-start; max-width: none; bottom: 120px; }
}

/* ── Origin / Destination directory links: two columns, one row ── */
.dir-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 2px; }
.dir-links .btn { width: 100%; height: auto; min-height: 36px; padding: 6px 8px; white-space: normal; line-height: 1.25; }
