/* ITALIA / 26 — white canvas, Host Grotesk, one teal accent.
   Semantic colours: emerald = booked, amber = heads-up, rose = risk, sky = considering.
   City colours are data colours only (day strip, day and stay edges). */
:root {
  --bg: #ffffff;
  --card: #ffffff;
  --sunk: #f7f7f7;
  --line: #ebebeb;
  --line-2: #dddddd;
  --ink: #222222;
  --ink-2: #6a6a6a;
  --ink-3: #b0b0b0;
  --accent: #0f766e;      /* teal-700 */
  --accent-bg: #f0fdfa;
  --ok: #047857; --ok-bg: #ecfdf5;
  --warn: #b45309; --warn-bg: #fffbeb; --warn-line: #fde68a;
  --risk: #be123c; --risk-bg: #fff1f2; --risk-line: #fecdd3;
  --info: #0369a1; --info-bg: #f0f9ff;
  --rome: #ea580c; --naples: #2563eb; --lecce: #ca8a04; --coast: #0891b2; --home: #a8a29e;
  --r-sm: 6px; --r: 10px; --r-lg: 16px; --r-xl: 20px;
  --font: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --gut: 16px;
  color-scheme: light;
}
@media (min-width: 768px) { :root { --gut: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
.num { font-variant-numeric: tabular-nums; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; line-height: 1.45; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 20; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* ── Header: brand left, pill nav centred ───────────── */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 12px var(--gut); background: #fff; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 17px; letter-spacing: -.01em; text-decoration: none; }
.nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 0; margin: 0; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 4px 12px rgb(0 0 0 / .05); }
.nav a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--ink-2); border-radius: 999px; transition: background-color .15s, color .15s; }
.nav a .ic { width: 16px; height: 16px; }
.nav a:hover { color: var(--ink); background: var(--sunk); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }

main { max-width: 1080px; margin: 0 auto; padding: 24px var(--gut) 96px; outline: none; }
main > section, main > .stack, main > .days { margin-top: 28px; }

/* ── Type ──────────────────────────────────────────────── */
.h-page { font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.h-sec { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 12px; }
.lede { max-width: 60ch; color: var(--ink-2); font-size: 15px; margin-top: 4px; }
h4 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; font-weight: 600; margin: 20px 0 8px; }
.page-head, .sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sec-head .h-sec { margin: 0; }

