/* VOICE   a calm travel instrument for adults; the play lives in motion and small details.
   IDEA    the logo's navigator compass and a boarding pass: the bezel ticks become the progress, the compass becomes the budget dial.
   PICTURE the budget compass (cedar disc, saffron ring, a plane for the needle) and the boarding pass that fills in as you answer.
   COLOUR  cedar #1D6B57 leads (top band, buttons, choices), saffron #EDA93A marks (ring, points, budget), navy #2E2A5E carries the ticket.
   TYPE    Alexandria for headings and numbers, Readex Pro for reading. LAYOUT one column for thumbs, the main button in reach, tabs at the bottom. */
:root {
  --cedar: #1D6B57; --cedar-2: #2C7A63; --cedar-deep: #134A3C; --saffron: #EDA93A; --navy: #2E2A5E; --pom: #B8323F;
  --bg: #F1F5F2; --surface: #FFFFFF; --ink: #13252B; --muted: #4A5D63; --line: #D4DED8; --edge: #7F918B; --soft: #E7EEEA;
  --accent: var(--cedar); --accent-ink: #FFFFFF; --accent-hover: #175747; --accent-soft: #DAECE4;
  --sun: var(--saffron); --sun-ink: #241A06; --sun-soft: #FBEFD8; --dusk: var(--navy); --violet: #3B378A;
  --bad: #B8323F; --bad-soft: #F9E3E6; --good: var(--cedar);
  --band: linear-gradient(160deg, #1F7560 0%, #1D6B57 45%, #165A49 100%);
  --font-display: "Alexandria", "Readex Pro", "Segoe UI", system-ui, sans-serif;
  --font-body: "Readex Pro", "Segoe UI", system-ui, sans-serif;
  --toph: 60px; --tabh: 0px; --col: 720px;
  --float: 0 1px 0 rgba(19, 37, 43, .04), 0 12px 32px rgba(19, 37, 43, .10);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1714; --surface: #13221F; --ink: #E6EFEA; --muted: #9FB4AD; --line: #24372F; --edge: #6E847C; --soft: #1A2C27;
    --accent: #4FC39F; --accent-ink: #062018; --accent-hover: #68CFAE; --accent-soft: #163A30; --sun-soft: #3A2E17; --violet: #A9A4FF;
    --bad: #FF7D8B; --bad-soft: #3D1F26; --band: linear-gradient(160deg, #15513F 0%, #11463A 55%, #0D3A30 100%);
    --float: 0 1px 0 rgba(0, 0, 0, .2), 0 12px 32px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  --bg: #0B1714; --surface: #13221F; --ink: #E6EFEA; --muted: #9FB4AD; --line: #24372F; --edge: #6E847C; --soft: #1A2C27;
  --accent: #4FC39F; --accent-ink: #062018; --accent-hover: #68CFAE; --accent-soft: #163A30; --sun-soft: #3A2E17; --violet: #A9A4FF;
  --bad: #FF7D8B; --bad-soft: #3D1F26; --band: linear-gradient(160deg, #15513F 0%, #11463A 55%, #0D3A30 100%);
  --float: 0 1px 0 rgba(0, 0, 0, .2), 0 12px 32px rgba(0, 0, 0, .4);
}
@media (max-width: 720px) { :root { --tabh: calc(66px + var(--badge, 0px) + env(safe-area-inset-bottom, 0px)); } }

html { overflow-x: clip; scroll-padding-top: calc(var(--toph) + 120px); }
body { padding: 0 0 calc(var(--tabh) + 40px); overflow-x: clip; letter-spacing: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-family: var(--font-display); font-weight: 600; }
:root[lang="ar"] h1, :root[lang="ar"] h2, :root[lang="ar"] h3 { letter-spacing: 0; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; border-radius: 8px; }
.wrap { max-width: var(--col); padding-inline: max(16px, env(safe-area-inset-left, 0px)); gap: 34px; }
main { gap: 34px; }
.gi { width: 22px; height: 22px; display: block; flex: none; }
i.gic { display: contents; font-style: normal; }
input, select, textarea, button { min-width: 0; }
.row2 > *, .tiles > *, .destpicks > *, .gtiles > *, .quick > * { min-width: 0; }

/* ---------- top bar: the logo's cedar, edge to edge ---------- */
.top { position: sticky; top: 0; z-index: 50; display: block; background: var(--cedar); color: #fff; padding-top: var(--safe-top); box-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
:root[data-theme="dark"] .top { background: #11463A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .top { background: #11463A; } }
.topin { max-width: var(--col); margin-inline: auto; padding: 8px max(16px, env(safe-area-inset-left, 0px)); min-height: var(--toph); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { color: #fff; font-size: 22px; font-weight: 800; gap: 9px; letter-spacing: -0.01em; }
.brand .logo { width: 40px; height: 40px; filter: none; }
.topacts { display: flex; align-items: center; gap: 8px; }
.iconbtn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.iconbtn:hover { background: rgba(255, 255, 255, .2); }
.iconbtn[aria-expanded="true"] { background: #fff; color: var(--cedar); }
.ptspill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; border: 0; background: var(--saffron); color: var(--sun-ink); font-family: var(--font-display); font-weight: 800; font-size: 16px; cursor: pointer; }
.ptspill .gi { width: 20px; height: 20px; fill: rgba(255, 255, 255, .55); }
.ptspill[aria-expanded="true"] { background: #fff; }
.ptspill.bump { animation: bump .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
/* one language button: it shows the other language */
/* language: both choices side by side in Settings and on the first screen */
.langseg button { min-height: 40px; padding: 4px 14px; font-weight: 600; }
#bookBtn, #acctBtn { display: none !important; }

/* ---------- the planner: a cedar band with the promise and the ticket; the questions in a card ---------- */
.stage { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.intro { position: relative; isolation: isolate; gap: 14px; padding: 26px 0 92px; color: #fff; }
.intro::before { content: ""; position: absolute; z-index: -2; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: var(--band); }
.intro .rose { position: absolute; z-index: -1; width: 300px; height: 300px; inset-inline-end: -110px; top: -70px; color: var(--saffron); opacity: .16; }
.rose .spin { transform-origin: 100px 100px; animation: rose 140s linear infinite; }
@keyframes rose { to { transform: rotate(360deg); } }
.intro h1 { font-size: clamp(34px, 8.6vw, 50px); line-height: 1.04; font-weight: 800; max-width: 13ch; color: #fff; }
:root[lang="ar"] .intro h1 { line-height: 1.25; max-width: 16ch; }
.intro .lede { color: rgba(255, 255, 255, .86); font-size: 17px; max-width: 38ch; }
.sample { margin-top: 8px; }
.sample > p { color: rgba(255, 255, 255, .72); font-size: 13px; }
#resumeBox .btn { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .35); min-height: 44px; }
#resumeBox .btn:hover { background: rgba(255, 255, 255, .2); border-color: #fff; }
.card { margin-top: -70px; position: relative; border: 0; border-radius: 28px; padding: 22px 20px 0; box-shadow: var(--float); }

/* the boarding pass (planner and trip) */
.ticket, .pass { background-color: var(--navy); border-radius: 22px; box-shadow: 0 18px 40px rgba(10, 16, 40, .28); }
.pass::before, .pass::after { background: #1D6B57; }
.ticket::before, .ticket::after { background: var(--bg); }
.pass .tmain, .tmain { background-image: radial-gradient(420px 200px at 0% 0%, rgba(255, 255, 255, .08), transparent); }
.pass .place .big, .ticket .place .big { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; }
.place .code { font-family: var(--font-display); font-weight: 600; letter-spacing: .08em; }
.stub, .pstub { background: var(--saffron); }
.stub .num, .pstub .num { font-family: var(--font-display); font-weight: 800; white-space: nowrap; overflow: hidden; }
.pass .pstub .num.long { white-space: nowrap; overflow-wrap: normal; }
.pass .fl { display: inline-block; animation: flap .44s cubic-bezier(.25, .8, .35, 1.25) backwards; animation-delay: calc(var(--k) * 28ms); transform-origin: 50% 55%; }
@keyframes flap { 0% { transform: perspective(200px) rotateX(-92deg); opacity: .1; } 65% { transform: perspective(200px) rotateX(14deg); opacity: 1; } 100% { transform: none; } }
.pass .flipall { animation: flapall .5s cubic-bezier(.25, .8, .35, 1.2); transform-origin: 50% 55%; }
@keyframes flapall { 0% { transform: perspective(300px) rotateX(-80deg); opacity: .2; } 100% { transform: none; } }

/* progress: the logo's bezel ticks, one segment per question */
.phead { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; }
.progress span { height: 10px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--line) 0 2px, transparent 2px 6px); flex: none; }
.progress span::before, .progress span:last-child::after { display: none; }
.progress span.done { background: var(--saffron); }
.progress span.done:not(:has(+ .done)) { background: linear-gradient(90deg, var(--saffron) 70%, var(--cedar) 70%); }
[dir="rtl"] .progress span.done:not(:has(+ .done)) { background: linear-gradient(270deg, var(--saffron) 70%, var(--cedar) 70%); }
.stepno { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0; }
fieldset { gap: 14px; }
legend { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.15; margin-bottom: 14px; letter-spacing: -0.01em; }
:root[lang="ar"] legend { line-height: 1.4; }
.grouplabel { font-family: var(--font-display); font-weight: 600; font-size: 15px; margin-top: 4px; }
.hint { color: var(--muted); font-size: 14px; margin-top: -6px; }
.f, label.f { font-size: 14px; font-weight: 500; }
.f.inline { flex-direction: row; align-items: center; gap: 10px; }
.f.inline select { width: auto; flex: 1; min-height: 44px; }
input[type="text"], input[type="email"], input[type="date"], input[type="number"], input[type="time"], select, textarea { border: 1.5px solid var(--edge); border-radius: 14px; font-size: 16px; }
input:focus, select:focus, textarea:focus { border-color: var(--cedar); box-shadow: 0 0 0 3px color-mix(in srgb, var(--saffron) 45%, transparent); outline: none; }
.search { position: relative; display: block; }
.search .gi { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search input { padding-inline-start: 44px; min-height: 52px; }

/* tap choices */
.tiles { display: grid; gap: 10px; }
.tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles.vibes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles.stays { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tile > span { display: flex; align-items: center; gap: 12px; min-height: 60px; height: 100%; padding: 10px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); transition: background-color .15s, border-color .15s, transform .15s; }
.tile > span .gi { width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: var(--soft); color: var(--cedar); }
.tile b { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.2; }
.tile small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.35; }
.tiles.stays .tile > span { min-height: 56px; }
.tiles.stays .tile > span > b { flex: none; }
.tiles.stays .tile > span { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; }
.tiles.stays .tile > span .gi { grid-row: 1 / 3; }
.tile:hover > span { border-color: var(--edge); }
.tile input:checked + span { background: var(--cedar); border-color: var(--cedar); color: #fff; }
.tile input:checked + span .gi { background: var(--saffron); color: var(--navy); }
.tile input:checked + span small { color: rgba(255, 255, 255, .85); }
.tile input:focus-visible + span { outline: 3px solid var(--saffron); outline-offset: 2px; }
.tile input:active + span { transform: scale(.98); }
:root[data-theme="dark"] .tile input:checked + span { color: var(--accent-ink); }
.stepper { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; border: 1.5px solid var(--edge); border-radius: 14px; background: var(--surface); overflow: hidden; }
.stepper input { width: 100%; border: 0; border-radius: 0; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 20px; min-height: 48px; padding: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { box-shadow: none; }
.stepper:focus-within { border-color: var(--cedar); box-shadow: 0 0 0 3px color-mix(in srgb, var(--saffron) 45%, transparent); }
.stp { height: 48px; border: 0; background: var(--soft); color: var(--cedar); cursor: pointer; display: grid; place-items: center; }
.stp:hover { background: var(--accent-soft); }
.stp:active { transform: scale(.92); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.qchip, .quick .fchip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 500; font-size: 15px; cursor: pointer; transition: background-color .15s, border-color .15s; }
.qchip:hover, .quick .fchip:hover { border-color: var(--edge); }
.qchip[aria-pressed="true"], .quick .fchip[aria-pressed="true"] { background: var(--cedar); border-color: var(--cedar); color: #fff; }
:root[data-theme="dark"] .qchip[aria-pressed="true"], :root[data-theme="dark"] .quick .fchip[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.qchip.mon { flex-direction: column; gap: 0; min-width: 72px; padding: 6px 12px; border-radius: 14px; line-height: 1.15; justify-content: center; }
.qchip.mon b { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.qchip.mon small { font-size: 12px; opacity: .8; }
.months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* favourite destinations as little departure-board cards */
.destpicks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dpick { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: start; min-height: 62px; padding: 9px 12px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; }
.dpick .dcode { grid-row: 1 / 3; display: grid; place-items: center; width: 52px; height: 42px; border-radius: 10px; background: var(--navy); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: .06em; }
.dpick b { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.15; }
.dpick small { color: var(--muted); font-size: 12.5px; line-height: 1.2; }
.dpick:hover { border-color: var(--edge); }
.dpick:active { transform: scale(.98); }
.dpick[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.dpick[aria-pressed="true"] .dcode { background: var(--saffron); color: var(--navy); }
.dpick[aria-pressed="true"] small { color: rgba(255, 255, 255, .8); }
:root[data-theme="dark"] .dpick[aria-pressed="true"] { background: #2B2766; border-color: #8C86F2; }
.surprise { position: relative; display: block; cursor: pointer; }
.surprise input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.surprise > span { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; border: 1.5px dashed var(--edge); background: var(--bg); }
.surprise > span .gi { grid-row: 1 / 3; width: 38px; height: 38px; padding: 8px; border-radius: 50%; background: var(--sun-soft); color: var(--sun-ink); }
.surprise b { font-family: var(--font-display); font-weight: 700; }
.surprise small { color: var(--muted); font-size: 13px; }
.surprise input:checked + span { border-style: solid; border-color: var(--cedar); background: var(--accent-soft); }
.surprise input:checked + span .gi { background: var(--cedar); color: #fff; animation: needle 1.4s ease-in-out; }
@keyframes needle { 0% { transform: rotate(0); } 30% { transform: rotate(-35deg); } 60% { transform: rotate(20deg); } 100% { transform: rotate(0); } }
.surprise input:focus-visible + span { outline: 3px solid var(--saffron); outline-offset: 2px; }
.regionbox { display: flex; flex-direction: column; gap: 10px; }
.chip > span { border: 1.5px solid var(--line); min-height: 44px; }
.chip input:checked + span { background: var(--cedar); border-color: var(--cedar); color: #fff; }
:root[data-theme="dark"] .chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 3px solid var(--saffron); }
.tierpick .chip > span { border-radius: 14px; }
/* an on/off switch for "includes flights" */
.switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 14px; border-radius: 14px; background: var(--bg); cursor: pointer; font-weight: 500; }
.switch input { -webkit-appearance: none; appearance: none; order: 2; flex: none; width: 50px; height: 30px; margin: 0; border-radius: 999px; background: var(--edge); position: relative; cursor: pointer; transition: background-color .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: inset-inline-start .2s; }
.switch input:checked { background: var(--cedar); }
.switch input:checked::after { inset-inline-start: 23px; }
.switch input:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
.seg3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 16px; background: var(--soft); }
.seg3 label { position: relative; cursor: pointer; }
.seg3 input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.seg3 span { display: grid; place-items: center; min-height: 44px; border-radius: 12px; font-weight: 600; font-size: 15px; }
.seg3 input:checked + span { background: var(--surface); color: var(--cedar); box-shadow: 0 2px 6px rgba(19, 37, 43, .12); }
.seg3 input:focus-visible + span { outline: 3px solid var(--saffron); }
/* fine-tune: rarely needed choices behind a panel button that says what is set */
.tune { border-radius: 16px; background: var(--bg); }
.tunebtn { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 14px; border: 0; border-radius: 16px; background: transparent; color: var(--ink); cursor: pointer; text-align: start; }
.tunebtn::after { content: ""; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -4px; transition: transform .2s; }
.tunebtn[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 4px; }
.tunebtn .gi { width: 20px; height: 20px; color: var(--cedar); }
.tunet { font-family: var(--font-display); font-weight: 600; }
.tunesum { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tunebody { padding: 0 14px 16px; display: flex; flex-direction: column; gap: 10px; }
/* money: a short currency menu beside a big amount */
.money .selwrap { flex: none; }
.money .sel { width: 6.8em; min-height: 52px; border: 1.5px solid var(--edge); border-radius: 14px; font-weight: 600; text-overflow: ellipsis; }
.money input { flex: 1; min-height: 52px; font-family: var(--font-display); font-weight: 700; font-size: 22px; }
/* the rough price while choosing a budget */
#live { background: var(--bg); border: 1.5px dashed var(--line); }
#live strong { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
#live .lrow { padding: 6px 0; border-top: 1px solid var(--line); }
/* the main button stays within reach while answering */
/* the buttons sit at the end of each short question, in the page; nothing follows you down the screen */
.card .nav { position: static; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 0 0 22px; background: none; }
.card .nav:has(#prefsBtn:not([hidden])) #next { order: -1; flex: 1 1 100%; margin-inline-start: 0; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--accent); padding-inline: 12px; }
.btn.quiet:hover { background: var(--accent-soft); }

.err { margin-top: 6px; min-height: 0; }
.err:empty { display: none; }
.btn { border-radius: 14px; font-weight: 600; min-height: 48px; }
.btn .gi { width: 20px; height: 20px; }
.btn.primary { box-shadow: 0 4px 0 var(--cedar-deep); }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cedar-deep); }
:root[data-theme="dark"] .btn.primary { box-shadow: 0 4px 0 #2C8A6B; }
#next { min-height: 54px; padding-inline: 26px; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
#back { border: 0; background: var(--soft); }
[dir="rtl"] #next .gi, [dir="rtl"] .tchip.go .gi { transform: scaleX(-1); }
[dir="rtl"] #back .gi { transform: scaleX(-1); }

/* ---------- the trip: a pinned title with tabs, one view at a time ---------- */
#result { --gap: 22px; gap: 22px; }
.rnav { position: sticky; top: calc(var(--toph) + var(--safe-top)); z-index: 30; display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; border: 0; border-radius: 0 0 20px 20px; margin-inline: -4px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 8px 20px rgba(19, 37, 43, .06); overflow: visible; }
.rtop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rtitle { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.rtitle b { font-family: var(--font-display); font-weight: 800; font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtitle span { color: var(--muted); font-size: 13px; }
.editbtn { min-height: 40px; }
.editbtn .gi { width: 16px; height: 16px; }
.rtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; padding-bottom: 2px; }
.rtabs::-webkit-scrollbar { display: none; }
.rtab { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; }
.rtab .gi { width: 18px; height: 18px; color: var(--cedar); }
.rtab:hover { border-color: var(--edge); }
.rtab[aria-current="true"] { background: var(--cedar); border-color: var(--cedar); color: #fff; }
.rtab[aria-current="true"] .gi { color: var(--saffron); }
:root[data-theme="dark"] .rtab[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
:root[data-theme="dark"] .rtab[aria-current="true"] .gi { color: var(--accent-ink); }
.rview { display: none; flex-direction: column; gap: 22px; min-width: 0; }
.rview.on { display: flex; animation: rvin .3s ease-out; }
@keyframes rvin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rview > .section, .rview > section { scroll-margin-top: calc(var(--toph) + 120px); }
.hero { border-radius: 24px; }
.hero svg { height: clamp(210px, 46vw, 320px); }
.hero h2 { font-weight: 800; }
.hero + .ticket { margin-top: 0; margin-inline: 0; }
.section > h2, .sect .shead h2 { font-size: clamp(24px, 5.4vw, 30px); font-weight: 800; }
.shead { display: flex; flex-direction: column; gap: 6px; }
.sect > .body { display: flex; flex-direction: column; gap: 18px; }

/* the budget compass */
.compass { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 18px 18px; border-radius: 28px; background: var(--surface); box-shadow: var(--float); text-align: center; }
.dialwrap { position: relative; width: min(280px, 78vw); aspect-ratio: 1; }
.dial { width: 100%; height: 100%; overflow: visible; }
.dl-disc { fill: var(--cedar); }
:root[data-theme="dark"] .dl-disc { fill: #15513F; }
.dl-rose { fill: var(--cedar-2); }
.dl-ring { fill: none; stroke: var(--saffron); stroke-width: 3; }
.dl-z { fill: none; stroke-width: 9; stroke-linecap: butt; }
.dl-z.ok { stroke: #8FD4B8; } .dl-z.near { stroke: var(--saffron); } .dl-z.over { stroke: #F08A7E; }
.dl-room { fill: none; stroke: #fff; stroke-width: 9; stroke-dasharray: 3 3; opacity: .7; }
.dl-t { stroke: rgba(255, 255, 255, .55); stroke-width: 1.4; stroke-linecap: round; }
.dl-t.maj { stroke: #fff; stroke-width: 2.4; }
.dl-mark { fill: #fff; }
.dl-needle { transform-origin: 120px 120px; transition: transform 1.1s cubic-bezier(.34, 1.45, .5, 1); }
.dl-n { fill: #fff; }
.dl-p { fill: #fff; }
.dl-hub { fill: var(--saffron); stroke: var(--cedar); stroke-width: 3; }
.dialread { position: absolute; inset-inline: 18%; bottom: 9%; display: flex; flex-direction: column; align-items: center; gap: 0; color: #fff; line-height: 1.15; }
.dialread .cap { opacity: .85; font-size: 12px; }
.dialread b { font-family: var(--font-display); font-weight: 800; font-size: clamp(21px, 6vw, 27px); white-space: nowrap; }
.dialread span:last-child { font-size: 12.5px; opacity: .9; }
.verdict h2 { font-size: clamp(21px, 5vw, 26px); font-weight: 800; line-height: 1.2; }
.verdict p { color: var(--muted); max-width: 46ch; margin: 6px auto 0; font-size: 15px; }
.c-over .verdict h2 { color: var(--bad); }
.tweaks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tchip { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 15px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14.5px; cursor: pointer; }
.tchip .gi { width: 18px; height: 18px; color: var(--cedar); }
.tchip:hover { border-color: var(--cedar); }
.tchip.go { background: var(--cedar); border-color: var(--cedar); color: #fff; }
.tchip.go .gi { color: var(--saffron); }
:root[data-theme="dark"] .tchip.go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
:root[data-theme="dark"] .tchip.go .gi { color: var(--accent-ink); }
.dlkey { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.dlkey .k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: -6px; vertical-align: -1px; }
.dlkey .k.ok { background: #8FD4B8; } .dlkey .k.near { background: var(--saffron); } .dlkey .k.over { background: #F08A7E; }
.dlkey .k.mark { width: 0; height: 0; border-radius: 0; border-inline: 6px solid transparent; border-top: 9px solid var(--ink); background: none; }
/* trip at a glance */
.glance h2 { font-size: 21px; font-weight: 800; margin-bottom: 12px; }
.gtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gtile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 112px; padding: 14px; border-radius: 20px; border: 0; background: var(--surface); color: var(--ink); text-align: start; cursor: pointer; box-shadow: var(--float); transition: transform .15s; }
.gtile:hover { transform: translateY(-2px); }
.gtile:active { transform: scale(.98); }
.gic2 { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--sun-soft); color: var(--sun-ink); margin-bottom: 6px; }
:root[data-theme="dark"] .gic2 { color: var(--saffron); }
.gic2 .gi { width: 20px; height: 20px; }
.gtile .gl { font-size: 13px; color: var(--muted); font-weight: 500; }
.gtile b { font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.gtile small { color: var(--muted); font-size: 12.5px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* help during the trip */
.help { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 24px; background: var(--navy); color: #fff; }
.help h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; }
.help h2 .gi { color: var(--saffron); }
.sos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.sos .cap { flex-basis: 100%; opacity: .85; }
.sosnum { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 14px; background: #fff; color: var(--pom); text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.sosnum .gi { width: 20px; height: 20px; }
.sosall { opacity: .9; font-size: 14px; }
.helpacts { display: flex; flex-wrap: wrap; gap: 8px; }
.help .mini { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); min-height: 42px; }
.help .mini.hot { background: var(--saffron); color: var(--navy); border-color: var(--saffron); }
.help .mini svg { width: 16px; height: 16px; color: inherit; }
.entry { border: 1.5px dashed var(--edge); border-radius: 20px; }
.adv { border-radius: 20px; }
/* costs */
.costctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.costctl .seg { border: 0; background: var(--soft); padding: 4px; }
.costctl .seg button { min-height: 38px; font-weight: 600; }
.costctl .seg button[aria-pressed="true"] { background: var(--surface); color: var(--cedar); box-shadow: 0 2px 6px rgba(19, 37, 43, .12); }
.costcard { border: 0; box-shadow: var(--float); border-radius: 24px; }
.bigfig { font-family: var(--font-display); font-weight: 800; }
.meter { height: 12px; background: repeating-linear-gradient(90deg, var(--soft) 0 6px, var(--line) 6px 7px); }
.meter i { background: var(--cedar); }
.lines li { border-bottom-style: solid; }
.lines li.total .amt { font-family: var(--font-display); font-weight: 800; }
.warnbox { border-radius: 16px; border-inline-start-width: 5px; }
.flightbox, .wxcard, .note, .chat, .hotel, .hcard, .tcard, .out { border: 0; box-shadow: var(--float); }
.flightbox, .wxcard, .chat { border-radius: 24px; }
.flightbox .fare, .wxbig, .hotel .price strong, .hprice strong, .lopt .lp { font-family: var(--font-display); font-weight: 800; }
.note { border-radius: 20px; }
.out { border-radius: 16px; }
.out svg { color: var(--cedar); }
/* the day plan: a strip of days and one day's line */
.daystrip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 8px; scroll-snap-type: x proximity; }
.daystrip::-webkit-scrollbar { display: none; }
.dtab { flex: none; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 0; width: 62px; padding: 8px 4px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; line-height: 1.15; }
.dtab small { font-size: 12px; color: var(--muted); }
.dtab b { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.dtab span { font-size: 12px; font-weight: 600; }
.dtab:hover { border-color: var(--edge); }
.dtab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.dtab[aria-selected="true"] small { color: rgba(255, 255, 255, .8); }
.dtab[aria-selected="true"] b { color: var(--saffron); }
:root[data-theme="dark"] .dtab[aria-selected="true"] { background: #2B2766; border-color: #8C86F2; }
.daypanel { background: var(--surface); border-radius: 24px; padding: 18px; box-shadow: var(--float); display: flex; flex-direction: column; gap: 12px; }
.dayhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.dayhead h3 { font-size: 22px; font-weight: 800; }
.dayhead .date { color: var(--muted); font-size: 13.5px; }
.tl { position: relative; list-style: none; margin: 0; padding: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 16px; }
.tl::before { content: ""; position: absolute; inset-inline-start: 6px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--cedar); opacity: .35; transform-origin: top; }
.tl.draw::before { animation: drawline .7s ease-out; }
@keyframes drawline { from { transform: scaleY(0); } to { transform: none; } }
.tl > li::before { content: ""; position: absolute; inset-inline-start: -21px; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: var(--surface); border: 3px solid var(--cedar); box-sizing: border-box; }
.tl > li.sys::before { border-color: var(--saffron); }
.tl .stop { border-top: 0; padding-top: 0; position: relative; }
.tl .stop strong { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.slot { color: var(--cedar); }
.wxline { border-radius: 16px; }

/* ---------- screens: bookings, rewards, profile, settings ---------- */
.drawer, html:not(.in-claude) .drawer { top: calc(var(--toph) + var(--safe-top)); bottom: var(--tabh); inset-inline: 0; margin-inline: auto; width: min(var(--col), 100vw); z-index: 45; background: var(--bg); border: 0; box-shadow: none;
  padding: 18px max(16px, env(safe-area-inset-left, 0px)) 40px; gap: 16px; }
.drawer:not([hidden]) { animation: sheetup .26s ease-out; }
@keyframes sheetup { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.dhead { flex-direction: row-reverse; justify-content: flex-end; gap: 10px; }
.dhead h2 { font-size: 28px; font-weight: 800; }
.dhead .mini { min-height: 42px; padding-inline: 12px 16px; border: 0; background: var(--surface); box-shadow: var(--float); }
.dhead .mini::before { content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(45deg); margin-inline-end: 4px; }
[dir="rtl"] .dhead .mini::before { transform: rotate(-135deg); }
.setlist { background: var(--surface); border-radius: 22px; box-shadow: var(--float); overflow: hidden; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; padding: 10px 16px; }
.setrow + .setrow { border-top: 1px solid var(--line); }
.setlab { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.aboutp { display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 0; }
.aboutp h3 { font-size: 16px; }
.ready { display: flex; align-items: center; gap: 14px; }
.ready h3 { font-size: 20px; font-weight: 800; }
.ready .sub { font-size: 14px; }
#readyBody { background: var(--surface); border-radius: 22px; padding: 16px; box-shadow: var(--float); }
.ring { --pct: 0; position: relative; display: grid; place-items: center; width: 64px; height: 64px; flex: none; }
.ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--saffron) calc(var(--pct) * 1%), var(--soft) 0); -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%); mask: radial-gradient(circle, transparent 54%, #000 56%); }
.ring b { position: relative; font-family: var(--font-display); font-size: 17px; font-weight: 800; line-height: 1; }
.checks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.checks li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--bg); font-weight: 600; font-size: 14.5px; color: var(--muted); }
.checks li .gi { width: 24px; height: 24px; padding: 3px; border-radius: 50%; background: var(--soft); }
.checks li.on { color: var(--ink); }
.checks li.on .gi { background: var(--cedar); color: #fff; }
.addbk { background: var(--surface); border-radius: 22px; padding: 4px 16px; box-shadow: var(--float); }
.addbk[open] { padding-bottom: 18px; }
.addbk > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 52px; font-family: var(--font-display); font-weight: 700; color: var(--cedar); }
.addbk > summary::-webkit-details-marker { display: none; }
.addbk > summary .gi { width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: var(--cedar); color: #fff; transition: transform .2s; }
.addbk[open] > summary .gi { transform: rotate(45deg); }
.extlinks { display: flex; flex-direction: column; gap: 8px; }
.resrow { background: var(--surface); border: 0; box-shadow: var(--float); border-radius: 16px; padding: 12px 14px; }
/* rewards */
.rwbal { position: relative; width: 200px; height: 200px; margin: 6px auto 0; }
.rwring { width: 100%; height: 100%; transform: rotate(-90deg); }
[dir="rtl"] .rwring { transform: rotate(-90deg) scaleY(-1); }
.rr-t { fill: var(--cedar); stroke: var(--line); stroke-width: 6; }
:root[data-theme="dark"] .rr-t { fill: #15513F; }
.rr-f { fill: none; stroke: var(--saffron); stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray .8s ease-out; }
.rr-k { stroke: rgba(255, 255, 255, .55); stroke-width: 1.5; stroke-linecap: round; }
.rwnum { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.rwnum b { font-family: var(--font-display); font-weight: 800; font-size: 46px; line-height: 1; }
.rwnum span { font-size: 14px; opacity: .9; }
.rwnext { text-align: center; color: var(--muted); font-size: 14px; }
.rwh { font-size: 18px; font-weight: 800; margin-top: 6px; }
.rwsoon { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rwsoon li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--float); }
.rwic { grid-row: 1 / 3; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--navy); color: var(--saffron); }
.rwsoon b { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.rwsoon p { color: var(--muted); font-size: 14px; }
.soon { grid-column: 2; justify-self: start; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--sun-soft); color: var(--ink); }
:root[data-theme="dark"] .soon { color: var(--saffron); }
.earn { list-style: none; margin: 0; padding: 0 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--float); }
.earn li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 8px 0; font-size: 14.5px; }
.earn li + li { border-top: 1px solid var(--line); }
.earn b { color: var(--sun-ink); background: var(--sun-soft); padding: 1px 9px; border-radius: 8px; white-space: nowrap; font-family: var(--font-display); }
:root[data-theme="dark"] .earn b { color: var(--saffron); }
/* toast and the flying star */
.toast { position: fixed; z-index: 90; inset-inline: 16px; bottom: calc(var(--tabh) + 20px); display: flex; justify-content: center; pointer-events: none; opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; }
.toast.on { opacity: 1; transform: none; }
.toast .tin { display: inline-flex; align-items: center; gap: 10px; max-width: 520px; padding: 12px 16px; border-radius: 16px; background: var(--navy); color: #fff; font-weight: 600; font-size: 15px; box-shadow: var(--float); }
.toast .gi { color: var(--saffron); fill: var(--saffron); }
.flystar { position: fixed; z-index: 95; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--saffron); color: var(--navy); font-family: var(--font-display); font-weight: 800; pointer-events: none; transform: translate(-50%, -50%); animation: fly 1s cubic-bezier(.5, -.2, .3, 1) forwards; }
.flystar .gi { width: 16px; height: 16px; }
@keyframes fly { 0% { transform: translate(-50%, -50%) scale(.6); opacity: 0; } 20% { transform: translate(-50%, -80%) scale(1.15); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.5); opacity: .2; } }
/* chat */
.chatsec h2:focus { outline: none; }
.chatsec .sub { margin-top: -8px; }
.msgb.me { background: var(--cedar); }
:root[data-theme="dark"] .msgb.me { background: var(--accent); }
.fab { background: var(--cedar); color: #fff; box-shadow: 0 6px 18px rgba(19, 37, 43, .25); border-radius: 999px; font-weight: 600; }
.fab .gi { width: 20px; height: 20px; }
.fab, html:not(.in-claude) .fab { bottom: calc(var(--tabh) + 14px); }
.fab.totop { box-shadow: var(--float); border: 0; }

/* bottom tabs: the active one wears the logo's north marker */
.tabbar button { position: relative; font-weight: 600; font-size: 12px; color: var(--muted); }
.tabbar button .gi { width: 24px; height: 24px; }
.tabbar button[aria-current="page"] { color: var(--cedar); background: none; }
.tabbar button[aria-current="page"]::before { content: ""; position: absolute; top: -9px; left: 50%; margin-left: -7px; border-inline: 7px solid transparent; border-top: 9px solid var(--saffron); }
:root[data-theme="dark"] .tabbar button[aria-current="page"] { color: var(--accent); }
@media (max-width: 720px) {
  /* the tabs stay inside Claude too, with room under them for the host's label (CONFIG.claudeRoom) */
  .tabbar, html:not(.in-claude) .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; position: fixed; inset-inline: 0; bottom: 0; z-index: 70; background: var(--surface);
    border-top: 0; box-shadow: 0 -6px 20px rgba(19, 37, 43, .08); padding: 8px 8px calc(6px + var(--badge, 0px) + env(safe-area-inset-bottom, 0px)); }
  body, html:not(.in-claude) body { padding-bottom: calc(var(--tabh) + 40px); }
  .drawer, html:not(.in-claude) .drawer { bottom: var(--tabh); }
}
footer.fine:empty { display: none; }

/* wider screens: more tiles per row */
@media (min-width: 560px) {
  .tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tiles.four .tile > span { flex-direction: column; align-items: flex-start; min-height: 96px; }
  .tiles.vibes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tiles.vibes .tile > span { flex-direction: column; align-items: flex-start; min-height: 96px; }
  .destpicks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dpick { grid-template-columns: minmax(0, 1fr); text-align: start; row-gap: 2px; }
  .dpick .dcode { grid-row: auto; margin-bottom: 4px; }
  .months { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .gtiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card { padding: 26px 26px 0; }
  .card .nav:has(#prefsBtn:not([hidden])) #next { order: 0; flex: 0 1 auto; margin-inline-start: auto; }
}
@media (min-width: 721px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, auto); gap: 4px; position: fixed; z-index: 70; bottom: 16px; left: 50%; transform: translateX(-50%); padding: 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--float); }
  .tabbar button { flex-direction: row; gap: 8px; min-height: 46px; padding: 6px 16px; border-radius: 999px; font-size: 14px; }
  .tabbar button[aria-current="page"] { background: var(--accent-soft); }
  .tabbar button[aria-current="page"]::before { display: none; }
  :root { --tabh: 78px; }
  body { padding-bottom: 110px; }
  .intro { padding-top: 40px; }
  .intro .rose { width: 380px; height: 380px; inset-inline-end: -80px; top: -60px; }
}
@media (max-width: 640px) {
  .hero + .ticket { margin-top: 0; margin-inline: 0; }
  .pass .tmain { padding: 16px; }
  legend { font-size: 24px; }
}
@media (max-width: 360px) {
  .brand span { display: none; }
  .gtiles { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .rose .spin, .pass .fl, .pass .flipall, .rview.on, .tl.draw::before, .ptspill.bump, .flystar, .drawer:not([hidden]), .surprise input:checked + span .gi { animation: none !important; }
  .dl-needle, .rr-f, .tile > span, .dpick, .gtile { transition: none !important; }
}
/* the trip ticket: both city names get equal room and shrink to fit instead of breaking mid-word */
.ticket { --stubw: 220px; }
.ticket .tmain { padding: 22px; }
.ticket .route { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; }
.ticket .route svg { width: 44px; }
.ticket .place { min-width: 0; }
.ticket .place .big { font-size: clamp(1.5rem, 2.6vw, 2rem); overflow-wrap: normal; word-break: normal; hyphens: manual; }
.ticket .stub .num { font-size: clamp(1.6rem, 4.2vw, 2.2rem); white-space: nowrap; }
/* narrow phones: favourite cards keep long names like Barcelona inside the card */
@media (max-width: 559px) {
  .dpick { padding: 9px 10px; column-gap: 9px; }
  .dpick .dcode { width: 46px; height: 40px; font-size: 14px; }
  .dpick b { font-size: 15px; }
}

/* ---------- once the first answer is in, the band shrinks to the ticket so each question fits one screen ---------- */
body.started .intro { padding-top: 14px; padding-bottom: 84px; }
body.started .intro h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
body.started .intro .lede, body.started #resumeBox, body.started .sample > p { display: none; }
body.started .sample { margin-top: 0; }

/* "Flying from" is one line: the city we found, and Change */
.fromchip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 6px 6px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: start; }
:root[dir="rtl"] .fromchip { padding: 6px 14px 6px 6px; }
.fromchip .gi { width: 18px; height: 18px; color: var(--accent); }
:root[dir="rtl"] .fromchip .gi { transform: scaleX(-1); }
.fromtxt { min-width: 0; line-height: 1.3; }
.fromtxt .flab { color: var(--muted); font-size: 14px; font-weight: 500; }
.fromtxt b { font-family: var(--font-display); font-weight: 700; }
.fromchip.empty b { color: var(--muted); font-weight: 600; }
.fromchg { padding: 6px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 13.5px; font-weight: 600; }
.fromchip:hover { border-color: var(--edge); }
.fromchip[aria-expanded="true"] { border-color: var(--accent); }
.frompanel { display: grid; gap: 10px; margin-top: -4px; padding: 12px; border-radius: 18px; background: var(--bg); }

/* typing: a few letters bring up places to tap, laid over the page so nothing below jumps */
.combo { position: relative; z-index: 8; }
.combo:focus-within { z-index: 9; }
.combo .sugg { position: absolute; top: calc(100% + 6px); inset-inline: 0; }
.sugg { display: grid; gap: 2px; padding: 6px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--float); }
.sugg:empty { display: none; }
.sgi { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); text-align: start; cursor: pointer; }
.sgi:hover, .sgi:focus-visible { background: var(--accent-soft); }
.sgi:focus-visible { outline: 3px solid var(--saffron); outline-offset: -3px; }
.sgc { display: grid; place-items: center; height: 34px; border-radius: 8px; background: var(--navy); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: .06em; }
.sgc:empty { background: var(--line); }
.sgt { display: flex; flex-direction: column; min-width: 0; }
.sgt b { font-family: var(--font-display); font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sgt small { color: var(--muted); font-size: 13px; }

/* the budget: minus and plus around a big number */
.stepper.bud { flex: 1; min-width: 0; grid-template-columns: 52px minmax(0, 1fr) 52px; }
.stepper.bud input { min-height: 52px; font-size: 22px; }
.money { display: flex; gap: 8px; align-items: stretch; }

/* the dates in words */
.datesum { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--accent-soft); font-weight: 500; }
.datesum:empty { display: none; }
.datesum .gi { width: 20px; height: 20px; color: var(--accent); flex: none; }
.datesum b { margin-inline-start: auto; font-family: var(--font-display); font-weight: 700; color: var(--accent); }

/* fewer rows: lengths and budgets sit three to a row like the months */
#datechips, #budchips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
#datechips .fchip, #budchips .fchip { justify-content: center; padding-inline: 6px; white-space: nowrap; }
@media (min-width: 560px) { #datechips, #budchips { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.dpick { min-height: 56px; padding-block: 7px; }
.dpick .dcode { height: 38px; }
.surprise > span { padding-block: 10px; }
.money .sel { width: auto; min-width: 5.5em; text-overflow: clip; }
/* the price check: what each kind of stay costs; tap one to use it as the budget */
#live { display: grid; gap: 6px; padding: 0; border: 0; background: none; }
#live strong { font-size: 15px; line-height: 1.3; }
#live > span { color: var(--muted); font-size: 14px; }
#live .lhint { font-size: 13px; margin-top: -4px; }
.ltiles { display: grid; gap: 6px; margin-top: 2px; }
.ltile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 10px; width: 100%; min-height: 46px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: start; cursor: pointer; transition: background-color .15s, border-color .15s; }
.ltile:hover { border-color: var(--edge); }
.ltile .lname { font-weight: 600; }
.ltile small { justify-self: end; display: inline-flex; align-items: center; gap: 4px; text-align: end; font-size: 13px; line-height: 1.25; color: var(--muted); }
.ltile b { font-family: var(--font-display); font-weight: 700; font-size: 15px; white-space: nowrap; }
.ltile.ok { border-color: var(--accent); background: var(--accent-soft); }
.ltile.ok small { color: var(--accent); font-weight: 600; }
.ltile small .gi { width: 15px; height: 15px; flex: none; }
/* phones: after the first answer the ticket keeps its route and budget, without the extra lines */
@media (max-width: 720px) {
  body.started .pass .pstub .bcode { display: none; }
  body.started .pass .pstub .sub { font-size: 12px; }
  body.started .pass .pstub { padding-block: 10px; }
  body.started .pass .tmain { padding-block: 12px; }
}
/* phones: the moods are pill-shaped so the optional step stays short */
@media (max-width: 559px) {
  .tiles.vibes { display: flex; flex-wrap: wrap; gap: 8px; }
  .tiles.vibes .tile > span { min-height: 44px; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px; }
  :root[dir="rtl"] .tiles.vibes .tile > span { padding: 5px 6px 5px 14px; }
  .tiles.vibes .tile > span .gi { width: 32px; height: 32px; padding: 6px; border-radius: 50%; }
  .tiles.vibes .tile b { font-size: 15px; font-weight: 600; }
}
/* the form looks after its own scrolling: the browser does not shift the page when an answer opens or closes something */
#survey { overflow-anchor: none; }
/* wider screens: the three stays side by side */
@media (min-width: 560px) {
  .ltiles { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
  .ltile { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "price" "note"; align-items: start; row-gap: 2px; padding: 10px 14px; }
  .ltile .lname { grid-area: name; }
  .ltile b { grid-area: price; font-size: 18px; }
  .ltile small { grid-area: note; justify-self: start; text-align: start; }
}

/* ===================== v5: an app with a home ===================== */
/* one mode at a time: Home (your trips), Plan (the questions), Trip (a planned trip) */
body[data-mode="home"] #planner, body[data-mode="home"] #result, body[data-mode="home"] #chatwrap { display: none !important; }
body[data-mode="plan"] #home, body[data-mode="plan"] #result, body[data-mode="plan"] #chatwrap { display: none !important; }
body[data-mode="trip"] #home, body[data-mode="trip"] #planner { display: none !important; }

/* top bar: the logo goes home, your picture opens Profile */
.brand { border: 0; background: none; padding: 0; cursor: pointer; display: inline-flex; align-items: center; font-family: var(--font-display); }
.brand:focus-visible { outline: 3px solid var(--saffron); outline-offset: 4px; border-radius: 12px; }
.avatar { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 2px solid var(--saffron); background: #fff; cursor: pointer; overflow: hidden; }
.avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55); }
.av { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--accent-soft); color: var(--cedar); font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av .gi { width: 22px; height: 22px; }
.av.big { width: 64px; height: 64px; flex: none; font-size: 28px; border: 3px solid var(--saffron); }

/* Home */
.home { display: grid; gap: 22px; padding: 22px 0 8px; }
.homehead h1 { font-size: clamp(30px, 7.4vw, 40px); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.hsub { color: var(--muted); font-size: 16px; margin-top: 4px; }
.newtrip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border: 0; border-radius: 22px; background: var(--band); color: #fff; text-align: start; cursor: pointer; box-shadow: 0 10px 26px rgba(19, 74, 60, .28); position: relative; overflow: hidden; }
.newtrip::after { content: ""; position: absolute; inset-inline-end: -64px; top: -64px; width: 120px; height: 120px; border-radius: 50%; border: 2px dashed rgba(237, 169, 58, .45); pointer-events: none; }
.ntic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 3px var(--saffron); }
.ntic .gi { width: 26px; height: 26px; color: #fff; }
:root[dir="rtl"] .ntic .gi, :root[dir="rtl"] .ntgo { transform: scaleX(-1); }
.ntt b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.ntt small { display: block; color: rgba(255, 255, 255, .85); font-size: 14px; margin-top: 2px; }
.ntgo { width: 24px; height: 24px; color: var(--saffron); }
.newtrip:active { transform: scale(.99); }
.newtrip:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; }
.trips h2, .hideas h2, .pastebox h2 { font-size: 20px; font-weight: 700; }
.trips { display: grid; gap: 10px; }
.tlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tripcard { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface); }
.tripcard.past { opacity: .78; }
.topen { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 6px 12px 12px; border: 0; background: none; color: var(--ink); text-align: start; cursor: pointer; border-radius: 18px; min-width: 0; }
:root[dir="rtl"] .topen { padding: 12px 12px 12px 6px; }
.topen:focus-visible { outline: 3px solid var(--saffron); outline-offset: -3px; }
.tripcard .dcode, .hid .dcode { display: grid; place-items: center; width: 52px; height: 44px; border-radius: 10px; background: var(--navy); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: .06em; }
.ttxt { display: flex; flex-direction: column; min-width: 0; }
.ttxt b { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.ttxt small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.tsoon { align-self: flex-start; margin: 2px 0; padding: 1px 8px; border-radius: 999px; background: var(--sun-soft); color: var(--ink); font-size: 12px; font-weight: 600; }
.tacts { display: flex; gap: 2px; padding-inline-end: 6px; }
.tacts .iconbtn, .rtop .iconbtn, .prow .iconbtn { width: 40px; height: 40px; background: transparent; color: var(--muted); }
.tacts .iconbtn:hover, .rtop .iconbtn:hover, .prow .iconbtn:hover { background: var(--soft); color: var(--ink); }
.tacts .iconbtn .gi, .rtop .iconbtn .gi, .prow .iconbtn .gi { width: 20px; height: 20px; }
.tconfirm { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0 12px 12px; }
.tconfirm p { margin: 0; flex: 1 1 100%; font-weight: 600; }
.mini.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.tcont { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1.5px dashed var(--accent); border-radius: 18px; background: var(--accent-soft); color: var(--ink); text-align: start; cursor: pointer; }
.tcont > .gi { width: 22px; height: 22px; color: var(--accent); }
:root[dir="rtl"] .tcont > .gi:last-child { transform: scaleX(-1); }
.tcont b { display: block; font-family: var(--font-display); font-weight: 700; }
.tcont small { display: block; color: var(--muted); font-size: 13px; }
.tall { justify-self: start; }
.trips .empty { color: var(--muted); padding: 14px; border-radius: 16px; background: var(--surface); border: 1.5px dashed var(--line); }
.secrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hidl { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.hid { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-align: start; cursor: pointer; }
.hid b { display: block; font-family: var(--font-display); font-weight: 700; }
.hid small { color: var(--muted); font-size: 13px; }
.hid:hover, .tripcard:hover { border-color: var(--edge); }

/* "Saw a place online?" */
.pastebox { display: grid; gap: 10px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); }
.pastebox h2 { display: flex; align-items: center; gap: 8px; }
.pastebox h2 .gi { width: 22px; height: 22px; color: var(--accent); }
.pastebox .sub { margin: 0; color: var(--muted); font-size: 14px; }
.pasteform { display: flex; gap: 8px; }
.pasteform input { flex: 1; min-width: 0; min-height: 48px; }
.pasterow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pfile { cursor: pointer; }
.pfile .gi { width: 18px; height: 18px; }
#pasteFile:focus-visible + .fine, .pasterow:focus-within .pfile { outline: 3px solid var(--saffron); outline-offset: 2px; }
.pasteout:empty { display: none; }
.pastecard { display: grid; gap: 6px; padding: 14px; border-radius: 16px; background: var(--accent-soft); }
.pastecard h3 { font-size: 20px; margin: 0; }
.pastecard p { margin: 0; }
.pastecard .btn { justify-self: start; margin-top: 4px; }

/* the questions: a close button beside the step number */
.prow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prow .iconbtn { margin-inline-end: -8px; }

/* the trip: back to your trips, share, edit */
.rtop { display: flex; align-items: center; gap: 6px; }
.rtop .rtitle { flex: 1; min-width: 0; }
.rback { margin-inline-start: -8px; }
:root[dir="rtl"] .rback .gi { transform: scaleX(-1); }

/* tabs: five, the Rewards star wears your points */
.tabbar button { min-width: 0; padding-inline: 2px; }
.tabbar button > span:not(.tbic) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tbic { position: relative; display: inline-grid; }
.tbadge { position: absolute; top: -6px; inset-inline-start: 14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--saffron); color: var(--sun-ink); font-family: var(--font-display); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.tabbar button.bump .tbic { animation: bump .55s cubic-bezier(.3, 1.6, .5, 1); }

/* Profile */
.mecard { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); }
.mename { flex: 1; min-width: 0; display: grid; gap: 6px; }
.mename label { font-weight: 600; font-size: 14px; }
.merow { display: flex; gap: 8px; }
.merow input { flex: 1; min-width: 0; min-height: 44px; }
.mename .msg:empty { display: none; }

/* Explore */
.exmoods { margin: 4px 0 14px; }
.ideas { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.idea { border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); overflow: hidden; }
.ibtn { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: stretch; width: 100%; padding: 0; border: 0; background: none; color: var(--ink); text-align: start; cursor: pointer; }
.ibtn:focus-visible { outline: 3px solid var(--saffron); outline-offset: -3px; border-radius: 20px; }
.iart { display: block; min-height: 104px; background: var(--soft); }
.iart svg { width: 100%; height: 100%; display: block; }
.itxt { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; min-width: 0; }
.itxt b { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.itxt small { color: var(--muted); }
.imeta { font-size: 13.5px; color: var(--ink); }
.ipre { display: grid; gap: 10px; padding: 0 14px 14px; }
.ipl { list-style: none; margin: 0; padding: 12px 0 0; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.ipl b { display: block; font-weight: 600; }
.ipl small { color: var(--muted); font-size: 13px; }
.ipre .btn { justify-self: start; }

/* eSIM */
.esimcard { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; margin-top: 14px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); }
.esic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--navy); color: #fff; }
.esic .gi { width: 26px; height: 26px; }
.esimcard h3 { margin: 0 0 4px; font-size: 19px; }
.esimcard p { margin: 0 0 10px; color: var(--muted); }
.esh { margin-top: 22px; font-size: 18px; }
.esteps { margin: 8px 0 14px; padding: 0; list-style: none; counter-reset: es; display: grid; gap: 10px; }
.esteps li { counter-increment: es; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; }
.esteps li::before { content: counter(es); grid-row: 1 / 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-weight: 800; }
.esteps b { font-weight: 600; }
.esteps span { color: var(--muted); font-size: 14px; }

/* first launch */
.onb { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 18px; background: var(--band); }
.onbcard { width: min(440px, 100%); display: grid; gap: 14px; padding: 26px 22px; border-radius: 28px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 60px rgba(10, 30, 25, .35); }
.onbcard h2 { font-size: 26px; font-weight: 800; line-height: 1.15; }
.onbcard p { margin: 0; color: var(--muted); }
.onbmark .logo { width: 72px; height: 72px; }
.onbdots { display: flex; gap: 6px; }
.onbdots span { width: 22px; height: 6px; border-radius: 3px; background: var(--line); }
.onbdots span.on { background: var(--saffron); }
.onblab { font-weight: 600; color: var(--ink) !important; }
.onblang { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.onblang button { min-height: 50px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 16px; cursor: pointer; }
.onblang button[aria-pressed="true"] { background: var(--cedar); border-color: var(--cedar); color: #fff; }
.onbcard input { min-height: 52px; font-size: 18px; }
.onbacts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.onbacts .btn.primary { flex: 1 1 auto; }
.onbcard h2:focus, .homehead h1:focus, .trips h2:focus { outline: none; }
/* messages stay small and brief, just above the tabs, so they never sit on what you're reading for long */
.toast { bottom: calc(var(--tabh) + 8px); }
.toast .tin { padding: 7px 12px; border-radius: 999px; font-size: 13.5px; gap: 7px; box-shadow: 0 6px 16px rgba(10, 16, 40, .25); }
.toast .tin .gi { width: 16px; height: 16px; }
.coupon { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; margin: 14px 0 4px; padding: 14px; border-radius: 18px; border: 1.5px dashed var(--saffron); background: var(--sun-soft); }
.coupon .cpic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--saffron); color: var(--sun-ink); }
.coupon .cpic .gi { width: 24px; height: 24px; }
.coupon .cap { margin: 0; font-size: 13px; color: var(--muted); }
.coupon b { font-family: var(--font-display); font-size: 18px; }
.coupon p { margin: 2px 0 6px; font-size: 14px; }

/* ---------- trip tabs ---------- */
.mapbox { position: relative; border-radius: 18px; overflow: hidden; background: var(--soft); border: 1.5px solid var(--line); }
.mapbox iframe { display: block; width: 100%; height: 260px; border: 0; }
.mapnone { margin: 0; padding: 24px 16px; color: var(--muted); text-align: center; }
.tripmap .secrow { margin-bottom: 10px; }
.tripmap .fine { margin-top: 8px; }
.vcard { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); margin-bottom: 12px; }
.vcard .vic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--soft); color: var(--ink); }
.vcard .vic .gi { width: 26px; height: 26px; }
.vcard .cap { margin: 0; font-size: 13px; color: var(--muted); }
.vcard b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.2; margin: 2px 0 4px; }
.vcard p { margin: 0; }
.vcard.ok { border-color: var(--accent); background: var(--accent-soft); }
.vcard.ok .vic { background: var(--accent); color: var(--accent-ink); }
.vcard.warn { border-color: var(--saffron); background: var(--sun-soft); }
.vcard.warn .vic { background: var(--saffron); color: var(--sun-ink); }
.vcard.bad { border-color: var(--bad); background: var(--bad-soft); }
.vcard.bad .vic { background: var(--bad); color: #fff; }
.visa > .btn { margin-bottom: 8px; }
.packg { margin-top: 14px; }
.packg h3 { font-size: 16px; margin: 0 0 6px; color: var(--muted); font-weight: 600; }
.trlist { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.trlist li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); }
.trty { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--navy); color: #fff; }
.trty .gi { width: 20px; height: 20px; }
.trlist b { display: block; }
.trlist small { color: var(--muted); }
.split h3 { font-size: 16px; margin: 16px 0 8px; }
.spnames { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.spnames input { min-height: 44px; }
.splist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.splist li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); }
.splist select { min-height: 40px; width: auto; }
.splist .iconbtn { width: 36px; height: 36px; background: none; color: var(--muted); }
.spadd { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; align-items: end; margin-top: 10px; }
.spadd .btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 560px) { .spadd { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; } .spadd .btn { grid-column: auto; } }
.spmoves { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; font-weight: 600; }
a.out.mine { border-color: var(--accent); }
a.out.mine::after { content: attr(data-mine); }
.aprow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.aplab { font-size: 13px; color: var(--muted); margin-inline-end: 2px; }
.apc { display: inline-flex; align-items: baseline; gap: 5px; min-height: 38px; padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 14px; }
.apc b { font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; }
.apc small { color: var(--muted); font-size: 12px; }
.apc[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.apc[aria-pressed="true"] small { color: rgba(255, 255, 255, .8); }
.nodirect { display: grid; gap: 6px; }
.nodirect .mini { justify-self: start; }
.vcard .cap, .coupon .cap { color: var(--ink); opacity: 1; font-weight: 500; }
input[type="url"] { width: 100%; min-height: 48px; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
input[type="url"]:focus { border-color: var(--accent); }
/* a redraw of the same trip (a chip, a toggle) doesn't replay the entrance */
#result.still .rview.on { animation: none; }

/* ---------- more room: the top bar slides away while you scroll down, and the trip header keeps just its tabs ---------- */
.top { transition: transform .22s ease; will-change: transform; }
body.lowtop .top { transform: translateY(calc(-100% - 2px)); }
.rnav { transition: top .22s ease; }
body.lowtop .rnav { top: var(--safe-top); }
@media (prefers-reduced-motion: reduce) { .top, .rnav { transition: none; } }
/* signed in with Claude */
.signedin { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border-radius: 16px; background: var(--accent-soft); }
.signedin .sic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.signedin .sic .gi { width: 20px; height: 20px; }
.signedin b { display: block; }
.signedin p { margin: 2px 0 0; }
/* signed out on the website: the picture says Sign in */
.avatar.out { width: auto; padding: 0 3px 0 12px; gap: 8px; display: inline-flex; align-items: center; border-radius: 999px; background: #fff; color: var(--cedar); font-weight: 700; font-size: 14px; }
:root[dir="rtl"] .avatar.out { padding: 0 12px 0 3px; }
.avatar.out .av { width: 34px; height: 34px; flex: none; }
.mesign:empty { display: none; }
/* computers: the tabs sit in the top bar, so nothing floats over the page */
@media (min-width: 1000px) {
  :root { --tabh: 0px; --col: 840px; } /* a wider column: all seven trip tabs fit on one line */
  .topin { max-width: 1200px; }
  .tabbar { top: calc(var(--safe-top) + 7px); bottom: auto; padding: 0; gap: 2px; background: transparent; box-shadow: none; transition: transform .22s ease; }
  .tabbar button { min-height: 44px; padding: 6px 14px; color: rgba(255, 255, 255, .88); }
  .tabbar button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
  .tabbar button[aria-current="page"], :root[data-theme="dark"] .tabbar button[aria-current="page"] { background: #fff; color: var(--cedar); }
  .tabbar .tbadge { border: 2px solid var(--cedar); }
  body.lowtop .tabbar { transform: translateX(-50%) translateY(calc(-100% - 16px)); }
  body { padding-bottom: 40px; }
}

/* ---------- v6: more room, and nothing sits on top of anything ---------- */
/* the active tab: a soft pill behind its icon, inside the bar, so nothing pokes out over the page */
@media (max-width: 720px) {
  .tabbar button { isolation: isolate; }
  .tabbar button[aria-current="page"]::before { z-index: -1; top: 3px; left: 50%; width: 56px; height: 30px; margin-left: -28px; border: 0; border-radius: 999px; background: var(--accent-soft); }
}
/* answering the four questions: the tabs step aside, so Next and Plan my trip are never under them */
@media (max-width: 999px) {
  html body[data-mode="plan"] .tabbar { display: none; }
  body[data-mode="plan"] { --tabh: calc(var(--badge, 0px) + env(safe-area-inset-bottom, 0px)); }
}
/* small phones: city names on the ticket shrink and trail off instead of breaking mid-word */
@media (max-width: 400px) {
  .pass .place .big { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; word-break: normal; }
  .pass .route { gap: 6px; }
  .pass .route svg { width: 22px; }
}
/* the trip on a phone: a shorter postcard, and the budget stub as one strip under the ticket */
@media (max-width: 640px) {
  .hero svg { height: clamp(170px, 44vw, 240px); }
  .hero .scrim { padding: 16px 18px; }
  .hero .scrim > div > p:first-child { display: none; } /* trip type and nights are in the header and on the ticket */
  .ticket .tmain { padding: 18px 18px 16px; gap: 14px; }
  .ticket .facts { gap: 10px 14px; padding-top: 12px; }
  .ticket .stub { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 12px; row-gap: 2px; padding: 14px 18px 16px; }
  .ticket .stub > .cap { grid-area: 1 / 1; }
  .ticket .stub > .num { grid-area: 2 / 1; }
  .ticket .stub > .sub { grid-column: 2; text-align: end; font-size: 13px; }
  .ticket .stub > .sub:nth-child(3) { grid-row: 1; }
  .ticket .stub > .sub:nth-child(4) { grid-row: 2; }
  .ticket .stub > .bcode { display: none; }
  .mapbox iframe { height: 200px; }
}
/* trip at a glance: the icon sits beside its label, so each tile is shorter */
.gtile { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; align-content: start; column-gap: 10px; row-gap: 2px; min-height: 0; padding: 12px 14px 14px; }
.gtile .gic2 { width: 30px; height: 30px; border-radius: 9px; margin: 0; }
.gtile .gic2 .gi { width: 17px; height: 17px; }
.gtile b, .gtile small { grid-column: 1 / -1; }
.gtile b { margin-top: 6px; font-size: 17px; }
@media (max-width: 360px) { .gtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gtile { padding: 12px; } }
/* Home: no empty line under your trips, and the screenshot button sits in the link row */
/* an empty status line takes no room (it stays in place for screen readers) */
.msg:empty, #pasteImgName:empty { position: absolute; }
.pasteform .pfile { display: grid; place-items: center; flex: none; width: 48px; min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--accent); cursor: pointer; }
.pasteform .pfile .gi { width: 22px; height: 22px; }
.pasteform .pfile:hover { border-color: var(--edge); }
#pasteFile:focus-visible + .pfile { outline: 3px solid var(--saffron); outline-offset: 2px; }
#pasteImgName { margin: -2px 0 0; }
/* a little air between blocks that were touching */
#esBody > .sub { margin: 0 0 14px; }
.rwh { margin: 22px 0 10px; }

/* ---------- v7: the date picker, one month at a time ---------- */
.cal { display: grid; gap: 6px; }
.calhead { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; text-align: center; }
.calhead b { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.calnav { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.calnav:disabled { opacity: .35; cursor: default; }
.calnav .gi { width: 20px; height: 20px; }
:root[dir="rtl"] .calnav .gi { transform: scaleX(-1); }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; touch-action: pan-y; }
.cwd { padding: 4px 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.cday { height: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.cday:hover:not(:disabled):not(.s):not(.e) { background: var(--accent-soft); }
.cday:disabled { color: var(--muted); opacity: .45; cursor: default; }
.cday.today { box-shadow: inset 0 0 0 1.5px var(--line); }
.cday.in { border-radius: 0; background: var(--accent-soft); }
.cday.s, .cday.e { background: var(--cedar); color: #fff; }
.cday.hasend { border-start-end-radius: 0; border-end-end-radius: 0; }
.cday.e { border-start-start-radius: 0; border-end-start-radius: 0; }
:root[data-theme="dark"] .cday.s, :root[data-theme="dark"] .cday.e { background: var(--accent); color: var(--accent-ink); }
.cday:focus-visible { outline: 3px solid var(--saffron); outline-offset: -3px; }
.datesum.hint { padding: 0 2px; background: none; color: var(--muted); font-weight: 500; }
.progress { grid-template-columns: repeat(5, minmax(0, 1fr)); }
#datechips.quick.lens { display: flex; flex-wrap: wrap; }

/* ---------- v7: six small trip tabs that fit the screen (icon over a short label), Budji in the header ---------- */
.rtabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; overflow: visible; padding: 0; }
.rtab { flex-direction: column; justify-content: center; gap: 2px; min-width: 0; min-height: 50px; padding: 4px 2px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 600; line-height: 1.15; isolation: isolate; position: relative; }
.rtab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtab .gi { width: 21px; height: 21px; color: currentColor; }
.rtab:hover { color: var(--ink); background: var(--soft); }
.rtab[aria-current="true"], :root[data-theme="dark"] .rtab[aria-current="true"] { background: transparent; color: var(--cedar); }
:root[data-theme="dark"] .rtab[aria-current="true"] { color: var(--accent); }
.rtab[aria-current="true"] .gi, :root[data-theme="dark"] .rtab[aria-current="true"] .gi { color: inherit; }
.rtab[aria-current="true"]::before { content: ""; position: absolute; z-index: -1; top: 3px; left: 50%; width: 46px; height: 27px; margin-left: -23px; border-radius: 999px; background: var(--accent-soft); }
.rtop .budji { color: var(--cedar); }
.rtop .budji[aria-current="true"] { background: var(--accent-soft); }
:root[data-theme="dark"] .rtop .budji { color: var(--accent); }
@media (min-width: 560px) {
  .rtab { flex-direction: row; gap: 6px; min-height: 42px; font-size: 13.5px; }
  .rtab .gi { width: 18px; height: 18px; }
  .rtab[aria-current="true"]::before { top: 4px; bottom: 4px; left: 4px; right: 4px; width: auto; height: auto; margin: 0; border-radius: 10px; }
}
/* the bottom bar: three tabs, a little shorter */
@media (max-width: 720px) {
  .tabbar, html:not(.in-claude) .tabbar { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 6px; }
  .tabbar button { min-height: 48px; font-size: 11.5px; }
  .tabbar button .gi { width: 22px; height: 22px; }
  :root { --tabh: calc(60px + var(--badge, 0px) + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 721px) { .tabbar { grid-template-columns: repeat(3, auto); } }
/* Bookings and eSIM are tabs: Home takes you back, so they need no Close */
#drawer .dhead #drawerClose, #esim .dhead #esClose { display: none; }
/* folded sections: one tidy line until opened */
.fold { padding: 0; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); }
.fold > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; list-style: none; cursor: pointer; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-inline-start: auto; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.fold[open] > summary::after { transform: rotate(-135deg); }
.fold .ftitle { display: grid; gap: 2px; min-width: 0; }
.fold .ftitle b { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.fold .ftitle small { color: var(--muted); font-size: 13px; }
.fold > .body { padding: 0 14px 16px; }
.hfold > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; list-style: none; }
.hfold > summary::-webkit-details-marker { display: none; }
.hfold > summary .gi { width: 18px; height: 18px; color: var(--accent); }
.hfold[open] > summary { border-color: var(--accent); }
.hfold .fcount { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; line-height: 20px; text-align: center; }
.hfold > .hfilters, .hfold > .fine { margin-top: 10px; }
/* each day: go from where you are, or open the whole day's route */
.dayhead { flex-wrap: wrap; row-gap: 8px; }
.dayroute { display: flex; flex-wrap: wrap; gap: 6px; }
.dayroute a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.dayroute a.hot { background: var(--cedar); border-color: var(--cedar); color: #fff; }
:root[data-theme="dark"] .dayroute a.hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dayroute .gi { width: 16px; height: 16px; }
/* share sheet: rises from the bottom on phones, a card in the middle on bigger screens */
dialog.sheet { width: min(100%, 520px); max-width: 100%; max-height: 90vh; margin: auto auto 0; padding: 0 0 calc(16px + env(safe-area-inset-bottom, 0px)); border: 0; border-radius: 24px 24px 0 0; background: var(--bg); color: var(--ink); box-shadow: 0 -10px 40px rgba(10, 16, 40, .25); overflow: auto; }
dialog.sheet::backdrop { background: rgba(10, 16, 30, .45); }
@media (min-width: 640px) { dialog.sheet { margin: auto; border-radius: 24px; padding-bottom: 16px; } }
.sheethead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 10px 20px; background: var(--bg); }
:root[dir="rtl"] .sheethead { padding: 16px 20px 10px 16px; }
.sheethead h2 { font-size: 21px; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheethead .iconbtn { width: 44px; height: 44px; background: var(--surface); color: var(--ink); }
#shBody { display: grid; gap: 12px; padding: 0 16px; }
.shsec { display: grid; gap: 8px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); }
.shsec h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.shsec h3 .gi { width: 20px; height: 20px; color: var(--accent); }
.shsec p { margin: 0; color: var(--muted); font-size: 14.5px; }
.shsec .btn { justify-self: start; }
.shrow { display: flex; gap: 8px; }
.shrow input { flex: 1; min-width: 0; min-height: 48px; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; }
.shsec .msg.err { color: var(--pom); }
.tfrom { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: var(--sun-soft); color: var(--sun-ink); font-size: 12px; font-weight: 600; vertical-align: 2px; }
/* the six trip tabs get the whole width of the header */
@media (max-width: 559px) {
  .rnav { padding-inline: 6px; }
  .rtop { padding-inline: 6px; }
}
@media (max-width: 374px) { .rtab { font-size: 10px; } .rtab .gi { width: 19px; height: 19px; } .rtab[aria-current="true"]::before { width: 40px; margin-left: -20px; } }
.hotel .row .mini { white-space: normal; text-align: start; }

/* ---------- type that fits the device: a little smaller on small phones, a little larger on tablets and computers ---------- */
@media (max-width: 374px) {
  body { font-size: 15px; }
  legend { font-size: 22px; }
  .section > h2, .sect .shead h2 { font-size: 22px; }
  .dhead h2 { font-size: 24px; }
  .homehead h1 { font-size: 28px; }
  .rtitle b { font-size: 18px; }
  .qchip, .quick .fchip { font-size: 14px; padding-inline: 12px; }
  .calhead b { font-size: 16px; }
  .cday { height: 40px; font-size: 14px; }
}
@media (min-width: 721px) {
  body { font-size: 17px; }
  legend { font-size: 32px; }
  .dhead h2 { font-size: 32px; }
  .rtitle b { font-size: 22px; }
  .rtitle span { font-size: 14px; }
  .cday { height: 48px; font-size: 16px; }
}
@media (min-width: 1000px) {
  .homehead h1 { font-size: 46px; }
  .section > h2, .sect .shead h2 { font-size: 32px; }
}
/* phones: taps respond at once (no double-tap zoom wait), no grey flash, no zoom when a field is focused */
button, a, label, summary, input, select, textarea { touch-action: manipulation; }
* { -webkit-tap-highlight-color: transparent; }
@media (max-width: 720px) { input[type], select, textarea { font-size: max(16px, 1em); } }
.ttxt .tfrom { justify-self: start; width: fit-content; margin: 2px 0; }

@media (max-width: 559px) { .rtab { padding-inline: 0; } .rtab[aria-current="true"]::before { width: 42px; margin-left: -21px; } }
