/* city.beacon London – theme "Mayfair Ink": deep navy on warm paper, the logo red only as a rare accent */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/newsreader-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("../fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --c-primary: #17223B;      /* navy: main actions, active state (white text 15:1) */
  --c-primary-dark: #0E1628;
  --c-accent-red: #C8281B;   /* the logo red, used rarely: the Ask button, "closed" warnings, news badge (white text 5.5:1) */
  --c-blue: #2B4A8E;         /* secret places, links, secondary emphasis (7.6:1 on white) */
  --c-secondary: #17223B;    /* dark buttons, selected chips */
  --c-ink: #17223B;
  --c-fill: #17223B;         /* dark fills with white text (selected chips, the day bar, numbers); stays dark at night */
  --c-ink-2: #474E5E;        /* secondary text, 7.2:1 on paper */
  --c-ink-3: #626876;        /* tertiary (tab labels), 5.1:1 on paper */
  --c-bg: #F7F4EE;           /* warm paper */
  --c-surface: #FFFFFF;
  --c-accent: #EFEAE1;       /* quiet warm surface (tags, alt buttons) */
  --c-line: #E6E1D8;
  --c-red-tint: #E9EDF5;     /* soft navy tint behind the active top-nav link */
  --topbar-h: 60px;
  --tabbar-h: 62px;
  --c-night: #10182A;
  --c-gold: #8FA3D1;         /* focus ring around the Ask field */
  /* category tiles (no photo): soft tint + darker icon colour, in families */
  --t-green: #E3EBDF; --t-green-ink: #3D6141;
  --t-stone: #E3E7EF; --t-stone-ink: #2F4470;
  --t-amber: #EFE6DA; --t-amber-ink: #7A4E2A;
  --t-rose: #F3E3DF;  --t-rose-ink: #9A3B2C;
  --t-plum: #ECE4EE;  --t-plum-ink: #6B4673;
  --r-sm: 12px; --r-md: 18px; --r-lg: 24px; --r-pill: 999px;
  --shadow: 0 8px 28px rgba(23, 34, 59, .12);
  --shadow-sm: 0 2px 10px rgba(23, 34, 59, .10);
  --tap: 48px;
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Newsreader", ui-serif, "Iowan Old Style", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 1rem/1.5 var(--font); color: var(--c-ink); background: var(--c-night); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--c-primary); color: #fff; padding: 10px 16px; border-radius: var(--r-pill); z-index: 100; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--c-blue); outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
.muted { color: var(--c-ink-2); }
.center { text-align: center; margin-top: 24px; }

/* ---------- Map layer (fixed behind everything) ---------- */
#map { position: fixed; inset: 0; z-index: 0; background: var(--c-night); }
.map-scrim { position: fixed; inset: 0; z-index: 1; pointer-events: none; transition: opacity .5s;
  background:
    radial-gradient(110% 90% at 15% 40%, rgba(10,10,12,.55), rgba(10,10,12,.12) 75%),
    linear-gradient(180deg, rgba(10,10,12,.5), rgba(10,10,12,0) 30%, rgba(10,10,12,.45)); }
body.map-mode .map-scrim { opacity: .35; }
.leaflet-container { font-family: var(--font); }
.leaflet-control-attribution { font-size: 12px; }

/* ---------- Top bar ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  padding: calc(10px + env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 10px; color: #fff; }
.topbar { transition: background .25s, box-shadow .25s; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; letter-spacing: .04em; font-size: 1rem; }
.brand i { font-style: normal; color: #FF6B66; }
.topnav { margin-left: auto; display: none; gap: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 5; min-height: 100svh; display: flex; align-items: center; padding: 96px clamp(16px, 5vw, 64px) 120px; pointer-events: none; }
.hero-inner { max-width: 760px; color: #fff; pointer-events: none; transition: opacity .4s, transform .4s; }
.hero-inner > * { pointer-events: auto; }
body.map-mode .hero-inner { opacity: 0; transform: translateY(20px); visibility: hidden; }
h1 { margin: 0; font: 600 clamp(2.6rem, 8vw, 5.6rem)/1.02 var(--font-display); letter-spacing: -.02em; text-shadow: 0 4px 30px rgba(10,10,12,.45); }
.sub { margin: 14px 0 28px; font-size: clamp(1.05rem, 2.4vw, 1.5rem); color: var(--c-accent); letter-spacing: .04em; }

.ask { display: flex; gap: 8px; padding: 8px; max-width: 640px; background: rgba(255,255,255,.96); border-radius: var(--r-pill); box-shadow: var(--shadow); }
.ask input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; min-height: var(--tap); font: inherit; color: var(--c-ink); }
.ask input:focus { outline: none; }
.ask:focus-within { box-shadow: 0 0 0 3px var(--c-gold), var(--shadow); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 22px; border: 0; border-radius: var(--r-pill); font-weight: 700; text-decoration: none; transition: transform .15s, background .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--c-primary); color: #fff; }
.btn.primary:hover { background: var(--c-primary-dark); }
.btn.accent { background: #fff; color: var(--c-blue); }
.btn.ghost { background: rgba(10,10,12,.45); color: #fff; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.25); }
.btn.ghost:hover { background: rgba(10,10,12,.65); }
.btn.dark { background: var(--c-secondary); color: #fff; }
.btn.dark:hover { background: #24314F; }
.icon-btn { width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: var(--c-line); color: var(--c-ink); font-size: 1.125rem; }


/* ---------- Results sheet (thumb zone: bottom) ---------- */
.sheet { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; max-height: 62svh; display: flex; flex-direction: column; background: var(--c-bg); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -12px 40px rgba(10,10,12,.35); padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); animation: up .35s ease-out; }
.sheet[hidden] { display: none; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.sheet h2 { margin: 0; font: 600 1.35rem/1.2 var(--font-display); }
.sheet-head p { margin: 2px 0 8px; font-size: .875rem; }
.sheet-body { overflow: auto; display: grid; gap: 10px; padding: 4px 2px 6px; }
.note { margin: 6px 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--c-accent); font-size: .875rem; color: var(--c-ink); }
.note.warn { background: #FDE0DE; color: #5A0F0C; }
@media (min-width: 900px) {
  .sheet { left: clamp(16px, 3vw, 40px); right: auto; bottom: 24px; width: 440px; max-height: calc(100svh - 120px); border-radius: var(--r-lg); padding-bottom: 16px; }
  
}

/* ---------- Paper content ---------- */
.views { position: fixed; z-index: 10; left: 0; right: 0; top: calc(var(--topbar-h) + env(safe-area-inset-top)); bottom: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--c-bg); border-radius: var(--r-lg) var(--r-lg) 0 0; padding-bottom: 110px; }
.views[hidden], .view[hidden] { display: none; }
body.view-open { overflow: hidden; }
body.view-open .sheet, body.view-open .back-fab, body.view-open .map-ctl, body.view-open .peek { display: none !important; }
body.view-open .hero { visibility: hidden; }
body.map-mode .hero { min-height: 100svh; }
.block { max-width: 1240px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 8px; }
.head h2 { margin: 0 0 6px; font: 600 clamp(1.7rem, 4vw, 2.4rem)/1.1 var(--font-display); }
.head p { margin: 0 0 20px; max-width: 60ch; }
.spark { color: var(--c-primary); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: var(--tap); padding: 0 18px; border-radius: var(--r-pill); border: 2px solid var(--c-line); background: var(--c-surface); color: var(--c-ink); font-weight: 650; }
.chip[aria-selected="true"] { background: var(--c-secondary); color: #fff; border-color: var(--c-secondary); }
.chip small { opacity: .75; margin-left: 6px; font-weight: 500; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.filters button { min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--c-line); background: var(--c-surface); font-weight: 600; color: var(--c-ink); }
.filters button.on { background: var(--c-accent); border-color: var(--c-primary); }
.check { display: inline-flex; gap: 8px; align-items: center; min-height: 40px; padding: 0 12px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--c-primary); }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: var(--c-surface); border-radius: var(--r-md); overflow: hidden; box-shadow: 0 2px 0 var(--c-line), 0 12px 24px -16px rgba(17,18,20,.35); border: 1px solid var(--c-line); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 0 var(--c-line), 0 20px 30px -16px rgba(17,18,20,.45); }
.card .ph { aspect-ratio: 16 / 10; background: var(--c-accent); overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .ph img { transform: scale(1.05); }
.card .ph.none { display: grid; place-items: center; }
.card .ph.none .ico { width: 40px; height: 40px; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font: 600 1.125rem/1.25 var(--font-display); }
.card p { margin: 0; font-size: .875rem; color: var(--c-ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .75rem; font-weight: 700; letter-spacing: .04em; padding: 3px 10px; border-radius: var(--r-pill); background: var(--c-accent); color: var(--c-ink); }
.tag.secret { background: var(--c-blue); color: #fff; }
.card .actions { margin-top: auto; padding-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.card .open { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; }
.card .actions { position: relative; z-index: 2; }
.card .open:focus-visible { outline-offset: -4px; border-radius: var(--r-md); }

.secret { background: linear-gradient(180deg, transparent, rgba(43,74,142,.05)); border-radius: var(--r-lg); }

.card.walk .body { gap: 10px; }
.meta { display: flex; gap: 14px; font-weight: 700; font-size: .875rem; }
.meta span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); margin-right: 6px; }
.hl { font-size: .875rem; color: var(--c-ink-2); }

.news { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.src { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 18px; }
.badge { display: inline-block; padding: 4px 12px; border-radius: var(--r-pill); font-weight: 800; font-size: .75rem; letter-spacing: .06em; color: #fff; background: #111214; margin-bottom: 8px; }
.badge.orange { background: var(--c-accent-red); color: #fff; }
.src ul { list-style: none; margin: 0; padding: 0; }
.src li a { display: block; padding: 12px 0; border-top: 1px solid var(--c-line); text-decoration: none; font-weight: 600; min-height: var(--tap); }
.src li a:hover { color: var(--c-blue); text-decoration: underline; }

.interest .row { display: flex; flex-wrap: wrap; gap: 12px; }
.foot { max-width: 1240px; margin: 56px auto 0; padding: 24px clamp(16px, 4vw, 40px); font-size: .875rem; color: var(--c-ink-2); border-top: 1px solid var(--c-line); }

/* ---------- Detail dialog ---------- */
dialog { width: min(720px, 94vw); max-height: 92svh; padding: 0; border: 0; border-radius: var(--r-lg); background: var(--c-bg); box-shadow: 0 30px 80px rgba(10,10,12,.5); overflow: auto; }
dialog::backdrop { background: rgba(10,10,12,.6); backdrop-filter: blur(4px); }
dialog .close { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(255,255,255,.9); }
.d-photo { aspect-ratio: 16 / 9; background: var(--c-accent); }
.d-photo img { width: 100%; height: 100%; object-fit: cover; }
.d-body { padding: 20px 22px 24px; display: grid; gap: 12px; }
.d-body h2 { margin: 0; font: 600 1.75rem/1.15 var(--font-display); }
.d-body dl { margin: 0; display: grid; gap: 4px; font-size: .875rem; }
.d-body dt { font-weight: 700; display: inline; }
.d-body dd { margin: 0; display: inline; color: var(--c-ink-2); }
.credit { font-size: .75rem; color: var(--c-ink-2); }
.d-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.d-actions .btn { min-height: 48px; }
.mini { display: grid; gap: 8px; }
.mini button { display: flex; gap: 12px; align-items: center; text-align: left; padding: 8px; border: 1px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-surface); min-height: var(--tap); }
.mini img { width: 56px; height: 56px; border-radius: var(--r-sm); object-fit: cover; }

/* result items inside the sheet */
.res { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 8px; }
.res.sel { border-color: var(--c-primary); box-shadow: 0 0 0 2px var(--c-primary); }
.res img, .res .noimg { width: 76px; height: 76px; border-radius: var(--r-sm); object-fit: cover; background: var(--c-accent); }
.res h3 { margin: 0; font: 600 1rem/1.2 var(--font-display); }
.res p { margin: 2px 0 0; font-size: .875rem; color: var(--c-ink-2); }
.res .go { min-width: var(--tap); min-height: var(--tap); border-radius: 50%; border: 0; background: var(--c-primary); color: #fff; font-weight: 800; }

/* map markers */

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; max-width: 90vw; padding: 12px 20px; border-radius: var(--r-pill); background: #111214; color: #fff; box-shadow: var(--shadow); font-weight: 600; }
.toast[hidden] { display: none; }

/* ---------- Bottom tab bar (thumb zone) ---------- */

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Account (profile icon + tab) ---------- */
.account-btn { flex: none; margin-left: 8px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; text-decoration: none; color: #fff; background: rgba(10,10,12,.45); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(8px); transition: background .2s; }
.account-btn[hidden], .account-btn [hidden] { display: none; }
.account-btn:hover, .account-btn[aria-current="page"] { background: var(--c-primary); border-color: transparent; }
.account-btn.signed { background: var(--c-blue); border-color: #fff; }
.account-btn.signed[aria-current="page"] { background: var(--c-primary); }
.account-btn b { font-size: 1rem; }
.account-btn img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 899px) { .topbar { gap: 8px; } .brand span { font-size: .875rem; }  }

.acct { max-width: 520px; display: grid; gap: 16px; }
.acct h3 { margin: 0; font: 600 1.35rem/1.2 var(--font-display); }
.stack { display: grid; gap: 12px; }
.btn.wide { width: 100%; }
.btn.light { background: #fff; color: var(--c-ink); border: 1px solid var(--c-line); }
.btn.ghost-dark { background: transparent; color: var(--c-ink); border: 2px solid var(--c-line); }
.btn.danger-btn { background: transparent; color: #A5120E; border: 2px solid #A5120E; }
.btn.danger-btn:hover { background: #A5120E; color: #fff; }
.g { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c-blue); color: #fff; font-weight: 800; font-size: .875rem; }
.or { display: flex; align-items: center; gap: 12px; margin: 4px 0; color: var(--c-ink-2); font-size: .875rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }
.field { display: grid; gap: 6px; font-weight: 600; font-size: .875rem; }
.field input { min-height: var(--tap); padding: 0 16px; border: 2px solid var(--c-line); border-radius: var(--r-sm); background: #fff; font: inherit; color: var(--c-ink); }
.field input:focus { outline: none; border-color: var(--c-blue); }
.link { background: none; border: 0; padding: 12px 4px; min-height: var(--tap); color: var(--c-blue); font-weight: 700; text-decoration: underline; }
.acct .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.small { font-size: .875rem; margin: 0; }
.note.bad { background: #FDE0DE; color: #5A0F0C; }
#authMsg:not(.bad) { background: var(--c-accent); color: var(--c-ink); }
.prof { display: flex; gap: 16px; align-items: center; }
.prof h3, .prof p { margin: 0; overflow-wrap: anywhere; }
/* an email as the heading (no display name): body face and a smaller size, so it fits on one or two lines */
.acct .prof h3.is-email { font: 600 1.125rem/1.25 var(--font); }
.avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--c-blue); color: #fff; font: 600 1.75rem var(--font-display); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.facts { margin: 0; display: grid; gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--c-surface); }
.facts dt { color: var(--c-ink-2); }
.facts dd { margin: 0; font-weight: 700; text-align: right; }
.danger { display: grid; gap: 8px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.danger h4 { margin: 0; font-size: 1rem; }
body.auth-busy .acct { opacity: .6; pointer-events: none; }
@media (max-width: 460px) { .brand span { white-space: nowrap; } .brand i { display: none; } }
[hidden] { display: none !important; }

/* ---------- Explore: Browse | My plan ---------- */
.seg { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--c-line); border-radius: var(--r-pill); }
.seg button { min-height: 44px; padding: 0 20px; border: 0; border-radius: var(--r-pill); background: transparent; font-weight: 700; color: var(--c-ink); }
.seg button[aria-selected="true"] { background: var(--c-secondary); color: #fff; }
.badge-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-sm); background: var(--c-primary); color: #fff; font-size: .75rem; margin-left: 4px; }

@media (min-width: 900px) {  .cal { position: sticky; top: 8px; } }
.cal, .day { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 16px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head strong { font: 600 1.125rem var(--font-display); }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-week span { font-size: .75rem; font-weight: 700; color: var(--c-ink-2); padding: 4px 0; }
.cd { position: relative; min-height: 44px; border: 2px solid transparent; border-radius: var(--r-sm); background: transparent; font-weight: 600; color: var(--c-ink); }
.cd:hover { background: var(--c-accent); }
.cd.today { border-color: var(--c-blue); }
.cd.has::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--c-primary); }
.cd[aria-pressed="true"] { background: var(--c-secondary); color: #fff; }
.cd[aria-pressed="true"].has::after { background: #fff; }
.cal-quick { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.day h3 { margin: 0 0 4px; font: 600 1.35rem/1.2 var(--font-display); }
.day h4 { margin: 22px 0 8px; font-size: 1rem; }
.opts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 10px; }
.stops, .todos { list-style: none; margin: 0; padding: 0; }
.leg { margin: 2px 0 2px 14px; padding-left: 14px; border-left: 3px dotted var(--c-blue); font-size: .875rem; font-weight: 600; color: var(--c-blue); min-height: 24px; display: flex; align-items: center; }

.num { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c-primary); color: #fff; }



.x, .mv { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--c-ink-2); font-size: 1rem; }
.x:hover, .mv:hover:not(:disabled) { background: var(--c-line); }
.mv:disabled { opacity: .3; }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.todo-form { display: flex; gap: 8px; }
.todo-form input { flex: 1; min-width: 0; min-height: var(--tap); padding: 0 14px; border: 2px solid var(--c-line); border-radius: var(--r-pill); font: inherit; background: #fff; color: var(--c-ink); }
.todo-form input:focus { outline: none; border-color: var(--c-blue); }
.todos { margin-top: 10px; display: grid; gap: 6px; }
.todo { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px 4px 12px; border: 1px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-bg); }
.todo label { display: flex; align-items: center; gap: 10px; flex: 1; min-height: var(--tap); cursor: pointer; overflow-wrap: anywhere; }
.todo input { width: 22px; height: 22px; accent-color: var(--c-blue); flex: none; }
.todo.done span { text-decoration: line-through; color: var(--c-ink-2); }

/* ---------- Transport layer ---------- */
.tpin svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 3px rgba(10,10,12,.6)); }
.rd { display: inline-block; width: 16px; height: 16px; border-radius: 4.5px; background: var(--rc, #DC241F) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 4.5h8A2.5 2.5 0 0 1 18.5 7v7a2.5 2.5 0 0 1-2.5 2.5H8A2.5 2.5 0 0 1 5.5 14V7A2.5 2.5 0 0 1 8 4.5zM7.9 7h8.2v3.9H7.9zM8.3 13.6a1.1 1.1 0 1 0 2.2 0a1.1 1.1 0 1 0-2.2 0zM13.5 13.6a1.1 1.1 0 1 0 2.2 0a1.1 1.1 0 1 0-2.2 0z' fill='white' fill-rule='evenodd'/%3E%3Cpath d='M9.6 16.8 7.9 19.6M14.4 16.8l1.7 2.8' stroke='white' stroke-width='1.6' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center / 100% no-repeat;
  box-shadow: 0 0 0 1.5px var(--c-surface); vertical-align: -3px; flex: none; }   /* our own station symbol, not the TfL roundel */
.busdot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--c-primary); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--c-primary); flex: none; }
.lc { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .75rem; font-weight: 700; margin: 2px 4px 2px 0; }
.stopcard { position: fixed; z-index: 26; left: 12px; right: 12px; bottom: calc(96px + env(safe-area-inset-bottom)); max-width: 420px; padding: 16px 52px 16px 16px; background: var(--c-bg); border-radius: var(--r-md); box-shadow: var(--shadow); }
.stopcard .icon-btn { position: absolute; top: 8px; right: 8px; }
.stopcard h3 { margin: 0 0 4px; font: 600 1.125rem/1.25 var(--font); }
.stopcard p { margin: 4px 0 0; font-size: .875rem; color: var(--c-ink-2); }
body.view-open .stopcard { display: none !important; }
@media (min-width: 900px) { .stopcard { left: auto; right: 24px; bottom: 80px; } }
.access { display: grid; gap: 8px; margin-top: 4px; }
.access h3 { margin: 6px 0 0; }
.acc { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-surface); }
.acc b { display: flex; align-items: center; gap: 8px; }
.acc small { color: var(--c-ink-2); }


/* ---------- Public-transport journeys ---------- */
.jform { display: grid; gap: 10px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--c-line); }
.jform h3 { margin: 0; }
.jopt { display: grid; gap: 8px; width: 100%; text-align: left; padding: 12px; border: 2px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); color: var(--c-ink); font: inherit; }
.jopt.sel { border-color: var(--c-primary); box-shadow: 0 0 0 2px var(--c-primary); }
.jopt .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; }
.jopt .chips2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.jopt .chips2 .lc { margin: 0; }
.jopt .arrow { color: var(--c-ink-2); }
.jopt ol { margin: 4px 0 0; padding-left: 18px; font-size: .875rem; color: var(--c-ink-2); }
.jopt .warn { margin: 0; padding: 6px 10px; border-radius: var(--r-sm); background: #FDE0DE; color: #5A0F0C; font-size: .875rem; }
.jopt small { color: var(--c-ink-2); }
.buses { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: .875rem; }
.buses li { display: flex; align-items: center; gap: 8px; }
.buses b { margin-left: auto; white-space: nowrap; }
.leg .link { min-height: 32px; padding: 0 0 0 10px; font-size: .875rem; }

/* =====================================================================
   Refresh: calmer, lighter chrome; red only for the main action
   ===================================================================== */
/* top bar: transparent over the hero, light glass over the map and the tabs */
.topbar { gap: 12px; padding: calc(8px + env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 8px; min-height: var(--topbar-h); transition: background .25s, color .25s, box-shadow .25s; }
body.map-mode .topbar, body.view-open .topbar { background: rgba(255,255,255,.92); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); color: var(--c-ink); box-shadow: 0 1px 0 var(--c-line); }
.brand { font-size: 1rem; }
.brand i { color: #FF8A80; }
body.map-mode .brand i, body.view-open .brand i { color: var(--c-primary); }
.topnav { display: none; gap: 2px; margin-left: auto; }
.topnav a { text-decoration: none; padding: 9px 14px; border-radius: var(--r-pill); font-weight: 600; font-size: .875rem; color: inherit; opacity: .85; }
.topnav a:hover { opacity: 1; background: rgba(127,127,127,.14); }
.topnav a[aria-current="page"] { opacity: 1; color: var(--c-primary); background: var(--c-red-tint); }
body.intro-mode:not(.view-open) .topnav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.16); }
@media (min-width: 900px) { .topnav { display: flex; } }
.account-btn { margin-left: auto; width: 40px; height: 40px; color: inherit; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); }
.topnav + .account-btn { margin-left: 8px; }
@media (max-width: 899px) { .topnav + .account-btn { margin-left: auto; } }
body.map-mode .account-btn, body.view-open .account-btn { background: var(--c-surface); border-color: var(--c-line); }
.account-btn:hover, .account-btn[aria-current="page"] { background: var(--c-primary) !important; border-color: transparent !important; color: #fff; }
.account-btn.signed { background: var(--c-blue) !important; border-color: #fff !important; color: #fff; }

/* hero: one headline, one question, a few suggestions; the map behind it is a quiet monochrome */
.leaflet-tile-pane { transition: filter .6s; }
body.intro-mode #map .leaflet-tile-pane { filter: grayscale(1) sepia(.7) hue-rotate(78deg) saturate(1.9) brightness(.66) contrast(1.05); }   /* soft park-green tint, still dark enough for white text */
body.intro-mode #map .leaflet-marker-pane, body.intro-mode #map .leaflet-tooltip-pane, body.intro-mode #map .leaflet-overlay-pane { display: none; }
.map-scrim { background: linear-gradient(180deg, rgba(10,10,12,.55) 0%, rgba(10,10,12,.25) 45%, rgba(10,10,12,.6) 100%); }
body.map-mode .map-scrim { opacity: 0; }
.hero { padding: 88px clamp(20px, 6vw, 72px) calc(var(--tabbar-h) + 40px); }
.hero-inner { max-width: 640px; }
h1 { font-size: clamp(2.5rem, 9vw, 4.4rem); text-shadow: none; }
.sub { margin: 12px 0 24px; font-size: clamp(1rem, 2.2vw, 1.25rem); color: rgba(255,255,255,.82); }
.ask { box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hchip { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font: 600 .875rem var(--font); text-decoration: none; cursor: pointer; }
.hchip:hover { background: rgba(255,255,255,.22); }
.hchip svg { flex: none; }
body.map-mode .hero-inner { opacity: 0; transform: translateY(20px); visibility: hidden; }

/* bottom tab bar: a plain iOS-style bar, active tab in red, no filled bubbles */
.tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; padding: 4px 4px env(safe-area-inset-bottom); min-height: var(--tabbar-h); background: rgba(255,255,255,.94); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 -1px 0 var(--c-line); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; color: var(--c-ink-3); text-decoration: none; font-size: .75rem; font-weight: 600; letter-spacing: .01em; }
.tabbar a svg { stroke-width: 1.8; }
.tabbar a:hover { color: var(--c-ink); }
.tabbar a[aria-current="page"] { color: var(--c-primary); }
.tabbar a[aria-current="page"] svg { stroke-width: 2.2; }
@media (min-width: 900px) { .tabbar { display: none; } .views { padding-bottom: 40px; } }
.views { padding-bottom: calc(var(--tabbar-h) + 32px); border-radius: 0; }
.toast { bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); }

/* cards: quiet secondary buttons; red is kept for the one main action */
.card { box-shadow: var(--shadow-sm); }
.card .actions button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: var(--r-pill); border: 0; font-weight: 700; font-size: .875rem; background: var(--c-accent); color: var(--c-ink); }
.card .actions button.plan { background: var(--c-fill); color: #fff; }
.card .actions button.plan.on { background: var(--c-blue); }
.chip[aria-selected="true"] { background: var(--c-fill); border-color: var(--c-fill); }
.filters button.on { background: var(--c-fill); border-color: var(--c-fill); color: #fff; }
.seg button[aria-selected="true"] { background: var(--c-fill); }
.num { background: var(--c-fill); }
.tag.secret { background: var(--c-blue); }
.flag { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px; border-radius: 5px; background: var(--c-primary); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .02em; }
.also { margin: 6px 0 0; font-size: .875rem; color: var(--c-ink-2); }
.also button { border: 0; background: var(--c-accent); border-radius: var(--r-pill); padding: 6px 12px; margin: 4px 6px 0 0; font: 600 .875rem var(--font); color: var(--c-ink); min-height: 34px; }

/* ---------- map markers: small, calm, coloured by category ---------- */
.pin { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.pin.dot::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--pc, var(--c-ink)); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s; }
.pin.dot:hover::before { transform: scale(1.25); }
.pin.dot.sel::before { width: 18px; height: 18px; border-width: 3px; box-shadow: 0 0 0 4px rgba(23,34,59,.25), 0 2px 6px rgba(0,0,0,.35); }
.pin.secret svg { width: 18px; height: 18px; fill: var(--c-blue); stroke: #fff; stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); transition: transform .15s; }
.pin.secret.sel svg { transform: scale(1.35); fill: var(--c-blue); stroke: #fff; }
.pin.num span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c-fill); color: #fff; font: 800 12px var(--font); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.pin.num.sel span { background: var(--c-primary); transform: scale(1.15); }
.pin.me::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #0098D4; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(0,152,212,.25); }
.cluster { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--c-ink); font: 800 13px var(--font); box-shadow: 0 0 0 4px rgba(17,18,20,.12), 0 2px 8px rgba(0,0,0,.25); }
.leaflet-tooltip.pin-label { padding: 4px 9px; border: 0; border-radius: var(--r-sm); background: var(--c-fill); color: #fff; font: 700 .875rem var(--font); box-shadow: var(--shadow-sm); }
.leaflet-tooltip.pin-label::before { border-top-color: var(--c-ink); }
@media (max-width: 899px) { #map .leaflet-bottom.leaflet-right { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); } }

/* ---------- map controls (map mode only) ---------- */
.map-ctl, .back-fab { display: none; }
body.map-mode .map-ctl { display: flex; }
body.map-mode .back-fab:not([hidden]) { display: grid; }
.map-ctl { position: fixed; z-index: 25; right: 12px; top: calc(var(--topbar-h) + env(safe-area-inset-top) + 12px); flex-direction: column; align-items: flex-end; gap: 8px; }
.fab { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--c-line); cursor: pointer; }
.fab:hover, .fab[aria-expanded="true"] { background: var(--c-fill); color: #fff; }
.back-fab { position: fixed; z-index: 25; left: 12px; top: calc(var(--topbar-h) + env(safe-area-inset-top) + 12px); font-size: 1.125rem; }
.layers-panel { position: absolute; right: 54px; top: 0; width: 230px; padding: 14px; border-radius: var(--r-md); background: var(--c-surface); box-shadow: var(--shadow); display: grid; gap: 10px; }
.lp-title { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); }
.seg.small { margin: 0; display: grid; grid-template-columns: 1fr 1fr; }
.seg.small button { min-height: 36px; padding: 0 10px; font-size: .875rem; }
.seg.small button.on { background: var(--c-fill); color: #fff; }
.switch { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 600; font-size: .875rem; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--c-ink); margin: 0; }
.map-ctl .hint { margin: 0; max-width: 220px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--c-fill); color: #fff; font-size: .875rem; font-weight: 600; box-shadow: var(--shadow-sm); }

/* ---------- peek card: tapping a pin shows a short preview first ---------- */
.peek { position: fixed; z-index: 26; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); max-width: 440px; display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; padding: 10px 44px 10px 10px; border-radius: var(--r-md); background: var(--c-surface); box-shadow: var(--shadow); }
.peek img, .peek .noimg { width: 84px; height: 84px; border-radius: var(--r-sm); object-fit: cover; background: var(--c-accent); display: grid; place-items: center; font-size: 1.75rem; }
.peek h3 { margin: 0; font: 600 1rem/1.25 var(--font); }
.peek p { margin: 2px 0 8px; font-size: .875rem; color: var(--c-ink-2); }
.peek .row { display: flex; gap: 6px; flex-wrap: wrap; }
.peek .row button { min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 0; font: 700 .875rem var(--font); background: var(--c-accent); color: var(--c-ink); }
.peek .row button.plan { background: var(--c-fill); color: #fff; }
.peek .row button.plan.on { background: var(--c-blue); }
.peek .x { position: absolute; top: 6px; right: 6px; }
@media (min-width: 900px) { .peek { left: auto; right: 24px; bottom: 24px; } }
.stopcard { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); }
.sheet { padding-bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .sheet { padding-bottom: 16px; } .stopcard { bottom: 24px; } }

/* OpenStreetMap colours toned down so the places, not the base map, carry the colour */
.tiles-soft { filter: saturate(.4) brightness(1.04) contrast(.94); }

/* =====================================================================
   Explore: search, one chip row, compact list; My day timeline; day tray
   ===================================================================== */
.ex-top { position: sticky; top: 0; z-index: 4; background: rgba(247,244,238,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 16px clamp(16px, 4vw, 40px) 10px; box-shadow: 0 1px 0 var(--c-line); }
.ex-head { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ex-head h2 { margin: 0; font: 600 clamp(1.5rem, 5vw, 2rem)/1.1 var(--font-display); }
.ex-head .seg { margin: 0; }
.ex-head .seg button { min-height: 38px; padding: 0 16px; font-size: .875rem; }
#browseBar { max-width: 1240px; margin: 12px auto 0; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; min-height: 48px; border-radius: var(--r-pill); background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); color: var(--c-ink-3); }
.search:focus-within { box-shadow: 0 0 0 2px var(--c-ink); color: var(--c-ink); }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: 500 1rem var(--font); color: var(--c-ink); min-height: 44px; }
.search input:focus { outline: none; box-shadow: none; }
.search:focus-within { box-shadow: 0 0 0 2px var(--c-blue); }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--c-accent); color: var(--c-ink-2); }
.chiprow { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.chiprow .chips { flex: 1; min-width: 0; padding: 2px 0; gap: 6px; }
.chiprow .chip { min-height: 36px; padding: 0 14px; border-width: 1px; font-size: .875rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.cdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); flex: none; font-style: normal; }
.chip[aria-selected="true"] .cdot { box-shadow: 0 0 0 2px #fff; }
.filter-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--c-line); background: var(--c-surface); font: 600 .875rem var(--font); color: var(--c-ink); }
.filter-btn[aria-expanded="true"] { background: var(--c-fill); color: #fff; border-color: var(--c-fill); }
.filter-btn .badge-n { margin-left: 0; }
.filter-panel { display: grid; gap: 10px; margin-top: 10px; padding: 14px; border-radius: var(--r-md); background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); max-width: 480px; }
.seg.small.three { grid-template-columns: repeat(3, 1fr); }
.seg.small.three button { font-size: .875rem; padding: 0 6px; }
#catFilters button.on { background: var(--c-fill); color: #fff; border-color: transparent; }
#subBrowse, #subPlan { padding-top: 12px; }
.result-meta { margin: 0 0 8px; font-size: .875rem; color: var(--c-ink-2); }

