:root {
  --orange: #FF5A1F;
  --ink: #15120F;
  --paper: #F3EEE4;
  --bg: #F3EEE4;
  --card: #FBF8F2;
  --text: #15120F;
  --muted: #7A7268;
  --line: #E2DBCF;
  --contrast: #15120F;
  --on-contrast: #F3EEE4;
  --live: #1FA463;
  --error: #C8102E;
  --radius: 22px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F0D0B;
    --card: #1B1815;
    --text: #F3EEE4;
    --muted: #8F877C;
    --line: #2A2622;
    --contrast: #F3EEE4;
    --on-contrast: #15120F;
    --error: #FF6B7F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F0D0B;
  --card: #1B1815;
  --text: #F3EEE4;
  --muted: #8F877C;
  --line: #2A2622;
  --contrast: #F3EEE4;
  --on-contrast: #15120F;
  --error: #FF6B7F;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 150px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--orange); }
img { max-width: 100%; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.section { padding-top: 56px; }

/* ---------- type ---------- */
h1, h2, h3, .big-number, .mid-number, .wordmark {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: clamp(56px, 14vw, 104px); line-height: 0.9; text-transform: uppercase; }
h1 em { color: var(--orange); font-style: italic; font-weight: 900; }
h2 { font-size: clamp(32px, 9vw, 40px); line-height: 1; text-transform: uppercase; }
h3 { font-size: 26px; line-height: 1.05; }
.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 4px;
}
.lead { font-size: 19px; color: var(--muted); margin: 18px 0 24px; max-width: 34em; }
.small-lead { font-size: 16px; margin: 10px 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.big-number { font-size: 64px; line-height: 0.95; font-variant-numeric: tabular-nums; }
.mid-number { font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.mid-number small { font-size: 15px; color: var(--muted); font-weight: 600; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-size: 22px; font-style: italic; font-weight: 900; color: var(--text);
  text-decoration: none; white-space: nowrap;
}
.wordmark { display: inline-flex; align-items: center; gap: 8px; }
.wordmark .wm-tick { color: var(--orange); }
.wordmark .wm-text { text-transform: uppercase; }
.wordmark .logo { width: 32px; height: 32px; border-radius: 8px; flex: none; }
@media (max-width: 420px) { .wordmark { font-size: 19px; } }

/* ---------- cards & buttons ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px 20px; border-radius: 999px; border: 0; cursor: pointer;
  font: 700 18px/1 "Barlow Condensed", sans-serif; letter-spacing: 0.02em; text-transform: uppercase;
  text-decoration: none; transition: transform .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
}
.pill.live { background: var(--live); border-color: var(--live); color: #fff; }
.pill.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.pill.finished { background: var(--contrast); color: var(--on-contrast); border-color: var(--contrast); }
@keyframes pulse { 50% { opacity: .25; } }
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; background: color-mix(in srgb, var(--orange) 16%, transparent);
  color: var(--orange);
}

/* ---------- progress ---------- */
.bar { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 14px 0 8px; }
.bar.thin { height: 8px; }
.bar-fill { height: 100%; width: 0; background: var(--orange); border-radius: inherit; transition: width 1s cubic-bezier(.2,.8,.2,1); }

/* ---------- hero ---------- */
.hero { padding-top: 36px; }
.raised { display: grid; gap: 4px; }
.raised-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.raised-top .right { text-align: right; }
.raised .btn { margin-top: 12px; }

/* ---------- live ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.countdown { margin-bottom: 12px; }
.map-card { padding: 0; overflow: hidden; position: relative; }
#map { height: 360px; width: 100%; background: var(--line); }
.map-empty {
  position: absolute; inset: auto 12px 36px 12px; z-index: 2; padding: 10px 14px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 600;
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; min-width: 0; }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.progress-label { margin: 0 0 4px; font-weight: 600; font-size: 14px; }
.maplibregl-ctrl-attrib { font-size: 11px; }
.runner-dot {
  position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--orange);
  border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.runner-dot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid var(--orange);
  animation: ping 1.8s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }
.marker-start {
  width: 16px; height: 16px; border-radius: 50%; background: #1FA463; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.marker-finish {
  width: 22px; height: 16px; border: 2px solid #fff; border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.35);
  background: conic-gradient(#15120F 25%, #fff 0 50%, #15120F 0 75%, #fff 0) 0 0 / 8px 8px;
}

/* ---------- hero ---------- */
/* Op de racedag gewoon de kop; daarvoor een filmisch openingsscherm met de route (zie body.pre-race). */
.hero { position: relative; }
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 24px; }
.hero-top .eyebrow { margin-bottom: 10px; }
.hero-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.hero-bottom .socials { margin: 0; }
.btn-hero { width: auto; min-height: 60px; padding: 0 34px; font-size: 20px; box-shadow: 0 10px 40px color-mix(in srgb, var(--orange) 45%, transparent); }
.scroll-cue { display: none; }
.hero-map { display: none; }
.hero-count {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 7px 13px; border-radius: 999px;
  background: var(--orange); color: var(--ink); font: 800 16px/1 "Barlow Condensed", sans-serif; letter-spacing: .06em;
  text-transform: uppercase; font-variant-numeric: tabular-nums;
}

/* Voor de racedag: het hele eerste scherm is de stad in 3D, met een stip die de route loopt. */
body.pre-race .hero { padding: 0; min-height: max(580px, calc(100svh - var(--topbar-h, 53px) - 76px)); display: flex; }
body.pre-race .hero-inner { flex: 1; padding-top: clamp(28px, 6vh, 64px); padding-bottom: 18px; }
body.pre-race .hero-bottom { margin-top: auto; }
body.pre-race .hero h1 { font-size: clamp(68px, 18vw, 156px); text-shadow: 0 4px 40px rgba(0,0,0,.55); }
body.pre-race .hero-map {
  display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity 1.4s ease;
}
body.pre-race .hero-map.ready { opacity: 1; }
/* Waas boven en onder, zodat de tekst en de knop altijd leesbaar zijn; het midden blijft helder voor de stip. */
body.pre-race .hero-map::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--bg) 78%, transparent) 0%, transparent 42%),
    linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 16%, transparent 34%);
}
@media (min-width: 901px) {
  body.pre-race .hero-map::after {
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--bg) 85%, transparent) 0%, color-mix(in srgb, var(--bg) 40%, transparent) 38%, transparent 58%),
      linear-gradient(to top, var(--bg) 0%, transparent 22%);
  }
}
body.pre-race .scroll-cue {
  display: grid; place-items: center; align-self: center; width: 40px; height: 40px; margin-top: -6px; color: var(--text);
  opacity: .7; animation: cue 2.4s ease-in-out infinite;
}
.scroll-cue svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes cue { 50% { transform: translateY(6px); opacity: 1; } }
@media (max-width: 600px) { body.pre-race .btn-hero { width: 100%; justify-content: center; } }

