:root {
  /* Dark-first "Living Map" identity — one world across onboarding, board,
     schedule, and settings (no light/dark split; the app is dark by design). */
  color-scheme: dark;
  --bg: #0A0F15;                 /* deep station-at-night canvas */
  --surface: #121A24;            /* cards lifted off the canvas */
  --text: #E9EDF2;
  --muted: #8B97A5;
  --border: #243040;
  --line: #22C58B;               /* replaced at runtime with the route's official color (lifted) */
  --line-ink: #08141F;           /* text that sits on a --line fill; set with --line at runtime */
  --express: #F0A63C;
  --green: #39D98A;
  --amber: #F0A63C;
  --red: #FF6B61;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.55);
  --board: "Overpass Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  /* semantic warning/alert surfaces — flip with the theme */
  --warn-bg: #33280F; --warn-edge: #46370F; --warn-text: #F2C766;
  --danger-bg: #3E1A18; --danger-edge: #582522; --danger-text: #F5A79F;
  /* Living Map canvas — flips with the theme (line stroke colors are per-line) */
  --map-bg: #0A0F15; --map-bg-edge: #17222E; --map-water: #123049; --map-water-edge: #2A5074;
  --map-ink: #FFFFFF; --map-ink-halo: #05090E; --map-term: #AEBAC7;
}
/* ---- Light theme (opt-in via data-theme="light" on <html>) ----
   Only the variables flip; the split-flap board and the immersive onboarding map
   stay dark by design (a real Solari board is dark, the intro is full-bleed). */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F2F5F9; --surface: #FFFFFF; --text: #15212D; --muted: #59636F; --border: #DCE3EC;
  --line: #0E7B59; --line-ink: #FFFFFF;
  --express: #A8560A; --green: #0E9E68; --amber: #A8560A; --red: #C63A30;
  --shadow-sm: 0 1px 2px rgba(20, 40, 65, 0.08);
  --shadow-md: 0 12px 30px rgba(20, 40, 70, 0.14);
  --warn-bg: #FBF0D3; --warn-edge: #ECD9A0; --warn-text: #7A560F;
  --danger-bg: #FCE6E3; --danger-edge: #F2C3BD; --danger-text: #98271E;
  --map-bg: #E9F0F7; --map-bg-edge: #CCD8E4; --map-water: #C9E1F1; --map-water-edge: #99C1DC;
  --map-ink: #12202E; --map-ink-halo: #FFFFFF; --map-term: #55636F;
}
* { box-sizing: border-box; margin: 0; }
button, select, input { touch-action: manipulation; font: inherit; }
button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--line); outline-offset: 2px;
}
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.55 "Overpass", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.view { display: flex; flex-direction: column; flex: 1; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; padding: 40px 0; }
.error { color: var(--red); font-size: 13px; margin-top: 8px; }

/* ---- header ---- */
#line-accent, #line-accent-2, #line-accent-3 { height: 4px; background: var(--line); }
.invisible { visibility: hidden !important; }
header {
  background: var(--surface); border-bottom: 1px solid var(--border); padding-bottom: 12px;
  position: sticky; top: 0; z-index: 20;
}
.header-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px 0; }
#route-picker {
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 13px; font-weight: 500; flex: 0 1 auto; min-width: 0; max-width: 320px;
  height: 36px; padding: 0 10px; border-radius: 10px; cursor: pointer;
}
.header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 10px; width: 36px; height: 36px; cursor: pointer; padding: 0;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.icon-btn:hover { border-color: var(--line); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 19px; height: 19px; display: block; }
h1 { padding: 10px 16px 0; font-size: 20px; font-weight: 680; letter-spacing: -0.02em; }
h1 .arrow { color: var(--line); }
.tappable-title { cursor: pointer; }
.tappable-title:hover { color: var(--line); }
.tappable-title:focus-visible { outline: 2px solid var(--line); outline-offset: 2px; border-radius: 6px; }

/* which line this board belongs to — visible on both Live and Schedule */
.pill-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 16px 0; }
#line-pill { padding: 0; }
.alert-chip {
  display: inline-flex; align-items: center; font: inherit; font-size: 11.5px; font-weight: 700;
  color: var(--warn-text); background: var(--warn-bg); border: 1px solid var(--warn-edge); border-radius: 999px;
  padding: 4px 11px; cursor: pointer;
}
.alert-chip:hover { filter: brightness(1.12); }

