/* Project 50 live screen. Every value comes from tokens.css; pass two re-skins there. */
html, body { margin: 0; height: 100%; }
body { background: var(--color-bg); color: var(--color-text); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
/* Thin scrollbars in the theme's colours. scrollbar-color covers Chrome, Edge and Firefox;
   the ::-webkit rules are for Safari (Chrome ignores them once scrollbar-color is set). */
:root { color-scheme: light; } [data-theme="dark"] { color-scheme: dark; }
* { scrollbar-width: thin; scrollbar-color: var(--color-line) transparent; }
*:hover { scrollbar-color: var(--color-muted) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-line); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--color-muted); }
::-webkit-scrollbar-corner { background: transparent; }
a { color: inherit; }
#app { position: fixed; inset: 0; overflow: hidden; }
#map { position: absolute; inset: 0; z-index: 0; background: var(--color-surface-2); } /* z-index keeps markers under the strip and sheet */

/* ── shared bits ─────────────────────────────────────────────────────────── */
.kick { font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-muted); }
.kick.acc { color: var(--color-accent); }
.disp { font-family: var(--font-display); font-weight: 700; }
.muted { color: var(--color-muted); }
.xs { font-size: var(--text-xs); } .sm { font-size: var(--text-sm); } .md { font-size: var(--text-md); }
.ap { font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.donate { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 var(--space-4); border-radius: var(--radius-pill);
  background: var(--color-donate); color: var(--color-on-donate); font-size: var(--text-md); font-weight: 700; text-decoration: none; white-space: nowrap; flex: none; }
/* the hand print alone (flips per theme via --hand-img) for small functional spots */
.hand { display: inline-block; flex: none; width: 16px; height: 15px; background: var(--hand-img) center/contain no-repeat; transform: rotate(-8deg); }
.hand.logo { width: 30px; height: 28px; }
.charity-line { display: inline-flex; align-items: center; gap: 5px; }
.donate.block { display: flex; height: 48px; border-radius: var(--radius-md); }
.slot { background: var(--placeholder-fill); border: 1px dashed var(--color-muted); border-radius: var(--radius-sm); display: grid; place-items: center;
  font: 600 10px var(--font-mono); color: var(--color-muted); }
.card { padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-2); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); display: inline-block; }

/* ── status strip ────────────────────────────────────────────────────────── */
#strip { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 2; }
.strip { background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); padding: var(--space-2) var(--space-4) var(--space-3);
  display: flex; flex-direction: column; gap: var(--space-2); }
.strip-top { display: flex; align-items: center; gap: var(--space-2); height: 44px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-success); flex: none; }
.live-dot.warn { background: var(--color-warning); }
.live-dot.off { background: var(--color-muted); }
.strip-top .upd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-btns { margin-left: auto; margin-right: -10px; display: flex; align-items: center; flex: none; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; font-size: 18px; display: grid; place-items: center; padding: 0; }
.toggle { display: flex; align-items: center; width: 40px; height: 22px; border-radius: var(--radius-pill); border: 1px solid var(--color-line); background: var(--color-surface-2); padding: 2px; box-sizing: border-box; }
.toggle i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--color-text); box-sizing: border-box; background: linear-gradient(90deg, var(--color-text) 50%, var(--color-bg) 50%);
  transition: transform var(--motion-base) var(--ease-out); }
[data-theme="dark"] .toggle i { transform: translateX(18px); }
.banner { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-2);
  font-size: var(--text-sm); font-weight: 700; line-height: 1.3; }