/* Het verhaal als groot citaat. */
.story-quote { margin: 8px 0 0; position: relative; padding-left: 22px; border-left: 4px solid var(--orange); }
.story-quote p {
  margin: 0; font: italic 800 clamp(26px, 6.4vw, 42px)/1.12 "Barlow Condensed", sans-serif; color: var(--text);
  max-width: 24em; text-wrap: pretty;
}
.story-quote:empty, .story-quote p:empty { display: none; }

/* Op de racedag staat live meelopen direct onder de kop: wie me volgt, ziet de kaart meteen. */
main { display: flex; flex-direction: column; }
main > .hero { order: -2; }
body:not(.pre-race) main > #live { order: -1; }

/* ---------- als app (vanaf het beginscherm) ---------- */
/* Eén scherm tegelijk met een tabbalk onderin, zonder website-onderdelen als de lopende banner en de footer. */
body.app .tab-off { display: none !important; }
body.app .sponsor-ticker, body.app .footer { display: none !important; }
body.app main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
body.app .topbar { justify-content: center; }
body.app.pre-race .hero { min-height: calc(100svh - var(--topbar-h, 53px) - 76px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
body.app .scroll-cue { display: none !important; }
.app-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--card) 86%, transparent); border-top: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
}
.app-tabs button {
  position: relative; display: grid; justify-items: center; gap: 3px; padding: 6px 0; border: 0; background: none; cursor: pointer;
  color: var(--muted); font: 600 11px Inter, sans-serif; -webkit-tap-highlight-color: transparent;
}
.app-tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.app-tabs button[aria-current="page"] { color: var(--orange); }
.app-tabs button[aria-current="page"] svg { fill: color-mix(in srgb, var(--orange) 22%, transparent); transform: translateY(-1px); }
.app-tabs button:active svg { transform: scale(.9); }
.app-tab-dot { position: absolute; top: 4px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: #2FBF71; box-shadow: 0 0 0 2px var(--card); }
body.fs-open .app-tabs { display: none; }
/* Live in de app: de kaart is het hele scherm (tussen de kop en de tabbalk), met de cijfers in een glazen paneel. */
body.app-live #live { padding: 0; width: 100%; max-width: none; margin: 0; }
body.app-live #live > :not(#map-card) { display: none !important; }
body.app-live #map-card { border: 0; border-radius: 0; box-shadow: none; }
body.app-live #map { height: calc(100svh - var(--topbar-h, 53px) - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); cursor: grab; }
body.app-live main { padding-bottom: 0; }
body.app-live #map-card .fs-hud {
  display: flex; position: absolute; z-index: 4; top: 12px; left: 12px; right: 12px; pointer-events: none; animation: none;
}
body.app-live #map-card .fs-hud-main { max-width: 440px; }
body.app-live #fs-close, body.app-live #fs-open, body.app-live .map-updated, body.app-live .map-eta, body.app-live .map-empty { display: none !important; }
body.app-live .map-tools { top: auto; left: auto; right: 12px; flex-direction: column; align-items: flex-end; }
.fs-hud.is-idle .fs-sub, .fs-hud.is-idle .fs-progress, .fs-hud.is-idle .fs-eta { display: none; }
.fs-countdown small { font-size: 18px; }
/* Bovenin één slanke strook: status, afstand, tijd en tempo, met een dun voortgangsbalkje. */
body.app-live #map-card .fs-hud-main {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 8px 12px; border-radius: 16px; max-width: 420px;
}
body.app-live .fs-hud-main .pill { padding: 4px 8px; font-size: 10px; }
body.app-live .fs-distance { margin: 0; font-size: 30px; line-height: 1; }
body.app-live .fs-distance small { font-size: 14px; margin-left: 2px; }
body.app-live .fs-countdown small { font-size: 13px; }
body.app-live .fs-sub { margin: 0; font-size: 13px; }
body.app-live .fs-progress { flex-basis: 100%; min-width: 0; margin-top: 5px; }
body.app-live .fs-progress-track { height: 4px; }
body.app-live .fs-progress-dot, body.app-live .fs-progress-label, body.app-live .fs-eta,
body.app-live .fs-hud .now-playing { display: none !important; }
body.app-live .fs-updated { flex-basis: 100%; margin: 4px 0 0; font-size: 11px; }
/* Onderin het menu met de cijfers (Live, Splits, Snelheid); doneren zit al in de tabbalk. */
body.app-live #map-card .fs-dock {
  display: grid; gap: 8px; position: absolute; z-index: 5; left: 12px; right: 12px; bottom: 12px; max-width: 560px; margin: 0 auto;
}
body.app-live .fs-tab-donate { display: none !important; }
body.app-live .fs-tabs { grid-template-columns: repeat(3, 1fr); padding: 5px; border-radius: 18px; }
body.app-live .fs-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 4px; border-radius: 13px; font-size: 13px; }
body.app-live .fs-sheet { max-height: min(46vh, 420px); }
/* "Volg mij" en "Hele route" als ronde knoppen rechts onder de strook, netjes onder elkaar. */
body.app-live .map-tools { top: 108px; bottom: auto; right: 12px; gap: 10px; }
body.app-live .map-btn {
  position: relative; width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 50%;
  background: color-mix(in srgb, var(--card) 86%, transparent); box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
body.app-live .map-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.app-live .map-btn svg { width: 22px; height: 22px; }
body.app-live #map-follow { color: var(--orange); }
body.app-live #map-card:has(.fs-sheet:not([hidden])) .map-tools { display: none; }
body.app-live .map-attrib-card { display: none; }

/* Een tab wisselen voelt als een nieuw scherm. */
body.app main > section:not(.tab-off) { animation: tab-in .35s ease both; }
@keyframes tab-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { body.app main > section:not(.tab-off) { animation: none; } }

/* Rustig inbewegen bij het scrollen. */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } body.pre-race .scroll-cue { animation: none; } }

