:root {
  --bg: #F3F3EF; --ink: #323031; --paper: #FFFFFF; --sand: #E7E7E1; --line: #E2E2E2; --muted: #7a7677;
  --orange: #F2753A; --navy: #33475B; --sky: #6BC4E7; --yellow: #FFDD00; --ok: #2f9e6a; --bad: #d4492f;
  --font: aeonikpro, "Aeonik Pro", "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; border: 0; border-radius: 0; }
input { font-family: inherit; border-radius: 0; }
.slash { color: var(--orange); font-weight: 400; padding: 0 .15em; }
.logo svg { display: block; height: 100%; width: auto; fill: currentColor; }

/* ================= SCHERM ================= */
.screen-wrap { position: fixed; inset: 0; overflow: hidden; background: var(--bg); }
.stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; margin: -540px 0 0 -960px; transform-origin: 50% 50%; overflow: hidden; }
.stage-inner { position: absolute; inset: 0; padding: 72px 96px; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 56px; font-size: 30px; }
.topbar .logo { height: 44px; }
.topbar .meta { font-size: 30px; color: var(--muted); }
.topbar .meta b { color: var(--ink); font-weight: 500; }
.tag { display: inline-block; background: var(--ink); color: var(--bg); padding: 8px 18px; font-size: 24px; letter-spacing: .04em; text-transform: uppercase; }

/* lobby */
.lobby { display: grid; grid-template-columns: 1.05fr 1fr; gap: 96px; flex: 1; margin-top: 40px; }
.lobby h1 { font-size: 150px; line-height: .95; font-weight: 500; margin: 60px 0 24px; letter-spacing: -.02em; }
.lobby .sub { font-size: 40px; color: var(--muted); margin: 0 0 64px; }
.join-box { display: flex; gap: 40px; align-items: center; background: var(--paper); padding: 36px; }
.join-box .qr { width: 260px; height: 260px; flex: none; }
.join-box .qr svg, .join-box .qr img { width: 100%; height: 100%; display: block; }
.join-box .how { font-size: 32px; line-height: 1.35; }
.join-box .url { font-size: 40px; font-weight: 500; word-break: break-all; margin-top: 10px; }
.teams-col { display: flex; flex-direction: column; }
.teams-col h2 { font-size: 40px; font-weight: 500; margin: 60px 0 32px; display: flex; justify-content: space-between; }
.teams-col h2 span { color: var(--orange); }
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; }
.team-chip { background: var(--paper); font-size: 34px; padding: 22px 28px; border-left: 10px solid var(--c, var(--orange)); animation: pop .45s cubic-bezier(.2,1.6,.4,1) both; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-chip.empty { background: transparent; border: 3px dashed var(--line); color: var(--muted); animation: none; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* vraag */
.qwrap { flex: 1; display: flex; flex-direction: column; margin-top: 36px; min-height: 0; }
.qtext { font-size: 76px; line-height: 1.08; font-weight: 500; letter-spacing: -.015em; margin: 22px 0 0; max-width: 1640px; }
.qtext.long { font-size: 62px; }
.qbody { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; padding-top: 36px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tile { position: relative; display: flex; align-items: center; gap: 30px; padding: 0 36px; height: 150px; font-size: 42px; color: #fff; background: var(--c); overflow: hidden; }
.tile .k { flex: none; width: 76px; height: 76px; display: grid; place-items: center; background: rgba(255,255,255,.18); font-size: 40px; font-weight: 500; }
.tile .t { position: relative; z-index: 1; line-height: 1.1; }
.tile.c0 { --c: var(--orange); } .tile.c1 { --c: var(--navy); } .tile.c2 { --c: var(--sky); color: var(--ink); } .tile.c3 { --c: var(--yellow); color: var(--ink); }
.tile.c2 .k, .tile.c3 .k { background: rgba(50,48,49,.1); }
.tile .bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(0,0,0,.12); transition: width 1.2s cubic-bezier(.2,.8,.2,1); width: 0; }
.tile .cnt { margin-left: auto; position: relative; z-index: 1; font-size: 46px; font-weight: 500; }
.reveal-on .tile.wrong { opacity: .28; filter: grayscale(.6); }
.reveal-on .tile.right { outline: 8px solid var(--ink); outline-offset: -8px; }
.reveal-on .tile.right::after { content: "✓"; position: absolute; right: 36px; top: 50%; transform: translateY(-50%); font-size: 70px; }
.reveal-on .tile.right .cnt { margin-right: 80px; }

.reveal-img { flex: 1; min-height: 0; display: flex; gap: 40px; margin-bottom: 24px; }
.reveal-img .frame { flex: 1; background: var(--paper); overflow: hidden; position: relative; }
.reveal-img .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: var(--focus, 50% 50%); }
.tiles.small .tile { height: 112px; font-size: 36px; }

.estimate-box { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 300px; font-weight: 500; color: var(--orange); }
.estimate-box small { font-size: 60px; color: var(--muted); margin-left: 30px; }

.order-list { display: flex; flex-direction: column; gap: 14px; }
.order-item { background: var(--paper); font-size: 40px; padding: 26px 34px; display: flex; gap: 28px; align-items: center; }
.order-item .n { width: 60px; height: 60px; flex: none; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 32px; }
.order-item.right .n { background: var(--orange); }

.alpha-grid { display: grid; grid-template-columns: repeat(13, 1fr); gap: 12px; }
.alpha-grid div { aspect-ratio: 1; display: grid; place-items: center; font-size: 64px; font-weight: 500; background: var(--paper); color: var(--sand); }
.alpha-grid div.on { color: var(--ink); }

.footer { display: flex; align-items: center; gap: 36px; margin-top: 36px; height: 76px; }
.timer { flex: 1; height: 14px; background: var(--sand); position: relative; overflow: hidden; }
.timer i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); width: 100%; }
.timer.low i { background: var(--orange); }
.secs { font-size: 60px; font-weight: 500; width: 130px; text-align: right; font-variant-numeric: tabular-nums; }
.answered { font-size: 34px; display: flex; gap: 14px; align-items: center; white-space: nowrap; }
.answered .dots { display: flex; gap: 8px; }
.answered .dots i { width: 22px; height: 22px; background: var(--sand); display: block; }
.answered .dots i.on { background: var(--orange); animation: pop .3s both; }