/* ── Primitives ────────────────────────────────────────── */
.panel, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel { padding: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; font-size: 13px; font-weight: 500; line-height: 1.5; background: var(--sunk); color: var(--ink-2); border-radius: 999px; white-space: nowrap; text-decoration: none; }
.chip b { color: var(--ink); font-weight: 600; }
.chip em { font-style: normal; color: var(--ink-3); }
.chip .ic { width: 14px; height: 14px; }
.chip-go { background: var(--ok-bg); color: var(--ok); }
.chip-go b { color: var(--ok); }
.chip-risk { background: var(--risk-bg); color: var(--risk); }
.chip-open { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.chip-now { background: var(--accent); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge .ic { width: 12px; height: 12px; stroke-width: 2.5; }
.b-booked { background: var(--ok-bg); color: var(--ok); }
.b-considering { background: var(--info-bg); color: var(--info); }
.b-notbooked { background: var(--risk-bg); color: var(--risk); }
.b-confirm { background: var(--warn-bg); color: var(--warn); }
/* Only uncertain facts get a tag; the label says what it means (no hover needed). */
.lvl { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 4px; vertical-align: 1px; white-space: nowrap; }
.l-estimate { background: var(--sunk); color: var(--ink-2); }
.l-check { background: var(--warn-bg); color: var(--warn); }

.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; font: 600 14px/1.2 var(--font); background: var(--ink); color: var(--bg); border: 1px solid var(--ink); border-radius: var(--r); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s; }
.btn:hover { background: #000; border-color: #000; color: #fff; }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--sunk); border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn .ic { width: 16px; height: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lnk { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 500; color: var(--accent); text-decoration: none; cursor: pointer; }
.lnk:hover { text-decoration: underline; text-underline-offset: 3px; }
.lnk .ic { width: 15px; height: 15px; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px; background: none; border: 0; border-radius: var(--r); font: 500 14px var(--font); color: var(--ink-2); text-decoration: none; cursor: pointer; }
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
.icon-btn.danger:hover { background: var(--risk-bg); color: var(--risk); }
.icon-btn .ic { width: 16px; height: 16px; }
/* Star: 32px visual, 44px tap area via ::after */
.star { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; background: none; border-radius: 999px; color: var(--ink-3); cursor: pointer; }
.star::after { content: ""; position: absolute; inset: -6px; }
.star:hover { background: var(--sunk); color: var(--ink-2); }
.star.on { color: var(--warn); }
.star.on .ic { fill: currentColor; }
.save.on { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.save.on .ic { fill: currentColor; }
.pending { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--risk); font-size: 14px; font-weight: 500; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--sunk); border-radius: var(--r); font-size: 14px; margin-top: 12px; }
.note .ic { color: var(--ink-2); margin-top: 1px; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); font-size: 14px; text-decoration: none; border: 1px solid; }
.banner .ic { margin-top: 1px; }
.banner.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.banner.risk { background: var(--risk-bg); border-color: var(--risk-line); color: var(--risk); }
.banner span { color: var(--ink); }
.banner b { font-weight: 600; }
a.banner:hover b { text-decoration: underline; text-underline-offset: 3px; }
.empty { padding: 24px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); color: var(--ink-2); text-align: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ── Accordions ────────────────────────────────────────── */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 0 auto; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translateY(-2px); transition: transform .2s ease-out; }
details[open] > summary::after { transform: rotate(-135deg) translate(-2px, 0); }
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  details::details-content { height: 0; overflow: clip; transition: height .25s ease-out, content-visibility .25s allow-discrete; }
  details[open]::details-content { height: auto; }
}
@media (prefers-reduced-motion: reduce) { *, ::details-content { transition: none !important; animation: none !important; } }
.flash { animation: flash 1.2s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--accent); } }
.more { margin-top: 16px; border-top: 1px solid var(--line); }
.more > summary { display: flex; align-items: center; padding: 10px 0 2px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.more pre { white-space: pre-wrap; font: 13px/1.5 var(--font); margin: 6px 0 0; }

/* Cards with a summary row */
.card > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 14px 18px; }
.card-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
.card-city { font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.card-b { padding: 0 18px 18px; }
.mode { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); flex: none; }
.mode .ic { width: 18px; height: 18px; }
.c-rome { --c: var(--rome); } .c-naples { --c: var(--naples); } .c-lecce { --c: var(--lecce); } .c-coast { --c: var(--coast); } .c-home { --c: var(--home); }

