/* Mobiel.nl Kleurkennis Test
   Neutrale interface: alleen wit, grijs en zwart. Geen merk- of andere verzadigde kleuren,
   want die zouden het antwoord verklappen of de kleurwaarneming beinvloeden.
   Het spelvlak is effen middengrijs (128, 128, 128), gelijk aan de achtergrond van de afbeeldingen. */
:root {
  color-scheme: light;
  --paper: #f4f4f4;
  --surface: #fff;
  --ink: #000;
  --ink-2: #333;
  --ink-3: #626262;
  --line: #e3e3e3;
  --line-2: #cdcdcd;
  --field: #8a8a8a;
  --stage: #808080;
  --radius-sheet: 28px;
  --radius-panel: 22px;
  --radius-control: 14px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 18px -10px rgba(0, 0, 0, .18);
  --shadow-2: 0 1px 1px rgba(0, 0, 0, .04), 0 18px 40px -20px rgba(0, 0, 0, .22), 0 40px 80px -40px rgba(0, 0, 0, .18);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter Display", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--font);
  font-size: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); min-height: 100dvh; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); }

.skip { position: absolute; left: -999px; top: .5rem; background: #000; color: #fff; padding: .6rem 1rem; border-radius: 10px; z-index: 50; }
.skip:focus { left: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid #000; outline-offset: 3px; border-radius: 6px; }

/* ---------- topbalk ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  height: 64px; padding: 0 clamp(1rem, 3vw, 2rem);
  padding-top: env(safe-area-inset-top);
  background: rgba(244, 244, 244, .82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 22px; height: 22px; flex: none; }
.brand-mark .m1 { fill: #000; }
.brand-mark .m2 { fill: #5a5a5a; }
.brand-mark .m3 { fill: #a6a6a6; }
.brand-mark .m4 { fill: #d9d9d9; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; letter-spacing: -.02em; }
.brand-product { color: var(--ink-3); font-size: .9375rem; padding-left: .6rem; border-left: 1px solid var(--line-2); }
.topbar nav { margin-left: auto; display: flex; gap: .5rem; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 1rem;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .6);
  font-size: .9375rem; font-weight: 600; text-decoration: none; color: var(--ink);
  transition: background-color .15s, border-color .15s;
}
.nav-link:hover { background: #fff; border-color: #b5b5b5; }

main { max-width: 1120px; margin: 0 auto; padding: clamp(1.25rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2rem) 4rem; outline: none; }

/* ---------- algemene onderdelen ---------- */
.overline { font-size: .9375rem; font-weight: 500; color: var(--ink-3); letter-spacing: -.005em; }
.lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.55; color: var(--ink-2); max-width: 36em; }
.help { font-size: .875rem; color: var(--ink-3); line-height: 1.5; }
.error { color: #000; font-weight: 600; font-size: .9375rem; min-height: 1.4em; margin-top: .5rem; }
.error:not(:empty)::before { content: "!"; display: inline-grid; place-items: center; width: 1.2em; height: 1.2em; margin-right: .45em; border-radius: 50%; background: #000; color: #fff; font-size: .8em; vertical-align: .05em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; letter-spacing: -.01em; text-decoration: none;
  min-height: 52px; padding: 0 1.5rem; border-radius: var(--radius-control);
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .12s var(--ease), box-shadow .15s;
}
.btn:active:not([disabled]) { transform: scale(.98); }
.btn-primary { background: #000; color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 8px 20px -10px rgba(0, 0, 0, .55); }
.btn-primary:hover { background: #2b2b2b; }
.btn-primary[disabled] { background: #d6d6d6; color: #5e5e5e; box-shadow: none; cursor: not-allowed; }
.btn-secondary { background: #fff; color: #000; border-color: var(--field); }
.btn-secondary:hover { background: #f0f0f0; }
.btn-wide { width: 100%; }
.btn-small { min-height: 40px; padding: 0 1rem; font-size: .9rem; border-radius: 12px; }

input[type="text"], input[type="password"] {
  flex: 1 1 14rem; min-width: 0; font: inherit; font-size: 1.0625rem;
  height: 52px; padding: 0 1rem; border-radius: var(--radius-control);
  border: 1px solid var(--field); background: #fff; color: #000;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #767676; }
input:hover:not(:disabled) { border-color: #5c5c5c; }
input:focus-visible { outline: none; border-color: #000; box-shadow: 0 0 0 1px #000, 0 0 0 5px rgba(0, 0, 0, .12); }
input:disabled { background: #f2f2f2; color: #6b6b6b; border-color: #c4c4c4; }

/* Status: geen groen of rood, alleen een gevulde of open stip. */
.status {
  display: inline-flex; align-items: center; gap: .55rem; width: fit-content; max-width: 100%;
  padding: .45rem .9rem .45rem .75rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1);
  font-size: .9375rem; font-weight: 600; line-height: 1.35;
}
.status-dot { position: relative; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #000; }
.status.open .status-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid #000; opacity: 0; animation: pulse 2.4s var(--ease) infinite; }
.status.not_open .status-dot, .status.closed .status-dot { background: transparent; border: 1.5px solid #000; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .55; } 70%, 100% { transform: scale(1.5); opacity: 0; } }

/* Grijstrap: 9 stappen van wit naar zwart, terug op het eindscherm als niveaumeter. */
.wedge { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; width: min(100%, 300px); }
.wedge i { display: block; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.wedge i:nth-child(1) { background: #fff; }
.wedge i:nth-child(2) { background: #dfdfdf; }
.wedge i:nth-child(3) { background: #bfbfbf; }
.wedge i:nth-child(4) { background: #9f9f9f; }
.wedge i:nth-child(5) { background: #808080; }
.wedge i:nth-child(6) { background: #606060; }
.wedge i:nth-child(7) { background: #404040; }
.wedge i:nth-child(8) { background: #202020; }
.wedge i:nth-child(9) { background: #000; }

/* ---------- startscherm: een rustige kolom ---------- */
.start {
  max-width: 460px; margin: clamp(.5rem, 8dvh, 6rem) auto 0;
  display: flex; flex-direction: column; gap: 2.25rem;
}
.start-head { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.start h1 {
  font-size: clamp(2.625rem, 1.9rem + 3vw, 3.5rem); line-height: .98; font-weight: 700;
  letter-spacing: -.045em; text-wrap: balance;
}
.start .lead { font-size: 1.0625rem; color: var(--ink-3); max-width: 25em; text-wrap: pretty; }
.start .help { text-wrap: pretty; }
.start .status { box-shadow: none; padding: .3rem .75rem .3rem .65rem; font-size: .8125rem; font-weight: 600; color: var(--ink-2); gap: .5rem; }
.start .status-dot { width: 7px; height: 7px; }

/* Formulieren (ook admin) */
.start-form label { display: block; font-weight: 650; font-size: 1rem; margin-bottom: .6rem; letter-spacing: -.01em; }
.start-form .help { margin-top: .65rem; }
.field-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.field-row .btn { flex: 0 0 auto; }

.start .start-form { display: flex; flex-direction: column; }
.start .start-form label { font-size: .9375rem; margin-bottom: .5rem; }
.start .start-form input { width: 100%; flex: none; }
.start .start-form input[aria-invalid="true"] { border-color: #000; box-shadow: 0 0 0 1px #000; }
.start .start-form .help { margin-top: .5rem; }
.start .start-form .error { margin-top: .5rem; }
.start .start-form .error:empty { min-height: 0; margin: 0; }
.start .start-form .btn { margin-top: 1.25rem; box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 6px 16px -10px rgba(0, 0, 0, .5); }

.notice { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .75rem; align-items: stretch; }
.start > .notice:not(#resume-box) { font-weight: 600; }

.start .rules { margin-top: -.25rem; }

/* Spelregels op het startscherm: klein, grijs en rustig, zodat titel, naam en knop domineren. */
.rules {
  padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: .55rem;
  font-size: .8125rem; line-height: 1.5; color: var(--ink-3); text-wrap: pretty;
}
.rules-title { font-family: var(--font); font-size: .8125rem; font-weight: 650; color: var(--ink-2); letter-spacing: -.005em; }
.rules-list { margin: 0 0 .35rem; padding: 0; list-style: none; display: grid; gap: .2rem; }
.rules-list li { position: relative; padding-left: .95rem; }
.rules-list li::before { content: ""; position: absolute; left: .1rem; top: .66em; width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }
.rules strong { font-weight: 650; color: var(--ink-2); margin-right: .2em; }

/* ---------- spel: neutraal middengrijs ---------- */
body.in-game { background: var(--stage); }
body.in-game .topbar { background: rgba(128, 128, 128, .9); border-bottom-color: rgba(0, 0, 0, .14); }
body.in-game .brand, body.in-game .brand-product { color: #000; }
body.in-game .brand-product { border-left-color: rgba(0, 0, 0, .3); }
body.in-game .nav-link { background: transparent; border-color: rgba(0, 0, 0, .35); color: #000; }
body.in-game .nav-link:hover { background: rgba(0, 0, 0, .08); }
body.in-game main { max-width: 900px; padding-top: 1rem; }

.game { color: #000; text-align: center; }
.hud {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem;
  padding: .6rem .6rem .6rem 1.1rem; border-radius: 20px;
  background: rgba(0, 0, 0, .07); border: 1px solid rgba(0, 0, 0, .09);
  text-align: left; min-height: 68px;
}
.hud-round { display: flex; flex-direction: column; line-height: 1.2; }
.round-label { font-size: 1.125rem; font-weight: 700; letter-spacing: -.02em; }
.round-sub { font-size: .875rem; font-weight: 500; }
.hud-score { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.hud-caption { font-size: .8125rem; font-weight: 500; }
.score-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hud-actions { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; }

.btn-ghost {
  min-height: 44px; padding: 0 1rem 0 .85rem; border-radius: 999px; font-size: .9375rem;
  background: rgba(255, 255, 255, .2); border-color: rgba(0, 0, 0, .28); color: #000;
}
.btn-ghost svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-ghost:hover:not([disabled]) { background: rgba(255, 255, 255, .32); border-color: rgba(0, 0, 0, .45); }
.btn-ghost[disabled] { cursor: default; background: transparent; border-style: dashed; }

/* Timerring: loopt leeg en kleurt van donkergrijs naar zwart. */
.ring { position: relative; flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(0, 0, 0, .16); stroke-width: 3.5; }
.ring-arc { fill: none; stroke: var(--arc, #4a4a4a); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; }
.ring-num { position: relative; font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ring-hud { width: 52px; height: 52px; }
.ring-hud .ring-num { font-size: 1.125rem; }
.ring.urgent .ring-num { animation: tick 1s var(--ease) infinite; }
@keyframes tick { 0% { transform: scale(1.18); } 35%, 100% { transform: scale(1); } }

.phase-ref { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; padding-top: clamp(1rem, 4dvh, 2.5rem); }
.ref-intro { font-size: .9375rem; font-weight: 600; padding: .35rem .9rem; border-radius: 999px; background: rgba(0, 0, 0, .08); max-width: 34em; }
.ref-name { font-family: var(--font-display); font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.ref-img { display: block; width: min(76vw, 46dvh, 360px); aspect-ratio: 1; image-rendering: pixelated; border-radius: 24px; }
.ref-foot { display: flex; align-items: center; gap: .75rem; }
.ring-count { width: 44px; height: 44px; }
.ring-count .ring-num { font-size: 1.125rem; }
.ring-count .ring-arc { stroke: #000; }
.hint { font-weight: 600; font-size: 1.0625rem; letter-spacing: -.01em; }
.ref-foot .hint { margin: 0; }

.phase-options { padding-top: 1rem; }
.phase-options > .hint { margin: 0 0 .9rem; }
.grid { position: relative; container-type: inline-size; margin: 0 auto; aspect-ratio: var(--ar, 1); width: min(100%, calc((100dvh - 270px) * var(--ar, 1)), 640px); }
.grid-img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
/* Afgeronde tegels: een spreidschaduw in exact het grijs van de afbeelding maskeert de hoeken.
   Straal en spreiding komen uit JS (afhankelijk van de getekende tussenruimte). */
#grid-buttons button {
  position: absolute; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer;
  --tile-s: calc(var(--gr, .0167) * 50cqw);
  --tile-r: min(calc(var(--gr, .0167) * 115cqw), 16px);
  border-radius: var(--tile-r, 8px); box-shadow: 0 0 0 var(--tile-s, 3px) var(--stage);
  outline: 0 solid transparent; outline-offset: 0;
  transition: outline-width .12s var(--ease), outline-color .12s;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
  #grid-buttons button:not([disabled]):hover { z-index: 1; outline: 2px solid rgba(0, 0, 0, .75); }
}
#grid-buttons button:not([disabled]):active { z-index: 1; outline: 3px solid #000; }
#grid-buttons button:focus-visible { z-index: 2; outline: 3px solid #000; outline-offset: 0; border-radius: var(--tile-r, 8px); }
#grid-buttons button[disabled] { cursor: default; }
#grid-buttons button.picked { z-index: 2; outline: 3px solid #000; }
.mark {
  position: absolute; left: 50%; top: 50%; width: clamp(34px, 40%, 64px); aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, .45);
  animation: pop .38s var(--ease) both;
}
.mark svg { width: 52%; height: 52%; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mark.ok { background: #fff; color: #000; }
.mark.bad { background: #000; color: #fff; }
.mark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .35s .12s var(--ease) forwards; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.grid.shake { animation: shake .42s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes shake { 15%, 85% { transform: translateX(-2px); } 30%, 70% { transform: translateX(5px); } 45% { transform: translateX(-7px); } 60% { transform: translateX(7px); } }

.peek-overlay { position: fixed; inset: 0; background: var(--stage); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; z-index: 30; }
.peek-label { font-weight: 600; font-size: 1.0625rem; color: #000; }

.game-msg { min-height: 2.5rem; margin-top: 1rem; display: flex; justify-content: center; align-items: center; }
.game-msg:not(:empty) {
  width: fit-content; margin-left: auto; margin-right: auto; padding: .5rem 1.1rem; border-radius: 999px;
  background: #000; color: #fff; font-weight: 600; font-size: 1rem; letter-spacing: -.01em;
  animation: rise .3s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- bladen: oefenronde en eindscherm ---------- */
.sheet {
  max-width: 640px; margin: 0 auto; background: var(--surface);
  border-radius: var(--radius-sheet); box-shadow: var(--shadow-2); border: 1px solid rgba(0, 0, 0, .04);
  padding: clamp(1.5rem, 5vw, 3rem);
  display: flex; flex-direction: column; gap: 1.25rem;
}
.sheet-narrow { max-width: 520px; }
.sheet-title { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.sheet .overline { margin-bottom: -.75rem; }
.sheet .btn-wide { margin-top: .5rem; }

.end-title { display: flex; flex-direction: column; gap: .35rem; font-weight: 700; }
.end-caption { font-family: var(--font); font-size: 1rem; font-weight: 600; color: var(--ink-3); letter-spacing: -.01em; }
.end-score { font-size: clamp(4.25rem, 2.5rem + 9vw, 7.5rem); line-height: .86; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.end-label-row { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.25rem; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: .35rem 1rem;
  border-radius: 999px; background: #000; color: #fff; font-weight: 600; letter-spacing: -.01em;
}
.wedge-level { width: 216px; gap: 3px; }
.wedge-level i { height: 12px; border-radius: 3px; transition: transform .3s var(--ease); }
.wedge-level i.here { transform: scaleY(1.9); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), 0 0 0 2px var(--surface), 0 0 0 3.5px #000; }
.end-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0; padding: 1.25rem 0 0; border-top: 1px solid var(--line); }
.end-stats dt { font-size: .875rem; color: var(--ink-3); }
.end-stats dd { margin: .15rem 0 0; font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.end-stats dd small { font-family: var(--font); font-size: 1rem; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }

/* Pogingen op het eindscherm */
.attempts { display: flex; flex-direction: column; gap: .6rem; }
.attempts-title { font-family: var(--font); font-size: .875rem; font-weight: 600; color: var(--ink-3); letter-spacing: -.005em; }
.attempts-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.attempts-list li {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label tag" "score score" "meta meta"; align-items: center; row-gap: .1rem;
  padding: .8rem 1rem .85rem; border-radius: 16px; border: 1px solid var(--line); background: #fafafa;
}
.attempts-list li.counts { background: var(--surface); border-color: #000; box-shadow: 0 0 0 1px #000; }
.attempt-label { grid-area: label; font-size: .8125rem; font-weight: 600; color: var(--ink-3); }
.attempt-score { grid-area: score; font-family: var(--font-display); font-size: 1.625rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.attempt-meta { grid-area: meta; font-size: .8125rem; color: var(--ink-3); }
.attempt-tag { grid-area: tag; font-size: .75rem; font-weight: 600; line-height: 1; padding: .25rem .55rem; border-radius: 999px; background: #000; color: #fff; }
.attempts .help:empty { display: none; }

.next-attempt {
  display: flex; flex-direction: column; gap: .75rem;
  padding: 1.15rem 1.15rem 1rem; border-radius: var(--radius-panel); background: var(--paper); border: 1px solid var(--line);
}
.next-title { font-weight: 650; font-size: 1.0625rem; letter-spacing: -.015em; color: #000; }
.next-attempt .btn-wide { margin-top: 0; }
.next-attempt .help { font-variant-numeric: tabular-nums; }
.end-actions { display: flex; flex-direction: column; gap: .6rem; }

.compare { margin: 0; padding: 1.5rem 1.25rem 1.1rem; background: var(--stage); border-radius: var(--radius-panel); display: flex; flex-direction: column; align-items: center; gap: .75rem; }
/* Zelfde maskertechniek als het optieraster: spreiding is de helft van de getekende tussenruimte
   (8 px op 320 of 156 breed) en de hoekstraal blijft klein genoeg dat de schaduw de hoeken helemaal dekt. */
.compare-frame { position: relative; width: min(100%, 360px); container-type: inline-size; --gr: .025; }
.compare.single .compare-frame { width: min(52%, 180px); --gr: .0513; }
.compare img { display: block; width: 100%; image-rendering: pixelated; }
.compare-tiles span { position: absolute; top: 0; bottom: 0; border-radius: min(calc(var(--gr) * 115cqw), 16px); box-shadow: 0 0 0 calc(var(--gr) * 50cqw + .5px) var(--stage); }
.compare-cap { display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 360px); color: #000; font-weight: 600; font-size: .9375rem; text-align: center; }
.compare.single .compare-cap { grid-template-columns: 1fr; }

/* ---------- leaderboard ---------- */
.board-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
.board-head h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem); line-height: .95; font-weight: 700; letter-spacing: -.045em; }
.board-head .help { margin-top: .75rem; max-width: 40em; }
.board-head .wedge { margin-bottom: 1rem; }
.podium { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .75rem; }
.podium-item {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .25rem 1rem;
  padding: 1rem 1.1rem; border-radius: var(--radius-panel);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.podium-item.p1 { background: #000; color: #fff; border-color: #000; box-shadow: var(--shadow-2); }
.podium-rank { font-family: var(--font-display); font-size: 3rem; line-height: .9; font-weight: 700; letter-spacing: -.06em; font-variant-numeric: tabular-nums; min-width: 1.1ch; }
.podium-name { font-weight: 650; font-size: 1.125rem; letter-spacing: -.015em; overflow-wrap: anywhere; }
/* Namen zijn vrij en mogen emoji bevatten: in grijstinten tonen, zodat de interface neutraal blijft. */
.podium-name, td.name { filter: grayscale(1); overflow-wrap: anywhere; }
.podium-meta { font-size: .875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.podium-item.p1 .podium-meta { color: #c7c7c7; }
.podium-score { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; text-align: right; }
.podium-item .toggle { grid-column: 1 / -1; justify-self: start; }
.podium-item .times { grid-column: 1 / -1; }
.podium-item.p1 .toggle { color: #fff; border-color: rgba(255, 255, 255, .45); }
.podium-item.p1 .toggle:hover { background: rgba(255, 255, 255, .12); }
.podium-item.p1 .times { color: #e0e0e0; }
.podium-item.p1 .me-tag { border-color: #fff; color: #fff; }
.podium-item.me:not(.p1) { box-shadow: 0 0 0 2px #000, var(--shadow-1); }
@media (min-width: 760px) {
  .podium { grid-template-columns: repeat(3, 1fr); align-items: end; }
  .podium-item { grid-template-columns: 1fr auto; grid-template-rows: 1fr auto auto; align-items: end; padding: 1.25rem 1.25rem 1.1rem; }
  .podium-item .podium-rank { grid-column: 1 / -1; align-self: start; font-size: 4.5rem; margin-bottom: .75rem; }
  .podium-item .podium-who { align-self: end; }
  .podium-item .times { margin-top: .25rem; }
  .podium-item.p1 { order: 2; min-height: 250px; }
  .podium-item.p2 { order: 1; min-height: 215px; }
  .podium-item.p3 { order: 3; min-height: 190px; }
  .podium-item .podium-score { grid-column: 2; grid-row: 2; align-self: end; line-height: 1.2; }
  .podium-item .toggle { margin-top: .75rem; }
}

.board { background: var(--surface); border-radius: var(--radius-panel); border: 1px solid var(--line); box-shadow: var(--shadow-1); overflow: hidden; }
.board + .board, .mine { margin-top: 1.5rem; }
.board-title { font-size: 1.125rem; font-weight: 650; letter-spacing: -.015em; padding: 1rem 1.25rem 0; }
.updated { font-size: .8125rem; color: var(--ink-3); margin-top: 1rem; }
.empty { padding: 2.5rem 1.25rem; text-align: center; color: var(--ink-2); }
.empty strong { display: block; font-family: var(--font-display); font-size: 1.375rem; letter-spacing: -.02em; color: #000; margin-bottom: .25rem; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: .8125rem; color: var(--ink-3); font-weight: 600; background: #fafafa; }
td.num, th.num { text-align: right; }
td.rank { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; width: 3.5rem; letter-spacing: -.02em; }
td.score { font-weight: 700; }
tr.me td { background: #f0f0f0; }
tr.me td:first-child { box-shadow: inset 3px 0 0 #000; }
tr.detail td { background: #fafafa; padding-top: .25rem; }
.best-of { display: block; font-size: .8125rem; font-weight: 500; color: var(--ink-3); margin-top: .1rem; }
.me-tag { display: inline-flex; align-items: center; font-size: .75rem; line-height: 1; border: 1px solid #000; border-radius: 999px; padding: .2rem .5rem; margin-left: .5rem; font-weight: 600; vertical-align: .1em; }
.times { list-style: none; font-size: .875rem; color: var(--ink-2); margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem .5rem; }
.times li { padding: .15rem .55rem; border-radius: 8px; background: rgba(0, 0, 0, .05); }
.podium-item.p1 .times li { background: rgba(255, 255, 255, .12); }
.toggle {
  background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 0 .8rem;
  font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer; color: #000; min-height: 32px;
  transition: background-color .15s, border-color .15s;
}
.toggle:hover { background: #f0f0f0; border-color: #a8a8a8; }

/* ---------- admin ---------- */
.admin-wide { max-width: 1280px; }
.admin-head { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.5rem; }
.admin-head h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); letter-spacing: -.04em; line-height: 1; }
.admin-card { background: var(--surface); border-radius: var(--radius-panel); border: 1px solid var(--line); box-shadow: var(--shadow-1); padding: 1.25rem; }
.admin-card + .admin-card { margin-top: 1.25rem; }
.admin-card .start-form .help { margin-top: .6rem; }
.admin-info { font-size: .9rem; color: var(--ink-2); margin-top: .75rem; }
.admin-info:empty { display: none; }
.admin-table td, .admin-table th { font-size: .85rem; padding: .55rem .7rem; vertical-align: top; }
.admin-table td.num, .admin-table td:nth-child(2) { white-space: nowrap; }
.admin-table td.times-cell { color: var(--ink-2); min-width: 18rem; }
.flag { font-weight: 700; }
.flag-count { font-weight: 650; white-space: nowrap; }
.admin-table tr.player-first td { border-top: 1px solid var(--line-2); }
.admin-table td[rowspan] { background: var(--surface); }
.flag::before { content: ""; display: inline-block; width: .55em; height: .55em; margin-right: .4em; border-radius: 50%; background: #000; vertical-align: .08em; }
.scroll-x { overflow-x: auto; }
.danger { border: 1.5px dashed #000; border-radius: var(--radius-panel); padding: 1.25rem; margin-top: 1.25rem; display: flex; flex-direction: column; gap: .6rem; }
.danger h2 { font-size: 1.125rem; letter-spacing: -.015em; }
.admin-msg:empty { display: none; }

/* ---------- klein scherm ---------- */
@media (max-width: 560px) {
  .topbar { height: 56px; gap: .5rem; }
  .brand-product { display: none; }
  .nav-link { min-height: 38px; padding: 0 .85rem; font-size: .875rem; }
  .field-row .btn { flex: 1 1 100%; }
  .hide-sm { display: none; }
  body.in-game main { padding: .6rem .75rem 2rem; }
  .hud { padding: .5rem .5rem .5rem .9rem; gap: .5rem; min-height: 60px; }
  .hud { grid-template-columns: auto 1fr auto; }
  .score-value { font-size: 1.25rem; }
  .btn-ghost { padding: 0 .8rem 0 .7rem; font-size: .875rem; min-height: 40px; }
  .ring-hud { width: 46px; height: 46px; }
  .grid { width: min(100%, calc((100dvh - 230px) * var(--ar, 1))); }
  .phase-options { padding-top: .75rem; }
  th, td { padding: .7rem .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .mark path { stroke-dashoffset: 0; }
}
