/* JuneBug Air: friendly plane, sky palette, clear numbers. Green = winner, gray = not worth it. Every number carries its source. */
:root {
  --bg: #FFF6E5;
  --bg-2: #FFE9C2;
  --card: #FFFFFF;
  --ink: #23324D;
  --ink-2: #4A5670;
  --line: #23324D;
  --ink-dark: #23324D;
  --sky-top: #BFE6FF;
  --sky-bottom: #FFF3DC;
  --cloud: #FFFFFF;
  --hill: #FFE7B8;
  --route: #23324D;
  --pin: #FFC93C;
  --win: #12723A;
  --win-bg: #E3F8EC;
  --lose: #4F5A6E;
  --lose-bg: #EEF1F5;
  --warn-ink: #8A2414;
  --link: #3B3BB8;
  --accent-bg: #DCE8FF;
  --soft-line: #EADFC8;
  --sun: #FFC93C;
  --sun-2: #FFB01F;
  --coral: #FF6B5B;
  --sky: #47B8F0;
  --leaf: #3FA34D;
  --grape: #6C4AB6;
  --great: #12723A;
  --great-bg: #DDF7E7;
  --good: #7A4F00;
  --good-bg: #FFF1C9;
  --poor: #4F5A6E;
  --poor-bg: #EFEBF3;
  --warn-bg: #FFE1DC;
  --shadow: 3px 3px 0 var(--line);
  --shadow-lg: 5px 5px 0 var(--line);
  --radius: 22px;
  --font-display: "Fredoka", "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
/* Theme: Auto follows the device; data-theme="light"/"dark" (header toggle) overrides it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141B2B; --bg-2: #1C2538; --card: #1F2A40; --ink: #F3F6FB; --ink-2: #C3CCDD;
    --line: #070B14; --sky-top: #1B2C4D; --sky-bottom: #2A2F4F; --cloud: #33456B; --hill: #222C45; --route: #F3F6FB;
    --win: #5BE38F; --win-bg: #173B2A; --lose: #B8C2D3; --lose-bg: #2A3346; --soft-line: #3A4766; --great-bg: #1C3D2C;
    --good-bg: #463A16; --poor-bg: #2E3850; --warn-bg: #4A2430; --warn-ink: #FFC9C2; --great: #5BE38F; --good: #FFCF5C;
    --poor: #B8C2D3; --link: #B9C8FF; --accent-bg: #2B3A63; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #141B2B; --bg-2: #1C2538; --card: #1F2A40; --ink: #F3F6FB; --ink-2: #C3CCDD;
    --line: #070B14; --sky-top: #1B2C4D; --sky-bottom: #2A2F4F; --cloud: #33456B; --hill: #222C45; --route: #F3F6FB;
    --win: #5BE38F; --win-bg: #173B2A; --lose: #B8C2D3; --lose-bg: #2A3346; --soft-line: #3A4766; --great-bg: #1C3D2C;
    --good-bg: #463A16; --poor-bg: #2E3850; --warn-bg: #4A2430; --warn-ink: #FFC9C2; --great: #5BE38F; --good: #FFCF5C;
    --poor: #B8C2D3; --link: #B9C8FF; --accent-bg: #2B3A63; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  --c: 0;
  font: 16px/1.5 var(--font-body);
  
  min-height: 100vh;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
a { color: var(--link); font-weight: 700; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 8px; letter-spacing: .2px; }
h1 { font-size: 30px; }
h2 { font-size: 22px; margin-top: 26px; }
h3 { font-size: 18px; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .wrap { padding: 0 32px; } }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--sun); border-bottom: 3px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 10px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #2B2140; }
.brand img { width: 62px; height: 40px; transform: rotate(-6deg); }
.brand b { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: .3px; }
.brand b span { color: var(--coral); }
.topnav { margin-left: auto; display: none; gap: 6px; align-items: center; }
.topnav a, .topnav button {
  font: 700 15px var(--font-body); color: #2B2140; text-decoration: none; padding: 8px 14px;
  border-radius: 999px; border: 0; background: transparent; cursor: pointer;
}
.topnav a.on { background: #fff; border: 2.5px solid #2B2140; box-shadow: 2px 2px 0 #2B2140; }
.topnav form { margin: 0; }
@media (min-width: 760px) { .topnav { display: flex; } .tabbar { display: none !important; } body { padding-bottom: 40px; } }

/* ---------- bottom tab bar (iPhone) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around;
  background: var(--card); border-top: 3px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none;
  color: var(--ink-2); font: 700 11px var(--font-body); padding: 4px 0; border-radius: 14px; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--ink); background: var(--sun); }

/* ---------- cards / buttons / forms ---------- */
.card { background: var(--card); border: 3px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 18px; }
.card + .card { margin-top: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 17px var(--font-display);
  letter-spacing: .3px; color: #2B2140; background: var(--sun); border: 3px solid var(--line); border-radius: 999px;
  padding: 12px 22px; box-shadow: var(--shadow); cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.btn.big { width: 100%; font-size: 20px; padding: 15px 22px; }
.btn.coral { background: var(--coral); color: #fff; }
.btn.sky { background: var(--sky); }
.btn.ghost { background: var(--card); color: var(--ink); }
.btn.small { font-size: 14px; padding: 7px 14px; }
.btn svg { width: 22px; height: 22px; }
label.f { display: block; font-weight: 800; font-size: 13px; letter-spacing: .3px; text-transform: uppercase; color: var(--ink-2); margin: 0 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; font: 600 17px var(--font-body); color: var(--ink); background: var(--bg);
  border: 2.5px solid var(--line); border-radius: 14px; padding: 12px 14px; min-height: 50px; appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--sky); outline-offset: 1px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid2 > *, .grid3 > * { min-width: 0; }
input[type=date] { min-width: 0; max-width: 100%; display: block; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
.field { margin-bottom: 14px; }
.airport input { font: 700 24px var(--font-display); letter-spacing: 1px; text-transform: uppercase; }
.swap { display: flex; align-items: end; gap: 10px; }
.swap .field { flex: 1; }

/* segmented control */
.seg { display: inline-flex; border: 2.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--bg); margin-bottom: 14px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 8px 16px; font-weight: 800; cursor: pointer; color: var(--ink-2); }
.seg input:checked + label { background: var(--sky); color: #2B2140; }

/* toggle */
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 700; }
.toggle input { position: absolute; opacity: 0; }
.toggle .knob { width: 52px; height: 30px; border-radius: 999px; background: var(--poor-bg); border: 2.5px solid var(--line); position: relative; flex: none; transition: background .15s; }
.toggle .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #fff; border: 2px solid var(--line); transition: left .15s; }
.toggle input:checked + .knob { background: var(--leaf); }
.toggle input:checked + .knob::after { left: 24px; }

/* ---------- hero ---------- */
.hero { display: flex; align-items: center; gap: 14px; margin: 18px 0 16px; }
.hero img { width: 104px; height: 104px; flex: none; animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .hero img { animation: none; } }
.bubble { position: relative; background: var(--card); border: 3px solid var(--line); border-radius: 20px; padding: 12px 16px; box-shadow: var(--shadow); font-weight: 700; }
.bubble::before { content: ""; position: absolute; left: -14px; top: 26px; border: 8px solid transparent; border-right: 12px solid var(--line); }
.bubble h1 { font-size: 24px; margin: 0 0 2px; }

/* ---------- banners / chips ---------- */
.banner { border: 3px solid var(--line); border-radius: 16px; padding: 10px 14px; font-weight: 800; margin: 14px 0; box-shadow: var(--shadow); }
.banner.sample { background: repeating-linear-gradient(-45deg, var(--warn-bg), var(--warn-bg) 12px, var(--card) 12px, var(--card) 24px); }
.banner.ok { background: var(--great-bg); }
.banner.err { background: var(--warn-bg); }
.pill { display: inline-flex; align-items: center; gap: 4px; font: 800 12px var(--font-body); padding: 3px 9px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); white-space: nowrap; }
.pill.great { background: var(--great-bg); color: var(--great); }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.poor, .pill.n\/a { background: var(--poor-bg); color: var(--poor); }
.src { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); font-weight: 700; margin-top: 8px; }
.src svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

/* ---------- results ---------- */
.summary { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 16px 0 6px; }
.summary h1 { font-size: 26px; margin: 0; width: 100%; }
.best {
  background: var(--sun); border: 3px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 16px; position: relative; overflow: hidden; margin: 14px 0 6px; color: #2B2140;
}
.best .kicker { font: 700 13px var(--font-display); letter-spacing: 1px; text-transform: uppercase; }
.best .big { font: 700 34px var(--font-display); line-height: 1.05; margin: 2px 0 4px; }
.best .how { font-weight: 800; font-size: 17px; }
.best img { position: absolute; right: -14px; bottom: -18px; width: 110px; opacity: .95; transform: rotate(-8deg); }
.best .body { padding-right: 84px; }
.best .src { color: #4A3F5E; }

.cashlist { display: grid; gap: 10px; }
.cash { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; background: var(--card); border: 2.5px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.cash .price { font: 700 24px var(--font-display); text-align: right; }
.cash .pp { font-size: 12px; text-align: right; color: var(--ink-2); font-weight: 700; }
.cash .air { font-weight: 800; }
.cash .meta { font-size: 14px; color: var(--ink-2); }
.insight { display: flex; gap: 12px; align-items: center; background: var(--card); border: 2.5px dashed var(--line); border-radius: 18px; padding: 12px 14px; margin-top: 12px; }
.meter { flex: 1; height: 12px; border-radius: 999px; border: 2px solid var(--line);
  background: linear-gradient(90deg, #7DDC9A 0 33%, #FFD966 33% 66%, #FF9A8B 66% 100%); position: relative; }
.meter i { position: absolute; top: -7px; width: 6px; height: 22px; background: var(--ink); border-radius: 3px; }

.award { background: var(--card); border: 3px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px 16px; margin-top: 14px; }
.award.mine { outline: 4px solid var(--sun); outline-offset: 0; }
.award .top { display: flex; align-items: flex-start; gap: 10px; }
.award .cpp { font: 700 30px var(--font-display); line-height: 1; }
.award .cpp small { font-size: 14px; font-weight: 600; }
.award .prog { font: 700 19px var(--font-display); }
.award .right { margin-left: auto; text-align: right; }
.award .miles { font: 700 19px var(--font-display); }
.award .facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.chip { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; border: 2px solid var(--soft-line); border-radius: 12px; padding: 5px 8px; background: var(--bg); line-height: 1.2; }
.chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chip.own::after { content: "yours"; position: absolute; top: -9px; right: 6px; font: 800 9.5px var(--font-body); text-transform: uppercase; letter-spacing: .4px; background: var(--sun); color: #2B2140; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 5px; }
.nopartner { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-top: 6px; }
.chip b { font: 700 15px var(--font-display); }
.chip span { font-size: 11px; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .3px; }
.chip.own { border-color: var(--line); background: var(--card); }
.chip.cheap { background: var(--great-bg); border-color: var(--great); }
.chip.cheap b::after { content: " \2605"; color: var(--great); }
.chip .bonus { color: var(--coral); }
details.more { margin-top: 10px; }
details.more summary { cursor: pointer; font-weight: 800; color: var(--grape); list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+ "; }
details.more[open] summary::before { content: "- "; }
.flags { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.flags li { font-size: 14px; font-weight: 700; background: var(--warn-bg); border-radius: 10px; padding: 6px 10px; }
.flags li.delta { background: #FFE9A8; color: #2B2140; }
.packet { margin: 10px 0 0; padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.packet li { counter-increment: s; position: relative; padding-left: 38px; font-weight: 600; }
.packet li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--sky); border: 2px solid var(--line); font: 700 15px/24px var(--font-display); text-align: center; color: #2B2140; }
.packet li.warn { padding-left: 0; background: var(--warn-bg); border-radius: 12px; padding: 8px 12px; font-weight: 800; }
.packet li.warn::before { display: none; }
.packet li.note { padding-left: 38px; font-size: 14px; color: var(--ink-2); }
.packet li.note::before { display: none; }
.allopts > summary { list-style: none; }
.allopts > summary::-webkit-details-marker { display: none; }
.linksgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.linkbtn { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); background: var(--card); border: 2.5px solid var(--line); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); }
.linkbtn b { font: 700 17px var(--font-display); }
.linkbtn span { font-size: 12.5px; font-weight: 800; }
.linkbtn .verified { color: var(--great); } .linkbtn .partial { color: var(--good); } .linkbtn .unverified, .linkbtn .landing { color: var(--poor); }
.save { display: flex; gap: 10px; align-items: center; }
.save input { flex: 1; }

/* lists */
.rows { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 2.5px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.row { flex-wrap: wrap; }
.row .grow { flex: 1 1 220px; min-width: 0; }
.row .acts { display: flex; gap: 8px; align-items: center; }
.row .acts form { margin: 0; }
.row .title { font: 700 18px var(--font-display); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t td, table.t th { text-align: left; padding: 8px 6px; border-bottom: 2px solid var(--soft-line); }
.checks { display: grid; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 2.5px solid var(--line); border-radius: 14px; padding: 10px 12px; font-weight: 700; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--leaf); }
.code { font: 700 26px var(--font-display); letter-spacing: 2px; background: var(--sun); border: 3px solid var(--line); border-radius: 14px; padding: 6px 14px; display: inline-block; }
.center { text-align: center; }
.authbox { max-width: 440px; margin: 28px auto 0; }
.authbox .mascot { width: 150px; height: 150px; display: block; margin: 0 auto -6px; animation: bob 3.2s ease-in-out infinite; }
footer { margin: 36px 0 12px; text-align: center; font-size: 12.5px; color: var(--ink-2); font-weight: 700; }

@media (min-width: 760px) {
  h1 { font-size: 36px; }
  .layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; }
  .hero img { width: 140px; height: 140px; }
  .bubble h1 { font-size: 30px; }
  .best .big { font-size: 42px; }
  .best img { width: 150px; }
  .best .body { padding-right: 130px; }
}

/* ---------- multi-city stops ---------- */
.stops { background: var(--bg-2); border: 2.5px dashed var(--line); border-radius: 16px; padding: 12px; margin-bottom: 14px; }
.stoprow { display: grid; grid-template-columns: minmax(0, 1fr) 128px 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.stoprow input[name=stop] { font: 700 20px var(--font-display); letter-spacing: 1px; text-transform: uppercase; }
.stoprow .nights { position: relative; }
.stoprow .nights input { padding-right: 58px; }
.stoprow .nights span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 800; color: var(--ink-2); }
.stoprow .x { width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--line); background: var(--card); color: var(--ink); font: 700 20px/1 var(--font-body); cursor: pointer; }
.seg label { padding: 8px 13px; }

/* ---------- hub panel ---------- */
.hubpanel { margin-top: 18px; }
.hubhead { display: flex; gap: 12px; align-items: center; background: var(--sky); color: #2B2140; border: 3px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px 16px; }
.hubhead.win { background: var(--leaf); color: #fff; }
.hubhead .q { font: 700 13px var(--font-display); letter-spacing: 1px; text-transform: uppercase; opacity: .85; }
.hubhead .a { font: 700 22px var(--font-display); line-height: 1.15; }
.hubhome { margin: 12px 0 0; font-weight: 800; }
.hubrow { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 4px 12px; background: var(--card); border: 2.5px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 12px 14px; margin-top: 10px; }
.hubrow .hubcode { font: 700 26px var(--font-display); line-height: 1; letter-spacing: .5px; }
.hubrow .how { font-size: 11.5px; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .3px; }
.hubrow .lines { font-size: 14px; display: grid; gap: 2px; }
.hubrow .lines b { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; }
.hubrow .verdict { grid-column: 1 / -1; margin-top: 6px; }
.verdict { display: inline-block; font: 700 15px var(--font-display); padding: 5px 12px; border-radius: 999px; border: 2px solid var(--line); }
.verdict.yes { background: var(--great-bg); color: var(--great); }
.verdict.no { background: var(--poor-bg); color: var(--poor); }
.warnbox { background: var(--warn-bg); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; font-weight: 700; font-size: 14px; margin-top: 12px; }

/* ---------- itinerary ---------- */
.itin { position: relative; }
.legcard { position: relative; margin-left: 26px; background: var(--card); border: 3px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px 16px; margin-top: 14px; }
.legcard::before { content: ""; position: absolute; left: -24px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--coral); border: 3px solid var(--line); }
.itin::before { content: ""; position: absolute; left: 7px; top: 30px; bottom: 30px; border-left: 4px dotted var(--line); }
.legcard .route { font: 700 22px var(--font-display); }
.legcard .opt { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; border: 2px solid var(--soft-line); border-radius: 14px; padding: 8px 10px; margin-top: 8px; background: var(--bg); }
.legcard .opt.pick { border-color: var(--line); background: var(--great-bg); }
.legcard .opt .p { font: 700 19px var(--font-display); text-align: right; }
.legcard .opt .p small { display: block; font: 800 10.5px var(--font-body); text-transform: uppercase; letter-spacing: .3px; color: var(--ink-2); }
.legcard .opt .posline { grid-column: 1 / -1; font-size: 13px; font-weight: 700; border-top: 2px dashed var(--soft-line); padding-top: 6px; margin-top: 4px; }
.legcard .opt .k { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); }
.stopcard { margin-left: 26px; margin-top: 14px; background: var(--sun); color: #2B2140; border: 3px solid var(--line); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); position: relative; }
.stopcard::before { content: ""; position: absolute; left: -26px; top: 18px; width: 20px; height: 20px; border-radius: 6px; background: var(--sun); border: 3px solid var(--line); transform: rotate(45deg); }
.stopcard .t { font: 700 20px var(--font-display); }
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.total { background: var(--card); border: 3px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.total.plan { background: var(--sun); color: #2B2140; }
.total .k { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.total .v { font: 700 26px var(--font-display); line-height: 1.1; }

/* ---------- compact results: answer first, details on tap ---------- */
.head2 { margin: 14px 0 8px; }
.head2 h1 { font-size: 26px; margin: 0; }
.head2 .meta { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.samplebar { font: 800 12px var(--font-body); letter-spacing: .4px; text-transform: uppercase; text-align: center; padding: 5px 10px; border-radius: 999px; border: 2px solid var(--line);
  background: repeating-linear-gradient(-45deg, var(--warn-bg), var(--warn-bg) 10px, var(--card) 10px, var(--card) 20px); margin-bottom: 10px; }
.verdict-card { position: relative; overflow: hidden; background: var(--sun); color: #2B2140; border: 3px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px 16px 12px; }
.verdict-card.vc-cash { background: var(--sky); }
.verdict-card img { position: absolute; right: -10px; top: 6px; width: 78px; transform: rotate(8deg); }
.verdict-card .kicker { font: 700 12px var(--font-display); letter-spacing: 1px; text-transform: uppercase; padding-right: 64px; }
.verdict-card .vt { font: 700 23px/1.12 var(--font-display); margin: 2px 0 4px; padding-right: 64px; }
.verdict-card .vtotal { font: 700 28px/1.1 var(--font-display); }
.verdict-card .vtotal span { font: 700 13px var(--font-body); margin-left: 4px; }
.verdict-card .vwhy { font-weight: 700; font-size: 14.5px; margin-top: 4px; }
.verdict-card .src { color: #4A3F5E; margin-top: 6px; }
.runners { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.line, details.fold, details.sub > summary { min-width: 0; }
.line .amt, summary .amt { flex: none; }
.line { display: flex; align-items: center; gap: 10px; background: var(--card); color: var(--ink); text-decoration: none; border: 2.5px solid var(--line); border-radius: 16px; padding: 8px 12px; box-shadow: var(--shadow); font-weight: 600; }
.line.flat { box-shadow: none; border-width: 2px; border-color: var(--soft-line); margin-top: 8px; }
.line .grow, summary .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.line b, summary b { font: 600 16px/1.2 var(--font-display); }
.line small, summary .grow small { font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt { font: 700 18px/1.1 var(--font-display); text-align: right; white-space: nowrap; }
.amt small { display: block; font: 800 10.5px var(--font-body); color: var(--ink-2); text-transform: uppercase; }
.tag { font: 800 10.5px var(--font-body); text-transform: uppercase; letter-spacing: .4px; padding: 3px 7px; border-radius: 999px; border: 2px solid var(--line); }
.tag { flex: none; } .tag.t-points { background: var(--sun); color: #2B2140; } .tag.t-cash { background: var(--sky); color: #2B2140; }
details.fold { background: var(--card); border: 2.5px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 0 12px; margin-top: 12px; }
details.fold > summary { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker, details.sub > summary::-webkit-details-marker { display: none; }
details.fold[open] { padding-bottom: 12px; }
.chev { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); flex: none; position: relative; }
.chev::after { content: ""; position: absolute; left: 7px; top: 6px; width: 7px; height: 7px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg); }
details[open] > summary .chev::after { transform: rotate(-135deg); top: 9px; }
details.sub { border-top: 2px solid var(--soft-line); padding: 8px 0; }
details.sub > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
details.sub[open] > summary { margin-bottom: 6px; }
.hubc { font: 700 19px var(--font-display) !important; width: 44px; }
.chip2 { font: 800 11px var(--font-body); padding: 3px 8px; border-radius: 999px; border: 2px solid var(--line); text-transform: uppercase; }
.chip2.yes { background: var(--great-bg); color: var(--great); } .chip2.no { background: var(--poor-bg); color: var(--poor); }
.award2 .pill { min-width: 52px; justify-content: center; }
.linkrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.linkrow a { font: 700 14px var(--font-display); text-decoration: none; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.saverow { display: flex; gap: 8px; margin-top: 14px; }
.saverow input { flex: 1; min-height: 44px; padding: 8px 12px; font-size: 15px; }

/* compact itinerary */
.leg2, .stop2 { padding: 10px 14px; margin-top: 10px; box-shadow: var(--shadow); }
.leg2 > summary, .stop2 > summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; }
.leg2 > summary::-webkit-details-marker, .stop2 > summary::-webkit-details-marker { display: none; }
.leg2 .route { font: 700 20px/1.1 var(--font-display) !important; }
.leg2 summary .grow small, .stop2 summary .grow small { white-space: normal; }
.leg2[open] > summary { margin-bottom: 4px; }
.stop2 .t { font: 700 18px var(--font-display) !important; }
.stop2 summary small { color: #4A3F5E !important; }
.stop2 .chev { background: #fff; }
.legcard.leg2::before { top: 18px; }
.stopcard.stop2::before { top: 14px; }


/* =================== story layout (desktop first) =================== */
.routesvg { display: block; width: 100%; height: 100%; }
.routesvg .code-label { font: 700 34px var(--font-display); fill: var(--ink); }
.routesvg .sub-label { font: 800 18px var(--font-body); fill: var(--ink-2); }
.routesvg .clouds .c1 { animation: drift 40s linear infinite alternate; }
.routesvg .clouds .c2 { animation: drift 55s linear infinite alternate-reverse; }
.routesvg .clouds .c3 { animation: drift 35s linear infinite alternate; }
@keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(30px); } }

.storyhero { position: relative; border: 3px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); margin-top: 18px; background: var(--card); }
.storyhero .sky { height: 220px; }
.storyhero .copy { padding: 18px 22px 20px; }
.kick { font: 700 13px var(--font-display); letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-2); }
.deal { font: 700 30px/1.2 var(--font-display); margin: 4px 0 14px; max-width: 980px; }
.deal.points { color: var(--ink); }
.facts4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fact { background: var(--bg); border: 2px solid var(--soft-line); border-radius: 16px; padding: 10px 14px; }
.fact .k { font: 800 12px var(--font-body); text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.fact .v { font: 700 28px/1.1 var(--font-display); margin-top: 2px; }
.fact .s { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.fact.good { background: var(--win-bg); border-color: var(--win); }
.fact.good .v { color: var(--win); }
.fact.bad { background: var(--lose-bg); }
.tip { position: relative; display: inline-flex; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; font: 800 11px/14px var(--font-body); justify-content: center; cursor: help; text-transform: none; }
.tip:hover::after, .tip:focus::after { content: attr(data-tip); position: absolute; left: 50%; bottom: 140%; transform: translateX(-50%); width: 240px; background: var(--ink); color: var(--card); padding: 8px 10px; border-radius: 10px; font: 700 12.5px/1.35 var(--font-body); z-index: 5; letter-spacing: 0; }
.srcline { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-top: 12px; display: flex; gap: 6px; align-items: flex-start; }
.srcline svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

.section-title { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 6px; }
.section-title h2 { margin: 0; font-size: 26px; }
.section-title p { margin: 0; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.step-no { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--pin); border: 2.5px solid var(--line); font: 700 16px/26px var(--font-display); justify-content: center; color: #23324D; flex: none; align-self: center; }

.compare { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; margin-top: 40px; }
.ccard { position: relative; display: flex; flex-direction: column; background: var(--card); color: var(--ink); text-decoration: none; border: 2.5px solid var(--soft-line); border-radius: 22px; padding: 16px 16px 14px; transition: transform .12s, box-shadow .12s; }
.ccard:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(35,50,77,.14); }
.ccard.win { border: 3px solid var(--win); box-shadow: 0 0 0 4px var(--win-bg), var(--shadow-lg); }
.ccard.lose { background: var(--lose-bg); }
.ccard.lose .big, .ccard.lose .title { color: var(--lose); }
.ccard.sel { outline: 3px dashed var(--sky); outline-offset: 4px; }
.ccard .lab { font: 800 12px var(--font-body); text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); }
.ccard .title { font: 700 18px/1.2 var(--font-display); margin: 2px 0 10px; min-height: 2.4em; }
.ccard .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 2px dashed var(--soft-line); border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; background: none; box-shadow: none; }
.ccard .row .k { font-weight: 800; font-size: 13.5px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.ccard .row .v { font: 700 18px var(--font-display); text-align: right; }
.ccard .big { font: 700 34px/1 var(--font-display); }
.ccard .bar { height: 12px; border-radius: 999px; background: var(--bg-2); margin: 8px 0 4px; overflow: hidden; border: 2px solid var(--soft-line); }
.ccard .bar i { display: block; height: 100%; border-radius: 999px; background: var(--lose); }
.ccard.win .bar i { background: var(--win); }
.ccard .badge { position: absolute; top: -14px; right: 14px; font: 700 13px var(--font-display); padding: 4px 12px; border-radius: 999px; border: 2.5px solid var(--line); background: var(--lose-bg); color: var(--lose); }
.ccard.win .badge { background: var(--win); color: #fff; border-color: var(--win); }
.ccard .badge.good { background: var(--win-bg); color: var(--win); border-color: var(--win); }
.ccard .detail { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-top: auto; padding-top: 8px; }
.ccard .pick { font: 700 13px var(--font-display); color: var(--grape); margin-top: 6px; }
.barwrap { position: relative; margin: 10px 0 6px; }
.barwrap .bar { margin: 0; }
.winplane { position: absolute; top: -44px; right: 92px; width: 84px; z-index: 3; animation: bank 2.6s ease-in-out infinite; }
.ccard .k2 { font: 800 12px var(--font-body); text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); }
.ccard .big small { font: 700 15px var(--font-body); color: var(--ink-2); }
.cmpnote { margin: 14px 0 0; font-weight: 700; color: var(--ink-2); max-width: 980px; }
.notebox { background: var(--sky-top); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; font-weight: 700; font-size: 14px; margin-top: 12px; color: #23324D; }
@keyframes bank { 0%, 100% { transform: rotate(-12deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-6px); } }

.path { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; counter-reset: p; }
.pstep { position: relative; background: var(--card); border: 2.5px solid var(--line); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow); }
.pstep .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--sky-top); border: 2.5px solid var(--line); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.pstep .ic svg { width: 30px; height: 30px; color: #23324D; }
.pstep .n { position: absolute; top: 12px; right: 14px; font: 700 34px var(--font-display); color: var(--soft-line); }
.pstep b { font: 700 18px var(--font-display); display: block; }
.pstep .t { font-size: 14px; font-weight: 600; margin-top: 2px; }
.pstep a { display: inline-block; margin-top: 8px; }
.pstep.warn { background: var(--warn-bg); }
.morewrap { margin-top: 30px; }
.morewrap details.fold { margin-top: 10px; }

.showcase { position: relative; border: 3px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); margin-top: 18px; height: 240px; }
.showcase .hello { position: absolute; left: 24px; bottom: 22px; right: 24px; }
.showcase .hello h1 { font-size: 34px; margin: 0; text-shadow: 0 2px 0 var(--card); }
.showcase .hello p { margin: 4px 0 0; font-weight: 800; color: var(--ink-2); }
.searchcard { max-width: 1080px; margin: -36px auto 0; position: relative; z-index: 2; }

@media (min-width: 760px) {
  .facts4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .deal { font-size: 38px; }
  .storyhero .sky { height: 260px; }
  .storyhero .copy { padding: 22px 30px 26px; }
  .compare { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
  .path { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .path .pstep:not(:last-child)::after { content: ""; position: absolute; right: -16px; top: 40px; width: 14px; height: 14px; border-top: 3px solid var(--line); border-right: 3px solid var(--line); transform: rotate(45deg); }
  .showcase { height: 320px; }
  .showcase .hello { left: 40px; bottom: 60px; }
  .showcase .hello h1 { font-size: 46px; }
  .searchcard .grid-top { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }
  .morewrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .morewrap details.fold { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .winplane, .routesvg .clouds g { animation: none; }
}
.grid-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.formfoot { display: grid; gap: 14px; align-items: center; margin-top: 4px; }
.how3 { display: grid; gap: 12px; margin: 22px auto 0; max-width: 1080px; }
.how3 > div { background: var(--card); border: 2px solid var(--soft-line); border-radius: 18px; padding: 12px 16px; }
.how3 b { font: 700 17px var(--font-display); display: block; }
.how3 span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
@media (min-width: 760px) {
  .formfoot { grid-template-columns: 1fr 320px; }
  .how3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .searchcard { padding: 22px 26px; }
}

.split { display: grid; gap: 16px; }
.side .sidecard { background: var(--sky-top); color: #23324D; border: 2.5px solid var(--line); border-radius: 20px; padding: 14px 16px; margin-top: 10px; }
.side .sidecard > b { font: 700 18px var(--font-display); }
.side .sidecard p { margin: 8px 0 0; }
.fact.bad .v { color: var(--lose); }
@media (min-width: 760px) { .split { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; } }

/* ---------- phone tuning for the story layout ---------- */
.storyhero .sky { height: auto; aspect-ratio: 1200 / 250; }
@media (max-width: 759px) {
  .section-title { flex-wrap: wrap; gap: 4px 10px; margin-top: 26px; }
  .section-title h2 { font-size: 22px; }
  .section-title p { width: 100%; padding-left: 40px; }
  .deal { font-size: 25px; }
  .fact { padding: 8px 12px; }
  .fact .v { font-size: 21px; }
  .compare { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 84%; overflow-x: auto; scroll-snap-type: x mandatory;
             padding: 46px 4px 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; gap: 14px; margin-top: 0; }
  .compare .ccard { scroll-snap-align: start; }
  .compare .ccard.win { order: -1; }
  .compare .ccard .title { min-height: 0; }
  .winplane { right: 70px; }
  .path { gap: 8px; }
  .pstep { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 12px; padding: 12px 14px; }
  .pstep .ic { width: 44px; height: 44px; margin: 0; grid-row: span 3; border-radius: 12px; }
  .pstep .ic svg { width: 24px; height: 24px; }
  .pstep .n { font-size: 22px; top: 8px; }
  .pstep a { justify-self: start; }
  .showcase { height: 210px; }
  .showcase .hello h1 { font-size: 28px; }
  .searchcard { margin-top: -20px; }
}
.swipehint { display: none; }
@media (max-width: 759px) { .swipehint { display: block; font-size: 12.5px; font-weight: 800; color: var(--ink-2); margin: 4px 0 -36px; } }

.route-narrow { display: none !important; }
@media (max-width: 759px) {
  .route-wide { display: none !important; }
  .route-narrow { display: block !important; }
  .storyhero .sky { aspect-ratio: 640 / 300; }
}
@media (max-width: 759px) {
  .showcase { height: auto; background: var(--card); }
  .showcase .routesvg { height: 150px; }
  .showcase .hello { position: static; padding: 12px 18px 34px; }
  .showcase .hello h1 { text-shadow: none; }
}

/* ---------- airport autocomplete ---------- */
.ac-wrap { position: relative; }
.ac-list { position: absolute; z-index: 40; left: 0; right: auto; min-width: 100%; width: max(100%, 340px); max-width: 92vw; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: var(--card); border: 2.5px solid var(--line); border-radius: 16px; box-shadow: 0 14px 30px rgba(35,50,77,.18); max-height: 340px; overflow-y: auto; }
.ac-item { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.ac-item b { font: 700 18px var(--font-display); min-width: 46px; letter-spacing: .5px; }
.ac-item span { display: flex; flex-direction: column; min-width: 0; }
.ac-item em { font-style: normal; font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-item small { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.ac-item.on { background: var(--sky-top); color: #23324D; }
.ac-item.on small { color: #3E4D68; }
.ac-item.metro b { color: var(--coral); }
.grid-top .ac-wrap input, .airport .ac-wrap input { width: 100%; }
/* ---------- all flights that day ---------- */
.filterbar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; background: var(--card); border: 2px solid var(--soft-line); border-radius: 16px; padding: 10px 14px; margin-top: 14px; }
.filterbar label { font: 800 12px var(--font-body); text-transform: uppercase; letter-spacing: .3px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.filterbar select { min-height: 36px; padding: 4px 30px 4px 10px; font-size: 14px; width: auto; background-position: calc(100% - 16px) 15px, calc(100% - 10px) 15px; }
.filterbar .cb { text-transform: none; font-size: 14px; color: var(--ink); }
.filterbar .cb input { width: 18px; height: 18px; accent-color: var(--win); }
.daydir { margin-top: 18px; }
.dayhead { font: 700 18px var(--font-display); margin-bottom: 6px; }
.dayhead .muted { font: 700 13px var(--font-body); }
.dayrow { display: grid; grid-template-columns: minmax(0, 2.6fr) 1fr 1.5fr .9fr 1.1fr 70px; gap: 10px; align-items: center; padding: 10px 14px;
  background: var(--card); color: var(--ink); text-decoration: none; border: 2px solid var(--soft-line); border-radius: 14px; margin-top: 6px; font-weight: 700; }
a.dayrow:hover { border-color: var(--line); }
.dayrow.head { background: none; border: 0; padding: 0 14px; font: 800 11.5px var(--font-body); text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); margin-top: 0; }
.dayrow.chosen { border: 3px solid var(--win); background: var(--win-bg); }
.dayrow .fl { min-width: 0; }
.dayrow small { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 700; }
.dayrow .c { font: 700 17px var(--font-display); }
.dayrow .p { font: 700 15px var(--font-display); }
.dayrow i { display: none; font-style: normal; }
.dayrow .go { font: 700 14px var(--font-display); color: var(--grape); text-align: right; }
.dayrow.chosen .go { color: var(--win); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tg { font: 800 10.5px var(--font-body); font-style: normal; text-transform: uppercase; letter-spacing: .3px; padding: 2px 7px; border-radius: 999px; background: var(--sky-top); color: #23324D; border: 1.5px solid var(--line); }
.tg.tg-best { background: var(--win); color: #fff; border-color: var(--win); }
.paychip { font: 800 12px var(--font-body); font-style: normal; padding: 3px 9px; border-radius: 999px; border: 2px solid var(--line); white-space: nowrap; }
.paychip.pay-points { background: var(--pin); color: #23324D; } .paychip.pay-cash { background: var(--sky-top); color: #23324D; } .paychip.pay-none { background: var(--lose-bg); color: var(--lose); }
.daymore > summary { margin-top: 8px; }
.loadday { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-top: 14px; flex-wrap: wrap; }
@media (max-width: 899px) {
  .dayrow.head { display: none; }
  .dayrow { grid-template-columns: 1fr 1fr; gap: 6px 10px; }
  .dayrow .fl { grid-column: 1 / -1; }
  .dayrow i { display: block; font: 800 10.5px var(--font-body); text-transform: uppercase; color: var(--ink-2); letter-spacing: .3px; }
  .dayrow .go { grid-column: 2; grid-row: 4; align-self: end; }
}

/* ---------- multi-city editing ---------- */
.srcbadge { font: 800 10px var(--font-body); font-style: normal; text-transform: uppercase; letter-spacing: .3px; padding: 1px 7px; border-radius: 999px; margin-left: 6px; border: 1.5px solid var(--line); }
.src-live { background: var(--win-bg); color: var(--win); border-color: var(--win); }
.src-cached { background: var(--sky-top); color: #23324D; }
.src-recorded { background: var(--lose-bg); color: var(--lose); }
.buf { display: block; font-size: 12.5px !important; font-weight: 800 !important; margin-top: 2px; }
.buf-tight, .buf-bad { color: #B42318 !important; }
.editcard .erow { display: grid; grid-template-columns: 30px minmax(0, 1fr) 110px 34px; gap: 6px; align-items: center; margin-top: 8px; }
.editcard .mv { display: flex; flex-direction: column; gap: 2px; }
.editcard .mv button { border: 2px solid var(--line); background: var(--card); border-radius: 6px; font-size: 9px; line-height: 14px; cursor: pointer; padding: 0; color: var(--ink); }
.editcard input[name=stop] { font: 700 17px var(--font-display); text-transform: uppercase; min-height: 42px; padding: 6px 10px; }
.editcard .nt { position: relative; }
.editcard .nt input { min-height: 42px; padding: 6px 52px 6px 10px; }
.editcard .nt i { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 800 11px var(--font-body); font-style: normal; color: var(--ink-2); }
.editcard .x { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); font: 700 18px/1 var(--font-body); cursor: pointer; color: var(--ink); }
.editcard > .btn.ghost { margin-top: 10px; }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.sugg button { font: 700 13px var(--font-display); border: 2px solid var(--line); background: var(--card); border-radius: 999px; padding: 3px 10px; cursor: pointer; color: var(--ink); }
.sugg button:hover { background: var(--pin); }
.editcard .ac-list { width: 300px; }

/* ---------- flight line (every option shows the flight) ---------- */
.fline { display: flex; gap: 10px; align-items: center; margin: 6px 0 8px; min-width: 0; }
.fline .al { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--card); border: 2px solid var(--soft-line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fline .al img { width: 26px; height: 26px; object-fit: contain; }
.fline .al b { font: 700 12px var(--font-display); }
.fline .fx { display: flex; flex-direction: column; min-width: 0; }
.fline .tm { font-weight: 700; font-size: 14px; }
.fline .tm b { font: 700 17px var(--font-display); }
.fline .nm { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.fline .stp { font-style: normal; font-weight: 800; padding: 0 6px; border-radius: 999px; }
.fline .stp.ns { background: var(--win-bg); color: var(--win); }
.fline .stp.cs { background: var(--warn-bg); color: #9A3412; }
.fline.compact { margin: 2px 0 6px; }
.fline.compact .al { width: 28px; height: 28px; }
.fline.compact .al img { width: 22px; height: 22px; }
.fline.compact .tm b { font-size: 15px; }
.heroflights { display: grid; gap: 4px; margin: -4px 0 12px; }
.heroflights .fline { margin: 0; }
.dayrow .fl .fline { margin: 0; }
.ccard .fnote { margin: 2px 0 8px; }
.prefline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.prefline em { font-style: normal; font-weight: 800; font-size: 12px; background: var(--sky-top); color: #23324D; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.recreason { font: 600 20px/1.35 var(--font-display); margin: 8px 0 0; max-width: 1100px; }
.recs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 14px; }
.rcard { background: var(--card); border: 2.5px solid var(--soft-line); border-radius: 22px; padding: 14px 16px; }
.rcard.pick { border: 3px solid var(--win); box-shadow: 0 0 0 4px var(--win-bg), var(--shadow); }
.rcard .rtop { display: flex; justify-content: space-between; align-items: center; }
.rcard .lab { font: 800 12px var(--font-body); text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); }
.badge2 { font: 700 12px var(--font-display); background: var(--win); color: #fff; border-radius: 999px; padding: 3px 10px; }
.rrow { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 2px dashed var(--soft-line); align-items: baseline; }
.rrow .k { font-weight: 800; font-size: 13px; color: var(--ink-2); }
.rrow .v { font: 700 17px var(--font-display); text-align: right; }
.rrow .v small { font: 700 12px var(--font-body); color: var(--ink-2); }
.rcard > .btn { margin-top: 8px; }
.strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 2px solid var(--soft-line); }
.tchip { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--bg); border: 2px solid var(--soft-line); border-radius: 12px; padding: 4px 9px; line-height: 1.15; }
.tchip b { font: 700 14px var(--font-display); }
.tchip small { font-size: 11px; font-weight: 800; color: var(--ink-2); }
.tchip:hover, .tchip.on { border-color: var(--line); background: var(--sky-top); color: #23324D; }
@media (min-width: 760px) { .recs { grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 759px) { .recreason { font-size: 17px; } }
@media (max-width: 759px) {
  .recs { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory;
          margin: 0 -16px; padding: 4px 16px 10px; }
  .recs .rcard { scroll-snap-align: start; }
  .strip { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .strip .tiny { flex: none; }
  .tchip { flex: none; }
}

/* ---------- theme button ---------- */
.themebtn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  border: 2.5px solid #23324D; background: #fff; color: #23324D; cursor: pointer; padding: 0; margin-left: 4px; }
.themebtn svg { width: 20px; height: 20px; }
.themebtn .i-sun, .themebtn .i-moon, .themebtn .i-auto { display: none; }
.themebtn .i-auto { font: 700 15px var(--font-display); }
:root[data-theme-choice="light"] .themebtn .i-sun { display: block; }
:root[data-theme-choice="dark"] .themebtn .i-moon { display: block; }
:root:not([data-theme-choice]) .themebtn .i-sun { display: block; }
.themebtn.mobile-only { margin-left: auto; }
@media (min-width: 760px) { .themebtn.mobile-only { display: none; } }

/* =================== readable lists (Google Flights-like) =================== */
body { font-size: 16px; }
.viewbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 26px; }
.viewtoggle { display: inline-flex; border: 2.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.viewtoggle a { padding: 9px 22px; font: 600 17px var(--font-display); color: var(--ink); text-decoration: none; }
.viewtoggle a.on { background: var(--ink); color: var(--card); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.achip { font: 600 15px var(--font-body); color: var(--ink); text-decoration: none; padding: 7px 14px; border-radius: 999px; border: 2px solid var(--soft-line); background: var(--card); }
.achip:hover { border-color: var(--line); }
.achip.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.filterrow { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 12px; padding: 10px 14px; background: var(--card); border: 2px solid var(--soft-line); border-radius: 16px; }
.filterrow label { display: flex; align-items: center; gap: 8px; font: 600 14px var(--font-body); color: var(--ink-2); }
.filterrow select { min-height: 38px; padding: 4px 32px 4px 12px; font: 500 15px var(--font-body); width: auto; background-position: calc(100% - 16px) 16px, calc(100% - 10px) 16px; }
.cablink { color: var(--link); font-weight: 700; }
.datestrip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.datestrip a { text-align: center; padding: 10px; border-radius: 14px; border: 2px solid var(--soft-line); background: var(--card); color: var(--ink); text-decoration: none; font: 600 15px var(--font-body); }
.datestrip a.on { border: 2.5px solid var(--ink); background: var(--accent-bg); }
.recline { font: 500 17px/1.45 var(--font-body); margin: 14px 0 0; }
.listlayout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 16px; align-items: start; }
@media (min-width: 1000px) {
  .listlayout { grid-template-columns: 300px minmax(0, 1fr); }
  .sidecol { position: sticky; top: 76px; }
}
.sidecol { display: grid; gap: 14px; }
.dirsec { margin-bottom: 26px; }
.dirhead { font: 600 24px var(--font-display); margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dirtag { display: inline-block; font: 700 13px var(--font-body); text-transform: uppercase; letter-spacing: .6px; padding: 4px 10px; border-radius: 8px; background: var(--ink); color: var(--card); }
.dirtag.ret { background: var(--coral); color: #fff; }
.dirnote { margin: 4px 0 8px; font: 400 15px var(--font-body); color: var(--ink-2); }
.grp { font: 600 17px var(--font-body); margin: 14px 0 6px; color: var(--ink); }

/* flight block */
.fb { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.fb .logo { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff; border: 1px solid var(--soft-line); overflow: hidden; margin-top: 2px; }
.fb .logo img { width: 28px; height: 28px; object-fit: contain; }
.fb .logo b { font: 700 13px var(--font-body); color: #23324D; }
.fmain { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.fmain .times { font: 500 20px/1.25 var(--font-body); color: var(--ink); letter-spacing: .1px; }
.fmain .times sup { font-size: 12px; font-weight: 600; margin-left: 2px; color: var(--ink-2); }
.fmain .l2 { font: 400 15px/1.35 var(--font-body); color: var(--ink-2); }
.fmain .l3 { font: 500 15px/1.35 var(--font-body); color: var(--ink); }
.fmain .l3.ns { color: var(--win); }
.srcnote { display: block; font: 400 13px var(--font-body); font-style: normal; color: var(--ink-2); }

/* cash rows */
.frow { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(110px, .9fr) minmax(150px, 1.1fr) 120px; gap: 14px; align-items: center;
  padding: 14px 16px; background: var(--card); color: var(--ink); text-decoration: none; border: 1.5px solid var(--soft-line); border-radius: 14px; margin-top: 8px; }
.frow:hover { border-color: var(--line); }
.frow.chosen { border: 2.5px solid var(--win); background: var(--win-bg); }
.frow .fcash, .frow .fpts { display: flex; flex-direction: column; gap: 1px; }
.frow .fcash b, .price { font: 700 21px var(--font-display); color: var(--ink); }
.frow small { font: 400 14px var(--font-body); color: var(--ink-2); }
.frow .lab { font: 600 12px var(--font-body); text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); }
.frow .fpts .amt { font: 500 16px var(--font-body); }
.frow .fpts .amt b { font: 700 17px var(--font-display); }
.bagtxt.fee { color: var(--warn-ink); font-weight: 500 !important; }
.vpp { font-style: normal; font-weight: 600; }
.vpp.great, .vpp.good { color: var(--win); }
.ftags { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ftags .tg { font-size: 12px; }
.ftags .sel { font: 600 14px var(--font-body); color: var(--link); }
.frow.chosen .ftags .sel { color: var(--win); }
.tg { background: var(--accent-bg); color: var(--ink); border: 0; padding: 3px 9px; }
.tg.tg-best { background: var(--win); color: #fff; }
:root[data-theme="dark"] .tg.tg-best { color: #0B2A17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tg.tg-best { color: #0B2A17; } }

/* solid, high-contrast pay chips */
.paychip { font: 600 13px var(--font-body); padding: 4px 11px; border-radius: 999px; border: 0; }
.paychip.pay-points { background: #FFC93C; color: #1C2433; }
.paychip.pay-cash { background: #23324D; color: #FFFFFF; }
.paychip.pay-none { background: var(--lose-bg); color: var(--ink); }

/* trip + my points boxes */
.tripbox, .mypoints { background: var(--card); border: 2.5px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); }
.tbhead { font: 600 19px var(--font-display); margin-bottom: 8px; }
.tbleg { padding: 8px 0; border-top: 1.5px solid var(--soft-line); }
.tbleg .fb { margin-top: 6px; }
.tbleg .fmain .times { font-size: 17px; }
.tbleg .fmain .l2, .tbleg .fmain .l3 { font-size: 14px; }
.tbdate { font: 500 14px var(--font-body); color: var(--ink-2); }
.tbprice { border-top: 1.5px solid var(--soft-line); padding-top: 8px; margin-bottom: 10px; }
.row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 3px 0; font: 500 15px var(--font-body); }
.row1.sm { font-size: 14px; color: var(--ink-2); }
.row1.total { border-top: 1.5px dashed var(--soft-line); margin-top: 4px; padding-top: 6px; }
.row1.pts.win b { color: var(--win); }
.mp-total { font: 400 15px var(--font-body); }
.mp-total b { font: 700 30px var(--font-display); }
.mp-row { display: flex; justify-content: space-between; font: 500 15px var(--font-body); padding: 6px 0; border-top: 1.5px solid var(--soft-line); }
.mp-toggle { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--ink); text-decoration: none; font: 600 15px var(--font-body); }
.knob2 { width: 40px; height: 22px; border-radius: 999px; background: var(--lose-bg); border: 2px solid var(--line); position: relative; flex: none; }
.knob2::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); }
.mp-toggle.on .knob2 { background: var(--win); }
.mp-toggle.on .knob2::after { left: 20px; background: #fff; }

/* points rows */
.ptabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0 10px; }
.ptab { display: flex; flex-direction: column; align-items: center; padding: 8px; border-radius: 14px; border: 2px solid var(--soft-line); background: var(--card); color: var(--ink); text-decoration: none; }
.ptab .tl { font: 600 14px var(--font-body); color: var(--ink-2); }
.ptab b { font: 700 22px var(--font-display); }
.ptab .td { font: 400 14px var(--font-body); color: var(--ink-2); }
.ptab.on { border: 2.5px solid var(--ink); background: var(--accent-bg); }
.prow { background: var(--card); border: 1.5px solid var(--soft-line); border-radius: 16px; margin-top: 10px; overflow: hidden; }
.prow.chosen { border: 2.5px solid var(--win); }
.prow-top { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 16px 0; min-height: 10px; }
.dealbadge { font: 700 12px var(--font-body); text-transform: uppercase; letter-spacing: .5px; padding: 3px 10px; border-radius: 999px; }
.dealbadge.great { background: var(--win); color: #fff; }
.dealbadge.good { background: var(--win-bg); color: var(--win); border: 1.5px solid var(--win); }
:root[data-theme="dark"] .dealbadge.great { color: #0B2A17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dealbadge.great { color: #0B2A17; } }
.promo { font: 600 12px var(--font-body); padding: 3px 10px; border-radius: 999px; background: #3B2E8F; color: #fff; }
.promo.sel { background: var(--win); }
.prow-main { display: grid; grid-template-columns: minmax(0, 2.2fr) 100px 130px minmax(220px, 1.5fr); gap: 14px; align-items: center; padding: 10px 16px 12px; color: var(--ink); text-decoration: none; }
.prow-main:hover { background: var(--bg); }
.pcol { display: flex; flex-direction: column; }
.pcol b { font: 600 18px var(--font-display); }
.pcol small, .ptrans small { font: 400 13.5px var(--font-body); color: var(--ink-2); }
.ptrans { display: flex; flex-direction: column; gap: 2px; border-left: 1.5px dashed var(--soft-line); padding-left: 14px; }
.pair { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pair em { font-style: normal; font: 600 13.5px var(--font-body); padding: 2px 8px; border-radius: 8px; border: 1.5px solid var(--soft-line); background: var(--bg); color: var(--ink); }
.pair .arrow { color: var(--ink-2); }
.pp { font: 500 15px var(--font-body); }
.pp s { color: var(--ink-2); margin-left: 4px; }
.pp .tax { color: var(--ink-2); }
.wallet { display: flex; gap: 10px; align-items: center; padding: 8px 16px; background: var(--bg); font: 500 15px var(--font-body); border-top: 1.5px solid var(--soft-line); }
.wtag { font: 700 11px var(--font-body); text-transform: uppercase; letter-spacing: .5px; padding: 3px 8px; border-radius: 6px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); flex: none; }
.wallet.ok { color: var(--win); }
.wallet.need { color: var(--warn-ink); }
.pdetail > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; font: 600 15px var(--font-body); color: var(--link); border-top: 1.5px solid var(--soft-line); }
.pdetail > summary::-webkit-details-marker { display: none; }
.pdgrid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; padding: 4px 16px 12px; }
.tlh { font: 600 15px var(--font-body); text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); margin-bottom: 6px; }
.tlseg { border-left: 3px solid var(--soft-line); padding: 2px 0 8px 12px; margin-left: 4px; }
.tlp { font: 400 15px var(--font-body); }
.tlp b { font-weight: 600; }
.tlm { font: 400 14px var(--font-body); color: var(--ink-2); margin: 4px 0; }
.tlwait { font: 500 14px var(--font-body); color: var(--warn-ink); background: var(--warn-bg); border-radius: 8px; padding: 4px 8px; margin: 6px 0 0; display: inline-block; }
.bestbox { border: 2px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 8px; align-content: start; }
.bestbox .bar { height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.bestbox .bar i { display: block; height: 100%; background: var(--win); }
.prog-bar { display: flex; justify-content: space-between; font: 500 14px var(--font-body); }
.allcombos { padding: 0 16px 14px; }
.combo { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1.5px solid var(--soft-line); }
.combo.mine .pair em.bank { border-color: var(--line); }
.minetag { font: 600 11px var(--font-body); background: var(--accent-bg); color: var(--ink); padding: 2px 7px; border-radius: 6px; }
.herotrip { display: grid; gap: 10px; margin: 0 0 14px; }
.herotrip > div { display: grid; gap: 4px; }
.heronote { font: 500 15px var(--font-body); color: var(--ink-2); margin: 10px 0 0; }
.deal { font-weight: 600; }

/* phone */
@media (max-width: 899px) {
  .frow { grid-template-columns: minmax(0, 1fr) auto; }
  .frow .fpts { grid-column: 1; }
  .frow .ftags { grid-column: 2; grid-row: 2; }
  .prow-main { grid-template-columns: minmax(0, 1fr) auto; }
  .prow-main .fb { grid-column: 1 / -1; }
  .ptrans { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1.5px dashed var(--soft-line); padding-top: 8px; }
  .pdgrid { grid-template-columns: minmax(0, 1fr); }
  .combo { grid-template-columns: minmax(0, 1fr); }
  .datestrip a { font-size: 13px; padding: 8px 4px; }
}

/* autocomplete: unmistakable active row, always on top */
.ac-list { z-index: 1000; }
.ac-item { border-left: 4px solid transparent; }
.ac-item b { font: 700 20px var(--font-display) !important; }
.ac-item.on { background: #23324D !important; color: #FFFFFF !important; border-left-color: #FFC93C; }
.ac-item.on small { color: #DCE3F0 !important; }
.ac-item.on.metro b { color: #FFC93C; }
.tripform, .searchcard, .card, .editcard, .sidecard { overflow: visible; }
.herotrip > div { display: block; }
.herotrip .fb { margin-top: 6px; }
.prow-main { grid-template-columns: minmax(0, 2fr) 92px 118px minmax(270px, 1.7fr); }
.ptrans .pair { flex-wrap: nowrap; }
@media (max-width: 899px) { .prow-main { grid-template-columns: minmax(0, 1fr) auto; } .ptrans .pair { flex-wrap: wrap; } }

.pointserr { margin: 10px 0; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--warn-bg); color: var(--warn-ink); font-size: 15px; }
.pointserr a { color: var(--warn-ink); font-weight: 700; }

/* airports on every row (metro searches span several airports) */
.fb .times abbr.ap { text-decoration: none; font-weight: 700; font-size: .78em; letter-spacing: .02em; color: var(--ink-2); cursor: help; }
.fb .times .to { color: var(--ink-2); font-size: .85em; }
.routeline { font-weight: 800; font-size: 16px; color: var(--ink); margin: 0 0 4px; }
.apchips { margin-top: 8px; align-items: center; }
.apchips .chiplab { font-weight: 700; font-size: 14px; color: var(--ink-2); margin-right: 4px; }

/* ---------- 10-10 batch: home sky, trip type, travelers, deals, footer, loading, profile, admin ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.showcase.wide { width: 100vw; margin-left: calc(50% - 50vw); border-radius: 0; border-width: 0 0 3px; box-shadow: none; margin-top: 0; }
@media (min-width: 760px) { .showcase.wide .hello { max-width: 1320px; margin: 0 auto; left: 0; right: 0; padding: 0 32px; } }
@media (max-width: 759px) { .showcase.wide .hello { padding: 12px 16px 40px; } .showcase.wide { border-width: 0 0 3px; } }
.routesvg .doodle-label { font: 700 15px var(--font-display); fill: var(--ink); opacity: .7; }
@media (min-width: 760px) { .showcase.wide { height: 340px; } .showcase.wide .hello { bottom: 70px; } }

/* Trip type: big, obvious segmented control */
.triptype { display: inline-flex; gap: 0; border: 2.5px solid var(--line); border-radius: 999px; padding: 4px; margin: 0 0 16px; background: var(--bg); }
.triptype input { position: absolute; opacity: 0; pointer-events: none; }
.triptype label { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px; font-weight: 800; font-size: 16px; cursor: pointer; color: var(--ink-2); }
.triptype label svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.triptype input:checked + label { background: var(--ink); color: var(--card); }
.triptype input:focus-visible + label { outline: 3px solid var(--sky); outline-offset: 2px; }
@media (max-width: 520px) { .triptype { display: flex; } .triptype label { flex: 1; justify-content: center; padding: 9px 6px; font-size: 15px; white-space: nowrap; } .triptype label svg { display: none; } }

.grid-pax { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; align-items: end; }
.grid-pax .gofield .btn.big { width: 100%; }
@media (min-width: 760px) { .grid-pax { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-pax .travfield { grid-column: span 2; } }
.formfoot.slim { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }

/* Travelers picker */
.travelers { position: relative; }
.travelers > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 2.5px solid var(--line); border-radius: 14px; background: var(--bg); padding: 10px 14px; min-height: 50px; }
.travelers > summary::-webkit-details-marker { display: none; }
.travelers > summary .tsum { font-size: 17px; font-weight: 800; color: var(--ink); }
.travelers > summary .chev { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; flex: none; transition: transform .15s; }
.travelers[open] > summary .chev { transform: rotate(180deg); }
.field > span.f { display: block; font-weight: 800; font-size: 13px; letter-spacing: .3px; text-transform: uppercase; color: var(--ink-2); margin: 0 0 6px; }
.agebox[hidden] { display: none; }
.travpop { margin-top: 8px; background: var(--card); border: 2.5px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 10px 16px 14px; }
.travelers.js .travpop { position: absolute; z-index: 40; left: 0; top: 100%; width: min(380px, calc(100vw - 32px)); }
.trow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1.5px solid var(--soft-line); }
.trow .tl b { display: block; font-size: 16px; }
.trow .tl small { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.step { display: inline-flex; align-items: center; gap: 8px; }
.step input, .step output { width: 44px; text-align: center; font-weight: 800; font-size: 17px; border: 0; background: transparent; padding: 4px 0; color: var(--ink); -moz-appearance: textfield; }
.step input::-webkit-inner-spin-button, .step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.travelers:not(.js) .step input { border: 2px solid var(--line); border-radius: 10px; background: var(--bg); width: 64px; }
.travelers:not(.js) .sb { display: none; }
.sb { width: 38px; height: 38px; border-radius: 50%; border: 2.5px solid var(--line); background: var(--card); color: var(--ink); font: 800 20px/1 var(--font-body); cursor: pointer; display: inline-grid; place-items: center; }
.sb:hover:not(:disabled) { background: var(--accent-bg); }
.sb:disabled { opacity: .35; cursor: default; }
.ages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 6px 0 8px; border-bottom: 1.5px solid var(--soft-line); }
.travelers.js .ages:not(:has(.agebox.on)) { display: none; }
.agebox { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.agebox select { padding: 7px 10px; font-size: 15px; }
.thint { font-size: 14px; color: var(--ink-2); margin: 10px 0 0; }
.terr { font-size: 14px; color: var(--warn-ink); background: var(--warn-bg); border-radius: 10px; padding: 6px 10px; margin: 8px 0 0; font-weight: 700; }
.tfoot { display: flex; justify-content: flex-end; margin-top: 10px; }
.travelers:not(.js) .tfoot { display: none; }

/* Find my deals: instant pressed state */
.gobtn { transition: transform .08s ease, background-color .15s ease, box-shadow .08s ease; }
.gobtn .busylab { display: none; }
.gobtn:active, .gobtn.busy { transform: translate(2px, 2px) scale(.97); box-shadow: 1px 1px 0 var(--line); }
.gobtn.busy { background: var(--sky); pointer-events: none; }
.gobtn.busy .golab { display: none; }
.gobtn.busy .busylab { display: inline-flex; align-items: center; gap: 8px; }
.gobtn.busy .busylab svg { animation: jbwiggle .6s ease-in-out infinite alternate; }
@keyframes jbwiggle { from { transform: translateY(-2px) rotate(-6deg); } to { transform: translateY(2px) rotate(6deg); } }

/* Deals */
.deals { max-width: 1320px; margin: 30px auto 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.dealsec { min-width: 0; }
.dealhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.dealhead h2 { font-size: 24px; margin: 0; }
.dealrow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 14px; overflow-x: auto; padding: 4px 4px 12px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.dealrow::-webkit-scrollbar { height: 8px; }
.dealrow::-webkit-scrollbar-thumb { background: var(--soft-line); border-radius: 8px; }
@media (min-width: 1000px) { .dealrow { grid-auto-columns: calc((100% - 4 * 14px) / 5); } }
.dealcard { scroll-snap-align: start; display: grid; gap: 6px; align-content: start; text-decoration: none; color: var(--ink); background: var(--card);
  border: 2.5px solid var(--line); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow); transition: transform .12s ease; }
.dealcard:hover { transform: translateY(-3px); }
.dealcard:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.dealcard.dc-cash { border-top-width: 8px; border-top-color: var(--sky); }
.dealcard.dc-pts { border-top-width: 8px; border-top-color: var(--win); }
.dc-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.dc-city { font: 700 19px var(--font-display); }
.dc-code { font-size: 13px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.dc-price .price { font-size: 26px; }
.dc-price small, .dc-meta, .dc-vpp small { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.dc-go { font-size: 14px; font-weight: 800; color: var(--link); margin-top: 2px; }
.dealwait { animation: jbpulse 1.2s ease-in-out infinite alternate; }
@keyframes jbpulse { from { opacity: .55; } to { opacity: 1; } }
.bonusgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.bonuscard { display: grid; gap: 4px; background: var(--card); border: 2px solid var(--soft-line); border-radius: 18px; padding: 12px 16px; }
.bonuscard.mine { border: 2.5px solid var(--line); background: var(--great-bg); }
.bonuscard .bpct { font: 700 28px var(--font-display); color: var(--win); }
.bonuscard .bpair { font-size: 15px; }

/* Footer */
.sitefoot { margin: 44px 0 16px; padding: 22px 0 0; border-top: 2px solid var(--soft-line); display: grid; gap: 18px; text-align: left; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.sitefoot .fh { display: flex; align-items: center; gap: 8px; font: 700 16px var(--font-display); color: var(--ink); }
.sitefoot p { margin: 6px 0 0; line-height: 1.5; }
.sitefoot a { color: var(--link); }
@media (min-width: 760px) { .sitefoot { grid-template-columns: 1.2fr 1.2fr 1.2fr .8fr; } }

/* Loading screen */
.loadscreen { margin-top: 18px; border: 3px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--card); }
.loadsky .routesvg { display: block; width: 100%; height: 260px; }
@media (max-width: 759px) { .loadsky .routesvg { height: auto; aspect-ratio: 640 / 300; } }
.loadtext { padding: 18px 24px 22px; }
.loadtitle { margin: 0 0 10px; font-size: 30px; }
.steps { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.steps li { font-size: 17px; font-weight: 700; color: var(--ink-2); padding-left: 30px; position: relative; }
.steps li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--soft-line); }
.steps li.now { opacity: 1; color: var(--ink); }
.steps li.now::before { border-color: var(--sky); border-top-color: var(--line); animation: jbspin .8s linear infinite; }
.steps li.done { opacity: 1; }
.steps li.done::before { background: var(--win); border-color: var(--win); }
@keyframes jbspin { to { transform: rotate(360deg); } }
.loaderr { color: var(--warn-ink); background: var(--warn-bg); border-radius: 12px; padding: 10px 12px; font-weight: 700; }
main.wrap { animation: jbfade .35s ease-out; }
@keyframes jbfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  main.wrap, .dealwait, .steps li.now::before, .gobtn.busy .busylab svg { animation: none; }
  .gobtn, .dealcard { transition: none; }
}

/* Profile: balanced 2 x 2 */
.profgrid { display: grid; gap: 18px; }
.profgrid .pcard { margin: 0; height: 100%; display: flex; flex-direction: column; }
.profgrid .pcard > :last-child { margin-bottom: 0; }
.profgrid .pcard h3:first-child { margin-top: 0; }
.checks.two { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .profgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; grid-auto-rows: auto; }
  .profgrid .pcard .pfill { margin-top: auto; }
  .checks.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.savebar { grid-column: 1 / -1; position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 5; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between;
  background: var(--card); border: 2.5px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 10px 14px; }
.savebar .btn.big { width: auto; min-width: 240px; }
@media (min-width: 760px) { .savebar { bottom: 12px; } }

/* Admin */
.stat3 { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat3 > div { display: grid; gap: 2px; background: var(--bg); border-radius: 14px; padding: 10px 12px; }
.stat3 .price { font-size: 26px; }
.tablewrap { overflow-x: auto; }
table.usage td, table.usage th { vertical-align: middle; padding: 8px 8px; }
table.usage .num { text-align: right; font-variant-numeric: tabular-nums; }
.limitform { display: flex; gap: 6px; align-items: center; }
.limitform input { width: 80px; padding: 6px 8px; }
@media (max-width: 600px) { .stat3 { grid-template-columns: 1fr; } }
@media (max-width: 759px) { .travelers.js .travpop { width: auto; right: 0; } }

/* ---------- password auth, invite links, welcome ---------- */
.pwwrap { position: relative; display: block; }
.pwwrap input { width: 100%; padding-right: 76px; }
.pwtoggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 2px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 10px; font: 800 14px var(--font-body); padding: 5px 10px; cursor: pointer; }
.pwhint { display: block; margin-top: 6px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.forgot { margin-top: 14px; }
.forgot summary { cursor: pointer; font-weight: 800; color: var(--link); font-size: 15px; }
.forgot p { margin: 8px 0 0; }
.banner.err { background: var(--warn-bg); color: var(--warn-ink); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; font-weight: 700; margin-bottom: 12px; }
.authbox.wide { max-width: 640px; }
.wsteps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 16px; flex-wrap: wrap; }
.wsteps li { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; border: 2px solid var(--soft-line); }
.wsteps li b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--soft-line); color: var(--ink); font-size: 13px; }
.wsteps li.on { border-color: var(--line); color: var(--ink); background: var(--accent-bg); }
.wsteps li.done b { background: var(--win); color: var(--card); }
.wfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.wfoot .skip { font-weight: 800; color: var(--link); }
.admingrid { display: grid; gap: 16px; }
@media (min-width: 900px) { .admingrid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: start; } }
.linkbox { background: var(--great-bg); margin-bottom: 16px; }
.copyrow { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.copyrow input { flex: 1; min-width: 0; font: 600 14px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 8px 10px; }
.copyrow.sm input { font-size: 13px; padding: 6px 8px; }
.invrow { display: flex; gap: 10px; align-items: flex-end; padding: 10px 0; border-top: 1.5px solid var(--soft-line); }
.invrow .grow { flex: 1; min-width: 0; }
table.usage .nowrap { white-space: nowrap; }
table.usage tr.off td { opacity: .6; }
.togglebtn { min-width: 52px; }

/* ---------- scannable hero, step-by-step picking, booking page + pop-up ---------- */
.herosum { display: grid; gap: 12px; }
.hs-head { margin: 0; font-size: 34px; line-height: 1.1; }
.hs-head.hs-points { color: var(--win); }
.hs-sub { font-weight: 700; color: var(--ink-2); font-size: 15px; }
.hs-legs { display: grid; gap: 8px; }
.hs-leg { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 4px 10px; padding: 10px 12px; border: 2px solid var(--soft-line); border-radius: 16px; background: var(--card); }
.hs-leg .tbdate { font-weight: 800; font-size: 14px; color: var(--ink-2); }
.hs-leg .fb { grid-column: 1 / -1; }
@media (min-width: 900px) { .hs-legs { grid-template-columns: 1fr 1fr; } }
.hs-cells { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .hs-cells { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); } }
.hs-cell { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--bg); border: 2px solid var(--soft-line); }
.hs-cell.good { background: var(--win-bg); border-color: var(--win); }
.hs-cell.bad { background: var(--lose-bg); }
.hs-cell .k { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-2); }
.hs-cell .v { font: 700 20px var(--font-display); color: var(--ink); line-height: 1.2; }
.hs-cell.good .v { color: var(--win); }
.hs-cell .s { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.hs-foot { margin: 0; }
.stepno { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--card); font: 700 16px var(--font-display); flex: none; }
.stepno.done { background: var(--win); }
.dirhead .dirroute { font-size: .8em; color: var(--ink-2); }
.stepsum { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px 14px; align-items: center; background: var(--card); border: 2.5px solid var(--line); border-radius: 18px; padding: 12px 14px; margin: 12px 0; box-shadow: var(--shadow); }
.stepsum .ss-lab { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.stepsum .ss-price { font: 700 18px var(--font-display); }
@media (max-width: 600px) { .stepsum { grid-template-columns: auto minmax(0, 1fr); } .stepsum .ss-change { grid-column: 1 / -1; justify-self: start; } }
.steplocked { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border: 2px dashed var(--soft-line); border-radius: 18px; margin: 12px 0; font-weight: 800; color: var(--ink-2); }
.steplocked .stepno { background: var(--soft-line); color: var(--ink); }
.tripdone { margin-top: 16px; background: var(--card); border: 3px solid var(--line); border-radius: 22px; padding: 16px; box-shadow: var(--shadow-lg); }
.tripdone .dirhead { display: flex; gap: 10px; align-items: center; margin: 0 0 12px; }
.td-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.td-opt { display: grid; gap: 2px; padding: 12px; border-radius: 16px; border: 2px solid var(--soft-line); background: var(--bg); }
.td-opt.win { border-color: var(--win); background: var(--win-bg); }
.td-opt .k { font-weight: 800; font-size: 13px; text-transform: uppercase; color: var(--ink-2); }
.td-opt .price { font-size: 22px; }
.td-opt small { color: var(--ink-2); font-weight: 600; font-size: 14px; }
.td-verdict { margin: 12px 0; }
.bookcta { max-width: 420px; }
.walletnote { margin: 6px 0 8px; }
/* booking plan (page + dialog) */
.bigwarn { background: var(--warn-bg); color: var(--warn-ink); border: 3px solid var(--warn-ink); border-radius: 16px; padding: 12px 14px; font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.bp-head { margin-bottom: 8px; }
.bp-title { margin: 2px 0; font-size: 26px; }
.bp-sec { margin-top: 16px; }
.bp-sec h3 { margin: 0 0 8px; }
.bp-leg { border: 2px solid var(--soft-line); border-radius: 16px; padding: 12px; margin-bottom: 10px; background: var(--card); }
.bp-legtop { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.bp-flight { display: flex; gap: 12px; align-items: flex-start; }
.bp-flight .logo img { width: 32px; height: 32px; }
.bp-times { font-size: 19px; font-weight: 600; }
.bp-times abbr { text-decoration: none; font-weight: 800; font-size: .8em; color: var(--ink-2); }
.bp-segs { margin: 8px 0 0; padding-left: 20px; font-size: 14.5px; }
.bp-award { margin-top: 6px; }
.bp-transfer { border: 2px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.bp-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 16px; margin: 10px 0 0; }
.bp-dl dt { font-size: 12.5px; font-weight: 800; text-transform: uppercase; color: var(--ink-2); }
.bp-dl dd { margin: 2px 0 0; font-size: 15px; }
.bp-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.bp-steps li { counter-increment: s; display: grid; gap: 4px; padding: 10px 12px 10px 52px; position: relative; border: 2px solid var(--soft-line); border-radius: 16px; }
.bp-steps li::before { content: counter(s); position: absolute; left: 12px; top: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--card); display: grid; place-items: center; font: 700 15px var(--font-display); }
.bp-steps li .btn { justify-self: start; margin-top: 4px; }
.bp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.bookpage { margin-top: 12px; }
.bookdlg { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 3px solid var(--line); border-radius: 22px; padding: 0; background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg); }
.bookdlg::backdrop { background: rgba(20, 27, 43, .55); }
.dlghead { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; background: var(--card); border-bottom: 2px solid var(--soft-line); }
.dlghead h2 { margin: 0; font-size: 20px; }
.dlgclose { width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--line); background: var(--card); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.dlgbody { padding: 14px 16px 18px; }
@media (max-width: 640px) {
  .bookdlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; }
}
@media print {
  .topbar, .tabbar, .sitefoot, .noprint, .samplebar { display: none !important; }
  body { background: #fff; padding: 0; }
  .card, .bp-leg, .bp-transfer, .bp-steps li { box-shadow: none !important; break-inside: avoid; }
  .bigwarn { border-width: 2px; }
}