.banner b { flex: none; min-width: 20px; height: 20px; border-radius: 50%; background: var(--color-text); color: var(--color-bg); display: grid; place-items: center; font-size: 9px; letter-spacing: 1px; }
.stats { display: flex; align-items: flex-end; gap: var(--space-4); }
.stats .mile { font-size: var(--text-2xl); line-height: 1; letter-spacing: -.02em; }
.stats .of { font-size: var(--text-lg); color: var(--color-muted); font-weight: 700; }
.stats .r { text-align: right; } .stats .r:first-of-type { margin-left: auto; }
.stats .v { font-size: var(--text-lg); line-height: 1.3; white-space: nowrap; }
.bar { position: relative; height: 6px; border-radius: var(--radius-pill); background: var(--color-line); overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--color-route-done); border-radius: var(--radius-pill); transition: width var(--motion-slow) var(--ease-out); }
.bar > span { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--color-surface); }
.next { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-1); }
.next .name { font-size: var(--text-md); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next .eta { white-space: nowrap; text-align: right; }
.next .eta .disp { font-size: var(--text-xl); line-height: 1; letter-spacing: -.02em; }

/* ── map buttons ─────────────────────────────────────────────────────────── */
#app { --peek-h: calc(124px + env(safe-area-inset-bottom)); }
#mapbtns { position: absolute; right: 12px; bottom: calc(var(--peek-h) + 12px); z-index: 2; display: flex; flex-direction: column; gap: var(--space-2); transition: bottom var(--motion-base) var(--ease-out); }
#mapbtns button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--color-surface); box-shadow: var(--shadow-1); font-size: 18px; }
#mapbtns #btn-overview { font-size: var(--text-xs); font-weight: 700; }
#mapbtns button.on { background: var(--color-text); color: var(--color-bg); }
[data-sheet="full"] #mapbtns { display: none; }
[data-sheet="detail"] #mapbtns { bottom: 472px; }

/* ── bottom sheet ────────────────────────────────────────────────────────── */
#sheet { position: absolute; left: 0; right: 0; bottom: 0; height: var(--peek-h); z-index: 3; background: var(--color-surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-2); display: flex; flex-direction: column; overflow: hidden; transition: height var(--motion-base) var(--ease-out); }
[data-sheet="full"] #sheet { height: calc(100% - var(--strip-h, 220px) - 24px - env(safe-area-inset-top)); } /* top edge sits just under the strip */
[data-sheet="detail"] #sheet { height: 460px; }
#grab { flex: none; border: 0; background: transparent; padding: var(--space-2) 0 var(--space-2); width: 100%; }
#grab::before { content: ""; display: block; width: 36px; height: 4px; border-radius: var(--radius-pill); background: var(--color-line); margin: 0 auto; }
#sheet-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); }
[data-sheet="peek"] #sheet-body { overflow: hidden; }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-4) var(--space-3);
  background: var(--color-surface); border-bottom: 1px solid var(--color-line); }
.view-map { flex: none; height: 40px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill); background: var(--color-text); color: var(--color-bg);
  font-size: var(--text-sm); font-weight: 700; white-space: nowrap; }
.detail-head .view-map { margin-left: auto; }
.donate.sm { height: 40px; padding: 0 var(--space-3); font-size: var(--text-sm); }
#now { scroll-margin-top: 0; }
/* peek bar (phones, map view) */
.peek { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: 0 var(--space-4); min-height: 56px; border: 0; background: transparent; text-align: left; }
.peek .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.peek .name { font-size: var(--text-md); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peek .eta { flex: none; white-space: nowrap; } .peek .eta .disp { font-size: var(--text-lg); letter-spacing: -.01em; }
.peek-more { display: flex; align-items: center; width: calc(100% - 2 * var(--space-4)); margin: var(--space-1) var(--space-4) 0; min-height: 36px; padding: 0 var(--space-3);
  border: 0; border-radius: var(--radius-sm); background: var(--color-surface-2); font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); text-align: left; }
.peek-more span { margin-left: auto; font-size: var(--text-md); }
/* compact strip while the map is the focus (phones): status line + mile only */
.mini-mile { display: none; white-space: nowrap; }
@media (max-width: 899px) {
  [data-sheet="peek"] .strip .stats, [data-sheet="peek"] .strip .bar, [data-sheet="peek"] .strip .next,
  [data-sheet="detail"] .strip .stats, [data-sheet="detail"] .strip .bar, [data-sheet="detail"] .strip .next,
  [data-sheet="peek"] .strip .upd, [data-sheet="detail"] .strip .upd { display: none; }
  [data-sheet="peek"] .mini-mile, [data-sheet="detail"] .mini-mile { display: inline; }
  [data-sheet="peek"] .strip, [data-sheet="detail"] .strip { padding-bottom: var(--space-2); }
}
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; line-height: 1.15; }
.sheet-head > div { min-width: 0; } .sheet-head .donate { margin-left: auto; }
.inset { margin: 0 var(--space-4) var(--space-2); }
.arrived { position: relative; overflow: hidden; padding: var(--space-3); border-radius: var(--radius-md); background: var(--brand-sun); color: var(--brand-navy);
  animation: slide-in var(--motion-slow) var(--ease-out); }