/* compact rows: 6-8 places per phone screen */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; background: var(--c-line); border-radius: var(--r-md); overflow: hidden; box-shadow: 0 0 0 1px var(--c-line); }
@media (min-width: 900px) { .rows { grid-template-columns: 1fr 1fr; gap: 1px; } }
.ri { display: flex; align-items: center; gap: 4px; padding-right: 10px; background: var(--c-surface); }
.ri-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 10px; border: 0; background: none; text-align: left; color: var(--c-ink); cursor: pointer; }
.ri-main img, .ri-main .noimg { flex: none; width: 64px; height: 64px; border-radius: var(--r-sm); object-fit: cover; background: var(--c-accent); display: grid; place-items: center; font-size: 1.35rem; }
.ri-text { min-width: 0; display: grid; gap: 3px; }
.ri-text b { font: 600 1rem/1.3 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-text small { display: flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--c-ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ri-text .ri-secret { color: var(--c-blue); font-weight: 700; }
.ri-main:hover b { text-decoration: underline; text-underline-offset: 3px; }
.ri-add { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--c-line); background: var(--c-surface); color: var(--c-ink); cursor: pointer; transition: background .15s, transform .15s; }
.ri-add:hover { border-color: var(--c-fill); }
.ri-add.on { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }
.ri-add:active { transform: scale(.92); }
.map-pill { position: fixed; z-index: 12; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--r-pill); background: var(--c-fill); color: #fff; font: 700 .875rem var(--font); box-shadow: var(--shadow); cursor: pointer; }
body:not([data-tab="explore"]) .map-pill, .map-pill[hidden] { display: none; }
body.has-tray .map-pill { bottom: calc(var(--tabbar-h) + 88px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .map-pill { bottom: 28px; } body.has-tray .map-pill { bottom: 104px; } }

/* day tray: your day is always one tap away while browsing */
.day-tray { position: fixed; z-index: 13; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); display: none; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border: 0; border-radius: var(--r-md); background: var(--c-fill); color: #fff; text-align: left; box-shadow: var(--shadow); cursor: pointer; font: inherit; }
body[data-tab="explore"] .day-tray:not([hidden]), body[data-tab="walks"] .day-tray:not([hidden]), body[data-tab="themes"] .day-tray:not([hidden]) { display: flex; }
body.map-mode .day-tray { display: none !important; }
@media (min-width: 900px) { .day-tray { left: auto; right: 24px; bottom: 24px; width: 380px; } }
.dt-cal { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r-sm); background: var(--c-primary); line-height: 1; }
.dt-cal b { font-size: 1.125rem; }
.dt-cal small { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.dt-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dt-text b { font-size: 1rem; }
.dt-text small { font-size: .875rem; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-go { flex: none; font-weight: 700; font-size: .875rem; }
#views { padding-bottom: calc(var(--tabbar-h) + 150px); }

/* my day: date strip + timeline */
.datestrip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
.datestrip::-webkit-scrollbar { display: none; }
.dchip { flex: none; scroll-snap-align: start; position: relative; display: grid; place-items: center; gap: 2px; width: 54px; min-height: 64px; border-radius: var(--r-sm); border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink); cursor: pointer; }
.dchip small { font-size: .75rem; font-weight: 600; color: var(--c-ink-2); }
.dchip b { font-size: 1.125rem; }
.dchip.has::after { content: ""; position: absolute; bottom: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--c-primary); }
.dchip[aria-pressed="true"] { background: var(--c-fill); border-color: var(--c-fill); color: #fff; }
.dchip[aria-pressed="true"] small { color: rgba(255,255,255,.75); }
.dchip[aria-pressed="true"].has::after { background: #fff; }
.dchip.more b { font-size: 1.125rem; color: var(--c-ink-2); }
#cal { max-width: 380px; margin-bottom: 12px; }
.day { max-width: 760px; }
.day-head h3 { margin: 4px 0 2px; font: 600 1.35rem/1.2 var(--font-display); }
.day-head .muted { margin: 0; font-weight: 600; }
.day-opts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 14px 0 6px; }
.opt { display: grid; gap: 4px; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c-ink-3); }
.opt.grow { flex: 1; min-width: 160px; }
.opt input[type="time"], .opt select { min-height: 42px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-bg); font: 600 1rem var(--font); color: var(--c-ink); text-transform: none; letter-spacing: 0; }
.opt.sw { display: flex; align-items: center; gap: 8px; min-height: 42px; text-transform: none; letter-spacing: 0; font-size: .875rem; color: var(--c-ink); cursor: pointer; }
.opt.sw input { width: 20px; height: 20px; accent-color: var(--c-ink); }
.hotel-form { display: flex; gap: 8px; margin: 6px 0; }
.hotel-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid var(--c-line); border-radius: var(--r-pill); font: inherit; }
.timeline { list-style: none; margin: 12px 0 0; padding: 0; }
.tl-stop { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: start; }
.tl-time { display: grid; padding-top: 12px; text-align: right; line-height: 1.2; }
.tl-time b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.tl-time small { font-size: .75rem; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.tl-card { position: relative; display: grid; grid-template-columns: auto auto 1fr auto auto auto; align-items: center; gap: 4px 10px; padding: 10px; border-radius: var(--r-md); background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); }
.tl-card .num { width: 26px; height: 26px; font-size: .875rem; display: grid; place-items: center; border-radius: 50%; background: var(--c-fill); color: #fff; font-weight: 800; }
.tl-card img, .tl-card .noimg { width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover; background: var(--c-accent); }
.tl-card .name { min-width: 0; border: 0; background: none; text-align: left; font: 600 1rem/1.25 var(--font); color: var(--c-ink); display: grid; gap: 2px; cursor: pointer; padding: 0; }
.tl-card .name small { font: 500 .75rem var(--font); color: var(--c-ink-2); }
.stay { grid-column: 3 / -1; display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--c-ink-2); }
.stay b { min-width: 58px; text-align: center; font-size: .875rem; color: var(--c-ink); }
.step { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--c-line); background: var(--c-surface); font-weight: 700; color: var(--c-ink); }
.step:disabled { opacity: .35; }
.tl-leg { display: flex; align-items: center; gap: 8px; margin: 0 0 0 62px; padding: 8px 0 8px 14px; border-left: 2px dashed var(--c-line); font-size: .875rem; font-weight: 600; color: var(--c-ink-2); }
.tl-leg.transit { border-left-style: solid; border-left-color: var(--c-blue); color: var(--c-blue); }
.tl-ico { display: grid; place-items: center; width: 22px; height: 22px; margin-left: -26px; border-radius: 50%; background: var(--c-bg); }
.tl-leg .link { margin-left: auto; min-height: 30px; padding: 0 4px; font-size: .875rem; }
.empty { padding: 18px; border-radius: var(--r-md); background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); display: grid; gap: 12px; justify-items: start; margin-top: 12px; }
.empty p { margin: 0; color: var(--c-ink-2); }
.before { margin-top: 22px; padding: 14px; border-radius: var(--r-md); background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); }
.before summary { cursor: pointer; font-weight: 700; min-height: 28px; }
.before[open] summary { margin-bottom: 10px; }
body.has-tray .toast { bottom: calc(var(--tabbar-h) + 96px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { body.has-tray .toast { bottom: 110px; } }

/* timeline card: photo with the stop number, name gets the width, actions grouped */
.tl-card { grid-template-columns: auto 1fr auto; gap: 6px 12px; }
.tl-thumb { position: relative; flex: none; }
.tl-thumb .num { position: absolute; left: -6px; top: -6px; width: 22px; height: 22px; font-size: .75rem; box-shadow: 0 0 0 2px #fff; }
.tl-act { display: flex; align-items: center; gap: 2px; align-self: start; }
.tl-act .x, .tl-act .mv { width: 34px; height: 34px; }
.stay { grid-column: 2 / -1; }
@media (max-width: 480px) { .tl-stop { grid-template-columns: 44px 1fr; gap: 8px; } .tl-leg { margin-left: 52px; } }

/* =====================================================================
   Place details: bottom sheet on phones, fixed action bar
   ===================================================================== */
dialog#detail { padding: 0; overflow: auto; overscroll-behavior: contain; }
.d-photo { position: relative; aspect-ratio: 16 / 10; }
.d-ph { display: grid; place-items: center; width: 100%; height: 100%; }
.d-ph .ico { width: 56px; height: 56px; }
.d-grab { display: none; }
.d-body { gap: 14px; padding: 18px 20px 20px; }
.d-body h2 { font-size: clamp(1.55rem, 5vw, 1.9rem); }
.d-body h3 { margin: 6px 0 0; font-size: 1rem; }
.d-desc { margin: 0; font-size: 1rem; line-height: 1.55; color: var(--c-ink-2); }
.d-facts { display: grid; gap: 8px; margin: 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); }
.d-facts div { display: grid; grid-template-columns: 76px 1fr; gap: 8px; font-size: .875rem; }
.d-facts dt { font-weight: 700; color: var(--c-ink-3); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.d-facts dd { margin: 0; color: var(--c-ink); overflow-wrap: anywhere; }
.tag .cdot { margin-right: 2px; vertical-align: 1px; }
.acc-list { list-style: none; margin: 0; padding: 0; display: grid; border-radius: var(--r-sm); overflow: hidden; background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); }
.acc-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--c-line); }
.acc-list li:first-child { border-top: 0; }
.acc-main { display: grid; gap: 4px; min-width: 0; }
.acc-main b { font-size: 1rem; }
.acc-main small { font-size: .75rem; color: var(--c-ink-3); }
.acc-chips .lc { margin: 0 4px 0 0; padding: 1px 7px; font-size: .75rem; }
.acc-walk { font-size: .875rem; font-weight: 700; color: var(--c-ink-2); white-space: nowrap; }
.d-journey .jform { margin-top: 0; padding: 14px; border: 0; border-radius: var(--r-sm); background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); }
.credit { margin: 0; }
.d-bar { position: sticky; bottom: 0; z-index: 2; display: flex; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 -1px 0 var(--c-line); }
.d-bar .btn { min-height: 48px; padding: 0 14px; font-size: .875rem; }
.d-bar .btn.ghost-dark { border-width: 1px; background: var(--c-surface); }
.d-bar .plan { flex: 1; }
.d-bar .plan.on { background: var(--c-blue); }
@media (max-width: 699px) {
  dialog#detail { width: 100%; max-width: 100%; margin: auto 0 0; max-height: 94svh; border-radius: var(--r-lg) 22px 0 0; animation: sheetUp .28s cubic-bezier(.2, .8, .2, 1); }
  .d-grab { display: block; position: absolute; z-index: 4; top: 8px; left: 50%; width: 42px; height: 5px; margin-left: -21px; border-radius: 3px; background: rgba(255,255,255,.9); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
  .d-bar .btn.ghost-dark { padding: 0 12px; }
}
@keyframes sheetUp { from { transform: translateY(60px); opacity: .4; } }

/* ---------- My day: preview map, drag handle, suggestions ---------- */
.daymap { position: relative; isolation: isolate; height: 170px; margin: 2px 0 12px; border-radius: var(--r-md); overflow: hidden; box-shadow: 0 0 0 1px var(--c-line); max-width: 760px; }
.daymap-inner { position: absolute; inset: 0; }
.daymap .leaflet-control-attribution { font-size: 12px; }
.daymap-open { position: absolute; z-index: 500; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--c-surface); color: var(--c-ink); font: 700 .875rem var(--font); box-shadow: var(--shadow-sm); cursor: pointer; }
.grip { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--c-ink-3); cursor: grab; touch-action: none; }
.grip:hover { background: var(--c-accent); color: var(--c-ink); }
.tl-stop.dragging { position: relative; z-index: 5; }
.tl-stop.dragging .tl-card { box-shadow: var(--shadow), 0 0 0 2px var(--c-ink); }
.tl-stop.drop-before .tl-card { box-shadow: 0 -3px 0 var(--c-primary), 0 0 0 1px var(--c-line); }
.tl-stop.drop-after .tl-card { box-shadow: 0 3px 0 var(--c-primary), 0 0 0 1px var(--c-line); }
.along { margin-top: 22px; }
.along h4 { margin: 0 0 8px; }
.along .rows { grid-template-columns: 1fr; }
.sync-note { margin: 18px 0 0; font-size: .875rem; color: var(--c-ink-2); }
.sync-note .link { padding: 0; min-height: 0; font-size: .875rem; }