/* ── Overview ──────────────────────────────────────────── */
.hero { margin-top: 0 !important; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.hero-title { font-size: clamp(40px, 7vw, 56px); font-weight: 700; letter-spacing: -.04em; line-height: .95; }
.hero-title span { color: var(--accent); font-weight: 400; }
.hero-sub { color: var(--ink-2); font-size: 16px; margin-top: 6px; }
.stats { display: flex; gap: 8px; margin: 0; }
.stats div { background: var(--sunk); border-radius: var(--r-lg); padding: 8px 14px; min-width: 0; }
.stats dt { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.stats dd { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.stats dd small { font-size: 13px; color: var(--ink-2); font-weight: 500; letter-spacing: 0; }
.stats dd small.warn, .stats dd.warn { color: var(--risk); }

/* Day strip */
.strip { display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; margin-top: 28px; }
.strip a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 6px; border-radius: var(--r); text-decoration: none; transition: background-color .15s; }
.strip a:hover { background: var(--sunk); }
.strip-w { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.strip-d { font-size: 16px; font-weight: 600; }
.strip-bar { width: 100%; height: 6px; border-radius: 3px; background: var(--c); }
.strip-bar.hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.strip-i { height: 18px; color: var(--ink-2); }
.strip-i .ic { width: 16px; height: 16px; }
.strip .is-today a { background: var(--accent-bg); box-shadow: inset 0 0 0 1.5px var(--accent); }
.strip .is-past { opacity: .45; }
.strip-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.sw { display: inline-block; width: 14px; height: 6px; border-radius: 3px; margin-right: 6px; vertical-align: 2px; background: var(--c); }
.sw.hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }

/* Heads-ups: facts to know, not tasks */
.heads { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px; }

.ov-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }
.next { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; box-shadow: 0 6px 20px rgb(0 0 0 / .08); }
.next.risk { border-color: var(--risk-line); }
.next-k { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.next-title { font-size: 26px; font-weight: 600; letter-spacing: -.025em; line-height: 1.15; margin-top: 12px; }
.next-risk { display: flex; gap: 8px; color: var(--risk); margin-top: 12px; font-weight: 500; }

/* Boarding pass: dep — mode — arr. Capped so the two times stay close together. */
.pass { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; max-width: 560px; margin-top: 16px; padding: 16px 0; border-block: 1px dashed var(--line-2); }
.pass > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pass > div:last-child { text-align: right; }
.pass b { font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.pass span { font-size: 14px; color: var(--ink-2); }
.pass-mid { align-items: center; padding-top: 6px; color: var(--accent); }
.pass-mid span { font-size: 12px; white-space: nowrap; }
.pass-mid .ic { width: 22px; height: 22px; }

.today-card { background: var(--accent); color: #fff; border-radius: var(--r-xl); padding: 20px 24px; display: grid; gap: 6px; }
.today-card .next-k { color: rgb(255 255 255 / .8); }
.today-card h2 { font-size: 26px; letter-spacing: -.02em; }
.today-card p { display: flex; gap: 8px; align-items: center; }
.today-card .btn { justify-self: start; background: #fff; color: var(--accent); border-color: #fff; margin-top: 8px; }

/* To-do list */
.todos { display: flex; flex-direction: column; gap: 2px; }
.todo a { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: var(--r); text-decoration: none; transition: background-color .15s; }
.todo a:hover { background: var(--sunk); }
.todo-i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); }
.todo-i .ic { width: 18px; height: 18px; }
.k-risk .todo-i { background: var(--risk-bg); color: var(--risk); }
.todo-t { display: flex; flex-direction: column; min-width: 0; }
.todo-t b { font-weight: 600; font-size: 15px; }
.todo-t span { font-size: 13px; color: var(--ink-2); }
.todo .go { color: var(--ink-3); width: 16px; }

.contacts li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.contacts li:first-child { border-top: 0; }

/* ── Itinerary ─────────────────────────────────────────── */
.days { display: flex; flex-direction: column; gap: 8px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); border-left: 3px solid var(--c); }
.day.past { opacity: .6; }
.day.today { box-shadow: 0 0 0 2px var(--accent); }
.day > summary { display: flex; gap: 16px; padding: 12px 14px; align-items: center; }
.day-date { display: flex; flex-direction: column; align-items: center; width: 44px; flex: none; line-height: 1; }
.day-date b { font-size: 28px; font-weight: 600; letter-spacing: -.03em; }
.day-date span { font-size: 12px; color: var(--ink-2); margin-top: 4px; font-weight: 500; }
.day-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.day-city { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.day-head { font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.day-body { padding: 0 16px 20px 74px; max-width: 760px; }

.mini { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; text-decoration: none; background: var(--bg); }
.mini:hover { border-color: var(--ink-3); }
.mini.risk { border-color: var(--risk-line); background: var(--risk-bg); }
.mini.risk .mode { background: var(--card); color: var(--risk); }
.mini-t { flex: 1; font-size: 14px; line-height: 1.6; min-width: 0; }
.mini-t b { font-size: 15px; display: inline-block; min-width: 44px; }

/* Plan timeline: time · dot · text */
.plan { margin-top: 12px; position: relative; }
.plan li { position: relative; }
/* connector sits under the dot column: padding 6 + time 88 + gap 10 + half dot 11 - half line 1 */
.plan li:not(:last-child)::after { content: ""; position: absolute; left: 114px; top: 30px; bottom: -8px; width: 2px; background: var(--line); }
.act { display: grid; grid-template-columns: 88px 22px 1fr; gap: 10px; width: 100%; padding: 8px 6px; background: none; border: 0; border-radius: var(--r); text-align: left; font: inherit; color: inherit; cursor: pointer; align-items: start; }
.act:hover { background: var(--sunk); }
.act-time { font-size: 13px; font-weight: 600; color: var(--ink-2); padding-top: 2px; }
.act-dot { width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--line-2); background: var(--card); display: grid; place-items: center; color: transparent; position: relative; z-index: 1; transition: background-color .15s, border-color .15s; }
.act-dot .ic { width: 13px; height: 13px; stroke-width: 3; }
.act-planned .act-dot { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--card); background: var(--accent); }
.act-done .act-dot { border-color: var(--ok); background: var(--ok); color: #fff; }
.act-done .act-text { color: var(--ink-3); text-decoration: line-through; }
.act-text { font-size: 15px; }

.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 2px 2px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: var(--card); }
.pill .muted { font-size: 12px; }
.pill-l { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); text-decoration: none; font-weight: 500; }
.pill-l .ic { width: 14px; height: 14px; color: var(--accent); }
.pill-l:hover { color: var(--accent); }
.pill .star { width: 28px; height: 28px; }
.pill .star::after { inset: -8px; }
.pill .star .ic { width: 15px; height: 15px; }
.aside { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); margin-top: 12px; }