.arrived::before, .arrived::after { content: ""; position: absolute; pointer-events: none; }
.arrived::before { right: -18px; top: -22px; width: 70px; height: 62px; border-radius: var(--blob-1); background: var(--brand-blush); }
.arrived::after { right: 44px; bottom: -16px; width: 30px; height: 28px; border-radius: var(--blob-2); background: var(--brand-sky); }
.arrived > * { position: relative; }
.arrived .kick { color: inherit; }
.crew { background: var(--color-tint-sky); }
@keyframes slide-in { from { opacity: 0; transform: translateY(12px); } }
.crew .kick { display: flex; align-items: center; gap: 6px; }
.crew .txt { font-size: var(--text-md); margin-top: 2px; line-height: 1.35; }
.rowbtn { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 var(--space-4); border: 0; border-bottom: 1px solid var(--color-line); background: transparent;
  font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); text-align: left; }
.rowbtn span { margin-left: auto; }
.nearest { display: flex; align-items: center; gap: var(--space-2); width: calc(100% - 2 * var(--space-4)); min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-md);
  border: 1px solid var(--color-accent); background: transparent; font-size: var(--text-sm); text-align: left; }
.later-note { padding: var(--space-2) var(--space-4); background: var(--color-surface-2); font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }

/* checkpoint row */
.cp { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-3) var(--space-4); min-height: 48px; box-sizing: border-box; border: 0;
  border-bottom: 1px solid var(--color-line); background: var(--color-surface); text-align: left; }
.cp .badge { flex: none; width: 28px; display: grid; place-items: center; }
.cp .badge i { font-style: normal; display: grid; place-items: center; border-radius: 50%; font-weight: 700; box-sizing: border-box; }
.cp .badge .passed { width: 22px; height: 20px; border-radius: 0; background: var(--hand-img) center/contain no-repeat; transform: rotate(-12deg); }
.stamp { animation: stamp var(--motion-slow) var(--ease-out); }
@keyframes stamp { from { transform: scale(1.4) rotate(-24deg); opacity: 0; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cp .nextb { width: 28px; height: 28px; background: var(--color-accent); color: var(--color-on-accent); font-size: var(--text-sm); }
.cp .open { width: 26px; height: 26px; border: 2px solid var(--color-text); font-size: var(--text-xs); }
.cp .mid { flex: 1; min-width: 0; }
.cp .name { font-size: var(--text-md); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp .right { flex: none; text-align: right; }
.cp .big { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; white-space: nowrap; }
.cp .came { font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; } .cp .came b { color: var(--color-text); }
.pill { font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); border: 1px dashed var(--color-muted); border-radius: var(--radius-pill); padding: 3px 8px; white-space: nowrap; }
.cp .chev { flex: none; color: var(--color-muted); font-size: var(--text-lg); line-height: 1; }

/* checkpoint detail */
.detail { display: flex; flex-direction: column; gap: var(--space-3); padding: 0 var(--space-4) var(--space-4); }
.detail-nav { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-4) var(--space-3); background: var(--color-surface); border-bottom: 1px solid var(--color-line); }
.detail-nav .back { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 var(--space-4) 0 var(--space-3); border: 1px solid var(--color-line);
  border-radius: var(--radius-pill); background: var(--color-surface-2); color: var(--color-text); font-size: var(--text-sm); font-weight: 700; white-space: nowrap; }
.detail-nav .back span { font-size: 22px; line-height: 1; margin-top: -2px; }
.detail-head { display: flex; align-items: center; gap: var(--space-3); }
.detail-head .num { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--color-accent); color: var(--color-on-accent); display: grid; place-items: center;
  font-size: var(--text-sm); font-weight: 700; }