/* ---------- opening hours ---------- */
.ri-flags { display: flex; align-items: center; gap: 6px; }
.oh { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.oh.open { background: #E3F4E8; color: #0B6B2E; }
.oh.shut { background: var(--c-accent); color: var(--c-ink-2); }
.oh.free { background: #E8ECFA; color: var(--c-blue); }
.oh-box { padding: 12px 14px; border-radius: var(--r-sm); background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); }
.oh-box summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; font-size: .875rem; list-style: none; }
.oh-box summary::-webkit-details-marker { display: none; }
.oh-box summary::after { content: "›"; font-size: 1.125rem; color: var(--c-ink-3); transform: rotate(90deg); transition: transform .2s; }
.oh-box[open] summary::after { transform: rotate(-90deg); }
.oh-box summary .oh { margin-left: auto; }
.oh-state.open { color: #0B6B2E; }
.oh-state.shut { color: var(--c-accent-red); }
.oh-week { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: .875rem; }
.oh-week li { display: flex; justify-content: space-between; gap: 10px; }
.oh-week li:first-child { font-weight: 700; }
.oh-raw { margin: 10px 0 0; font-size: .875rem; color: var(--c-ink-2); }
.oh-src { margin: 8px 0 0; font-size: .75rem; color: var(--c-ink-3); }
.tl-warn { grid-column: 2 / -1; margin: 0; padding: 5px 9px; border-radius: var(--r-sm); background: #FFF3D6; color: #7A4B00; font-size: .875rem; font-weight: 600; }
.tl-warn.head { display: inline-block; margin-top: 6px; }
.tl-hours { grid-column: 2 / -1; margin: 0; font-size: .75rem; color: var(--c-ink-3); }
.btnrow .btn.ghost-dark { border-width: 1px; background: var(--c-surface); min-height: 44px; padding: 0 14px; }

/* ---------- tabs: Home · Explore · My day · Walks · More ---------- */
.tabbar a { position: relative; }
.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-sm); background: var(--c-primary); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.tab-badge[hidden] { display: none; }
.chip.secret-chip { color: var(--c-blue); border-color: #C9CDF0; }
.chip.secret-chip[aria-pressed="true"] { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }
#view-day .ex-head h2 { margin: 0; }

/* a walk inside "My day" reads as a block */
.tl-stop.walk .tl-card { background: linear-gradient(90deg, rgba(132,184,23,.12), var(--c-surface) 40%); box-shadow: 0 0 0 1px #CFE3A8; }
.tl-stop.walk .tl-thumb .num { background: #4E7A0E; }
.walk-add { margin: 8px 0 2px; width: 100%; }
.card.walk .actions button.plan { background: var(--c-fill); color: #fff; }
.card.walk .actions button.plan.on { background: var(--c-blue); }

/* ---------- About (Wikipedia) and Good to know ---------- */
.d-about p:first-child { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--c-ink); }
.d-about .credit { margin: 6px 0 0; }
.good h3 { margin: 4px 0 8px; }
.good ul { list-style: none; margin: 0; padding: 0; display: grid; border-radius: var(--r-sm); overflow: hidden; background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); }
.good li { border-top: 1px solid var(--c-line); }
.good li:first-child { border-top: 0; }
.good li, .good li button { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 11px 14px; font-size: .875rem; }
.good li:has(button) { display: block; padding: 0; }
.good li button { width: 100%; border: 0; background: none; text-align: left; color: var(--c-ink); font: inherit; cursor: pointer; }
.good li button:hover { background: var(--c-bg); }
.g-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--c-accent); font-size: .875rem; }
.g-go { color: var(--c-ink-3); font-size: 1.125rem; }

.credit.wv { margin: -4px 0 0; }

/* ---------- Themes (special interest) ---------- */
.theme-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 700px) { .theme-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .theme-grid { grid-template-columns: repeat(3, 1fr); } }
.theme-card { position: relative; min-height: 170px; border: 0; border-radius: var(--r-md); overflow: hidden; background: linear-gradient(135deg, #2A2C31, #111214); color: #fff; text-align: left; cursor: pointer; box-shadow: var(--shadow-sm); padding: 0; }
.theme-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.theme-card:hover img { transform: scale(1.04); }
.theme-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,12,.05) 20%, rgba(10,10,12,.78)); }
.tc-text { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 14px; display: grid; gap: 2px; }
.tc-emoji { font-size: 1.35rem; }
.tc-text b { font: 600 1.35rem/1.15 var(--font-display); }
.tc-text small { font-size: .875rem; opacity: .9; }
.tc-count { margin-top: 4px; font-weight: 700; opacity: 1 !important; }
#themeDetail .back { padding: 0; min-height: 36px; }
.theme-hero { height: 180px; border-radius: var(--r-md); overflow: hidden; margin: 6px 0 12px; }
.theme-hero img { width: 100%; height: 100%; object-fit: cover; }
.theme-title { margin: 0; font: 600 1.75rem/1.15 var(--font-display); }
.theme-sub { margin: 4px 0 0; font-weight: 600; color: var(--c-ink-2); }
.theme-intro { margin: 10px 0 0; line-height: 1.55; max-width: 70ch; }
#themeDetail .btnrow { margin: 14px 0; }
.ri-note { color: var(--c-ink); font-style: italic; white-space: normal !important; }