/* ---------- map tools ---------- */
.map-tools { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; flex-wrap: wrap; gap: 8px; }
.map-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--text); font: 600 13px Inter, sans-serif; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.map-btn svg, .fs-close svg, .fs-tabs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.map-btn:active { transform: scale(.96); }
#map { cursor: pointer; }

/* ---------- fullscreen ---------- */
.fs-hud, .fs-dock { display: none; }
.map-card.is-fullscreen {
  position: fixed; inset: 0; z-index: 3000; border-radius: 0; border: 0; padding: 0; background: var(--bg);
}
.map-card.is-fullscreen #map { height: 100%; cursor: grab; }
.map-card.is-fullscreen .map-empty { display: none; }
.map-card.is-fullscreen #fs-open { display: none; }
/* Rechts boven het menu, gelijk met de rechterrand van het menu (ook op een breed scherm), onder elkaar. */
.map-card.is-fullscreen .map-tools {
  top: auto; left: auto; z-index: 4; flex-direction: column; align-items: flex-end; gap: 10px;
  right: max(12px, calc((100% - 560px) / 2));
  bottom: calc(12px + 66px + 20px + 18px + env(safe-area-inset-bottom));
}
.map-card.is-fullscreen .map-btn { height: 42px; padding: 0 16px; font-size: 14px; }
body.fs-open { overflow: hidden; }
body.fs-open .topbar, body.fs-open .sponsor-ticker { display: none; }
body.fs-open main { animation: none !important; transform: none !important; }

