:root {
  --rood: #8f1d1d;
  --rood-donker: #5e1010;
  --goud: #f4a300;
  --goud-licht: #ffd166;
  --creme: #fff8ea;
  --tekst: #2b1a12;
  --zacht: #7a6656;
  --goed: #2a9d5c;
  --fout: #c62828;
  --team: #8f1d1d;
  --radius: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--tekst);
  background: radial-gradient(circle at 20% 0%, #a92a2a, var(--rood) 45%, var(--rood-donker));
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.4;
}

h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
img { max-width: 100%; display: block; }
a { color: var(--rood); }
.verborgen { display: none !important; }
.laden { color: #fff; text-align: center; padding: 3rem; }

/* ---------- Bouwstenen ---------- */

.kaart {
  background: var(--creme);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: 0 6px 24px rgb(0 0 0 / 25%);
}
.stapel { display: flex; flex-direction: column; gap: .8rem; }
.rij { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.rij.tussen { justify-content: space-between; }
.midden { text-align: center; }
.zacht { color: var(--zacht); }
.klein { font-size: .85rem; }
.groot { font-size: 1.25rem; }
.vol { width: 100%; }
.logo { font-size: 3.5rem; text-align: center; }

label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; }
.rij label { flex: 1; min-width: 8rem; }
input, textarea, select {
  font: inherit;
  padding: .7rem .8rem;
  border: 2px solid #e2d3bf;
  border-radius: 12px;
  background: #fff;
  color: var(--tekst);
}
input:focus, textarea:focus, select:focus { outline: 3px solid var(--goud); border-color: var(--goud); }
input[type="color"] { padding: 0; width: 3rem; height: 3rem; }
input[type="range"] { padding: 0; }

.knop {
  font: inherit;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: .75rem 1.3rem;
  background: var(--goud);
  color: var(--tekst);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-shadow: 0 3px 0 #b37700;
}
.knop:active { transform: translateY(2px); box-shadow: 0 1px 0 #b37700; }
.knop:disabled { opacity: .5; }
.knop.groot { width: 100%; padding: 1.05rem; font-size: 1.15rem; }
.knop.licht { background: #efe2cf; box-shadow: 0 3px 0 #cdbba3; }
.knop.goed { background: var(--goed); color: #fff; box-shadow: 0 3px 0 #1d6b3f; }
.knop.fout { background: var(--fout); color: #fff; box-shadow: 0 3px 0 #8a1b1b; }
.team-knop { background: var(--team); color: #fff; box-shadow: 0 3px 0 rgb(0 0 0 / 30%); }
.link {
  font: inherit;
  background: none;
  border: none;
  color: var(--rood);
  text-decoration: underline;
  cursor: pointer;
  padding: .3rem;
}
.link:disabled { opacity: .3; text-decoration: none; }
.link.gevaar { color: var(--fout); }

.melding { padding: .8rem 1rem; border-radius: 12px; font-weight: 700; }
.melding.fout { background: #fde2e2; color: var(--fout); }
.melding.goed { background: #dcf3e5; color: var(--goed); }
.tip { background: #fff1c9; padding: .7rem .9rem; border-radius: 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 150%);
  background: #222;
  color: #fff;
  padding: .8rem 1.2rem;
  border-radius: 999px;
  max-width: calc(100% - 2rem);
  transition: transform .25s;
  z-index: 50;
  text-align: center;
}
.toast.zichtbaar { transform: translate(-50%, 0); }
.toast-fout { background: var(--fout); }

.spinner {
  width: 2.5rem; height: 2.5rem; margin: .5rem auto;
  border: 4px solid #e8d7bf; border-top-color: var(--rood);
  border-radius: 50%;
  animation: draai 1s linear infinite;
}
@keyframes draai { to { transform: rotate(360deg); } }

/* ---------- Telefoon ---------- */

.welkom { max-width: 26rem; margin: 10vh auto 0; display: flex; flex-direction: column; gap: .8rem; }
.welkom h1 { text-align: center; }
.welkom form input { flex: 1; text-transform: uppercase; letter-spacing: .2em; font-size: 1.3rem; text-align: center; min-width: 0; }
@media (max-width: 30rem) { .welkom { margin: 1rem; } }

.kop {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: .8rem 1rem calc(.8rem) 1rem;
  padding-top: max(.8rem, env(safe-area-inset-top));
  background: var(--team);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 2px 12px rgb(0 0 0 / 30%);
}
.punten { background: rgb(255 255 255 / 22%); border-radius: 999px; padding: .2rem .8rem; }
.inhoud { max-width: 34rem; margin: 0 auto; padding: 1rem; }
.inhoud.breed { max-width: 60rem; }
.voet { text-align: center; padding: 1rem 1rem 2rem; }
.voet .link { color: #ffe9c2; }

.stap { color: #fff; font-weight: 700; text-align: center; }
.foto-kader { border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 6px 24px rgb(0 0 0 / 35%); }
.foto { width: 100%; border-radius: var(--radius); }
.foto-kader .foto { border-radius: 0; max-height: 60vh; object-fit: contain; margin: 0 auto; }
.foto.klein { max-width: 12rem; margin: 0 auto; }
.inhoud > .stapel > .rij.tussen { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.inhoud > .stapel > .rij.tussen .zacht { color: #ffe0b0; }

.opdracht { text-align: center; }
.opdracht .goed { color: var(--goed); font-weight: 800; }
.opdracht .label { margin-top: .5rem; font-weight: 700; color: var(--zacht); }
.opdracht-tekst { font-size: 1.35rem; font-weight: 800; margin: .3rem 0 .8rem; }
.klok { font-variant-numeric: tabular-nums; font-weight: 900; }
.klok.groot { font-size: 3rem; color: var(--rood); }
.bijna { color: var(--fout); animation: knipper 1s steps(2) infinite; }
@keyframes knipper { 50% { opacity: .4; } }
.te-laat { color: var(--fout); font-weight: 700; }

.uitleg { padding-left: 1.2rem; margin: 0 0 .8rem; }
.uitleg li { margin-bottom: .4rem; }

.antwoord { font-size: 1.4rem; font-weight: 800; margin: .3rem 0; }
.keuzes { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.keuze {
  font: inherit; font-weight: 700;
  padding: 1rem .5rem;
  border-radius: 14px;
  border: 3px solid transparent;
  background: var(--creme);
  color: var(--tekst);
  cursor: pointer;
}
.keuze:disabled { cursor: default; }
.keuze.gekozen { border-color: var(--goud); background: #fff1c9; }
.keuze.juist { border-color: var(--goed); background: #dcf3e5; }
.keuze.onjuist { border-color: var(--fout); background: #fde2e2; }

.raster { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.stemfoto {
  position: relative; padding: 0; border: 4px solid transparent; border-radius: 14px;
  overflow: hidden; background: #000; cursor: pointer; aspect-ratio: 3 / 4;
}
.stemfoto img { width: 100%; height: 100%; object-fit: cover; }
.stemfoto.gekozen { border-color: var(--goud); }
.stemfoto:disabled { opacity: .45; cursor: default; }
.stemfoto .nr, .stem-paneel .nr {
  position: absolute; top: .4rem; left: .4rem;
  background: var(--goud); color: var(--tekst); font-weight: 900;
  border-radius: 999px; min-width: 2rem; padding: .1rem .5rem; text-align: center;
}
.stemfoto .eigen { position: absolute; bottom: .4rem; left: 0; right: 0; color: #fff; font-weight: 700; text-shadow: 0 1px 3px #000; }
.stemfoto .vinkje { position: absolute; top: .3rem; right: .5rem; font-size: 1.6rem; color: var(--goud); text-shadow: 0 1px 3px #000; }

.scores { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-direction: column; gap: .4rem; }
.scores li { display: flex; justify-content: space-between; padding: .6rem .9rem; border-radius: 12px; background: var(--team); color: #fff; font-weight: 700; }

/* ---------- Piet ---------- */

.tabs {
  position: sticky; top: 0; z-index: 5;
  display: flex; overflow-x: auto; gap: .3rem; padding: .5rem;
  background: var(--rood-donker);
}
.tabs button {
  font: inherit; font-weight: 700; white-space: nowrap;
  border: none; border-radius: 999px; padding: .55rem 1rem;
  background: transparent; color: #ffe0b0; cursor: pointer;
}
.tabs button.actief { background: var(--goud); color: var(--tekst); }

.programma { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .5rem; }
.stap-knop {
  font: inherit; font-weight: 600; text-align: left;
  padding: .75rem .9rem; border-radius: 12px; border: 2px solid #e2d3bf;
  background: #fff; cursor: pointer; color: var(--tekst);
}
.stap-knop.actief { background: var(--rood); border-color: var(--rood); color: #fff; }

.beoordelen { border: 4px solid var(--goud); }
.beoordeel { border-left: 6px solid var(--team); padding: .6rem 0 .6rem .8rem; margin-bottom: .8rem; display: flex; flex-direction: column; gap: .5rem; }
.beoordeel .foto { max-height: 50vh; object-fit: contain; background: #000; }
.naast { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.naast figure { margin: 0; }
.naast img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.naast figcaption { font-size: .85rem; color: var(--zacht); text-align: center; }

.team-status { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; padding: .5rem 0 .5rem .7rem; border-left: 6px solid var(--team); margin-bottom: .4rem; font-variant-numeric: tabular-nums; }

.tabel { width: 100%; border-collapse: collapse; }
.tabel th, .tabel td { padding: .4rem; text-align: left; border-bottom: 1px solid #ead9c2; }

.kolommen-klein { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.team-plekken { border-top: 6px solid var(--team); padding-top: .5rem; }
.plek { display: flex; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid #ead9c2; }
.plek img { width: 4rem; height: 4rem; object-fit: cover; border-radius: 8px; flex: none; }
.plek-info { flex: 1; min-width: 0; }
.plek-knoppen { display: flex; flex: none; }

.podium { position: relative; cursor: crosshair; touch-action: manipulation; }
.podium .bron { width: 100%; height: auto; display: block; border-radius: 8px; }
.uitsnede { position: absolute; border: 3px solid var(--goud); box-shadow: 0 0 0 9999px rgb(0 0 0 / 45%); border-radius: 4px; pointer-events: none; }
.podium { overflow: hidden; border-radius: 8px; }
.voorbeeld { max-width: 14rem; border-radius: 8px; margin-top: .3rem; }

.volwassene summary { cursor: pointer; font-weight: 700; padding: .4rem 0; }
.antwoorden { padding-left: 1rem; }
.antwoorden li { margin-bottom: .5rem; }
.quizlijst li { display: flex; justify-content: space-between; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid #ead9c2; }
.gevaar-kaart { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }

/* ---------- Tv ---------- */

.pagina-tv { overflow: hidden; }
.pagina-tv .welkom { color: var(--tekst); }
.tv { height: 100vh; padding: 2.5vh 3vw; color: #fff; display: flex; flex-direction: column; font-size: 3.2vh; position: relative; z-index: 1; }
.tv .zacht { color: #ffe9c2; }
.tv-midden { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vh; text-align: center; }
.tv-titel { font-size: 6vh; text-shadow: 0 4px 16px rgb(0 0 0 / 40%); }
.tv-kop { font-size: 3.6vh; font-weight: 800; margin-bottom: 2vh; }
.team-label { background: var(--team); padding: .1em .5em; border-radius: 999px; }

.meedoen { display: flex; gap: 3vw; align-items: center; background: var(--creme); color: var(--tekst); padding: 2.5vh 3vw; border-radius: 24px; text-align: left; }
.meedoen .zacht { color: var(--zacht); }
.qr { width: 24vh; height: 24vh; border-radius: 8px; image-rendering: pixelated; }
.url { font-size: 4vh; font-weight: 800; margin-bottom: 1.5vh; }
.spelcode { font-size: 9vh; font-weight: 900; letter-spacing: .15em; color: var(--rood); line-height: 1; }

.teams { display: flex; gap: 2vw; flex-wrap: wrap; justify-content: center; }
.team-blok { background: var(--team); padding: 1.5vh 2.5vw; border-radius: 18px; font-size: 3vh; min-width: 18vw; box-shadow: 0 4px 16px rgb(0 0 0 / 30%); }
.team-blok .naam { font-weight: 800; font-size: 3.6vh; }

.tv-zoeken { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.banner { background: var(--goud); color: var(--tekst); font-weight: 900; font-size: 4vh; text-align: center; border-radius: 16px; padding: 1vh; margin-bottom: 2vh; }
.kolommen { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2vw; min-height: 0; }
.kolom { background: rgb(0 0 0 / 22%); border-top: 1.2vh solid var(--team); border-radius: 18px; padding: 2vh 1.5vw; display: flex; flex-direction: column; gap: 1vh; min-height: 0; }
.kolom .naam { font-size: 4.2vh; font-weight: 900; }
.kolom .voortgang { font-size: 3.4vh; color: #ffe9c2; font-weight: 700; }
.kolom .status { font-size: 3.4vh; font-weight: 800; font-variant-numeric: tabular-nums; }
.kolom .status.klaar { color: #9ff0bf; }
.kolom .status.opdracht { color: var(--goud-licht); }
.tv-foto { flex: 1; min-height: 0; width: 100%; object-fit: contain; border-radius: 12px; background: rgb(0 0 0 / 30%); }
.tv-foto.leeg { display: flex; align-items: center; justify-content: center; font-size: 10vh; opacity: .4; }

.scorebalk { display: flex; gap: 2vw; justify-content: center; margin-top: 2vh; }
.score { background: var(--team); border-radius: 999px; padding: .8vh 2vw; font-size: 3.6vh; display: flex; gap: 1.5vw; }

.groot-scores { display: flex; flex-direction: column; gap: 1.5vh; width: min(70vw, 60rem); }
.groot-score { display: grid; grid-template-columns: 6vh 1fr auto; grid-template-areas: "plaats naam totaal" "plaats detail totaal"; align-items: center; background: var(--team); border-radius: 20px; padding: 1.5vh 2vw; text-align: left; box-shadow: 0 4px 16px rgb(0 0 0 / 30%); }
.groot-score .plaats { grid-area: plaats; font-size: 5vh; }
.groot-score .naam { grid-area: naam; font-size: 4.2vh; font-weight: 900; }
.groot-score .detail { grid-area: detail; font-size: 3.4vh; }
.groot-score.zonder-plaats { grid-template-columns: 1fr auto; grid-template-areas: "naam totaal"; }
.groot-score .totaal { grid-area: totaal; font-size: 6vh; font-weight: 900; }

.vraag { font-size: 4vh; color: #ffe9c2; }
.tv-vraagje { font-size: 4vh; font-weight: 700; }
.namen { display: flex; gap: 1.2vw; flex-wrap: wrap; justify-content: center; max-width: 90vw; }
.naam-chip { background: var(--creme); color: var(--tekst); font-weight: 800; font-size: 4vh; padding: .6vh 2vw; border-radius: 999px; transition: opacity .3s; }
.naam-chip.juist { background: var(--goud); outline: .5vh solid #fff; }
.naam-chip.uit { opacity: .35; }
.tv-antwoord { font-size: 7vh; font-weight: 900; max-width: 85vw; line-height: 1.15; }
.onthulling { font-size: 5vh; background: var(--goud); color: var(--tekst); padding: 1vh 3vw; border-radius: 999px; animation: plop .4s ease-out; }
@keyframes plop { from { transform: scale(.6); opacity: 0; } }

.tv-terugblik { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.drieluik { flex: 1; display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 1.5vw; min-height: 0; }
.paneel { margin: 0; display: flex; flex-direction: column; gap: 1vh; min-height: 0; animation: plop .5s ease-out; }
.paneel img { flex: 1; min-height: 0; width: 100%; object-fit: contain; border-radius: 14px; background: rgb(0 0 0 / 30%); }
.paneel figcaption { font-size: 3.6vh; font-weight: 700; text-align: center; }
.paneel .leeg { flex: 1; display: flex; align-items: center; justify-content: center; background: rgb(0 0 0 / 25%); border-radius: 14px; font-size: 3vh; }

.tv-stemmen { flex: 1; display: flex; flex-direction: column; min-height: 0; gap: 1vh; }
.tv-raster { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(18vw, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 1.2vw; min-height: 0; }
.stem-paneel { position: relative; margin: 0; border-radius: 14px; overflow: hidden; border: .6vh solid var(--team); min-height: 0; }
.stem-paneel img { width: 100%; height: 100%; object-fit: cover; }
.stem-paneel .nr { font-size: 4vh; }
.stem-paneel { display: flex; flex-direction: column; background: rgb(0 0 0 / 30%); }
.stem-paneel img { flex: 1; min-height: 0; }
.stem-paneel figcaption { font-size: 2.8vh; font-weight: 700; padding: .5vh 1vw; text-align: center; }
.klein-meedoen { display: flex; align-items: center; gap: 1vw; font-size: 3vh; }
.klein-meedoen .qr { width: 13vh; height: 13vh; }

.tv-eind { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2vh; position: relative; min-height: 0; }
.eind-raster { flex: 1; display: flex; gap: 3vw; align-items: center; justify-content: center; min-height: 0; width: 100%; }
.eind-raster .groot-scores { flex: 1; width: auto; max-width: 60rem; }
.beste { display: flex; flex-direction: column; gap: 1vh; max-height: 75vh; width: 28vw; flex: none; }
.beste .paneel { min-height: 0; flex: 1; }
.beste .paneel img { max-height: 30vh; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.confetti i { position: absolute; top: -5vh; width: 1vh; height: 2vh; animation: val linear infinite; }
@keyframes val { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .bijna { animation: none; } }

/* ---------- Ronde 2 ---------- */
.tv-figuur { flex: 1; min-height: 0; margin: 0; display: flex; flex-direction: column; gap: .8vh; }
.tv-figuur figcaption { font-size: 3vh; font-weight: 700; color: #ffe9c2; }
.stapel-tv { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1vh; }
.afgekeurd { background: #fde2e2; color: var(--fout); font-weight: 900; font-size: 3.6vh; padding: 1vh 1vw; border-radius: 12px; }
.tv-opdracht { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2vh; background: var(--creme); color: var(--tekst); border-radius: 16px; padding: 3vh 2vw; }
.plaatsnaam { font-size: 3.6vh; font-weight: 700; color: var(--zacht); }
.opdracht-groot { font-size: 5.2vh; font-weight: 900; line-height: 1.2; }
.beste-kop { font-size: 3.2vh; font-weight: 700; color: #ffe9c2; }
.groot-score .naam, .groot-score .totaal, .groot-score .detail { text-shadow: 0 1px 4px rgb(0 0 0 / 35%); }

/* Leesbare teksten op de rode achtergrond (telefoon). */
.inhoud > .stapel > .link, .inhoud > .stapel > p.zacht, .voet p { color: #ffe9c2; }
.voet p { margin: 0; }
.stemfoto .onderschrift { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .4rem .35rem; font-size: .8rem; font-weight: 700; color: #fff; text-align: left; background: linear-gradient(transparent, rgb(0 0 0 / 80%)); }
.stemfoto .eigen { bottom: auto; top: 2.4rem; }

.toast { display: flex; gap: .8rem; align-items: center; }
.toast-knop { font: inherit; font-weight: 800; background: var(--goud); color: var(--tekst); border: none; border-radius: 999px; padding: .35rem .9rem; cursor: pointer; }
.toast.zichtbaar { pointer-events: auto; }

/* Piet */
.tabel-wrap { overflow-x: auto; }
.tabel { font-size: .9rem; }
.nu-kaart { border: 4px solid var(--rood); }
.volgende { display: flex; flex-direction: column; gap: .3rem; margin-top: .8rem; }
.programma-details summary { cursor: pointer; font-weight: 800; font-size: 1.1rem; }
.recent { display: flex; flex-direction: column; gap: .4rem; }
.recent-rij { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; border-left: 6px solid var(--team); padding-left: .6rem; }
.waarschuwing { background: #fff1c9; border-radius: 12px; padding: .6rem .8rem; font-weight: 600; }
.inhoud.breed { overflow-x: hidden; }

/* ---------- Ronde 3 ---------- */
.stapel-klein { display: flex; flex-direction: column; gap: .4rem; }
.finale-tip { background: var(--goud); color: var(--tekst); font-weight: 800; text-align: center; border-radius: 12px; padding: .5rem .8rem; }
.wachtbalk { border: 3px solid var(--goud); display: flex; flex-direction: column; gap: .5rem; }
body.donker { background: #0d0b14; }
body.donker .kaart { background: #1d1a26; color: #f3ead8; }
body.donker .zacht, body.donker .opdracht .label { color: #b9ad9a; }
body.donker .klok.groot { color: var(--goud); }
body.donker .foto-kader { box-shadow: none; }
.overlay { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / 85%); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.overlay-inhoud { background: var(--creme); border-radius: var(--radius); padding: 1rem; max-width: 30rem; width: 100%; display: flex; flex-direction: column; gap: .6rem; max-height: 100%; overflow: auto; }
.overlay-inhoud img { max-height: 55vh; object-fit: contain; border-radius: 10px; background: #000; width: 100%; }
.verzoek { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; border-left: 6px solid var(--team); padding-left: .6rem; }
.kolom .telefoons { font-size: 2.8vh; color: #ffe9c2; }
.telefoons-lijst summary { cursor: pointer; padding: .3rem 0; }
.telefoon { display: inline-flex; align-items: center; gap: .3rem; background: #fff; border-radius: 999px; padding: .15rem .3rem .15rem .6rem; }
.telefoon select { padding: .2rem .4rem; border-radius: 999px; font-size: .85rem; }
.beste { position: relative; z-index: 1; background: rgb(0 0 0 / 25%); border-radius: 16px; padding: 1vh 1vw; }
.beste-kop { font-size: 3.6vh; }
.beste .paneel figcaption { font-size: 3.4vh; }
.tv-eind .confetti { right: 34vw; }
.voet .link.klein { font-size: .85rem; }
.eind-uitleg { font-size: 3.4vh; font-weight: 700; color: #ffe9c2; }
.groot-score { column-gap: 2vw; }
.tv-titel { position: relative; z-index: 1; }
.tv-eind .confetti { right: 36vw; top: 12vh; }
.stemfoto .onderschrift { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-top: .8rem; }
.pagina-piet .toast { bottom: auto; top: 4rem; transform: translate(-50%, -300%); }
.pagina-piet .toast.zichtbaar { transform: translate(-50%, 0); }

/* ---------- Camera met zelfontspanner ---------- */
.camera { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; overflow: hidden; }
.cam-video, .cam-voorbeeld { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-voorbeeld { object-fit: contain; background: #000; }
.cam-video.gespiegeld { transform: scaleX(-1); }
.cam-boven, .cam-onder { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: 1rem; }
.cam-boven { top: 0; padding-top: max(1rem, env(safe-area-inset-top)); background: linear-gradient(rgb(0 0 0 / 55%), transparent); }
.cam-onder { bottom: 0; padding-bottom: max(1.4rem, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgb(0 0 0 / 65%)); }
.cam-titel { flex: 1; text-align: center; font-weight: 800; text-shadow: 0 1px 4px #000; }
.cam-rond { width: 2.8rem; height: 2.8rem; border-radius: 50%; border: none; background: rgb(0 0 0 / 45%); color: #fff; font-size: 1.3rem; cursor: pointer; }
.cam-sluiter { width: 4.6rem; height: 4.6rem; border-radius: 50%; border: .35rem solid #fff; background: rgb(255 255 255 / 35%); cursor: pointer; flex: none; }
.cam-sluiter:active { background: #fff; }
.cam-timer, .cam-stop { font: inherit; font-weight: 800; border: none; border-radius: 999px; padding: .75rem 1rem; min-width: 6.5rem; cursor: pointer; }
.cam-timer { background: var(--goud); color: var(--tekst); }
.cam-stop { background: rgb(255 255 255 / 20%); color: #fff; visibility: hidden; }
.camera.aftellen .cam-stop { visibility: visible; }
.camera.aftellen .cam-timer, .camera.aftellen .cam-sluiter { visibility: hidden; }
.cam-aftellen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11rem; font-weight: 900; text-shadow: 0 4px 24px rgb(0 0 0 / 70%); pointer-events: none; }
.camera .controleren { display: none; justify-content: center; }
.camera.bekijken .controleren { display: flex; }
.camera.bekijken .opnemen, .camera.bekijken .cam-boven .cam-rond:last-child { display: none; }
.camera .controleren .knop { flex: 1; max-width: 12rem; }

/* ---------- Thema's ---------- */
body[data-thema="kerst"] {
  --rood: #14532d;
  --rood-donker: #0b3a1f;
  --goud: #e0b13b;
  --goud-licht: #f3d27a;
  background: radial-gradient(circle at 20% 0%, #23793f, #14532d 45%, #0b3a1f);
  background-attachment: fixed;
}
body[data-thema="pasen"] {
  --rood: #5b3a8c;
  --rood-donker: #3d2563;
  --goud: #ffd23f;
  --goud-licht: #ffe58a;
  background: radial-gradient(circle at 20% 0%, #8a63c9, #5b3a8c 45%, #3d2563);
  background-attachment: fixed;
}
body[data-thema="kerst"].donker, body[data-thema="pasen"].donker { background: #0d0b14; }

/* ---------- Vloeiend uitzoomen ---------- */
.glide-kader { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.glide-img { position: absolute; max-width: none; display: block; will-change: left, top, width, height; }
.voorbeeld-kader { max-width: 26rem; width: 100%; margin: 0 auto; border-radius: 12px; }

/* ---------- Stemmen met 3-2-1 ---------- */
.stemuitleg p { margin: 0 0 .4rem; }
.stemfoto .medaille { position: absolute; top: .2rem; right: .35rem; font-size: 2rem; filter: drop-shadow(0 1px 3px #000); }
.medaille-knoppen { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.medaille-knoppen .knop { padding: .7rem .3rem; font-size: .95rem; }
.gekozen-knop { outline: 3px solid var(--rood); }
.tv-stemuitleg { font-size: 2.8vh; color: #ffe9c2; margin: -1vh 0 1vh; }

/* Stemmen door de spelleider */
.stem-lijst { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .8rem; }
.stem-kaart { display: flex; flex-direction: column; gap: .5rem; border-top: 6px solid var(--team); padding: .8rem; }
.stem-kaart img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #000; }
.stem-kaart.gekozen { outline: 3px solid var(--goud); }
.stem-info { display: flex; flex-direction: column; gap: .3rem; }
.stemtabel td, .stemtabel th { vertical-align: middle; white-space: nowrap; }
.stemtabel img.mini { width: 2.6rem; height: 2rem; object-fit: cover; border-radius: 4px; vertical-align: middle; }
.stemtabel tr.koploper { background: #fff1c9; }
.teamstip { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--team); margin-right: .35rem; vertical-align: middle; }
.stemtabel .foto-cel { display: flex; align-items: center; gap: .5rem; white-space: normal; }
.stemtabel .punten-cel { font-size: 1.2rem; text-align: center; }
.stemtabel .medaille-cel { white-space: normal; }

/* ---------- Aftellen voor de start ---------- */
.aftel-kaart { display: flex; flex-direction: column; gap: .4rem; align-items: center; }
.aftel-kaart .stap { color: var(--tekst); }
.aftel-cijfer { font-size: 7rem; font-weight: 900; color: var(--rood); line-height: 1; min-height: 7rem; }
.tv-aftel { font-size: 32vh; font-weight: 900; line-height: 1; color: var(--goud); text-shadow: 0 1vh 4vh rgb(0 0 0 / 50%); }
.tel { animation: tel .9s ease-out; }
@keyframes tel { from { transform: scale(1.6); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .tel { animation: none; } }