.detail-head h2 { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; line-height: 1.15; }
.eta-card { display: flex; align-items: flex-end; justify-content: space-between; }
.eta-card .disp.big { font-size: var(--text-xl); letter-spacing: -.02em; white-space: nowrap; }
.eta-card .by { font-size: var(--text-lg); line-height: 1.5; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.two .md { line-height: 1.35; margin-top: 2px; }
.directions { display: flex; align-items: center; justify-content: center; gap: var(--space-2); height: 48px; border-radius: var(--radius-md); background: var(--color-text); color: var(--color-bg);
  font-size: var(--text-md); font-weight: 700; text-decoration: none; }
.leg { padding: var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--color-line); }
.leg .line { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); font-size: var(--text-xs); color: var(--color-muted); }
.leg .line i { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); flex: none; }
.leg .line i.o { background: transparent; border: 2px solid var(--color-text); box-sizing: border-box; }
.leg .line u { flex: 1; height: 2px; background: var(--color-route-ahead); }

/* content below the checkpoints */
.more { padding: var(--space-5) var(--space-4); display: flex; flex-direction: column; gap: var(--space-5); }
.more section { display: flex; flex-direction: column; gap: var(--space-3); }
.more h3 { margin: 0; font-size: var(--text-md); font-weight: 700; }
.more .li { display: flex; gap: var(--space-3); font-size: var(--text-md); line-height: 1.35; }
.more .li > :first-child { flex: none; font-weight: 700; color: var(--color-muted); }
.more .li .when { width: 64px; font-size: var(--text-xs); font-weight: 400; padding-top: 3px; }
.sponsors { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.ab-open { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-3); border: 1px solid var(--color-line); border-radius: var(--radius-md);
  background: transparent; text-align: left; }
.ab-open .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--text-md); }
.ab-open .chev { color: var(--color-muted); font-size: var(--text-lg); }
.story-link { display: block; border: 0; padding: 0; background: transparent; text-align: left; color: var(--color-muted); line-height: 1.35; }
.story-link u { color: var(--color-text); font-weight: 700; white-space: nowrap; }
.info { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; box-sizing: border-box; font: 700 12px var(--font-display); }

/* ── "About the run" overlay ─────────────────────────────────────────────── */
.about { position: fixed; inset: 0; z-index: 20; visibility: hidden; transition: visibility 0s var(--motion-base); }
.about.open { visibility: visible; transition: none; }
.about-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity var(--motion-base) var(--ease-out); }
.about.open .about-scrim { opacity: 1; }
.about-card { position: absolute; left: 0; right: 0; bottom: 0; top: calc(16px + env(safe-area-inset-top)); display: flex; flex-direction: column; overflow: hidden;
  background: var(--color-surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-2);
  transform: translateY(100%); transition: transform var(--motion-base) var(--ease-out); }
.about.open .about-card { transform: none; }
.about-grab { flex: none; height: 20px; touch-action: none; }
.about-grab::before { content: ""; display: block; width: 36px; height: 4px; border-radius: var(--radius-pill); background: var(--color-line); margin: 8px auto 0; }
.about-x { position: absolute; top: 12px; right: 12px; z-index: 1; width: 40px; height: 40px; background: var(--color-surface); box-shadow: var(--shadow-1); font-size: 15px; }
.about-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ab-hero { padding: 0 var(--space-4); }
.ab-hero > * { display: block; }
.ab-head { padding: var(--space-4) var(--space-4) 0; display: flex; flex-direction: column; gap: var(--space-2); }
.ab-head h1 { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; line-height: 1.05; letter-spacing: -.01em; }
.ab-head p { margin: 0; font-size: var(--text-lg); line-height: 1.3; }
.ab-live { display: flex; align-items: center; gap: var(--space-2); width: calc(100% - 2 * var(--space-4)); min-height: 48px; margin: var(--space-4) var(--space-4) 0; padding: 0 var(--space-3);
  box-sizing: border-box; border: 0; border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-md); font-weight: 700; text-align: left; }