.glass {
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  box-shadow: 0 10px 40px rgba(0,0,0,.18);
}
.map-card.is-fullscreen .fs-hud {
  display: flex; position: absolute; z-index: 4; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top));
  justify-content: space-between; align-items: flex-start; gap: 12px; pointer-events: none;
  animation: drop .5s cubic-bezier(.2,.8,.2,1) both;
}
.fs-hud-main {
  flex: 1; max-width: 420px; pointer-events: auto; padding: 12px 16px 12px; border-radius: 22px;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(0,0,0,.18);
}
.fs-distance { margin: 6px 0 0; font: 800 56px/0.9 "Barlow Condensed", sans-serif; font-variant-numeric: tabular-nums; }
.fs-distance small { font-size: 20px; margin-left: 4px; color: var(--muted); }
.fs-progress { margin-top: 10px; min-width: 210px; }
.fs-progress-track { position: relative; height: 8px; border-radius: 8px; background: var(--line); }
.fs-progress-track i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 8px; background: var(--orange); transition: width .8s ease; }
.fs-progress-dot {
  position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--orange); border: 3px solid var(--card); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 25%, transparent);
  transition: left .8s ease;
}
.fs-progress-label { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.fs-progress-label span:first-child { color: var(--text); }
.map-attrib { margin: 0; font-size: 10px; line-height: 1.3; color: var(--muted); }
.map-attrib a { color: inherit; text-decoration: none; font-weight: 500; }
.map-attrib a:hover { text-decoration: underline; }
.map-attrib-card {
  position: absolute; z-index: 2; left: 8px; bottom: 6px; padding: 2px 6px; border-radius: 6px;
  background: color-mix(in srgb, var(--card) 80%, transparent);
}
.map-card.is-fullscreen .map-attrib-card { display: none; }
.map-attrib-fs { padding: 0 6px; text-shadow: 0 0 6px var(--card); }
.fs-sub { margin: 4px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.fs-close {
  pointer-events: auto; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--text); background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.fs-close svg { width: 22px; height: 22px; }

.map-card.is-fullscreen .fs-dock {
  display: grid; gap: 8px; position: absolute; z-index: 5; left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto;
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
}
.fs-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px; border-radius: 22px;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
.fs-tabs button {
  display: grid; justify-items: center; gap: 3px; padding: 8px 4px; border: 0; border-radius: 16px; background: transparent;
  color: var(--muted); font: 600 12px Inter, sans-serif; cursor: pointer; transition: background .2s, color .2s;
}
.fs-tabs button[aria-pressed="true"] { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.fs-tabs .fs-tab-donate { color: var(--orange); }
.fs-sheet {
  max-height: min(52vh, 460px); overflow: auto; padding: 16px; border-radius: 22px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(0,0,0,.2);
  animation: rise .35s cubic-bezier(.2,.8,.2,1) both;
}
.fs-panel { display: grid; gap: 12px; }
.fs-panel .btn { margin-top: 2px; }
.fs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fs-grid .mid-number small { font-size: 14px; color: var(--muted); margin-left: 3px; }
.fs-panel p { margin: 0; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } }

.splits { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.splits th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 0 8px; }
.splits td { padding: 9px 0; border-top: 1px solid var(--line); font-weight: 600; }
.splits td:first-child { font: 800 18px "Barlow Condensed", sans-serif; width: 44px; }
.splits .num { text-align: right; }
.splits .pace-cell { display: flex; align-items: center; gap: 10px; }
.splits .pace-cell span:first-child { min-width: 72px; }
.splits .pace-bar { height: 6px; border-radius: 3px; background: var(--orange); opacity: .85; }
.splits tr.fast td { color: var(--live); }
.chart-title { margin-top: 4px !important; }
.pace-chart { width: 100%; height: 120px; }
.pace-chart rect { fill: var(--orange); }
.pace-chart rect.fast { fill: var(--live); }
.pace-chart line { stroke: var(--muted); stroke-dasharray: 3 4; stroke-width: 1; }
.pace-chart text { fill: var(--muted); font: 600 9px Inter, sans-serif; }

@media (min-width: 900px) {
  .map-card.is-fullscreen .fs-dock { left: auto; right: 16px; bottom: 16px; width: 400px; max-width: none; margin: 0; }
  .map-card.is-fullscreen .map-tools { right: 16px; bottom: calc(16px + 66px + 20px + 18px); }
  .map-card.is-fullscreen .fs-sheet { max-height: calc(100vh - 200px); }
}

/* ---------- donate ---------- */
.donate-card { display: grid; gap: 14px; }
@media (min-width: 640px) { .donate-card { grid-template-columns: 1fr auto; align-items: center; } .donate-card .btn { width: auto; } }
.donate-card p { margin: 6px 0 0; }
.extras { display: grid; gap: 12px; margin-top: 12px; }
.extra { display: flex; flex-direction: column; gap: 10px; }
.extra p { margin: 0; }
.extra-head { display: flex; flex-wrap: wrap; gap: 6px; }
body.is-live .live-only { display: none; }
.locked { padding: 12px 14px; border-radius: 14px; background: var(--bg); font-size: 14px; color: var(--muted); }

.flow { display: grid; gap: 12px; margin-top: 4px; }
.flow label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.flow label small { color: var(--muted); font-weight: 500; }
.flow label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.flow input[type=text], .flow input:not([type]), .flow input[type=tel], .flow input[type=number] {
  width: 100%; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--text); font: 500 16px Inter, sans-serif;
}
.flow input:focus { outline: none; border-color: var(--orange); }
.flow input:disabled { opacity: .5; }
.euro { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); padding-left: 14px; }
.euro:focus-within { border-color: var(--orange); }
.euro span { font-weight: 700; color: var(--muted); }
.flow .euro input { border: 0; background: transparent; }
.error { color: var(--error); font-size: 14px; font-weight: 600; min-height: 1em; margin: 0; }

.recorder { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.rec-btn {
  width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--orange); background: transparent;
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.rec-btn span { width: 26px; height: 26px; border-radius: 50%; background: var(--orange); transition: all .2s; }
.rec-btn.recording span { border-radius: 6px; width: 22px; height: 22px; }
.rec-btn.recording { animation: ring 1.4s infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 10px rgba(255, 90, 31, .18); } }
audio { width: 100%; }

.done { display: grid; gap: 12px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--live) 12%, transparent); }
.done p { margin: 0; }
.done-title { font-weight: 700; color: var(--live); }