/* sub-themes and price bands */
.sub-h { margin: 18px 0 8px; font: 700 .875rem/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-2); }
.subthemes { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.subtheme { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; min-height: 56px; border: 1px solid var(--c-line, #E2E3E6);
  border-radius: var(--r-md); background: #fff; color: var(--c-ink); cursor: pointer; font: inherit; }
.subtheme:hover { border-color: var(--c-blue); }
.subtheme b { display: block; font-size: 1rem; line-height: 1.2; }
.subtheme small { color: var(--c-ink-2); font-size: .875rem; }
.st-emoji { font-size: 1.35rem; }
.oh.price { background: #EEF0FB; color: var(--c-blue); font-weight: 700; letter-spacing: .02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- city.beacon logo ---------- */
.brand { gap: 0; }
.brand img { display: block; height: 50px; width: auto; }
.brand .logo-on-light { display: none; }
body.map-mode .brand .logo-on-dark, body.view-open .brand .logo-on-dark { display: none; }
body.map-mode .brand .logo-on-light, body.view-open .brand .logo-on-light { display: block; }
@media (max-width: 460px) { .brand img { height: 46px; } }

/* chat results: places without a photo show their category symbol; OSM places show cuisine and street */
.res .noimg { display: grid; place-items: center; }
.res .res-desc { margin-top: 2px; font-size: .875rem; color: var(--c-ink-2); }

/* London right now, under the day plan */
.day-news { border-top: 1px solid var(--c-line); }
.day-news .news { grid-template-columns: 1fr; }

/* Mayfair Ink: the logo red marks the one main action on the start page */
.ask .btn.primary { background: var(--c-accent-red); }
.ask .btn.primary:hover { background: #A82014; }
/* drawn category icons on soft tiles (places without a photo) */
.noimg, .ph.none, .d-ph { color: var(--t-stone-ink); background: var(--t-stone); }
.noimg .ico { width: 26px; height: 26px; }
.tint-green { background: var(--t-green) !important; color: var(--t-green-ink); }
.tint-stone { background: var(--t-stone) !important; color: var(--t-stone-ink); }
.tint-amber { background: var(--t-amber) !important; color: var(--t-amber-ink); }
.tint-rose { background: var(--t-rose) !important; color: var(--t-rose-ink); }
.tint-plum { background: var(--t-plum) !important; color: var(--t-plum-ink); }
.tabbar .ico { width: 22px; height: 22px; }
::selection { background: #D7DEEC; color: var(--c-ink); }
/* confirmed wishes on a chat result: "Serves food", "Outdoor seating" */
.res .facts { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.res .facts span { padding: 2px 8px; border-radius: var(--r-pill); background: var(--t-green); color: var(--t-green-ink); font-size: .75rem; font-weight: 600; }
/* seasonal walks: a small red-accent label and a short intro */
.tag.season { background: var(--c-accent-red); color: #fff; }
.card.walk .intro { margin: 8px 0 0; color: var(--c-ink-2); font-size: .875rem; line-height: 1.45; }
/* on the day itself: the stop that is due, with directions from where you are */
.next-stop { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; padding: 14px 16px;
  border-radius: var(--r-md); background: var(--c-primary); color: #fff; }
.next-stop small { display: block; opacity: .8; font-size: .875rem; }
.next-stop b { display: block; font: 600 1.125rem/1.25 var(--font-display); }
.next-stop .btn.primary { background: var(--c-accent-red); flex: none; }
.next-stop.done { display: block; background: var(--t-green); color: var(--t-green-ink); font-weight: 600; }

/* seasonal walks inside a theme page */
.theme-walks { margin: 4px 0 18px; }
/* film location walks: navy label; photo tips under each stop */
.tag.season.s-film { background: var(--c-primary); }
.stop-note { margin: 4px 0 0; font-size: .875rem; color: var(--c-ink-2); line-height: 1.4; }

/* laptop and tablet (landscape): plan beside a large live map that stays in view while the day scrolls */
@media (min-width: 1000px) {
  #subPlan:has(#dayMap:not([hidden])) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 46%); column-gap: 28px; align-items: start; }
  #subPlan:has(#dayMap:not([hidden])) > :not(#dayMap) { grid-column: 1; }
  #subPlan .daymap { grid-column: 2; grid-row: 1 / span 3; position: sticky; top: 84px; height: calc(100vh - var(--topbar-h) - 120px);
    min-height: 420px; max-width: none; margin: 0; }
  #subPlan .day { max-width: none; }
}
.tl-stop.flash .tl-card { box-shadow: 0 0 0 2px var(--c-primary), var(--shadow-sm); transition: box-shadow .2s; }
/* tablet portrait: a taller day map */
@media (min-width: 700px) and (max-width: 999px) { #subPlan .daymap { height: 300px; } }

/* ======================= Dark appearance: Mayfair Ink at night-time reading =======================
   Colours only (Auto / Light / Dark in the account view). Calm navy, warm off-white text, no neon: that belongs to After dark.
   Text contrast on the surfaces: ink 15:1, ink-2 9:1, ink-3 6.6:1, blue 8:1; filled buttons white text 6.4:1. */
body.theme-dark {
  --c-bg: #0F1420; --c-surface: #171E2D; --c-accent: #1F2738; --c-line: #2A3346;
  --c-ink: #F2EFE8; --c-ink-2: #B7BDCA; --c-ink-3: #9AA1B1;
  --c-primary: #3E5BA0; --c-primary-dark: #324B86;
  --c-secondary: #2C3852; --c-fill: #34425F;
  --c-accent-red: #D23B2E;
  --c-blue: #9DB2E6;
  --c-red-tint: #222C42;
  --c-night: #080B12;
  --c-gold: #8FA3D1;
  --t-green: #1C2A25; --t-green-ink: #8FD3A0;
  --t-stone: #1C2640; --t-stone-ink: #A9BCEB;
  --t-amber: #2B2318; --t-amber-ink: #F2C58A;
  --t-rose: #2D1D22; --t-rose-ink: #FF9A8F;
  --t-plum: #261E33; --t-plum-ink: #CDB0F2;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
body.theme-dark:not(.after-dark) .tabbar a[aria-current="page"], body.theme-dark:not(.after-dark) .topnav a[aria-current="page"] { color: var(--c-blue); }
body.theme-dark:not(.after-dark) .oh-state.shut { color: #FF8A80; }

/* ======================= After dark: "Mayfair Midnight" =======================
   The day's navy turned to midnight; the logo red becomes a warm neon (text and fine lines only), amber the second light.
   Text contrast on the midnight surfaces: ink 15:1, ink-2 8.6:1, ink-3 6.2:1, neon 5.6:1, amber 10:1. */
body.after-dark {
  --c-bg: #0D1322; --c-surface: #151D31; --c-accent: #1C2640; --c-line: #26314B;
  --c-ink: #F4F1EA; --c-ink-2: #B4BACB; --c-ink-3: #9AA2B5;
  --c-primary: #C9372C; --c-primary-dark: #A82A20;   /* filled buttons: white text 5:1 */
  --c-secondary: #2A3653; --c-fill: #2A3653;
  --c-neon: #FF5A4E; --c-amber: #FFC067;
  --c-accent-red: #C9372C;
  --c-blue: #8FA8EC;
  --c-red-tint: #2A2030;
  --c-night: #070B14;
  --c-gold: #FF5A4E;
  --t-green: #1C2A25; --t-green-ink: #8FD3A0;
  --t-stone: #1C2640; --t-stone-ink: #A9BCEB;
  --t-amber: #2B2318; --t-amber-ink: #FFC067;
  --t-rose: #2D1D22; --t-rose-ink: #FF9A8F;
  --t-plum: #261E33; --t-plum-ink: #CDB0F2;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
/* surfaces that are written as light colours in the day look */
:is(body.theme-dark, body.after-dark).map-mode .topbar, :is(body.theme-dark, body.after-dark).view-open .topbar { background: rgba(13, 19, 34, .92); }
:is(body.theme-dark, body.after-dark) .ex-top { background: rgba(13, 19, 34, .94); }
:is(body.theme-dark, body.after-dark) .tabbar { background: rgba(13, 19, 34, .94); box-shadow: 0 -1px 0 var(--c-line); }
:is(body.theme-dark, body.after-dark) .d-bar { background: rgba(21, 29, 49, .96); }
:is(body.theme-dark, body.after-dark) .ask { background: rgba(21, 29, 49, .96); }
:is(body.theme-dark, body.after-dark) .ask input { color: var(--c-ink); }
:is(body.theme-dark, body.after-dark) .ask input::placeholder { color: var(--c-ink-3); }
:is(body.theme-dark, body.after-dark) dialog .close, :is(body.theme-dark, body.after-dark) .cluster { background: var(--c-surface); color: var(--c-ink); }
:is(body.theme-dark, body.after-dark) .btn.light, :is(body.theme-dark, body.after-dark) .subtheme { background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line); }
:is(body.theme-dark, body.after-dark) .btn.accent { background: var(--c-surface); color: var(--c-blue); }
:is(body.theme-dark, body.after-dark) .field input, :is(body.theme-dark, body.after-dark) .todo-form input, :is(body.theme-dark, body.after-dark) select, :is(body.theme-dark, body.after-dark) input[type="time"] { background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line); }
:is(body.theme-dark, body.after-dark) .note.warn, :is(body.theme-dark, body.after-dark) .note.bad, :is(body.theme-dark, body.after-dark) .jopt .warn { background: #3A1E22; color: #FFC9C3; }
:is(body.theme-dark, body.after-dark) .tl-warn { background: #33280F; color: var(--c-amber); }
:is(body.theme-dark, body.after-dark) .oh.open { background: #16302A; color: #8FD3A0; }
:is(body.theme-dark, body.after-dark) .oh.free, :is(body.theme-dark, body.after-dark) .oh.price { background: var(--c-accent); color: var(--c-blue); }
:is(body.theme-dark, body.after-dark) .toast { background: #F4F1EA; color: #0D1322; }
/* white text on the light night-blue would be unreadable: those fills get dark text */
:is(body.theme-dark, body.after-dark) .tag.secret, :is(body.theme-dark, body.after-dark) .chip.secret-chip[aria-pressed="true"], :is(body.theme-dark, body.after-dark) .ri-add.on,
:is(body.theme-dark, body.after-dark) .card .actions button.plan.on, :is(body.theme-dark, body.after-dark) .peek .row button.plan.on, :is(body.theme-dark, body.after-dark) .d-bar .plan.on,
:is(body.theme-dark, body.after-dark) .account-btn.signed, :is(body.theme-dark, body.after-dark) .avatar, :is(body.theme-dark, body.after-dark) .g { color: #0D1322; }
/* the neon: active places, the brand's accent, fine outlines */
body.after-dark .tabbar a[aria-current="page"], body.after-dark .topnav a[aria-current="page"] { color: var(--c-neon); }
body.after-dark .topnav a[aria-current="page"] { background: var(--c-red-tint); }
body.after-dark .oh-state.shut { color: var(--c-neon); }
body.after-dark .tag.season { background: transparent; color: var(--c-neon); box-shadow: inset 0 0 0 1px var(--c-neon); }
body.after-dark .tag.season.s-afterdark { color: var(--c-amber); box-shadow: inset 0 0 0 1px var(--c-amber); }
body.after-dark .chip[aria-selected="true"] { background: transparent; color: var(--c-neon); border-color: var(--c-neon); }
body.after-dark .res .facts span { background: var(--t-green); color: var(--t-green-ink); }
body.after-dark .next-stop { background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-neon); }
/* the logo: always the light-on-dark version at night */
:is(body.theme-dark, body.after-dark).map-mode .brand .logo-on-dark { display: block; }
:is(body.theme-dark, body.after-dark).map-mode .brand .logo-on-light { display: none; }
/* the map at night: dark streets, the start page a deep midnight blue behind the white text */
:is(body.theme-dark, body.after-dark):not(.intro-mode) #map .leaflet-tile-pane, :is(body.theme-dark, body.after-dark) .daymap .leaflet-tile-pane, :is(body.theme-dark, body.after-dark) .popmap .leaflet-tile-pane {
  filter: invert(1) hue-rotate(185deg) brightness(.85) contrast(.92) saturate(.5); }
body.after-dark.intro-mode #map .leaflet-tile-pane { filter: invert(1) hue-rotate(195deg) brightness(.5) saturate(.7) contrast(1.05); }
/* the switch on the start page */
.hchip.mode-chip .ico { width: 16px; height: 16px; }
body.after-dark .hchip.mode-chip { color: var(--c-amber); border-color: rgba(255, 192, 103, .55); }
/* the same switch in the My day / My night header */
#view-day .ex-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mode-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill);
  border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink); font: 600 .875rem var(--font); cursor: pointer; }
.mode-toggle .ico { width: 16px; height: 16px; }
body.after-dark .mode-toggle { color: var(--c-amber); border-color: rgba(255, 192, 103, .55); }
:is(body.theme-dark, body.after-dark) .tag { background: var(--c-accent); color: var(--c-ink-2); }
/* canal and river trips */
.tag.season.s-water { background: var(--c-blue); }
.tag.boat { display: inline-flex; align-items: center; gap: 4px; background: var(--t-stone); color: var(--t-stone-ink); }
.tag.boat .ico { width: 14px; height: 14px; }

/* After dark: "Tonight in London" event cards */
.tonight { padding-top: 8px; }
.tn-when-seg { margin: 4px 0 10px; }
.tn-when-seg button[aria-pressed="true"] { background: var(--c-fill); color: #fff; }
.tn-styles { margin-bottom: 12px; }
.tn-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 300px); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.tn-card { scroll-snap-align: start; display: flex; flex-direction: column; border-radius: var(--r-md); overflow: hidden; background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line); }
.tn-card img, .tn-ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tn-ph { display: grid; place-items: center; background: var(--t-plum); color: var(--t-plum-ink); }
.tn-body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.tn-when { margin: 0; font-size: .875rem; font-weight: 700; color: var(--c-neon, var(--c-accent-red)); letter-spacing: .02em; }
.tn-body h4 { margin: 0; font: 700 1rem/1.3 var(--font); }
.tn-venue { margin: 0; font-size: .875rem; color: var(--c-ink-2); }
.tn-genres { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 0; }
.tn-genres span { padding: 2px 8px; border-radius: var(--r-pill); font-size: .75rem; font-weight: 600; background: var(--c-accent); color: var(--c-ink-2); }
.tn-actions { display: flex; gap: 8px; margin-top: 8px; }
.tn-actions .btn { min-height: 40px; padding: 0 14px; }
.tn-checked { margin: 4px 0 0; font-size: .75rem; color: var(--c-ink-3); }
.tn-empty { margin: 0; padding: 14px 16px; border-radius: var(--r-md); background: var(--c-surface); color: var(--c-ink-2); box-shadow: inset 0 0 0 1px var(--c-line); }

/* ======================= Meeting 25 Nov: top bar, divider, parallax, contrast ======================= */
/* the top bar names the page inside the app; the logo stays on the start page and the map */
.page-title { display: none; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 1.35rem/1.2 var(--font-display); letter-spacing: -.01em; color: var(--c-ink); }
body.view-open .brand { display: none; }
body.view-open .page-title { display: block; }
/* the page's own heading moved up into the bar: kept for screen readers, hidden on screen */
body.view-open .view .ex-head h2, body.view-open .view > .head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#view-themes .ex-top { padding: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
#view-day .ex-head { justify-content: flex-end; }
/* Special interest and every other tab: a clear edge once content scrolls under the bar */
body.view-open .topbar { box-shadow: 0 1px 0 var(--c-line); }
body.view-open.scrolled .topbar { box-shadow: 0 1px 0 var(--c-line), 0 10px 22px -12px rgba(15, 20, 32, .38); }
:is(body.theme-dark, body.after-dark).view-open.scrolled .topbar { box-shadow: 0 1px 0 var(--c-line), 0 10px 22px -10px rgba(0, 0, 0, .7); }
.ex-top { box-shadow: 0 1px 0 var(--c-line), 0 10px 22px -14px rgba(15, 20, 32, .32); }
/* Film locations: readable text on the walk cards and over the theme photos */
.card.walk .intro { color: var(--c-ink); }
.theme-card::after { background: linear-gradient(180deg, rgba(10,10,12,.08) 0%, rgba(10,10,12,.35) 40%, rgba(10,10,12,.86) 100%); }
.tc-text { text-shadow: 0 1px 12px rgba(0, 0, 0, .45); }
.tc-text small { opacity: 1; }
/* parallax: list photos sit in a frame and drift inside it */
.pimg { flex: none; display: block; overflow: hidden; background: var(--c-accent); }
.ri-main .pimg { width: 64px; height: 64px; border-radius: var(--r-sm); }
.res .pimg { width: 76px; height: 76px; border-radius: var(--r-sm); }
.pimg img, .ri-main .pimg img, .res .pimg img { width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .pimg img, .card .ph img, .theme-card > img, .theme-hero img { transform: translate3d(0, var(--py, 0px), 0) scale(1.18); transition: transform .5s; }
  .card:hover .ph img, .theme-card:hover > img { transform: translate3d(0, var(--py, 0px), 0) scale(1.23); }
}
/* the appearance setting */
.appearance { margin-bottom: 18px; }
.appearance .seg { max-width: 360px; margin: 8px 0 6px; }
.appearance .seg button.on { background: var(--c-fill); color: #fff; }
/* My day: the bar's switch does the job, so the second one under it goes */
#modeBtnDay { display: none; }
#view-day .ex-top { padding: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ======================= Pop-up map (pages inside the app) ======================= */
.popmap { position: fixed; inset: auto 0 0; width: 100%; max-width: none; height: 92svh; max-height: none; margin: 0; padding: 0; border: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--c-bg); color: var(--c-ink); box-shadow: 0 -12px 40px rgba(10, 10, 12, .35); overflow: hidden; }
.popmap[open] { display: grid; grid-template-rows: auto 1fr auto; animation: pm-up .34s cubic-bezier(.2, .8, .2, 1); }
.popmap::backdrop { background: rgba(10, 10, 12, .45); }
@keyframes pm-up { from { transform: translateY(48px); opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .popmap[open] { animation: none; } }
.pm-head { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 18px 16px 10px; }
.pm-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--c-line); }
.pm-head > div { flex: 1; min-width: 0; }
.pm-head h2 { margin: 0; font: 600 1.35rem/1.2 var(--font-display); }
.pm-head p { margin: 2px 0 0; font-size: .875rem; color: var(--c-ink-2); }
.pm-head p:empty { display: none; }
.pm-map { min-height: 220px; background: var(--c-accent); }
.pm-list { max-height: 38svh; overflow: auto; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--c-line); }
.pm-list .sheet-body { overflow: visible; padding: 0; }
.popmap.no-list .pm-list { display: none; }
.popmap.no-list[open] { grid-template-rows: auto 1fr; }
/* laptop and tablet landscape: a centred window, map left and the list beside it */
@media (min-width: 900px) {
  .popmap { inset: 0; margin: auto; width: min(1080px, 92vw); height: min(780px, 88vh); border-radius: var(--r-lg); }
  .popmap[open] { grid-template-columns: 1fr 360px; grid-template-rows: auto 1fr; }
  .pm-head { grid-column: 1 / -1; padding-top: 16px; }
  .pm-head::before { display: none; }
  .pm-list { grid-column: 2; grid-row: 2; max-height: none; border-top: 0; border-left: 1px solid var(--c-line); }
  .popmap.no-list[open] { grid-template-columns: 1fr; }
}

/* ======================= Meeting 25 Nov (2): day picker, favourites, back arrow, iOS touches ======================= */
/* choose a day: a sheet from the bottom on phones, a small window on laptops */
.daypick { position: fixed; inset: auto 0 0; width: 100%; max-width: none; margin: 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--c-bg); color: var(--c-ink); box-shadow: 0 -12px 40px rgba(10, 10, 12, .35); }
.daypick[open] { animation: pm-up .3s cubic-bezier(.2, .8, .2, 1); }
.daypick::backdrop { background: rgba(10, 10, 12, .45); }
@media (min-width: 700px) { .daypick { inset: 0; margin: auto; width: min(460px, 92vw); height: fit-content; border-radius: var(--r-lg); } }
.dp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dp-head h2 { margin: 0; font: 600 1.35rem/1.25 var(--font-display); }
.dp-sub { margin: 4px 0 12px; color: var(--c-ink-2); font-size: .875rem; }
.dp-days { margin: 0 -4px 10px; padding: 2px 4px 10px; }
.dp-other { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; font-weight: 600; font-size: .875rem; }
.dp-other input { min-height: 44px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-surface); color: var(--c-ink); font: inherit; }
.btn.wide { width: 100%; }
/* move a stop to another day */
.stay .mv { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-left: auto; padding: 0 10px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--c-ink-2); font: 600 .875rem var(--font); cursor: pointer; }
.stay .mv:hover { background: var(--c-accent); color: var(--c-ink); }
/* favourites */
.fav-btn { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink-2); cursor: pointer; transition: transform .15s, color .15s; }
.fav-btn:hover { color: var(--c-accent-red); }
.fav-btn.on { color: var(--c-accent-red); border-color: transparent; background: var(--t-rose); }
.fav-btn.on svg { fill: currentColor; }
.card.walk .actions { align-items: center; }
.d-bar .fav-btn { width: var(--tap); height: var(--tap); }
.faves { margin: 22px 0 8px; }
.faves h4 { margin: 0 0 4px; font: 600 1.125rem/1.2 var(--font-display); }
.fav-list { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; gap: 8px; }
.fav { display: flex; align-items: center; gap: 4px; padding-right: 6px; border-radius: var(--r-md); background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line); }
.fav-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 6px 8px 8px; border: 0; background: none; color: var(--c-ink); text-align: left; cursor: pointer; font: inherit; }
.fav-item img, .fav-item .noimg { flex: none; width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover; background: var(--c-accent); }
.fav-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--c-line); font-weight: 700; font-size: .875rem; }
.fav-item[aria-pressed="true"] .fav-n { background: var(--c-fill); border-color: var(--c-fill); color: #fff; }
.fav-item[aria-pressed="true"] { }
.fav.in { opacity: .6; }
.fav-text { min-width: 0; display: grid; gap: 2px; }
.fav-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fav-text small { color: var(--c-ink-2); font-size: .875rem; }
.fav .x { width: 44px; height: 44px; }
/* the back arrow in the top bar */
.top-back { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-left: -10px; border: 0; border-radius: 50%; background: transparent; color: var(--c-ink); cursor: pointer; }
.top-back:hover { background: rgba(127, 127, 127, .14); }
.top-back[hidden] { display: none; }
/* iOS touches: no grey tap flash, a small press on what you tap, pages that slide in */
* { -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .ri-main, .theme-card, .dchip, .fav-item, .fav-btn, .subtheme, .tabbar a, .hchip, .theme-btn { transition: transform .12s ease-out; }
  .ri-main:active, .theme-card:active, .dchip:active, .fav-item:active, .fav-btn:active, .subtheme:active, .tabbar a:active, .hchip:active, .theme-btn:active { transform: scale(.97); }
  .view:not([hidden]) { animation: view-in .24s ease-out; }
  #themeDetail:not([hidden]) { animation: push-in .3s cubic-bezier(.2, .8, .2, 1); }
  @keyframes view-in { from { opacity: 0; } }
  @keyframes push-in { from { opacity: 0; transform: translateX(28px); } }
}
.stay { flex-wrap: wrap; }
@media (max-width: 420px) { .stay .mv span { display: none; } .stay .mv { padding: 0 12px; } }
/* the name sits directly under the photo, the category and area tags directly under the name */
.d-body h2 + .tags { margin-top: -6px; }
.card h3 + .tags { margin-top: 2px; }


/* ======================= Phase 1 · Ask results ======================= */
.route-line { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: .875rem; font-weight: 600; color: var(--c-ink); }
.route-line .ico { flex: none; color: var(--c-blue); }
.refine { display: flex; gap: 8px; margin: 10px 0 6px; padding: 4px; border-radius: var(--r-pill); background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line); }
.refine input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 0; background: transparent; color: var(--c-ink); font: 400 1rem var(--font); }
.refine input:focus { outline: none; box-shadow: none; }
.refine:focus-within { box-shadow: inset 0 0 0 2px var(--c-blue); }
.refine .btn { min-height: 44px; padding: 0 18px; }
.refine-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.refine-chips::-webkit-scrollbar { display: none; }
.refine-chips .chip { flex: none; min-height: 44px; }
.note.info { display: flex; gap: 8px; align-items: flex-start; background: var(--c-accent); color: var(--c-ink); }
.note.info .ico { flex: none; margin-top: 2px; color: var(--c-blue); }
.res { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 0 8px 0 0; }
.res-main { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px; border: 0; background: none; color: var(--c-ink); text-align: left; cursor: pointer; font: inherit; border-radius: var(--r-md); }
.res-main .pimg, .res-main .noimg { flex: none; width: 64px; height: 64px; border-radius: var(--r-sm); }
.res-text { min-width: 0; display: grid; gap: 2px; }
.res-text b { font: 600 1rem/1.25 var(--font); }
.res-text small { font-size: .875rem; color: var(--c-ink-2); }
.res-facts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.res-facts span { padding: 2px 8px; border-radius: var(--r-pill); background: var(--t-green); color: var(--t-green-ink); font-size: .75rem; font-weight: 600; }
.res-acts { display: flex; align-items: center; gap: 6px; }
.res .go { display: grid; place-items: center; width: 44px; height: 44px; min-width: 0; min-height: 0; }
.res .ri-add { width: 44px; height: 44px; }
.res.sel { box-shadow: 0 0 0 2px var(--c-primary); }
.res.skel { min-height: 82px; padding: 8px; display: flex; align-items: center; gap: 12px; }
.sk-img { flex: none; width: 64px; height: 64px; border-radius: var(--r-sm); background: var(--c-accent); }
.sk-lines { flex: 1; display: grid; gap: 8px; }
.sk-lines i { display: block; height: 12px; border-radius: 6px; background: var(--c-accent); }
.sk-lines i:last-child { width: 60%; }
@media (prefers-reduced-motion: no-preference) { .res.skel { animation: sk-pulse 1.2s ease-in-out infinite; } @keyframes sk-pulse { 50% { opacity: .55; } } }
.where { display: grid; gap: 12px; justify-items: start; padding: 6px 0 4px; }
.where .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.where .chip { min-height: 44px; }
.pin.origin { width: 22px; height: 22px; border-radius: 50%; background: var(--c-surface); box-shadow: 0 0 0 5px var(--c-primary), 0 2px 8px rgba(0, 0, 0, .35); }
.origin-label { font-weight: 700; }