/* ---- alert splash toasts (auto-dismiss, once/day) ---- */
.toasts {
  position: fixed; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  z-index: 300; width: min(480px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; gap: 10px; align-items: flex-start;
  background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-edge); border-radius: 12px;
  padding: 11px 12px; box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(-12px); transition: opacity 0.35s ease, transform 0.35s ease;
}
.toast.in { opacity: 1; transform: translateY(0); }
.toast.out { opacity: 0; transform: translateY(-12px); }
.toast-ico { flex-shrink: 0; font-size: 15px; line-height: 1.3; }
.toast-body { flex: 1; min-width: 0; font-size: 13px; }
.toast-body b { display: block; font-weight: 700; }
.toast-body span { display: block; color: var(--warn-text); opacity: 0.82; margin-top: 2px; }
.toast-x { flex-shrink: 0; border: none; background: transparent; color: var(--warn-text); opacity: 0.72; font-size: 13px; cursor: pointer; padding: 2px 4px; }
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity 0.2s ease; } .toast.in, .toast.out { transform: none; } }
.line-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 11px; max-width: 100%;
}
.line-pill .lp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.line-pill .lp-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- segmented controls ---- */
.controls { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 2px; }
.seg {
  display: flex; gap: 2px; padding: 3px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
}
.seg button {
  flex: 1 1 0; min-width: 0; border: none; background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 500; padding: 7px 10px; border-radius: 9px;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background 0.15s, color 0.15s;
}
.seg button:not(.on):hover { color: var(--text); }
.seg button.on {
  background: var(--line); color: var(--line-ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* ---- alerts + banners ---- */
#alerts { padding: 0; }
.alert {
  display: flex; gap: 10px; padding: 10px 16px; font-size: 13px;
  background: var(--warn-bg); color: var(--warn-text); border-bottom: 1px solid var(--warn-edge);
}
.alert::before { content: "⚠"; }
.alert.severe { background: var(--danger-bg); color: var(--danger-text); border-bottom-color: var(--danger-edge); }
.banner { padding: 9px 16px; font-size: 13px; background: var(--warn-bg); color: var(--warn-text); border-bottom: 1px solid var(--warn-edge); }
.banner.offline { background: transparent; color: var(--muted); border-bottom: 1px solid var(--border); }

/* ---- collapsible stops (default closed; hero + each later train) ---- */
.stops-toggle {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  margin-top: 14px; border: none; background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px;
}
.stops-toggle:hover { color: var(--text); }
.stops-toggle .caret, .trip-row .caret { display: inline-block; transition: transform 0.2s; font-size: 11px; }
.trip-row .caret { color: var(--muted); font-size: 10px; line-height: 1; }
.stops-wrap.open .stops-toggle .caret, .trip.open .trip-row .caret { transform: rotate(180deg); }
.stops-collapse { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.stops-wrap.open .stops-collapse, .trip.open .stops-collapse { max-height: 1400px; }

/* ---- route diagram (vertical strip): readable stops + live train ---- */
.rs { margin: 6px 0 4px; }
.rs-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rs-head-title { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-head-title .arrow { color: var(--line); }
.rs-status { flex-shrink: 0; font-size: 11px; font-weight: 700; }
.rs-status.live { color: var(--green); } .rs-status.est { color: var(--line); } .rs-status.pre { color: var(--muted); font-weight: 600; }
.rs-rev {
  flex-shrink: 0; border: 1px solid var(--border); background: var(--bg); color: var(--muted);
  border-radius: 8px; width: 30px; height: 26px; font-size: 14px; cursor: pointer; line-height: 1;
}
.rs-rev:hover { border-color: var(--line); color: var(--text); }
.rs-body { position: relative; max-height: 300px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* flex row: rail | name (truncates) | tag | time — nothing overlaps.
   padding-right keeps the time clear of the scrollbar when the list scrolls. */
.rs-stop { display: flex; align-items: center; height: 34px; gap: 4px; padding-right: 10px; }
.rs-rail { position: relative; width: 26px; flex-shrink: 0; height: 100%; display: flex; justify-content: center; }
.rs-rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 3px; background: var(--line); opacity: 0.5; }
.rs-stop:first-child .rs-rail::before { top: 50%; }
.rs-stop:last-child .rs-rail::before { bottom: 50%; }
.rs-dot { position: relative; z-index: 1; width: 9px; height: 9px; border-radius: 50%; align-self: center; background: var(--bg); border: 2px solid var(--line); }
.rs-stop.off .rs-dot { border-color: var(--muted); width: 7px; height: 7px; }
.rs-stop.off .rs-rail::before { opacity: 0.25; }
.rs-name { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-stop.off .rs-name { color: var(--muted); }
.rs-stop.from .rs-dot, .rs-stop.to .rs-dot { width: 13px; height: 13px; border-width: 3px; }
.rs-stop.from .rs-dot { background: var(--line); }
.rs-stop.to .rs-dot { background: var(--bg); box-shadow: 0 0 0 3px var(--border); }
.rs-stop.from .rs-name, .rs-stop.to .rs-name { font-weight: 700; }
.rs-tag { flex-shrink: 0; font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--line-ink); background: var(--line); border-radius: 999px; padding: 1px 7px; }
.rs-time { flex-shrink: 0; font-family: var(--board); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--green); }
.rs-stop.off .rs-time { color: var(--muted); font-family: inherit; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; }
/* the train: a dot on the rail only (no text over names) */
.rs-train { position: absolute; left: 0; width: 26px; transform: translateY(-50%); display: flex; justify-content: center; pointer-events: none; z-index: 3; }
.rs-train-dot { width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 3px solid var(--line);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.10), 0 1px 4px rgba(0, 0, 0, 0.55); }

/* subsequent-train rows are buttons that expand their own stop list */
.trip { border-bottom: 1px solid var(--border); }
.trip-row { width: 100%; text-align: left; background: transparent; border: none; cursor: pointer; }
.trip-row.row { border-bottom: none; }
.trip-row .right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.trip.open { background: rgba(255, 255, 255, 0.02); }
.trip .stops-collapse { padding: 0 4px 10px; }

/* ---- content ---- */
main#content { padding: 16px; flex: 1; }
.section-label {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin: 6px 0 8px;
}
.direction-head { font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
.direction-head .arrow { color: var(--line); }

.hero {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px; margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chip {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
}
.chip.E { background: var(--express); color: #241203; }  /* dark ink reads on amber */
.chip.L { background: var(--border); color: var(--muted); }
/* hero head: content left, countdown badge top-right */
.hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hero-left { flex: 1; min-width: 0; }
.hero-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.hero-meta { font-size: 12px; color: var(--muted); margin-top: 5px; }
/* live GPS tracking indicator in the hero (only when the train is actually moving) */
.live-loc { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px;
  font-size: 12.5px; font-weight: 700; color: var(--green); }
.live-pip { width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px rgba(57, 217, 138, 0.18); animation: pulse 1.6s ease-in-out infinite; }
.hero-countdown { flex-shrink: 0; }
.cd-cancel { color: var(--red); font-weight: 700; font-size: 14px; padding-top: 6px; }
/* split-flap (Solari) departure-board countdown */
.flapboard { display: inline-flex; gap: 5px; align-items: center; }
.flip-colon {
  font-family: var(--board); font-weight: 700; font-size: 24px; color: #9aa0a8; padding: 0 1px;
}
.flip-card {
  position: relative; width: 27px; height: 44px; border-radius: 7px;
  background: #2b2f36; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  perspective: 200px; /* gives the flip its 3D depth */
}
/* soft hairline seam — hints at the split-flap without slashing the digit */
.flip-card::after {
  content: ""; position: absolute; left: 3px; right: 3px; top: 50%;
  height: 1px; margin-top: -0.5px; background: rgba(0, 0, 0, 0.28);
  z-index: 4; pointer-events: none;
}
.flip-card > div {
  position: absolute; left: 0; width: 100%; height: 22px; overflow: hidden;
  background-image: linear-gradient(180deg, #3f444d, #33373f);
}
.flip-card > div span {
  display: block; width: 100%; text-align: center;
  font: 800 30px/44px var(--board); font-variant-numeric: tabular-nums;
  color: #f8f6f0; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.flip-card .top, .flip-card .flip-top { top: 0; border-radius: 7px 7px 0 0; }
.flip-card .bottom, .flip-card .flip-bottom { bottom: 0; border-radius: 0 0 7px 7px; background-image: linear-gradient(180deg, #2e323a, #23262d); }
.flip-card .bottom span, .flip-card .flip-bottom span { transform: translateY(-22px); }
.flip-card .flip-top { transform-origin: bottom center; backface-visibility: hidden; z-index: 3; }
.flip-card .flip-bottom { transform-origin: top center; backface-visibility: hidden; z-index: 3; transform: rotateX(90deg); }
.flip-card .flip-top, .flip-card .flip-bottom { display: none; }
.flip-card.flipping .flip-top { display: block; animation: flap-top 0.34s ease-in forwards; }
.flip-card.flipping .flip-bottom { display: block; animation: flap-bottom 0.34s ease-out forwards; }
@keyframes flap-top { 0% { transform: rotateX(0deg); } 50%, 100% { transform: rotateX(-90deg); } }
@keyframes flap-bottom { 0%, 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0deg); } }
@media (prefers-reduced-motion: reduce) {
  .flip-card.flipping .flip-top, .flip-card.flipping .flip-bottom { animation: none; display: none; }
}
.times {
  font-family: var(--board); font-variant-numeric: tabular-nums;
  font-size: 25px; font-weight: 600; margin: 8px 0 0;
}
.times .to { color: var(--muted); font-size: 16px; font-weight: 400; }
.times .was { color: var(--muted); font-size: 13px; text-decoration: line-through; margin-right: 6px; }
.delay { color: var(--amber); font-size: 13px; font-weight: 600; }
.cancelled-tag { color: var(--red); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.live-dot { color: var(--green); font-size: 11px; }
.live-dot::before { content: "●"; margin-right: 4px; animation: pulse 1.8s ease-in-out infinite; display: inline-block; }

/* ---- realtime status pills ---- */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: middle;
  font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
}
.status-pill .pdot, .mini-status .pdot {
  width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: currentColor;
  animation: pulse 1.6s ease-in-out infinite;
}
.st-ontime { color: var(--green); background: rgba(57, 217, 138, 0.15); }
.st-late { color: var(--amber); background: rgba(240, 166, 60, 0.16); }
.st-sched { color: var(--muted); background: var(--border); }
.st-cancel { color: var(--red); background: rgba(255, 107, 97, 0.16); }
.mini-status { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; }
.mini-status.st-ontime { color: var(--green); }
.mini-status.st-late { color: var(--amber); }
.mini-status .pdot { width: 5px; height: 5px; }
.row .dep .was {
  display: block; font-size: 11px; color: var(--muted);
  text-decoration: line-through; font-weight: 400;
}

.wx-inner {
  font-size: 12px; color: var(--muted); cursor: help;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .pulse, .live-dot::before { animation: none; } }

.hint { font-size: 13px; color: var(--express); margin: 0 0 12px; padding: 0 2px; }

/* ---- schedule date bar ---- */
.datebar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 2px 0 16px; }
.chip-day {
  background: var(--bg); border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.chip-day:hover:not(.on) { color: var(--text); }
.chip-day.on { background: var(--line); border-color: var(--line); color: var(--line-ink); font-weight: 600; }

/* ---- X (twitter) service updates ---- */
#social { padding: 0 16px 4px; }
details.social {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
}
details.social summary {
  padding: 12px 14px; font-size: 13px; font-weight: 600; cursor: pointer; list-style: none;
}
details.social summary::-webkit-details-marker { display: none; }
details.social summary::after { content: " ▾"; color: var(--muted); font-weight: 400; }
details.social[open] summary::after { content: " ▴"; }
details.social summary a { color: var(--line); text-decoration: none; }
.social-body { padding: 0 12px 12px; }
.social-fallback { margin-top: 8px; }
.social-fallback a { color: var(--line); }

.list { border-top: 1px solid var(--border); }
.list.tt .right { color: var(--muted); }
.list.tt .right .dur { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Express trains get a warm accent bar + tint so they pop in the timetable. */
.list.tt .row.express {
  box-shadow: inset 3px 0 0 var(--express);
  background: linear-gradient(90deg, rgba(240, 166, 60, 0.12), rgba(240, 166, 60, 0));
  padding-left: 10px;
}
.list.tt .row.express .dep { color: var(--express); }
.list.tt .row.express .meta .chip.E { margin-right: 4px; }
.row {
  display: grid; grid-template-columns: 82px 1fr auto; gap: 10px; align-items: center;
  padding: 12px 4px; border-bottom: 1px solid var(--border);
  font-family: var(--board); font-variant-numeric: tabular-nums; font-size: 14px;
}
.row .dep { font-weight: 600; }
.row .meta {
  font-size: 12px; color: var(--muted); font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row .right { text-align: right; font-size: 13px; color: var(--green); }
.row .right .delay { display: block; }
.row .right .jt { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; }
.jt-ico { opacity: 0.85; flex-shrink: 0; }
.row.cancelled .dep, .row.cancelled .meta { text-decoration: line-through; }
.row.cancelled .right { color: var(--red); }

footer {
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
  font-size: 11px; color: var(--muted); display: flex; justify-content: space-between;
  border-top: 1px solid var(--border);
}

/* ---- setup view ---- */
/* The settings page is a form — it scrolls freely (no sticky chrome). */
.setup-header { padding-bottom: 16px; position: static; }
.sec, .prefs section { scroll-margin-top: 12px; }
.setup-header h1 { padding-top: 14px; }
.setup-header p { padding: 4px 16px 0; }
#view-setup main { padding: 20px 16px; flex: 1; }
#view-setup h2 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 10px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; box-shadow: var(--shadow-sm);
}

/* ---- brand mark (setup header) ---- */
.brand { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.brand-mark { border-radius: 7px; box-shadow: var(--shadow-sm); }
.brand h1 { padding: 0; }

/* ---- settings sections ---- */
.sec { margin-bottom: 28px; }
.sec > .muted, .prefs section > .muted { margin-bottom: 12px; }
.sec > * { transition: opacity 0.35s ease; }
#add-route { margin-top: 2px; }

/* ---- preferences group (ungated) ---- */
.prefs { margin-top: 4px; padding-top: 22px; border-top: 1px solid var(--border); }
.prefs section { margin-bottom: 24px; }
.prefs section > .muted { margin-bottom: 12px; }
.tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 8px; vertical-align: middle; margin-left: 6px;
}
.save-note { text-align: center; margin: 8px 0 0; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
label input, label select {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font-size: 15px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 10px;
}
label.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: 14px; }
label.check input { width: auto; margin-top: 3px; }

/* ---- tap-friendly dropdown (replaces native <select> popups, which the
       Tesla in-car browser won't open) ---- */
.cs { position: relative; display: block; }
.cs-native { display: none; }              /* native select kept as data source, hidden */
label .cs { margin-top: 5px; }
.cs-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 15px;
}
.cs-btn .cs-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-btn .cs-placeholder { color: var(--muted); }
.cs-btn .cs-caret { color: var(--muted); flex-shrink: 0; font-size: 12px; }
.cs-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60;
  max-height: 300px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); padding: 4px;
}
.cs-opt {
  padding: 12px; border-radius: 8px; font-size: 15px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cs-opt:hover { background: var(--bg); }
.cs-opt.sel { background: var(--line); color: var(--line-ink); }
.cs-opt.cs-empty { color: var(--muted); cursor: default; }

/* compact variant in the sticky header (route switcher) */
.header-row .cs { flex: 1 1 auto; min-width: 0; }
.header-row .cs-btn { height: 36px; padding: 0 10px; font-size: 13px; font-weight: 500; }

/* time picker: hour + minute dropdowns side by side */
.cs-time { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.cs-time .cs { flex: 1 1 0; min-width: 0; margin-top: 0; }
.cs-time-colon { color: var(--muted); font-weight: 700; }

/* schedule date dropdown sits at the right end of the date bar; its panel
   sizes to the labels (not the narrow button) and anchors right so dates
   like "Wed, Jul 22" never get cut off */
.datebar .cs { margin-left: auto; flex: 0 0 auto; }
.datebar .cs-btn { width: auto; padding: 6px 12px; font-size: 13px; }
.datebar .cs .cs-panel {
  left: auto; right: 0; width: max-content; min-width: 100%;
  max-width: min(300px, calc(100vw - 32px));
}
button.primary {
  background: var(--line); color: var(--line-ink); border: none; border-radius: 10px;
  padding: 11px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform 0.1s, filter 0.15s;
}
button.primary:hover { filter: brightness(1.08); }
button.primary:active { transform: scale(0.98); }
button.ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; font-size: 12px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
button.ghost:active { transform: scale(0.98); }
button.ghost.danger { color: var(--red); }
button.ghost.danger.confirm { background: #C0392B; border-color: #C0392B; color: #fff; }
button.ghost.wide { width: 100%; padding: 11px; font-size: 14px; font-weight: 500; color: var(--text); }
button.ghost.wide:hover { border-color: var(--line); }
button.ghost.wide.danger { color: var(--red); }
button.ghost.wide.danger:hover { border-color: var(--red); }
button.ghost.wide.danger.confirm { background: #C0392B; border-color: #C0392B; color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.actions { margin: 26px 0 30px; display: flex; align-items: center; gap: 12px; }
.route-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px;
}
.route-item.active { border-color: var(--line); }
.route-item .ri-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.route-item .ri-main { flex: 1; min-width: 0; cursor: pointer; }
.route-item .name { font-weight: 600; font-size: 14px; }
.route-item .sub { font-size: 12px; color: var(--muted); }
.route-item .ri-go { color: var(--line); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; }

.setup-top { display: flex; justify-content: flex-end; padding: 10px 16px 0; }
#setup-done { font-weight: 600; }

/* ---- settings gating (reminders/briefing need a route + notifications) ---- */
.sec.locked { pointer-events: none; }
.sec.locked > *:not(.lock-hint):not(h2) { opacity: 0.45; }
.sec.locked > h2 { opacity: 0.7; }
.lock-hint {
  display: none; color: var(--muted); margin: 0 0 12px;
  padding-left: 10px; border-left: 2px solid var(--border);
}
.sec.locked .lock-hint { display: block; }
.ok { display: flex; align-items: center; gap: 6px; color: var(--green); font-weight: 600; margin-top: 10px; }
.ok::before {
  content: ""; width: 15px; height: 15px; flex-shrink: 0; background: var(--green);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.42z"/></svg>') center/contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.42z"/></svg>') center/contain no-repeat;
}
.just-unlocked .card { animation: unlockring 1.4s ease-out; }
@keyframes unlockring {
  0% { box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.5); }
  100% { box-shadow: var(--shadow-sm); }
}
@media (prefers-reduced-motion: reduce) {
  .sec > *, .just-unlocked .card { transition: none; animation: none; }
}

/* live indicator dot on the Live view tab */
.tab-live {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); margin-right: 6px; vertical-align: middle;
  animation: pulse 1.8s ease-in-out infinite;
}
.seg button.on .tab-live { background: #fff; }

/* ---- onboarding: living map ----
   Dark, full-bleed. Scoping the palette as variables here flips the wizard's
   rows, inputs, and feature cards to dark automatically (they read these vars). */
#view-wizard {
  --bg: #0A0F15; --surface: #0E151E; --text: #E9EDF2;
  --muted: #7E8A97; --border: #223041;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5); --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
  /* the immersive onboarding map stays dark regardless of the app theme */
  --map-bg: #0A0F15; --map-bg-edge: #17222E; --map-water: #123049; --map-water-edge: #2A5074;
  --map-ink: #FFFFFF; --map-ink-halo: #05090E; --map-term: #AEBAC7;
  background: var(--bg); color: var(--text);
}
.wiz-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 0; }
.wiz-spacer { width: 36px; }
.wiz-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wiz-brand img { border-radius: 6px; display: block; }
.wiz-brand span { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.wiz-dots { display: flex; gap: 7px; justify-content: center; padding: 14px 0; }
.wiz-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); transition: background 0.25s;
}
.wiz-dots span.on { background: var(--line); }
.wiz-header { padding-bottom: 0; }
.wiz-header h1 { padding: 16px 16px 0; font-size: 23px; letter-spacing: -0.02em; text-align: center; }
.wiz-header p { padding: 4px 16px 0; font-size: 14px; text-align: center; }
#wiz-body { flex: 1; padding-bottom: 24px; }
#wiz-filter {
  display: block; width: calc(100% - 32px); margin: 12px 16px 0; padding: 10px 12px;
  font-size: 15px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
}
/* tiles: two columns once there's room — halves the scroll for 11 lines / long station lists */
.wiz-list { padding: 12px 16px 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 400px) { .wiz-list { grid-template-columns: 1fr 1fr; } }
.wiz-list .center { grid-column: 1 / -1; }
.wiz-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: var(--surface); color: var(--text); font: inherit;
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm);
  padding: 10px 12px; min-height: 54px; cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.wiz-row:hover { border-color: var(--line); }
/* .hl = highlighted from a map hover/tap (border/shadow colored inline to the line) */
.wiz-row.hl { background: rgba(255, 255, 255, 0.03); transform: translateY(-1px); }
.wiz-row:active { transform: scale(0.985); }
.wiz-bar { width: 6px; align-self: stretch; border-radius: 3px; flex-shrink: 0; }
.wiz-txt { display: flex; flex-direction: column; min-width: 0; }
.wiz-row .t { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-row .s { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-go { margin-left: auto; color: var(--muted); font-size: 18px; line-height: 1; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) { .wiz-row:active { transform: none; } }

/* saved routes + section headings inside step 1 */
.wiz-saved, .wiz-section-label, .wiz-listbar { grid-column: 1 / -1; }
.wiz-saved { display: flex; flex-direction: column; gap: 8px; }
.wiz-section-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 6px 2px 0; }
.wiz-add-label { margin-top: 14px; }
.wiz-row.saved { border-color: var(--line); }
.wiz-row.saved .wiz-bar { width: 6px; }
.wiz-reset { width: 100%; margin-top: 4px; padding: 9px; font-size: 13px; }
.wiz-reset.confirm { background: #C0392B; border-color: #C0392B; color: #fff; }
/* step-3 suggested destination (auto-picked downtown, one-tap continue) */
.wiz-suggest { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.wiz-suggest-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wiz-suggest-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz-suggest .primary { flex-shrink: 0; }
.wiz-row.suggested { border-color: var(--line); }
/* station-list bar with the reverse toggle */
.wiz-listbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 2px 2px; }
.wiz-rev { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 8px; padding: 5px 11px; font-size: 12px; font-weight: 600; cursor: pointer; }
.wiz-rev:hover { border-color: var(--line); color: var(--text); }

/* the map itself is the primary picker (steps 1-3) */
.wiz-map { margin: 10px 10px 0; border-radius: 16px; overflow: hidden;
  background: var(--map-bg); border: 1px solid var(--map-bg-edge); position: relative; }
.lmap-load { min-height: 260px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; text-align: center; padding: 24px; }
.lmap { width: 100%; height: auto; display: block; max-height: 60vh; }
/* the pan/zoom camera — a long, gently-decelerating glide into a line (easeOutExpo) */
.lmap-cam { transform-origin: 0 0; transition: transform 1.05s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform; }
.lmap-lake { fill: var(--map-water); stroke: var(--map-water-edge); stroke-width: 1.4; stroke-opacity: 0.7; }
.lmap-line .lmap-hit { fill: none; stroke: #000; stroke-opacity: 0; stroke-width: 15; cursor: pointer; }
/* lines a touch bolder so they read on the dark water */
.lmap-line .lmap-glow { fill: none; stroke: var(--c); stroke-opacity: 0.2; stroke-width: 8.5; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.lmap-line .lmap-core { fill: none; stroke: var(--c); stroke-width: 2.8; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.lmap-line .lmap-stn { fill: var(--map-bg); stroke: var(--c); stroke-width: 1.2; pointer-events: none; }
/* Station labels only appear on the FOCUSED (picked) line — big and readable,
   with overlapping ones culled. Sized generously so they survive the viewBox→
   screen downscale; counter-scaled by --inv so zoom level doesn't change them. */
.lmap-line .lmap-lbl { display: none; fill: var(--map-ink); font-weight: 700; font-family: "Overpass", sans-serif;
  font-size: calc(14px * var(--px, 1) * var(--inv, 1)); paint-order: stroke; stroke: var(--map-ink-halo); stroke-width: calc(4px * var(--px, 1) * var(--inv, 1)); pointer-events: none; }
.lmap-line .lmap-term { fill: var(--map-term); font-weight: 700; font-family: "Overpass", sans-serif;
  font-size: calc(13px * var(--px, 1) * var(--inv, 1)); paint-order: stroke; stroke: var(--map-ink-halo); stroke-width: calc(3.5px * var(--px, 1) * var(--inv, 1)); pointer-events: none; }
/* hover = highlight only (no camera move): brighten + a slow flowing dash */
.lmap-line.hovering .lmap-core { stroke-width: 4.6; stroke-dasharray: 16 12; animation: lmapFlow 1.4s linear infinite; }
.lmap-line.hovering .lmap-glow { stroke-opacity: 0.6; stroke-width: 12; }
@keyframes lmapFlow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -28; } }

.lmap-line.on .lmap-lbl { display: block; }
/* on the system view, hovering a line previews its station names (culled so they
   don't collide), so an unsure rider can see where the line runs */
.lmap:not(.focus) .lmap-line.hovering .lmap-lbl:not(.culled) { display: block; }
.lmap-line .lmap-lbl.culled { display: none; }
/* hovering a dot always reveals its name, even a culled one */
.lmap.focus .lmap-line.on .lmap-stn:hover + .lmap-lbl { display: block; }
.lmap-line.on .lmap-term { display: none; }

.lmap.focus .lmap-line { opacity: 0.06; transition: opacity 0.6s ease; }
.lmap.focus .lmap-line.on { opacity: 1; }
.lmap.focus .lmap-line.on .lmap-core { stroke-width: 4; }
.lmap.focus .lmap-line.on .lmap-glow { stroke-opacity: 0.4; stroke-width: 12; }
.lmap.focus .lmap-line.on .lmap-stn { r: 3.4; cursor: pointer; pointer-events: auto; }
/* the name label is tappable too (the stroke halo widens the hit area past the glyphs) */
.lmap.focus .lmap-line.on .lmap-lbl { pointer-events: auto; cursor: pointer; }
.lmap-line .lmap-stn.from { fill: var(--c); stroke: var(--map-ink); stroke-width: 2; r: 4.5; }
.lmap-line .lmap-stn.to { fill: var(--map-ink); stroke: var(--c); stroke-width: 2.5; r: 4.5; }
.lmap-line .lmap-lbl.pick { display: block; fill: var(--map-ink); font-weight: 800; }
.lmap-hub { fill: var(--map-bg); stroke: var(--map-ink); stroke-width: 2.2; }
.lmap-hub-lbl { fill: var(--map-ink); font-weight: 800; font-family: "Overpass", sans-serif; font-size: calc(12px * var(--px, 1) * var(--inv, 1)); paint-order: stroke; stroke: var(--map-ink-halo); stroke-width: calc(3px * var(--px, 1)); letter-spacing: 0.10em; }
.lmap-train-halo { fill: #2FD53B; opacity: 0.25; animation: lmapPulse 1.6s ease-in-out infinite; }
.lmap-train { fill: var(--map-ink); stroke: #2FD53B; stroke-width: 2.4; }
@keyframes lmapPulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.07; } }

/* interactive zoom while a line is focused: gestures zoom the map, not the page */
.lmap.focus { touch-action: none; cursor: grab; }
.lmap.focus:active { cursor: grabbing; }
.lmap-ctrls { display: none; position: absolute; right: 10px; bottom: 10px; z-index: 5; flex-direction: column; gap: 6px; }
.lmap-focused .lmap-ctrls { display: flex; }
.lmap-ctrls button {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); backdrop-filter: blur(6px); color: var(--text);
  font-size: 19px; font-weight: 700; line-height: 1; cursor: pointer;
}
.lmap-ctrls button:hover { border-color: var(--line); color: var(--line); }
.lmap-ctrls button:active { transform: scale(0.94); }
.lmap-hint {
  display: none; position: absolute; left: 10px; bottom: 12px; z-index: 5; pointer-events: none;
  font-size: 11px; color: var(--map-term); background: var(--surface); border: 1px solid var(--map-bg-edge); padding: 4px 10px; border-radius: 999px;
}
/* hover caption: the line's name + route, top-left of the map */
.lmap-caption {
  display: none; position: absolute; left: 10px; top: 10px; z-index: 6; pointer-events: none;
  align-items: center; gap: 8px; max-width: calc(100% - 20px);
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--map-bg-edge); box-shadow: var(--shadow-sm);
  font-size: 12px; white-space: nowrap; overflow: hidden;
}
.lmap-caption.show { display: inline-flex; }
.lmap-cap-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.lmap-cap-name { font-weight: 700; color: var(--text); flex-shrink: 0; }
.lmap-cap-route { color: var(--map-term); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lmap-focused .lmap-hint { display: block; }
@media (prefers-reduced-motion: reduce) {
  .lmap-train-halo, .lmap-line.hovering .lmap-core { animation: none; }
  .lmap.focus .lmap-line, .lmap-cam { transition: none; }
}

/* wizard step 4: feature explainers */
.feat {
  grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; box-shadow: var(--shadow-sm);
}
.feat svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--line); margin-top: 1px; }
.feat > div { flex: 1; min-width: 0; }
.feat b { display: block; font-size: 14px; }
.feat > div > span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.feat label.check { margin: 10px 0 0; font-size: 13px; }
.feat .feat-cfg { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.feat .feat-cfg label { margin-bottom: 10px; }
.sched-hint { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.sched-hint:empty { display: none; }
.center-note { grid-column: 1 / -1; text-align: center; margin-top: 4px; }
.feat-actions { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 6px; }
.feat-actions .primary { flex: 1; }


/* ---- contextual nudge cards (feature discovery on the board) ---- */
#nudge:not(:empty) { padding: 12px 16px 0; }
.nudge {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
}
.nudge b { font-size: 14px; }
.nudge-txt span { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.nudge-btns { display: flex; gap: 8px; }
.nudge-btns .primary { padding: 9px 16px; font-size: 13px; }
.nudge-btns .ghost { padding: 9px 14px; font-size: 13px; }

/* ---- one-off trip sheet ---- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(16, 24, 40, 0.48);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--surface); width: 100%; max-width: 520px;
  border-radius: 18px 18px 0 0; box-shadow: var(--shadow-md);
  max-height: 88dvh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  animation: sheet-in 0.22s ease;
}
@media (min-width: 560px) {
  .sheet-backdrop { align-items: center; padding: 20px; }
  .sheet { border-radius: 18px; }
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.sheet-head h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.sheet > .muted { margin-bottom: 14px; }
@keyframes sheet-in { from { transform: translateY(20px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .sheet { animation: none; }
  .icon-btn:active, button.primary:active, button.ghost:active { transform: none; }
}

/* ---- footer / attribution ---- */
.site-foot { margin-top: 6px; }
/* "Built by …" is a button that opens the About sheet (visitor count lives there) */
button.built-by {
  display: block; width: 100%; margin: 0; padding: 14px 16px 0;
  background: none; border: 0; cursor: pointer; font: inherit;
  font-size: 12px; color: var(--muted); text-align: center;
}
button.built-by .bb-em { color: var(--line); font-weight: 500; }
button.built-by:hover .bb-em { text-decoration: underline; }
button.built-by:focus-visible { outline: 2px solid var(--line); outline-offset: 2px; border-radius: 6px; }

/* visitor counter inside the About sheet */
.about-by { padding: 4px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.about-by a { color: var(--line); text-decoration: none; font-weight: 500; }
.about-by a:hover { text-decoration: underline; }
.visits { margin: 16px 0 6px; text-align: center; }
.visits-label {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.visits-flap { justify-content: center; }
.visits-spark { display: block; width: 160px; height: 34px; margin: 16px auto 4px; overflow: visible; }
.visits-total { margin-top: 10px; }
.visits-total b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 700; }
.disclaimer {
  padding: 6px 16px calc(14px + env(safe-area-inset-bottom));
  font-size: 10px; line-height: 1.5; color: var(--muted); text-align: center;
}