.supporters-title { margin-top: 32px; }
.supporters { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.supporters li {
  display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
}
.supporters .amt { font: 800 20px "Barlow Condensed", sans-serif; color: var(--orange); white-space: nowrap; }
.supporters .when { font-size: 12px; color: var(--muted); }

/* ---------- follow ---------- */
.install-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .install-grid { grid-template-columns: 1fr 1fr; } }
.how ol { padding-left: 20px; margin: 10px 0; }
.how li { margin: 6px 0; }
.how.highlight { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange) inset; }
.ico { display: inline-block; padding: 0 5px; border-radius: 6px; background: var(--bg); }
.push-card { margin-top: 12px; display: grid; gap: 12px; }
.segmented { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .segmented { grid-template-columns: repeat(3, 1fr); } }
.segmented legend { grid-column: 1 / -1; padding: 0; margin-bottom: 6px; }
.segmented label { cursor: pointer; display: block; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented .opt {
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; row-gap: 2px; height: 100%;
  padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line); transition: border-color .2s, background .2s;
}
.segmented .opt-title { grid-column: 1; font-weight: 700; font-size: 16px; line-height: 1.2; }
.segmented .opt-sub { grid-column: 1; font-size: 13px; line-height: 1.3; color: var(--muted); }
.segmented .opt-check {
  grid-column: 2; grid-row: 1 / span 2; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.segmented input:checked + .opt { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 12%, transparent); }
.segmented input:checked + .opt .opt-check { border-color: var(--orange); background: var(--orange); box-shadow: inset 0 0 0 4px var(--card); }
.segmented input:focus-visible + .opt { outline: 2px solid var(--orange); outline-offset: 2px; }

.footer { padding-top: 48px; padding-bottom: 48px; font-size: 14px; color: var(--muted); }
.footer p { margin: 0 0 8px; }

/* ---------- code-flow ---------- */
.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .name-row { grid-template-columns: 1fr; } }
.code-box {
  display: grid; justify-items: center; gap: 6px; padding: 18px 14px; border-radius: 18px; text-align: center;
  background: var(--contrast); color: var(--on-contrast);
}
.code-box .eyebrow { color: color-mix(in srgb, var(--on-contrast) 60%, transparent); }
.code {
  margin: 0; font: italic 900 72px/0.9 "Barlow Condensed", sans-serif; letter-spacing: .12em; color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.code-hint { margin: 6px 0 0; font-size: 14px; opacity: .8; }
.code-name {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 10px 14px; border-radius: 12px; cursor: pointer;
  border: 1.5px dashed color-mix(in srgb, var(--on-contrast) 40%, transparent); background: transparent; color: var(--on-contrast);
  font: 700 17px Inter, sans-serif; overflow-wrap: anywhere;
}
.code-name svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font-weight: 700; }
.step-title .step-num {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--orange); color: var(--ink);
  font: 800 14px "Barlow Condensed", sans-serif;
}
.done .step-title { margin-top: 0; }
.stay-warning { margin: 0; font-size: 13px; font-weight: 600; color: var(--orange); }
.msg-status[data-state="notfound"] { border-color: var(--error); }
.msg-status[data-state="idle"] .eq i { animation: none; height: 8px; opacity: .5; }
.msg-status { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.msg-status p { margin: 0; font-weight: 600; }
.msg-status[data-state="matched"], .msg-status[data-state="played"] { border-color: var(--live); }
.msg-status[data-state="matched"] .eq i, .msg-status[data-state="played"] .eq i { background: var(--live); }
.msg-status[data-state="played"] .eq i { animation: none; height: 10px; }

/* ---------- bericht: stap voor stap ---------- */
.btn-start { gap: 10px; min-height: 60px; font-size: 18px; box-shadow: 0 10px 28px -12px color-mix(in srgb, var(--orange) 70%, transparent); }
.btn-start svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.start-sub { text-align: center; }
.wizard { display: grid; gap: 4px; animation: rise .4s cubic-bezier(.2,.8,.2,1) both; }
.wiz-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 4px 0 8px; padding: 0; list-style: none; }
.wiz-steps li {
  position: relative; padding-top: 10px; font-size: 11px; font-weight: 700; color: var(--muted); text-align: center;
  letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wiz-steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--line); }
.wiz-steps li.is-done::before, .wiz-steps li.is-current::before { background: var(--orange); }
.wiz-steps li.is-current { color: var(--text); }
.wiz-title { margin: 4px 0 0; font: italic 800 28px/1.05 "Barlow Condensed", sans-serif; }
.wiz-nav { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 4px; }
.wiz-nav > :only-child { grid-column: 1 / -1; }
.flow label.terms { align-items: flex-start; font-size: 14px; line-height: 1.4; }
.flow label.terms input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--orange); }
.flow label.terms a { color: var(--orange); font-weight: 700; }
.amount-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
.chip {
  min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text);
  font: 800 20px "Barlow Condensed", sans-serif; cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, var(--bg)); }
