/* Socrates — indeling van de app-schil en de schermen (stap 2). Componenten staan in components.css. */

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; }

.scherm {
  display: flex; flex-direction: column; gap: 18px;
  padding: calc(var(--veilig-boven) + 14px) 18px calc(var(--veilig-onder) + 40px);
  min-height: 100dvh;
}
body.met-onderbalk .scherm { padding-bottom: calc(var(--veilig-onder) + 118px); }

/* Overgangen tussen schermen */
.in-vooruit { animation: in-vooruit 240ms cubic-bezier(.2, .8, .3, 1); }
.in-terug { animation: in-terug 240ms cubic-bezier(.2, .8, .3, 1); }
.in-tab { animation: in-tab 200ms ease-out; }
@keyframes in-vooruit { from { opacity: 0; transform: translateX(32px); } }
@keyframes in-terug { from { opacity: 0; transform: translateX(-32px); } }
@keyframes in-tab { from { opacity: 0; transform: translateY(8px); } }

/* Onderbalk */
.onderbalk {
  position: fixed; z-index: 20; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  padding: 0 18px calc(var(--veilig-onder) + 14px);
  pointer-events: none;
}
.onderbalk[hidden] { display: none; }
.onderbalk .tabbalk { pointer-events: auto; }
.tabbalk a { position: relative; }
.tabbalk .teller { position: absolute; top: 3px; left: calc(50% + 6px); font-size: 11px; min-width: 19px; height: 19px; padding: 0 5px; }
.tabbalk .teller[hidden] { display: none; }

