/* Layout: sunset hero band → route strip → one band per stop (photo card + day timeline) → budget & packing → planner tools */
/* Layout: painted hero that repaints per place → route strip → one band per stop (scene card + day timeline, travel leg between) → budget & packing → add a stop.
   Theme: each place has a vibe (forest, lake, alpine, village, city). Choosing a place sets data-vibe on the root and the accent to that stop's colour. */
:root {
  --bg: #EEF3EC; --surface: #FFFFFF; --surface-2: #DFEADD; --line: #CBDCC8; --ink: #13261C; --muted: #55695C;
  --fir: #2F6B4F; --lake: #22709A; --glacier: #4A5A9C; --timber: #B0432C; --gold: #8C6812; --on-accent: #FFFFFF;
  --accent: var(--fir);
  --shadow: 0 10px 30px -16px rgba(20, 40, 30, .35);
  --font-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0D1A13; --surface: #15251C; --surface-2: #1D3226; --line: #2A4435; --ink: #E6F0E8; --muted: #9CB4A4; --fir: #62B88D; --lake: #5BAFD8; --glacier: #9DABE3; --timber: #E58063; --gold: #E1B852; --on-accent: #0D1512; color-scheme: dark; --shadow: 0 10px 30px -14px rgba(0, 0, 0, .7); }
}
:root[data-theme="dark"] { --bg: #0D1A13; --surface: #15251C; --surface-2: #1D3226; --line: #2A4435; --ink: #E6F0E8; --muted: #9CB4A4; --fir: #62B88D; --lake: #5BAFD8; --glacier: #9DABE3; --timber: #E58063; --gold: #E1B852; --on-accent: #0D1512; color-scheme: dark; --shadow: 0 10px 30px -14px rgba(0, 0, 0, .7); }
:root[data-vibe="forest"] { --bg: #EEF3EC; --surface: #FFFFFF; --surface-2: #DFEADD; --line: #CBDCC8; --ink: #13261C; --muted: #55695C; }
:root[data-vibe="lake"] { --bg: #EDF4F7; --surface: #FFFFFF; --surface-2: #DCEAF1; --line: #C6DBE5; --ink: #0F2533; --muted: #536B7A; }
:root[data-vibe="alpine"] { --bg: #F3F5FA; --surface: #FFFFFF; --surface-2: #E4E8F4; --line: #D2D9EA; --ink: #161D33; --muted: #5C6480; }
:root[data-vibe="village"] { --bg: #F8EFEA; --surface: #FFFFFF; --surface-2: #F1DFD6; --line: #E5CABD; --ink: #2E1610; --muted: #77574B; }
:root[data-vibe="city"] { --bg: #F2F2F0; --surface: #FFFFFF; --surface-2: #E5E5E1; --line: #D4D4CE; --ink: #1B1B19; --muted: #62625C; }
@media (prefers-color-scheme: dark) {
  :root[data-vibe="forest"]:not([data-theme="light"]) { --bg: #0D1A13; --surface: #15251C; --surface-2: #1D3226; --line: #2A4435; --ink: #E6F0E8; --muted: #9CB4A4; }
  :root[data-vibe="lake"]:not([data-theme="light"]) { --bg: #0B1820; --surface: #13232D; --surface-2: #1B303C; --line: #284352; --ink: #E4EFF5; --muted: #98B1C0; }
  :root[data-vibe="alpine"]:not([data-theme="light"]) { --bg: #10131F; --surface: #181C2C; --surface-2: #212739; --line: #303852; --ink: #E9ECF7; --muted: #A3AAC6; }
  :root[data-vibe="village"]:not([data-theme="light"]) { --bg: #1C100C; --surface: #281813; --surface-2: #33201A; --line: #4A2F25; --ink: #F6E7E0; --muted: #C4A497; }
  :root[data-vibe="city"]:not([data-theme="light"]) { --bg: #121211; --surface: #1C1C1A; --surface-2: #262623; --line: #36362F; --ink: #EEEEEA; --muted: #A8A8A0; }
}
:root[data-theme="dark"][data-vibe="forest"] { --bg: #0D1A13; --surface: #15251C; --surface-2: #1D3226; --line: #2A4435; --ink: #E6F0E8; --muted: #9CB4A4; }
:root[data-theme="dark"][data-vibe="lake"] { --bg: #0B1820; --surface: #13232D; --surface-2: #1B303C; --line: #284352; --ink: #E4EFF5; --muted: #98B1C0; }
:root[data-theme="dark"][data-vibe="alpine"] { --bg: #10131F; --surface: #181C2C; --surface-2: #212739; --line: #303852; --ink: #E9ECF7; --muted: #A3AAC6; }
:root[data-theme="dark"][data-vibe="village"] { --bg: #1C100C; --surface: #281813; --surface-2: #33201A; --line: #4A2F25; --ink: #F6E7E0; --muted: #C4A497; }
:root[data-theme="dark"][data-vibe="city"] { --bg: #121211; --surface: #1C1C1A; --surface-2: #262623; --line: #36362F; --ink: #EEEEEA; --muted: #A8A8A0; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap {
  max-width: 1160px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; text-decoration: none; }
.logo-mark { width: 34px; height: 22px; position: relative; display: inline-flex; align-items: center; justify-content: space-between; }
.logo-mark::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; border-top: 2px dashed var(--ink); opacity: .45; }
.logo-mark i { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--fir); box-shadow: 0 0 0 2px var(--bg); }
.logo-mark i:nth-child(2) { background: var(--lake); transform: translateY(-5px); }
.logo-mark i:nth-child(3) { background: var(--timber); }
.logo b { color: var(--accent); transition: color .6s; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: 999px; color: var(--muted); }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 640px) { .nav { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #FFF8F0; isolation: isolate; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero .wrap { padding-block: 72px 96px; display: grid; gap: 22px; }
.hero .eyebrow { color: #FFE7C2; }
.hero h1 { font-size: clamp(40px, 7vw, 84px); font-weight: 800; letter-spacing: -.035em; max-width: 18ch; }
.hero h1 em { font-style: normal; color: #FFD369; }
.hero-lede { max-width: 54ch; font-size: 18px; color: #FFEBDD; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.stat { background: rgba(58, 22, 49, .38); border: 1px solid rgba(255, 240, 225, .28); backdrop-filter: blur(6px); padding: 10px 16px; border-radius: 14px; min-width: 112px; }
.stat strong { display: block; font-family: var(--font-display); font-size: 26px; font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #FFE0C7; }

/* ---------- Route strip ---------- */
.route { margin-top: -48px; position: relative; z-index: 2; }
.route-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; border: 1px solid var(--line); }
.route-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.route-head h2 { font-size: 20px; }
.route-scroll { overflow-x: auto; padding-bottom: 6px; }
.route-line { display: flex; align-items: stretch; min-width: max-content; gap: 0; }
.route-stop { display: grid; gap: 4px; text-decoration: none; padding: 10px 14px; border-radius: 14px; min-width: 128px; transition: background .2s; }
.route-stop:hover { background: var(--surface-2); }
.route-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 22%, transparent); margin-bottom: 6px; }
.route-stop strong { font-family: var(--font-display); font-size: 17px; }
.route-stop small { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.route-leg { display: grid; place-items: center; align-content: start; padding-top: 16px; min-width: 88px; color: var(--muted); font-family: var(--font-mono); font-size: 11px; text-align: center; gap: 4px; }
.route-leg::before { content: ""; display: block; width: 100%; height: 0; border-top: 2px dashed var(--line); }

/* ---------- Stop sections ---------- */
.stops { display: grid; gap: 64px; padding-block: 64px 24px; }
.stop { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: start; scroll-margin-top: 80px; }
@media (max-width: 860px) { .stop { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.stop-card { position: sticky; top: 84px; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
@media (max-width: 860px) { .stop-card { position: static; } }
.photo { position: relative; aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden; background: var(--c); }
.photo canvas, .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.photo img { opacity: 0; transition: opacity .6s; }
.photo img.loaded { opacity: 1; }
.photo-tag { position: absolute; left: 14px; top: 14px; background: var(--c); color: #fff; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; padding: 5px 10px; border-radius: 999px; text-transform: uppercase; }
.photo-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px; background: linear-gradient(to top, rgba(40, 10, 30, .78), transparent); color: #fff; }
.photo-title h2 { font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -.03em; }
.photo-title p { font-size: 14px; color: #FFE6D6; }
.stop-meta { display: grid; gap: 12px; padding: 18px; }
.meta-row { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.meta-row dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.meta-row dd { margin: 0; font-weight: 600; }
.stop-note { font-size: 14px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; }
.remove-stop { justify-self: start; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); cursor: pointer; }
.remove-stop:hover { border-color: var(--timber); color: var(--timber); }

.days { display: grid; gap: 18px; min-width: 0; }
.day { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: 18px 20px 14px; }
.day-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.day-badge { flex: none; width: 54px; height: 54px; border-radius: 16px; background: var(--c); color: var(--on-accent); display: grid; place-content: center; text-align: center; line-height: 1; }
.day-badge b { font-family: var(--font-display); font-size: 22px; }
.day-badge span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.day-head h3 { font-size: 20px; }
.day-head p { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.acts { list-style: none; margin: 0; padding: 0; display: grid; }
.act { display: grid; grid-template-columns: 56px 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.act:first-child { border-top: 0; }
.act time { font-family: var(--font-mono); font-size: 13px; color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.act input[type="checkbox"] { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--c); cursor: pointer; }
.act-body strong { display: block; font-weight: 700; }
.act-body small { color: var(--muted); font-size: 14px; }
.act.done .act-body strong { text-decoration: line-through; text-decoration-color: var(--c); text-decoration-thickness: 2px; color: var(--muted); }
.chip { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; white-space: nowrap; background: color-mix(in srgb, var(--k) 16%, transparent); color: var(--k); }
.chip.food { --k: var(--timber); } .chip.sight { --k: var(--fir); } .chip.book { --k: var(--glacier); } .chip.travel { --k: var(--lake); } .chip.relax { --k: var(--gold); }
@media (max-width: 480px) { .act { grid-template-columns: 48px 22px minmax(0, 1fr); } .act .chip { grid-column: 3; justify-self: start; } }

.add-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.add-act input, .add-act select, .field input, .field select, .field textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0;
}
.add-act input[type="time"] { width: 136px; }
.add-act input[type="text"] { flex: 1 1 180px; }
.btn { border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 700; cursor: pointer; background: var(--c, var(--accent)); color: var(--on-accent); }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

.leg-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; text-align: center; color: var(--muted); font-size: 14px; margin-top: -32px; }
.leg-banner span.mode { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; background: var(--surface-2); color: var(--ink); padding: 6px 12px; border-radius: 999px; }
.leg-banner::before, .leg-banner::after { content: ""; flex: 1 1 40px; border-top: 2px dashed var(--line); max-width: 220px; }

/* ---------- Budget / packing / add stop ---------- */
.section { padding-block: 56px; }
.section-head { display: grid; gap: 6px; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.025em; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-width: 0; }
.panel h3 { font-size: 20px; margin-bottom: 14px; }

.budget-total { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.budget-total strong { font-family: var(--font-display); font-size: 40px; font-variant-numeric: tabular-nums; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: 14px; }
.bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--c); }
.bar-row span:last-child { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.pack { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pack label { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; }
.pack label:hover { background: var(--surface-2); }
.pack input { width: 18px; height: 18px; accent-color: var(--fir); }
.pack input:checked + span { text-decoration: line-through; color: var(--muted); }
.pack-progress { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 8px; }

.form { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; }
.field label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.form-msg { font-size: 14px; color: var(--fir); min-height: 1.4em; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches label { cursor: pointer; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--s); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.swatches input:checked + span { box-shadow: 0 0 0 3px var(--ink); }
.swatches input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

footer { border-top: 1px solid var(--line); }
footer .wrap { padding-block: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 14px; }
.reset { background: none; border: 0; color: var(--timber); font-weight: 700; cursor: pointer; padding: 0; }

/* ---------- Travel options ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a.route-leg { text-decoration: none; border-radius: 12px; padding-inline: 6px; }
a.route-leg:hover { background: var(--surface-2); color: var(--ink); }
.route-leg span { font-weight: 500; color: var(--ink); }
.route-leg small { font-size: 11px; }
.prefs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.prefs .eyebrow { margin-right: 4px; }
.pref { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 14px; cursor: pointer; }
.pref:hover { border-color: var(--timber); }
.pref[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.leg { scroll-margin-top: 80px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); border-radius: var(--radius); padding: 20px; margin-block: -24px; }
.leg-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.leg-head h3 { font-size: clamp(20px, 3vw, 26px); }
.leg-head h3 span[aria-hidden] { color: var(--c); }
.leg-hint { font-size: 14px; color: var(--muted); }
.leg-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.opt { position: relative; cursor: pointer; display: flex; min-width: 0; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-card { flex: 1; display: grid; gap: 8px; align-content: start; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 14px; transition: border-color .15s, transform .15s; }
.opt:hover .opt-card { border-color: color-mix(in srgb, var(--c) 55%, var(--line)); transform: translateY(-2px); }
.opt input:checked + .opt-card { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.opt input:focus-visible + .opt-card { outline: 3px solid var(--gold); outline-offset: 2px; }
.opt-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.opt-top strong { font-family: var(--font-display); font-size: 18px; }
.opt-tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.opt input:checked + .opt-card .opt-tick { background: var(--c); border-color: var(--c); }
.opt input:checked + .opt-card .opt-tick::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.opt-detail { color: var(--muted); font-size: 14px; }
.opt-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.opt-facts em { display: block; font-style: normal; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--ink); }
.bar-row.transport { border-top: 1px dashed var(--line); padding-top: 10px; }

/* ---------- Day editing ---------- */
.day-title { min-width: 0; flex: 1; }
.edited-flag { color: var(--c); font-weight: 500; }
.edit-btn { flex: none; align-self: flex-start; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink); }
.edit-btn:hover { border-color: var(--c); color: var(--c); }
.day.editing { border: 2px solid var(--c); box-shadow: var(--shadow); }
.edit-head { flex: 1; min-width: 0; display: grid; gap: 6px; }
.edit-head input, .erow input, .erow select { width: 100%; min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.edit-head .e-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.edit-head .e-date { font-family: var(--font-mono); font-size: 13px; }
.edit-hint { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.erows { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.erow { display: grid; grid-template-columns: 88px minmax(0, 1fr) 120px; grid-template-areas: "time name type" "note note note" "move move del"; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.erow .e-time { grid-area: time; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.erow .e-name { grid-area: name; font-weight: 600; }
.erow .e-type { grid-area: type; }
.erow .e-note { grid-area: note; font-size: 14px; }
.erow .e-move { grid-area: move; font-size: 14px; }
.erow .e-del { grid-area: del; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--muted); }
.erow .e-del:hover { border-color: var(--timber); color: var(--timber); }
.erow.removed { opacity: .55; }
.erow.removed input, .erow.removed select { text-decoration: line-through; pointer-events: none; }
.erow.removed .e-del { color: var(--ink); border-color: var(--ink); opacity: 1; }
@media (max-width: 560px) {
  .erow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "time type" "name name" "note note" "move move" "del del"; }
  .erow .e-del { justify-self: start; }
}
.edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.link-btn { margin-left: auto; background: none; border: 0; padding: 6px 0; color: var(--timber); font-weight: 700; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 20; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); text-align: center; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Place vibes ---------- */
body, .topbar, .route-card, .stop-card, .day, .leg, .panel, .opt-card, footer { transition: background-color .6s ease, border-color .6s ease, color .6s ease; }
.hero canvas { transition: opacity .25s ease; }
.hero canvas.swap { opacity: .35; }
.now-place { display: inline-flex; align-items: center; gap: 10px; justify-self: start; max-width: 100%; background: rgba(10, 20, 16, .42); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(6px); color: #F2F6F2; padding: 8px 14px; border-radius: 999px; font-size: 15px; }
.now-place b { font-family: var(--font-display); font-weight: 600; }
.now-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); flex: none; }
.route-stop.is-active { background: color-mix(in srgb, var(--c) 14%, var(--surface)); box-shadow: inset 0 0 0 2px var(--c); }
.pref[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Estimates & bookings ---------- */
.status { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.status.is-est { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line); }
.status.is-booked { background: var(--c); color: var(--on-accent); }
a.route-leg.is-booked small { color: var(--fir); font-weight: 600; }
.leg .leg-hint { margin-bottom: 12px; }
.leg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; }
.leg-actions .btn { margin-left: auto; }
.link-out { font-weight: 700; font-size: 14px; color: var(--c, var(--accent)); text-underline-offset: 3px; }
.link-out:hover { text-decoration-thickness: 2px; }
.stop-meta .link-out { justify-self: start; }
.book-form { display: grid; gap: 12px; }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .book-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.book-form .field input, .book-form .field select { width: 100%; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--c); }
.form-error { color: var(--timber); font-size: 14px; min-height: 1.2em; }
.booked { display: grid; gap: 12px; background: var(--surface); border: 2px solid var(--c); border-radius: 14px; padding: 16px; }
.booked-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.booked-main strong { font-family: var(--font-display); font-size: 22px; }
.booked-times { font-family: var(--font-mono); font-size: 15px; font-variant-numeric: tabular-nums; }
.booked-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.booked-facts dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.booked-facts dd { margin: 0; font-weight: 600; }
.booked .leg-actions { margin-top: 0; }
.booked .leg-actions .link-btn { margin-left: 0; }
.booked-count { font-size: 13px; color: var(--muted); margin-top: 6px; }
.field input[type="date"] { min-height: 38px; }

/* ---------- Trip setup ---------- */
.route-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.route-stack > * { min-width: 0; }
.setup-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; border: 1px solid var(--line); }
.setup-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.setup-head h2 { font-size: 20px; }
.setup-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1.2fr); gap: 18px 28px; }
@media (max-width: 760px) { .setup-grid { grid-template-columns: minmax(0, 1fr); } }
.setup-group { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; align-content: start; }
.setup-group.wide { grid-column: 1 / -1; }
.setup-group legend { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; padding: 0; }
.setup-note { font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt input, .style-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip-opt span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-weight: 700; font-size: 14px; cursor: pointer; }
.chip-opt:hover span { border-color: var(--accent); }
.chip-opt input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-opt input:focus-visible + span, .style-opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; justify-self: start; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); padding: 4px; }
.stepper button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface); font-size: 20px; font-weight: 700; cursor: pointer; color: var(--ink); }
.stepper button:hover:not(:disabled) { background: var(--surface-2); }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output { min-width: 44px; text-align: center; font-family: var(--font-display); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .styles { grid-template-columns: minmax(0, 1fr); } }
.style-opt { position: relative; display: flex; cursor: pointer; }
.style-opt span { flex: 1; display: grid; gap: 4px; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); }
.style-opt b { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.style-opt small { color: var(--muted); font-size: 14px; }
.style-opt:hover span { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.style-opt input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }

/* ---------- Visited ---------- */
.visited { display: grid; gap: 10px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px 20px; }
.visited ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.visited li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.visited li strong { font-family: var(--font-display); font-size: 17px; color: var(--muted); text-decoration: line-through; text-decoration-color: var(--c); }
.visited li small { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.visited .link-btn { margin-left: auto; }
.v-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--on-accent); font-size: 12px; font-weight: 700; }
.route-stop.is-visited { opacity: .55; }
.route-stop.is-visited strong { text-decoration: line-through; }
.route-stop.is-visited .route-dot { display: grid; place-items: center; color: var(--on-accent); font-size: 11px; font-weight: 700; }
.route-leg.is-visited { opacity: .4; }
.bar-row.is-visited { opacity: .55; }
.stop-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.all-done { text-align: center; padding: 40px 16px; display: grid; gap: 8px; justify-items: center; }
.all-done h2 { font-size: clamp(26px, 4vw, 36px); }
.all-done p { color: var(--muted); max-width: 48ch; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-btn { background: none; border: 1px solid currentColor; color: inherit; border-radius: 999px; padding: 4px 12px; font-weight: 700; cursor: pointer; }
.toast.show { pointer-events: auto; }

/* ---------- Your photos ---------- */
.photo-tools { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; }
.photo-btn { background: rgba(10, 20, 16, .55); color: #F4F7F4; border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(4px); border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--font-body); }
.photo-btn:hover { background: rgba(10, 20, 16, .75); }
.photo input[type="file"]:focus-visible + .photo-btn, .photo-tools:focus-within .photo-btn:first-child { outline: 3px solid #fff; outline-offset: 2px; }
.photo-title { pointer-events: none; }

/* ---------- Editing a stop ---------- */
.stop-form { gap: 12px; }
.stop-form .field input { width: 100%; }
.stepper.small { padding: 3px; }
.stepper.small button { width: 32px; height: 32px; font-size: 18px; }
.stepper.small input { width: 52px; border: 0; background: transparent; text-align: center; font-family: var(--font-display); font-size: 20px; font-weight: 800; padding: 0; -moz-appearance: textfield; }
.stepper.small input::-webkit-outer-spin-button, .stepper.small input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-after { align-self: end; padding-bottom: 8px; }

/* ---------- First-visit setup ---------- */
body.wz-open { overflow: hidden; }
.wizard { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 55%, transparent); backdrop-filter: blur(6px);
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.wz-panel { width: min(640px, 100%); max-height: 100%; overflow-y: auto; background: var(--surface); color: var(--ink); border-radius: 22px; border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5); padding: 24px; display: grid; gap: 14px; align-content: start; }
.wz-top { display: flex; align-items: center; gap: 12px; }
.wz-dots { display: flex; gap: 6px; }
.wz-dots span { width: 28px; height: 5px; border-radius: 999px; background: var(--line); }
.wz-dots span.on { background: var(--accent); }
.wz-close { margin-left: auto; }
.wz-panel h2 { font-size: clamp(26px, 5vw, 34px); letter-spacing: -.02em; }
.wz-sub { color: var(--muted); margin-top: -8px; }
.wz-body { display: grid; gap: 18px; }
.wz-body .field input, .wz-body .field select { width: 100%; }
.wz-body .styles { grid-template-columns: minmax(0, 1fr); }
.icon-btn { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 15px; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover:not(:disabled) { border-color: var(--accent); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.wz-start { max-width: 220px; }
.wz-summary { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: -8px; }
.wz-route { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wz-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--c); }
.wz-num { width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: var(--on-accent); display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.wz-place { min-width: 0; display: grid; }
.wz-place strong { font-family: var(--font-display); font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.wz-place small { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.wz-row .stepper output { min-width: 34px; font-size: 16px; }
.wz-moves { display: flex; gap: 4px; }
.wz-route.review .wz-row { grid-template-columns: 30px minmax(0, 1fr); }
.wz-empty { padding: 16px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
@media (max-width: 520px) {
  .wz-panel { padding: 18px; }
  .wz-row { grid-template-columns: 30px auto minmax(0, 1fr); grid-template-areas: "num place place" ". step moves"; }
  .wz-row .wz-num { grid-area: num; }
  .wz-row .wz-place { grid-area: place; }
  .wz-row .stepper { grid-area: step; justify-self: start; }
  .wz-row .wz-moves { grid-area: moves; justify-self: end; }
  .wz-route.review .wz-row { grid-template-areas: "num place"; grid-template-columns: 30px minmax(0, 1fr); }
}
.add-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.add-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px dashed var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)); color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; }
.add-chip small { font-weight: 400; color: var(--muted); font-size: 12px; }
.add-chip:hover { background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.wz-own { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--bg); }
.wz-own summary { cursor: pointer; font-weight: 700; }
.wz-own[open] { display: grid; gap: 12px; }
.wz-own-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
@media (max-width: 520px) { .wz-own-grid { grid-template-columns: minmax(0, 1fr); } }
.wz-own .btn { justify-self: start; }
.wz-review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 0; }
.wz-review dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.wz-review dd { margin: 0; font-weight: 600; }
.wz-foot { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--line); }
.wz-foot .btn[data-wz-next], .wz-foot .btn[data-wz-done] { margin-left: auto; }
.wz-foot .btn:disabled { opacity: .4; cursor: default; }
.wz-foot .link-btn { margin-left: 0; }
.route-change { padding: 6px 14px; font-size: 13px; }
.route-head { align-items: center; }

/* ---------- Tripstitch: 3D hero and landing ---------- */
.hero { min-height: 520px; display: grid; align-items: end; }
.hero > .wrap { position: relative; z-index: 2; }
.hero-3d { position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, var(--sky-top, #6E9AB0), var(--sky-bottom, #D6E6DA) 70%); transition: background .8s ease; display: none; }
.hero.has-3d .hero-3d { display: block; }
.hero.has-3d #hero-canvas { display: none; }
.hero-3d canvas { position: absolute; inset: 0; display: block; }
.hero-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(10, 22, 18, .78) 0%, rgba(10, 22, 18, .5) 38%, rgba(10, 22, 18, 0) 70%), linear-gradient(0deg, rgba(10, 22, 18, .55) 0%, rgba(10, 22, 18, 0) 40%); }
@media (max-width: 760px) { .hero-shade { background: linear-gradient(0deg, rgba(10, 22, 18, .85) 0%, rgba(10, 22, 18, .55) 55%, rgba(10, 22, 18, .15) 100%); } }
.map-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.map-label { position: absolute; left: 0; top: 0; padding: 4px 10px 4px 22px; border-radius: 999px; background: rgba(12, 22, 18, .72); color: #F5F7F4; font-family: var(--font-body); font-size: 12px; font-weight: 700; white-space: nowrap; transition: opacity .3s, background .3s; will-change: transform; }
.map-label::before { content: ""; position: absolute; left: 8px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--c); }
.map-label.is-active { background: var(--c); color: #fff; font-size: 13px; }
.map-label.is-active::before { background: #fff; }
.map-label.is-visited { opacity: .6; text-decoration: line-through; }

.hero-landing { display: none; padding-block: 96px 120px; gap: 22px; }
body.is-landing .hero-landing { display: grid; }
body.is-landing .hero-trip { display: none; }
body.is-landing .hero { min-height: min(88vh, 780px); align-items: center; }
.landing-title { font-size: clamp(46px, 8.4vw, 108px); font-weight: 800; letter-spacing: -.04em; line-height: .98; max-width: 11ch; color: #FFF8F0; }
.landing-title em { font-style: normal; color: #FFD369; text-decoration: underline dashed rgba(255, 211, 105, .7); text-decoration-thickness: .06em; text-underline-offset: .14em; }
.hero-landing .hero-lede { font-size: clamp(17px, 2vw, 21px); max-width: 46ch; color: #F1F5F1; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.btn.big { padding: 15px 26px; font-size: 17px; }
.hero .btn.big:not(.ghost-light) { background: #FFD369; color: #1B2A20; }
.btn.ghost-light { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .5); backdrop-filter: blur(4px); }
.btn.ghost-light:hover { background: rgba(255, 255, 255, .2); }
.proof { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #DCE7DF; }

.features { display: none; padding-block: 56px 72px; }
body.is-landing .features { display: block; }
body.is-landing #route, body.is-landing #stops, body.is-landing #budget, body.is-landing .nav { display: none; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: minmax(0, 1fr); } }
.feature { display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feature svg { width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 19px; }
.feature p { color: var(--muted); font-size: 15px; }

/* ---------- Sync status ---------- */
.topbar .wrap { flex-wrap: nowrap; }
.sync { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.sync[data-mode="cloud"] { color: var(--fir); border-color: color-mix(in srgb, var(--fir) 45%, var(--line)); }
.sync[data-mode="cloud"]::before { content: "● "; }

/* ---------- Bookings ---------- */
.bookings-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; border: 1px solid var(--line); display: grid; gap: 14px; scroll-margin-top: 80px; }
.tabs { display: inline-flex; justify-self: start; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.tabs [role="tab"] { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); }
.tabs [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.pane { display: grid; gap: 12px; }
.pane[hidden] { display: none; }
.drop { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 26px 16px; border: 2px dashed var(--line); border-radius: 16px; background: var(--bg); cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--bg)); }
.drop:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.drop-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.drop-sub { font-size: 14px; color: var(--muted); }
.pane textarea, .manual-form select, .review select, .bk-grid input, .bk-grid select { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; color: inherit; min-width: 0; }
.pane textarea { resize: vertical; min-height: 90px; }
.import-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.import-status { font-size: 14px; color: var(--muted); }
.import-status.is-error { color: var(--timber); }
.bk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bk-grid .field.wide { grid-column: span 2; }
@media (max-width: 640px) { .bk-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .bk-grid .field.wide { grid-column: 1 / -1; } }
.manual-form { display: grid; gap: 12px; }
.manual-form > .field { max-width: 460px; }
.review { display: grid; gap: 10px; padding-top: 6px; }
.review h3 { font-size: 18px; }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.review-row { display: grid; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); }
.review-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.review-top strong { font-weight: 700; }
.review-top .src { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-left: auto; }
.review-edit summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--accent); }
.review-edit[open] { display: grid; gap: 10px; }
.setup-note.warn { color: var(--timber); }
.fix-nights { font-weight: 600; }
.bk-list-title { font-size: 16px; padding-top: 10px; border-top: 1px dashed var(--line); }
.bk-saved { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bk-saved li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.bk-saved-main { flex: 1; min-width: 0; display: grid; }
.bk-saved-main small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.bk-empty { padding-top: 10px; border-top: 1px dashed var(--line); }
.pill-booked { display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--c); color: var(--on-accent); vertical-align: 2px; }
.addr { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.stay-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.stay-links .link-btn { margin-left: 0; padding: 0; }
.map-labels { z-index: 1; }

.bk-warn{display:block;margin-top:4px;color:#9a3412}
@media (prefers-color-scheme:dark){.bk-warn{color:#fdba74}}

/* F-001: printable day-by-day plan */
@media print {
  :root, :root[data-vibe] { --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #111; --muted: #444; --line: #bbb; color-scheme: light; }
  body { background: #fff !important; color: #111 !important; font-size: 11pt; }
  .topbar, .hero, #route, #bookings, #add, footer, .toast, .edit-btn, .add-act, .stop-actions, .photo-tools,
  .remove-stop, .stop-card .photo canvas, .stay-links, .leg, .leg-banner, .visited, .sync, #print-plan { display: none !important; }
  .stop { break-inside: auto; page-break-before: always; box-shadow: none !important; }
  .stop:first-of-type { page-break-before: auto; }
  .day { break-inside: avoid; box-shadow: none !important; border: 1px solid #bbb; margin-bottom: 8pt; }
  .stop-card, .days { width: auto !important; position: static !important; }
  a { color: #111; text-decoration: none; }
}

.chip.shop { --k: #B04E8C; }
.more { margin-top: 8px; padding: 18px; border: 1px dashed var(--line); border-radius: 16px; background: var(--surface); }
.more h3 { margin: 0 0 4px; }
.more-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.more-item { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 170px) auto; gap: 10px; align-items: center; }
.more-main small { display: block; color: var(--muted); }
.more-item select { max-width: 100%; }
@media (max-width: 700px) { .more-item { grid-template-columns: auto minmax(0, 1fr); } .more-item select, .more-item .btn { grid-column: 2; justify-self: start; } }
@media print { .more { display: none !important; } }

/* sign-in screen */
html.auth-locked body > header, html.auth-locked body > main, html.auth-locked body > footer, html.auth-locked .toast { display: none !important; }
.auth { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px 16px; overflow-y: auto; background: linear-gradient(180deg, var(--sky-top, #6E9AB0), var(--sky-bottom, #D6E6DA) 75%); }
.auth[hidden] { display: none !important; }
.auth-card { width: min(420px, 100%); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; padding: 28px 24px; box-shadow: var(--shadow, 0 10px 30px -14px rgba(0,0,0,.4)); }
.auth-logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-display, inherit); font-weight: 800; font-size: 20px; margin-bottom: 18px; }
.auth-logo b { color: var(--fir); }
.auth-card h1 { font-size: 26px; line-height: 1.15; margin: 0 0 8px; }
.auth-lede { color: var(--muted); margin: 0 0 18px; }
.auth-card label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.auth-card input { width: 100%; box-sizing: border-box; font-size: 18px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
#auth-code { letter-spacing: .3em; text-align: center; font-family: var(--font-mono, monospace); }
.auth-card input:focus-visible { outline: 3px solid var(--accent, var(--fir)); outline-offset: 2px; }
.auth-card .btn.big { width: 100%; margin-top: 8px; }
.auth-msg { min-height: 22px; margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.auth-msg.is-error { color: #b42318; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-msg.is-error { color: #fda29b; } }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--ink); text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; }
.link-btn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.auth-foot { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
#sign-out { margin-left: 8px; }
@media print { #sign-out, .auth { display: none !important; } }

.foot-link { color: inherit; text-decoration: underline; margin: 0 12px; font-size: 14px; }
@media print { .foot-link { display: none; } }

/* plans */
.plan-badge { margin-left: 8px; padding: 3px 10px; border-radius: 999px; font: 600 12px var(--font-mono, monospace); letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); }
.plan-badge.is-pro { background: var(--gold, #E1B852); color: #1b1608; border-color: transparent; }
.plan-badge.is-free { color: var(--muted); }
.pro-chip { display: inline-block; font: 700 11px var(--font-mono, monospace); letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--gold, #E1B852); color: #1b1608; }
.locked { padding: 24px; border: 1px dashed var(--line); border-radius: 16px; background: var(--surface); }
.locked h3 { margin: 10px 0 6px; }
.locked p { margin: 0; color: var(--muted); }
.locked .btn { margin-left: 6px; }
@media print { #plan-badge { display: none !important; } .locked { border-style: solid; } }

.auth-steps { margin: 0 0 16px; padding-left: 20px; color: var(--muted); }
.auth-steps li { margin: 6px 0; }
.auth-steps b { color: var(--ink); }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.auth-tabs button { border: 0; background: none; color: var(--muted); font: 700 14px var(--font-body, inherit); padding: 9px 12px; border-radius: 999px; cursor: pointer; }
.auth-tabs button[aria-selected="true"] { background: var(--accent, var(--fir)); color: var(--on-accent, #fff); }
.auth-tabs button:focus-visible { outline: 3px solid var(--accent, var(--fir)); outline-offset: 2px; }
.auth-card label.auth-agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; margin: 12px 0 0; }
.auth-card .auth-agree input { width: auto; margin-top: 3px; }

/* trip chooser */
.trips { z-index: 110; }
.trips-card { width: min(520px, 100%); }
.trip-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; max-height: 50vh; overflow-y: auto; }
.trip-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.trip-main small { display: block; color: var(--muted); }
.trip-open-tag { font: 700 11px var(--font-mono, monospace); text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: var(--accent, var(--fir)); color: var(--on-accent, #fff); margin-left: 6px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 480px) { .trip-item { grid-template-columns: minmax(0, 1fr) auto; } .trip-item .link-btn { grid-column: 1 / -1; justify-self: start; } }
@media print { #my-trips, .trips { display: none !important; } }

.auth-captcha { min-height: 0; margin: 12px 0 4px; display: flex; justify-content: center; }

/* pro requests */
#request-pro, #admin-requests { margin-left: 8px; }
#proreq, #adminreq { z-index: 120; }
.auth-card textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); resize: vertical; }
.req-item { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.req-item select { max-width: 120px; }
.req-h { font-size: 16px; margin: 16px 0 6px; }
.req-done-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.req-done { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
@media (max-width: 560px) { .req-item { grid-template-columns: minmax(0, 1fr) auto; } .req-item select, .req-item .btn, .req-item .link-btn { grid-column: auto; } }
@media print { #request-pro, #admin-requests, #proreq, #adminreq { display: none !important; } }

/* ---------- tidy header ---------- */
.topbar .wrap { flex-wrap: nowrap; gap: 12px; }
.logo { flex: 0 0 auto; }
.nav { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; margin-left: 8px; }
.nav a { white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.topbar-actions .btn, .topbar-actions .plan-badge { white-space: nowrap; }
.topbar-actions .plan-badge { margin-left: 0; }
.topbar-actions .sync { max-width: 40vw; }
body.is-landing #print-plan { display: none; }
.account { position: relative; }
.account-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.account-btn:hover { border-color: var(--accent); }
.account-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.avatar { font: 700 14px var(--font-body, inherit); }
.acct-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: var(--timber, #c8553d); color: #fff; font: 700 11px/18px var(--font-body, inherit); text-align: center; }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(260px, calc(100vw - 32px)); padding: 8px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .35); }
.account-menu[hidden] { display: none; }
.account-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; width: 100%; }
.account-menu button[role="menuitem"] { text-align: left; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 600 14px var(--font-body, inherit); cursor: pointer; width: 100%; }
.account-menu button[role="menuitem"]:hover, .account-menu button[role="menuitem"]:focus-visible { background: var(--surface-2); outline: none; }
.account-menu button[hidden] { display: none; }
.acct-head { padding: 8px 12px 10px; display: grid; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-email { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-head .sync { display: inline-block; max-width: 100%; }
@media (max-width: 900px) { .nav a { padding: 7px 9px; } }
@media (max-width: 640px) {
  .topbar .wrap { gap: 8px; }
  .logo { font-size: 19px; gap: 8px; }
  .logo-mark { width: 28px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions > .sync { display: none; }       /* only shown in local mode on wide screens; signed-in status is in the menu */
  #print-plan { padding: 6px 10px; }
}
@media (max-width: 380px) { .logo > span:last-child { font-size: 17px; } #print-plan { padding: 6px 8px; font-size: 12px; } }
@media print { #account, .account-menu { display: none !important; } }
.account-menu button, .account-menu #sign-out, .account-menu #request-pro, .account-menu #admin-requests { margin-left: 0; }