.code-box .eyebrow span { color: var(--orange); letter-spacing: .12em; }
.code-name { font-size: 24px; padding: 14px 18px; }
.howto { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
.howto li::marker { color: var(--orange); font-weight: 800; }
.link-btn { justify-self: center; padding: 8px; border: 0; background: none; color: var(--muted); font: 600 14px Inter, sans-serif; text-decoration: underline; cursor: pointer; }

/* ---------- verwachte eindtijd ---------- */
.eta-card {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 16px; margin: 12px 0 6px; padding: 16px 18px;
  border-radius: 20px; background: var(--contrast); color: var(--on-contrast); animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
}
.eta-card .eyebrow { color: color-mix(in srgb, var(--on-contrast) 60%, transparent); }
.eta-card .big-number { color: var(--orange); font-size: 52px; }
.eta-side { text-align: right; }
@media (max-width: 520px) {
  .eta-card { grid-template-columns: 1fr; }
  .eta-side { text-align: left; }
  .eta-card .big-number { font-size: 46px; }
}
.eta-note { grid-column: 1 / -1; margin: 4px 0 0; color: color-mix(in srgb, var(--on-contrast) 60%, transparent) !important; }
.map-eta {
  position: absolute; z-index: 2; right: 12px; bottom: 36px; display: grid; gap: 0; padding: 8px 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.map-eta .eyebrow { margin: 0; font-size: 10px; }
.map-eta strong { font: 800 22px/1 "Barlow Condensed", sans-serif; color: var(--orange); font-variant-numeric: tabular-nums; }
.map-card.is-fullscreen .map-eta { display: none; }
/* Wanneer de laatste positie binnenkwam: rechtsboven op de kaart, in het volledige scherm onder de tijd. */
.map-updated {
  position: absolute; z-index: 2; top: 12px; right: 12px; margin: 0; display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,.12); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.map-updated i, .fs-updated i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--orange); flex: none;
  animation: live-blink 2s ease-in-out infinite;
}
@keyframes live-blink { 50% { opacity: .35; } }
.map-card.is-fullscreen .map-updated { display: none; }
.fs-updated { display: flex; align-items: center; gap: 7px; margin: 4px 0 0; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .map-updated i, .fs-updated i { animation: none; } }
.fs-eta { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.fs-eta strong { color: var(--orange); font-variant-numeric: tabular-nums; }

/* ---------- socials ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 22px; }
.footer-socials { margin: 0 0 14px; }
.social-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px;
  border: 1.5px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px;
  transition: border-color .2s, color .2s, transform .15s;
}
.social-btn:hover { border-color: var(--orange); color: var(--orange); }
.social-btn:active { transform: scale(.96); }
.social-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.social-btn svg .dot { fill: currentColor; stroke: none; }

/* ---------- nu in de oortjes ---------- */
.now-playing {
  display: flex; align-items: center; gap: 12px; margin: 10px 0; padding: 12px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--orange) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--orange) 40%, transparent);
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
}
.now-playing p { margin: 0; font-weight: 600; }
.now-playing strong { color: var(--orange); }
.now-playing.compact { margin: 8px 0 0; padding: 6px 10px; border-radius: 12px; font-size: 13px; }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; flex: none; }
.eq i { width: 3px; border-radius: 2px; background: var(--orange); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; } .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 18px; } }
@media (prefers-reduced-motion: reduce) { .eq i { animation: none; height: 12px; } }

