@font-face { font-family: Outfit; src: url(/fonts/outfit-var.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #100d0a;
  --vlak: #1a1510;
  --vlak2: #221c15;
  --rand: #33291e;
  --rand2: #4a3c2b;
  --goud: #d4a24c;
  --goud-hover: #e0b261;
  --goud-tekst: #e6c07c;
  --tekst: #f2eadb;
  --zacht: #c3b49b;
  --stil: #968670;
  --rood: #d9625a;
  --rood-vlak: #2a1513;
  --rood-rand: #5c2622;
  --groen: #7dbb8c;
  --groen-vlak: #142319;
  --groen-rand: #2c4d35;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r-klein: 8px; --r: 12px; --r-groot: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { min-height: 100dvh; font-family: Outfit, system-ui, -apple-system, sans-serif; color: var(--tekst); background: var(--bg); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, textarea, summary { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 2px solid var(--goud); outline-offset: 2px; }
strong, b { font-weight: 600; color: var(--tekst); }

.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }

/* kopbalk */
.kop { position: sticky; top: 0; z-index: 20; padding: calc(var(--s2) + env(safe-area-inset-top)) var(--s5) 0; background: var(--bg); }
.kop-rij { display: flex; align-items: center; gap: var(--s3); height: 44px; }
.kop-logo { width: 22px; height: 26px; flex: none; }
.kop-titel { flex: 1; font-size: 15px; color: var(--zacht); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kop-titel b { color: var(--tekst); }
.schat { display: flex; align-items: center; gap: 6px; font-weight: 650; font-size: 17px; color: var(--goud-tekst); font-variant-numeric: tabular-nums; }
.schat svg { width: 20px; height: 20px; }
.schat.tik { animation: tik .5s ease; }
@keyframes tik { 40% { transform: scale(1.2); } }
.voortgang { height: 2px; background: var(--rand); margin-top: var(--s1); }
.voortgang i { display: block; height: 100%; background: var(--goud); transition: width .5s ease; }

/* inhoud */
main { flex: 1; padding: var(--s5) var(--s5) var(--s6); }
.scherm { display: flex; flex-direction: column; gap: var(--s5); animation: in .2s ease both; }
.scherm.stil { animation: none; }
@keyframes in { from { opacity: 0; } }

.titel { display: flex; flex-direction: column; gap: var(--s2); }
h1 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 20px; line-height: 1.3; font-weight: 650; }
.sub { color: var(--zacht); font-size: 17px; }
.tekst { color: var(--zacht); }
.klein { font-size: 15px; color: var(--stil); }
.vraag { font-size: 21px; line-height: 1.35; font-weight: 600; }
.tussenkop { font-size: 17px; font-weight: 600; color: var(--zacht); margin-bottom: calc(var(--s3) * -1); }

/* genummerde stappen */
.stappen { list-style: none; counter-reset: stap; display: flex; flex-direction: column; gap: var(--s4); }
.stappen li { counter-increment: stap; display: grid; grid-template-columns: 32px 1fr; gap: var(--s3); align-items: start; line-height: 1.45; }
.stappen li::before { content: counter(stap); width: 32px; height: 32px; margin-top: -3px; border-radius: 50%; border: 1.5px solid var(--goud); color: var(--goud-tekst); display: grid; place-items: center; font-weight: 650; font-size: 16px; }

.goudregel, .tip { display: flex; gap: var(--s3); align-items: flex-start; }
.goudregel svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.goudregel span { color: var(--goud-tekst); font-weight: 550; }
.tip svg { width: 20px; height: 20px; flex: none; color: var(--stil); margin-top: 2px; }
.tip span { color: var(--stil); font-size: 15px; }

.uitleg-dicht { border-top: 1px solid var(--rand); border-bottom: 1px solid var(--rand); padding: var(--s3) 0; }
.uitleg-dicht summary { color: var(--zacht); font-size: 15px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.uitleg-dicht summary::after { content: '+'; color: var(--goud); font-size: 20px; line-height: 1; }
.uitleg-dicht[open] summary::after { content: '\2212'; }
.uitleg-dicht summary::-webkit-details-marker { display: none; }
.uitleg-dicht[open] .stappen { margin-top: var(--s4); }
.uitleg-dicht[open] .goudregel { margin-top: var(--s4); }

/* voet */
.voet { position: sticky; bottom: 0; z-index: 20; padding: var(--s4) var(--s5) calc(var(--s4) + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--rand); display: flex; flex-direction: column; gap: var(--s3); }
.voet:empty { display: none; }
.wacht { font-size: 15px; color: var(--zacht); text-align: center; }
.knop {
  display: flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 52px; padding: var(--s3) var(--s5); border-radius: var(--r);
  background: var(--goud); color: #1a1206; font-weight: 650; font-size: 17px; text-align: center; text-decoration: none;
  transition: background .15s;
}
.knop:hover { background: var(--goud-hover); }
.knop:active { transform: translateY(1px); }
.knop[disabled] { background: var(--vlak2); color: var(--stil); cursor: default; transform: none; }
.knop.stil { background: transparent; color: var(--tekst); border: 1px solid var(--rand2); }
.knop.stil:hover { background: var(--vlak); }
.knop-rij { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.link { color: var(--zacht); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; padding: var(--s2); align-self: center; }
.klein-link { font-size: 14px; padding: 0 0 0 var(--s2); color: var(--stil); }

/* keuzes */
.opties { display: flex; flex-direction: column; gap: var(--s2); }
.optie {
  display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left;
  min-height: 56px; padding: var(--s2) var(--s4); border-radius: var(--r);
  background: var(--vlak); border: 1px solid var(--rand); font-size: 17px; font-weight: 550;
  transition: border-color .15s, background .15s;
}
.optie:hover { border-color: var(--rand2); }
.optie .bol { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--rand2); flex: none; display: grid; place-items: center; }
.optie .rechts { margin-left: auto; display: flex; }
.optie[aria-pressed='true'] { border-color: var(--goud); background: var(--vlak2); }
.optie[aria-pressed='true'] .bol { border-color: var(--goud); background: var(--goud); }
.optie[aria-pressed='true'] .bol::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #1a1206; }
.optie[disabled] { cursor: default; }
.optie[disabled]:not([aria-pressed='true']) { opacity: .45; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 650; font-size: 15px; color: #1a1206; }

.keuze2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.keuze2 .optie { justify-content: center; text-align: center; min-height: 120px; font-size: 21px; font-weight: 650; padding: var(--s4); }

/* spelers in lobby */
.spelers { display: flex; flex-direction: column; gap: var(--s2); }
.speler { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s4); border-radius: var(--r); background: var(--vlak); border: 1px solid var(--rand); }
.speler .naam { font-weight: 550; flex: 1; }
.speler .status { font-size: 14px; color: var(--stil); display: flex; align-items: center; gap: 6px; }
.speler.ik { border-color: var(--rand2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rand2); flex: none; display: inline-block; }
.dot.aan { background: var(--groen); }

/* houd ingedrukt */
.houd {
  border-radius: var(--r-groot); min-height: 150px; padding: var(--s5);
  border: 1px dashed var(--rand2); background: var(--vlak);
  display: grid; place-items: center; text-align: center;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; cursor: pointer;
}
.houd .dicht { display: flex; flex-direction: column; align-items: center; gap: var(--s1); color: var(--zacht); }
.houd .dicht svg { width: 28px; height: 28px; color: var(--goud); margin-bottom: var(--s2); }
.houd .open { display: none; flex-direction: column; align-items: center; gap: var(--s3); }
.houd.ingedrukt { border-style: solid; border-color: var(--goud); background: var(--vlak2); }
.houd.ingedrukt .dicht { display: none; }
.houd.ingedrukt .open { display: flex; }
.houd.verrader.ingedrukt { border-color: var(--rood-rand); background: var(--rood-vlak); }
.houd.getrouwe.ingedrukt { border-color: var(--groen-rand); background: var(--groen-vlak); }
.houd.verrader .rol-icoon { color: var(--rood); }
.houd.getrouwe .rol-icoon { color: var(--groen); }
.rol-icoon svg { width: 52px; height: 52px; }
.houd .open h2 { font-size: 24px; }
.woord { font-size: 28px; font-weight: 700; color: var(--goud-tekst); line-height: 1.2; }

/* geheime vraag */
.dek { border-radius: var(--r-groot); border: 1px solid var(--rand); background: var(--vlak); padding: var(--s5); display: flex; flex-direction: column; align-items: center; gap: var(--s4); text-align: center; }
.dek-icoon svg { width: 30px; height: 30px; color: var(--goud); }
.dek .knop { align-self: stretch; }

/* timer */
.timer { display: grid; place-items: center; position: relative; width: 180px; height: 180px; margin: 0 auto; }
.timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 4; }
.timer .baan { stroke: var(--rand); }
.timer .rest { stroke: var(--goud); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.timer.bijna .rest { stroke: var(--rood); }
.timer .cijfers { font-size: 44px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* uitkomsten */
.lijst { display: flex; flex-direction: column; }
.uit { display: grid; grid-template-columns: 22px 1fr; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--rand); font-size: 15px; }
.uit:last-child { border-bottom: 1px solid var(--rand); }
.uit .icoon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.uit .icoon svg { width: 13px; height: 13px; }
.uit .icoon.ja { background: var(--groen-vlak); color: var(--groen); }
.uit .icoon.nee { background: var(--rood-vlak); color: var(--rood); }
.uit-tekst { display: flex; flex-direction: column; gap: 2px; }
.uit-tekst span { color: var(--zacht); }
.uit-tekst .klein { color: var(--stil); }

.citaat { font-size: 26px; line-height: 1.3; font-weight: 650; text-align: center; padding: var(--s6) var(--s4); border-radius: var(--r-groot); background: var(--vlak); border: 1px solid var(--rand); }

.invoer { width: 100%; min-height: 52px; padding: var(--s3) var(--s4); border-radius: var(--r-klein); border: 1px solid var(--rand2); background: var(--vlak); font-size: 19px; outline: none; }
.invoer:focus { border-color: var(--goud); }
.invoer-rij { display: flex; align-items: center; gap: var(--s3); }
.invoer-rij .eenheid { color: var(--zacht); }

.balken { display: flex; flex-direction: column; gap: var(--s3); }
.balk { display: grid; grid-template-columns: minmax(70px, 30%) 1fr 24px; align-items: center; gap: var(--s3); }
.balk .naam { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balk .baan { height: 8px; border-radius: 4px; background: var(--rand); overflow: hidden; }
.balk .baan i { display: block; height: 100%; border-radius: 4px; background: var(--rand2); transform-origin: left; animation: groei .6s ease both; }
.balk.top .baan i { background: var(--goud); }
.balk b { text-align: right; font-variant-numeric: tabular-nums; }
@keyframes groei { from { transform: scaleX(0); } }

/* uitslag opdracht */
.uitslag { display: flex; flex-direction: column; gap: var(--s2); padding-bottom: var(--s5); border-bottom: 1px solid var(--rand); }
.bedrag { display: flex; align-items: center; gap: var(--s3); font-size: 30px; font-weight: 700; color: var(--goud-tekst); }
.bedrag svg { width: 30px; height: 30px; }
.bedrag.nul { color: var(--stil); }

/* aanwijzingen */
.aanwijzing { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); border-radius: var(--r-groot); border: 1px solid var(--rand2); background: var(--vlak); }
.aanwijzing.trouw { border-color: var(--groen-rand); background: var(--groen-vlak); }
.aanwijzing.gerucht { border-color: var(--rood-rand); background: var(--rood-vlak); }
.aanwijzing .sub { font-size: 14px; }
.drie { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-top: var(--s1); }
.drie span { padding: var(--s3) var(--s1); text-align: center; border-radius: var(--r-klein); background: var(--vlak2); font-weight: 600; overflow-wrap: anywhere; }

.melding { padding: var(--s4); border-radius: var(--r); background: var(--vlak2); border: 1px solid var(--rand2); color: var(--tekst); }

/* onthulling */
.onthul { display: flex; flex-direction: column; gap: var(--s5); }
.onthul .stap { opacity: 0; animation: verschijn .5s ease forwards; display: flex; flex-direction: column; gap: var(--s3); }
@keyframes verschijn { to { opacity: 1; } }
.onthul .zeg { font-size: 19px; color: var(--zacht); text-align: center; }
.onthul .groot { font-size: 40px; font-weight: 750; text-align: center; letter-spacing: -.02em; line-height: 1.05; }
.onthul .groot.rood { color: var(--rood); }
.onthul .groot.groen { color: var(--groen); }
.einde { padding: var(--s5); border-radius: var(--r-groot); display: flex; flex-direction: column; gap: var(--s2); text-align: center; }
.einde h2 { font-size: 26px; }
.einde.trouw { background: var(--groen-vlak); border: 1px solid var(--groen-rand); }
.einde.verrader { background: var(--rood-vlak); border: 1px solid var(--rood-rand); }
.slot { text-align: center; margin-top: var(--s4); }

/* meldingen */
.verbinding { position: fixed; left: 50%; top: calc(var(--s3) + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 50; padding: var(--s2) var(--s4); border-radius: var(--r-klein); background: var(--rood-vlak); border: 1px solid var(--rood-rand); color: #f1c6c1; font-size: 14px; display: none; align-items: center; gap: var(--s2); }
.verbinding.aan { display: flex; }
.toast { position: fixed; left: var(--s4); right: var(--s4); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60; margin: 0 auto; max-width: 440px; padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--rood-vlak); border: 1px solid var(--rood-rand); color: #f6d9d5; font-size: 15px; }

.venster { position: fixed; inset: 0; z-index: 70; background: rgba(5, 4, 3, .75); display: flex; align-items: flex-end; justify-content: center; padding: var(--s4); }
.venster .paneel { width: 100%; max-width: 448px; background: var(--vlak); border: 1px solid var(--rand2); border-radius: var(--r-groot); padding: var(--s5) var(--s5) calc(var(--s5) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--s3); }
.venster .paneel h2 { margin-bottom: var(--s1); }
.venster .paneel .tekst { margin-bottom: var(--s2); }

.midden { min-height: 70dvh; display: flex; flex-direction: column; justify-content: center; gap: var(--s5); }
.logo-groot { width: 132px; margin: var(--s2) auto 0; display: block; }
.code-invoer { text-align: center; letter-spacing: .3em; font-size: 24px; text-transform: lowercase; }
.fout { color: var(--rood); font-size: 15px; min-height: 22px; text-align: center; }

/* beheer */
.kaart { background: var(--vlak); border: 1px solid var(--rand); border-radius: var(--r-groot); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .onthul .stap { opacity: 1; }
}
.stappen-form { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s4); }
@media (max-height: 520px) {
  .kop, .voet { position: static; }
  .voet { border-top: 0; }
  .timer { width: 140px; height: 140px; }
  .timer .cijfers { font-size: 34px; }
}
@media (min-width: 700px) and (min-height: 700px) {
  body { font-size: 19px; }
  .app { max-width: 600px; }
  h1 { font-size: 34px; }
  .vraag { font-size: 24px; }
  .sub { font-size: 19px; }
  .klein, .tip span, .wacht, .uitleg-dicht summary, .uit { font-size: 16px; }
  .optie, .knop { font-size: 19px; min-height: 60px; }
  .keuze2 .optie { min-height: 150px; font-size: 24px; }
  .timer { width: 220px; height: 220px; }
  .timer .cijfers { font-size: 52px; }
}
