/* ==========================================================================
   Plainwater prikt in de polder - basisstijlen
   Huisstijl: pas alleen de variabelen hieronder aan (zie docs/HUISSTIJL.md).
   ========================================================================== */
:root {
  /* Merkkleuren uit het Plainwater-huisstijlhandboek */
  --brand: #ec008c;          /* 100% magenta: accentwoord, grote cijfers, markers, vlakken */
  --brand-strong: #d1007c;   /* magenta voor knoppen en kleine tekst (haalt WCAG AA, 5,3:1 op wit) */
  --brand-deep: #b8006d;     /* donkere magenta: tekst op --brand-tint */
  --brand-tint: #fce4f1;     /* zachte magenta: eigen rij, status "open" */
  --brand-contrast: #ffffff; /* tekst op magenta */
  --accent: #00aeef;         /* cyaan (afgeleid van 50% cyaan): timer en voortgang, nooit tekst */
  --accent-soft: #6dcff6;    /* 50% cyaan: waterdots */
  --accent-tint: #e1f5fd;    /* zachte cyaan: weetjes, status "concept" */
  --accent-ink: #005b80;     /* donkere cyaan: tekst op --accent-tint */
  --warn: #d03b3b;           /* timer bijna op, fouten, verwijderen */

  --ink: #58595b;            /* 80% zwart: hoofdtekst (puur zwart komt in de huisstijl niet voor) */
  --ink-soft: #6d6e71;       /* 70% zwart: secundaire tekst, alleen op wit en --surface-2 */
  --ink-title: #77787b;      /* 65% zwart: hoofdtitels, alleen groot */
  --surface: #ffffff;        /* kaders */
  --surface-2: #f1f2f2;      /* 5% zwart: rijen, vakjes */
  --surface-3: #e6e7e8;      /* 10% zwart */
  --line: #d1d3d4;           /* 20% zwart: lijnen, randen */
  --ground: #dcddde;         /* 15% zwart: achtergrondvlak */

  --font: "Open Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: "Roboto Condensed", "Arial Narrow", "Segoe UI", sans-serif; /* vervangt Univers 67 Bold Condensed */
  --font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;              /* vervangt LP Bambus */
  --radius: 16px;            /* kaders: rechtsboven en linksonder rond */
  --radius-lg: 24px;
  --radius-sm: 10px;
  --shadow: 6px 8px 24px rgba(65, 64, 66, 0.2);
  --topbar-h: 72px;          /* ruimte voor het logo (45px hoog, 162px breed) plus vrije ruimte */

  --waterdots: url("/img/waterdots.webp");         /* cyaan stippen op wit */
  --waterdots-wit: url("/img/waterdots-wit.webp"); /* witte stippen voor grijze vlakken */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.4;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--font); font-weight: 700; margin: 0; line-height: 1.15; }
p { margin: 0; }
/* Logo altijd met pay-off, op wit, minstens 160px breed (45px hoog) en met vrije ruimte eromheen. */
.logo { display: block; height: 45px; width: auto; flex: none; }

/* Huisstijltitel: condensed, kleine letters, grijs met het laatste woord in magenta. */
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.15rem;
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  color: var(--ink-title);
}
.hl { color: var(--brand); }

/* Handgeschreven accent (hooguit één per scherm). */
.hand {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  display: inline-block;
  transform: rotate(-4deg);
  transform-origin: left center;
}

/* Bullit: magenta sticker met handgeschreven tekst. */
.bullit {
  width: 84px; height: 84px;
  border-radius: 50%;
  display: grid; place-items: center;
  text-align: center;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 0.85;
  transform: rotate(10deg);
  box-shadow: 3px 6px 16px rgba(236, 0, 140, 0.28);
  user-select: none;
}

/* Lijniconen zoals in de huisstijl: zet data-ic="naam" op een knop of tekst.
   Het icoon staat in ::before, zodat JavaScript de knoptekst veilig kan vervangen. */