/* ---------- spotify ---------- */
.spotify {
  display: flex; align-items: center; gap: 12px; margin: 10px 0; padding: 10px 12px 10px 10px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
}
.spotify-art { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--line); flex: none; }
.spotify-text { display: grid; min-width: 0; flex: 1; }
.spotify-text .eyebrow { margin: 0; }
.spotify-title, .spotify-artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spotify-artist { color: var(--muted); font-size: 14px; }
.spotify-logo { width: 26px; height: 26px; flex: none; }
.spotify-logo circle { fill: #1DB954; }
.spotify-logo path { fill: none; stroke: #000; stroke-width: 1.8; stroke-linecap: round; }

/* ---------- sponsors ---------- */
.sponsor-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .sponsor-grid { grid-template-columns: repeat(var(--cols, 3), 1fr); } }
.sponsor {
  display: grid; gap: 12px; padding: 12px; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), border-color .2s, box-shadow .2s;
}
.sponsor:hover { transform: translateY(-3px); border-color: var(--orange); box-shadow: 0 12px 30px rgba(255, 90, 31, .18); }
.sponsor .sponsor-logo { height: 120px; display: grid; place-items: center; background: #fff; border-radius: 14px; padding: 16px; }
.sponsor img { max-width: 100%; max-height: 84px; object-fit: contain; }
.sponsor-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 2px; }
.sponsor .sponsor-name { font: 800 20px/1.1 "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .02em; }
.sponsor .sponsor-domain { display: block; font-size: 12px; color: var(--muted); }
.sponsor .sponsor-go { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: var(--ink); }
.sponsor .sponsor-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Lopende banner */
.sponsor-ticker {
  position: sticky; top: var(--topbar-h, 53px); z-index: 999; display: flex; align-items: center; gap: 12px;
  height: 76px; padding-left: 16px; overflow: hidden; text-decoration: none; color: var(--text);
  background: var(--card); border-bottom: 1px solid var(--line);
}
.ticker-label {
  flex: none; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--orange);
  max-width: 76px; line-height: 1.25;
}
.ticker-viewport {
  flex: 1; overflow: hidden; height: 100%; display: flex; align-items: center; background: var(--card); /* achtergrond voor de blend */
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track { display: flex; align-items: center; width: max-content; will-change: transform; }
.ticker-track.running { animation: ticker var(--ticker-duration, 30s) linear infinite; }
.ticker-group { display: flex; flex: none; align-items: center; }
.sponsor-ticker:hover .ticker-track { animation-play-state: paused; }
/* Rustig: alleen het logo, als grijs silhouet. Onderin staan de logo's in kleur op wit. */
/* Vaste breedte: de lus klopt dan altijd precies, ook voordat de logo's geladen zijn. */
.ticker-item { flex: none; box-sizing: border-box; width: 160px; height: 54px; padding: 6px 15px; display: grid; place-items: center; }
/* Grijs maken en de achtergrond van het logo laten wegvallen tegen de balk (multiply/screen). */
.ticker-item img {
  max-height: 34px; max-width: 130px; object-fit: contain;
  filter: grayscale(1) contrast(1.3); mix-blend-mode: multiply; opacity: .5; transition: opacity .3s;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ticker-item img { filter: grayscale(1) invert(1) contrast(1.3); mix-blend-mode: screen; opacity: .55; }
}
:root[data-theme="dark"] .ticker-item img { filter: grayscale(1) invert(1) contrast(1.3); mix-blend-mode: screen; opacity: .55; }
.sponsor-ticker:hover .ticker-item img { opacity: .8; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-viewport { overflow-x: auto; }
}
body.fs-open .sponsor-ticker { display: none; }

/* Sponsor worden? */
.sponsor-cta {
  display: grid; gap: 14px; margin-top: 14px; padding: 20px; border-radius: 22px;
  background: var(--contrast); color: var(--on-contrast);
}
@media (min-width: 640px) { .sponsor-cta { grid-template-columns: 1fr auto; align-items: center; } .sponsor-cta .btn { width: auto; } }
.sponsor-cta h3 { margin: 0; font-size: 30px; text-transform: uppercase; }
.sponsor-cta h3 em { color: var(--orange); font-style: italic; }
.sponsor-cta p { margin: 4px 0 0; opacity: .8; }
.sponsor-cta p a { color: var(--orange); font-weight: 700; overflow-wrap: anywhere; }
.sponsor-cta .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* In het Doneer-menu op volledig scherm */
.fd-sponsors { display: grid; gap: 8px; margin-top: 4px; }
.fd-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.fd-logos a { height: 48px; display: grid; place-items: center; background: #fff; border-radius: 10px; padding: 6px 10px; }
.fd-logos img { max-height: 34px; max-width: 100%; object-fit: contain; }

/* ---------- coming soon ---------- */
/* De splash staat er meteen; de pagina laadt eronder. Live: hij zoomt en vervaagt weg. Offline: hij blijft. */
body.booting, body.coming-soon { overflow: hidden; }
body.coming-soon .topbar, body.coming-soon main, body.coming-soon .footer, body.coming-soon .sponsor-ticker { display: none; }
.splash {
  position: fixed; inset: 0; z-index: 5000;
  min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 22px;
  padding: 24px 16px; text-align: center; background-color: var(--bg);
  transform-origin: 50% 45%;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--orange) 22%, var(--bg)) 0%, var(--bg) 70%);
}
.splash-logo { width: min(160px, 40vw); height: auto; border-radius: 22%; box-shadow: 0 18px 40px rgba(255, 90, 31, .35); animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.splash-name {
  margin: 0; font: italic 900 clamp(48px, 13vw, 96px)/0.88 "Barlow Condensed", sans-serif; text-transform: uppercase;
  color: var(--text); animation: rise .9s .12s cubic-bezier(.2,.8,.2,1) both;
}
.splash-name span { color: var(--orange); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.splash.leaving { animation: splash-out .85s cubic-bezier(.45, 0, .2, 1) forwards; pointer-events: none; }
@keyframes splash-out { to { opacity: 0; transform: scale(1.25); filter: blur(6px); } }
/* Alleen opacity en geen 'forwards': een blijvende transform zou van <main> een kader maken voor de
   volledig-scherm-kaart (position: fixed), waardoor die op de telefoon niet meer het hele scherm vult. */
body.revealed main, body.revealed .topbar, body.revealed .sponsor-ticker { animation: content-in .8s .15s ease backwards; }
@keyframes content-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .splash.leaving { animation: fade-out .4s ease forwards; }
  body.revealed main, body.revealed .topbar, body.revealed .sponsor-ticker { animation: none; }
}
@keyframes fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .splash-logo, .splash-name { animation: none; } }

[hidden] { display: none !important; }

/* Kaartknoppen van MapLibre niet onder de HUD/het menu laten vallen. */
.map-card.is-fullscreen .maplibregl-ctrl-top-right { top: calc(140px + env(safe-area-inset-top)); right: auto; left: 2px; }
.map-card.is-fullscreen .maplibregl-ctrl-bottom-right { bottom: calc(140px + env(safe-area-inset-bottom)); right: auto; left: 2px; }
/* Met een open menu: kaartknoppen en bronvermelding even weg, zodat niets overlapt. */
.map-card.is-fullscreen:has(.fs-sheet:not([hidden])) .map-tools,
.map-card.is-fullscreen:has(.fs-sheet:not([hidden])) .maplibregl-ctrl-bottom-right { display: none; }

