/* Park Pulse — mobile-first, thumb-zone controls at the bottom. */

:root {
  --bg: #f4f3fa;
  --card: #ffffff;
  --ink: #17172e;
  --muted: #64647e;
  --line: #e3e2ee;
  --brand: #3b2fc9;
  --brand-ink: #ffffff;
  --top: #16163a;
  --top-ink: #f2f1ff;
  --chip: #ecebf7;
  --w-low: #148a4a;
  --w-mid: #a86b00;
  --w-high: #c9480c;
  --w-max: #b3132b;
  --down: #7a7a90;
  --good: #148a4a;
  --bad: #b3132b;
  --radius: 14px;
  --dock-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e1c;
    --card: #191930;
    --ink: #ecebff;
    --muted: #a3a2c0;
    --line: #2a2a47;
    --brand: #8b80ff;
    --brand-ink: #0e0e1c;
    --top: #0a0a17;
    --chip: #24243f;
    --w-low: #3fd17f;
    --w-mid: #f0b43c;
    --w-high: #ff8a4c;
    --w-max: #ff5c74;
    --down: #8d8daa;
    --good: #3fd17f;
    --bad: #ff5c74;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: calc(var(--dock-h) + 64px + env(safe-area-inset-bottom, 0px));
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- header */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--top);
  color: var(--top-ink);
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 10px;
}

