/* Budjetly: the travel wallet. The trip summary is a boarding pass (the one bold piece), the costs read like a receipt,
   the days like an itinerary; everything else stays calm. Logical properties throughout, so Arabic mirrors cleanly.
   Colours: paper, ink, cedar (actions and live prices), saffron (your trip's highlight), dusk (the pass),
   pomegranate (over budget and errors). Type: Reem Kufi for headings and big numbers, Readex Pro for the rest;
   both are designed for Arabic and Latin together. */
:root {
  color-scheme: light;
  --bg: #F2F5F3; --surface: #FFFFFF; --ink: #14262C; --muted: #4D6168; --line: #D5DFDA; --soft: #E8EFEB;
  --accent: #1D6B57; --accent-ink: #FFFFFF; --accent-hover: #175747; --accent-soft: #DCEDE6;
  --sun: #EDA93A; --sun-ink: #241A06; --sun-soft: #FBEFD8;
  --dusk: #2E2A5E; --dusk-ink: #FFFFFF; --violet: #3B378A;
  --good: #1D6B57; --warn: #B4430F; --bad: #BE3448; --bad-soft: #F9E3E6;
  --teal: var(--accent); --stub: var(--sun); --stub-ink: var(--sun-ink);
  --c1: #3F5BA9; --c2: #D98E2B; --c3: #2F8F75; --c4: #C2544F; --c5: #2E2A5E; --c6: #B7C6C0; --c7: #8A6BBE;
  --float: 0 14px 36px rgba(20, 38, 44, 0.14);
  --font-display: "Reem Kufi", "Readex Pro", "Segoe UI", system-ui, sans-serif;
  --font-body: "Readex Pro", "Segoe UI", system-ui, sans-serif;
  --font-mono: var(--font-body); /* numbers use tabular figures, not a typewriter face */
  --safe-top: env(safe-area-inset-top, 0px);
  box-sizing: border-box;
  padding-top: var(--safe-top);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1A1E; --surface: #16252B; --ink: #E6EEEB; --muted: #9DB2B0; --line: #2A3B41; --soft: #1C2F35;
    --accent: #5CC4A3; --accent-ink: #0B1A16; --accent-hover: #74D1B4; --accent-soft: #173A33;
    --sun: #F0B44E; --sun-ink: #241A06; --sun-soft: #3A2E17;
    --dusk: #2E2A6B; --violet: #A9A4FF; --good: #5CC4A3; --warn: #FF9A62; --bad: #FF7A8C; --bad-soft: #3D1F26;
    --c1: #8EA6F0; --c2: #F0B44E; --c3: #5CC4A3; --c4: #FF8A84; --c5: #A9A4FF; --c6: #4A5F66; --c7: #C4A6FF;
    --float: 0 14px 36px rgba(0, 0, 0, 0.45); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1A1E; --surface: #16252B; --ink: #E6EEEB; --muted: #9DB2B0; --line: #2A3B41; --soft: #1C2F35;
  --accent: #5CC4A3; --accent-ink: #0B1A16; --accent-hover: #74D1B4; --accent-soft: #173A33;
  --sun: #F0B44E; --sun-ink: #241A06; --sun-soft: #3A2E17;
  --dusk: #2E2A6B; --violet: #A9A4FF; --good: #5CC4A3; --warn: #FF9A62; --bad: #FF7A8C; --bad-soft: #3D1F26;
  --c1: #8EA6F0; --c2: #F0B44E; --c3: #5CC4A3; --c4: #FF8A84; --c5: #A9A4FF; --c6: #4A5F66; --c7: #C4A6FF;
  --float: 0 14px 36px rgba(0, 0, 0, 0.45); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--safe-top) + 84px); }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  padding-block: 20px 80px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin-inline: auto; display: flex; flex-direction: column; gap: 48px; }
main { display: flex; flex-direction: column; gap: 48px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; font-weight: 600; letter-spacing: 0; }
h3 { font-family: var(--font-body); font-weight: 600; }
:root[lang="ar"] h1, :root[lang="ar"] h2, :root[lang="ar"] h3 { line-height: 1.35; }
p { margin: 0; }
a { color: inherit; }
svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--sun); color: var(--sun-ink); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(var(--safe-top) + 10px); }
.mono { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 14px; color: var(--muted); font-weight: 500; }
[dir="rtl"] .flipx { transform: scaleX(-1); }
[dir="rtl"] .hero .scrim { background: radial-gradient(ellipse 70% 85% at 100% 0%, rgba(10, 18, 34, 0.62), rgba(10, 18, 34, 0.22) 55%, transparent 80%); }