/* ---------- hartslag (van de Watch) ---------- */
.head-pills { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hr-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font: 700 13px/1 Inter, sans-serif; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.hr-pill[hidden] { display: none; }
.hr-pill svg { width: 14px; height: 14px; fill: #F0284A; stroke: none; animation: beat var(--beat, 1s) ease-in-out infinite; }
.hr-pill .hr-zone { font-style: normal; font-weight: 800; color: var(--zone, var(--muted)); }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hr-pill svg { animation: none; } }
.fs-hud-main .hr-pill { margin-top: 6px; }
body.app-live .fs-hud-main .hr-pill { margin: 0; padding: 3px 8px 3px 6px; font-size: 12px; }

/* ---------- route: km-punten en looprichting ---------- */
.km-marker {
  padding: 2px 6px; border-radius: 999px; background: #1F6FB8; color: #fff; border: 1.5px solid #fff;
  font: 800 11px/1.2 Inter, sans-serif; font-variant-numeric: tabular-nums; box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.friend-pin { display: grid; justify-items: center; gap: 2px; cursor: default; }
.friend-pin span {
  padding: 2px 7px; border-radius: 999px; background: #D4F53C; color: #15120F; font: 700 11px/1.3 Inter, sans-serif;
  box-shadow: 0 1px 4px rgba(0,0,0,.35); white-space: nowrap;
}
.friend-pin i { width: 14px; height: 14px; border-radius: 50%; background: #F0284A; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.friend-pin.me span { background: var(--orange); }

/* ---------- vriendensite ---------- */
.friends-only[hidden] { display: none !important; }
.friend-login {
  position: fixed; inset: 0; z-index: 5100; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--orange) 22%, var(--bg)), var(--bg));
}
.friend-login[hidden] { display: none; }
.friend-login-card { width: 100%; max-width: 380px; display: grid; gap: 12px; }
.friend-login-card img { border-radius: 14px; }
.friend-login-card h2 { margin-bottom: -4px; }
.friend-login-card label, .spot-msg { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.friend-login-card input, .spot-msg textarea {
  width: 100%; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text);
  font: 500 16px Inter, sans-serif;
}
.spot-msg textarea { resize: vertical; min-height: 64px; }
.friend-login-card input:focus, .spot-msg textarea:focus { outline: none; border-color: var(--orange); }
.form-error { margin: 0; color: var(--error); font-size: 14px; font-weight: 600; }
.friend-me { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.friend-me .link-btn { padding: 4px; font-size: 13px; }
@media (max-width: 420px) { body.friends .wm-text { display: none; } }

.spot-card { display: grid; gap: 14px; }
.spot-map { height: 260px; margin: -18px -18px 0; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--line); }
.spot-where { margin: 0; font-weight: 600; }
.spot-where strong { color: var(--orange); }
.side-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-pick legend { grid-column: 1 / -1; padding: 0; margin-bottom: 6px; }
.side-pick input { position: absolute; opacity: 0; pointer-events: none; }
.side-pick span {
  display: grid; place-items: center; min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg);
  font: 800 20px "Barlow Condensed", sans-serif; cursor: pointer;
}
.side-pick input:checked + span { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, var(--bg)); color: var(--orange); }
.side-pick input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.spot-msg .muted { justify-self: end; font-weight: 500; }
.friends-title { margin: 28px 0 10px; }
.friend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.friend-list li {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px;
  border-radius: 18px; background: var(--card); border: 1px solid var(--line);
}
.friend-list .avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #D4F53C; color: #15120F;
  font: 800 18px "Barlow Condensed", sans-serif;
}
.friend-list li.me .avatar { background: var(--orange); }
.friend-list strong { display: block; }
.friend-list .msg { display: block; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.friend-list .km { font: 800 22px/1 "Barlow Condensed", sans-serif; color: var(--orange); text-align: right; white-space: nowrap; }
.friend-list .km small { display: block; font: 600 11px Inter, sans-serif; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.manage-card { display: grid; gap: 12px; margin-bottom: 12px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row:first-of-type { border-top: 0; padding-top: 0; }
.switch-row strong { display: block; }
.switch-row small { display: block; color: var(--muted); font-size: 13px; }
.switch-row input {
  appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; border-radius: 999px; margin: 0;
  background: var(--line); position: relative; cursor: pointer; transition: background .2s ease;
}
.switch-row input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s ease;
}
.switch-row input:checked { background: var(--orange); }
.switch-row input:checked::after { transform: translateX(20px); }
.switch-row input:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.manage-head { display: flex; align-items: center; justify-content: space-between; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #D4F53C; }
.manage-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.manage-stats.small-stats { grid-template-columns: repeat(3, 1fr); padding-top: 12px; border-top: 1px solid var(--line); }
.big-number.accent { color: var(--orange); }
.viewer-chart { width: 100%; height: 90px; display: block; }
.viewer-chart path.area { fill: color-mix(in srgb, var(--orange) 22%, transparent); }
.viewer-chart path.line { fill: none; stroke: var(--orange); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spot-card .btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; }
#opt-status:empty, #spot-status:empty { display: none; }

/* ---------- op je beginscherm zetten (vriendensite op een telefoon) ---------- */
.install-sheet {
  position: fixed; inset: 0; z-index: 2900; display: grid; align-items: end; padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom)); background: rgba(10, 8, 6, .6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: rise .35s cubic-bezier(.2,.8,.2,1) both;
}
.install-sheet[hidden] { display: none; }
.install-card { width: 100%; max-width: 440px; margin: 0 auto; display: grid; gap: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.install-card img { border-radius: 16px; }
.install-card h2 { font-size: 32px; }
.install-card p { margin: 0; }
.install-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 16px; }
.install-steps[hidden] { display: none; }
.install-steps li::marker { color: var(--orange); font-weight: 800; }
.share-ico { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 2px; vertical-align: -7px; border-radius: 7px; background: var(--bg); }
.share-ico svg { width: 17px; height: 17px; fill: none; stroke: #2F8CFF; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