[data-ic]::before {
  content: "";
  flex: none;
  width: 1.2em; height: 1.2em;
  background: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat;
  mask: var(--ic) center / contain no-repeat;
}
[data-ic=trophy] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 21h8M12 17v4M7 4h10v5a5 5 0 0 1-10 0zM7 6H4v1a3 3 0 0 0 3 3M17 6h3v1a3 3 0 0 1-3 3'/%3E%3C/svg%3E"); }
[data-ic=pencil] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4'/%3E%3C/svg%3E"); }
[data-ic=share] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 8l5-5 5 5M5 13v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6'/%3E%3C/svg%3E"); }
[data-ic=copy] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E%3Cpath d='M5 15V6a2 2 0 0 1 2-2h9'/%3E%3C/svg%3E"); }
[data-ic=map] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4 3 6v14l6-2 6 2 6-2V4l-6 2zM9 4v14M15 6v14'/%3E%3C/svg%3E"); }
[data-ic=bulb] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-4 10.5c.7.7 1 1.5 1 2.5h6c0-1 .3-1.8 1-2.5A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
[data-ic=save] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h11l3 3v13a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2zM8 3v5h7V3M8 21v-7h8v7'/%3E%3C/svg%3E"); }
[data-ic=play] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E"); }
[data-ic=stop] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3C/svg%3E"); }
[data-ic=sliders] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h9M19 6h1M4 12h3M13 12h7M4 18h11M21 18h-1'/%3E%3Ccircle cx='16' cy='6' r='2.5'/%3E%3Ccircle cx='10' cy='12' r='2.5'/%3E%3Ccircle cx='18' cy='18' r='2.5'/%3E%3C/svg%3E"); }
[data-ic=expand] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5'/%3E%3C/svg%3E"); }
[data-ic=alert] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4 2.5 20h19zM12 10v4M12 17.5v.5'/%3E%3C/svg%3E"); }

