:root {
  --red: #c8102e; --red-d: #9e0b23; --ink: #1d1d1f; --muted: #6b6b72; --line: #e6e2dc; --bg: #faf7f2; --card: #fff; --surface: #fff;
  --warn-bg: #fff3dc; --warn-ink: #8a4b00; --ok-bg: #e3f6e8; --ok-ink: #1e6b33; --ai-bg: #f4efff; --ai-ink: #4b1fa3; --ai-line: #d9c9ff; --near-bg: #eefaf8; --link: #9e0b23; --inv-bg: #1d1d1f; --inv-ink: #fff;
  --c0: #e63946; --c1: #f08c00; --c2: #2a9d8f; --c3: #3a86ff; --c4: #8338ec; --c5: #d6336c; --c6: #2b8a3e; --c7: #0b7285; --c8: #a0522d; --c9: #5c7cfa;
  --grey: #9aa0a6;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "PingFang HK", "Noto Sans HK", sans-serif; color: var(--ink); background: var(--bg); padding-bottom: calc(64px + var(--safe-b)); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
small { font-size: .78em; color: var(--muted); font-weight: 400; }
a { color: var(--link); }

/* header */
.top { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; background: var(--red); color: #fff; }
.top h1 { margin: 0; font-size: 1.15rem; letter-spacing: .02em; }
.top h1 span { font-weight: 400; opacity: .85; }
.top h1 small { color: #ffd7dc; margin-left: 4px; }
.top-right { display: flex; align-items: center; gap: 8px; }
.top .chip { background: rgba(255,255,255,.18); color: #fff; border-color: transparent; }
.sync { font-size: .75rem; }
.sync.ok::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #7dff9c; }
.sync.pending { color: #ffe08a; }
.sync.off { background: var(--surface); color: var(--red); padding: 1px 7px; border-radius: 10px; font-weight: 600; }
.warnsum { font-size: .75rem; background: #ffe066; color: #000; padding: 2px 8px; border-radius: 10px; max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabs button { flex: 1; border: 0; background: none; padding: 7px 0 9px; font-size: .78rem; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; }
.tabs button span { font-size: 1.25rem; filter: grayscale(1); opacity: .7; }
.tabs button.on { color: var(--red); font-weight: 600; }
.tabs button.on span { filter: none; opacity: 1; }

main { max-width: 760px; margin: 0 auto; }
.view { padding: 0 0 16px; }

/* day strip */
.day-strip { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line); scrollbar-width: none; position: sticky; top: 46px; z-index: 900; }
.day-strip::-webkit-scrollbar { display: none; }
.day-chip { position: relative; flex: 0 0 auto; width: 54px; padding: 5px 0 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; align-items: center; cursor: pointer; line-height: 1.1; }
.day-chip .wd { font-size: .68rem; color: var(--muted); text-transform: uppercase; }
.day-chip .dn { font-size: 1.15rem; font-weight: 700; }
.day-chip .mo { font-size: .62rem; color: var(--muted); }
.day-chip .dot { margin-top: 3px; }
.day-chip .n { position: absolute; top: -5px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--inv-bg); color: var(--inv-ink); font-size: .68rem; display: grid; place-items: center; padding: 0 4px; }
.day-chip .fc { font-size: .62rem; color: var(--muted); margin-top: 2px; }
.day-chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.day-chip.on .wd, .day-chip.on .mo, .day-chip.on .fc { color: #ffd7dc; }
.day-chip.today { outline: 2px solid var(--ink); outline-offset: 1px; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; background: var(--grey); }
.dot.hotel { background: #222; box-shadow: 0 0 0 1.5px var(--muted); }
.c0 { --c: var(--c0); } .c1 { --c: var(--c1); } .c2 { --c: var(--c2); } .c3 { --c: var(--c3); } .c4 { --c: var(--c4); }
.c5 { --c: var(--c5); } .c6 { --c: var(--c6); } .c7 { --c: var(--c7); } .c8 { --c: var(--c8); } .c9 { --c: var(--c9); }
.grey { --c: var(--grey); }
.dot[class*=" c"], .dot.grey { background: var(--c); }

/* day head */
.day-head { padding: 12px 14px 6px; }
.day-head h2 { margin: 0 0 6px; font-size: 1.2rem; }
.day-head h2 small { margin-left: 6px; }
.day-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.meta { font-size: .82rem; color: var(--muted); }
.warn { margin: 6px 0; padding: 8px 10px; background: var(--warn-bg); border-left: 4px solid #f08c00; border-radius: 6px; font-size: .86rem; }
#dayNote { width: 100%; border: 1px dashed var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; resize: none; min-height: 38px; }
#dayNote:focus { outline: 2px solid var(--red); border-style: solid; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .8rem; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--inv-bg); color: var(--inv-ink); border-color: var(--ink); }

/* maps */
.mini-map { height: 230px; margin: 4px 14px 10px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); z-index: 1; }
.big-map { height: calc(100vh - 46px - 54px - 64px - var(--safe-b)); height: calc(100dvh - 46px - 54px - 64px - var(--safe-b)); z-index: 1; }
.map-tools { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.map-tools select { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.legend { font-size: .78rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.pin { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c, var(--grey)); color: #fff; font-size: .78rem; font-weight: 700; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.pin.grey { font-size: .8rem; }
.pin.hotel { background: #222; font-size: .85rem; }
.pin.done { opacity: .45; }
.pin.approx { border-style: dashed; }
.dayroute { stroke: var(--c); }
.pop { min-width: 180px; font-size: .9rem; }
.pop-btns { display: flex; gap: 6px; margin-top: 8px; }

/* day list */
.day-list { list-style: none; margin: 0; padding: 0 14px; }
.card { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 4px; margin: 0; }
.card.done .t { text-decoration: line-through; color: var(--muted); }
.card.sortable-ghost { opacity: .4; }
.handle { cursor: grab; color: var(--muted); padding: 8px 2px 8px 6px; touch-action: none; user-select: none; letter-spacing: -2px; }
.num { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.body { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 2px 0; cursor: pointer; display: flex; flex-direction: column; }
.body .t { font-weight: 600; font-size: .95rem; }
.body .s { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.time { background: var(--inv-bg); color: var(--inv-ink); border-radius: 6px; padding: 0 5px; font-size: .78rem; }
.ico { flex: 0 0 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; text-decoration: none; color: var(--ink); cursor: pointer; font-size: 1rem; }
.tick { color: #2b8a3e; font-weight: 700; }
.hop { list-style: none; font-size: .75rem; color: var(--muted); padding: 3px 0 3px 52px; position: relative; }
.hop::before { content: ""; position: absolute; left: 30px; top: 0; bottom: 0; border-left: 2px dotted var(--line); }
.empty { color: var(--muted); padding: 10px 16px; text-align: center; }

.nearby { margin: 18px 14px 0; }
.nearby h3 { font-size: 1rem; margin: 0 0 6px; }

/* ideas */
.ideas-tools { display: flex; gap: 8px; padding: 12px 12px 6px; position: sticky; top: 46px; z-index: 900; background: var(--bg); }
#search { flex: 1; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.cat-chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 12px 6px; scrollbar-width: none; }
.toggle { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--muted); padding: 4px 14px; }
.group { margin: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.group summary { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; cursor: pointer; font-weight: 700; list-style: none; }
.group summary::-webkit-details-marker { display: none; }
.group summary::after { content: "▾"; color: var(--muted); margin-left: 8px; }
.group:not([open]) summary::after { content: "▸"; }
.g-name { flex: 1; }
.g-name span { font-weight: 400; color: var(--muted); font-size: .9em; }
.g-count { font-size: .75rem; color: var(--muted); font-weight: 400; }
.g-meta { margin: -4px 14px 6px; font-size: .78rem; color: var(--muted); }
.idea-list { list-style: none; margin: 0; padding: 0; }
.idea { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-top: 1px solid var(--line); }
.nearby .idea { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; }
.idea.planned .t { color: var(--muted); }
.daytag { border: 0; border-radius: 999px; padding: 3px 9px; background: var(--c, var(--grey)); color: #fff; font-size: .75rem; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; }
.btn.small { padding: 5px 10px; font-size: .8rem; white-space: nowrap; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger { color: var(--red); }

/* sheet */
.sheet { border: 0; padding: 0; width: 100%; max-width: 560px; max-height: 88vh; margin: auto auto 0; border-radius: 18px 18px 0 0; background: var(--surface); }
@media (min-width: 700px) { .sheet { margin: auto; border-radius: 18px; } }
.sheet::backdrop { background: rgba(0,0,0,.4); }
#sheetBody { padding: 16px 16px calc(16px + var(--safe-b)); position: relative; }
.sheet-close { position: absolute; top: 8px; right: 8px; border: 0; background: var(--bg); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.sheet h3 { margin: 4px 40px 10px 0; font-size: 1.05rem; font-weight: 500; }
.sheet label { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; color: var(--muted); margin: 8px 0; }
.sheet label.toggle { flex-direction: row; padding: 0; }
.sheet input:not([type=checkbox]), .sheet select, .sheet textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 1rem; width: 100%; }
.title-in { font-weight: 700; font-size: 1.1rem !important; margin-right: 40px; width: calc(100% - 40px) !important; }
.eyebrow { margin: 0 40px 6px 0; font-size: .78rem; color: var(--muted); }
.zh { margin: 4px 0; font-size: 1.05rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.sheet-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
.sheet-actions .primary { flex: 1; }
.pick-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.pick { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; }
.pick.on { border-color: var(--ink); background: var(--bg); }
.pick.near { border-color: #2a9d8f; background: var(--near-bg); }
.pick .pd { font-weight: 600; width: 92px; flex: 0 0 auto; }
.pick .pa { flex: 1; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: .7rem; background: #2a9d8f; color: #fff; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.who-btns { display: flex; gap: 10px; }
.who-btns .btn { flex: 1; }

.toast { position: fixed; left: 50%; bottom: calc(76px + var(--safe-b)); transform: translateX(-50%); background: var(--inv-bg); color: var(--inv-ink); padding: 8px 16px; border-radius: 999px; font-size: .88rem; z-index: 2000; }

/* login */
body.login { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: linear-gradient(160deg, #c8102e, #7a0a1c); }
.login-card { width: 100%; max-width: 340px; background: var(--surface); border-radius: 20px; padding: 28px 24px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 8px; }
.login-logo { width: 64px; height: 64px; margin: 0 auto; border-radius: 16px; background: var(--red); color: #fff; font-size: 2.1rem; display: grid; place-items: center; font-weight: 700; }
.login-card h1 { margin: 6px 0 0; }
.login-card h1 span { color: var(--red); }
.login-card p { margin: 0 0 8px; color: var(--muted); }
.login-card label { text-align: left; font-size: .85rem; color: var(--muted); }
.login-card input { padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 1rem; }
.login-card .btn { padding: 11px; margin-top: 4px; }
.err { color: var(--red); min-height: 1.2em; }

.map-offline::after { content: "Map unavailable offline"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .85rem; pointer-events: none; }

/* Today */
.next-card { margin: 4px 14px 10px; padding: 14px; background: var(--surface); border: 2px solid var(--red); border-radius: 16px; }
.next-card.empty { border-color: var(--line); color: var(--muted); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.next-card h3 { margin: 2px 0 4px; font-size: 1.15rem; }
.next-card .notes { font-size: .85rem; color: var(--ink); background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.eyebrow { margin: 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--red); font-weight: 700; }
.today-actions { display: flex; gap: 8px; padding: 0 14px 10px; }
.today-actions .btn { flex: 1; }
.card.slim { margin-bottom: 6px; padding-left: 10px; }
.note { margin: 4px 0; padding: 6px 10px; background: var(--surface); border-radius: 10px; border: 1px dashed var(--line); font-size: .88rem; }
.panel { margin: 12px 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.panel h3 { margin: 0 0 6px; font-size: 1rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.panel h3 select { font-size: .9rem; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.tlabel { margin: 8px 0 2px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.tlist { list-style: none; margin: 0; padding: 0; }
.tlist li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.tlist li:first-child { border-top: 0; }
.route { min-width: 44px; text-align: center; background: var(--inv-bg); color: var(--inv-ink); border-radius: 6px; padding: 1px 6px; font-size: .82rem; }
.dest { flex: 1; }
.when { font-weight: 700; color: var(--red-d); white-space: nowrap; }
.center { text-align: center; }
.pad { padding: 8px 12px; }

/* badges */
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.ai { background: var(--ai-bg); color: var(--ai-ink); }
.s .badge { margin-top: 2px; display: inline-block; }

/* item sheet extras */
.fs { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 10px 0; }
.fs legend { font-size: .85rem; font-weight: 600; padding: 0 4px; }
.daychips { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { flex-direction: row !important; margin: 0 !important; }
.chk input { position: absolute; opacity: 0; }
.chk span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; color: var(--ink); cursor: pointer; }
.chk input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.chk input:focus-visible + span { outline: 2px solid var(--ink); }

/* Mistral */
.btn.ai { background: var(--ai-bg); border-color: var(--ai-line); color: var(--ai-ink); }
#fillBtn { margin: 6px 0 8px; width: 100%; }
.ai-summary { background: var(--ai-bg); border-radius: 10px; padding: 8px 10px; font-size: .9rem; }
.ai-list { list-style: none; margin: 0; padding: 0; }
.ai-pick { display: flex; gap: 8px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.ai-pick .body { cursor: default; }
.ai-pick .why { font-size: .84rem; margin-top: 3px; }
.ai-pick.added { opacity: .55; }
.ai-btns { display: flex; flex-direction: column; gap: 6px; }
.spin { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; } }

/* Google hours / sources */
.gp-res { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin: 8px 0; font-size: .88rem; }
.gp-res.added { opacity: .6; }
.wk { margin: 6px 0; padding-left: 18px; font-size: .8rem; color: var(--muted); }
.src { display: block; font-size: .78rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
li.added { opacity: .6; }

/* ---------- dark theme: automatic (phone setting) unless Light is chosen, or forced with Dark ---------- */
:root[data-theme="dark"] { --bg: #121215; --surface: #1d1d22; --card: #1d1d22; --ink: #ececf1; --muted: #a6a6b0; --line: #34343c;
    --warn-bg: #3a2a12; --warn-ink: #ffcf8a; --ok-bg: #133420; --ok-ink: #9be3b1; --ai-bg: #272040; --ai-ink: #cdbcff; --ai-line: #4b3b78; --near-bg: #0f302b;
    --link: #ff8a9b; --red-d: #ff8a9b; --inv-bg: #e8e8ee; --inv-ink: #121215; color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #121215; --surface: #1d1d22; --card: #1d1d22; --ink: #ececf1; --muted: #a6a6b0; --line: #34343c;
    --warn-bg: #3a2a12; --warn-ink: #ffcf8a; --ok-bg: #133420; --ok-ink: #9be3b1; --ai-bg: #272040; --ai-ink: #cdbcff; --ai-line: #4b3b78; --near-bg: #0f302b;
    --link: #ff8a9b; --red-d: #ff8a9b; --inv-bg: #e8e8ee; --inv-ink: #121215; color-scheme: dark; } }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--surface); color: var(--ink); border-bottom-color: var(--line); }
.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--muted); }
.leaflet-container { background: var(--bg); }
.tabs { background: var(--surface); }

/* ---------- bigger tap targets ---------- */
.chip { min-height: 34px; padding: 5px 12px; }
.cat-chips .chip { min-height: 40px; padding: 8px 14px; font-size: .85rem; }
.top .chip { min-height: 34px; padding: 4px 14px; }
.btn.small { min-height: 38px; padding: 7px 12px; }
.daytag { min-height: 34px; padding: 6px 12px; }
.toggle { min-height: 40px; }
.toggle input, .sheet input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--red); }
.chk span { padding: 8px 12px; min-width: 48px; text-align: center; display: inline-block; }
.ico { flex-basis: 40px; height: 40px; }

/* segmented controls (bus direction, appearance) */
.seg { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 4px 0 6px; }
.seg button { flex: 1; min-height: 38px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 600; font-size: .85rem; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* item sheet: folding sections */
details.fs > summary { cursor: pointer; font-weight: 600; font-size: .9rem; padding: 6px 0; list-style: none; min-height: 32px; }
details.fs > summary::-webkit-details-marker { display: none; }
details.fs > summary::after { content: " ▾"; color: var(--muted); }
details.fs:not([open]) > summary::after { content: " ▸"; }

/* toast with undo */
.toast { display: flex; align-items: center; gap: 12px; }
#toastUndo { border: 0; background: none; color: var(--inv-ink); font-weight: 700; text-decoration: underline; cursor: pointer; padding: 6px 4px; font-size: .9rem; }

/* maps */
.pin.cluster { width: 32px; height: 32px; background: var(--inv-bg); color: var(--inv-ink); font-size: .85rem; }
.recentre { width: 30px; height: 30px; line-height: 30px; text-align: center; font-size: 18px; text-decoration: none; display: block; background: var(--surface); color: var(--ink); border-radius: 4px; }
.map-tools select { min-height: 38px; color: var(--ink); background: var(--surface); }
.route.lr { background: #f08c00; color: #fff; }

/* trip overview */
.strip-wrap { display: flex; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 46px; z-index: 900; }
.strip-wrap .day-strip { position: static; border-bottom: 0; flex: 1; min-width: 0; padding-left: 6px; }
.ov-btn { flex: 0 0 auto; margin: 10px 0 10px 12px; width: 58px; border: 1px dashed var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 1.1rem; cursor: pointer; }
.ov-btn span { font-size: .62rem; color: var(--muted); }
.ov-btn.on { background: var(--red); border: 1px solid var(--red); color: #fff; }
.ov-btn.on span { color: #ffd7dc; }
#overview { padding: 10px 12px 20px; }
.ov-sum { margin: 2px 4px 10px; font-size: .9rem; }
.ov-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ov-day { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 56px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.ov-day.empty { border-style: dashed; background: var(--bg); }
.ov-day.today { outline: 2px solid var(--ink); }
.ov-date { flex: 0 0 92px; font-size: .9rem; }
.ov-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ov-areas { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-areas.muted { color: var(--muted); font-weight: 400; font-style: italic; }
.ov-flags { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; max-width: 40%; font-size: .85rem; }
.ov-wx { font-size: .75rem; color: var(--muted); white-space: nowrap; }

/* taxi card */
.taxi { position: fixed; inset: 0; z-index: 3000; background: #fffbe6; color: #111; display: grid; place-items: center; padding: 20px; overflow: auto; }
.taxi-in { max-width: 640px; width: 100%; text-align: center; }
.taxi-ask { font-size: 1.6rem; margin: 6px 0; color: #444; }
.taxi-name { font-size: 2.6rem; font-weight: 800; margin: 10px 0; line-height: 1.2; }
.taxi-addr { font-size: 1.7rem; font-weight: 600; margin: 10px 0 18px; line-height: 1.35; }
.taxi-en { font-size: .95rem; color: #555; margin: 18px 0; }
.taxi .btn { background: #fff; color: #111; border-color: #ccc; min-width: 140px; }

/* expandable departures */
.tlist li.ride { display: block; padding: 0; }
.ride-row { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 0; min-height: 44px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.chev { color: var(--muted); width: 14px; text-align: center; }
.ride-stops { padding: 2px 0 10px 6px; }
.stoplist { list-style: none; margin: 4px 0 10px; padding: 0 0 0 14px; border-left: 3px solid var(--line); font-size: .86rem; }
.stoplist li { position: relative; padding: 3px 0 3px 8px; }
.stoplist li::before { content: ""; position: absolute; left: -20px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.stoplist li.board::before, .stoplist li.here::before { background: var(--red); border-color: var(--red); }
.stoplist li.dest::before { background: #2b8a3e; border-color: #2b8a3e; }
.stoplist li.passed { color: var(--muted); }
.stoplist li.passed::before { background: var(--muted); }
.stopbtn { width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: 8px 4px; min-height: 40px; cursor: pointer; border-radius: 8px; }
.stopbtn:hover, .stopbtn.hint { background: var(--near-bg); }
.journey-list li.here .stopbtn { font-weight: 700; }
.journey-list li.dest .stopbtn { font-weight: 700; }

/* journey banner */
.journey { position: sticky; top: 46px; z-index: 950; display: flex; align-items: stretch; background: #1e6b33; color: #fff; }
.journey.getoff { background: #d9480f; animation: flash 1.2s ease-in-out infinite; }
@keyframes flash { 50% { background: #9c2f00; } }
.journey.arrived { background: var(--red); }
.j-main { flex: 1; display: flex; gap: 10px; align-items: center; background: none; border: 0; color: inherit; font: inherit; text-align: left; padding: 10px 14px; cursor: pointer; min-height: 56px; }
.j-ico { font-size: 1.5rem; }
.j-txt { display: flex; flex-direction: column; line-height: 1.25; }
.j-txt small { color: rgba(255,255,255,.85); }
.j-end { border: 0; background: rgba(0,0,0,.15); color: #fff; width: 48px; font-size: 1.1rem; cursor: pointer; }
body.has-journey .strip-wrap, body.has-journey .ideas-tools { top: 102px; }