/* Algemene stukjes */
.pagina-kop { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 18px; }
.pagina-kop .knop { margin-bottom: 4px; }
.sectie { display: flex; flex-direction: column; gap: 12px; }
.sectie-kop { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sectie-kop a { text-decoration: none; font-weight: 600; }
.klein-kop { font-family: var(--font-tekst); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tekst-stil); }
.klein-getal { font-family: var(--font-tekst); font-size: var(--tekst-m); font-weight: 600; }
.knoppen-stapel { display: flex; flex-direction: column; gap: 6px; }
.knoppen-rij { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.knoppen-rij--midden { justify-content: center; }
.kaart { text-decoration: none; }
.vul { flex: 1; min-width: 0; }
a.kaart { display: block; transition: transform var(--snel) ease-out, box-shadow var(--snel) ease-out; }
a.kaart:active { transform: translateY(var(--d)); box-shadow: 0 0 0 var(--rand); }
.label { background: var(--inkt, var(--bg)); color: var(--vlak, var(--tekst)); text-decoration: none; }
.feed-icoon {
  width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center;
  background: var(--vlak); color: var(--inkt); box-shadow: 0 3px 0 var(--rand);
}
.feed-icoon svg { width: 40px; height: 34px; }
.persoon-rij { display: flex; align-items: center; gap: var(--ruimte-3); flex: 1; min-width: 0; color: inherit; text-decoration: none; min-height: 64px; }
.persoon-rij-houder { gap: 8px; }
.persoon-rij-houder .knop { margin-bottom: 4px; }
.rij.persoon-rij { flex: none; }

/* ---------- Home ---------- */
.home-kop { display: flex; align-items: center; justify-content: space-between; }
.home-ik { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.home-groet { display: flex; flex-direction: column; }
.home-kop .munten { text-decoration: none; }
.home-held { position: relative; padding: 4px 0 2px; }
.home-sticker { position: absolute; right: 2px; top: 10px; text-decoration: none; }
.rondjes { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 4px 18px 6px; }
.rondjes::-webkit-scrollbar { display: none; }
.rondje { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--tekst-zacht); text-decoration: none; font-size: 13px; font-weight: 600; flex: none; width: 56px; }
.rondje .avatar { width: 54px; height: 54px; font-size: 17px; }
.rondje--leeg { color: var(--tekst-zacht); }
.rondje--leeg .avatar svg { width: 22px; }

.carrousel { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -18px; padding: 0 18px 8px; scroll-padding: 18px; }
.carrousel::-webkit-scrollbar { display: none; }
.carrousel > * { scroll-snap-align: start; flex: 0 0 100%; }
.carrousel > *:not(:only-child) { flex-basis: 88%; }

.beurt-kaart { position: relative; height: 140px; display: flex !important; flex-direction: column; justify-content: space-between; overflow: hidden; }
.beurt-kaart .label { align-self: flex-start; }
.beurt-ill { position: absolute; right: -6px; top: 14px; width: 132px; height: 110px; }
.beurt-tekst { display: flex; flex-direction: column; max-width: 60%; }

.quest-kaart { display: flex !important; align-items: center; gap: 14px; padding: 13px 15px; color: inherit; }
.quest-ring { position: relative; width: 50px; height: 50px; flex: none; }
.quest-ring svg { width: 50px; height: 50px; }
.quest-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.beloning { background: var(--boter); color: var(--boter-inkt); box-shadow: 0 3px 0 var(--boter-rand); font-weight: 700; font-size: 14px; padding: 6px 10px; border-radius: 12px; flex: none; }

.uitgelicht-kaart { position: relative; min-height: 176px; display: flex !important; flex-direction: column; gap: 6px; overflow: hidden; }
.uitgelicht-kaart .label { align-self: flex-start; margin-bottom: auto; }
.uitgelicht-ill { position: absolute; right: -8px; top: 10px; width: 110px; height: 92px; opacity: .95; }
.uitgelicht-tekst { font-size: var(--tekst-s); max-width: 92%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.feed-item { display: flex !important; align-items: center; gap: 12px; color: inherit; padding: 12px 14px; }
.event-kaart { display: flex !important; flex-direction: column; gap: 6px; }
.event-kaart .label { align-self: flex-start; }
.nieuws-item { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Spellen ---------- */
.tegel { min-height: 112px; }
.tegel svg { width: 58px; height: 48px; }
.tegel-naam { font-size: 15px; line-height: 1.15; }
.tegel .label-binnenkort { font-size: 10px; padding: 2px 7px; }

/* ---------- Spelpagina ---------- */
.spel-held { position: relative; min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; overflow: visible; }
.spel-held-ill { position: absolute; right: 8px; top: 14px; width: 150px; height: 124px; }
.spel-held-tekst { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; max-width: 70%; position: relative; }
.spel-held h1 { font-size: 40px; }
.spel-held-sticker { position: absolute; left: 14px; top: -10px; }
.hartje-groot.aan { color: var(--gevaar); }
.feiten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.feit { background: var(--bg-diep); border-radius: var(--r-m); padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.feit svg { width: 20px; height: 20px; color: var(--tekst-zacht); margin-bottom: 4px; }
.feit b { font-size: 15px; line-height: 1.15; }
.feit span { font-size: 12px; color: var(--tekst-zacht); }
.vijfplus { display: flex; align-items: center; gap: 12px; }
.vijfplus-icoon { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--inkt); color: var(--vlak); font-family: var(--font-kop); font-weight: 800; font-size: 18px; transform: rotate(-6deg); }
.regels { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.regels h4 { margin: 6px 0 0; font-family: var(--font-kop); font-size: 17px; }
.regels ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.stats-kaart { display: flex; flex-direction: column; gap: 14px; }
.stats-level { display: flex; align-items: center; gap: 12px; }
.level-blok { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-family: var(--font-kop); font-weight: 800; font-size: 22px; background: var(--vlak); color: var(--inkt); box-shadow: 0 4px 0 var(--rand); flex: none; }
.stats-getallen { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.stats-getallen b, .profiel-getallen b { display: block; font-family: var(--font-kop); font-size: 24px; }
.stats-getallen span, .profiel-getallen span { font-size: 13px; color: var(--tekst-zacht); }

/* ---------- Lobby ---------- */
.lobby-spel { display: flex; align-items: center; gap: 12px; }
.lobby-ill { width: 60px; height: 50px; flex: none; }
.lobby-ill svg { width: 100%; height: 100%; }
.plaatsen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.plaats {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: var(--bg-verhoogd); border-radius: var(--r-l); box-shadow: 0 4px 0 var(--bg-verhoogd-rand);
  padding: 14px 6px 10px; margin-bottom: 4px; color: inherit; font: inherit; border: 0;
}
.plaats--wacht { opacity: .6; }
.plaats--leeg { background: transparent; box-shadow: none; border: 2px dashed var(--lijn); cursor: pointer; }
.plaats--leeg .avatar { background: var(--bg-diep); color: var(--tekst-zacht); box-shadow: none; }
.plaats--leeg .avatar svg { width: 20px; }
.plaats-naam { font-weight: 600; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plaats-status { font-size: 12px; color: var(--tekst-zacht); display: inline-flex; align-items: center; gap: 3px; }
.plaats-weg { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; padding: 7px; border: 0; background: none; color: var(--tekst-stil); cursor: pointer; }
.plaats-weg svg { width: 100%; height: 100%; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.team { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: var(--r-l); background: var(--bg-diep); }
.team--a { box-shadow: inset 0 4px 0 var(--koraal); }
.team--b { box-shadow: inset 0 4px 0 var(--hemel); }
.team-kop { display: flex; align-items: center; justify-content: space-between; font-weight: 700; padding: 4px 2px 0; }
.team-kop .knop { min-height: 36px; padding: 0 10px; }
.team .plaats { flex-direction: row; text-align: left; padding: 8px 10px; }
.team .plaats .avatar { width: 36px; height: 36px; font-size: 13px; }
.team .plaats-status { display: none; }
.uitnodig-knoppen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.uitnodig-knoppen .knop { padding: 0 8px; }
.lobby-kijkers { display: flex; align-items: center; gap: 6px; }
.lobby-kijkers svg { width: 18px; }
.lobby-start { position: sticky; bottom: calc(var(--veilig-onder) + 10px); display: flex; flex-direction: column; gap: 4px; padding-top: 8px; background: var(--bg); box-shadow: 0 -12px 12px -4px var(--bg); }
.vrienden-kies .rij { min-height: 64px; }

/* ---------- Speelscherm (nep) ---------- */
.spelers-balk { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px 6px; }
.speler { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: var(--r-rond); background: var(--bg-verhoogd); font-size: 14px; font-weight: 600; }
.speler b { color: var(--tekst-zacht); font-size: 13px; }
.speler--beurt { background: var(--roze); color: var(--roze-inkt); box-shadow: 0 3px 0 var(--roze-rand); }
.speler--beurt b { color: inherit; }
.speelveld { flex: 1; min-height: 300px; border-radius: var(--r-xl); background: var(--bg-diep); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; }
.speelveld-ill { width: 120px; height: 100px; border-radius: 28px; display: grid; place-items: center; background: var(--vlak); color: var(--inkt); box-shadow: 0 6px 0 var(--rand); transform: rotate(-4deg); margin-bottom: 8px; }
.speelveld-ill svg { width: 88px; height: 74px; }
.beurt-balk { display: flex; align-items: center; gap: 12px; }
.beurt-balk .knop { margin-bottom: 4px; }
.mini-chat { display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.mini-bericht { display: flex; gap: 10px; align-items: flex-start; }

/* ---------- Uitslag ---------- */
.uitslag-kop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-top: 28px; }
.uitslag-kop h1 { font-size: 50px; }
.sticker-ill { width: 30px; height: 25px; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; padding-top: 10px; }
.podium-plek { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.podium-naam { font-weight: 600; }
.podium-kroon { width: 34px; color: var(--boter); transform: rotate(-8deg); margin-bottom: -6px; }
.podium-blok { width: 100%; border-radius: var(--r-l) var(--r-l) 10px 10px; background: var(--vlak); color: var(--inkt); box-shadow: 0 6px 0 var(--rand); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.podium-blok b { font-family: var(--font-kop); font-size: 34px; line-height: 1; }
.podium-blok span { font-size: 13px; font-weight: 600; }
.podium-plek--1 .podium-blok { height: 130px; }
.podium-plek--2 .podium-blok { height: 98px; }
.podium-plek--3 .podium-blok { height: 76px; }
.plaats-nr { width: 22px; text-align: center; color: var(--tekst-zacht); }
.beloningen { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.beloning-blok { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.beloning-blok b { font-family: var(--font-kop); font-size: 24px; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Mensen ---------- */
.toevoegen { display: flex; flex-direction: column; gap: 8px; }
.toevoegen-rij { display: flex; gap: 10px; align-items: flex-start; }
.toevoegen-rij .knop { margin-bottom: 0; flex: none; min-height: 52px; }
.groep-rij { color: inherit; text-decoration: none; min-height: 76px; }
.groep-rij-boven, .groep-rij-onder { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.groep-rij-boven b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Groep ---------- */
.groep-kop { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.scherm--chat { padding-bottom: 0; }
.scherm--chat [data-deel] { flex: 1; display: flex; flex-direction: column; }
.berichten { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; flex: 1; }
.chat-tijd { align-self: center; font-size: 12px; color: var(--tekst-stil); font-weight: 600; margin: 10px 0 4px; }
.chat-systeem { align-self: center; font-size: 13px; color: var(--tekst-zacht); background: var(--bg-diep); padding: 5px 12px; border-radius: var(--r-rond); }
.bericht { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; }
.bericht--vervolg { margin-top: -2px; }
.bericht--ik { align-self: flex-end; flex-direction: row-reverse; }
.bericht-plek { width: 36px; flex: none; }
.bericht a { text-decoration: none; }
.bericht-bel { background: var(--bg-verhoogd); border-radius: 20px 20px 20px 6px; padding: 8px 12px 6px; display: flex; flex-direction: column; gap: 2px; word-break: break-word; }
.bericht--ik .bericht-bel { background: var(--lila); color: var(--lila-inkt); border-radius: 20px 20px 6px 20px; }
.bericht-naam { font-size: 13px; font-weight: 700; }
.bericht-klok { align-self: flex-end; font-size: 11px; opacity: .6; }
.bericht-bel--foto { padding: 6px; }
.chat-foto { display: block; padding: 0; border: 0; background: var(--bg-diep); border-radius: 15px; overflow: hidden; cursor: zoom-in; max-width: 240px; }
.chat-foto img { display: block; width: 240px; max-width: 100%; height: auto; max-height: 320px; object-fit: cover; min-height: 80px; }
.chat-foto-tekst { padding: 4px 6px 0; }
.bericht--wacht { opacity: .6; }
.chat-ouder { align-self: center; margin: 4px 0 8px; }
.foto-groot { display: block; width: 100%; max-height: 78vh; object-fit: contain; border-radius: var(--r-m); }
.foto-voorbeeld { display: block; width: 100%; max-height: 46vh; object-fit: contain; border-radius: var(--r-m); background: var(--bg-diep); }
.groep-rij--nieuw b { color: var(--tekst); }
.groep-rij--nieuw .groep-rij-onder .zacht { color: var(--tekst); font-weight: 600; }
.uitnodiging-held { padding-top: 12px; }
.uitnodiging-held .avatar--groot { width: 104px; height: 104px; font-size: 36px; }
.uitslag-chat { align-self: stretch; display: flex; flex-direction: column; gap: 10px; margin: 6px 0; }
.uitslag-chat-kop { display: flex; align-items: center; gap: 12px; }
.uitslag-chat-standen { display: flex; gap: 10px; flex-wrap: wrap; }
.uitslag-chat-standen > div { display: flex; align-items: center; gap: 6px; background: var(--bg-diep); border-radius: var(--r-rond); padding: 4px 10px 4px 4px; }
.uitslag-chat-standen > .winnaar { background: var(--boter); color: var(--boter-inkt); }
.uitslag-chat .knop { align-self: flex-start; }
.chat-invoer { display: flex; gap: 8px; align-items: center; }
.chat-invoer .knop { margin-bottom: 4px; flex: none; }
.chat-invoer .invoer { border-radius: var(--r-rond); min-height: 48px; margin-bottom: 4px; }
.chat-invoer--vast { position: sticky; bottom: 0; z-index: 5; margin: 0 -18px; padding: 10px 18px calc(var(--veilig-onder) + 12px); background: var(--bg); }
.potje-kaart { display: flex !important; align-items: center; gap: 12px; color: inherit; }
.groep-held { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.kroon { display: inline-flex; width: 16px; color: var(--boter); vertical-align: -2px; }
.link-kaart { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; }
.link-kaart .knop { margin-bottom: 4px; }

/* ---------- Profiel ---------- */
.profiel-held { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding-top: 4px; }
.profiel-held .avatar--groot { width: 104px; height: 104px; font-size: 36px; margin-bottom: 6px; }
.profiel-held .sticker { margin-top: 6px; }
.profiel-getallen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; text-align: center; }
.profiel-getallen .kaart { padding: 14px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.profiel-getallen .kleur-boter span { color: var(--boter-inkt); opacity: .8; }
.munt-getal { display: inline-flex !important; align-items: center; justify-content: center; gap: 4px; font-size: 21px !important; }
.collectie-leeg { display: flex; flex-direction: column; gap: 12px; }
.collectie-vakjes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.collectie-vakjes span { aspect-ratio: 1; border-radius: var(--r-m); border: 2px dashed var(--lijn); }
.spel-stat { color: inherit; text-decoration: none; min-height: 72px; }
.level-badge { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.level-badge b { font-family: var(--font-kop); font-size: 20px; color: var(--lila); }
.level-badge span { font-size: 12px; color: var(--tekst-zacht); }
.profiel-foto-kies { display: flex; align-items: center; gap: 16px; }
.kleur-kies { display: flex; gap: 10px; flex-wrap: wrap; }
.kleur-bol { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: var(--vlak); box-shadow: 0 4px 0 var(--rand); margin-bottom: 4px; }
.kleur-bol[aria-checked="true"] { outline: 3px solid var(--tekst); outline-offset: 3px; }

/* ---------- Munten ---------- */
.saldo-kaart { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 172px; justify-content: flex-end; overflow: hidden; }
.saldo-munt { position: absolute; right: -14px; top: -14px; width: 130px; height: 130px; transform: rotate(14deg); }
.saldo-munt svg { width: 100%; height: 100%; }
.zacht-inkt { opacity: .75; font-weight: 600; }
.saldo-getal { font-size: 56px; letter-spacing: -0.04em; }
.saldo-sticker { position: absolute; left: 16px; top: 16px; }
.quest-groot { display: flex; flex-direction: column; gap: 12px; }
.quest-groot .knop { margin-bottom: 4px; }
.verdien { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; text-align: center; }
.verdien .kaart { padding: 14px 8px; display: flex; flex-direction: column; gap: 4px; }
.verdien b { font-family: var(--font-kop); font-size: 24px; }
.verdien span { font-size: 13px; line-height: 1.2; }
.winkel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.winkel-item { appearance: none; border: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 4px; transition: transform var(--snel), box-shadow var(--snel); }
.winkel-item:active { transform: translateY(var(--d)); box-shadow: 0 0 0 var(--rand); }
.winkel-plaatje { height: 84px; border-radius: var(--r-m); display: grid; place-items: center; background: var(--vlak); color: var(--inkt); margin-bottom: 6px; }
.winkel-plaatje svg { width: 64px; height: 54px; }
.winkel-prijs { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--boter); margin-top: 4px; }
.winkel-prijs svg { width: 16px; height: 16px; }
.winkel-detail { height: 160px; border-radius: var(--r-l); display: grid; place-items: center; background: var(--vlak); color: var(--inkt); }
.winkel-detail svg { width: 120px; height: 100px; }

/* ---------- Spelkiezer ---------- */
.kiezer-lijst { display: flex; flex-direction: column; }
.kiezer-spel { display: flex; align-items: center; gap: 12px; padding: 8px 2px; color: inherit; text-decoration: none; border-radius: var(--r-m); min-height: 60px; }
.kiezer-spel + .kiezer-spel { border-top: 1px solid var(--lijn); }
.kiezer-icoon { width: 46px; height: 46px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--vlak); color: var(--inkt); }
.kiezer-icoon svg { width: 36px; height: 30px; }
.sheet .lijst-kaart { background: var(--bg-diep); box-shadow: none; margin-bottom: 0; }
.sheet .chips-rij { margin: 0 -20px 4px; padding: 2px 20px 6px; }

/* ---------- Welkom ---------- */
.scherm--welkom { justify-content: center; }
.welkom-held { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.welkom-icoon { transform: rotate(-6deg); }
.welkom-form { display: flex; flex-direction: column; gap: 14px; }

/* Breed scherm: iets meer lucht, kolom blijft gecentreerd */
@media (min-width: 700px) {
  body { background: var(--bg-diep); }
  #app { background: var(--bg); box-shadow: 0 0 0 1px var(--lijn); }
  .raster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Opstarten & account (stap 3) ---------- */
.opstart { min-height: 100dvh; display: grid; place-items: center; }
.opstart img { transform: rotate(-6deg); animation: opstart-wip 1s var(--veer) infinite alternate; }
@keyframes opstart-wip { to { transform: rotate(6deg) scale(1.04); } }
.welkom-form .fout:empty { display: none; }
.form-fout { background: color-mix(in srgb, var(--gevaar) 16%, transparent); color: var(--tekst); border-radius: var(--r-s); padding: 10px 12px; font-size: var(--tekst-s); }
.form-fout:empty { display: none; }
.form-goed { background: color-mix(in srgb, var(--mint) 18%, transparent); color: var(--tekst); border-radius: var(--r-s); padding: 10px 12px; font-size: var(--tekst-s); }
.invoer-at { position: relative; display: flex; align-items: center; }
.invoer-at > span { position: absolute; left: 14px; color: var(--tekst-stil); font-weight: 600; pointer-events: none; }
.invoer-at .invoer { padding-left: 32px; width: 100%; }
.naam-check { font-size: var(--tekst-s); min-height: 1.2em; }
.naam-check[data-vrij="ja"] { color: var(--mint); }
.naam-check[data-vrij="nee"] { color: var(--gevaar); }
.ww-toon { position: relative; display: flex; }
.ww-toon .invoer { width: 100%; padding-right: 56px; }
.ww-toon button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--tekst-zacht); width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.ww-toon button svg { width: 22px; height: 22px; }
.profiel-foto-kies .avatar { position: relative; }
.profiel-foto-kies .avatar.bezig { opacity: .5; }
.foto-knoppen { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.knop-tekst { background: none; border: 0; color: var(--tekst-zacht); font: inherit; font-size: var(--tekst-s); text-decoration: underline; cursor: pointer; padding: 4px 0; }

/* ---------- Spel-engine (stap 6) ---------- */
.lobby-wacht { display: flex; align-items: center; gap: 6px; margin: 0; }
.lobby-wacht svg { width: 16px; flex: none; }
.lobby-wacht-kaart { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--tekst-zacht); font-weight: 600; min-height: 52px; }
.lobby-wacht-kaart svg { width: 20px; }
.rij--wrap { flex-wrap: wrap; row-gap: 8px; }
.chip:disabled { opacity: .55; cursor: default; }
.chip[aria-pressed="true"]:disabled { opacity: 1; }

/* Speelscherm */
.speelveld--spel { min-height: 0; padding: 10px; justify-content: flex-start; flex: none; }
.speler { position: relative; }
.speler-av { position: relative; display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 3px var(--zetkleur, transparent); }
.speler--beurt .speler-av { box-shadow: 0 0 0 3px var(--roze-inkt), 0 0 0 5px var(--zetkleur, transparent); }
.speler--uit { opacity: .5; }
.speler--uit b { font-weight: 500; font-size: 12px; }
.beurt-balk { min-height: 56px; }
.beurt-balk .knop { margin-bottom: 4px; }
.beurt-timer { flex: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 4px 10px; border-radius: var(--r-rond); background: var(--bg-diep); color: var(--tekst); }
.beurt-timer svg { width: 16px; }
.beurt-timer--bijna { background: var(--gevaar); color: var(--gevaar-inkt); animation: tik-tak 1s infinite; }
@keyframes tik-tak { 50% { transform: scale(1.08); } }
.kijkers-tekst { display: flex; align-items: center; gap: 6px; }
.uitslag-chat-kop { color: inherit; text-decoration: none; }

/* Dots & Boxes */
.db { width: 100%; display: flex; justify-content: center; touch-action: manipulation; }
.db svg { width: 100%; max-width: 560px; height: auto; display: block; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.db-stip { fill: var(--tekst); }
.db-leeg { stroke: var(--lijn); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 9; }
.db-lijn { stroke-width: 9; stroke-linecap: round; }
.db-nieuw { animation: db-nieuw .7s var(--veer); }
@keyframes db-nieuw { 0% { stroke-width: 18; opacity: .3; } 100% { stroke-width: 9; opacity: 1; } }
.db-hok--nieuw rect { animation: db-hok .35s var(--veer); transform-box: fill-box; transform-origin: center; }
.db-hok text { font-family: var(--font-kop); font-weight: 800; font-size: 24px; pointer-events: none; }
@keyframes db-hok { 0% { transform: scale(.3); } 100% { transform: scale(1); } }
.db-tik { cursor: pointer; }
.db-tik polygon { fill: transparent; }
.db-tik line { stroke: var(--roze); stroke-width: 8; stroke-linecap: round; opacity: 0; transition: opacity var(--snel); }
@media (hover: hover) { .db-tik:hover line { opacity: .55; } }
.db-tik:active line { opacity: .9; }
.db--mag .db-leeg { stroke: var(--tekst-stil); }
.scherm-deel { display: contents; }
.spelers-balk { position: relative; }
.speler { gap: 6px; padding: 5px 10px 5px 5px; }
.speler-naam { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 5+ spelers: alleen avatar + score, en mag over twee regels */
.spelers-balk--vol { flex-wrap: wrap; overflow: visible; margin: 0; padding: 2px 0 4px; justify-content: center; }
.spelers-balk--vol .speler-naam { display: none; }
.spelers-balk--vol .speler { padding-right: 12px; }
/* Lobby: beurttimer-knopjes onder het woord, zodat het niet wordt afgekapt */
.rij--stapel { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
.rij--stapel .chips-rij { margin: 0; padding: 2px 0 4px; flex-wrap: wrap; }
.db-laatst { stroke-width: 11; }
/* Dots & Boxes: de vorige beurt aanwijzen */
.db-gloed { stroke-width: 24; stroke-linecap: round; opacity: .45; }
.db-punt { fill: var(--tekst); stroke: var(--bg-diep); stroke-width: 2; pointer-events: none; }
/* Automatisch bijwerken (js/bijwerken.js) */
.bijwerk-balk { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); top: calc(var(--veilig-boven) + 8px);
  border: 0; border-radius: var(--r-rond); padding: 10px 18px; font: 600 15px var(--font-tekst); cursor: pointer;
  background: var(--boter); color: var(--boter-inkt); box-shadow: 0 4px 0 var(--boter-rand); white-space: nowrap; }
.bijwerk-balk:active { transform: translate(-50%, 4px); box-shadow: none; }
.nieuws-lijst { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

/* ---------- Munten, quests, winkel en reclame (stap 7) ---------- */
.verdien--vier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.beloning { display: inline-flex; align-items: center; gap: 4px; }
.beloning svg { width: 16px; height: 16px; }
.beloning--pulse { animation: munt-pulse 1.4s var(--veer) infinite; }
@keyframes munt-pulse { 50% { transform: scale(1.12) rotate(-3deg); } }
.saldo-getal.pop { animation: plop .5s var(--veer); }

.quests { display: flex; flex-direction: column; gap: 12px; }
.quest { display: flex; flex-direction: column; gap: 10px; }
.quest-boven, .quest-onder { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.quest-niveau { font-size: 13px; text-transform: capitalize; }
.quest-tekst { font-size: 17px; }
.quest-onder { min-height: 44px; }
.quest--klaar { --vlak: #3A2F7E; box-shadow: 0 var(--d) 0 var(--rand), inset 0 0 0 3px var(--boter); }
.quest--klaar .voortgang > span { background: var(--boter); }
.quest--gehaald { opacity: .72; }
.quest--gehaald .voortgang > span { background: var(--mint-rand); }
.quest-gehaald { display: inline-flex; align-items: center; gap: 6px; color: var(--mint); font-weight: 600; }
.quest-gehaald svg, .winkel-status svg { width: 18px; height: 18px; }
.quest-knop svg { width: 20px; height: 20px; }

.quest-ringen { display: flex; gap: 4px; flex: none; }
.quest-ring--klein { width: 36px; height: 36px; }
.quest-ring--klein svg { width: 36px; height: 36px; }
.quest-ring--klein span { font-size: 10px; }
.quest-ring--klein span svg { width: 14px; height: 14px; color: var(--mint); }

.reclame-kaart { display: flex !important; align-items: center; gap: 12px; margin-top: var(--ruimte-5); }
.reclame-kaart-tv { width: 46px; height: 46px; border-radius: 14px; background: var(--rand); color: var(--vlak); display: grid; place-items: center; flex: none; }
.reclame-kaart-tv svg { width: 26px; height: 26px; }
.reclame-kaart .knop svg { width: 20px; height: 20px; }

/* Winkel */
.winkel-plaatje { overflow: hidden; background: var(--bg-diep); }
.winkel-plaatje--banner svg.banner { width: 100%; height: 100%; }
.winkel-plaatje--rand .avatar { width: 52px; height: 52px; }
.winkel-plaatje--rand .avatar svg { width: 26px; height: 26px; }
.winkel-plaatje--titel { padding: 0 6px; text-align: center; }
.winkel-plaatje--skin svg { width: 96px; height: 64px; }
.winkel-item b { line-height: 1.15; }
.winkel-status { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--tekst-zacht); margin-top: 4px; }
.winkel-status.kleur-mint { color: var(--mint); }
.winkel-prijs--te-duur { opacity: .55; }
.item-voorbeeld { height: 170px; border-radius: var(--r-l); background: var(--bg-diep); display: grid; place-items: center; position: relative; overflow: hidden; margin-bottom: 14px; }
.item-voorbeeld .banner { position: absolute; inset: 0; width: 100%; height: 100%; }
.item-voorbeeld .avatar--groot { width: 96px; height: 96px; font-size: 34px; }
.item-voorbeeld--banner > .avatar, .item-voorbeeld--banner > .avatar-rand { position: relative; margin-top: 70px; }
.item-voorbeeld--titel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.item-voorbeeld--skin svg { width: 210px; height: 140px; }
.item-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.munt-klein { width: 20px; display: inline-flex; }

/* Banners: twinkelende sterren */
svg.banner { display: block; }
.twinkel { transform-box: fill-box; transform-origin: center; animation: twinkel 2.4s ease-in-out infinite; }
@keyframes twinkel { 50% { transform: scale(.55) rotate(20deg); opacity: .6; } }

/* Rand om je avatar */
.avatar-rand { position: relative; display: inline-grid; place-items: center; padding: 5px; border-radius: 50%; background: var(--bg-diep); flex: none; }
.avatar-rand > .avatar { position: relative; z-index: 1; }
.avatar-rand--mint { background: var(--mint); box-shadow: 0 5px 0 var(--mint-rand); }
.avatar-rand--roze { background: var(--roze); box-shadow: 0 5px 0 var(--roze-rand); }
.avatar-rand--kroon { background: var(--boter); box-shadow: 0 5px 0 var(--boter-rand); }
.avatar-rand--regenboog { overflow: hidden; box-shadow: 0 5px 0 var(--bg-verhoogd-rand); }
.avatar-rand--regenboog::before { content: ''; position: absolute; inset: -20%; animation: draai 6s linear infinite;
  background: conic-gradient(var(--koraal) 0 60deg, var(--boter) 0 120deg, var(--mint) 0 180deg, var(--hemel) 0 240deg, var(--lila) 0 300deg, var(--roze) 0 360deg); }
@keyframes draai { to { transform: rotate(360deg); } }
.avatar-rand-kroon { position: absolute; z-index: 2; top: -22%; left: 50%; width: 42%; transform: translateX(-50%) rotate(-8deg); color: var(--boter); filter: drop-shadow(0 3px 0 var(--boter-rand)); }
.avatar-rand-kroon svg { width: 100%; height: auto; display: block; }
.profiel-held .avatar-rand { margin-bottom: 6px; }

/* Titel onder je naam */
.titel-sticker { display: inline-block; font-weight: 700; font-size: 13px; padding: 4px 11px; border-radius: var(--r-rond); transform: rotate(-2deg);
  background: var(--bg-diep); color: var(--tekst-zacht); box-shadow: 0 3px 0 var(--bg-verhoogd-rand); }
.titel-sticker--zeldzaam { background: var(--hemel); color: var(--hemel-inkt); box-shadow: 0 3px 0 var(--hemel-rand); }
.titel-sticker--episch { background: var(--lila); color: var(--lila-inkt); box-shadow: 0 3px 0 var(--lila-rand); }
.titel-sticker--legendarisch { background: var(--boter); color: var(--boter-inkt); box-shadow: 0 3px 0 var(--boter-rand); }

/* Profiel met banner */
.profiel-held--banner { position: relative; padding-top: 64px; }
.profiel-banner { position: absolute; top: 0; left: 0; right: 0; height: 118px; border-radius: var(--r-xl); overflow: hidden; box-shadow: 0 6px 0 var(--bg-verhoogd-rand); }
.profiel-banner svg { width: 100%; height: 100%; }
.profiel-held--banner > :not(.profiel-banner) { position: relative; }
.collectie { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.collectie-item { appearance: none; border: 0; font: inherit; color: inherit; display: flex; flex-direction: column; gap: 4px; padding: 8px; text-align: left; cursor: pointer; min-width: 0; }
.collectie-item[disabled] { cursor: default; opacity: 1; }
.collectie-item .winkel-plaatje { height: 64px; margin-bottom: 2px; }
.collectie-item .winkel-plaatje--skin svg { width: 72px; height: 48px; }
.collectie-item .winkel-plaatje--rand .avatar { width: 40px; height: 40px; }
.collectie-item .titel-sticker { font-size: 11px; padding: 3px 8px; }
.collectie-aan { font-size: 12px; font-weight: 700; }

/* Uitslag: XP, munten, level naast elkaar */
.beloningen--drie { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.beloningen--drie .beloning-blok { padding: 12px 6px; text-align: center; color: var(--inkt); text-decoration: none; }
.beloningen--drie .beloning-blok b { font-size: 19px; }
.beloningen--drie .beloning-blok span { font-size: 12px; line-height: 1.2; }

/* Reclame (volledig scherm) */
body.reclame-open { overflow: hidden; }
.reclame-laag { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; gap: 12px; overflow: hidden;
  background: var(--vlak); color: var(--inkt); padding: calc(var(--veilig-boven) + 14px) 20px calc(var(--veilig-onder) + 18px);
  opacity: 0; transition: opacity var(--gewoon); }
.reclame-laag.open { opacity: 1; }
.reclame-kop { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; }
.reclame-label { font-size: 13px; font-weight: 700; background: var(--inkt); color: var(--vlak); padding: 5px 11px; border-radius: var(--r-rond); }
.reclame-tel { min-width: 44px; height: 44px; border-radius: 50%; background: var(--inkt); color: var(--vlak); display: grid; place-items: center; font-family: var(--font-kop); font-weight: 800; font-size: 18px; }
.reclame-voortgang { height: 8px; border-radius: var(--r-rond); background: var(--rand); overflow: hidden; position: relative; z-index: 2; }
.reclame-voortgang span { display: block; height: 100%; width: 0; background: var(--inkt); }
.reclame-podium { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 0; }
.reclame-straal { position: absolute; width: 150vmax; height: 150vmax; left: 50%; top: 42%; translate: -50% -50%; border-radius: 50%; opacity: .22; animation: draai 24s linear infinite;
  background: repeating-conic-gradient(var(--rand) 0 9deg, transparent 0 18deg); pointer-events: none; }
.reclame-product { width: min(52vw, 230px); height: auto; position: relative; z-index: 1; filter: drop-shadow(0 8px 0 var(--rand));
  transition: transform .6s var(--veer); animation: reclame-wip 1.8s ease-in-out infinite; }
.reclame-laag[data-scene="0"] .reclame-product { transform: scale(.7) rotate(-14deg); }
.reclame-laag[data-scene="1"] .reclame-product { transform: scale(1) rotate(6deg); }
.reclame-laag[data-scene="2"] .reclame-product { transform: scale(1.18) rotate(-4deg); }
.reclame-laag[data-scene="3"] .reclame-product { transform: scale(1) rotate(0); }
@keyframes reclame-wip { 50% { translate: 0 -10px; } }
.reclame-product .wijzer { transform-origin: 60px 64px; animation: draai 2s linear infinite; }
.reclame-tekst { position: relative; z-index: 1; min-height: 3.4em; display: grid; place-items: center; text-align: center; }
.reclame-zin { font-family: var(--font-kop); font-weight: 800; font-size: clamp(26px, 8vw, 38px); line-height: 1.08; letter-spacing: -0.02em;
  animation: reclame-zin .5s var(--veer) both; }
@keyframes reclame-zin { from { opacity: 0; transform: translateY(18px) scale(.9) rotate(-2deg); } }
.reclame-onder { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.reclame-merk { font-size: 26px; background: var(--inkt); color: var(--vlak); padding: 4px 16px; border-radius: var(--r-m); transform: rotate(-2deg); }
.reclame-klein { font-size: 12px; opacity: .8; line-height: 1.35; }
.reclame-onder .knop svg { width: 22px; height: 22px; }
.reclame-laag .knop-tekst { color: var(--inkt); opacity: .8; }
.reclame--klaar .reclame-onder .knop { animation: munt-pulse 1.4s var(--veer) infinite; }
@media (prefers-reduced-motion: reduce) {
  .reclame-straal, .reclame-product, .twinkel, .avatar-rand--regenboog::before, .beloning--pulse { animation: none !important; }
}