/* ---------- Knoppen en velden ---------- */
button, .button {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  background: var(--brand-strong);
  color: var(--brand-contrast);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s ease, filter 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
button:active:not(:disabled) { transform: scale(0.97); }
button:disabled { background: var(--surface-2); color: var(--ink-soft); cursor: not-allowed; }
button:focus-visible, .button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
button.secondary, .button.secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
button.accent { background: var(--brand-strong); color: var(--brand-contrast); }
button.danger { background: var(--warn); color: #fff; }
button.ghost, .button.ghost { background: transparent; color: inherit; padding: 8px 10px; box-shadow: none; }
button.secondary[data-ic]::before, .button.secondary[data-ic]::before { background: var(--brand-strong); }
button.block { width: 100%; }
button.big { padding: 15px 24px; font-size: 1.17rem; }
button.big:not(.secondary):not(.ghost):not(:disabled) { background: var(--brand); }
@media (hover: hover) {
  button:hover:not(:disabled), .button:hover { filter: brightness(0.92); }
  button.secondary:hover:not(:disabled), .button.secondary:hover {
    filter: none; color: var(--brand-strong); box-shadow: inset 0 0 0 1.5px var(--brand);
  }
  button.ghost:hover:not(:disabled), .button.ghost:hover { filter: none; color: var(--brand-strong); }
}

/* "Ga door"-knop zoals op de Plainwater-site: pill met witte cirkel en pijl rechts. */
button.go { justify-content: space-between; padding-right: 7px; padding-left: 24px; gap: 14px; }
button.go::after {
  content: "";
  flex: none;
  width: 1.75em; height: 1.75em;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d1007c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 58% no-repeat;
}
button.go:not(.big) { padding-block: 6px; padding-left: 18px; padding-right: 5px; }
button.go:disabled::after { opacity: 0.6; }

input, textarea, select {
  font: inherit;
  color: var(--ink);
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 0;
  border-color: var(--brand);
}
label.field { display: grid; gap: 6px; font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }

/* ---------- Kaart ---------- */
#map { position: fixed; inset: 0; z-index: 0; background: var(--ground); }
.leaflet-container { font-family: var(--font); }
#map .leaflet-top { top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); }
.leaflet-container .leaflet-bar {
  border: 0;
  border-radius: 0 12px 0 12px;
  overflow: hidden;
  box-shadow: 3px 4px 14px rgba(65, 64, 66, 0.3);
}
.leaflet-container .leaflet-bar a { color: var(--ink); border-bottom-color: var(--line); }
.leaflet-container .leaflet-bar a:hover { color: var(--brand-strong); }
.leaflet-container .leaflet-control-attribution {
  font-size: 10px; color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.78);
  border-top-left-radius: 8px;
}
.leaflet-container .leaflet-control-attribution a { color: var(--ink-soft); }
.leaflet-container .leaflet-tooltip {
  border: 0; border-radius: 0 8px 0 8px;
  color: var(--ink); font-weight: 600;
  box-shadow: 2px 3px 10px rgba(65, 64, 66, 0.3);
}
.pp-marker { background: none; border: 0; }
.pin-guess, .pin-target, .pin-player {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.pin-guess { background: var(--brand); color: #fff; border: 3px solid #fff; }
.pin-guess:empty::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }

/* Eigen prik: vlaggetje met de Plainwater-P (PP.flagIcon). De voet van de stok is het geprikte punt. */
.pin-flag {
  position: relative; width: 42px; height: 50px;
  transform-origin: 5px 48px; animation: plant 0.35s cubic-bezier(.2,1.4,.4,1);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)); /* op de ouder: clip-path van de vlag knipt anders de schaduw weg */
}
.pin-flag .pole {
  position: absolute; left: 3.5px; top: 2px; width: 3px; height: 46px;
  background: var(--ink); border-radius: 2px;
}
.pin-flag .cloth {
  position: absolute; left: 6px; top: 2px; width: 34px; height: 25px;
  display: grid; place-items: center; padding-right: 6px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 84% 50%, 100% 100%, 0 100%); /* vaantje met inkeping */
}
.pin-flag .cloth img { height: 17px; width: auto; display: block; }
.pin-flag .cloth b {
  position: absolute; right: 9px; bottom: 0; font-size: 9px; line-height: 1; color: var(--ink);
}
.pin-flag .foot {
  position: absolute; left: 1px; top: 44px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
@keyframes plant { from { transform: translateY(-14px) scale(0.85); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pin-flag { animation: none; } }
.pin-target {
  width: 34px; height: 34px;
  background: #fff; color: var(--brand);
  border: 3px solid var(--brand); font-size: 17px;
}
.pin-player { background: var(--ink); color: #fff; border: 2px solid #fff; }
.pin-player.top { background: var(--brand); }

/* ---------- Topbalk spelerspagina ---------- */
/* Witte balk zoals de Plainwater-site: logo links op wit, dunne magenta lijn erboven.
   De balk is hoog genoeg voor vrije ruimte rond het logo (ongeveer 30% van de logohoogte). */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 12px 0;
  background: var(--surface);
  border-top: 3px solid var(--brand);
  box-shadow: 0 2px 14px rgba(65, 64, 66, 0.16);
  color: var(--ink);
}
/* Speltitel naast het logo: condensed, kleine letters, "polder" in magenta. */
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  text-transform: lowercase;
  color: var(--ink-soft);
  padding-left: 12px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}
.brand small { display: block; font-size: inherit; }
.brand .hl { color: var(--brand-strong); }
/* Voortgang en score. Op de telefoon alleen de score: de locatieteller staat al in het paneel. */
.round-info {
  margin-left: auto;
  display: flex; align-items: center; gap: 18px;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#progress-label { display: none; }
#score-label { display: grid; justify-items: end; font-size: 0.68rem; line-height: 1.1; }
#score-label b { font-family: var(--font-display); font-size: 1.45rem; line-height: 1; color: var(--ink); }
/* Heel smalle telefoons: tijdens het spelen maakt de titel even plaats voor de score. */
@media (max-width: 374px) {
  #topbar:has(#score-label:not(:empty)) .brand { display: none; }
}
@media (min-width: 900px) {
  :root { --topbar-h: 92px; }
  #topbar { padding-inline: 24px; gap: 18px; }
  #topbar .logo { height: 56px; } /* 202px breed */
  .brand { font-size: 1.45rem; padding-left: 18px; }
  .brand small { display: inline; }
  #progress-label { display: block; font-size: 0.95rem; }
  #progress-label:not(:empty) + #score-label { padding-left: 18px; border-left: 1px solid var(--line); }
  #score-label { display: flex; align-items: baseline; gap: 5px; font-size: 0.95rem; }
  #score-label b { font-size: 1.6rem; }
  .hero-title { font-size: 2.5rem; }
}

/* ---------- Kaarten (panelen) ---------- */
.card {
  background: var(--surface);
  border-radius: 0 var(--radius-lg) 0 var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
}

/* Spelpanelen zweven over de kaart: onderaan op mobiel, linksboven op desktop. */
.float {
  position: fixed;
  z-index: 600;
  left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  max-width: 440px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .float { left: 24px; right: auto; top: calc(var(--topbar-h) + 20px); bottom: auto; margin: 0; width: 400px; }
}

/* Schermvullende panelen (lobby, samenvatting) met gedimde kaart erachter. */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  padding: calc(var(--topbar-h) + 16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(88, 89, 91, 0.5);
  backdrop-filter: blur(3px);
  overflow-y: auto;
}
/* Start- en lobbyschermen: wit met de golvende waterdots, zoals de Plainwater-site. */
.overlay.home {
  background: var(--waterdots) 68% 100% / auto 62% no-repeat, var(--surface);
  backdrop-filter: none;
}
/* Papieren bootje dat op de waterdots vaart, achter het kader. */
.overlay.home::after {
  content: "";
  position: fixed;
  z-index: -1;
  right: 7vw; bottom: calc(3vh + env(safe-area-inset-bottom, 0px));
  width: clamp(104px, 13vw, 210px);
  aspect-ratio: 240 / 150;
  background: url("/img/bootje.svg") center / contain no-repeat;
  pointer-events: none;
}
@media (min-aspect-ratio: 1/1) {
  .overlay.home { background-size: cover; background-position: center 70%; }
  .overlay.home::after { right: 9vw; bottom: 14vh; }
}
.overlay > .card { width: 100%; max-width: 480px; max-height: 100%; overflow-y: auto; }

.eyebrow { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-strong); }
.eyebrow.hand { font-size: 1.55rem; text-transform: none; letter-spacing: 0; color: var(--ink-soft); margin-bottom: 4px; }
.muted { color: var(--ink-soft); }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.error { color: var(--warn); font-weight: 600; }
.chip {
  font-size: 0.72rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-soft);
  white-space: nowrap;
}
.chip.open { background: var(--brand-tint); color: var(--brand-deep); }
.chip.closed { background: var(--surface-3); color: var(--ink); }
.chip.draft { background: var(--accent-tint); color: var(--accent-ink); }
.tip { display: flex; gap: 8px; align-items: flex-start; font-size: 0.85rem; }
.tip[data-ic]::before { background: var(--brand-strong); }