.top-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.brand {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: #6dffa8;
  box-shadow: 0 0 0 0 rgba(109, 255, 168, .6);
  animation: pulse 2.4s infinite;
}
.pulse.off { background: #ff8a8a; animation: none; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(109, 255, 168, .55); }
  70% { box-shadow: 0 0 0 9px rgba(109, 255, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(109, 255, 168, 0); }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.status { font-size: .8rem; opacity: .8; text-align: right; }
.status.warn { color: #ffd27a; opacity: 1; }

.seg {
  display: flex;
  margin-top: 10px;
  background: rgba(255, 255, 255, .09);
  border-radius: 12px;
  padding: 3px;
}
.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--top-ink);
  padding: 9px 6px;
  border-radius: 9px;
  font-weight: 600;
  font-size: .95rem;
  min-height: 42px;
}
.seg button[aria-selected="true"] { background: var(--top-ink); color: var(--top); }

.hours { margin-top: 8px; font-size: .85rem; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.hours:empty { display: none; }
.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  letter-spacing: .02em;
}
.badge.emh { background: #ffd27a; color: #2d1f00; }
.badge.open { background: #6dffa8; color: #003318; }
.badge.closed { background: #ff9d9d; color: #3a0000; }

/* ------------------------------------------------------------------ main */

main { padding: 12px 12px 0; max-width: 720px; margin: 0 auto; outline: none; }

.empty { color: var(--muted); text-align: center; padding: 32px 16px; }
.notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--w-mid);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 10px;
  font-size: .88rem;
}
.notice.err { border-left-color: var(--bad); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.group-h {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 16px 4px 6px;
  font-weight: 700;
}
.group-h:first-child { margin-top: 4px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* ride rows */

.ride { overflow: hidden; }
.ride-main {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 12px 12px 12px 14px;
  min-height: 64px;
}
.ride-info { flex: 1; min-width: 0; }
.ride-name { font-weight: 600; font-size: 1rem; line-height: 1.25; }
.ride-name .star { color: #e0a400; margin-right: 4px; }
.ride-meta { font-size: .8rem; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 2px 8px; }
.ride-meta .up { color: var(--w-high); font-weight: 600; }
.ride-meta .down { color: var(--good); font-weight: 600; }
.ride-meta .done { color: var(--good); font-weight: 600; }

.wait {
  flex: 0 0 auto;
  min-width: 62px;
  text-align: center;
  border-radius: 12px;
  padding: 6px 6px 4px;
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.wait small { display: block; font-size: .62rem; font-weight: 600; opacity: .9; margin-top: 2px; letter-spacing: .04em; }
.wait.low { background: var(--w-low); }
.wait.mid { background: var(--w-mid); }
.wait.high { background: var(--w-high); }
.wait.max { background: var(--w-max); }
.wait.open { background: var(--w-low); font-size: .9rem; padding: 12px 6px; }
.wait.down, .wait.closed, .wait.refurb, .wait.unknown {
  background: var(--chip); color: var(--muted); font-size: .82rem; padding: 12px 6px; font-weight: 700;
}
.wait.down { color: var(--bad); }
@media (prefers-color-scheme: dark) { .wait.low, .wait.mid, .wait.high, .wait.max, .wait.open { color: #0e0e1c; } }

.ride.closed .ride-name { color: var(--muted); }

.ride-detail { padding: 0 14px 14px; border-top: 1px dashed var(--line); }
.ride-detail .facts { font-size: .85rem; color: var(--muted); margin: 10px 0; display: grid; gap: 3px; }
.spark { width: 100%; height: 72px; display: block; margin-top: 8px; }
.spark .ln { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark .ar { fill: var(--brand); opacity: .12; }
.spark-lbl { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); }

.actions { display: flex; gap: 8px; margin-top: 12px; }
.btn {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 12px;
  padding: 12px 10px;
  font-weight: 600;
  min-height: 48px;
}
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.danger { color: var(--bad); }
.btn.small { flex: 0 0 auto; min-height: 36px; padding: 6px 12px; font-size: .85rem; }

/* shows */

.show { padding: 12px 14px; }
.show-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.show-name { font-weight: 600; }
.show-next { font-size: .85rem; font-weight: 700; color: var(--brand); white-space: nowrap; }
.times { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.time {
  font-size: .82rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--chip);
  font-variant-numeric: tabular-nums;
}
.time.past { opacity: .4; text-decoration: line-through; }
.time.next { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.park-tag { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* trip */

.countdown { text-align: center; padding: 16px; margin-bottom: 10px; }
.countdown b { font-size: 2rem; display: block; color: var(--brand); }
.day { padding: 14px; margin-bottom: 10px; }
.day.today { border: 2px solid var(--brand); }
.day h2 { margin: 0 0 8px; font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; }
.day-park { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.day-park:first-of-type { border-top: 0; }
.day-park .hrs { text-align: right; font-variant-numeric: tabular-nums; }
.day details { margin-top: 10px; }
.day summary { cursor: pointer; font-weight: 600; padding: 8px 0; min-height: 40px; }
.day .show-row { padding: 8px 0; border-top: 1px solid var(--line); }
.day .show-row:first-child { border-top: 0; }

/* mine */

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { padding: 12px 8px; text-align: center; }
.stat b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .75rem; color: var(--muted); }
.log-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.log-item .when { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--muted); width: 3.2em; flex: 0 0 auto; }
.log-item .what { flex: 1; min-width: 0; }
.log-item .what small { display: block; color: var(--muted); font-size: .8rem; }
.fav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.fav-item .what { flex: 1; min-width: 0; }
.fav-item .tick { width: 1.4em; text-align: center; color: var(--good); font-weight: 800; }
.fav-item .live { font-weight: 700; font-variant-numeric: tabular-nums; }
.foot { text-align: center; font-size: .78rem; color: var(--muted); padding: 18px 8px 6px; }
.foot a { color: inherit; }

/* ------------------------------------------------------------ bottom dock */

.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .06);
}

.toolbar {
  display: flex;
  gap: 6px;
  padding: 8px 10px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 720px;
  margin: 0 auto;
  align-items: center;
}
.toolbar::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: .88rem;
  font-weight: 600;
  min-height: 40px;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search {
  flex: 1 0 120px;
  min-width: 120px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
  font-size: 16px; /* no iOS zoom */
}
.toolbar select {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 999px;
  padding: 8px 10px;
  min-height: 40px;
  font-size: .88rem;
  font-weight: 600;
}

.tabs { display: flex; max-width: 720px; margin: 0 auto; }
.tabs button {
  flex: 1;
  border: 0;
  background: none;
  padding: 8px 4px 10px;
  min-height: var(--dock-h);
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tabs .ti { font-size: 1.3rem; line-height: 1.2; }
.tabs button[aria-current="page"] { color: var(--brand); }

/* ------------------------------------------------------------ bottom sheet */

.sheet {
  border: 0;
  padding: 0;
  margin: auto auto 0;
  width: 100%;
  max-width: 560px;
  border-radius: 20px 20px 0 0;
  background: var(--card);
  color: var(--ink);
  max-height: 90vh;
}
.sheet::backdrop { background: rgba(10, 10, 25, .5); }
.sheet form { padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; }
.sheet h2 { margin: 0; font-size: 1.15rem; }
.sheet label { font-size: .85rem; font-weight: 600; color: var(--muted); display: grid; gap: 6px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 56px; height: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--chip); font-size: 1.1rem; font-weight: 700; }
.stepper output { flex: 1; text-align: center; font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.qtypes { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet textarea, .sheet input[type="text"], .sheet input[type="password"], .sheet input[inputmode] {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 16px;
}

.pin { max-width: 320px; margin: 40px auto; padding: 20px; display: grid; gap: 12px; text-align: center; }
.pin input { text-align: center; font-size: 1.6rem; letter-spacing: .4em; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--dock-h) + 70px + env(safe-area-inset-bottom, 0px));
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  z-index: 50;
  max-width: calc(100% - 32px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}

@media (min-width: 720px) {
  main { padding-top: 16px; }
}

/* food */
.fstate {
  flex: 0 0 auto;
  min-width: 62px;
  text-align: center;
  border-radius: 12px;
  padding: 10px 6px;
  font-weight: 700;
  font-size: .82rem;
  background: var(--chip);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.fstate.open { background: var(--w-low); color: #fff; }
.fstate.later { color: var(--w-mid); }
.fstate.refurb { color: var(--bad); }
@media (prefers-color-scheme: dark) { .fstate.open { color: #0e0e1c; } }
a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; }
a.btn.primary { color: var(--brand-ink); }

/* account / filters on Mine */
.account { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px; }
.account .what { flex: 1; min-width: 0; }
.account small { display: block; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; }
.toggle-row { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button { padding-left: 2px; padding-right: 2px; }

/* weather */
.wx-chip {
  border: 0;
  background: rgba(255, 255, 255, .14);
  color: inherit;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: .82rem;
  font-weight: 600;
  min-height: 28px;
}
.wx-day { border: 0; background: none; padding: 0 0 6px; font-size: .85rem; color: var(--muted); text-align: left; }
.notice.wx { border-left-color: #3a8ee6; }
.hourly { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.hr { flex: 0 0 auto; min-width: 48px; text-align: center; display: grid; gap: 2px; padding: 6px 2px; border-radius: 10px; background: var(--chip); }
.hr small { font-size: .7rem; color: var(--muted); }
.hr .hr-i { font-size: 1.2rem; }
.hr .wet { color: #3a8ee6; font-weight: 700; }

/* crowd meter */
.crowd { padding: 12px 14px; margin-bottom: 10px; }
.crowd-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.crowd-l { font-size: .95rem; }
.meter { display: flex; gap: 3px; align-items: flex-end; flex: 0 0 auto; }
.meter span { width: 8px; height: 22px; border-radius: 3px; background: var(--chip); }
.meter span:nth-child(1) { height: 10px; }
.meter span:nth-child(2) { height: 13px; }
.meter span:nth-child(3) { height: 16px; }
.meter span:nth-child(4) { height: 19px; }
.meter .on.l1, .meter .on.l2 { background: var(--w-low); }
.meter .on.l3 { background: var(--w-mid); }
.meter .on.l4 { background: var(--w-high); }
.meter .on.l5 { background: var(--w-max); }

/* trains */
.transit h2 .btn { margin-left: auto; }
.deps { list-style: none; margin: 8px 0 0; padding: 0; }
.deps li { display: flex; gap: 8px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.deps li:first-child { border-top: 0; }
.deps .what { flex: 1; min-width: 0; }
.deps small { color: var(--muted); }
.deps .up { color: var(--w-high); font-weight: 700; }
.spark-lbl.ok { color: var(--good); }

@media (max-width: 380px) { .btn-l { display: none; } }

/* six tabs fit on a 360px phone */
.tabs button { font-size: .68rem; min-width: 0; }
.tabs .ti { font-size: 1.2rem; }
.tb-sep { flex: 0 0 1px; align-self: stretch; background: var(--line); margin: 4px 2px; }

/* user pill */
.status { flex: 1; }
.user-pill {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: inherit;
  border-radius: 999px;
  padding: 3px 10px 3px 3px;
  font-size: .8rem;
  font-weight: 600;
  min-height: 32px;
  max-width: 40%;
}
.up-i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: #6dffa8; color: #003318; font-size: .72rem; font-weight: 800;
}
.up-i.big { width: 48px; height: 48px; font-size: 1.1rem; }
.up-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-big { display: flex; gap: 12px; align-items: center; }
.account-big small { display: block; color: var(--muted); }

/* map */
.map-wrap { position: relative; margin: -4px -12px 0; }
.map { height: max(300px, 56vh); }
.ppmap { position: relative; overflow: hidden; touch-action: none; background: #e8e4da; user-select: none; -webkit-user-select: none; }
@media (prefers-color-scheme: dark) { .ppmap .ppmap-tiles { filter: brightness(.8) contrast(1.1) saturate(.8); } }
.ppmap-tiles, .ppmap-markers { position: absolute; inset: 0; }
.ppmap-markers { pointer-events: none; }
.ppmap-tile { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.ppmap-marker {
  position: absolute; left: 0; top: 0;
  pointer-events: auto;
  min-width: 26px; height: 26px; padding: 0 5px;
  border-radius: 13px; border: 2px solid #fff;
  font: 800 .72rem/22px system-ui, sans-serif;
  background: #fff; color: #222;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  text-align: center;
}
.ppmap-marker.sel { outline: 3px solid var(--brand); z-index: 2; transform-origin: center; }
.mk-ride.w-low, .mk-ride.w-open { background: var(--w-low); color: #fff; }
.mk-ride.w-mid { background: var(--w-mid); color: #fff; }
.mk-ride.w-high { background: var(--w-high); color: #fff; }
.mk-ride.w-max { background: var(--w-max); color: #fff; }
.mk-ride.w-down { background: #fff; color: var(--bad); border-color: var(--bad); }
.mk-ride.w-closed, .mk-ride.w-refurb, .mk-ride.w-unknown { background: #bbb; color: #fff; min-width: 14px; height: 14px; line-height: 10px; font-size: .6rem; padding: 0; }
.mk-show, .mk-food, .mk-shop { font-size: .8rem; padding: 0; }
.mk-off { opacity: .55; }
.ppmap-dot { position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); z-index: 3; }
.ppmap-acc { position: absolute; left: 0; top: 0; border-radius: 50%; background: rgba(26, 115, 232, .15); border: 1px solid rgba(26, 115, 232, .4); }
.ppmap-ctl { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; z-index: 4; }
.ppmap-ctl button {
  width: 44px; height: 44px; border-radius: 12px; border: 0;
  background: var(--card); color: var(--ink); font-size: 1.3rem; font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.ppmap-attr { position: absolute; right: 0; bottom: 0; font-size: .62rem; background: rgba(255, 255, 255, .8); color: #333; padding: 1px 5px; z-index: 4; }
.map-card {
  position: absolute; left: 10px; right: 10px; bottom: 18px; z-index: 5;
  background: var(--card); border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.map-card .actions { margin-top: 8px; }
.mc-h { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.mc-x { border: 0; background: none; font-size: 1rem; color: var(--muted); padding: 2px 4px; }
#nearby { padding-top: 6px; }
.near-item { gap: 10px; min-height: 52px; padding: 8px 12px; }
.near-item .what { flex: 1; min-width: 0; }
.near-item small { display: block; color: var(--muted); font-size: .8rem; }
.ni-i { font-size: 1.2rem; }
.ni-d { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fstate.shop { font-size: 1.1rem; padding: 8px 6px; }

/* hours */
.src { color: var(--muted); font-size: .75rem; }
.trip-hours { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; }
.trip-hours b { font-weight: 700; }

/* header search */
.search-btn {
  flex: 0 0 auto;
  width: 36px; height: 32px;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: inherit; font-size: .95rem;
}
.search-btn[aria-expanded="true"], .search-btn.active { background: var(--top-ink); color: var(--top); }
.searchbar { display: flex; gap: 6px; margin-top: 8px; }
.searchbar input {
  flex: 1; min-width: 0;
  border: 0; border-radius: 999px;
  padding: 9px 14px; min-height: 42px;
  font-size: 16px; /* no iOS zoom */
  background: var(--top-ink); color: var(--top);
}
.searchbar button {
  flex: 0 0 auto; width: 42px; height: 42px;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: inherit; font-size: 1rem;
}

/* best times — sequential single-hue ramp (light = short wait, dark = long) */
:root {
  --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5;
  --seq-5: #256abf; --seq-6: #184f95; --seq-7: #0d366b; --seq-none: #ecebf3;
}
@media (prefers-color-scheme: dark) {
  /* dark surface: low values recede toward the surface, high values brighten */
  :root {
    --seq-1: #104281; --seq-2: #1c5cab; --seq-3: #2a78d6; --seq-4: #5598e7;
    --seq-5: #86b6ef; --seq-6: #b7d3f6; --seq-7: #cde2fb; --seq-none: #22223a;
  }
}
.bt-legend { display: flex; align-items: center; gap: 2px; font-size: .72rem; color: var(--muted); margin: 4px 0 8px; flex-wrap: wrap; }
.bt-legend span { margin: 0 4px; }
.bt-legend .bt-cell { width: 14px; height: 12px; flex: 0 0 auto; }
.bt-park { margin: 14px 4px 2px; font-size: .9rem; }
.bt-park span { color: var(--muted); font-size: .82rem; }
.bt-axis { display: flex; justify-content: space-between; font-size: .68rem; color: var(--muted); margin: 0 14px 4px; font-variant-numeric: tabular-nums; }
.bt-row { padding: 10px 12px; }
.bt-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bt-name { border: 0; background: none; padding: 0; font-weight: 600; text-align: left; color: inherit; }
.bt-now { font-size: .75rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bt-strip { display: flex; gap: 2px; margin: 8px 0 6px; }
.bt-cell {
  flex: 1 1 0; min-width: 0; height: 22px; padding: 0;
  border: 0; border-radius: 4px; background: var(--seq-none);
  position: relative;
}
.bt-cell.none { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.bt-cell.lv1 { background: var(--seq-1); } .bt-cell.lv2 { background: var(--seq-2); }
.bt-cell.lv3 { background: var(--seq-3); } .bt-cell.lv4 { background: var(--seq-4); }
.bt-cell.lv5 { background: var(--seq-5); } .bt-cell.lv6 { background: var(--seq-6); }
.bt-cell.lv7 { background: var(--seq-7); }
.bt-cell.best { outline: 2px solid var(--good); outline-offset: 1px; z-index: 1; }
.bt-cell.now::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 4px solid transparent; border-bottom-color: var(--ink); border-top: 0; }
.bt-cell.picked { box-shadow: 0 0 0 2px var(--ink); z-index: 2; }
.bt-cap { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.bt-cap.good { color: var(--ink); }

/* planner */
.planner h2 .btn, .day h2 .btn { margin-left: auto; }
.plan-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }
.plan-row label { display: flex; gap: 6px; align-items: center; font-size: .88rem; }
.plan-row input, .plan-row select { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 6px 8px; font-size: 16px; color: inherit; }
.planner .qtypes { margin: 6px 0; }
.pick-list { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; }
.pick { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: .92rem; min-height: 36px; }
.pick input { width: 20px; height: 20px; flex: 0 0 auto; }
.pick small { color: var(--muted); }
.timeline { list-style: none; margin: 8px 0 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { display: flex; gap: 10px; padding: 6px 0 6px 12px; position: relative; font-variant-numeric: tabular-nums; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.timeline li.show::before { background: var(--w-mid); }
.timeline li.booking::before { background: var(--good); }
.timeline li.done { opacity: .45; text-decoration: line-through; }
.timeline .what { flex: 1; min-width: 0; }
.timeline small { display: block; color: var(--muted); font-size: .78rem; }
.nextup { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; margin-bottom: 10px; border-left: 4px solid var(--brand); }
.nextup small { display: block; color: var(--muted); font-size: .75rem; }
.nextup b { display: block; }
.nextup.warn { border-left-color: var(--bad); }

/* shows star */
.star-btn { border: 0; background: none; color: #e0a400; font-size: 1.15rem; padding: 0 6px 0 0; min-width: 32px; min-height: 32px; }
.show-h { align-items: center; }
.show-h .show-name { flex: 1; }

/* push */
.push-card { padding: 12px; margin-bottom: 8px; }
.push-card p { margin: 0 0 8px; }

/* party markers */
.mk-person { background: #7b2ff7; color: #fff; border-color: #fff; min-width: 30px; height: 30px; border-radius: 50%; line-height: 26px; font-size: .7rem; }
.mk-meet { background: #fff; font-size: 1rem; min-width: 32px; height: 32px; line-height: 28px; border-color: var(--bad); }

/* wrapped */
.wrapped { padding: 14px; margin: 12px 0; background: linear-gradient(135deg, #2b1a7a, #7b2ff7); color: #fff; border: 0; }
.wrapped h2 { margin: 0 0 10px; font-size: 1.15rem; }
.wr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.wr-tile { background: rgba(255, 255, 255, .12); border-radius: 12px; padding: 10px; }
.wr-tile b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.wr-tile span { font-size: .78rem; opacity: .85; }
.wr-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: .9rem; }
