:root {
  --bg: #e9ebf0;            /* page (slightly grey so white cards/header read as raised) */
  --ink: #16202b;
  --ink-soft: #5d6b7a;
  --ink-faint: #67727f;     /* darkened for WCAG AA on white (was #94a3b2 ~2.7:1) */
  --card: #fff;             /* cards, sheets, header */
  --hdr: rgba(255,255,255,.82);
  --fill: #eef1f5;          /* subtle fills: progress tracks, thumbnails, chips */
  --tint: #fff3e2;          /* soft orange tint */
  --line: #e2e6ec;
  --navy: #0d1b2a;
  --navy2: #16304d;
  --accent: #ff9500;        /* fills, dots, active states, icon */
  --accent-ink: #b86b09;    /* orange text on white (contrast-safe) */
  --accent-btn: #ec7a08;    /* filled buttons (white text) */
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --tab-h: 46px;
  --c-food: #e0871a;
  --c-attraction: #6d56e0;
  --c-transport: #3b82f6;
  --c-accommodation: #0fa371;
  --c-airfare: #0a8bd0;
  --c-shopping: #db4f86;
  --c-match: #e0532f;
  --c-other: #6b7280;
}
/* Dark = a shade lighter than before; switched ON/OFF by the data-theme set in JS
   (time-based: light 8am-6pm, dark otherwise) rather than the system preference. */