/* ── Stays ─────────────────────────────────────────────── */
.stay { border-left: 4px solid var(--c); }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 8px; height: 8px; border-radius: 999px; background: var(--c); }
.stay-name { font-size: 17px; font-weight: 600; }
.addr { margin-top: 4px; }
.refs { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.refs th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-2); padding: 0 12px 6px 0; }
.refs td { padding: 8px 12px 8px 0; border-top: 1px solid var(--line); }
.pc { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.pc li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 6px 0; }
.pros .ic { color: var(--ok); margin-top: 1px; }
.cons .ic { color: var(--warn); margin-top: 1px; }
input, select { font: inherit; font-size: 16px; color: var(--ink); background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); padding: 8px 10px; min-height: 40px; max-width: 100%; }
input:focus, select:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); outline-offset: 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 16px 16px; margin: 16px 0 0; }
legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.userstay { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.userstay label, .sel { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.sel { flex-direction: row; align-items: center; gap: 8px; margin-top: 12px; }
.choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border: 0; padding: 0; margin: 0; }
.choice legend { padding: 0 0 8px; }
.opt { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line-2); border-radius: var(--r-lg); cursor: pointer; background: var(--card); position: relative; transition: border-color .15s, box-shadow .15s; }
.opt:hover { border-color: var(--ink-3); }
.opt.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-bg); }
.opt input { position: absolute; top: 16px; right: 16px; min-height: 0; width: 18px; height: 18px; accent-color: var(--accent); }
.opt-town { font-size: 18px; font-weight: 600; padding-right: 24px; letter-spacing: -.01em; }
.opt-price { font-size: 22px; font-weight: 600; margin-top: 8px; letter-spacing: -.02em; }
.opt-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--warn); margin-top: 8px; }
.opt-flag.ok { color: var(--ok); }
.stay .banner { margin-top: 16px; }