.ab-live .go { margin-left: auto; color: var(--color-accent); }
.ab-sec { padding: var(--space-5) var(--space-4) 0; display: flex; flex-direction: column; gap: var(--space-3); }
.ab-sec h2 { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; line-height: 1.2; }
.ab-sec p { margin: 0; font-size: var(--text-md); line-height: 1.55; }
.ab-cps { align-self: flex-start; border: 0; padding: 0; background: transparent; font-size: var(--text-md); font-weight: 700; color: var(--color-accent); }
.ab-li { display: flex; gap: var(--space-3); font-size: var(--text-md); line-height: 1.4; }
.ab-li > :first-child { flex: none; width: 1em; font-weight: 700; color: var(--color-muted); }
/* numbered guidelines: little coloured blobs */
.gl > :first-child { width: 26px; height: 26px; display: grid; place-items: center; font-family: var(--font-display); font-size: var(--text-sm); color: var(--brand-navy);
  background: var(--brand-sun); border-radius: var(--blob-1); }
.gl:nth-of-type(4n+2) > :first-child { background: var(--brand-blush); border-radius: var(--blob-2); }
.gl:nth-of-type(4n+3) > :first-child { background: var(--brand-sky); border-radius: var(--blob-3); }
.gl:nth-of-type(4n) > :first-child { background: var(--brand-leaf); border-radius: var(--blob-2); }
/* brand lockup: badge + two-line wordmark */
.ab-brand { display: flex; align-items: center; gap: var(--space-3); }
.ab-brand img { flex: none; height: 48px; width: auto; }
.ab-head .wordmark { margin: 0; letter-spacing: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); line-height: .95; text-transform: uppercase; }
.wordmark small { display: block; font-size: 42%; letter-spacing: .14em; }
.wordmark em { font-style: normal; color: var(--brand-hand); }
[data-theme="dark"] .wordmark em { color: var(--brand-gold); }
.ab-story-imgs { flex: none; display: grid; grid-template-columns: 3fr 2fr; grid-template-rows: 220px; gap: var(--space-2); }
.ab-story-imgs img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--blob-2); }
.ab-story-imgs img:nth-child(2) { border-radius: var(--blob-3); }
.ab-story-imgs img:only-child { grid-column: 1 / -1; }
/* charity card (about overlay + sheet "more") */
.charity { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md);
  background: var(--brand-hand); color: #fff; }
.charity::before, .charity::after, .charity .wm { content: ""; position: absolute; pointer-events: none; }
.charity::before { right: -34px; top: -30px; width: 120px; height: 108px; border-radius: var(--blob-1); background: var(--brand-sun); }
.charity::after { right: 74px; top: 18px; width: 26px; height: 24px; border-radius: var(--blob-2); background: var(--brand-blush); }
.charity .wm { right: -20px; bottom: -24px; width: 150px; height: 138px; background: url("img/brand/handprint-white.png") center/contain no-repeat; opacity: .16; transform: rotate(-14deg); }
.charity > :not(.wm) { position: relative; }
.charity .slot { border-color: #fff; color: #fff; background: rgba(255,255,255,.12); }
.charity h3 { margin: 0; padding-right: 72px; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; line-height: 1.15; }
.charity p { margin: 0; font-size: var(--text-md); line-height: 1.5; }
.charity a.link { align-self: flex-start; color: #fff; font-size: var(--text-sm); font-weight: 700; }
.charity .donate { background: #fff; color: var(--brand-pink); }
.ab-sponsors { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--space-2); }
.ab-sponsors > * { display: grid; height: 64px; }
.ab-sponsors img { width: 100%; height: 100%; object-fit: contain; }
.ab-sponsors .slot { padding: 0 var(--space-2); text-align: center; }
.ab-sec details { border-bottom: 1px solid var(--color-line); }
.ab-sec summary { display: flex; align-items: center; gap: var(--space-3); min-height: 48px; font-size: var(--text-md); font-weight: 700; cursor: pointer; list-style: none; }
.ab-sec summary::-webkit-details-marker { display: none; }
.ab-sec summary::after { content: "+"; margin-left: auto; font-size: var(--text-lg); color: var(--color-muted); }
.ab-sec details[open] summary::after { content: "–"; }
.ab-sec details p { padding-bottom: var(--space-3); color: var(--color-muted); }
/* after-party */
.party { padding: var(--space-4); border-radius: var(--radius-md); background: var(--color-party); color: var(--color-on-party); display: flex; flex-direction: column; gap: var(--space-1);
  scroll-margin-top: var(--space-4); }
.party .kick { color: inherit; opacity: .85; }
.party-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; line-height: 1.15; }
.party-when { font-family: var(--font-display); font-size: var(--text-md); font-weight: 600; }
.party p { margin: var(--space-1) 0 0; font-size: var(--text-md); line-height: 1.45; }
.party-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-2); }
.party-tags span { padding: 3px 10px; border-radius: var(--radius-pill); border: 1px solid currentColor; font-size: var(--text-xs); font-weight: 700; }
.party-btns { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
.party-btns:empty { display: none; }
.party-btns a { display: inline-flex; align-items: center; height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-pill); background: var(--color-on-party); color: var(--color-party);
  font-weight: 700; text-decoration: none; font-size: var(--text-sm); }