/* ======================= Phase 1 · top bar: title, look, account ======================= */
.page-title { font-size: clamp(1.15rem, 4.8vw, 1.35rem); }
.look { position: relative; flex: none; margin-left: auto; }
@media (min-width: 900px) { .look { margin-left: 4px; } }      /* the tab links carry the free space on laptops */
.look + .account-btn { margin-left: 4px !important; }
.theme-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  color: inherit; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
body.map-mode .theme-btn, body.view-open .theme-btn { background: var(--c-surface); border-color: var(--c-line); color: var(--c-ink); }
.theme-btn:hover, .theme-btn[aria-expanded="true"] { background: var(--c-primary) !important; border-color: transparent !important; color: #fff; }
body.after-dark .theme-btn { color: var(--c-amber); }
.account-btn { width: 44px; height: 44px; }
.look-menu { position: absolute; right: 0; top: calc(100% + 8px); width: min(300px, calc(100vw - 32px)); display: grid; gap: 12px; padding: 14px;
  border-radius: var(--r-md); background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow), 0 0 0 1px var(--c-line); z-index: 50; }
.look-menu[hidden] { display: none; }
.lm-title { margin: 0; font: 700 .75rem/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-2); }
.look-menu .seg { margin: 0; }
.look-menu .seg button { min-height: 44px; }
.look-menu .seg button.on { background: var(--c-fill); color: #fff; }
.lm-evening { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; }
.lm-text { display: grid; gap: 2px; }
.lm-text b { font-weight: 600; }
.lm-text small { font-size: .875rem; color: var(--c-ink-2); }
.lm-evening input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 50px; height: 30px; border-radius: 15px; background: var(--c-line); cursor: pointer; transition: background .2s; }
.lm-evening input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.lm-evening input:checked { background: var(--c-primary); }
.lm-evening input:checked::after { transform: translateX(20px); }
.lm-note { margin: 0; font-size: .875rem; color: var(--c-ink-2); }