:root[data-theme="dark"] {
  --bg: #282c34; --card: #363b45; --hdr: rgba(54,59,69,.86); --fill: #454b57; --tint: rgba(255,149,0,.18);
  --ink: #f3f5f8; --ink-soft: #bcc4d0; --ink-faint: #a3acb8; --line: rgba(255,255,255,.14);
  --accent-ink: #ffb454; --accent-btn: #ff9f0a;
  --c-attraction: #8b7bf0; --c-transport: #5b9bf5;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  padding-bottom: calc(var(--tab-h) + var(--sb));
}
h1,h2,h3,h4 { margin: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
#main { max-width: 720px; margin: 0 auto; }
.view { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

/* ---------- Day header ---------- */
.day-head {
  position: sticky; top: 0; z-index: 20;
  background: var(--hdr); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); color: var(--ink);
  border-bottom: .5px solid var(--line); box-shadow: 0 2px 12px rgba(16,32,51,.07);
  padding: calc(var(--st) + 8px) 10px 9px;
}
.dh-row { display: flex; align-items: center; gap: 9px; }
.dh-nav { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--fill); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.dh-nav:active { transform: scale(.9); background: #dfe2e7; }
.dh-nav:disabled { opacity: .3; }
.dh-center { flex: 1; min-width: 0; text-align: left; background: none; color: var(--ink); padding: 2px 0; }
.dh-city { display: flex; align-items: center; gap: 5px; font-size: 19px; font-weight: 800; line-height: 1.12; letter-spacing: -.2px; min-width: 0; }
.dh-city > :first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dh-city .ic { opacity: .5; flex: none; }
.dh-time { font-variant-numeric: tabular-nums; }
.dh-sub { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* dual-timezone clocks (home SGT + current geo), shared by both headers */
.clocks { flex: none; display: flex; flex-direction: column; gap: 1px; align-items: flex-end; }
.clk-row { display: flex; align-items: baseline; gap: 6px; line-height: 1.25; }
.clk-lbl { font-size: 9.5px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; color: var(--ink-faint); }
.clk-t { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.clk-row.here .clk-lbl { color: var(--accent-ink); }
.clk-row.here .clk-t { color: var(--ink); font-weight: 800; }
.day-highlight { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; color: var(--ink-faint); margin: 9px 12px 0; }
.day-highlight .ic { color: #d98a00; }
.day-highlight span { font-weight: 600; }
.tonight-acts { display: flex; gap: 8px; margin-top: 13px; }
.tonight-acts .btn { flex: 1; background: var(--fill); color: var(--accent-ink); }
.tn-thumb { width: 100%; height: 110px; object-fit: cover; border-radius: 11px; margin-bottom: 12px; background: var(--fill); display: block; }
.tn-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; }
.tn-ic { flex: none; color: var(--ink-faint); line-height: 0; margin-top: 1px; }
.tn-main { min-width: 0; flex: 1; }
.tn-name { font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.tn-name.sm { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.tn-name.sm b { color: var(--ink); font-weight: 800; }
.tn-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.tn-sub .ic { color: var(--ink-faint); flex: none; }
.tn-book { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; margin-top: 12px; padding: 11px 12px; background: var(--tint); border: 1.5px solid var(--line); border-radius: 12px; color: var(--accent-ink); }
.tn-book .tn-ic { color: var(--accent-ink); margin-top: 0; }
.tn-book-l { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; font-weight: 800; }
.tn-book-l small { font-size: 11px; font-weight: 600; color: var(--ink-soft); margin-top: 1px; }
.tn-book > .ic { flex: none; }
.tn-book:active { transform: scale(.99); }
.tn-divider { height: 1px; background: var(--line); margin: 14px 0 2px; }
.tn-warn { color: var(--accent-ink); font-weight: 700; margin-top: 9px; font-size: 12.5px; display: flex; align-items: center; gap: 5px; }
.tn-warn .ic { flex: none; }

/* ---------- window-shopping ---------- */
.shopchip { display: inline-flex; align-items: center; gap: 3px; color: var(--c-shopping); font-weight: 800; }
.leg-shop { display: inline-flex; align-items: center; gap: 3px; color: var(--c-shopping); font-weight: 800; font-size: 11.5px; flex: none; }
.leg-book { display: inline-flex; align-items: center; gap: 3px; color: var(--accent-ink); font-weight: 800; font-size: 11px; flex: none; background: var(--tint); border: .5px solid var(--line); padding: 2px 7px; border-radius: 99px; }
.leg-book:active { transform: scale(.94); }
/* time-critical flag (e.g. tour pickup) */
.alertchip { display: inline-flex; align-items: center; gap: 3px; flex: none; background: var(--accent-btn); color: #fff; font-weight: 800; font-size: 11px; padding: 2px 8px; border-radius: 99px; }
.alert-banner { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 11px 13px; background: var(--tint); border-left: 4px solid var(--accent-btn); border-radius: 10px; color: var(--accent-ink); font-weight: 700; font-size: 13.5px; line-height: 1.4; }
.alert-banner .ic { flex: none; color: var(--accent-btn); }
/* ---- bookings / check-in docs ---- */
.bookchip { display: inline-flex; align-items: center; gap: 3px; color: var(--accent-ink); font-weight: 800; }
.bookchip.tap { background: var(--tint); border: .5px solid var(--line); padding: 2px 8px; border-radius: 99px; }
.bookchip.tap:active { transform: scale(.94); }
.bookblock { margin-top: 16px; }
.bookblock h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-faint); margin-bottom: 9px; display: flex; align-items: center; gap: 5px; }
.book-open { width: 100%; background: var(--tint); color: var(--accent-ink); border: 1.5px solid var(--line); }
/* ---- food: must-try dishes + verdict ---- */
.foodchip { display: inline-flex; align-items: center; gap: 3px; color: var(--c-food); font-weight: 800; }
.foodblock { margin-top: 16px; }
.food-h { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-faint); margin-bottom: 4px; display: flex; align-items: center; gap: 5px; font-weight: 800; }
.dish { display: flex; align-items: baseline; gap: 12px; padding: 8px 1px; border-bottom: .5px solid var(--line); }
.food-h + .dish { border-top: .5px solid var(--line); }
.dn { flex: 1; font-size: 14px; color: var(--ink); font-weight: 600; line-height: 1.3; }
.dp { flex: none; font-size: 13px; font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.food-pricing { font-size: 12.5px; color: var(--ink-soft); margin-top: 9px; display: flex; align-items: center; gap: 6px; }
.food-pricing .ic { color: var(--ink-faint); flex: none; }
.verdict { margin-top: 14px; background: var(--fill); border-radius: 12px; padding: 11px 13px; }
.verdict-h { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent-ink); font-weight: 800; display: flex; align-items: center; gap: 5px; }
.verdict p { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); margin: 7px 0 0; }
.verdict .verdict-note { color: var(--accent-ink); font-weight: 600; display: flex; gap: 6px; align-items: flex-start; }
.verdict .verdict-note .ic { flex: none; margin-top: 2px; }
body.noscroll { overflow: hidden; }
.docview { position: fixed; inset: 0; z-index: 120; background: rgba(8,12,20,.92); display: flex; flex-direction: column; }
.dv-head { display: flex; align-items: center; gap: 10px; padding: calc(var(--st) + 10px) 14px 10px; }
.dv-title { flex: 1; color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-head .round-btn { background: rgba(255,255,255,.16); color: #fff; flex: none; }
.dv-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.dv-pdf { width: 100%; height: 100%; border: 0; background: #fff; }
.dv-gallery { display: flex; flex-direction: column; gap: 12px; padding: 6px 12px calc(20px + var(--sb)); }
.dv-gallery img { width: 100%; border-radius: 12px; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.4); }

.shopblock { margin-top: 14px; }
.shopblock h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-faint); margin-bottom: 9px; display: flex; align-items: center; gap: 5px; }
.shop-dir { margin: 4px 0 12px; }
.outlet-meta { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 12px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.outlet-meta div { display: flex; gap: 7px; align-items: flex-start; }
.outlet-meta .ic { flex: none; margin-top: 2px; color: var(--ink-faint); }
.store-list { border-top: .5px solid var(--line); }
.store { border-bottom: .5px solid var(--line); }
.store-hd { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 11px 2px; }
.store-hd > .ic { margin-left: auto; color: var(--ink-faint); transition: transform .2s; }
.store-hd.open > .ic { transform: rotate(180deg); }
.plan { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 3px 7px; border-radius: 6px; flex: none; }
.plan.buy { background: #e6f5ee; color: #0b7a52; }
.plan.cmp { background: var(--tint); color: var(--accent-ink); }
.plan.browse, .plan.visit { background: var(--fill); color: var(--ink-soft); }
.plan.no-acc { background: #fdeceb; color: #d4493f; }
.opt-addr { display: flex; align-items: center; gap: 4px; color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.opt-addr .ic:first-child { flex: none; }
.opt-note { color: var(--ink-faint); }
/* "Where to eat" option rows: name on top, key facts (rating · reviews · price) below */
.eat .store-hd { align-items: center; gap: 10px; padding: 11px 2px; }
.eat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.eat-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.eat-nm { font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.eat-tag { flex: none; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--accent-ink); background: var(--tint); border: .5px solid var(--line); padding: 2px 6px; border-radius: 5px; }
.eat-facts { font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.eat-facts .ic { color: #e0a017; vertical-align: -2px; }
.eat-facts b { color: var(--ink); font-weight: 700; }
.eat-facts .dim { color: var(--ink-faint); }
.eat-facts .dot { color: var(--ink-faint); margin: 0 1px; }
.lng-verdict { font-size: 13px; line-height: 1.5; color: var(--ink-soft); margin: 2px 0 11px; }
.lng-tip { margin-top: 12px; }
.lng-noacc { font-size: 11.5px; line-height: 1.45; color: var(--ink-faint); margin: 10px 0 0; }
.store-nm { flex: 1; font-size: 14.5px; font-weight: 600; min-width: 0; color: var(--ink); }
.newtag { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; color: #fff; background: var(--accent); padding: 1px 5px; border-radius: 5px; vertical-align: 1px; margin-left: 2px; }
.store-body { padding: 0 2px 13px; }
.sd { font-size: 13px; color: var(--ink-soft); margin: 7px 0 0; line-height: 1.5; }
.sd b { color: var(--ink); font-weight: 700; }
.sd.tip { background: var(--fill); border-radius: 9px; padding: 8px 10px; }
.store-nav { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--accent-ink); text-decoration: none; }

/* ---------- pinned day route link ---------- */
.daycard { margin: 12px 12px 0; }
.route-btn { display: flex; align-items: center; gap: 10px; margin: 0 0 7px; padding: 12px 16px; background: var(--accent-btn); color: #fff; border-radius: 14px; font-size: 15px; font-weight: 800; text-decoration: none; border-top: 1px solid rgba(255,255,255,.22); box-shadow: 0 4px 0 rgba(0,0,0,.20), 0 9px 18px rgba(236,122,8,.34); transition: transform .06s, box-shadow .06s; }
.route-btn span { flex: 1; }
.route-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.20), 0 3px 8px rgba(236,122,8,.30); }
.route-extra { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 12px 0; }
.route-extra a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--tint); border: .5px solid var(--line); padding: 5px 8px 5px 9px; border-radius: 99px; text-decoration: none; max-width: 100%; }
.route-extra .rx-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.route-extra .rx-k { flex: none; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #fff; background: var(--accent-btn); padding: 1px 5px; border-radius: 5px; }
.route-extra a > .ic:last-child { color: var(--ink-faint); flex: none; }

/* ---------- Big plan ---------- */
.bigplan { background: var(--card); margin: 12px 12px 0; border-radius: 16px; padding: 13px 15px; box-shadow: 0 1px 3px rgba(16,32,51,.06); }
.bigplan .k { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-faint); font-weight: 800; }
.bigplan .h { display: flex; align-items: center; gap: 9px; margin-top: 4px; }
.bigplan .h .ic { font-size: 22px; }
.bigplan .h h2 { font-size: 18px; font-weight: 800; line-height: 1.2; }
.bigplan .stats { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 8px; font-size: 12.5px; color: var(--ink-soft); }
.bigplan .stats b { color: var(--ink); }

/* ---------- Wake bar ---------- */
.wakebar { margin: 10px 12px 0; display: flex; gap: 8px; }
.wakebar .wb { flex: 1; background: var(--card); border-radius: 12px; padding: 9px 12px; display: flex; align-items: center; gap: 8px; box-shadow: 0 1px 2px rgba(16,32,51,.05); }
.wakebar .wb .lab { font-size: 11px; color: var(--ink-faint); font-weight: 700; }
.wakebar .wb .val { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wakebar .wb .em { font-size: 18px; }

/* ---------- Now banner ---------- */
.nowban { margin: 12px 12px 0; border-radius: 16px; padding: 14px 15px; background: var(--card); border: .5px solid var(--line); color: var(--ink); box-shadow: 0 1px 3px rgba(16,32,51,.06); }
.nowban .k { font-size: 11.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; display: flex; align-items: center; gap: 7px; color: var(--ink-faint); }
.nowban.live .k { color: #0e9f6e; }
.nowban.late .k { color: #d4493f; }
.nowban.leave .k { color: var(--accent-ink); }
.nowban.free .k { color: #0e9f6e; }
.nowban.future .k { color: var(--ink-faint); }
.nowban .k .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }
.nowban h3 { font-size: 20px; font-weight: 800; margin: 6px 0 3px; letter-spacing: -.2px; }
.nowban .sub { font-size: 13.5px; color: var(--ink-soft); }
.nowban .prog { height: 6px; background: var(--fill); border-radius: 99px; margin-top: 11px; overflow: hidden; }
.nowban .prog > span { display: block; height: 100%; background: var(--accent); }
.nowban .acts { display: flex; gap: 8px; margin-top: 13px; }
.nowban .acts .btn { flex: 1; }

/* ---------- Timeline ---------- */
.section-lab { font-size: 11.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--ink-faint); margin: 18px 16px 8px; }
.timeline { padding: 0 12px; }
.past-toggle { width: 100%; text-align: center; color: var(--accent-ink); font-size: 13px; font-weight: 700; padding: 8px; }
.past-wrap[hidden] { display: none; }

/* per-card time rail: start at top, end at bottom, progress fill in between */
.row { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: stretch; }
.row .tcol { display: flex; flex-direction: column; align-items: center; font-variant-numeric: tabular-nums; padding: 7px 0 8px; white-space: nowrap; }
.row .tcol .s { font-size: 13px; font-weight: 800; color: var(--ink); line-height: 1.05; }
.row .tcol .e { font-size: 11.5px; color: var(--ink-faint); line-height: 1.05; }
.row .tcol .ap { font-size: .7em; font-weight: 700; margin-left: 1px; }
.row .tcol .rail { position: relative; flex: 1; width: 3px; min-height: 16px; margin: 6px 0; background: var(--line); border-radius: 3px; }
.row .tcol .rail > i { position: absolute; left: 0; right: 0; top: 0; background: var(--accent); border-radius: 3px; }
.row .tcol .rail.done > i { background: var(--ink-faint); opacity: .4; }
.row .tcol .rail > b { position: absolute; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; transform: translateY(-50%); border-radius: 50%; background: var(--accent); border: 2px solid var(--card); box-shadow: 0 0 0 2px var(--accent); }

/* activity card */
.acard { background: var(--card); border-radius: 15px; box-shadow: 0 1px 2px rgba(16,32,51,.05); border: .5px solid var(--line); overflow: hidden; margin-bottom: 10px; width: 100%; text-align: left; display: block; }
.acard:active { transform: scale(.993); }
.acard.now { border-color: transparent; box-shadow: 0 0 0 2px var(--accent-btn), 0 6px 16px rgba(236,122,8,.18); }
.acard.past { opacity: .5; }
.acard .in { display: flex; align-items: center; gap: 12px; padding: 10px; }
.acard .thumb.sk { background: linear-gradient(90deg,var(--fill) 25%,var(--fill) 37%,var(--fill) 63%); background-size: 400% 100%; animation: sk 1.2s infinite; }
@keyframes sk { 0%{background-position:100% 0} 100%{background-position:0 0} }
.acard .body { min-width: 0; flex: 1; }
.acard .toprow { display: flex; justify-content: space-between; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); background: var(--fill); border: .5px solid var(--line); padding: 3px 9px 3px 7px; border-radius: 99px; }
.pill .ic { color: var(--accent-ink); }
.acard h3 { font-size: 15px; line-height: 1.25; margin: 5px 0 2px; }
.acard .sub { font-size: 12px; color: var(--ink-soft); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acard .sub.addr-line { display: block; color: var(--accent-ink); text-decoration: none; font-weight: 600; }
.acard .sub.addr-line .ic { color: var(--accent-ink); vertical-align: -2px; margin-right: 1px; }
.acard .chips { display: flex; flex-wrap: wrap; gap: 4px 9px; margin-top: 6px; font-size: 11.5px; color: var(--ink-soft); align-items: center; }
.acard .chips .rating { color: var(--accent-ink); font-weight: 800; }
.acard .chips .cost { color: var(--ink); font-weight: 800; }
.acard .chips .booked { color: var(--c-accommodation); font-weight: 800; }
.acard .chips .unbooked { color: #d4493f; font-weight: 800; }

/* drive connector */
.leg { display: flex; align-items: center; gap: 7px; margin: 1px 0 1px 60px; padding: 3px 0; font-size: 11.5px; color: var(--ink-faint); }
.leg .bar { width: 2px; align-self: stretch; background: var(--line); border-radius: 2px; margin-left: 4px; }
.leg button { color: var(--accent-ink); font-weight: 700; font-size: 11.5px; }
.leg .info { flex: 1; }

/* now divider */
.nowdiv { display: flex; align-items: center; gap: 8px; margin: 8px 0 10px 8px; color: var(--accent-btn); font-weight: 800; font-size: 11px; letter-spacing: .6px; }
.nowdiv::before { content:""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-btn); box-shadow: 0 0 0 4px rgba(236,122,8,.18); }
.nowdiv::after { content:""; flex: 1; height: 2px; background: linear-gradient(90deg,var(--accent-btn),transparent); }

/* tonight / tomorrow */
.tonight { margin: 16px 12px 92px; background: var(--card); border: .5px solid var(--line); color: var(--ink); border-radius: 16px; padding: 14px 15px; box-shadow: 0 1px 3px rgba(16,32,51,.06); }
.tonight .k { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-faint); display: flex; align-items: center; gap: 6px; }
.tonight .k .ic { color: var(--accent-ink); }
.tonight .ln { font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; display: flex; gap: 8px; align-items: baseline; }
.tonight .ln b { color: var(--ink); }
.tonight .ln .ic { flex: none; color: var(--ink-faint); }
.tonight .warn { color: var(--accent-ink); font-weight: 700; margin-top: 9px; font-size: 12.5px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; padding: 11px; font-size: 14px; font-weight: 800; text-decoration: none; }
.btn.solid { background: var(--card); color: var(--navy); }
.btn.light { background: rgba(255,255,255,.18); color: #fff; }
.btn.primary { background: var(--accent-btn); color: #fff; }
.btn.ghost { background: var(--card); color: var(--accent-ink); border: 1.5px solid var(--line); }
.btn:active { transform: scale(.97); }

/* ---------- Trip view ---------- */
.trip-head { position: sticky; top: 0; z-index: 20; background: var(--hdr); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); color: var(--ink); border-bottom: .5px solid var(--line); box-shadow: 0 2px 12px rgba(16,32,51,.07); padding: calc(var(--st) + 11px) 16px 10px; }
.trip-head h1 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-head .sub { font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-head .sub { color: var(--ink-soft); }
.trip-metrics { display: flex; gap: 8px; padding: 12px; }
.metric { flex: 1; background: var(--card); border-radius: 14px; padding: 12px 10px; text-align: center; box-shadow: 0 1px 2px rgba(16,32,51,.05); border: .5px solid var(--line); }
.metric .mtop { display: flex; align-items: center; justify-content: center; gap: 5px; }
.metric .mi { color: var(--accent-ink); line-height: 0; display: inline-flex; }
.metric .v { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.metric .l { font-size: 10.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; margin-top: 3px; }
.metric.warn .v, .metric.warn .mi { color: #d4493f; }
.leg-lab { font-size: 11.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--ink-faint); margin: 14px 16px 6px; display: flex; align-items: center; gap: 6px; }
.leg-lab .ic { color: var(--accent-ink); flex: none; }
.dayrow { display: flex; align-items: center; gap: 11px; margin: 0 12px 8px; background: var(--card); border-radius: 13px; padding: 11px 13px; box-shadow: 0 1px 2px rgba(16,32,51,.05); border: .5px solid var(--line); width: calc(100% - 24px); text-align: left; transition: background .15s; }
.dayrow.today { background: var(--tint); box-shadow: inset 3px 0 0 var(--accent-btn), 0 1px 2px rgba(16,32,51,.05); border-color: transparent; }
.dayrow .dnum { font-size: 11px; color: var(--ink-faint); font-weight: 800; width: 40px; flex: none; text-transform: uppercase; }
.dayrow .dnum b { display: block; font-size: 17px; color: var(--ink); }
.dayrow.today .dnum, .dayrow.today .dnum b { color: var(--accent-ink); }
.dayrow .dbody { flex: 1; min-width: 0; }
.dayrow h3 { font-size: 14.5px; font-weight: 800; display: flex; align-items: center; gap: 6px; color: var(--ink); }
.dayrow h3 .dt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dayrow h3 .ic { color: var(--ink-faint); flex: none; }
.dayrow.today h3 .ic { color: var(--accent-ink); }
.today-pill { flex: none; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #fff; background: var(--accent-btn); padding: 2px 6px; border-radius: 5px; }
.dayrow .meta { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; }
.dayrow .meta .ic { color: var(--ink-faint); vertical-align: -1px; }
.dayrow .flag { color: #d4493f; font-weight: 700; }
.drow-chev { flex: none; align-self: center; color: var(--ink-faint); display: inline-flex; }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tab-h) + var(--sb)); padding-bottom: var(--sb); background: var(--hdr); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-top: .5px solid var(--line); display: flex; }
.tab { flex: 1; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px; color: var(--ink-faint); font-size: 12px; font-weight: 700; }
.tab .tab-ic { font-size: 18px; filter: grayscale(.4); opacity: .7; line-height: 0; }
.tab.active { color: var(--accent-ink); }
.tab.active .tab-ic { filter: none; opacity: 1; }

/* ---------- map FAB ---------- */
.map-fab { position: fixed; right: 16px; bottom: calc(var(--tab-h) + var(--sb) + 16px); z-index: 41; width: 52px; height: 52px; border-radius: 50%; background: var(--accent-btn); color: #fff; box-shadow: 0 6px 18px rgba(236,122,8,.4); font-size: 22px; display: flex; align-items: center; justify-content: center; }
.map-fab:active { transform: scale(.93); }
.map-fab i { font-style: normal; }

/* ---------- map popup ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(8,15,25,.45); z-index: 60; opacity: 0; will-change: opacity; }
.map-popup { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--card); border-radius: 20px 20px 0 0; height: calc(94vh - var(--st)); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 -8px 30px rgba(0,0,0,.25); transform: translateY(100%); }
.map-grip { touch-action: none; cursor: grab; }
.map-head { touch-action: none; }
.map-grip { padding: 8px 0 2px; text-align: center; flex: none; }
.map-grip span { display: inline-block; width: 40px; height: 5px; border-radius: 3px; background: #d4dbe3; }
.map-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 14px 8px; flex: none; }
.map-title { font-size: 15px; font-weight: 800; }
.map-head-btns { display: flex; gap: 8px; }
.round-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--fill); display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--ink); }
.round-btn.shadow { background: var(--card); box-shadow: 0 3px 10px rgba(0,0,0,.22); }
.round-btn:active { transform: scale(.92); }
.gmap { flex: 1; width: 100%; background: var(--fill); }
.map-tools { position: absolute; right: 14px; bottom: 76px; display: flex; flex-direction: column; gap: 10px; z-index: 5; }
.map-banner { position: absolute; left: 14px; right: 70px; bottom: 16px; background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 13px; font-size: 13px; font-weight: 600; z-index: 5; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.gpin { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50% 50% 50% 2px; transform: rotate(45deg); color: #fff; font-weight: 800; font-size: 12px; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.35); }
.gpin > span { transform: rotate(-45deg); }
.gpin.cur { animation: cur 1.4s infinite; }
@keyframes cur { 0%,100%{box-shadow:0 0 0 4px rgba(255,77,77,.4),0 2px 5px rgba(0,0,0,.35)} 50%{box-shadow:0 0 0 9px rgba(255,77,77,.08),0 2px 5px rgba(0,0,0,.35)} }
.medot { width: 18px; height: 18px; border-radius: 50%; background: #ff9500; border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(236,122,8,.3); }
.map-msg { padding: 20px; text-align: center; color: var(--ink-soft); font-size: 13.5px; }
.map-msg code { background: var(--fill); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

/* ---------- detail sheet ---------- */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--card); border-radius: 20px 20px 0 0; max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 16px calc(20px + var(--sb)); box-shadow: 0 -8px 30px rgba(0,0,0,.25); transform: translateY(100%); will-change: transform; }
.sheet-grip { touch-action: none; cursor: grab; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: #d4dbe3; margin: 9px auto 4px; }
.herobleed { position: relative; width: calc(100% + 32px); margin: 0 -16px; }
.sheet-hero { width: 100%; height: 200px; object-fit: cover; background: var(--fill); display: block; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gslide { flex: 0 0 100%; scroll-snap-align: center; }
.gdots { position: absolute; bottom: 9px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.gdots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 2px rgba(0,0,0,.4); transition: background .15s, transform .15s; }
.gdots span.on { background: #fff; transform: scale(1.15); }
.gcount { position: absolute; top: 9px; left: 9px; background: rgba(0,0,0,.5); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; font-variant-numeric: tabular-nums; pointer-events: none; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet-pad { padding-top: 13px; }
.sheet h3 { font-size: 21px; line-height: 1.2; margin-top: 8px; }
.sheet .route { font-size: 13px; color: var(--ink-soft); margin: 9px 0 0; display: flex; align-items: baseline; gap: 6px; }
.sheet .route .ic { color: var(--ink-faint); }
/* close button — sticky, stays reachable while the sheet scrolls */
.sheet-closebar { position: sticky; top: 0; z-index: 6; height: 0; display: flex; justify-content: flex-end; pointer-events: none; }
.sheet-x { pointer-events: auto; width: 32px; height: 32px; border-radius: 50%; background: rgba(20,25,35,.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; display: flex; align-items: center; justify-content: center; transform: translateY(9px); }
.sheet-x:active { transform: translateY(9px) scale(.9); }
/* rating summary under the title */
.ratesum { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink); margin-top: 7px; }
.ratesum .ic { color: var(--accent-ink); }
.ratesum b { font-weight: 800; }
.ratesum .cnt { color: var(--ink-faint); font-weight: 600; }
/* facts row (when · duration · cost · booked) */
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; margin-top: 9px; }
.facts .fact { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-soft); }
.facts .fact .ic { color: var(--ink-faint); }
.facts .fact.cost { color: var(--ink); font-weight: 800; }
.facts .fact.booked { color: var(--c-accommodation); font-weight: 800; }
.facts .fact.nob { color: #d4493f; font-weight: 800; }
/* tappable address -> Google Maps */
.addr { display: flex; align-items: flex-start; gap: 9px; margin-top: 13px; padding: 11px 13px; background: var(--fill); border-radius: 12px; text-decoration: none; }
.addr > .ic:first-child { color: var(--accent-ink); flex: none; margin-top: 1px; }
.addr-t { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.4; color: var(--accent-ink); font-weight: 600; }
.addr-go { flex: none; color: var(--ink-faint); margin-top: 1px; }
.addr:active { transform: scale(.99); }
/* sections: consistent header + hairline separation */
.sec { margin-top: 16px; }
.sec h4, .rev-wrap h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-faint); margin-bottom: 8px; display: flex; align-items: center; gap: 5px; font-weight: 800; }
.sec h4 .ic { color: var(--ink-faint); }
.sheet-pad > .sec, .sheet-pad > .foodblock, .sheet-pad > .shopblock, .sheet-pad > .bookblock, .sheet-pad > .rev-wrap:not([hidden]) { border-top: .5px solid var(--line); padding-top: 15px; margin-top: 16px; }
.rfull { font-size: 14px; line-height: 1.55; color: var(--ink-soft); white-space: pre-line; margin: 0; }
.rev-wrap { margin-top: 15px; }
.rev { background: var(--fill); border-radius: 11px; padding: 10px 12px; margin-bottom: 8px; font-size: 13.5px; }
.rev .who { font-weight: 800; } .rev .st { color: var(--accent-ink); } .rev .wh { color: var(--ink-faint); font-size: 11.5px; }
.sheet-acts { display: flex; gap: 9px; margin: 18px 0 4px; }
.sheet-acts .btn { flex: 1; }

.ios-hint { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--sb) + 10px); background: var(--navy); color: #fff; border-radius: 14px; padding: 12px 14px; font-size: 13px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.3); z-index: 45; }
.ios-hint button { background: rgba(255,255,255,.16); color: #fff; border-radius: 8px; width: 26px; height: 26px; flex: none; }
.empty { text-align: center; color: var(--ink-faint); padding: 50px 20px; }

/* ---------- icons ---------- */
.ic { vertical-align: -0.16em; flex: none; }

/* ---------- lock screen ---------- */
.lock { position: fixed; inset: 0; z-index: 200; background: var(--bg); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: calc(var(--st) + 20px) 24px calc(var(--sb) + 20px); }
.lock.gone { display: none; }
.lock.shake { animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-9px)} 40%{transform:translateX(9px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(6px)} }
.lock-inner { width: 100%; max-width: 320px; text-align: center; }
.lock-icon { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.lock-title { font-size: 19px; font-weight: 700; }
.lock-sub { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.dots { display: flex; gap: 16px; justify-content: center; margin: 26px 0 34px; }
.dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--ink-faint); transition: background .12s; }
.dots i.on { background: var(--accent); border-color: var(--accent); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 290px; margin: 0 auto; }
.pad button { width: 74px; height: 74px; border-radius: 50%; background: var(--card); color: var(--ink); font-size: 30px; font-weight: 400; justify-self: center; display: flex; align-items: center; justify-content: center; border: .5px solid var(--line); box-shadow: 0 1px 2px rgba(16,32,51,.05); transition: background .12s; }
.pad button:active { background: var(--fill); }
.pad button.del { background: none; border: none; box-shadow: none; }
.lock.ok { transition: opacity .25s; opacity: 0; }
.lock.locked .pad, .lock.locked .dots { opacity: .3; pointer-events: none; transition: opacity .2s; }
.lock.locked .lock-sub { color: var(--accent-ink); font-weight: 700; }

/* ---------- live clock ---------- */
.head-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.head-main .hm-l { min-width: 0; }
.clock { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- day progress (glance) ---------- */
.glance { margin: 0; background: var(--card); border-radius: 14px; padding: 11px 13px; box-shadow: 0 1px 2px rgba(16,32,51,.05); }
.g-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.g-stat { flex: none; display: inline-flex; align-items: baseline; gap: 5px; }
.g-stat .g-k { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-faint); }
.g-stat b { font-size: 14px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.g-bar { position: relative; height: 6px; background: var(--fill); border-radius: 99px; margin: 2px 0 9px; }
.g-bar > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 99px; }
.g-bar > i { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent-btn); border: 2px solid var(--card); box-shadow: 0 0 0 3px rgba(236,122,8,.2); }
.g-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--ink-soft); }
.g-stats > span { display: inline-flex; align-items: center; gap: 4px; }
.g-stats .ic { color: var(--ink-faint); }
.g-stats .g-lead { color: var(--ink); }
.g-stats .g-lead b { color: var(--ink); font-size: 15px; font-weight: 800; }
.g-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 9px; padding-top: 9px; border-top: .5px solid var(--line); }
.g-hl { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 800; color: var(--ink); min-width: 0; }
.g-hl-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.g-hl.free { color: var(--ink-soft); font-weight: 700; }
.g-hl .ic { color: var(--accent-ink); flex: none; }
.g-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--accent-ink); background: var(--tint); border: .5px solid var(--line); padding: 4px 8px; border-radius: 99px; text-decoration: none; max-width: 100%; }
.g-chip .ic { flex: none; }
.g-chip .rx-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.g-chip .rx-k { flex: none; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #fff; background: var(--accent-btn); padding: 1px 5px; border-radius: 5px; }
.sep { color: var(--ink-faint); }

/* ---------- per-card photo (leading) + navigate button (trailing) ---------- */
.acard .media { position: relative; width: 76px; height: 76px; flex: none; }
.acard .thumb { position: absolute; inset: 0; width: 76px; height: 76px; border-radius: 12px; object-fit: cover; background: var(--fill); }
.acard .media .ph { position: absolute; inset: 0; border-radius: 12px; background: var(--fill); display: flex; align-items: center; justify-content: center; color: var(--ink-faint); }
.navbtn { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-btn); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(236,122,8,.4); }
.navbtn:active { transform: scale(.9); }
.bk { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.bk.yes { background: #e6f5ee; color: #0b8259; }
.bk.no { background: #fdeceb; color: #d4493f; }
.bkrow { margin-top: 7px; }

/* ---------- day picker sheet ---------- */
.daypick-title { font-size: 22px; font-weight: 800; letter-spacing: -.3px; color: var(--ink); padding: 4px 4px 1px; }
.daypick-sub { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; padding: 0 4px 8px; }
.pk-row { display: flex; gap: 13px; align-items: center; width: 100%; text-align: left; padding: 12px 10px; background: none; border: 0; border-radius: 12px; }
.pk-row + .pk-row { border-top: .5px solid var(--line); }
.pk-row:active { background: var(--fill); }
.pk-row.sel { background: var(--tint); box-shadow: inset 3px 0 0 var(--accent-btn); border-top-color: transparent; }
.pk-row.sel + .pk-row { border-top-color: transparent; }
.pk-d { width: 42px; flex: none; text-align: center; line-height: 1; }
.pk-wd { display: block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-faint); margin-bottom: 2px; }
.pk-d b { display: block; font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
.pk-row.today .pk-d b, .pk-row.today .pk-wd { color: var(--accent-ink); }
.pk-b { flex: 1; min-width: 0; }
.pk-h { font-size: 16px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-today { flex: none; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #fff; background: var(--accent-btn); padding: 2px 6px; border-radius: 5px; }
.pk-m { font-size: 12px; color: var(--ink-soft); margin-top: 2px; display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-m .ic { color: var(--ink-faint); flex: none; }
.pk-f { display: flex; align-items: center; gap: 9px; flex: none; }
.pk-chev { color: var(--ink-faint); display: inline-flex; }
.pk-flag { display: inline-flex; align-items: center; gap: 3px; color: #d4493f; font-weight: 800; font-size: 11.5px; }

/* ---------- header date picker trigger ---------- */
.day-pick-btn { display: inline-flex; align-items: center; gap: 5px; background: none; color: var(--ink-soft); font-size: 12.5px; font-weight: 700; padding: 2px 0; }
.day-title { display: inline-flex; align-items: center; gap: 7px; }
.day-title .tapchev { color: var(--ink-faint); }

/* ---------- smallest iPhones (SE/5s, 320px): give the card body more room ---------- */
@media (max-width: 360px) {
  .row { grid-template-columns: 48px 1fr; gap: 7px; }
  .acard .media, .acard .thumb { width: 64px; height: 64px; }
  .navbtn { width: 34px; height: 34px; }
  .acard .in { gap: 10px; padding: 9px; }
  .leg { margin-left: 55px; }
  .acard h3 { font-size: 14.5px; }
}