.ab-party-link { flex-basis: 100%; display: flex; align-items: center; gap: var(--space-2); min-height: 36px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-party) 14%, transparent); font-size: var(--text-sm); font-weight: 700; text-align: left; }
.ab-party-link b { color: var(--color-party); } .ab-party-link span { margin-left: auto; color: var(--color-muted); }
.rm-party { width: 40px; height: 40px; font-family: var(--font-display); font-size: 18px; background: var(--color-party); color: var(--color-on-party); border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-party) 30%, transparent), var(--shadow-1); }
.about-foot { flex: none; display: flex; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-line); background: var(--color-surface); }
.about-foot .donate { flex: 1; }
.ab-map { flex: 1.4; height: 44px; border: 0; border-radius: var(--radius-pill); background: var(--color-text); color: var(--color-bg); font-size: var(--text-md); font-weight: 700; white-space: nowrap; }

/* ── map markers (ported from the design's route-map) ────────────────────── */
.rm-c { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); font-family: var(--font-sans); }
.rm-mile { display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; box-sizing: border-box; border-radius: 8px; background: var(--color-bg);
  border: 1px solid var(--color-line); color: var(--color-muted); font: 600 9px var(--font-sans); }
.z-low .rm-mile:not(.m5), .no-miles .rm-mile { display: none; }
.rm-cp { display: grid; place-items: center; border-radius: 50%; box-sizing: border-box; font: 700 11px var(--font-sans); cursor: pointer; transition: all var(--motion-slow) var(--ease-out); }
.rm-cp-passed { width: 22px; height: 22px; background: var(--color-surface); box-shadow: var(--shadow-1); }
.rm-cp-passed .hand { width: 14px; height: 13px; }
.rm-cp-passed.stamp .hand { animation: stamp var(--motion-slow) var(--ease-out); }
.rm-cp-upcoming { width: 24px; height: 24px; background: var(--color-bg); color: var(--color-text); border: 2px solid var(--color-text); }
.rm-cp-next { width: 36px; height: 36px; font-family: var(--font-display); background: var(--color-accent); color: var(--color-on-accent); font-size: 13px; border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 30%, transparent), var(--shadow-1); }
.rm-lab { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--color-surface); color: var(--color-text);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-1); padding: 4px 8px; font-size: 11px; line-height: 1.25; }
.rm-lab b { display: block; font-weight: 700; } .rm-lab i { display: block; font-style: normal; font-weight: 600; font-size: 14px; font-family: var(--font-display); }
.rm-pin { position: relative; display: block; width: 52px; height: 52px; }
.rm-say { position: absolute; bottom: calc(100% + 16px); left: 50%; transform: translateX(-50%); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis;
  background: var(--color-surface); color: var(--color-text); border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 4px; box-shadow: var(--shadow-2); padding: 6px 12px; font: 600 13px var(--font-display); }