/* ======================= Phase 1 · one label style, quieter selected states ======================= */
/* every small heading above a group of controls or facts looks the same */
.lp-title, .sub-h, .d-facts dt, .cal-week span, .lm-title, .opt:not(.sw) > span {
  font: 700 .75rem/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-2); }
/* selected segments in the dark looks: a ring instead of a fill that disappears against the track */
:is(body.theme-dark, body.after-dark) .seg button:is(.on, [aria-pressed="true"], [aria-selected="true"]) {
  background: var(--c-surface); color: var(--c-ink); box-shadow: inset 0 0 0 1.5px var(--c-blue); }
body.after-dark .seg button:is(.on, [aria-pressed="true"], [aria-selected="true"]) { color: var(--c-neon); box-shadow: inset 0 0 0 1.5px var(--c-neon); }
.tn-when-seg { display: grid; grid-template-columns: repeat(3, 1fr); }
.leaflet-control-attribution { font-size: 12px; }

/* ======================= Phase 1 · place detail: the main action first ======================= */
.d-bar { flex-direction: column; align-items: stretch; gap: 10px; }
.d-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.d-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 56px; padding: 6px 4px;
  border: 1px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-surface); color: var(--c-ink); font: 600 .75rem/1.2 var(--font); cursor: pointer; }
.d-act:hover { border-color: var(--c-ink-2); }
.d-act.fav-btn { width: auto; height: auto; border-radius: var(--r-sm); }
.d-act.fav-btn.on { color: var(--c-accent-red); background: var(--t-rose); border-color: transparent; }
.d-act.fav-btn.on svg { fill: currentColor; }
.d-bar .btn.wide { width: 100%; min-height: 50px; font-size: 1rem; white-space: nowrap; }
/* drag handles that cannot be dragged are a false promise: gone */
.d-grab, .pm-head::before { display: none !important; }