/* ── Transport ─────────────────────────────────────────── */
.journey.risk { border-color: var(--risk-line); }
.journey.risk .mode { background: var(--risk-bg); color: var(--risk); }
.journey .banner { margin-bottom: 4px; }
.legs { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.legs li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.legs .ic { color: var(--ink-3); width: 14px; }
.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 16px; }
.route { padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); }
.route-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.route-h .ic { color: var(--accent); }
.route-ends { margin: 12px 0 8px; position: relative; padding-left: 20px; font-size: 14px; font-weight: 500; }
.route-ends::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px; border-left: 2px dotted var(--ink-3); }
.route-ends li { position: relative; padding: 2px 0; }
.route-ends li::before { content: ""; position: absolute; left: -20px; top: 8px; width: 10px; height: 10px; border-radius: 999px; border: 2px solid var(--accent); background: var(--bg); }
.route-ends li:last-child::before { background: var(--accent); }
.route-t { font-size: 14px; color: var(--ink-2); }
.route .pending { margin-top: 8px; }
.route .actions { margin-top: 12px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 20px; margin: 12px 0; }
.kv dt { font-size: 12px; color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; font-size: 14px; }
.linked-docs:not(:empty) { margin-top: 8px; }

/* ── Explore ───────────────────────────────────────────── */
.dest-dot { width: 12px; height: 12px; border-radius: 999px; background: var(--tone); flex: none; }
.dest-blurb { font-size: 15px; line-height: 1.5; max-width: 64ch; }
.facts3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.facts3 > div { display: flex; gap: 10px; padding: 12px; background: var(--sunk); border-radius: var(--r); font-size: 14px; }
.facts3 .ic { color: var(--accent); margin-top: 2px; }
.facts3 b { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 2px; }
.sights { margin-top: 16px; }
.sights li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); align-items: start; }
.sn { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--sunk); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.sight-h { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.sight-a { display: flex; gap: 12px; align-items: center; }
.eats li, .dishes li { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--line); }
.eats .lnk { font-size: 15px; }
.dishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 20px; }
.exps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.exp .card-b { padding-top: 20px; }
.exp h3 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; margin: 2px 0 0; }
.exp p.small { margin-top: 12px; }
.phrasebook { margin-top: 12px; }
.phrasebook .card-b { padding-top: 20px; }
.phrasebook h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.phrases { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; margin-top: 8px; }
.phrases li { display: flex; flex-direction: column; padding: 10px 0; border-top: 1px solid var(--line); }

