@font-face {
  font-family: 'Bricolage';
  src: url('fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --grond: #15110e;
  --vlak: #211a14;
  --vlak-hoog: #2e241c;
  --rand: #3f3226;
  --tekst: #fbf3e6;
  --gedempt: #b9a68f;
  --amber: #f6b73c;
  --amber-diep: #b27608;
  --goed: #8be37a;
  --goed-diep: #3d8f2f;
  --fout: #ff6b6b;
  --fout-diep: #a62c2c;
  --kaart: #ff4fa3;
  --kaart-diep: #9c1c5e;
  --radius: 18px;
  --schaduw: 0 4px 0 rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { color-scheme: dark; background: var(--grond); }
body {
  margin: 0;
  background: radial-gradient(120% 70% at 50% -10%, #3a2612 0%, var(--grond) 60%);
  color: var(--tekst);
  font-family: 'Bricolage', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overscroll-behavior: none;
}

main {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
}

header#kop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gedempt);
  font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: 14px;
}
header#kop[hidden] { display: none; }

section { flex: 1; display: flex; flex-direction: column; gap: 14px; }
section[hidden] { display: none; }
.acties { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 14px; }

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -.02em; }
h2 { font-size: 1.75rem; font-weight: 800; }
h3 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--gedempt); margin-top: 10px; }
p { margin: 0; }
.hint { color: var(--gedempt); }
.verborgen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Knoppen */
button { font: inherit; color: inherit; }
.knop {
  min-height: 56px;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 1.125rem;
  font-weight: 700;
  background: var(--vlak-hoog);
  color: var(--tekst);
  box-shadow: var(--schaduw);
  cursor: pointer;
  text-align: center;
  transition: transform .06s ease, box-shadow .06s ease;
  -webkit-tap-highlight-color: transparent;
}
.knop:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .55); }
.knop:disabled { opacity: .4; cursor: default; }
.knop.primair { background: var(--amber); color: #1a1206; box-shadow: 0 4px 0 var(--amber-diep); }
.knop.stil { background: transparent; box-shadow: none; border: 2px solid var(--rand); font-weight: 600; }
.knop.gevaar { background: var(--fout-diep); box-shadow: 0 4px 0 #5e1414; }
.knop small { display: block; font-size: .8rem; font-weight: 500; color: var(--gedempt); margin-top: 2px; }
.knop.primair small { color: #4a3610; }
.knop-klein { background: var(--vlak-hoog); border: 0; border-radius: 12px; min-width: 44px; min-height: 40px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
.opties-lijst { display: flex; flex-direction: column; gap: 10px; }
.opties-lijst:empty { display: none; }
.knop.optie { text-align: left; background: var(--vlak-hoog); font-weight: 600; }

/* Start */
.held { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; text-align: center; padding: 20px 0; }
.held.klein { flex: 0 0 auto; padding: 10px 0 0; gap: 10px; }
.bovenregel { color: var(--gedempt); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; }
.woordmerk {
  font-size: clamp(5.5rem, 30vw, 8rem);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: .9;
  color: var(--amber);
  text-shadow: 0 6px 0 var(--amber-diep), 0 14px 40px rgba(246, 183, 60, .25);
}
.onderregel { font-size: 1.35rem; font-weight: 600; margin-top: 18px; line-height: 1.25; }
.voetnoot { color: var(--gedempt); font-size: .85rem; text-align: center; }

/* Spelers */
.namen { display: flex; flex-direction: column; gap: 8px; }
.naam-rij { display: flex; gap: 8px; }
.naam-rij input {
  flex: 1; min-height: 52px; border-radius: 14px; border: 2px solid var(--rand); background: var(--vlak);
  color: var(--tekst); font: inherit; font-weight: 600; font-size: 1.1rem; padding: 0 16px;
}
.naam-rij input:focus { outline: none; border-color: var(--amber); }
.naam-rij button { width: 52px; border-radius: 14px; border: 2px solid var(--rand); background: transparent; color: var(--gedempt); font-size: 1.4rem; cursor: pointer; }
.segment { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: var(--vlak); padding: 6px; border-radius: 16px; }
.segment button { min-height: 46px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; font-size: 1.1rem; cursor: pointer; color: var(--gedempt); }
.segment button[aria-pressed="true"] { background: var(--amber); color: #1a1206; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--rand); font-weight: 600; font-size: .95rem; cursor: pointer; user-select: none; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip:has(input:checked) { background: var(--amber); border-color: var(--amber); color: #1a1206; }
.opties { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.schakel { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; cursor: pointer; }
.schakel input { width: 24px; height: 24px; accent-color: var(--amber); }
.fout-melding { color: var(--fout); font-weight: 600; min-height: 1.4em; }

/* Overdracht */
.naam-groot { font-size: clamp(3rem, 16vw, 4.5rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; overflow-wrap: anywhere; }

/* Vraag */
.vraag-kop { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chip-cat { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--gedempt); }
.inzet { font-size: .9rem; font-weight: 800; color: #1a1206; background: var(--amber); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.timer { height: 8px; border-radius: 999px; background: var(--vlak-hoog); overflow: hidden; }
.timer[hidden] { display: none; }
.timer-balk { height: 100%; width: 100%; background: var(--amber); transform-origin: left; transition: transform .1s linear, background .3s; }
.timer-balk.haast { background: var(--fout); }
.vraag-tekst { font-size: clamp(1.45rem, 6vw, 1.95rem); font-weight: 700; line-height: 1.2; text-wrap: balance; margin: 10px 0 6px; flex: 1; display: flex; align-items: center; }
.schatting { display: flex; flex-direction: column; gap: 12px; }
.schatting[hidden] { display: none; }
.schatting-rij { display: flex; align-items: center; gap: 12px; }
.schatting-rij input {
  flex: 1; min-height: 64px; border-radius: 16px; border: 2px solid var(--rand); background: var(--vlak);
  color: var(--tekst); font: inherit; font-weight: 800; font-size: 2rem; padding: 0 18px; text-align: right; min-width: 0;
}
.schatting-rij input:focus { outline: none; border-color: var(--amber); }
.eenheid { font-weight: 600; color: var(--gedempt); font-size: 1.1rem; }

/* Uitslag */
.uitslag-kop { font-size: clamp(3rem, 18vw, 4.5rem); font-weight: 800; letter-spacing: -.04em; }
#scherm-uitslag.goed .uitslag-kop { color: var(--goed); text-shadow: 0 5px 0 var(--goed-diep); }
#scherm-uitslag.fout .uitslag-kop { color: var(--fout); text-shadow: 0 5px 0 var(--fout-diep); }
.uitslag-tekst { font-size: 1.2rem; font-weight: 600; }
.uitleg { color: var(--gedempt); font-style: italic; }
.slokken-vak {
  margin-top: 6px; padding: 18px 20px; border-radius: var(--radius); background: var(--vlak-hoog);
  font-size: 1.45rem; font-weight: 800; text-align: center; letter-spacing: -.01em;
}
#scherm-uitslag.goed .slokken-vak { background: var(--goed); color: #0c2208; box-shadow: 0 4px 0 var(--goed-diep); }
#scherm-uitslag.fout .slokken-vak { background: var(--fout); color: #2a0808; box-shadow: 0 4px 0 var(--fout-diep); }
.kies-kop { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--gedempt); }
.kies-kop[hidden] { display: none; }

/* Kaart */
.kaart {
  flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; text-align: center;
  padding: 28px 22px; border-radius: 26px;
  background: linear-gradient(160deg, var(--kaart) 0%, #c22a7a 55%, var(--kaart-diep) 100%);
  color: #fff; box-shadow: 0 8px 0 #5a0f36, 0 20px 50px rgba(255, 79, 163, .25);
}
.kaart .bovenregel { color: #ffd1e6; }
.kaart-titel { font-size: clamp(2.4rem, 12vw, 3.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.kaart-tekst { font-size: 1.2rem; font-weight: 600; line-height: 1.3; }

/* Podium en stand */
.titels { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.titels li { padding: 14px 16px; background: var(--vlak-hoog); border-radius: 14px; font-weight: 600; }
.titels li b { font-weight: 800; color: var(--amber); }
.tabel-vak { overflow-x: auto; }
.stand { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.stand th, .stand td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--rand); }
.stand th:first-child, .stand td:first-child { text-align: left; font-weight: 700; }
.stand th { color: var(--gedempt); font-size: .9rem; font-weight: 600; }

/* Dialogen */
.dialoog {
  width: min(92vw, 420px); border: 0; border-radius: 22px; background: var(--vlak); color: var(--tekst);
  padding: 22px; display: flex; flex-direction: column; gap: 12px;
}
.dialoog:not([open]) { display: none; }
.dialoog::backdrop { background: rgba(0, 0, 0, .65); }

/* Op het spelersscherm scrolt de lijst; de Start-knop blijft onderaan in beeld. */
#scherm-spelers .acties {
  position: sticky; bottom: 0; margin-top: 18px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--grond) 35%);
}

/* Niveau, streak, koploper */
.vraag-rechts { display: flex; align-items: center; gap: 10px; }
.niveau { display: inline-flex; gap: 4px; }
.niveau i { width: 9px; height: 9px; border-radius: 50%; background: var(--rand); }
.niveau i.vol { background: var(--amber); }
.badge-streak { align-self: center; padding: 8px 14px; border-radius: 999px; background: #3a1d08; color: var(--amber); font-weight: 700; margin-top: 12px; }
.badge-streak[hidden], .koploper[hidden] { display: none; }
.koploper { color: var(--gedempt); font-weight: 600; margin-top: 10px; }

/* Galerij */
.galerij-beeld { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 200px; border-radius: 22px; background: var(--vlak); overflow: hidden; }
.galerij-beeld img { max-width: 100%; max-height: 46vh; object-fit: contain; display: block; }
.galerij-beeld img[hidden] { display: none; }
.galerij-emoji { font-size: clamp(3.2rem, 18vw, 5rem); line-height: 1.2; text-align: center; padding: 20px; letter-spacing: .08em; }
.galerij-emoji[hidden] { display: none; }
.galerij-antwoord { font-size: 1.4rem; font-weight: 800; text-align: center; color: var(--amber); min-height: 1.6em; }
.galerij-antwoord[hidden] { display: none; }
.twee { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.twee[hidden] { display: none; }
.knop.goed-knop { background: var(--goed); color: #0c2208; box-shadow: 0 4px 0 var(--goed-diep); }
.knop.fout-knop { background: var(--fout); color: #2a0808; box-shadow: 0 4px 0 var(--fout-diep); }

/* Eén tegen allen */
.allen-uitleg { padding: 14px 16px; border-radius: 16px; background: #2a1a3a; color: #e9d5ff; font-weight: 600; line-height: 1.3; }
.vraag-tekst.klein { font-size: clamp(1.2rem, 5vw, 1.5rem); flex: 0 0 auto; margin: 4px 0; }
.allen-lijst { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.allen-lijst li { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 12px 16px; border-radius: var(--radius); background: var(--vlak-hoog); font-weight: 600; font-size: 1.1rem; }
.allen-lijst li b { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--amber); color: #1a1206; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.allen-lijst li.kiesbaar { cursor: pointer; box-shadow: var(--schaduw); }
.allen-lijst li.kiesbaar:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .55); }
.multi { gap: 8px; }
.multi:empty { display: none; }
.multi .chip[aria-pressed="true"] { background: var(--fout); border-color: var(--fout); color: #2a0808; }

/* Aantik-chips op de uitslag van één tegen allen: zelfde maat als een knop, rood als ze aan staan */
.multi .chip { min-height: 48px; padding: 8px 18px; font-size: 1.05rem; background: var(--vlak-hoog); border-color: var(--rand); box-shadow: var(--schaduw); }
.multi .chip[aria-pressed="true"] { box-shadow: 0 4px 0 var(--fout-diep); }