/* onthulling */
.note { font-size: 36px; color: var(--muted); margin-top: 18px; }
.winners { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.winners span { background: var(--paper); font-size: 30px; padding: 12px 20px; }
.winners span b { color: var(--orange); font-weight: 500; margin-left: 10px; }
.est-line { position: relative; height: 400px; margin: 0 30px; }
.est-line .axis { position: absolute; left: 0; right: 0; top: 220px; height: 6px; background: var(--ink); }
.est-line .g { position: absolute; bottom: 164px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; transition: left 1.4s cubic-bezier(.2,.8,.2,1); }
.est-line .g .lbl { font-size: 24px; background: var(--paper); padding: 6px 12px; white-space: nowrap; }
.est-line .g .val { font-size: 24px; color: var(--muted); }
.est-line .g .pin { width: 4px; background: var(--muted); flex: none; }
.est-line .g .dot { width: 26px; height: 26px; background: var(--navy); border-radius: 50%; }
.est-line .ans { position: absolute; top: 236px; transform: translateX(-50%); text-align: center; z-index: 2; }
.est-line .ans .big { font-size: 72px; font-weight: 500; color: var(--orange); white-space: nowrap; line-height: 1.1; }
.est-line .ans .tri { width: 0; height: 0; margin: 0 auto 6px; border-left: 22px solid transparent; border-right: 22px solid transparent; border-bottom: 30px solid var(--orange); }
.rank-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; margin-top: 20px; }
.rank-row { display: flex; align-items: center; gap: 20px; font-size: 30px; background: var(--paper); padding: 14px 22px; }
.rank-row .r { width: 44px; color: var(--muted); }
.rank-row .v { margin-left: auto; color: var(--muted); }
.rank-row .p { width: 110px; text-align: right; font-weight: 500; color: var(--orange); }
.alpha-res { display: flex; flex-direction: column; gap: 10px; }
.alpha-row { display: grid; grid-template-columns: 300px 1fr 130px; align-items: center; gap: 20px; font-size: 30px; }
.alpha-row .cells { display: grid; grid-template-columns: repeat(26, 1fr); gap: 4px; }
.alpha-row .cells i { font-style: normal; display: grid; place-items: center; height: 44px; background: var(--paper); color: var(--sand); font-size: 22px; font-weight: 500; }
.alpha-row .cells i.on { background: var(--orange); color: #fff; }
.alpha-row .p { text-align: right; font-weight: 500; }

/* stand */
.board { display: flex; flex-direction: column; gap: 12px; margin-top: 40px; }
.board-row { display: grid; grid-template-columns: 70px 380px 1fr 170px; align-items: center; gap: 24px; font-size: 38px; height: 64px; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.board-row .r { color: var(--muted); }
.board-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-row .bar { height: 46px; background: var(--sand); position: relative; }
.board-row .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.board-row:nth-child(1) .bar i { background: var(--orange); }
.board-row .bar em { position: absolute; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 26px; color: var(--orange); padding-left: 14px; transition: left 1.2s cubic-bezier(.2,.8,.2,1); white-space: nowrap; }
.board-row .s { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

/* finale */
.podium { flex: 1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px; align-items: end; margin: 40px 120px 0; }
.podium .p { display: flex; flex-direction: column; align-items: center; }
.podium .nm { font-size: 48px; font-weight: 500; text-align: center; margin-bottom: 8px; }
.podium .sc { font-size: 32px; color: var(--muted); margin-bottom: 20px; }
.podium .blk { width: 100%; display: grid; place-items: center; font-size: 140px; font-weight: 500; color: #fff; animation: rise 1.4s cubic-bezier(.2,.8,.2,1) both; }
.podium .p1 .blk { height: 420px; background: var(--orange); animation-delay: 1.2s; }
.podium .p2 .blk { height: 300px; background: var(--navy); animation-delay: .6s; }
.podium .p3 .blk { height: 210px; background: var(--sky); color: var(--ink); }
.podium .p1 .nm, .podium .p1 .sc { animation: fade 1s 2.2s both; }
.podium .p2 .nm, .podium .p2 .sc { animation: fade 1s 1.6s both; }
.podium .p3 .nm, .podium .p3 .sc { animation: fade 1s 1s both; }
@keyframes rise { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }
@keyframes fade { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -40px; width: 18px; height: 18px; animation: fall linear infinite; }
@keyframes fall { to { transform: translateY(1160px) rotate(540deg); } }
.snow { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.topbar, .lobby, .qwrap, .footer { position: relative; z-index: 1; }
.snow i { position: absolute; top: -20px; color: var(--sand); font-style: normal; animation: fall linear infinite; font-size: 28px; }

/* host-bediening */
.ctrl { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; gap: 6px; background: var(--ink); padding: 6px; opacity: .0; transition: opacity .3s; font-size: 14px; }
.ctrl.show, .ctrl:hover { opacity: 1; }
.ctrl button { background: transparent; color: var(--bg); padding: 10px 14px; font-size: 14px; }
.ctrl button.main { background: var(--orange); color: #fff; }
.ctrl button:hover { background: rgba(255,255,255,.12); }
.ctrl .hint { color: #aaa; padding: 10px 8px; }
.pin-gate { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 60; }
.pin-gate form { background: var(--paper); padding: 40px; display: flex; flex-direction: column; gap: 16px; width: 360px; }
.pin-gate input { font-size: 22px; padding: 14px; border: 2px solid var(--ink); }
.pin-gate button { font-size: 18px; padding: 14px; background: var(--ink); color: var(--bg); }
.pin-gate .err { color: var(--bad); min-height: 1em; }

/* ================= TELEFOON ================= */
.phone { min-height: 100%; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
.phone .ph-top { display: flex; justify-content: space-between; align-items: center; height: 40px; }
.phone .ph-top .logo { height: 22px; }
.phone .ph-top .who { font-size: 14px; color: var(--muted); max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.phone .ph-body { flex: 1; display: flex; flex-direction: column; padding-top: 18px; }
.phone h1 { font-size: 40px; line-height: 1; font-weight: 500; margin: 30px 0 10px; letter-spacing: -.01em; }
.phone h2 { font-size: 24px; line-height: 1.15; font-weight: 500; margin: 6px 0 16px; }
.phone p { font-size: 17px; line-height: 1.4; }
.phone .muted { color: var(--muted); }
.phone label { font-size: 15px; display: block; margin: 20px 0 8px; }
.phone input[type=text], .phone input[type=number], .phone input[type=search] { width: 100%; font-size: 22px; padding: 16px; border: 2px solid var(--ink); background: var(--paper); outline: none; }
.phone input:focus { border-color: var(--orange); }
.phone .btn { width: 100%; font-size: 20px; padding: 18px; background: var(--ink); color: var(--bg); margin-top: 14px; font-weight: 500; }
.phone .btn.alt { background: var(--orange); color: #fff; }
.phone .btn:disabled { opacity: .4; }
.phone .err { color: var(--bad); font-size: 15px; min-height: 1.2em; margin-top: 8px; }
.phone .ptiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; max-height: 460px; }
.phone .ptile { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px; font-size: 18px; text-align: left; color: #fff; min-height: 130px; line-height: 1.2; }
.phone .ptile .k { font-size: 26px; font-weight: 500; width: 40px; height: 40px; display: grid; place-items: center; background: rgba(255,255,255,.2); }
.phone .ptile.c0 { background: var(--orange); } .phone .ptile.c1 { background: var(--navy); } .phone .ptile.c2 { background: var(--sky); color: var(--ink); } .phone .ptile.c3 { background: var(--yellow); color: var(--ink); }
.phone .ptile.c2 .k, .phone .ptile.c3 .k { background: rgba(50,48,49,.1); }
.phone .ptile:active { transform: scale(.97); }
.phone .ptimer { height: 6px; background: var(--sand); margin: 2px 0 14px; position: relative; overflow: hidden; }
.phone .ptimer i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.phone .ord { display: flex; flex-direction: column; gap: 8px; }
.phone .ord-row { display: flex; align-items: center; gap: 10px; background: var(--paper); padding: 10px 10px 10px 14px; font-size: 17px; }
.phone .ord-row .n { width: 30px; height: 30px; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 15px; flex: none; }
.phone .ord-row .t { flex: 1; }
.phone .ord-row button { width: 42px; height: 42px; background: var(--sand); font-size: 18px; color: var(--ink); }
.phone .ord-row button:disabled { opacity: .3; }
.phone .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.phone .chip { background: var(--paper); padding: 8px 6px 8px 12px; font-size: 15px; display: flex; align-items: center; gap: 4px; }
.phone .chip b { color: var(--orange); font-weight: 500; }
.phone .chip button { background: none; font-size: 16px; padding: 0 6px; color: var(--muted); }
.phone .mini-alpha { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; margin-top: 12px; }
.phone .mini-alpha i { font-style: normal; display: grid; place-items: center; height: 26px; background: var(--paper); color: var(--sand); font-size: 13px; font-weight: 500; }
.phone .mini-alpha i.on { background: var(--orange); color: #fff; }
.phone .add-row { display: flex; gap: 8px; }
.phone .add-row input { flex: 1; }
.phone .add-row button { padding: 0 20px; font-size: 26px; background: var(--ink); color: var(--bg); }
.phone .center { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-bottom: 40px; }
.phone .big { font-size: 64px; font-weight: 500; line-height: 1; margin: 14px 0; }
.phone .result { width: 100%; padding: 36px 20px; text-align: center; color: #fff; }
.phone .result.good { background: var(--ok); }
.phone .result.bad { background: var(--bad); }
.phone .result.none { background: var(--muted); }
.phone .result .big { font-size: 46px; }
.phone .stat { display: flex; justify-content: space-between; width: 100%; font-size: 18px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.phone .check { width: 74px; height: 74px; background: var(--orange); color: #fff; display: grid; place-items: center; font-size: 40px; }
.phone .saved { font-size: 13px; color: var(--muted); margin-top: 6px; min-height: 1em; }

/* ================= DEMO ================= */
.demo { position: fixed; inset: 0; display: grid; grid-template-columns: 1fr 400px; gap: 0; background: #2a2829; }
.demo .left { position: relative; display: flex; flex-direction: column; }
.demo .left .screen-wrap { position: absolute; inset: 0; }
.demo .banner { background: var(--ink); color: var(--bg); font-size: 14px; padding: 10px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.demo .banner b { color: var(--orange); font-weight: 500; }
.demo .banner button { background: var(--orange); color: #fff; padding: 8px 14px; font-size: 14px; }
.demo .banner button.sec { background: #4a4748; }
.demo .right { display: flex; align-items: center; justify-content: center; padding: 16px; }
.demo .device { width: 360px; height: min(760px, calc(100vh - 32px)); background: var(--bg); border: 10px solid #111; border-radius: 34px; overflow: auto; position: relative; }
.demo .device .phone { min-height: 100%; }
@media (max-width: 1000px) { .demo { grid-template-columns: 1fr; grid-template-rows: 55vh 1fr; } .demo .device { height: 100%; } }

.qbody:has(.alpha-res) { justify-content: flex-start; }
.board-row .bar em.in { transform: translate(-100%, -50%); padding: 0 14px 0 0; color: #fff; }
