/* Travel Help Sri Lanka: trip app. Light and dark themes, phone-first, three-pane on desktop. */

:root {
  --bg: #f4f2ec;
  --surface: #ffffff;
  --surface-2: #f6f4ef;
  --surface-3: #ece8df;
  --ink: #111915;
  --ink-2: #2a3530;
  --muted: #6a756f;
  --line: #e4e0d6;
  --brand: #1f4d3a;
  --accent: #e0a227;
  --accent-soft: #fbefd2;
  --primary: #111915;
  --primary-ink: #ffffff;
  --wa: #1fa855;
  --wa-ink: #ffffff;
  --danger: #c2412d;
  --ok: #1f8a52;
  --rain: #3d6fb4;
  --land: #e8e3d4;
  --land-stroke: #d3ccba;
  --route: #1f4d3a;
  --route-halo: rgba(224, 162, 39, 0.35);
  --pin: #111915;
  --shadow-sm: 0 1px 2px rgba(17, 25, 21, 0.06), 0 2px 8px rgba(17, 25, 21, 0.04);
  --shadow: 0 10px 30px -12px rgba(17, 25, 21, 0.18), 0 2px 6px rgba(17, 25, 21, 0.05);
  --shadow-lg: 0 30px 70px -28px rgba(17, 25, 21, 0.35);
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --display: "Fraunces", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --tabbar-h: 76px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1310; --surface: #131e19; --surface-2: #18251f; --surface-3: #1f2e27; --ink: #eef3ef; --ink-2: #cfd9d3;
    --muted: #93a39a; --line: #23332b; --brand: #2c6b51; --accent: #f0b43a; --accent-soft: #2a2412; --primary: #f0b43a;
    --primary-ink: #15110a; --land: #16231d; --land-stroke: #273a31; --route: #f0b43a; --route-halo: rgba(240, 180, 58, 0.25);
    --pin: #eef3ef; --rain: #7ea6e0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 14px 34px -14px rgba(0,0,0,.6); --shadow-lg: 0 30px 70px -28px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1310; --surface: #131e19; --surface-2: #18251f; --surface-3: #1f2e27; --ink: #eef3ef; --ink-2: #cfd9d3;
  --muted: #93a39a; --line: #23332b; --brand: #2c6b51; --accent: #f0b43a; --accent-soft: #2a2412; --primary: #f0b43a;
  --primary-ink: #15110a; --land: #16231d; --land-stroke: #273a31; --route: #f0b43a; --route-halo: rgba(240, 180, 58, 0.25);
  --pin: #eef3ef; --rain: #7ea6e0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 14px 34px -14px rgba(0,0,0,.6); --shadow-lg: 0 30px 70px -28px rgba(0,0,0,.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--primary); color: var(--primary-ink); padding: 10px 14px; border-radius: 999px; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 22px; height: 22px; flex: none; }
.ico--sm { width: 18px; height: 18px; }
.ico--xs { width: 15px; height: 15px; }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; }
.rail, .stage { display: none; }
.pane { padding: calc(env(safe-area-inset-top) + 8px) 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 28px); max-width: 640px; margin: 0 auto; outline: none; }

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 248px minmax(420px, 470px) 1fr; height: 100dvh; overflow: hidden; }
  .rail { display: flex; flex-direction: column; gap: 22px; padding: 22px 16px; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; }
  .pane { max-width: none; margin: 0; height: 100dvh; overflow-y: auto; padding: 28px 28px 40px; border-right: 1px solid var(--line); }
  .stage { display: block; position: relative; background: var(--bg); overflow: hidden; }
  .tabbar { display: none !important; }
  .top { display: none; }
}

/* rail */
.rail__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 4px 8px; }
.rail__brand svg { width: 40px; height: 40px; }
.rail__brand b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.2rem; line-height: 1; }
.rail__brand small { display: block; font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.rail__nav { display: grid; gap: 4px; }
.rail__nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none; font-weight: 600; color: var(--ink-2); }
.rail__nav a:hover { background: var(--surface-2); }
.rail__nav a[aria-current="page"] { background: var(--primary); color: var(--primary-ink); }
.rail__foot { margin-top: auto; display: grid; gap: 12px; }