/* ======================= Phase 1 · Explore on phones ======================= */
/* the day bar: one slim line above the tab bar instead of a two-line card */
.day-tray { min-height: 48px; padding: 6px 14px 6px 6px; gap: 10px; border-radius: var(--r-pill); }
.dt-date { flex: none; display: inline-flex; align-items: baseline; gap: 4px; padding: 6px 10px; border-radius: var(--r-pill); background: var(--c-primary); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.dt-date b { font-size: .875rem; }
.dt-line { flex: 1; min-width: 0; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-line b { font-weight: 700; }
.dt-go { flex: none; font-size: .875rem; font-weight: 700; opacity: .9; }
.dt-go::after { content: " ›"; }
body.has-tray .toast { bottom: calc(var(--tabbar-h) + 72px + env(safe-area-inset-bottom)); }
#views { padding-bottom: calc(var(--tabbar-h) + 90px); }
@media (min-width: 900px) { #views { padding-bottom: 96px; } }
/* chips and the Map button: 44 px, the map docked in the row instead of floating over the list */
.chiprow .chip, .filter-btn { min-height: 44px; }
.filter-panel .chips.wrap { display: flex; flex-wrap: wrap; gap: 6px; overflow: visible; }
.filter-panel .chip { min-height: 44px; }
#resultsMap[hidden] { display: none; }
.chip[aria-pressed="true"] { background: var(--c-fill); border-color: var(--c-fill); color: #fff; }
body.after-dark .chip[aria-pressed="true"] { background: transparent; color: var(--c-neon); border-color: var(--c-neon); }
/* the search slides away while scrolling down the list */
#searchForm { max-height: 64px; transition: max-height .22s ease, opacity .18s ease, margin .22s ease; }
body.ex-scrolled[data-tab="explore"] #searchForm { max-height: 0; min-height: 0; opacity: 0; overflow: hidden; margin: 0; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { #searchForm { transition: none; } }

/* ======================= Phase 1 · fingertip sizes, 16 px fields, the app's own dialogs ======================= */
.stay .step, .grip { width: 44px; height: 44px; }
.tl-leg .link, .also button, .peek .row button, .seg.small button, .hchip, details.before > summary, .fav .x { min-height: 44px; }
.ri-add, .top-back, .fav .x { width: 44px; height: 44px; }
.search .clear { min-width: 44px; min-height: 44px; }
.tl-leg .link { display: inline-flex; align-items: center; }
details.before > summary { display: flex; align-items: center; }
/* iPhone zooms into fields under 16 px: every field is 16 px */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px; }
.stay .mv.rm:hover { color: var(--c-accent-red); }
.toast { display: flex; align-items: center; gap: 12px; }
.toast-act { flex: none; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: rgba(255,255,255,.18); color: inherit; font: 700 .875rem var(--font); cursor: pointer; }
:is(body.theme-dark, body.after-dark) .toast-act { background: rgba(13,19,34,.12); }
.ask-dlg { width: min(420px, calc(100vw - 32px)); padding: 22px; border: 0; border-radius: var(--r-lg); background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow); }
.ask-dlg::backdrop { background: rgba(10,10,12,.45); }
.ask-dlg h2 { margin: 0 0 6px; font: 600 1.35rem/1.2 var(--font-display); }
.ask-dlg p { margin: 0 0 14px; color: var(--c-ink-2); }
.ask-dlg input { width: 100%; min-height: 44px; margin: 0 0 14px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-bg); color: var(--c-ink); }
.ask-dlg-btns { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ask-dlg .btn.danger { background: var(--c-accent-red); }
.daymap-open, .opt select, .tl-card .name { min-height: 44px; }
.stay .mv { min-width: 44px; justify-content: center; }
button.link { min-height: 44px; display: inline-flex; align-items: center; }

/* ======================= Phase 1 · loading, empty and error states ======================= */
.ri.skel { display: flex; align-items: center; gap: 12px; padding: 10px; min-height: 84px; }
.theme-card.skel { background: var(--c-accent); box-shadow: none; cursor: default; }
@media (prefers-reduced-motion: no-preference) { .ri.skel, .theme-card.skel { animation: sk-pulse 1.2s ease-in-out infinite; } }
.state-card { list-style: none; display: grid; gap: 10px; justify-items: start; padding: 18px; border-radius: var(--r-md); background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line); }
.state-card p { margin: 0; }
.state-card .btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.state-card .btnrow:empty { display: none; }
.state-card .chips.wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.state-card .chip { min-height: 44px; }

/* ======================= Phase 1 · one icon family ======================= */
.g-ico { display: grid; place-items: center; color: var(--c-blue); }
.tl-warn { display: flex; align-items: flex-start; gap: 6px; }
.tl-warn .ico { flex: none; margin-top: 1px; }
.ri-secret, .tag.secret { display: inline-flex; align-items: center; gap: 4px; }
.hchip .ico, .switch .ico { flex: none; }
.st-ico { display: grid; place-items: center; color: var(--c-blue); }
.g-logo { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; }
.icon-btn { display: inline-grid; place-items: center; }

/* ======================= Phase 1 · Collections ======================= */
.card.walk { cursor: pointer; }
/* the open collection's name is in the top bar; the heading stays for screen readers */
body.view-open #themeDetail .theme-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the empty day sits inside the day's own card: no second box around it */
.day .empty { padding: 4px 0 0; background: none; box-shadow: none; border-radius: 0; }
/* the refine field is a field, not a card: the outline sits on the input itself */
.refine { padding: 0; background: none; box-shadow: none; border-radius: 0; }
.refine:focus-within { box-shadow: none; }
.refine input { border: 1px solid var(--c-line); border-radius: var(--r-pill); background: var(--c-surface); }
.refine input:focus { border-color: var(--c-blue); box-shadow: 0 0 0 1px var(--c-blue); }
/* contrast fixes from the re-run: placeholders and season tags in the dark looks */
::placeholder { color: var(--c-ink-3); opacity: 1; }
.ask input::placeholder { color: #5A6070; }
body.theme-dark:not(.after-dark) .tag.season { color: #fff; }
body.theme-dark:not(.after-dark) .tag.season.s-water { background: #2B4A8E; }
body.theme-dark:not(.after-dark) .tag.season.s-film { background: #3E5BA0; }
body.after-dark .tag.season.s-water { background: transparent; }
/* re-run fixes: the sheet's fixed parts never shrink; old-style stop rows keep their own grid; a steady stepper */
.sheet > .sheet-head, .sheet > .refine, .sheet > .refine-chips, .sheet > #sheetNotes { flex: none; }
.res:not(:has(> .res-main)) { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; padding: 8px; }
.res:not(:has(> .res-main)) img, .res:not(:has(> .res-main)) .noimg { width: 64px; height: 64px; }
.stay b { min-width: 10ch; font-variant-numeric: tabular-nums; }
.stay .stepper { display: inline-flex; align-items: center; gap: 8px; flex-wrap: nowrap; white-space: nowrap; }
.stay b { min-width: 0; }
.stay .stepper b { min-width: 9ch; }

.oh-check { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line); font-size: .875rem; color: var(--c-ink-2); }
.oh-check .ico { flex: none; color: var(--c-blue); }

/* ======================= Photos: places without one look finished ======================= */
/* detail: a slim band with the category instead of 160 px of empty tint */
.d-photo.none { aspect-ratio: auto; height: 76px; }
.d-photo.none .d-ph { display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 0 56px 0 22px; font: 700 .75rem/1 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.d-photo.none .d-ph .ico { width: 28px; height: 28px; flex: none; }
/* list tiles: a tinted tile with a quiet diagonal weave and the category icon, not a flat beige square */
.noimg, .ph.none { background-image: linear-gradient(145deg, rgba(255,255,255,.4), rgba(255,255,255,0) 62%) !important; }
:is(body.theme-dark, body.after-dark) .noimg, :is(body.theme-dark, body.after-dark) .ph.none { background-image: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,0) 62%) !important; }
.noimg { box-shadow: inset 0 0 0 1px rgba(23,34,59,.06); }

/* ======================= Painted signs ======================= */
img.sign { background: #3F2A24; object-fit: cover; box-shadow: inset 0 0 0 1px rgba(23,34,59,.1); }
.ri-main img.sign, .res-main img.sign { flex: none; width: 64px; height: 64px; border-radius: var(--r-sm); }
.peek img.sign { width: 84px; height: 84px; border-radius: var(--r-sm); }
.tl-card img.sign { width: 48px; height: 48px; border-radius: var(--r-sm); }
.d-photo.sign { aspect-ratio: auto; height: min(300px, 52vw); background: #2B211D; display: grid; place-items: center; }
.d-photo.sign img { width: auto; height: 100%; max-width: 100%; object-fit: contain; background: none; box-shadow: none; }

/* map credits: bottom left, and never hidden behind the tab bar (phones) or the results sheet (laptops) */
#map .leaflet-bottom.leaflet-left { margin-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  #map .leaflet-bottom.leaflet-left { margin-bottom: 0; }
  body.map-mode #map .leaflet-bottom.leaflet-left { margin-left: 480px; }
}

/* ======================= Place detail: split button [+ Add to day | Sat 28 v] ======================= */
.d-bar .split { display: flex; width: 100%; }
.d-bar .split .btn { min-height: 50px; font-size: 1rem; white-space: nowrap; gap: 8px; }
.d-bar .split .plan { flex: 1; border-radius: 999px 0 0 999px; padding: 0 18px; }
.d-bar .split .day-pick { flex: none; min-width: 108px; padding: 0 14px 0 16px; gap: 6px; border-radius: 0 999px 999px 0; border: 1px solid var(--c-line); border-left: 0;
  background: var(--c-surface); color: var(--c-ink); font-weight: 700; }
.d-bar .split .day-pick:hover { background: var(--c-accent); }

/* walk cards: the round + sits in the corner of the card (the quick add), Show route and the heart stay below */
.card .corner-add { position: absolute; top: 12px; right: 12px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-fill); color: #fff; border: 2px solid var(--c-surface); box-shadow: var(--shadow-sm); }
.card .corner-add:hover { background: var(--c-primary-dark); border-color: var(--c-surface); }
.card .corner-add.on { background: var(--c-blue); }
.card.walk .tags, .card.walk h3 { padding-right: 52px; }

/* =====================================================================
   Finish pass (26 Nov): one motion curve, softer depth, warmer chrome,
   calmer details. Colours stay Mayfair Ink; every rule uses the tokens,
   so Light, Dark and After dark all follow.
   ===================================================================== */
:root {
  --ease: cubic-bezier(.22, 1, .36, 1);                 /* quick start, soft landing: used for every movement below */
  --lift-0: 0 1px 2px rgba(23, 34, 59, .05), 0 2px 8px -2px rgba(23, 34, 59, .08);
  --lift-1: 0 1px 2px rgba(23, 34, 59, .06), 0 10px 24px -10px rgba(23, 34, 59, .22);
  --lift-2: 0 2px 4px rgba(23, 34, 59, .06), 0 22px 40px -18px rgba(23, 34, 59, .35);
  --glass: rgba(247, 244, 238, .84);                    /* the paper colour, frosted: top bar and tab bar */
  --ring: 0 0 0 3px rgba(43, 74, 142, .22);
  /* city tokens: a new city.beacon site changes these (and the Mayfair Ink block at the top) and nothing else */
  --c-success: #2E9E5B;                                  /* the tick in a toast */
  --c-danger: #C8281B;                                   /* the "!" in an error toast */
  --c-sky-1: #24325A; --c-sky-2: #111A30;                /* collections without a photo: the night sky */
  --c-sky-glow: rgba(143, 163, 209, .45); --c-sky-warm: rgba(200, 40, 27, .22);
  --c-skyline: rgba(18, 52, 33, .42);                    /* the city's landmarks over the green start map: a quiet, deeper green */
}
:is(body.theme-dark, body.after-dark) {
  --lift-0: 0 1px 2px rgba(0, 0, 0, .3);
  --lift-1: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 24px -10px rgba(0, 0, 0, .6);
  --lift-2: 0 2px 4px rgba(0, 0, 0, .35), 0 22px 40px -18px rgba(0, 0, 0, .75);
  --glass: rgba(13, 19, 34, .86);
  --ring: 0 0 0 3px rgba(157, 178, 230, .28);
}

/* ---------- type: crisper rendering, balanced headings, steady numbers ---------- */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-feature-settings: "kern", "liga"; }
h1, h2, h3, .page-title, .tc-text b, .card h3, .theme-title { text-wrap: balance; }
p, .card p, .card.walk .intro, .theme-intro, .d-desc { text-wrap: pretty; }
.meta, .dchip b, .dt-date, .tc-count, .result-meta, .badge-n, .tab-badge, .tl-time { font-variant-numeric: tabular-nums; }
.head h2, .ex-head h2, .theme-title, .d-body h2 { letter-spacing: -.015em; }
.result-meta { color: var(--c-ink-3); font-weight: 500; letter-spacing: .01em; }
:is(body.theme-dark, body.after-dark) ::selection { background: rgba(157, 178, 230, .35); color: var(--c-ink); }

/* ---------- chrome: the bars are frosted paper, not cold white ---------- */
body:not(.theme-dark):not(.after-dark).view-open .topbar { background: rgba(247, 244, 238, .97); }   /* the green start map sits behind it: nearly opaque, so it matches the page */
body:not(.theme-dark):not(.after-dark).map-mode .topbar { background: var(--glass); }
body:not(.theme-dark):not(.after-dark) .tabbar { background: var(--glass); }
body:not(.theme-dark):not(.after-dark) .ex-top { background: var(--glass); }
.page-title { font-size: clamp(1.2rem, 4.8vw, 1.5rem); }
.topnav a { transition: background .2s var(--ease), color .2s var(--ease), opacity .2s var(--ease); }
.topnav a[aria-current="page"] { font-weight: 700; }
.theme-btn, .account-btn { transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease); }
body.view-open :is(.theme-btn, .account-btn):not(:hover):not([aria-current="page"]):not(.signed) { box-shadow: var(--lift-0); }
/* tab bar: the active tab gets a soft pill behind its icon, as on iOS 18 */
.tabbar a { transition: color .2s var(--ease); }
.tabbar a svg { transition: transform .25s var(--ease); }
.tabbar a::before { content: ""; position: absolute; top: 5px; left: 50%; width: 52px; height: 30px; margin-left: -26px; border-radius: var(--r-pill);
  background: var(--c-red-tint); opacity: 0; transform: scale(.6); transition: opacity .2s var(--ease), transform .25s var(--ease); z-index: -1; }
.tabbar a { isolation: isolate; }
.tabbar a[aria-current="page"]::before { opacity: 1; transform: scale(1); }
.tabbar a[aria-current="page"] { font-weight: 700; }

/* ---------- surfaces: one family of rounded, softly lifted cards ---------- */
.card, .theme-card, .rows, .src, .empty, .before, .state-card, .tn-card, .fav, .tl-card, .cal, .day, .filter-panel, .oh-box, .d-facts, .acc-list, .good ul { box-shadow: var(--lift-0), 0 0 0 1px var(--c-line); }
.card { border: 0; }
.card, .theme-card { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
@media (hover: hover) {
  .card:hover, .theme-card:hover { transform: translateY(-3px); box-shadow: var(--lift-2), 0 0 0 1px var(--c-line); }
  .ri-main { transition: background .15s var(--ease); }
  .ri:hover { background: color-mix(in srgb, var(--c-surface) 92%, var(--c-ink)); }
  :is(body.theme-dark, body.after-dark) .ri:hover { background: color-mix(in srgb, var(--c-surface) 90%, #fff); }
  .ri-main:hover b { text-decoration: none; }
  .ri-add:hover { background: var(--c-fill); border-color: var(--c-fill); color: #fff; }
  .dchip:hover:not([aria-pressed="true"]) { border-color: var(--c-ink-3); }
  .chip:hover:not([aria-selected="true"]):not([aria-pressed="true"]), .filter-btn:hover:not([aria-expanded="true"]) { border-color: var(--c-ink-3); }
  .src li a:hover { color: var(--c-blue); text-decoration: none; }
}
.card .ph img, .theme-card > img { transition: transform .6s var(--ease); }
.rows { box-shadow: var(--lift-0), 0 0 0 1px var(--c-line); }
.ri, .chip, .filter-btn, .dchip, .seg button, .fav-btn, .d-act, .step, .subtheme { transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease); }

/* collections without a photo: a night-sky navy with a soft glow, not a flat black block */
.theme-card:not(:has(> img)) {
  background:
    radial-gradient(120% 90% at 85% 0%, var(--c-sky-glow), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, var(--c-sky-warm), transparent 60%),
    linear-gradient(160deg, var(--c-sky-1), var(--c-sky-2) 70%);
}
.theme-card:not(:has(> img))::after { background: linear-gradient(180deg, transparent 40%, rgba(10, 14, 26, .45)); }
body.after-dark .theme-card:not(:has(> img)) {
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(255, 90, 78, .32), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(255, 192, 103, .18), transparent 60%),
    linear-gradient(160deg, #1C2640, #0B1120 70%);
}

/* ---------- buttons: a little depth and a press you can feel ---------- */
.btn { transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.btn.primary, .btn.dark, .ask .btn.primary { box-shadow: 0 1px 2px rgba(10, 14, 26, .18), 0 6px 16px -8px rgba(10, 14, 26, .55); }
@media (hover: hover) {
  .btn.primary:hover, .btn.dark:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(10, 14, 26, .2), 0 10px 22px -10px rgba(10, 14, 26, .6); }
  .btn.ghost-dark:hover, .btn.light:hover { border-color: var(--c-ink-3); }
}
.btn:active, .btn.primary:active, .btn.dark:active { transform: scale(.97); box-shadow: none; }
/* the quiet card buttons ("Show route") read as buttons, not grey patches */
.card .actions button:not(.plan) { background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line); }
.card .actions .fav-btn.on { background: var(--t-rose); box-shadow: none; }
@media (hover: hover) { .card .actions button:not(.plan):not(.on):hover { box-shadow: inset 0 0 0 1px var(--c-ink-3); } }
.card .actions .fav-btn { padding: 0; }   /* the 16 px side padding of the card buttons left the heart 12 px of room */
.fav-btn svg { flex: none; width: 22px; height: 22px; }
@media (prefers-reduced-motion: no-preference) {
  .fav-btn.on svg { animation: fav-pop .35s var(--ease); }
  @keyframes fav-pop { 40% { transform: scale(1.25); } }
}
.card .corner-add { transition: transform .2s var(--ease), background .2s var(--ease); }
@media (hover: hover) { .card .corner-add:hover { transform: scale(1.06); } }
.ri-add.on, .card .corner-add.on { animation: none; }

/* walk facts: small quiet dots instead of heavy bullets */
.meta { gap: 16px; font-weight: 650; color: var(--c-ink); }
.meta span::before { width: 5px; height: 5px; margin-right: 7px; vertical-align: 2px; background: var(--c-ink-3); }

/* ---------- fields: one focus ring everywhere ---------- */
.search { transition: box-shadow .2s var(--ease); box-shadow: var(--lift-0), 0 0 0 1px var(--c-line); }
.search:focus-within { box-shadow: 0 0 0 1px var(--c-blue), var(--ring); }
.field input, .todo-form input, .hotel-form input, .ask-dlg input, .refine input, .dp-other input { transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.field input:focus, .todo-form input:focus, .hotel-form input:focus, .ask-dlg input:focus, .refine input:focus, .dp-other input:focus { border-color: var(--c-blue); box-shadow: var(--ring); outline: none; }
.ask { transition: box-shadow .25s var(--ease); }
.ask:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35), 0 12px 40px rgba(0, 0, 0, .35); }
:focus-visible { outline-color: var(--c-blue); border-radius: inherit; }

/* ---------- small fixes ---------- */
/* "Get the app" is a block inside the account block: no second set of side margins */
.block .block { padding-left: 0; padding-right: 0; }
.dchip { border-radius: var(--r-md); }
.dchip[aria-pressed="true"] { box-shadow: var(--lift-1); }
.day-tray { box-shadow: 0 2px 6px rgba(10, 14, 26, .18), 0 14px 32px -12px rgba(10, 14, 26, .55); }
.views { scrollbar-width: thin; scrollbar-color: var(--c-line) transparent; }
dialog::backdrop { background: rgba(10, 14, 26, .55); }

/* ---------- motion: pages rise in, cards arrive one after another ---------- */
@media (prefers-reduced-motion: no-preference) {
  .view:not([hidden]) { animation: view-rise .38s var(--ease); }
  @keyframes view-rise { from { opacity: 0; transform: translateY(8px); } }
  .grid > .card, .theme-grid > .theme-card:not(.skel) { animation: card-in .5s var(--ease) backwards; }
  .grid > .card:nth-child(2), .theme-grid > .theme-card:nth-child(2) { animation-delay: 40ms; }
  .grid > .card:nth-child(3), .theme-grid > .theme-card:nth-child(3) { animation-delay: 80ms; }
  .grid > .card:nth-child(4), .theme-grid > .theme-card:nth-child(4) { animation-delay: 120ms; }
  .grid > .card:nth-child(5), .theme-grid > .theme-card:nth-child(5) { animation-delay: 160ms; }
  .grid > .card:nth-child(6), .theme-grid > .theme-card:nth-child(6) { animation-delay: 200ms; }
  .grid > .card:nth-child(n+7), .theme-grid > .theme-card:nth-child(n+7) { animation-delay: 240ms; }
  @keyframes card-in { from { opacity: 0; transform: translateY(14px); } }
  @media (min-width: 700px) {
    dialog#detail[open], .ask-dlg[open] { animation: dlg-in .3s var(--ease); }
    @keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
  }
  .look-menu:not([hidden]) { animation: menu-in .2s var(--ease); transform-origin: top right; }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
  .toast:not([hidden]) { animation: toast-in .3s var(--ease); }
  @keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
}
/* the soft ring replaces the old 1 px borders (no doubled edges); "Before you go" is a section of the day card, not a box inside it */
.src, .day, .cal { border: 0; }
.day .before { margin-top: 18px; padding: 14px 0 0; border-radius: 0; background: none; box-shadow: none; border-top: 1px solid var(--c-line); }
/* the look button's open/hover state: white icon on the filled circle (a more specific top-bar rule set it back to navy) */
body .theme-btn:is(:hover, [aria-expanded="true"]) { color: #fff; }
body.after-dark .theme-btn:is(:hover, [aria-expanded="true"]) { color: #fff; }
/* phones: the Stay stepper uses the card's full width instead of only the column beside the photo */
@media (max-width: 480px) {
  .stay { grid-column: 1 / -1; }
  .stay .stepper { gap: 6px; }
}

/* =====================================================================
   Second pass (26 Nov): tidier rows, clearer affordances, lighter reading
   ===================================================================== */
/* start page on phones: the five suggestions sit in one row you can swipe, instead of three ragged lines */
@media (max-width: 599px) {
  .hero-inner { width: 100%; min-width: 0; }   /* a flex item sizes to its content: without this the one-line chip row stretched the whole start page */
  .hero-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * clamp(20px, 6vw, 72px)); padding-right: clamp(20px, 6vw, 72px);
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .hero-chips::-webkit-scrollbar { display: none; }
  .hchip { flex: none; }
}
/* chip rows that scroll fade out at the edge, so it is clear there is more */
.chiprow .chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 24px; }
/* today is marked in the date strip: a thin ring and the label in the brand blue */
.dchip.today:not([aria-pressed="true"]) { box-shadow: inset 0 0 0 1.5px var(--c-blue); }
.dchip.today:not([aria-pressed="true"]) small { color: var(--c-blue); font-weight: 700; }
/* folding sections show that they fold */
details.before > summary { list-style: none; justify-content: space-between; gap: 12px; }
details.before > summary::-webkit-details-marker { display: none; }
details.before > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 6px; border-right: 2px solid var(--c-ink-3); border-bottom: 2px solid var(--c-ink-3);
  transform: rotate(45deg) translateY(-2px); transition: transform .25s var(--ease); }
details.before[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
/* London right now: the divider lines up with the text, headlines read as a calm list */
.day-news { border-top: 0; }
.day-news > .head { border-top: 1px solid var(--c-line); padding-top: 28px; }
.src li a { font-weight: 500; line-height: 1.45; padding: 14px 0; transition: color .15s var(--ease); }
.src li:first-child a { border-top: 0; }
.src .badge { margin-bottom: 4px; }
/* page intros: the same breathing room on every tab */
.view > .head p, #view-themes .head p, .view .ex-top + .head p { margin-top: 0; }
.view > .head { padding-top: 4px; }
/* the empty day: the hint and its button sit together */
.day .empty { gap: 14px; }

/* =====================================================================
   Third pass (26 Nov): the screens one level deeper
   ===================================================================== */
/* an open collection on laptops: photo beside the intro instead of a soft, stretched banner across the page */
@media (min-width: 900px) {
  #themeDetail:has(> .theme-hero) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 46%); column-gap: 36px; align-items: start; }
  #themeDetail:has(> .theme-hero) > * { grid-column: 1; }
  #themeDetail:has(> .theme-hero) > .theme-hero { grid-column: 2; grid-row: 1 / span 6; align-self: stretch; height: auto; min-height: 280px; max-height: 380px; margin: 6px 0 12px; box-shadow: var(--lift-1); }
  #themeDetail:has(> .theme-hero) > .btnrow ~ * { grid-column: 1 / -1; }
  #themeDetail:has(> .theme-hero) > .theme-sub { margin-top: 6px; font-size: 1.125rem; color: var(--c-ink); }
  #themeDetail:has(> .theme-hero) > .theme-intro { font-size: 1.0625rem; color: var(--c-ink-2); }
}
.theme-hero { box-shadow: var(--lift-0); }
.theme-sub { font-family: var(--font-display); font-weight: 600; letter-spacing: -.005em; }
/* place details on laptops: the photo no longer fills the window, so "Getting there" is in view */
@media (min-width: 700px) { .d-photo:not(.none):not(.sign) { aspect-ratio: auto; height: min(340px, 42vh); } }
/* My day: "Other day" stays on one line; the Open map button moves clear of the zoom buttons */
.stay .mv { white-space: nowrap; }
.daymap-open { top: 10px; bottom: auto; }
/* the stop cards: the photo and number line up with a little more air */
.tl-card { padding: 12px; }
.tl-card img, .tl-card .noimg { border-radius: 10px; }
.tl-leg { color: var(--c-ink-3); }
/* map clusters: brand-coloured counts with a soft halo instead of plain white discs */
.cluster { background: var(--c-surface); color: var(--c-ink); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c-fill) 18%, transparent), 0 2px 8px rgba(0, 0, 0, .22); }
.cluster { transition: transform .2s var(--ease); }
@media (hover: hover) { .cluster:hover { transform: scale(1.08); } }

/* =====================================================================
   Fourth pass (26 Nov): how it feels while you use it
   ===================================================================== */
/* photos fade in as they arrive instead of popping in (app.js marks them .ld) */
@media (prefers-reduced-motion: no-preference) {
  .pimg img, .card .ph img, .theme-card > img, .theme-hero img, .d-photo img, .tl-card img, .fav-item img, .mini img, .tn-card img, img.sign { opacity: 0; transition: opacity .45s var(--ease), transform .6s var(--ease); }
  :is(.pimg, .card .ph, .theme-card, .theme-hero, .d-photo, .tl-card, .fav-item, .mini, .tn-card) img.ld, img.sign.ld { opacity: 1; }
}
/* while lists load: a soft light sweeps across the placeholders instead of a blink */
@media (prefers-reduced-motion: no-preference) {
  .ri.skel, .theme-card.skel, .res.skel { animation: none; position: relative; overflow: hidden; }
  .ri.skel::after, .theme-card.skel::after, .res.skel::after { content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%) 150% 0 / 250% 100% no-repeat; animation: sweep 1.4s var(--ease) infinite; }
  :is(body.theme-dark, body.after-dark) :is(.ri.skel, .theme-card.skel, .res.skel)::after { background-image: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .06) 50%, transparent 65%); }
  @keyframes sweep { to { background-position: -50% 0; } }   /* the light moves, the placeholder stays put (a loading hint, not scrolling content) */
}
/* adding to the day: the + turns into a tick with a small pop; the My day badge and the day bar nod */
@media (prefers-reduced-motion: no-preference) {
  .ri-add.on svg, .card .corner-add.on svg, .d-bar .plan.on svg { animation: tick-pop .4s var(--ease); }
  @keyframes tick-pop { 0% { transform: scale(.4) rotate(-30deg); opacity: 0; } 60% { transform: scale(1.2); opacity: 1; } }
  .tab-badge.bump { animation: badge-bump .5s var(--ease); }
  @keyframes badge-bump { 30% { transform: scale(1.45); } 60% { transform: scale(.92); } }
  .day-tray.bump { animation: tray-nod .5s var(--ease); }
  @keyframes tray-nod { 30% { transform: translateY(-4px) scale(1.02); } }
  .day-tray:active { transform: scale(.98); }
}
/* the Ask field: each new example question slides softly into place */
@media (prefers-reduced-motion: no-preference) {
  .ask input.ph-swap::placeholder { animation: ph-in .5s var(--ease); }
  @keyframes ph-in { from { opacity: 0; transform: translateY(6px); } }
}
/* the toast says it worked: a small green tick before the message */
.toast::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.toast { border-radius: var(--r-pill); padding: 11px 18px 11px 14px; box-shadow: 0 6px 24px rgba(10, 14, 26, .35); }
/* calmer scrolling: lists stop where a card starts, and pages never bounce the map behind them */
.datestrip, .tn-row, .hero-chips { scroll-behavior: smooth; }
.views { scroll-padding-top: 12px; }
/* links in text: a soft underline that firms up on hover */
.link, .sync-note .link { text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); transition: text-decoration-color .2s var(--ease); }
@media (hover: hover) { .link:hover { text-decoration-color: currentColor; } }
/* keyboard users: the focus ring follows the shape of what it marks */
.chip:focus-visible, .btn:focus-visible, .hchip:focus-visible, .ri-add:focus-visible, .fav-btn:focus-visible { outline-offset: 3px; }
.toast.err::before { background: var(--c-danger) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M12 6v8M12 18.5v.01'/%3E%3C/svg%3E") center / 12px no-repeat; }
/* the toast sizes to its message (it was squeezed to half the screen and wrapped) */
.toast { width: max-content; max-width: calc(100vw - 32px); }

/* =====================================================================
   Fifth pass (26 Nov): moments people remember
   ===================================================================== */
/* the start page opens with the moment: greeting, date and today's sunset */
.hero-eyebrow { margin: 0 0 10px; font: 600 .8125rem/1.3 var(--font); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.hero-eyebrow:empty { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero-eyebrow:not(:empty) { animation: eyebrow-in .7s var(--ease) .15s backwards; }
  @keyframes eyebrow-in { from { opacity: 0; letter-spacing: .16em; } }
}
body.after-dark .hero-eyebrow { color: var(--c-amber); }
/* in the evening the After dark switch is the natural next step: a warm glow, once */
body.evening-hours:not(.after-dark) .hchip.mode-chip { border-color: rgba(255, 192, 103, .7); color: #FFE2B5; box-shadow: 0 0 0 0 rgba(255, 192, 103, .5); }
@media (prefers-reduced-motion: no-preference) {
  body.evening-hours:not(.after-dark) .hchip.mode-chip { animation: glow 2.4s var(--ease) 1.2s 2; }
  @keyframes glow { 50% { box-shadow: 0 0 0 8px rgba(255, 192, 103, 0); } 0% { box-shadow: 0 0 0 0 rgba(255, 192, 103, .5); } }
}

/* dialogs leave as gracefully as they arrive (browsers without these features simply close them at once) */
@media (prefers-reduced-motion: no-preference) {
  dialog#detail, .daypick, .popmap, .ask-dlg {
    transition: opacity .22s var(--ease), transform .26s var(--ease), overlay .26s allow-discrete, display .26s allow-discrete; }
  dialog#detail:not([open]), .daypick:not([open]), .popmap:not([open]) { opacity: 0; transform: translateY(28px); }
  .ask-dlg:not([open]) { opacity: 0; transform: scale(.97); }
  dialog::backdrop { transition: background-color .26s var(--ease), overlay .26s allow-discrete, display .26s allow-discrete; }
  dialog:not([open])::backdrop { background-color: transparent; }
}

/* an empty day draws its promise: a little route between three pins, in the page's own colours */
.day .empty::before { content: ""; display: block; width: 132px; height: 56px; margin: 4px 0 2px; background: var(--c-blue); opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 56' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 40c18-2 22-24 46-22s26 22 50 8' stroke-dasharray='1 7'/%3E%3Cpath d='M18 46s-9-8-9-14a9 9 0 0 1 18 0c0 6-9 14-9 14z' fill='black'/%3E%3Cpath d='M64 26s-9-8-9-14a9 9 0 0 1 18 0c0 6-9 14-9 14z' fill='black'/%3E%3Cpath d='M114 34s-9-8-9-14a9 9 0 0 1 18 0c0 6-9 14-9 14z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 56' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 40c18-2 22-24 46-22s26 22 50 8' stroke-dasharray='1 7'/%3E%3Cpath d='M18 46s-9-8-9-14a9 9 0 0 1 18 0c0 6-9 14-9 14z' fill='black'/%3E%3Cpath d='M64 26s-9-8-9-14a9 9 0 0 1 18 0c0 6-9 14-9 14z' fill='black'/%3E%3Cpath d='M114 34s-9-8-9-14a9 9 0 0 1 18 0c0 6-9 14-9 14z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat; }
body.after-dark .day .empty::before { background: var(--c-amber); }
/* the opening line: separators drawn by CSS, and the date left out on phones so it stays on one line */
.hero-eyebrow span + span::before { content: "·"; margin: 0 .5em; opacity: .7; }
@media (max-width: 599px) { .hero-eyebrow .eb-date { display: none; } }

/* ---------- Trip journal (My day): the days that have happened, with the visitor's notes and photo links ---------- */
.next-stop.done p { margin: 0; }
.next-stop.done .link { margin-top: 6px; padding: 0; min-height: 44px; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.trip { max-width: 760px; margin-top: 16px; padding: 16px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); }
.trip-group + .trip-group { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--c-line); }
.trip-head h4 { margin: 0; font: 600 1.35rem/1.2 var(--font-display); }
.trip-head p { margin: 2px 0 0; font-weight: 600; }
.tj-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.tj { border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--c-line); background: var(--c-bg); transition: box-shadow .2s var(--ease); }
.tj[open] { box-shadow: inset 0 0 0 1px var(--c-line), var(--lift-1, none); }
.tj > summary { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 12px 8px 14px; cursor: pointer; list-style: none; border-radius: var(--r-md); }
.tj > summary::-webkit-details-marker { display: none; }
.tj > summary:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 2px; }
.tj-date { flex: 1; min-width: 0; display: grid; }
.tj-date b { font-size: 1rem; }
.tj-date small { color: var(--c-ink-2); font-size: .875rem; }
.tj-thumbs { display: flex; flex: none; }
.tj-thumbs img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--c-bg); background: var(--c-accent); }
.tj-thumbs img + img { margin-left: -12px; }
.tj-chev { flex: none; display: grid; place-items: center; color: var(--c-ink-3); transition: transform .25s var(--ease); }
.tj[open] .tj-chev { transform: rotate(180deg); }
.tj-body { padding: 4px 14px 14px; display: grid; gap: 14px; }
.tj-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tj-stop { display: flex; align-items: center; gap: 10px; }
.tj-stop img, .tj-stop .noimg { flex: none; width: 44px; height: 44px; border-radius: var(--r-sm); object-fit: cover; background: var(--c-accent); }
.tj-tick { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.tj-tick input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.tj-tick span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--c-line); color: transparent; transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
.tj-tick input:checked + span { background: var(--c-success); border-color: var(--c-success); color: #fff; }
.tj-tick input:focus-visible + span { outline: 2px solid var(--c-blue); outline-offset: 2px; }
.tj-name { flex: 1; min-width: 0; display: grid; min-height: 44px; align-content: center; padding: 0; border: 0; background: none; color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; }
.tj-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tj-name small { color: var(--c-ink-2); font-size: .8125rem; }
.tj-stop.skipped b { color: var(--c-ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.tj-stop.skipped img { filter: grayscale(1); opacity: .6; }
.tj-field { display: grid; gap: 6px; }
.tj-field > span { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); }
.tj-field > p { margin: 0; }
.tj textarea { width: 100%; box-sizing: border-box; min-height: 96px; padding: 12px 14px; border: 2px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-surface); color: var(--c-ink); font: inherit; line-height: 1.5; resize: vertical; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.tj textarea:focus { outline: none; border-color: var(--c-blue); box-shadow: var(--ring); }
.tj-saved { min-height: 1em; margin-top: -10px; color: var(--c-ink-2); font-size: .8125rem; }
.tj-saved:empty { display: none; }
.tj-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tj-links li { display: flex; align-items: center; border-radius: var(--r-pill); background: var(--t-stone); color: var(--t-stone-ink); }
.tj-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px 0 14px; color: inherit; font-weight: 600; font-size: .875rem; text-decoration: none; max-width: 220px; }
.tj-links a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tj-links a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.tj-links .x { display: grid; place-items: center; width: 40px; height: 44px; border: 0; background: none; color: inherit; cursor: pointer; border-radius: var(--r-pill); }
.tj-add { margin-top: 2px; }
.tj-show { justify-self: start; padding: 0; min-height: 44px; }
.trip-private { margin: 14px 0 0; }
/* share a journal day */
.tj-share { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--c-line); }
.tj-share h5 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--c-ink); }
.tj-share > p { margin: 0; }
.tj-share-row { display: grid; gap: 14px; }
.tj-card { width: 100%; max-width: 240px; height: auto; aspect-ratio: 4 / 5; border-radius: var(--r-sm); background: var(--c-accent); box-shadow: inset 0 0 0 1px var(--c-line); }
@media (prefers-reduced-motion: no-preference) { .tj-card:not([src]) { animation: sk-pulse 1.2s ease-in-out infinite; } }
.tj-share-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.tj-share-side .tj-field p { margin: 0; }
.tj-share textarea { min-height: 120px; }
.tj-pics { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tj-pics li { position: relative; width: 64px; height: 64px; }
.tj-pics img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-sm); }
.tj-pics .x { position: absolute; top: -10px; right: -10px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 2px solid var(--c-bg); border-radius: 50%; background: var(--c-fill); color: #fff; cursor: pointer; }
.tj-pics .x::after { content: ""; position: absolute; inset: -6px; }   /* 44 px target */
.tj-pick { justify-self: start; }
.tj-share-go { display: flex; flex-wrap: wrap; gap: 8px; }
.tj-share-go .btn { min-height: 44px; padding: 0 18px; }
@media (min-width: 640px) { .tj-share-row { grid-template-columns: 200px 1fr; } }
:is(body.theme-dark, body.after-dark) .tj-thumbs img { border-color: var(--c-surface); }
@media (prefers-reduced-motion: reduce) { .tj-chev, .tj-tick span { transition: none; } }

/* =====================================================================
   Sixth pass (26 Nov): the stop card's stay control and the trip journal as a travel diary
   ===================================================================== */
/* the stay time is one pill [Stay − 2 h +]; move and remove sit on the same line, to the right */
.stay { flex-wrap: wrap; gap: 6px 8px; }
.stay .stepper { gap: 0; padding: 2px; border-radius: var(--r-pill); background: var(--c-bg); box-shadow: inset 0 0 0 1px var(--c-line); }
.stay .stepper > span { padding: 0 6px 0 12px; font-weight: 600; color: var(--c-ink-2); }
.stay .stepper .step { width: 40px; height: 40px; border: 0; background: transparent; display: grid; place-items: center; font: 500 1.25rem/1 var(--font); color: var(--c-ink); cursor: pointer; }
.stay .stepper .step:hover:not(:disabled) { background: var(--c-surface); box-shadow: var(--lift-0, 0 1px 2px rgba(0,0,0,.08)); }
.stay .stepper .step:active:not(:disabled) { transform: scale(.92); }
.stay .stepper b { min-width: 0; padding: 0 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stay .mv { width: auto; margin-left: 0; }   /* icon plus its word on wider screens */
.stay .mv:first-of-type { margin-left: auto; }
@media (max-width: 480px) {
  .stay .stepper > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* still read out */
  .stay .stepper { gap: 0; }
}
/* the warning above the timeline: icon and words apart */
.tl-warn.head { display: inline-flex; align-items: center; gap: 6px; }

/* trip journal: each day is a page of the trip, numbered from its first day */
.tj-date small.tj-day { order: -1; color: var(--c-accent-red); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tj-excerpt { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font: italic 400 .875rem/1.35 var(--font-display); color: var(--c-ink-2); }
.tj[open] .tj-excerpt { display: none; }
.tj > summary:hover { background: color-mix(in srgb, var(--c-accent) 45%, transparent); }
.tj-links li { transition: background .2s var(--ease); }
.tj-links li:hover { background: color-mix(in srgb, var(--t-stone) 80%, var(--c-ink) 6%); }
.tj-body { animation: tj-in .28s var(--ease) both; }
@keyframes tj-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tj-body { animation: none; } }
body.theme-dark .tj-date small.tj-day { color: var(--t-rose-ink); }   /* the logo red is too dim on navy */
body.after-dark .tj-date small.tj-day { color: var(--c-amber, #F2C58A); }

/* ---------- start page: the city's skyline (img/city/skyline.svg, one per city) in deep green over the map ---------- */
.hero-inner { position: relative; z-index: 2; }   /* above the skyline */
/* laptop: from the left edge right across the screen, standing just above the map credits */
.hero-skyline { position: fixed; z-index: 1; left: 0; right: 0; bottom: 22px; height: calc(100vw * 340 / 1200);
  background: var(--c-skyline); pointer-events: none;
  -webkit-mask: url("../img/city/skyline.svg") left bottom / 100% auto no-repeat; mask: url("../img/city/skyline.svg") left bottom / 100% auto no-repeat;
  transition: opacity .5s var(--ease), transform .6s var(--ease); }
/* only on the start page: it goes when the map opens or another tab is shown */
body:not(.intro-mode) .hero-skyline, body.map-mode .hero-skyline, body.view-open .hero-skyline { opacity: 0; transform: translateY(24px); }
/* phones: the compact drawing fills the space between the top bar's buttons and the greeting (measured in app.js) */
@media (max-width: 899px) {
  .hero-skyline { position: absolute; top: var(--sky-top, 64px); bottom: auto; height: var(--sky-h, 30vh);
    -webkit-mask: url("../img/city/skyline-compact.svg") center bottom / contain no-repeat; mask: url("../img/city/skyline-compact.svg") center bottom / contain no-repeat; }
}
body.after-dark .hero-skyline { background: rgba(160, 180, 230, .16); }   /* the midnight map is near black: a faint moonlit outline instead */
@media (prefers-reduced-motion: reduce) { .hero-skyline { transition: none; } }

/* ---------- Walks page: three tabs (Walks, Seasonal, Film & Theatre) instead of one long mixed list ---------- */
.walk-tabs { margin: 4px 0 10px; }
.walk-tabs button { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.wt-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: color-mix(in srgb, currentColor 14%, transparent); font-size: .75rem; font-variant-numeric: tabular-nums; }
.walk-sub { margin: 0 0 18px; max-width: 62ch; }
.walk-empty { grid-column: 1 / -1; padding: 28px 4px; }
@media (max-width: 599px) {
  .walk-tabs { display: grid; grid-template-columns: repeat(3, auto); width: 100%; box-sizing: border-box; }
  .walk-tabs button { justify-content: center; padding: 0 8px; font-size: .875rem; gap: 6px; }
}

/* ---------- Getting there: the walk from each station, as "4 min" over "on foot" ---------- */
.access h3:has(+ .acc-sub) { margin-bottom: 0; }
.access .acc-sub { margin: -6px 0 2px;   /* the list is a grid with an 8px gap: tuck the line under its heading */ font-size: .875rem; color: var(--c-ink-2); }
.acc-walk { display: grid; justify-items: end; gap: 1px; line-height: 1.15; }
.acc-walk b { font-size: 1rem; font-weight: 700; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.acc-walk small { font-size: .75rem; font-weight: 600; color: var(--c-ink-3); }