/* ---------- Lobby ---------- */
.lobby-head { position: relative; padding-right: 92px; min-height: 84px; }
.lobby-head .bullit { position: absolute; top: -4px; right: -4px; }
.round-list { display: grid; gap: 10px; }
.round-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 14px 16px;
  border-radius: 0 var(--radius) 0 var(--radius);
  background: var(--surface-2);
}
/* Speelbare ronde: wit kader met magenta rand, zoals de magenta kaders in de folder. */
.round-item:has([data-play]) { background: var(--surface); box-shadow: inset 0 0 0 2px var(--brand), 3px 5px 14px rgba(236, 0, 140, 0.12); }
.round-item .meta { flex: 1; min-width: 0; }
.round-item .title { font-weight: 700; }
.round-item .theme { font-size: 0.85rem; color: var(--ink-soft); }
.round-item .score-done {
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  color: var(--brand-strong); white-space: nowrap;
}
.waiting {
  text-align: center; padding: 14px;
  border-radius: 0 var(--radius) 0 var(--radius);
  border: 2px dashed var(--line); color: var(--ink-soft);
}
.pulse::before {
  content: ""; display: inline-block; width: 0.55em; height: 0.55em; margin-right: 0.5em;
  border-radius: 50%; background: var(--accent); vertical-align: 0.05em;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .pulse::before, .pulse { animation: none; } }