/* header and settings */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
/* the logo: a compass with a plane taking off across it, the W on its tail */
.brand { font-family: var(--font-display); font-weight: 700; font-size: 28px; display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand .logo { width: 52px; height: 52px; flex: none; filter: drop-shadow(0 4px 8px rgba(29, 107, 87, 0.25)); }
.settings { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.linkbtn { background: none; border: 0; padding: 8px 6px; text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 5px; cursor: pointer; min-height: 40px; font-weight: 500; }
.linkbtn:hover { text-decoration-color: var(--accent); }
.sel { min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; cursor: pointer; }
.selwrap { display: inline-flex; }
/* the header currency picker shows just the code; the native list still opens with full names */
.curpill { position: relative; align-items: center; min-height: 40px; padding-inline: 14px 32px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 15px; cursor: pointer; }
.curpill::after { content: ""; position: absolute; inset-inline-end: 14px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; }
.curpill select { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.curpill:hover { border-color: var(--ink); }
.curpill:focus-within { outline: 3px solid var(--violet); outline-offset: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex: none; background: var(--surface); padding: 2px; gap: 2px; }
.seg button { min-height: 36px; padding: 4px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font-weight: 500; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg.small button { min-height: 34px; padding: 3px 12px; font-size: 14px; }

/* buttons: cedar is the action colour; one strong button per area */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; transition: background-color .15s, border-color .15s; }
.btn:hover { border-color: var(--ink); }
.btn.primary, .btn.sun, .btn.teal { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover, .btn.sun:hover, .btn.teal:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.push { margin-inline-start: auto; }
.mini { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 500; font-size: 14px; text-decoration: none; white-space: nowrap; cursor: pointer; }
.mini:hover { border-color: var(--ink); }
.mini svg { width: 14px; height: 14px; }
.mini.hot { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.mini.hot svg { color: var(--accent); }
.mini.hot:hover { border-color: var(--accent); }
.mini.sun { background: var(--sun-soft); border-color: transparent; color: var(--ink); }
.mini[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* home: promise, an example boarding pass, and the planner */
.stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; }
.intro { display: flex; flex-direction: column; gap: 22px; padding-top: 18px; min-width: 0; }
.intro h1 { font-size: clamp(2.5rem, 5.4vw, 4rem); font-weight: 700; line-height: 1.08; }
:root[lang="ar"] .intro h1 { line-height: 1.3; }
.intro h1 em { font-style: normal; }
.intro .lede { color: var(--muted); font-size: 18px; max-width: 44ch; }
.sample { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.sample > p { font-size: 14px; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; min-width: 0; box-shadow: var(--float); }
/* the six steps drawn as a route with stops */
.progress { display: flex; align-items: center; margin: 4px 6px 22px; }
.progress span { position: relative; height: 3px; flex: 1; background: var(--line); }
.progress span::before { content: ""; position: absolute; inset-inline-start: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); box-sizing: border-box; }
.progress span:last-child::after { content: ""; position: absolute; inset-inline-end: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); box-sizing: border-box; }
.progress span.done { background: var(--accent); }
.progress span.done::before { background: var(--accent); border-color: var(--accent); }
.stepno { margin-bottom: 4px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
legend { font-family: var(--font-display); font-weight: 600; font-size: 30px; padding: 0; margin-bottom: 16px; line-height: 1.2; }
.f, label.f { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 14px; }
.f small { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type="text"], input[type="email"], input[type="date"], input[type="number"], input[type="time"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 400;
}
select.sel { width: auto; min-height: 40px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 100px; resize: vertical; }
input:disabled { opacity: 0.5; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.money { display: flex; align-items: stretch; gap: 8px; }
.money .sel { min-height: 48px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip > span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 2px; }
.tierpick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tierpick .chip > span { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; border-radius: 14px; min-height: 66px; justify-content: center; padding: 10px 14px; }
.tierpick b { font-weight: 600; }
.tierpick small { font-weight: 400; opacity: 0.85; font-size: 12.5px; }
.grouplabel { font-weight: 600; font-size: 14px; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.err { color: var(--bad); font-weight: 500; min-height: 22px; margin-top: 10px; }
.live { background: var(--soft); border-radius: 14px; padding: 14px 16px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.live:empty { display: none; }
.live strong { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.live .lrow { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fchip { min-height: 40px; padding: 6px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 500; cursor: pointer; }
.fchip:hover { border-color: var(--ink); }
.fchip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
#resumeBox { margin-top: 2px; }

/* result */
#result { --gap: 48px; display: none; flex-direction: column; gap: var(--gap); scroll-margin-top: 16px; }
#result.show { display: flex; }
/* E2: the section menu stays pinned at the top as one row; when it is wider than the screen it scrolls sideways */
.rnav { position: sticky; top: var(--safe-top); z-index: 30; display: flex; gap: 10px 14px; align-items: center; justify-content: flex-start; padding: 7px 8px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 16px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; box-shadow: 0 6px 20px rgba(20, 38, 44, 0.06); }
.rnav::-webkit-scrollbar { display: none; }
.rnav > * { flex: none; }
.rnav .ctl { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.jumps { display: flex; gap: 2px; flex-wrap: nowrap; }
.jumps a { padding: 6px 11px; border-radius: 999px; font-weight: 500; font-size: 14px; text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; white-space: nowrap; color: var(--muted); }
.jumps a:hover { color: var(--ink); background: var(--soft); }
.jumps a[aria-current="true"] { background: var(--ink); color: var(--bg); }
/* the destination as a postcard, with the boarding pass laid over its lower edge */
.hero { position: relative; border-radius: 22px; overflow: hidden; }
.hero svg { width: 100%; height: clamp(230px, 34vw, 360px); }
.hero .scrim { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 85% at 0% 0%, rgba(10, 18, 34, 0.62), rgba(10, 18, 34, 0.22) 55%, transparent 80%); display: flex; align-items: flex-start; padding: 24px 28px; color: #fff; }
.hero + .ticket::before { display: none; }
.hero + .ticket { margin-top: calc(-1 * var(--gap) - clamp(56px, 7vw, 88px)); margin-inline: clamp(10px, 2.6vw, 30px); }
.hero h2 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 700; color: #fff; line-height: 1.05; }
.hero p { font-size: 15px; opacity: 0.95; font-weight: 500; }

/* the boarding pass: the trip at a glance, with the verdict on the stub */
.ticket, .pass { --stubw: 260px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--stubw); background: var(--dusk); color: var(--dusk-ink); border-radius: 22px; box-shadow: var(--float); overflow: hidden; }
.ticket::before, .ticket::after, .pass::before, .pass::after { content: ""; position: absolute; inset-inline-start: calc(100% - var(--stubw) - 11px); width: 22px; height: 22px; border-radius: 50%; background: var(--bg); z-index: 1; }
.ticket::before, .pass::before { top: -11px; }
.ticket::after, .pass::after { bottom: -11px; }
.tmain { padding: 26px 30px; display: flex; flex-direction: column; gap: 22px; min-width: 0; background-image: radial-gradient(520px 260px at 0% 0%, rgba(255, 255, 255, 0.08), transparent); }
.route { display: flex; align-items: center; gap: 18px; min-width: 0; }
.place { min-width: 0; }
.cap { font-size: 13px; opacity: 0.78; font-weight: 500; }
.costcard .cap { opacity: 1; color: var(--muted); }
.place .big { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 4.6vw, 3rem); line-height: 1.1; overflow-wrap: break-word; hyphens: auto; }
.place .code { font-size: 14px; opacity: 0.85; margin-top: 2px; letter-spacing: 0.04em; }
.route svg { flex: none; width: 72px; height: 24px; opacity: 0.9; }
.pass .ph { opacity: 0.6; font-size: 0.85em; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px 20px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.facts .val { font-weight: 600; font-size: 16px; }
.stub, .pstub { background: var(--stub); color: var(--stub-ink); border-inline-start: 2px dashed rgba(36, 26, 6, 0.35); padding: 26px 24px; display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }
.stub .cap, .pstub .cap { opacity: 0.85; }
.stub .num, .pstub .num { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1.05; }
.stub .sub, .pstub .sub { font-size: 14px; color: inherit; opacity: 0.92; }
.vtag { align-self: flex-start; font-size: 13.5px; padding: 5px 12px; border-radius: 999px; background: var(--dusk); color: #fff; font-weight: 600; }
.vtag.bad { background: #8F1D2F; color: #fff; }
/* the home page pass: the same ticket, smaller, filled in by the survey */
.pass { --stubw: 160px; }
.pass .tmain { padding: 20px 22px; gap: 16px; }
.pass .route { gap: 12px; }
.pass .route svg { width: 44px; }
.pass .place .big { overflow-wrap: break-word; }
.pass .place .big { font-size: clamp(1.2rem, 1.8vw, 1.4rem); line-height: 1.2; }
.pass .place .code { font-size: 13px; }
.pass .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding-top: 14px; }
.pass .facts .val { font-size: 15px; }
.pass .pstub { padding: 18px 16px; gap: 4px; }
.pass .pstub .num { font-size: clamp(1.15rem, 1.8vw, 1.35rem); white-space: nowrap; }
.pass .pstub .num.long { font-size: 1rem; white-space: normal; overflow-wrap: anywhere; }
.pass .pstub .sub { font-size: 13px; }
.bcode { width: 100%; height: 30px; margin-top: 10px; opacity: 0.85; }

.section { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.section > h2, .sect > summary h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 600; }
.sub { color: var(--muted); max-width: 70ch; }
.twocol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.note h3 { font-size: 18px; }
.note p { color: var(--muted); }
.note p strong, .note li strong { color: var(--ink); }
.alts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fine { color: var(--muted); font-size: 13.5px; max-width: 90ch; }
.banner { background: var(--soft); border-radius: 12px; padding: 12px 16px; }

/* collapsible sections (E3) */
.sect { min-width: 0; }
.sect > summary { list-style: none; cursor: pointer; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sect > summary::-webkit-details-marker { display: none; }
.sect > summary .sub { margin-top: 6px; }
.sect > summary .tog, .day > summary .tog { flex: none; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 500; font-size: 14px; background: var(--surface); }
.sect > summary:hover .tog, .day > summary:hover .tog { border-color: var(--ink); }
.sect[open] > summary .tog .o, .sect:not([open]) > summary .tog .c, .day[open] > summary .tog .o, .day:not([open]) > summary .tog .c { display: none; }
.sect > .body { display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }

/* the costs, kept like a receipt */
.costcard { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: start; }
.dinepick { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-top: 16px; border-top: 1px dashed var(--line); }
.dinepick .grouplabel { margin: 0; }
.costsum { display: flex; flex-direction: column; gap: 12px; min-width: 0; position: sticky; top: calc(var(--safe-top) + 84px); }
.bigfig { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 6vw, 3.9rem); line-height: 1; }
.meter { height: 10px; border-radius: 6px; background: var(--soft); overflow: hidden; position: relative; }
.meter i { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.meter i.over { background: var(--bad); }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lines li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); min-width: 0; }
.lines .sw { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.lines .amt { margin-inline-start: auto; font-weight: 600; white-space: nowrap; }
.lines .lab { min-width: 0; font-weight: 500; }
.lines .lab small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.lines li.total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 14px; font-weight: 700; font-size: 18px; }
.lines li.total .amt { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; margin-inline-start: 7px; vertical-align: 1px; border: 1px solid var(--line); color: var(--muted); }
.badge.exact { background: var(--dusk); border-color: var(--dusk); color: #fff; }
.badge.live { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.badge.wait { border-style: dashed; color: var(--ink); }
.badge.need { border-style: dashed; border-color: var(--bad); color: var(--bad); }
/* live flight itineraries: pick which one the budget counts */
.lopts { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; margin-block: 6px 2px; }
.lopt { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k p" "d d"; gap: 6px 14px; align-items: start; align-content: start; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.lopt:hover { border-color: var(--ink); }
.lopt[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.lopt .lk { grid-area: k; font-weight: 600; font-size: 14.5px; }
.lopt .lk::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--muted); margin-inline-end: 8px; vertical-align: -1px; box-sizing: border-box; }
.lopt[aria-pressed="true"] .lk::before { border: 4px solid var(--accent); }
.lopt .ld { grid-area: d; color: var(--muted); font-size: 13.5px; min-width: 0; }
.lopt .ld .lg { display: block; }
.lopt .ld .lg + .lg { margin-top: 2px; }
.lopt .ld .lg b { color: var(--ink); font-weight: 600; margin-inline-end: 4px; }
.lopt .lp { grid-area: p; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.livewait { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--accent); animation: wfspin 0.8s linear infinite; flex: none; }
@keyframes wfspin { to { transform: rotate(360deg); } }
.livefail, .livenote { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.livewhy { font-weight: 500; color: var(--ink); }
.flightbox .room { font-weight: 600; color: var(--ink); }
.lines li.pending .amt { color: var(--muted); }
/* type the real fare right under the estimate */
.fpx { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding: 14px 16px; border-radius: 14px; background: var(--soft); }
.fpx .row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; }
.fpx .f { font-size: 13px; }
.fpx input { width: 9.5em; }
.warnbox { border-radius: 14px; padding: 14px 16px; background: var(--sun-soft); display: flex; flex-direction: column; gap: 10px; border-inline-start: 4px solid var(--sun); }
.warnbox.ok { background: var(--accent-soft); border-inline-start-color: var(--accent); }
.exactbox { display: flex; flex-direction: column; gap: 10px; background: var(--soft); border-radius: 16px; padding: 18px 20px; }
.exactbox h3 { font-size: 18px; }
.exactbox .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; max-width: 560px; }
.exactbox > .f, .exactbox > label { max-width: 560px; }
.exactbox > p { max-width: 70ch; }
.exactbox .f { font-size: 13px; }
.est { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); margin-inline-end: 8px; background: var(--surface); color: var(--ink); }

/* flights */
.flightbox { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; }
.fmain { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.flightbox .fare { font-family: var(--font-display); font-weight: 700; font-size: 2.3rem; line-height: 1.05; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; }
.flightbox .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.stops { font-weight: 600; }
.stops.none { color: var(--warn); }
.ftimes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.cheap { display: flex; flex-direction: column; gap: 4px; }
.crow { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.crow small { color: var(--muted); }
.save { font-style: normal; color: var(--good); font-weight: 600; }
.chatform { display: flex; gap: 8px; }
.chatform input { flex: 1; min-width: 0; }

/* travel advice and entry: a stamp, not an alarm unless it is one */
.adv { border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; background: var(--sun-soft); color: var(--ink); border-inline-start: 4px solid var(--sun); }
.adv.l0 { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--accent); }
.adv.l2 { background: var(--bad-soft); border-inline-start-color: var(--bad); }
.adv ul { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 4px; }
.adv .mini { align-self: flex-start; }
.adv .fine { color: var(--muted); }
.entry { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; background: var(--surface); border: 1px dashed var(--muted); border-radius: 16px; padding: 16px 20px; }
.entry svg { width: 34px; height: 34px; color: var(--dusk); }
:root[data-theme="dark"] .entry svg { color: var(--violet); }
:root[data-theme="dark"] .hero svg, :root[data-theme="dark"] .hthumb svg, :root[data-theme="dark"] .hotel .img svg { filter: brightness(0.86) saturate(0.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero svg, :root:not([data-theme="light"]) .hthumb svg, :root:not([data-theme="light"]) .hotel .img svg { filter: brightness(0.86) saturate(0.92); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .entry svg { color: var(--violet); } }
.entry p { color: var(--muted); }
.entry p strong { color: var(--ink); }

/* weather */
.wxcard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.wxnow { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wxnow .seg, .wxnow .mini, .wxnow .est { align-self: flex-start; }
.wxbig { font-family: var(--font-display); font-size: 44px; font-weight: 700; line-height: 1.05; }
.wxbig small { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--muted); }
.chart h3 { font-size: 15px; margin-bottom: 10px; font-weight: 600; }
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; align-items: end; height: 170px; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 2px; font-size: 11px; color: var(--muted); }
.bar i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: var(--soft); }
.bar.on i { background: var(--sun); }
.bar.on, .bar.on b { color: var(--ink); font-weight: 600; }
.bar b { font-weight: 500; font-size: 10px; }

/* destination pick comparison (A7) */
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { text-align: start; padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp th { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.cmp tr.me td { font-weight: 600; }
.cmp .num { white-space: nowrap; }
.tblwrap { overflow-x: auto; }

/* hotels */
.hotels { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.hotel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.hotel.best { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.hotel .img svg { width: 100%; height: auto; }
.hotel .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.hotel h3 { font-size: 19px; }
.hotel .area { color: var(--muted); font-size: 14px; }
.hotel .price { display: flex; flex-direction: column; gap: 2px; }
.hotel .price strong { font-family: var(--font-display); font-size: 1.65rem; font-weight: 700; }
.hotel .price span { color: var(--muted); font-size: 13px; }
.hotel .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.tier { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--soft); align-self: flex-start; }
.hotel.best .tier { background: var(--sun); color: var(--sun-ink); }
.hgal { position: relative; }
.hgal .gdots { position: absolute; inset-inline-start: 10px; bottom: 10px; display: flex; gap: 6px; }
.gdot { min-height: 30px; padding: 2px 11px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.92); color: #14262C; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.gdot.on { background: #14262C; color: #fff; }
.hfilters { display: flex; flex-wrap: wrap; gap: 8px; }
/* live places from Booking.com */
.hlevels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; max-width: 640px; padding: 4px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.hlevels button { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 52px; padding: 8px 10px; border-radius: 12px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.hlevels button:hover { background: var(--soft); }
.hlevels button small { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.hlevels button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.hlevels button[aria-pressed="true"] small { color: inherit; opacity: .85; }
.hsorts { display: flex; flex-wrap: wrap; gap: 8px; }
.hlist { display: flex; flex-direction: column; gap: 12px; }
.hcard { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 14px 18px; align-items: start; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.hcard.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.hthumb { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--soft); }
.hthumb svg, .hthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hmain { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.hhead h3 { font-size: 18px; overflow-wrap: anywhere; }
.hline, .hwhere, .hfac { color: var(--muted); font-size: 14px; }
.hst { color: #8A5A00; letter-spacing: 1px; }
:root[data-theme="dark"] .hst { color: var(--sun); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hst { color: var(--sun); } }
.hscore { font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; }
.hscore .rv { color: var(--muted); }
.hscore .sc { background: var(--dusk); color: #fff; font-weight: 600; border-radius: 8px 8px 8px 2px; padding: 2px 8px; font-size: 13.5px; }
[dir="rtl"] .hscore .sc { border-radius: 8px 8px 2px 8px; }
.hwhere { display: flex; gap: 6px; align-items: flex-start; }
.hwhere svg { width: 14px; height: 14px; flex: none; margin-top: 4px; }
.hside { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: end; min-width: 170px; }
.hprice { display: flex; flex-direction: column; gap: 1px; }
.hprice strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.hprice span { color: var(--muted); font-size: 13px; }
.hside .btn { min-height: 42px; padding: 8px 20px; }
.hmore { display: flex; justify-content: center; }
/* tours and tickets: like the places list, without a cover */
.tcard { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; align-items: start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.tcard.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tcard h3 { font-size: 17px; overflow-wrap: anywhere; }
.hlinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
/* a place's details from Booking.com, opened under its card */
.hdet { margin-top: 10px; padding: 14px 16px; border-radius: 14px; background: var(--soft); display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.hdet p { color: var(--ink); max-width: 75ch; }
.hdet h4 { margin: 4px 0 0; font-size: 14px; font-weight: 600; }
.hdet ul { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 3px; }
.hdtimes { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* the day plan, read like an itinerary */
.wxline { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; background: var(--soft); border-radius: 14px; padding: 12px 16px; }
.days { display: flex; flex-direction: column; gap: 14px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 22px; min-width: 0; }
.day > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.day > summary::-webkit-details-marker { display: none; }
.day .preview { color: var(--muted); font-size: 14px; flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day[open] .preview { display: none; }
.dh { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.dtile { width: 54px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-align: center; background: var(--surface); flex: none; }
.dtile b { display: block; font-family: var(--font-display); font-size: 23px; line-height: 1.35; font-weight: 700; }
.dtile span { display: block; background: var(--dusk); color: #fff; font-size: 12px; font-weight: 600; padding: 1px 0 2px; }
.dtitle { display: flex; flex-direction: column; }
.dtitle h3 { font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.day .date { font-size: 13px; color: var(--muted); }
.day ul { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.stop { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; align-items: start; padding-top: 14px; border-top: 1px solid var(--line); }
.stop:first-child { border-top: 0; padding-top: 0; }
.stop.sug .info { border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; }
.stop.sys .info strong { font-size: 17px; }
.th svg { width: 84px; height: 84px; border-radius: 16px; }
.stop .info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.stop strong { font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 1.25; }
.stop p { color: var(--muted); font-size: 15px; }
.slot { font-size: 13px; color: var(--accent); font-weight: 600; }
.cost { font-size: 13px; color: var(--muted); }
.stop .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.tag { font-size: 12.5px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; }
.tag.time { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag.warn { background: var(--sun-soft); border-color: transparent; color: var(--ink); }
.tag.hot { background: var(--bad-soft); border-color: transparent; color: var(--ink); }
.tag.kid { background: var(--accent-soft); border-color: transparent; }
.tag.open { background: var(--soft); border-color: transparent; }
.tag.dim { color: var(--muted); }
.tag.sug { border-style: dashed; }
.altline { font-size: 14px; background: var(--soft); border-radius: 10px; padding: 7px 11px; }
.ftinline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 6px; }
.ftinline label { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 500; }
.ftinline input { min-height: 40px; width: auto; }

/* links, pack */
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.linkgroup { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.linkgroup h3 { font-size: 15px; font-weight: 600; color: var(--muted); }
.out { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; min-height: 56px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; font-weight: 600; }
.out:hover { border-color: var(--ink); }
.out svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.out small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.plain { margin: 0; padding-inline-start: 0; list-style: none; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.plain strong { color: var(--ink); }
/* E1: one checkbox per item, the whole row is the target */
.pack { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.pack li { border-bottom: 1px dashed var(--line); }
.packrow { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 10px 0; min-height: 44px; }
.packrow input { -webkit-appearance: none; appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; border: 2px solid var(--accent); border-radius: 7px; background: var(--surface); display: grid; place-content: center; cursor: pointer; }
.packrow input::after { content: ""; width: 10px; height: 5px; border: solid var(--accent-ink); border-width: 0 0 3px 3px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.packrow input:checked { background: var(--accent); }
.packrow input:checked::after { opacity: 1; }
.packrow input:checked + span { text-decoration: line-through; color: var(--muted); }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.msg { min-height: 20px; font-size: 14px; }
.msg.bad { color: var(--bad); font-weight: 500; }
.msg.ok { color: var(--good); font-weight: 600; }

/* chat, floating buttons (E4) */
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.chatlog { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; padding-inline-end: 4px; }
.msgb { padding: 11px 15px; border-radius: 16px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; }
.msgb.bot { background: var(--soft); align-self: flex-start; border-end-start-radius: 4px; }
.msgb.me { background: var(--accent); color: var(--accent-ink); align-self: flex-end; border-end-end-radius: 4px; }
.chatsug { display: flex; flex-wrap: wrap; gap: 8px; }
.fab { position: fixed; z-index: 40; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); inset-inline-end: max(16px, env(safe-area-inset-right, 0px)); display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 10px 20px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 600; box-shadow: var(--float); cursor: pointer; }
.fab:hover { background: var(--accent-hover); }
.fab svg { width: 20px; height: 20px; }
.fab.totop { inset-inline-end: auto; inset-inline-start: max(16px, env(safe-area-inset-left, 0px)); background: var(--surface); color: var(--ink); padding: 10px 16px; border: 1px solid var(--line); }

/* drawers */
.drawer { position: fixed; top: 0; inset-inline-end: 0; bottom: 0; width: min(440px, 100vw); z-index: 60; background: var(--surface); border-inline-start: 1px solid var(--line); padding: calc(22px + var(--safe-top)) 18px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 0 0 100vmax rgba(10, 20, 24, .32); }
.dhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dhead h2 { font-size: 26px; }
.resform { display: flex; flex-direction: column; gap: 10px; }
.resrow { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.resrow header { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.resrow small { color: var(--muted); }
/* tickets and photos in My bookings */
.filepick { position: relative; display: inline-flex; align-self: flex-start; }
.filepick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.filepick .mini { min-height: 40px; }
.filepick:hover .mini { border-color: var(--ink); }
.filepick input:focus-visible + .mini { outline: 3px solid var(--violet); outline-offset: 2px; }
#resFilesChosen:empty { display: none; }
#resFilesChosen { color: var(--ink); font-weight: 500; }
.tks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px; padding: 0; }
.tk { width: 64px; height: 64px; padding: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); overflow: hidden; display: grid; place-items: center; font-size: 13px; font-weight: 600; cursor: pointer; }
.tk img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk:hover { border-color: var(--ink); }
.tk.off { border-style: dashed; color: var(--muted); }
.rbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.resconfirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; padding: 8px 10px; border-radius: 10px; background: var(--bad-soft); }
.resconfirm p { flex-basis: 100%; margin: 0; font-weight: 500; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
dialog.tkview { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); }
dialog.tkview::backdrop { background: rgba(10, 20, 24, .62); }
dialog.tkview[open] { display: flex; flex-direction: column; gap: 12px; }
.tkhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tkhead h2 { font-size: 18px; overflow-wrap: anywhere; }
.tkbody { min-height: 120px; display: grid; place-items: center; overflow: auto; }
.tkbody img { max-width: 100%; max-height: calc(100vh - 220px); object-fit: contain; border-radius: 8px; background: #fff; }
.tkbody iframe { width: 100%; height: calc(100vh - 220px); border: 0; border-radius: 8px; background: #fff; }
.tkacts { display: flex; flex-wrap: wrap; gap: 8px; }
/* optional sign-in */
.acct { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
#acBody { display: flex; flex-direction: column; gap: 10px; }
#acBody > p { margin: 0; }
.acct h3 { font-size: 18px; }
.acct h3:focus { outline: none; }
.acct .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.acct .acts .btn { flex: 1 1 180px; }
.acct .acts .linkbtn { padding-inline: 0; margin-inline-end: 14px; }
.acform { display: flex; flex-direction: column; gap: 10px; }
#acctDrawer .acct { border: 0; padding: 0; gap: 10px; }
/* Profile: account and trip history */
.psec { display: flex; flex-direction: column; gap: 10px; }
.psec + .psec { border-top: 1px solid var(--line); padding-top: 16px; }
.psec h3 { font-size: 19px; }
.psec h3:focus { outline: none; }
.psec .msg:empty { min-height: 0; }
#histBody { display: flex; flex-direction: column; gap: 10px; }
#histBody > p { margin: 0; }
.hlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hrow { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.hrow .hname { margin: 0; font-size: 16px; }
.hrow small { color: var(--muted); }
/* bottom bar on phones; not inside Claude, whose own label sits at the bottom of the screen */
.tabbar { display: none; }
.tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px; border: 0; border-radius: 12px; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
@media (max-width: 720px) {
  /* --badge: room under the buttons for the host's "Powered by" badge (set by badgeRoom() in 42-events.js) */
  html:not(.in-claude) .tabbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; position: fixed; inset-inline: 0; bottom: 0; z-index: 70; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + var(--badge, 0px) + env(safe-area-inset-bottom, 0px)); }
  html:not(.in-claude) #bookBtn, html:not(.in-claude) #acctBtn { display: none; }
  html:not(.in-claude) body { padding-bottom: calc(70px + var(--badge, 0px) + env(safe-area-inset-bottom, 0px)); }
  html:not(.in-claude) .fab { bottom: calc(82px + var(--badge, 0px) + env(safe-area-inset-bottom, 0px)); }
  html:not(.in-claude) .drawer { bottom: calc(66px + var(--badge, 0px) + env(safe-area-inset-bottom, 0px)); }
}
.acor { display: flex; align-items: center; gap: 12px; margin: 2px 0; color: var(--muted); font-size: 13px; }
.acor::before, .acor::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.acct .msg:empty { min-height: 0; }
.acdel summary { cursor: pointer; color: var(--muted); font-size: 14px; min-height: 32px; display: flex; align-items: center; }
.acdel[open] { display: flex; flex-direction: column; gap: 10px; }
.acdel p { margin: 0; font-size: 14px; }
.acdel .btn { align-self: flex-start; }
.fbqs { display: flex; flex-direction: column; gap: 18px; }
.fbq { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.fbq legend { font-weight: 600; padding: 0; margin-bottom: 6px; font-size: 16px; font-family: var(--font-body); }
.fbstat { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.fbstat div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.fbstat strong { font-size: 24px; font-family: var(--font-display); }
.fbcom { border-bottom: 1px solid var(--line); padding: 8px 0; overflow-wrap: anywhere; }

/* printable copy for the PDF (E7) */
#pdfStage { position: fixed; inset-inline-start: -10000px; top: 0; width: 794px; background: #fff; color: #14262C; }
.pdfpage { width: 794px; padding: 44px 48px; background: #fff; color: #14262C; font-family: var(--font-body); font-size: 13px; line-height: 1.5; }
.pdfpage h1 { font-size: 28px; margin-bottom: 6px; }
.pdfpage h2 { font-size: 18px; margin: 18px 0 8px; }
.pdfpage table { width: 100%; border-collapse: collapse; }
.pdfpage td { padding: 5px 6px; border-bottom: 1px solid #D5DFDA; vertical-align: top; }
.pdfpage td.r { text-align: end; white-space: nowrap; font-weight: 600; }
.pdfpage .muted { color: #4D6168; }
.pdfpage .pblk { margin-bottom: 6px; }
.pdfpage .pblk p { margin: 4px 0; }
.pdfpage h1, .pdfpage h2 { font-family: var(--font-display); color: #14262C; }
.pdfpage strong { font-weight: 600; }
#pdfStage[dir="rtl"] .pdfpage { font-family: "Readex Pro", var(--font-body); }

@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .intro { padding-top: 4px; }
  .costcard, .wxcard { grid-template-columns: minmax(0, 1fr); }
}
/* E2: on phones the section menu stays pinned as one row that scrolls sideways */
@media (max-width: 720px) {
  .rnav { padding: 6px; border-radius: 14px; }
}
@media (max-width: 760px) {
  .hcard { grid-template-columns: 92px minmax(0, 1fr); gap: 10px 12px; padding: 12px; }
  .hlinks .mini { white-space: normal; text-align: start; }
  .hside { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; text-align: start; min-width: 0; }
  .hprice { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .tcard { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { padding-block: 14px 80px; }
  .wrap, main { gap: 38px; }
  #result { --gap: 38px; }
  .costsum { position: static; }
  .ticket { grid-template-columns: minmax(0, 1fr); }
  .ticket::before, .ticket::after { display: none; }
  .stub { border-inline-start: 0; border-top: 2px dashed rgba(36, 26, 6, 0.35); }
  .pass { --stubw: 112px; grid-template-columns: minmax(0, 1fr) var(--stubw); }
  .pass::before, .pass::after { display: block; }
  .pass .pstub { border-top: 0; border-inline-start: 2px dashed rgba(36, 26, 6, 0.35); padding: 14px 10px; }
  .pass .tmain { padding: 16px; gap: 0; }
  .pass .facts, .sample > p { display: none; }
  .pass .route { gap: 8px; }
  .pass .route svg { width: 28px; }
  .pass .place .big { font-size: 1.1rem; }
  .pass .pstub .num { font-size: 1.05rem; }
  .bcode { height: 22px; margin-top: 6px; }
  .twocol { grid-template-columns: minmax(0, 1fr); }
  .tmain { padding: 22px 20px; }
  .route { gap: 10px; }
  .route svg { width: 48px; }
  .place .big { font-size: 1.6rem; }
  .costcard { padding: 20px 18px; }
  .stop { grid-template-columns: 60px minmax(0, 1fr); gap: 12px; }
  .th svg { width: 60px; height: 60px; border-radius: 12px; }
  .card { padding: 22px 18px; border-radius: 20px; }
  .flightbox { padding: 18px; }
  .tierpick { grid-template-columns: minmax(0, 1fr); }
  .hero .scrim { padding: 18px; }
  .ftimes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .day { padding: 16px; }
  .fab .lbl { display: none; }
  .fab { padding: 13px; }
  .settings { gap: 6px; }
  legend { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