.rm-ava { position: absolute; inset: 0; border-radius: 50%; box-sizing: border-box; background: var(--placeholder-fill), var(--color-surface); border: 3px solid var(--color-pin);
  box-shadow: var(--shadow-2); display: grid; place-items: center; font: 600 8px var(--font-mono); color: var(--color-muted); }
.rm-ava.photo { background: var(--ava) center/cover, var(--color-surface); font-size: 0; }
.rm-pulse { position: absolute; inset: 0; border-radius: 50%; background: var(--color-pin); animation: rm-pulse 2s var(--ease-out) infinite; }
.rm-slow { animation-duration: 4s; }
@keyframes rm-pulse { from { transform: scale(1); opacity: .4; } to { transform: scale(2.6); opacity: 0; } }
.rm-head { position: absolute; left: 50%; top: 50%; width: 0; height: 0; border: 8px solid transparent; border-top-width: 0; border-bottom: 13px solid var(--color-pin);
  transform: translate(-50%, -50%) rotate(var(--h)) translateY(-35px); }
.rm-badge { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--color-text); color: var(--color-bg); display: grid; place-items: center;
  font: 700 8px var(--font-sans); letter-spacing: 1px; border: 2px solid var(--color-bg); }
.rm-pin-stale .rm-ava { border: 3px dashed var(--color-muted); box-shadow: none; opacity: .9; }
.rm-tag { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--color-warning); color: var(--color-bg);
  border-radius: var(--radius-pill); padding: 3px 8px; font: 700 10px var(--font-sans); }
.rm-me { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--color-text); border: 3px solid var(--color-bg); box-shadow: var(--shadow-1); }
.maplibregl-ctrl-attrib { font-size: 9px; background: color-mix(in srgb, var(--color-bg) 70%, transparent) !important; color: var(--color-muted); }
.maplibregl-ctrl-attrib a { color: var(--color-muted); }
.maplibregl-ctrl-bottom-left { bottom: var(--peek-h); }

.sheet-fade { display: none; }

/* ── desktop: side panel + map ───────────────────────────────────────────── */
@media (min-width: 900px) {
  #panel { position: absolute; left: 0; top: 0; bottom: 0; width: 420px; z-index: 2; display: flex; flex-direction: column; background: var(--color-surface); border-right: 1px solid var(--color-line); }
  #map { left: 420px; }
  #strip { position: static; padding: var(--space-3); }
  .strip { box-shadow: none; padding-left: var(--space-2); padding-right: var(--space-2); }
  #sheet, [data-sheet] #sheet { position: static; flex: 1; min-height: 0; height: auto; border-radius: 0; box-shadow: none; }
  #grab { display: none; }
  #sheet-body, [data-sheet="peek"] #sheet-body { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--color-line) transparent; }
  #sheet-body::-webkit-scrollbar { width: 4px; }
  /* "there's more below" fade; hidden once you reach the end */
  .sheet-fade { display: block; position: sticky; bottom: 0; height: 32px; margin-top: -32px; pointer-events: none; background: linear-gradient(transparent, var(--color-surface));
    transition: opacity var(--motion-fast); }
  #sheet-body.at-end .sheet-fade { opacity: 0; }
  .sheet-head { padding-top: var(--space-3); }
  #mapbtns, [data-sheet] #mapbtns { display: flex; top: 16px; right: 16px; bottom: auto; }
  .maplibregl-ctrl-bottom-left { bottom: 0; }
  .about-card { top: 5vh; bottom: 5vh; left: 50%; right: auto; width: 620px; margin-left: -310px; border-radius: var(--radius-lg);
    opacity: 0; transform: translateY(16px); transition: transform var(--motion-base) var(--ease-out), opacity var(--motion-base) var(--ease-out); }
  .about.open .about-card { opacity: 1; }
  .about-grab { display: none; }
  .ab-hero { padding-top: var(--space-4); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
