:root {
  --navy: #0a1226;
  --navy-2: #121c38;
  --glass: rgba(9, 15, 32, 0.74);
  --glass-line: rgba(255, 255, 255, 0.12);
  --text: #f4f6fb;
  --muted: #a7b0c6;
  --red: #e1112e;
  --red-2: #b30c25;
  --gold: #ffd23f;
  --pink: #ff4fa3;
  --green: #22c55e;
  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #050913; color: var(--text); font-family: var(--body); }
button { font: inherit; color: inherit; }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
.vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.45) 100%); }
.hidden { display: none !important; }
.screen { position: fixed; inset: 0; }
.glass { background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--r); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
.eyebrow { font: 700 13px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
h1, h2 { font-family: var(--display); margin: 0; line-height: 0.95; letter-spacing: 0.01em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, 0.08); color: var(--text); padding: 12px 20px; border-radius: 12px; font-weight: 600; cursor: pointer; text-decoration: none; transition: transform .12s, background .2s, opacity .2s; min-height: 48px; }
.btn:hover { background: rgba(255, 255, 255, 0.16); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: linear-gradient(180deg, #ff2846, var(--red)); border-color: transparent; box-shadow: 0 8px 24px rgba(225, 17, 46, 0.4); }
.btn.primary:hover { background: linear-gradient(180deg, #ff3d58, #f0142f); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn.big { font: 800 26px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; padding: 18px 30px; min-height: 64px; }
.btn:focus-visible, .pill:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- setup */
#setup { display: flex; align-items: center; padding: 4vh 5vw; }
.setup-card { width: min(560px, 100%); padding: 34px; display: flex; flex-direction: column; gap: 24px; max-height: 92vh; overflow: auto; }
.brand { display: flex; gap: 18px; align-items: center; }
.brand-mark { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 36px; background: linear-gradient(140deg, var(--red), #6d0716); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); flex: none; }
.brand h1 { font-size: 52px; font-weight: 900; text-transform: uppercase; font-style: italic; }
.brand h1 em { color: var(--gold); font-style: italic; }
.brand p { margin: 6px 0 0; color: var(--muted); }
.step-label { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 12px; }
.step-label b { width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-size: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { border: 1px solid var(--glass-line); background: rgba(255, 255, 255, 0.06); padding: 12px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; min-height: 48px; transition: all .15s; }
.pill:hover { background: rgba(255, 255, 255, 0.14); }
.pill[aria-checked="true"] { background: var(--text); color: var(--navy); border-color: var(--text); }
.pill small { opacity: .6; font-weight: 500; margin-left: 6px; }
.empty-note { color: var(--muted); font-size: 14px; }
.empty-note a { color: var(--gold); }
.switch { display: flex; align-items: center; gap: 12px; color: var(--muted); cursor: pointer; font-size: 15px; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 46px; height: 28px; border-radius: 999px; background: rgba(255, 255, 255, .18); position: relative; flex: none; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--gold); outline-offset: 2px; }
.error { color: #ff8a9a; margin: -10px 0 0; min-height: 1em; }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; border-top: 1px solid var(--glass-line); padding-top: 18px; }
.links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.links a:hover { color: var(--text); }

/* ---------- lobby */
#lobby { display: grid; grid-template-columns: minmax(300px, 25vw) 1fr minmax(260px, 20vw); grid-template-rows: 1fr auto; gap: 2.2vh 1.6vw; padding: 3vh 2.2vw; }
.join-card { grid-row: 1 / 3; padding: 28px; display: flex; flex-direction: column; gap: 16px; align-self: start; animation: slideIn .6s cubic-bezier(.2, .8, .2, 1); }
.join-card h2 { font-size: clamp(34px, 3vw, 54px); font-weight: 900; text-transform: uppercase; font-style: italic; }
.qr { background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 0 0 6px rgba(255, 210, 63, .9), 0 0 60px rgba(255, 210, 63, .35); animation: qrPulse 2.4s ease-in-out infinite; }
.qr img { display: block; width: 100%; aspect-ratio: 1; image-rendering: pixelated; }
.howto { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.howto li { counter-increment: s; display: flex; gap: 12px; align-items: center; font-size: clamp(15px, 1.05vw, 19px); color: var(--muted); }
.howto li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: var(--text); font-weight: 700; flex: none; }
.howto b { color: var(--text); }
.url { font: 600 14px/1.3 ui-monospace, Menlo, monospace; color: var(--muted); word-break: break-all; text-align: center; }

.roster-card { padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; min-height: 0; align-self: start; max-height: 74vh; animation: slideIn .6s .08s cubic-bezier(.2, .8, .2, 1) both; }
.roster-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.roster-head h2 { font-size: clamp(48px, 4.4vw, 84px); font-weight: 900; }
.roster-head h2 small { font-size: .42em; color: var(--muted); font-weight: 700; }
.vs { text-align: right; font: 800 clamp(22px, 1.8vw, 32px)/1 var(--display); color: var(--pink); text-transform: uppercase; }
.vs small { display: block; font: 500 13px var(--body); color: var(--muted); text-transform: none; margin-top: 6px; }
.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), #8ff0b0); border-radius: inherit; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; overflow: auto; padding-right: 4px; }
.chip { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); color: rgba(255, 255, 255, .38); font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all .4s; border: 1px solid transparent; }
.chip .n { font: 800 15px var(--display); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); flex: none; }
.chip.present { background: rgba(34, 197, 94, .14); color: var(--text); border-color: rgba(34, 197, 94, .35); }
.chip.present .n { background: var(--red); color: #fff; }
.chip.late .n { background: #f59e0b; }
.chip.offline { opacity: .65; }
.chip.fresh { animation: pop .7s cubic-bezier(.2, 1.4, .3, 1); }
.chip .t { margin-left: auto; font-size: 12px; color: var(--muted); }

.keeper-card { padding: 22px; display: flex; flex-direction: column; gap: 12px; align-self: start; animation: slideIn .6s .16s cubic-bezier(.2, .8, .2, 1) both; }
.keeper-card h3 { margin: 0; font: 800 26px/1 var(--display); text-transform: uppercase; color: var(--pink); }
.keeper-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.keeper-card .qr { padding: 10px; box-shadow: 0 0 0 4px rgba(255, 79, 163, .85); animation: none; width: 74%; align-self: center; }
.keeper-card .ok { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.keeper-card .ok i { width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px rgba(34, 197, 94, .2); }
.keeper-card .link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; font-size: 13px; text-align: left; }
.lobby-actions { grid-column: 2 / 4; display: flex; align-items: center; justify-content: flex-end; gap: 20px; align-self: end; padding-right: 150px; }
.hint { color: var(--muted); font-size: 15px; }

/* ---------- HUD */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud .glass, #hud button { pointer-events: auto; }
.sb-wrap { position: absolute; top: 3.2vh; left: 2.4vw; animation: slideIn .5s cubic-bezier(.2, .8, .2, 1); }
.scoreboard { display: flex; align-items: stretch; height: 54px; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); font-family: var(--display); }
.sb-team { display: flex; align-items: center; gap: 12px; padding: 0 16px; background: linear-gradient(180deg, #17224a, #0d1531); font-weight: 800; font-size: 26px; letter-spacing: .04em; }
.sb-team .badge { min-width: 38px; height: 34px; border-radius: 7px; display: grid; place-items: center; font-size: 20px; padding: 0 6px; background: var(--red); color: #fff; }
.sb-team .badge.keeper { background: var(--pink); }
.sb-score { display: flex; align-items: center; gap: 10px; padding: 0 18px; background: #fff; color: var(--navy); font-weight: 900; font-size: 36px; min-width: 120px; justify-content: center; }
.sb-score .dash { width: 12px; height: 4px; background: var(--navy); border-radius: 2px; }
.sb-score span.bump { animation: bump .6s cubic-bezier(.2, 1.6, .3, 1); }
.sb-sub { display: inline-block; margin-top: 6px; background: rgba(9, 15, 32, .85); color: var(--gold); font: 700 15px/1 var(--display); letter-spacing: .12em; padding: 7px 12px; border-radius: 6px; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; max-width: 46vw; }
.dot { width: 22px; height: 22px; border-radius: 50%; background: rgba(9, 15, 32, .7); border: 2px solid rgba(255, 255, 255, .35); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.dot.goal { background: var(--green); border-color: #bff5d2; }
.dot.save, .dot.miss, .dot.post { background: var(--red); border-color: #ffb3bf; }
.dot.now { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 210, 63, .4); animation: blink 1s infinite; }

.late-qr { position: absolute; top: 3.2vh; right: 2.4vw; display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; }
.late-qr img { width: 118px; height: 118px; background: #fff; border-radius: 10px; padding: 6px; }
.late-qr b { font: 800 24px/1 var(--display); text-transform: uppercase; display: block; }
.late-qr span { color: var(--muted); font-size: 14px; }

.shooter-bar { position: absolute; right: 2.4vw; bottom: 5vh; display: flex; align-items: stretch; min-width: min(560px, 44vw); border-radius: 12px; overflow: hidden; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); transition: opacity .4s, transform .4s; }
.shooter-bar.off { opacity: 0; transform: translateY(30px); }
.shooter-bar .num { background: var(--red); font: 900 52px/1 var(--display); padding: 10px 20px; display: grid; place-items: center; min-width: 92px; }
.shooter-bar .txt { flex: 1; background: linear-gradient(180deg, #ffffff, #e9ecf3); color: var(--navy); padding: 12px 22px; }
.shooter-bar .name { font: 900 40px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.shooter-bar .sub { font-weight: 600; color: #4a5570; margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.shooter-bar .sub .swipe { display: inline-block; animation: swipeHint 1.4s ease-in-out infinite; }
.shooter-bar .timer { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(10, 18, 38, .15); }
.shooter-bar .timer i { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; }
.up-next { position: absolute; right: 2.4vw; bottom: calc(5vh + 108px); display: flex; gap: 8px; font-size: 14px; color: var(--muted); }
.up-next span { background: rgba(9, 15, 32, .75); padding: 6px 12px; border-radius: 99px; }
.up-next b { color: var(--text); }
.keeper-status { position: absolute; right: 2.4vw; top: calc(3.2vh + 160px); padding: 14px 18px; font-size: 15px; display: flex; align-items: center; gap: 12px; max-width: 300px; }
.keeper-status img { width: 92px; height: 92px; background: #fff; padding: 5px; border-radius: 8px; }
.keeper-status i { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; }
.keeper-status.ai i { background: #f59e0b; }

.big-result { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.big-result .word { font: italic 900 clamp(110px, 17vw, 300px)/0.85 var(--display); text-transform: uppercase; letter-spacing: -.01em; color: #fff; text-shadow: 0 8px 0 rgba(0, 0, 0, .25), 0 30px 80px rgba(0, 0, 0, .5); animation: slam .9s cubic-bezier(.2, 1.4, .3, 1) both; text-align: center; }
.big-result .word small { display: block; font-size: .2em; letter-spacing: .1em; font-style: normal; margin-top: .3em; color: var(--text); }
.big-result .word.goal { color: var(--gold); -webkit-text-stroke: 3px #7a5a00; }
.big-result .word.save { color: var(--pink); -webkit-text-stroke: 3px #7a0b44; }
.big-result .word.out { animation: fadeOut .5s forwards; }

/* ---------- uitslag */
#result { display: grid; place-items: center; padding: 4vh; background: radial-gradient(circle at 50% 40%, rgba(255, 210, 63, .12), rgba(0, 0, 0, .5)); }
.result-card { width: min(720px, 94vw); padding: 40px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; animation: pop .7s cubic-bezier(.2, 1.3, .3, 1); }
.trophy { font-size: 86px; line-height: 1; filter: drop-shadow(0 10px 30px rgba(255, 210, 63, .5)); animation: float 3s ease-in-out infinite; }
.result-card h2 { font-size: clamp(56px, 6vw, 96px); font-weight: 900; font-style: italic; text-transform: uppercase; }
.res-score { display: flex; align-items: center; gap: 26px; font-family: var(--display); }
.res-score div { display: flex; flex-direction: column; align-items: center; }
.res-score small { font: 600 14px var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.res-score b { font-size: 96px; font-weight: 900; line-height: 1; }
.res-score > span { font-size: 60px; color: var(--muted); }
.res-stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; color: var(--muted); }
.res-stats span { background: rgba(255, 255, 255, .07); padding: 8px 14px; border-radius: 99px; }
.res-stats b { color: var(--text); }
.res-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

/* ---------- algemeen */
#toasts { position: fixed; top: 3vh; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; z-index: 20; }
.toast { background: rgba(9, 15, 32, .9); border: 1px solid var(--glass-line); padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 18px; display: flex; gap: 10px; align-items: center; animation: toastIn .5s cubic-bezier(.2, 1.3, .3, 1), toastOut .5s 3.2s forwards; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.toast .n { background: var(--red); color: #fff; font: 800 16px var(--display); min-width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.toast.late .n { background: #f59e0b; }
#banner { position: fixed; left: 0; right: 0; top: 42%; text-align: center; pointer-events: none; z-index: 15; }
#banner .b { display: inline-block; font: italic 900 clamp(60px, 8vw, 140px)/1 var(--display); text-transform: uppercase; background: var(--red); padding: 10px 50px; transform: skewX(-8deg); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); animation: bannerIn 3s cubic-bezier(.2, .9, .2, 1) forwards; }
#banner .b.gold { background: var(--gold); color: var(--navy); }
.corner { position: fixed; right: 14px; bottom: 14px; display: flex; gap: 8px; z-index: 30; opacity: .35; transition: opacity .2s; }
.corner:hover { opacity: 1; }
.corner button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--glass-line); background: rgba(9, 15, 32, .8); cursor: pointer; font-size: 18px; }
.menu { position: fixed; right: 14px; bottom: 68px; z-index: 31; padding: 8px; display: flex; flex-direction: column; min-width: 280px; }
.menu button, .menu a { text-align: left; background: none; border: 0; padding: 12px 14px; border-radius: 10px; cursor: pointer; color: var(--text); text-decoration: none; font-size: 15px; }
.menu button:hover, .menu a:hover { background: rgba(255, 255, 255, .1); }
.menu hr { border: 0; border-top: 1px solid var(--glass-line); margin: 6px 0; width: 100%; }
#audioUnlock { position: fixed; left: 50%; bottom: 3vh; transform: translateX(-50%); z-index: 40; }

@keyframes slideIn { from { opacity: 0; transform: translateY(20px); } }
@keyframes qrPulse { 50% { box-shadow: 0 0 0 6px rgba(255, 210, 63, .9), 0 0 90px rgba(255, 210, 63, .55); } }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
@keyframes bump { 40% { transform: scale(1.6); color: var(--red); } }
@keyframes blink { 50% { opacity: .5; } }
@keyframes slam { 0% { transform: scale(2.6); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1); } }
@keyframes fadeOut { to { opacity: 0; transform: scale(.9); } }
@keyframes toastIn { from { transform: translateY(-20px) scale(.9); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-10px); opacity: 0; } }
@keyframes bannerIn { 0% { transform: skewX(-8deg) translateX(-120vw); } 18%, 80% { transform: skewX(-8deg) translateX(0); } 100% { transform: skewX(-8deg) translateX(120vw); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes swipeHint { 0%, 100% { transform: translateY(3px); } 50% { transform: translateY(-5px); } }

@media (max-width: 1100px) {
  #lobby { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; overflow: auto; }
  .join-card { grid-row: auto; }
  .lobby-actions { grid-column: 1 / 3; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

/* ================= v2: doorlopende wedstrijd ================= */
#hud .join { position: absolute; left: 2.4vw; top: calc(3.2vh + 150px); bottom: calc(3.5vh + 60px); width: min(24vw, 400px); padding: 22px; display: flex; flex-direction: column; gap: 14px; transition: all .5s cubic-bezier(.2, .8, .2, 1); pointer-events: auto; overflow: visible; }
#hud .join h2 { font-size: clamp(34px, 2.8vw, 52px); font-weight: 900; font-style: italic; text-transform: uppercase; }
#hud .join h2 em { color: var(--gold); }
#hud .join .qr { width: min(100%, 32vh); align-self: center; flex-shrink: 1; min-height: 0; }
#hud .join .qr img { width: 100%; aspect-ratio: 1; display: block; }
#hud .join .howto { margin-top: 10px; }
#hud .join .join-fallback { font-size: 12px; color: rgba(255,255,255,.45); text-align: center; margin-top: 8px; line-height: 1.4; }
/* tijdens een penalty blijft de QR-code groot links staan, zodat binnenkomers meteen kunnen scannen */
#hud.compact .join { padding: 18px; gap: 10px; }
#hud.compact .join .join-txt .eyebrow, #hud.compact .join .howto { display: none; }
#hud.compact .join h2 { font-size: clamp(28px, 2.3vw, 42px); }
#hud.compact .join .qr { width: min(100%, 28vh); box-shadow: 0 0 0 4px rgba(255, 210, 63, .9); }
#hud .roster-card { position: absolute; right: 2.4vw; top: 3.2vh; width: min(34vw, 560px); max-height: calc(100vh - 6.4vh - 90px); transition: opacity .4s, transform .4s; pointer-events: auto; }
#hud .roster-card .roster-head h2 { font-size: clamp(40px, 3.4vw, 64px); }
#hud .roster { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
#hud.compact .roster-card, #hud.compact .waiting-msg { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.waiting-msg { position: absolute; left: 50%; top: 3.2vh; transform: translateX(-50%); background: rgba(9, 15, 32, .82); border: 1px solid var(--glass-line); padding: 14px 24px; border-radius: 99px; font: 700 22px var(--display); letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; gap: 12px; transition: opacity .4s; }
.pulse-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(255, 210, 63, .6); animation: ring 1.6s infinite; }
@keyframes ring { 70% { box-shadow: 0 0 0 14px rgba(255, 210, 63, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 210, 63, 0); } }
.bottom-left { position: absolute; right: 2.4vw; bottom: 3.5vh; display: flex; gap: 12px; align-items: stretch; pointer-events: auto; }
.btn.gold-outline { background: rgba(9, 15, 32, .82); border: 2px solid var(--gold); color: var(--gold); font: 800 20px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; padding: 12px 18px; }
.btn.gold-outline small { font: 600 12px var(--body); text-transform: none; letter-spacing: 0; color: var(--muted); }
.btn.gold-outline:hover { background: rgba(255, 210, 63, .12); }
.btn.gold-outline:disabled { opacity: .5; }
.bottom-left .keeper-status { position: static; padding: 10px 14px; font-size: 14px; max-width: 340px; }
.keeper-status .pair-link { background: none; border: 0; color: var(--pink); font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; font-size: 14px; }
.replay-badge { position: absolute; top: 3.2vh; left: 50%; transform: translateX(-50%) skewX(-10deg); background: var(--gold); color: var(--navy); font: italic 900 30px/1 var(--display); padding: 10px 26px; letter-spacing: .08em; opacity: 0; transition: opacity .3s; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.replay-badge span { color: var(--red); animation: blink 1s infinite; }
.replay-badge.on { opacity: 1; }
#hud.replay .shooter-bar, #hud.replay .up-next { opacity: 0; }
.wipe { position: fixed; inset: 0; z-index: 25; pointer-events: none; background: linear-gradient(100deg, transparent 0 30%, var(--gold) 30% 45%, var(--red) 45% 60%, transparent 60%); background-size: 300% 100%; animation: wipe .7s cubic-bezier(.6, 0, .4, 1) forwards; }
@keyframes wipe { from { background-position: 100% 0; } to { background-position: 0% 0; } }

#closed { display: grid; grid-template-columns: 1fr minmax(320px, 30vw); gap: 3vw; align-items: center; padding: 5vh 4vw; background: radial-gradient(circle at 30% 40%, rgba(255, 210, 63, .1), rgba(0, 0, 0, .55)); }
#closed .result-card { width: auto; max-width: 720px; justify-self: center; }
.late-card { padding: 28px; display: flex; flex-direction: column; gap: 14px; animation: slideIn .6s .2s both; }
.late-card h2 { font: italic 900 clamp(44px, 4vw, 72px)/.95 var(--display); text-transform: uppercase; }
.late-card h2 span { color: #fbbf24; }
.late-card p { margin: 0; color: var(--muted); }
.late-card p b { color: #fbbf24; }
.qr.late { box-shadow: 0 0 0 6px rgba(251, 191, 36, .9), 0 0 60px rgba(251, 191, 36, .3); }
.late-list { display: flex; flex-wrap: wrap; gap: 6px; }
.late-list span { background: rgba(245, 158, 11, .15); color: #fbbf24; padding: 6px 12px; border-radius: 99px; font-weight: 600; font-size: 14px; animation: pop .5s; }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0, 0, 0, .55); }
.modal-card { width: min(520px, 92vw); padding: 32px; display: flex; flex-direction: column; gap: 16px; position: relative; animation: pop .35s cubic-bezier(.2, 1.3, .3, 1); }
.modal-card h2 { font-size: 46px; font-weight: 900; text-transform: uppercase; }
.modal-card .x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .06); cursor: pointer; }
.mono { font-family: ui-monospace, Menlo, monospace; color: var(--gold); }
#pairForm { display: flex; gap: 12px; }
#pairCode { flex: 1; min-width: 0; height: 72px; border-radius: 14px; border: 2px solid var(--glass-line); background: rgba(0, 0, 0, .35); color: var(--text); font: 900 48px var(--display); letter-spacing: .3em; text-align: center; outline: none; }
#pairCode:focus { border-color: var(--pink); }
.hint-small { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

.load-pill { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 60; background: rgba(9,15,32,.85); border: 1px solid var(--glass-line); padding: 8px 16px; border-radius: 99px; font-size: 14px; color: var(--muted); }

.lan-warn { display: flex; gap: 10px; align-items: flex-start; background: rgba(245,158,11,.14); border: 1px solid rgba(245,158,11,.45); color: #fde68a; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.45; margin-top: -8px; }
.lan-warn b { color: #fff; }

/* taalkeuze op het startscherm */
.links { align-items: center; }
.lang-switch { margin-left: auto; display: flex; padding: 3px; border-radius: 99px; background: rgba(0, 0, 0, .3); border: 1px solid var(--glass-line); }
.lang-switch button { border: 0; background: none; color: var(--muted); font: 800 14px/1 var(--display); letter-spacing: .08em; padding: 7px 11px; border-radius: 99px; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--gold); color: var(--navy); }

/* leerlingenlijst laden */
.roster-drop { border: 2px dashed var(--glass-line); border-radius: 14px; padding: 16px; background: rgba(0, 0, 0, .18); transition: border-color .2s, background .2s; }
.roster-drop.drag { border-color: var(--gold); background: rgba(255, 210, 63, .08); }
.roster-drop .ghost-btn { width: 100%; background: rgba(255, 255, 255, .08); border: 1px solid var(--glass-line); color: var(--text); font: 700 17px var(--body); padding: 14px; border-radius: 12px; cursor: pointer; }
.roster-drop .ghost-btn:hover { background: rgba(255, 255, 255, .14); }
.drop-hint { margin: 10px 0 0; color: var(--muted); font-size: 14px; text-align: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold); font: inherit; text-decoration: underline; cursor: pointer; }
.roster-drop textarea, .text-in { width: 100%; margin-top: 10px; background: rgba(0, 0, 0, .3); border: 1px solid var(--glass-line); border-radius: 12px; color: var(--text); font: 500 16px var(--body); padding: 12px 14px; outline: none; resize: vertical; }
.roster-drop textarea:focus, .text-in:focus { border-color: var(--gold); }
.text-in { margin-top: 12px; }
.roster-loaded { display: flex; align-items: center; gap: 14px; }
.roster-loaded .ok { width: 40px; height: 40px; border-radius: 50%; background: var(--green, #22c55e); display: grid; place-items: center; font-weight: 900; color: #fff; flex: none; }
.roster-loaded .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.roster-loaded .txt b { font-size: 17px; }
.roster-loaded .txt small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-drop .error:empty { display: none; }
.add-student { margin-top: 12px; width: 100%; background: rgba(255, 255, 255, .06); border: 1px dashed var(--glass-line); color: var(--muted); border-radius: 10px; padding: 10px; font: 600 15px var(--body); cursor: pointer; }
.add-student:hover { color: var(--text); border-color: var(--gold); }
.room-code { text-align: center; color: var(--muted); font: 600 15px var(--body); letter-spacing: .02em; }
.room-code b { color: var(--text); font: 900 24px/1 var(--display); letter-spacing: .18em; margin-left: 6px; }
#hud.compact .room-code b { font-size: 20px; }
.privacy-note { margin: -6px 0 0; color: var(--muted); font-size: 13px; }
#exportBtn { margin-top: 18px; width: 100%; }
.export-hint { margin: 6px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.roster-note { margin: 8px 0 0; color: var(--green); font-weight: 700; font-size: 14px; }
.roster-note:empty { display: none; }
.btn.list-closed { background: rgba(255, 255, 255, .08); border: 1px solid var(--glass-line); color: var(--text); }
.list-card { width: min(680px, 94vw); max-height: 88vh; background: rgba(9, 15, 32, .97); }
.list-card h2 { font-size: 38px; padding-right: 44px; }
.list-tools { display: flex; gap: 10px; }
.list-tools input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--glass-line); background: rgba(0, 0, 0, .35); color: var(--text); font: 600 17px var(--body); outline: none; }
.list-tools input:focus { border-color: var(--gold); }
.list-card .btn { padding: 0 14px; min-height: 44px; font: 700 15px var(--body); border-radius: 10px; white-space: nowrap; color: var(--text); background: rgba(255, 255, 255, .08); border: 1px solid var(--glass-line); box-shadow: none; }
.list-card .btn:hover { background: rgba(255, 255, 255, .16); }
.list-card .list-in { background: var(--green); border-color: var(--green); color: #06230f; }
.list-card .list-in:hover { background: #4ade80; }
.list-card .list-late { border-color: #f59e0b; color: #fbbf24; }
.list-rows { overflow-y: auto; min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.list-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid transparent; }
.list-row.present { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .3); }
.list-row .who { flex: 1; min-width: 0; }
.list-row .who b { display: block; font: 700 17px var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .who small { color: var(--muted); font-size: 13px; }
.list-del { width: 44px; height: 44px; flex: none; border-radius: 10px; border: 1px solid transparent; background: none; cursor: pointer; font-size: 17px; opacity: .6; }
.list-del:hover { opacity: 1; background: rgba(225, 17, 46, .2); border-color: rgba(225, 17, 46, .5); }
.list-none { color: var(--muted); text-align: center; margin: 18px 0; }
.late-card .room-code { margin-top: -4px; }