/* ---------- Prik-paneel + timer ---------- */
.prompt-label { font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; }
.prompt-label.hand { font-size: 1.45rem; }
.prompt-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.95rem; line-height: 1; letter-spacing: -0.005em;
  color: var(--ink); margin-top: 4px;
}
.prompt-hint { font-size: 0.9rem; color: var(--ink-soft); margin-top: 4px; }
/* Getal naast de balk (niet erboven), zodat het nooit over een lange naam of hint valt. */
.timer { display: flex; align-items: center; gap: 12px; margin: 14px 0 14px; }
.timer-track { flex: 1; height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.timer-bar { height: 100%; width: 100%; background: var(--accent); border-radius: inherit; transform-origin: left; }
.timer.low .timer-bar { background: var(--warn); }
.timer-text {
  order: 2; min-width: 1.4em; text-align: right;
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.timer.low .timer-text { color: var(--warn); }
.prompt-progress { font-size: 0.8rem; color: var(--ink-soft); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Resultaat ---------- */
.result-points {
  font-family: var(--font-display); font-weight: 700;
  font-size: 2.6rem; line-height: 0.95; color: var(--brand);
}
.result-breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.result-breakdown div { background: var(--surface-2); border-radius: 0 var(--radius-sm) 0 var(--radius-sm); padding: 8px 10px; }
.result-breakdown b { display: block; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; color: var(--ink); }
.result-breakdown span { font-size: 0.72rem; color: var(--ink-soft); font-weight: 600; }
.result-note {
  font-size: 0.9rem; color: var(--ink);
  background: var(--accent-tint);
  border-radius: 0 var(--radius-sm) 0 var(--radius-sm);
  padding: 10px 12px;
}
.card-toggle { position: absolute; top: 10px; right: 10px; color: var(--ink-soft); }
.collapsed .result-breakdown, .collapsed .result-note, .collapsed .result-points { display: none; }
.collapsed .card-toggle { transform: rotate(180deg); }

/* ---------- Samenvatting ---------- */
.big-score {
  font-family: var(--font-display); font-weight: 700;
  font-size: 3.4rem; line-height: 0.9; color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.big-score small { font-size: 1.2rem; color: var(--ink-soft); }
.score-rows { display: grid; gap: 6px; }
.score-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 0 var(--radius-sm) 0 var(--radius-sm);
  background: var(--surface-2);
}
.score-row .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.score-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-row .score { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.copy-link { justify-self: center; margin-top: -8px; font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }
.share-status { font-size: 0.85rem; color: var(--ink-soft); text-align: center; white-space: pre-line; }

/* ---------- Ranglijst (telefoon) ---------- */
.board { display: grid; gap: 4px; }
.board-row {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 8px;
  padding: 9px 12px;
  border-radius: 0 var(--radius-sm) 0 var(--radius-sm);
  background: var(--surface-2);
}
.board-row.me { background: var(--brand-tint); box-shadow: inset 0 0 0 2px var(--brand); color: var(--brand-deep); font-weight: 700; }
.board-row .rank { font-weight: 700; color: var(--ink-soft); }
.board-row .total { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.tabs button { padding: 7px 14px; font-size: 0.85rem; background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.tabs button.active { background: var(--brand-strong); color: var(--brand-contrast); }

/* Tikdoelen op de telefoon minstens 44px (WCAG 2.5.5) */
@media (pointer: coarse) {
  button.go, .tabs button, button.ghost, .button.ghost { min-height: 44px; }
  button.ghost { min-width: 44px; }
  .leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; }
}

.toast {
  position: fixed; z-index: 900; left: 50%; top: calc(var(--topbar-h) + 12px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow);
  max-width: calc(100% - 32px); text-align: center;
}

/* Geluid aan/uit in de topbalk (PP.sound) */
.sound-toggle { flex: none; width: 40px; height: 40px; padding: 0; color: var(--ink-soft); border-radius: 50%; }
.sound-toggle .off { display: none; }
.sound-toggle.off .on { display: none; }
.sound-toggle.off .off { display: block; }
#board-share { justify-self: start; }

/* ---------- Welkom (niet ingelogd) ---------- */
#welcome-login { justify-self: stretch; text-align: center; }
.welcome-small { font-size: 0.85rem; margin-top: -6px; }
.privacy { font-size: 0.85rem; color: var(--ink-soft); }
.privacy summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.privacy p { margin-top: 6px; }
button.danger-text { color: var(--warn); }

/* ---------- Dagronde in de lobby ---------- */
/* De ronde van vandaag springt eruit: magenta kader, ook als hij al gespeeld is. */
.round-item.daily { background: var(--surface); box-shadow: inset 0 0 0 2px var(--brand), 3px 5px 14px rgba(236, 0, 140, 0.12); }
.round-item.daily .eyebrow { margin-bottom: 2px; }
.daily-next { font-size: 0.82rem; color: var(--ink-soft); margin-top: 2px; }
.daily-history { display: grid; gap: 6px; }
.daily-history h3 { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.daily-history .round-item { padding: 8px 10px 8px 14px; }
.daily-history .round-item .score-done { font-size: 1rem; }
.daily-history .round-item button { padding: 6px 12px; font-size: 0.82rem; }

/* Voortgang achter een naam in de ranglijst (bijv. 3/5 of 4 dagen) */
.board-row .sub { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); margin-left: 6px; }

/* ---------- Privacypagina (/privacy) ---------- */
.privacy-page h2 { font-size: 1.05rem; margin-top: 4px; }
.privacy-page ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.privacy-page a:not(.button), .privacy a { color: var(--brand-strong); font-weight: 600; }
.privacy-page .button { justify-self: stretch; text-align: center; }