/* stage: the big map on desktop */
.stage__map { position: absolute; inset: 0; display: grid; place-items: center; padding: 40px; }
.stage__map svg { width: 100%; height: 100%; }
.stage__caption { position: absolute; left: 24px; right: 24px; bottom: 24px; display: flex; justify-content: center; pointer-events: none; }
.stage__caption > * { pointer-events: auto; }

/* ---------- mobile top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 14px; }
.top__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.top__brand svg { width: 34px; height: 34px; }
.top__brand b { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.top__actions { display: flex; gap: 8px; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.iconbtn:active { transform: scale(0.96); }
.back { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); padding: 8px 0; }

/* ---------- type ---------- */
.eyebrow { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
:root:not([data-theme="dark"]) .eyebrow { color: #a8740d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .eyebrow { color: var(--accent); } }
.h1 { font-family: var(--display); font-weight: 500; font-size: clamp(2.1rem, 8vw, 2.6rem); line-height: 1.04; letter-spacing: -0.015em; margin: 8px 0 10px; }
.h2 { font-size: 1.22rem; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.h3 { font-size: 1.02rem; font-weight: 700; margin: 0; }
.sub { color: var(--muted); margin: 0; }
.small { font-size: 0.86rem; }
.muted { color: var(--muted); }
.section { margin-top: 28px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--ink-2); }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow); border: 1px solid var(--line); }
.card--pad { padding: 18px; }
.card + .card { margin-top: 12px; }
.card--dark { background: #111915; color: #fff; border-color: #111915; }
:root[data-theme="dark"] .card--dark { background: var(--surface-3); border-color: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card--dark { background: var(--surface-3); border-color: var(--line); } }

/* where-to card */
.where { padding: 8px 8px 14px; }
.where__rows { position: relative; padding: 4px 8px; }
.where__row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 52px 12px 6px; text-align: left; border-radius: 16px; }
.where__row:hover { background: var(--surface-2); }
.where__row + .where__row { border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; }
.where__mark { width: 14px; display: grid; place-items: center; flex: none; }
.where__dot { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--accent); background: var(--surface); }
.where__pin { color: var(--ink); }
.where__line { position: absolute; left: 20px; top: 40px; bottom: 40px; width: 0; border-left: 2px dashed var(--line); }
.where__label { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.where__value { display: block; font-weight: 700; font-size: 1.04rem; }
.where__value.is-empty { color: var(--muted); font-weight: 500; }
.swap { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; box-shadow: var(--shadow); }
.swap:active { transform: translateY(-50%) scale(0.95); }
.where__block { padding: 12px 14px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.where__block + .where__block { margin-top: 12px; }
.blocklabel { display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; color: var(--muted); font-weight: 600; margin-bottom: 10px; }

/* day strip */
.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; margin: 0 -2px; scroll-snap-type: x proximity; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 58px; padding: 10px 0 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); display: grid; justify-items: center; gap: 2px; scroll-snap-align: start; }
.day small { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.day b { font-size: 1.2rem; font-weight: 700; }
.day[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.day[aria-pressed="true"] small { color: inherit; opacity: 0.75; }
.day--more { color: var(--ink-2); }

.inline { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 10px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; font-size: 0.94rem; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.chips::-webkit-scrollbar { display: none; }
.chips .chip, .months .month, .days .day { flex: none; }

.counter { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.counter__label { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-sm); }
.stepper button:disabled { opacity: 0.35; box-shadow: none; }
.stepper output { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.grid2--stack { grid-template-columns: 1fr; gap: 6px; }
@media (max-width: 480px) { .grid2--fields { grid-template-columns: 1fr; } }
@media (max-width: 380px) { .grid2 { grid-template-columns: 1fr; } }

.input { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); font-size: 1rem; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--route-halo); }
.input--icon { padding-left: 44px; }
.inputwrap { position: relative; }
.inputwrap .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 1.02rem; text-decoration: none; transition: transform 0.12s ease, opacity 0.2s; }
.btn:active { transform: scale(0.98); }
.btn[disabled], .btn.is-disabled { opacity: 0.4; pointer-events: none; }
.btn--primary { background: var(--primary); color: var(--primary-ink); }
.btn--wa { background: var(--wa); color: var(--wa-ink); }
.btn--ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }

/* quick destinations */
.quick { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 8px; margin: 0 -2px; }
.quick::-webkit-scrollbar { display: none; }
.qcard { flex: none; width: 132px; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-align: left; }
.qcard__img { aspect-ratio: 4 / 3; background: var(--surface-3); }
.qcard__img .tile { font-size: 0; }
.qcard__img img { width: 100%; height: 100%; object-fit: cover; }
.qcard__body { padding: 9px 11px 11px; }
.qcard__body b { display: block; font-size: 0.95rem; }
.qcard__body span { font-size: 0.8rem; color: var(--muted); }

/* promo cards */
.promos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.promo { border-radius: 24px; padding: 16px; min-height: 140px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; text-decoration: none; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.promo--dark { background: #111915; color: #fff; border-color: #111915; }
.promo .ico { width: 26px; height: 26px; }
.promo b { font-size: 1.04rem; display: block; }
.promo span { font-size: 0.84rem; opacity: 0.75; }

/* tile placeholders (no photo) */
.tile { position: relative; width: 100%; height: 100%; display: grid; place-items: end start; padding: 10px; color: #fff; font-family: var(--display); font-size: 1.15rem; line-height: 1.1; }
.tile--beach { background: linear-gradient(150deg, #3f8fa6, #1d5a6e); }
.tile--culture { background: linear-gradient(150deg, #b97f12, #7a4f0a); }
.tile--hills { background: linear-gradient(150deg, #3f7a55, #1f4d3a); }
.tile--wildlife { background: linear-gradient(150deg, #8a6a3a, #4f3a1d); }
.tile--city, .tile--airport, .tile--town { background: linear-gradient(150deg, #5d6670, #2f363d); }
.tile--adventure { background: linear-gradient(150deg, #2e7c8a, #164a54); }
.tile::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 100% 0%, rgba(255,255,255,0.18), transparent 60%); }

/* ---------- results ---------- */
.summary { padding: 16px 18px; display: grid; gap: 12px; }
.summary__route { display: grid; grid-template-columns: 16px 1fr; column-gap: 12px; row-gap: 2px; align-items: center; }
.summary__route .where__dot { width: 12px; height: 12px; }
.summary__route b { font-size: 1.05rem; }
.summary__route .vline { height: 18px; border-left: 2px dashed var(--line); margin-left: 6px; }
.stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; font-size: 0.92rem; }
.stat--accent { background: var(--accent-soft); border-color: transparent; }

.mapcard { border-radius: var(--r-xl); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); aspect-ratio: 4 / 3.2; display: grid; place-items: center; padding: 10px; }
.mapcard svg { width: 100%; height: 100%; }
@media (min-width: 1024px) { .mapcard { display: none; } }

.vehicles { display: grid; gap: 10px; }
.vehicle { display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 12px; padding: 12px 16px 12px 10px; border-radius: 22px; background: var(--surface); border: 1.5px solid var(--line); text-align: left; width: 100%; box-shadow: var(--shadow-sm); }
.vehicle[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px var(--route-halo), var(--shadow-sm); }
.vehicle__art { width: 112px; height: 58px; }
.vehicle__name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; }
.vehicle__meta { display: block; font-size: 0.84rem; color: var(--muted); }
.vehicle--noprice { grid-template-columns: 96px 1fr; }
.vehicle--noprice .vehicle__art { width: 96px; height: 50px; }
.vehicle__ask { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.8rem; font-weight: 700; color: var(--ok); }
.vehicle__price { text-align: right; font-weight: 700; }
.vehicle__price small { display: block; font-weight: 500; font-size: 0.75rem; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; background: var(--accent-soft); color: var(--ink); }
.badge--ok { background: rgba(31, 138, 82, 0.12); color: var(--ok); }
.badge--rain { background: rgba(61, 111, 180, 0.13); color: var(--rain); }
.badge--line { background: transparent; border: 1px solid var(--line); color: var(--muted); }

.driver { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 16px; }
.driver__photo { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--surface-3); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.driver__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.driver__name { font-weight: 700; font-size: 1.08rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.driver__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.86rem; color: var(--muted); margin-top: 2px; }
.driver__meta span { display: inline-flex; align-items: center; gap: 5px; }
.driver__note { grid-column: 1 / -1; font-size: 0.88rem; color: var(--ink-2); background: var(--surface-2); border-radius: 14px; padding: 10px 12px; }
.star { color: var(--accent); }

.trust { display: grid; gap: 10px; padding: 16px 18px; }
.trust__row { display: flex; gap: 12px; align-items: flex-start; font-size: 0.93rem; }
.trust__row .ico { color: var(--ok); margin-top: 1px; }

.cta { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 4px); margin: 18px -16px 0; padding: 22px 16px 8px; z-index: 5; background: linear-gradient(180deg, transparent 0%, var(--bg) 30%); }
.cta .btn { box-shadow: var(--shadow-lg); }
.cta__note { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 8px; }
@media (min-width: 1024px) { .cta { bottom: 0; margin: 18px -28px 0; padding: 22px 28px 18px; } }

/* ---------- planner ---------- */
.ctrl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px 18px; }
.ctrl > *, .grid2 > * { min-width: 0; }
.ctrl__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.months { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.months::-webkit-scrollbar { display: none; }
.month { flex: none; padding: 9px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 0.9rem; }
.month[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

.places { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 560px) and (max-width: 1023px) { .places { grid-template-columns: repeat(3, 1fr); } }
.place { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 1 / 1.08; text-align: left; background: var(--surface-3); box-shadow: var(--shadow-sm); isolation: isolate; }
.place img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.place .tile { position: absolute; inset: 0; font-size: 0; }
.place__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.72) 100%); }
.place__body { position: absolute; left: 12px; right: 12px; bottom: 11px; color: #fff; }
.place__body b { display: block; font-size: 1.02rem; line-height: 1.15; }
.place__body span { display: block; font-size: 0.76rem; opacity: 0.88; line-height: 1.3; margin-top: 3px; }
.place__check { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.88); color: #111915; border: 2px solid rgba(255,255,255,0.9); box-shadow: 0 0 0 1px rgba(17,25,21,0.22), 0 2px 8px rgba(0,0,0,0.25); }
.place__check .ico { opacity: 0; }
.place[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
.place[aria-pressed="true"] .place__check { background: var(--accent); border-color: var(--accent); }
.place[aria-pressed="true"] .place__check .ico { opacity: 1; }
.place__flag { position: absolute; top: 10px; left: 10px; }
.place[disabled] { opacity: 0.45; }

.timeline { position: relative; display: grid; gap: 0; padding: 6px 4px 0; }
.tl { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding-bottom: 18px; }
.tl::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; border-left: 2px dashed var(--line); }
.tl:last-child::before { display: none; }
.tl__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); }
.tl--drive .tl__icon { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.tl__day { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tl__title { font-weight: 700; font-size: 1.02rem; margin: 1px 0 3px; }
.tl__text { font-size: 0.9rem; color: var(--ink-2); }
.tl__notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--accent-soft); font-size: 0.92rem; }
.notice .ico { flex: none; margin-top: 1px; }
.notice--rain { background: rgba(61, 111, 180, 0.1); }
.notice + .notice { margin-top: 10px; }

/* ---------- my trip / help ---------- */
.empty { text-align: center; padding: 40px 18px 28px; }
.empty__art { width: 120px; height: 120px; margin: 0 auto 14px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; border: 1px solid var(--line); }
.empty__art .ico { width: 46px; height: 46px; color: var(--muted); }
.kv { display: grid; gap: 10px; }
.list { display: grid; }
.list__item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; text-align: left; width: 100%; }
.list__item + .list__item { border-top: 1px solid var(--line); }
.list__icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.list__icon--danger { background: rgba(194, 65, 45, 0.12); color: var(--danger); }
.list__main { flex: 1; min-width: 0; }
.list__main b { display: block; }
.list__main span { font-size: 0.86rem; color: var(--muted); }
.list__end { color: var(--muted); }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 14px 16px; }
.check + .check { border-top: 1px solid var(--line); }
.check__n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); font-weight: 700; font-size: 0.86rem; }
.check b { display: block; margin-bottom: 2px; }
.check p { margin: 0; font-size: 0.92rem; color: var(--ink-2); }
.check a { font-weight: 600; }
.sos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sos a { display: grid; justify-items: center; gap: 6px; padding: 16px 8px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; text-align: center; box-shadow: var(--shadow-sm); }
.sos a b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.sos a span { font-size: 0.78rem; color: var(--muted); line-height: 1.2; }
.sos a.sos--main { background: var(--danger); color: #fff; border-color: var(--danger); }
.sos a.sos--main span { color: rgba(255,255,255,0.85); }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 12px); z-index: 20; display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--surface); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.tabbar a { display: flex; align-items: center; gap: 8px; height: 52px; min-width: 52px; padding: 0 15px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 0.92rem; justify-content: center; }
.tabbar a span { display: none; }
.tabbar a[aria-current="page"] { background: var(--primary); color: var(--primary-ink); padding: 0 18px; }
.tabbar a[aria-current="page"] span { display: inline; white-space: nowrap; }
/* centred with left:50%, so the bar's shrink-to-fit width was capped at half the screen and long labels wrapped */
.tabbar { width: max-content; max-width: calc(100vw - 24px); }

/* ---------- bottom sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(8, 12, 10, 0.5); opacity: 0; transition: opacity 0.25s; }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh; overflow-y: auto; background: var(--surface); border-radius: 28px 28px 0 0; padding: 10px 18px calc(env(safe-area-inset-bottom) + 20px); transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: var(--shadow-lg); }
.sheet.is-open { pointer-events: auto; }
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet.is-open .sheet__panel { transform: none; }
.sheet__grab { width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: 2px auto 14px; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
@media (min-width: 720px) {
  .sheet__panel { left: 50%; right: auto; bottom: auto; top: 50%; width: 460px; max-height: 80dvh; border-radius: 28px; transform: translate(-50%, -46%) scale(0.98); opacity: 0; transition: transform 0.25s, opacity 0.2s; padding: 18px 20px 22px; }
  .sheet.is-open .sheet__panel { transform: translate(-50%, -50%); opacity: 1; }
  .sheet__grab { display: none; }
}
.picklist { display: grid; }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 14px; text-align: left; width: 100%; }
.pick:hover { background: var(--surface-2); }
.pick__img { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex: none; background: var(--surface-3); }
.pick__img img { width: 100%; height: 100%; object-fit: cover; }
.pick__img .tile { font-size: 0; padding: 0; }
.pick__text { flex: 1; min-width: 0; }
.pick__text b { display: block; color: var(--ink); }
.pick__text small { display: block; font-size: 0.84rem; color: var(--muted); line-height: 1.3; }
.pick__time { margin-left: auto; font-size: 0.8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.picklist__group { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 14px 6px 6px; }

.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal__dow { font-size: 0.74rem; font-weight: 700; color: var(--muted); padding: 6px 0; }
.cal__d { aspect-ratio: 1; border-radius: 50%; font-weight: 600; display: grid; place-items: center; }
.cal__d:hover { background: var(--surface-2); }
.cal__d[disabled] { opacity: 0.3; }
.cal__d[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
.times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.times button { padding: 12px 0; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums; }
.times button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 14px); transform: translate(-50%, -140%); opacity: 0; visibility: hidden; z-index: 60; background: var(--primary); color: var(--primary-ink); padding: 12px 18px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow-lg); transition: transform 0.3s; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- map ---------- */
.map .land { fill: var(--land); stroke: var(--land-stroke); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map .p-dot { fill: var(--muted); opacity: 0.45; }
/* route widths are set per render in map units (no non-scaling-stroke: it breaks the dash-draw animation in Chrome) */
.map .route-halo { fill: none; stroke: var(--route-halo); stroke-linecap: round; stroke-linejoin: round; }
.map .route { fill: none; stroke: var(--route); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s ease-out forwards; }
.map .stop { fill: var(--surface); stroke: var(--pin); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.map .stop--end { fill: var(--pin); }
.map .stop-n { fill: var(--pin); }
.map .stop-n-t { fill: var(--surface); font: 700 9px var(--sans); text-anchor: middle; dominant-baseline: central; }
.map .label { font: 700 9.5px var(--sans); fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.map .label--muted { font-weight: 500; fill: var(--muted); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .map .route { animation: none; stroke-dashoffset: 0; } .sheet__panel, .toast { transition: none; } }

.legend { display: inline-flex; gap: 14px; align-items: center; padding: 10px 16px; border-radius: 999px; background: var(--surface); background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 0.88rem; font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* install */
.install { display: grid; grid-template-columns: 42px 1fr 36px; gap: 12px; align-items: start; padding: 14px 16px; }
.install__text { font-size: 0.9rem; color: var(--ink-2); }
.install__text b { display: block; color: var(--ink); font-size: 1rem; }
.install__text .btn { margin-top: 10px; }

.fade-in { animation: fade 0.35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none; } }

/* desktop: the rail carries the brand, so the phone top bar goes */
@media (min-width: 1024px) { .pane .top { display: none; } .pane > .fade-in:first-child { padding-top: 4px; } }

/* booking flow screens: no tab bar, the call to action sits at the bottom */
.is-flow .tabbar { display: none; }
.is-flow .pane { padding-bottom: calc(env(safe-area-inset-bottom) + 16px); }
.is-flow .cta { bottom: 0; padding-bottom: calc(env(safe-area-inset-bottom) + 12px); }

/* Your stops: reorder by drag or arrows, nights per stop */
.stops { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.stop { display: grid; grid-template-columns: 26px 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 8px 10px 12px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.stop.is-dragging { transition: none; position: relative; z-index: 3; background: var(--surface); box-shadow: var(--shadow-lg); }
.stop__n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.stop__img { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; background: var(--surface-3); }
.stop__img picture { display: block; width: 100%; height: 100%; }
.stop__img img { width: 100%; height: 100%; object-fit: cover; }
.stop__img .tile { font-size: 0; padding: 0; }
.stop__main { min-width: 0; display: grid; gap: 6px; justify-items: start; }
.stop__main b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.stepper--sm { padding: 3px; gap: 2px; }
.stepper--sm button { width: 30px; height: 30px; }
.stepper--sm output { min-width: 0; padding: 0 6px; font-size: 0.86rem; white-space: nowrap; }
.stop__move { display: grid; justify-items: center; }
.stop__btn { width: 36px; height: 26px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-2); }
.stop__btn:disabled { opacity: 0.28; cursor: default; }
.stop__grip { width: 36px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); cursor: grab; touch-action: none; }
.stop__grip:active { cursor: grabbing; }
.is-sorting { -webkit-user-select: none; user-select: none; }
.is-sorting .stop:not(.is-dragging) { cursor: grabbing; }
.stops__status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 0.88rem; color: var(--ink-2); }
.stops__status .link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.stops__status--ok { color: var(--ok); }

/* Place search on the plan screen */
[hidden] { display: none !important; }
.inputwrap--clear .input { padding-right: 46px; }
.inputclear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.inputwrap .inputclear .ico { position: static; transform: none; }
/* A stop on the way (0 nights) */
.stop.is-pass { background: transparent; border-style: dashed; }
.badge--stop { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.badge--warn { background: rgba(196, 61, 47, 0.12); color: #b2382b; }
:root[data-theme="dark"] .badge--warn { color: #ff8a7a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge--warn { color: #ff8a7a; } }

/* Commission links (decisions.md 8 Oct 2026): labelled "Ad", quiet, never louder than a WhatsApp button */
.ad { display: inline-block; flex: none; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; line-height: 1.5; }
.stay { margin-top: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); padding: 11px 12px 12px; }
.stay__top { display: flex; align-items: center; gap: 8px; }
.stay__title { font-weight: 700; font-size: 0.9rem; }
.stay__meta { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.stay__links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; }
.plink { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 0.84rem; text-decoration: none; color: var(--ink); }
.plink .ico { color: var(--muted); width: 13px; height: 13px; }
.plink:hover { border-color: var(--muted); }
.discl { font-size: 0.78rem; color: var(--muted); margin: 12px 0 0; line-height: 1.45; }
.discl .ad { margin-right: 6px; vertical-align: 1px; }
.discl a { color: inherit; text-decoration: underline; }
.stays__row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 14px 16px; }
.stays__row + .stays__row { border-top: 1px solid var(--line); }
.stays__img { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.stays__img img, .stays__img .tile { width: 100%; height: 100%; object-fit: cover; display: block; font-size: 0.6rem; }
.stays__top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.stays__state { font-size: 0.78rem; font-weight: 700; color: var(--muted); white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.stays__state .ico { display: none; }
.stays__row.is-set .stays__state { color: var(--ok); }
.stays__row.is-set .stays__state .ico { display: inline-block; }
.stays__row.is-set .stay__links { display: none; }
.stays__input { margin-top: 8px; padding: 10px 12px; font-size: 16px; }
.check__head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.check__head b { margin: 0; }
.check__n--plus { background: var(--surface-2); }
.check .discl { font-size: 0.78rem; color: var(--muted); margin-top: 8px; }
.card > .discl:first-child { margin: 0 0 16px; }

/* The island map (9 Oct 2026): MapLibre in the desktop stage and the phone map cards; the SVG map is the fallback */
.stage__map .islandmap, .mapcard .islandmap { position: absolute; inset: 0; } /* beats .maplibregl-map { position: relative }, which loads later */
.stage__map.is-live { padding: 0; display: block; }
.mapcard.is-live { padding: 0; position: relative; display: block; }
.mapcard--plan { aspect-ratio: 4 / 3.6; }
.islandmap .maplibregl-ctrl-attrib { font-size: 11px; }
/* A town (sheet): photo, then the booking buttons first */
.town { margin: -10px -18px 0; }
.town__photo { height: 170px; overflow: hidden; border-radius: 28px 28px 0 0; }
.town__photo img, .town__photo picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.town__close { position: absolute; top: 16px; right: 16px; z-index: 1; }
.town__body { padding: 16px 18px 6px; }
.town__group { display: inline-flex; align-items: center; gap: 8px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.town__group i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.town__when { display: flex; align-items: center; gap: 7px; margin: 6px 0 0; font-weight: 600; font-size: 0.9rem; color: var(--ok); }
.town__book { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.town__book .btn, .town__book .plink { justify-content: center; padding: 12px 10px; font-size: 0.92rem; }
.town__note { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; margin: 12px 0 0; font-style: italic; }
.town__note span { display: block; font-style: normal; font-size: 0.78rem; color: var(--muted); margin-top: 6px; }
.town__note--pending { background: transparent; border: 1px dashed var(--line); color: var(--muted); font-style: normal; }
.town__picks { margin-top: 14px; }
.town__picks .h3 { margin: 0 0 8px; }
.town__picks ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.town__picks li { padding: 6px 11px; border-radius: 999px; background: var(--surface-2); font-size: 0.86rem; font-weight: 600; line-height: 1.3; }
.plink--main { background: var(--brand, #1f4d3a); border-color: var(--brand, #1f4d3a); color: #fff; }
.plink--main .ico { color: rgba(255, 255, 255, 0.8); }
button.plink { font: inherit; font-weight: 600; font-size: 0.84rem; cursor: pointer; }
button.stays__img { padding: 0; border: 0; cursor: pointer; }
.livemap { display: block; width: 100%; height: min(70dvh, 620px); border: 0; border-radius: 16px; background: var(--surface-2); }
@media (min-width: 1024px) { .sheet__panel .livemap { height: 70vh; } }
.town__drive { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; }

/* Live hotel and hostel prices in a town sheet (decisions.md 9 Oct 2026; rows drawn in app.js's partner block) */
.live { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.live__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.live__head .h3 { margin: 0; font-size: 1.05rem; }
.live__dates { display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; font-weight: 600; color: var(--ink-2); }
.live__example { margin: 6px 0 0; font-size: 0.8rem; color: var(--muted); }
.live__tabs { display: flex; gap: 4px; margin: 10px 0 4px; padding: 4px; background: var(--surface-2); border-radius: 999px; }
.live__tab { flex: 1; padding: 8px 10px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-weight: 600; font-size: 0.88rem; color: var(--ink-2); cursor: pointer; }
.live__tab small { color: var(--muted); font-weight: 600; margin-left: 2px; }
.live__tab.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.live__list { list-style: none; margin: 4px 0 0; padding: 0; }
.live .stayrow { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; border-radius: 10px; }
.live__list li:last-child .stayrow { border-bottom: 0; }
.live .stayrow:hover { background: var(--surface-2); }
.live .stayrow img, .live .stayrow__noimg { width: 60px; height: 50px; border-radius: 9px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.live .stayrow__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.live .stayrow__name { font-weight: 600; font-size: 0.9rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.live .stayrow__meta { font-size: 0.78rem; color: var(--muted); }
.live .score { display: inline-block; min-width: 26px; padding: 1px 5px; margin-right: 2px; border-radius: 6px 6px 6px 0; background: var(--ok); color: #fff; font-weight: 700; font-size: 0.74rem; text-align: center; }
.live .stayrow__price { text-align: right; display: flex; flex-direction: column; line-height: 1.2; }
.live .stayrow__price b { font-size: 0.98rem; }
.live .stayrow__price small { font-size: 0.72rem; color: var(--muted); }
.live .stayrow--ghost span { height: 50px; border-radius: 9px; background: var(--surface-2); }
.live .stayrow--ghost span + span { height: 14px; width: 70%; }
.live__more { display: block; width: 100%; margin-top: 8px; padding: 9px; border: 1px dashed var(--line); border-radius: 12px; background: none; font: inherit; font-weight: 600; font-size: 0.86rem; color: var(--ink-2); cursor: pointer; }
.live .discl { margin-top: 10px; }

/* "I agree" tick above the booking buttons (decisions.md 10 Nov 2026). A button with role=checkbox, not a native control. */
.agree { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; cursor: pointer; font-size: 0.88rem; color: var(--ink-2); }
.agree__box { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--muted); background: var(--surface); color: #fff; display: grid; place-items: center; padding: 0; cursor: pointer; }
.agree__box .ico { opacity: 0; }
.agree__box[aria-checked="true"] { background: var(--brand); border-color: var(--brand); }
.agree__box[aria-checked="true"] .ico { opacity: 1; }
.agree__box:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.agree__text a { color: inherit; font-weight: 700; text-underline-offset: 2px; }
.agree.is-error .agree__box { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(194, 65, 45, 0.2); }
.agree.is-error .agree__text { color: var(--danger); font-weight: 600; }
.cta:has(.agree) { padding-top: 30px; background: linear-gradient(180deg, transparent 0, var(--bg) 24px); }