/* ── Documents ─────────────────────────────────────────── */
.drop { border: 2px dashed var(--line-2); border-radius: var(--r-xl); padding: 32px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--card); cursor: pointer; transition: background-color .15s, border-color .15s; }
.drop.over { background: var(--accent-bg); border-color: var(--accent); }
.drop-i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); }
.drop-i .ic { width: 24px; height: 24px; }
.drop-big { font-size: 18px; font-weight: 600; }
.doclist li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: flex-start; flex-wrap: wrap; }
.doc-i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); background: var(--sunk); color: var(--ink-2); flex: none; }
.doc-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 260px; overflow-wrap: anywhere; }
.doc-a { display: flex; gap: 2px; flex-wrap: wrap; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.doc-meta label { display: flex; align-items: center; gap: 6px; }
.doc-meta select { font-size: 14px; min-height: 32px; padding: 4px 6px; max-width: 240px; }
.review { border: 1px solid var(--info); background: var(--info-bg); padding: 16px; border-radius: var(--r-lg); margin-top: 16px; }
.review h3 { font-size: 16px; margin-bottom: 4px; }

/* ── Document viewer ───────────────────────────────────── */
.viewer { width: min(960px, calc(100vw - 24px)); height: min(92vh, 1100px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: var(--r-xl); background: var(--bg); color: var(--ink); box-shadow: 0 25px 60px -15px rgb(28 25 23 / .45); overflow: hidden; }
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: rgb(28 25 23 / .55); }
.viewer header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 20px; background: var(--card); border-bottom: 1px solid var(--line); }
.v-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-actions { display: flex; gap: 2px; flex: none; }
.v-body { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; background: var(--sunk); }
.v-body canvas, .v-body img { max-width: 100%; height: auto; background: #fff; border-radius: var(--r); }
.v-body pre { align-self: stretch; white-space: pre-wrap; font: 14px/1.5 var(--font); background: var(--card); padding: 16px; border-radius: var(--r); margin: 0; }
.v-msg { color: var(--ink-2); padding: 40px 0; text-align: center; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r); font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s ease-out, transform .2s ease-out; z-index: 30; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px -10px rgb(0 0 0 / .3); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ── Tablet ────────────────────────────────────────────── */
@media (max-width: 960px) {
  .ov-grid { grid-template-columns: 1fr; }
  .nav a .ic { display: none; }
}

/* ── Phone ─────────────────────────────────────────────── */
@media (max-width: 760px) {
  .top { min-height: 0; padding: 12px 16px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; transform: none; justify-content: space-around; background: var(--card); border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .nav a { flex: 1; flex-direction: column; gap: 2px; font-size: 12px; padding: 6px 2px; border-radius: var(--r); }
  .nav a .ic { display: block; width: 22px; height: 22px; }
  .nav a[aria-current="page"] { background: none; color: var(--ink); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  main { padding: 16px 16px 120px; }
  main > section, main > .stack, main > .days { margin-top: 24px; }
  .h-page { font-size: 28px; }

  /* Overview on a phone: what's next first, then the trip at a glance. The top bar already shows the name. */
  .v-overview { display: flex; flex-direction: column; gap: 20px; }
  .v-overview > * { margin-top: 0 !important; }
  .v-overview > .today-card { order: -3; }
  .v-overview > .heads { order: -2; }
  .v-overview > .ov-grid { order: -1; }
  .hero-title, .hero-sub { display: none; }
  .hero-top { flex-direction: column; align-items: stretch; gap: 16px; }
  .stats div { flex: 1; padding: 8px 12px; }
  .strip { gap: 2px; margin-top: 16px; }
  .strip-w { display: none; }
  .strip-d { font-size: 13px; }
  .strip-i .ic { width: 13px; height: 13px; }
  .next-title { font-size: 24px; }
  .star { width: 36px; height: 36px; }
  .contacts li { flex-wrap: wrap; }

  .day > summary { padding: 12px; gap: 12px; }
  .day-date { width: 36px; }
  .day-date b { font-size: 24px; }
  .day-body { padding: 0 12px 16px; }
  .act { grid-template-columns: 22px 1fr; row-gap: 0; }
  .mini.risk .badge { display: none; }
  .act-time { grid-column: 2; grid-row: 1; padding: 0; font-size: 12px; }
  .act-dot { grid-column: 1; grid-row: 1 / 3; }
  .act-text { grid-column: 2; }
  .plan li:not(:last-child)::after { left: 16px; top: 32px; }
  .card > summary { padding: 14px 16px; }
  .card-b { padding: 0 16px 16px; }
  .pc, .userstay, .choice, .exps, .phrases { grid-template-columns: 1fr; }
  .refs thead { display: none; }
  .refs tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
  .refs td { border: 0; padding: 0; }
  .refs td:nth-child(2), .refs td:nth-child(3), .refs td:nth-child(4) { grid-column: 1; font-size: 13px; color: var(--ink-2); }
  .refs td:nth-child(3)::before { content: "Pay there: "; }
  .refs td:nth-child(4)::before { content: "Free cancel until "; }
  .refs td:last-child { grid-column: 2; grid-row: 1; }
  .sights li { grid-template-columns: 28px 1fr; }
  .sight-a { grid-column: 2; }
  .doc-a { width: 100%; padding-left: 52px; }
}
