/* QuizBravo: spelshow-stijl */

/* Lettertypes staan in /fonts (SIL Open Font License), zo werkt alles ook zonder Google. */
@font-face { font-family: 'Dela Gothic One'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/dela-gothic-one-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/rubik-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/rubik-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/rubik-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/rubik-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/rubik-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/rubik-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/rubik-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/rubik-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/rubik-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/rubik-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #14112B;
  --purple: #5B2EFF;
  --purple-2: #6A42FF;
  --purple-dark: #2A1470;
  --yellow: #FFD23F;
  --pink: #FF4F8B;
  --blue: #3D8BFF;
  --green: #2BD47D;
  --orange: #FF7A1A;
  --lilac: #F1ECFF;
  --muted: #4A4566;
  --display: 'Dela Gothic One', 'Arial Black', system-ui, sans-serif;
  --body: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ray-a: #6A42FF;
  --ray-b: #5B2EFF;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--ray-b);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.display { font-family: var(--display); font-weight: 400; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a { color: inherit; }

/* ---------- animaties ---------- */
@keyframes kw-spin { to { transform: rotate(360deg); } }
@keyframes kw-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes kw-wiggle { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes kw-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes kw-pop { 0% { transform: scale(0) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.15) rotate(4deg); opacity: 1; } 100% { transform: scale(1) rotate(var(--tilt, 0deg)); opacity: 1; } }
@keyframes kw-drop { 0% { transform: translateY(-120vh); } 55% { transform: translateY(0); } 70% { transform: translateY(-7%); } 85% { transform: translateY(0); } 93% { transform: translateY(-2%); } 100% { transform: translateY(0); } }
@keyframes kw-grow { 0% { transform: scaleY(0); } 70% { transform: scaleY(1.08); } 100% { transform: scaleY(1); } }
@keyframes kw-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-12px) rotate(-7deg); } 40% { transform: translateX(12px) rotate(7deg); } 60% { transform: translateX(-9px) rotate(-5deg); } 80% { transform: translateX(6px) rotate(3deg); } }
@keyframes kw-in-l { from { transform: translateX(-130%) rotate(-14deg); opacity: 0; } to { transform: translateX(0) rotate(var(--tilt, 0deg)); opacity: 1; } }
@keyframes kw-in-r { from { transform: translateX(130%) rotate(14deg); opacity: 0; } to { transform: translateX(0) rotate(var(--tilt, 0deg)); opacity: 1; } }
@keyframes kw-hop { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-30px) rotate(-8deg); } 50% { transform: translateY(0) rotate(0); } 75% { transform: translateY(-18px) rotate(8deg); } }
@keyframes kw-slam { 0% { transform: scale(3) rotate(-25deg); opacity: 0; } 60% { transform: scale(.9) rotate(-2deg); opacity: 1; } 80% { transform: scale(1.06) rotate(-5deg); } 100% { transform: scale(1) rotate(-4deg); opacity: 1; } }
@keyframes kw-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kw-up { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes kw-drum { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
@keyframes kw-flash { from { opacity: 1; } to { opacity: 0; } }

.float { display: inline-block; animation: kw-float 2.6s ease-in-out infinite; }
.wiggle { animation: kw-wiggle 1.6s ease-in-out infinite; }
.pulse { animation: kw-pulse 1.1s ease-in-out infinite; }
.pop-in { animation: kw-pop .55s cubic-bezier(.3, 1.4, .5, 1) both; }
.shake { animation: kw-shake .7s ease both; }
.hop { animation: kw-hop 1s ease-in-out 2; }
.slam { animation: kw-slam .6s cubic-bezier(.3, 1.3, .5, 1) both; }
.up-in { animation: kw-up .4s ease both; }
@media (prefers-reduced-motion: reduce) {
  .rays > div, .float, .wiggle, .pulse { animation: none !important; }
}

/* ---------- achtergrond-stralen ---------- */
.rays { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.rays > div {
  position: absolute; left: 50%; top: 42%;
  width: 320vmax; height: 320vmax; margin: -160vmax 0 0 -160vmax;
  background: repeating-conic-gradient(var(--ray-a) 0deg 9deg, var(--ray-b) 9deg 18deg);
  animation: kw-spin 60s linear infinite;
}
.rays.gold { opacity: 0; transition: opacity .4s; }
.rays.gold > div { background: repeating-conic-gradient(#FFD23F 0deg 7deg, #FF7A1A 7deg 14deg); animation-duration: 16s; }
.rays.gold.on { opacity: .92; }
body.good { --ray-a: #45E08F; --ray-b: #2BD47D; }
body.bad { --ray-a: #FF6BA0; --ray-b: #FF4F8B; }
body.sun { --ray-a: #FFDC5E; --ray-b: #FFD23F; }
body.night { --ray-a: #3A1F9A; --ray-b: #2A1470; }

#confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 50; }
#flash { position: fixed; inset: 0; background: #FFFFFF; pointer-events: none; z-index: 60; opacity: 0; }
#flash.go { animation: kw-flash .7s ease-out both; }

/* ---------- bouwstenen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.1;
  background: var(--yellow); color: var(--ink);
  border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 7px 0 var(--ink);
  padding: 14px 24px; min-height: 60px; text-decoration: none; text-align: center;
  transition: transform .08s, box-shadow .08s, filter .15s;
  user-select: none;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: 0 7px 0 var(--ink); }
.btn.white { background: #FFFFFF; }
.btn.pink { background: var(--pink); }
.btn.purple { background: var(--purple); color: #FFFFFF; }
.btn.block { display: flex; width: 100%; }
.btn.small {
  font-family: var(--body); font-weight: 800; font-size: 15px;
  min-height: 44px; padding: 0 16px; border-width: 3px; border-radius: 12px; box-shadow: 0 4px 0 var(--ink);
}
.btn.small:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

.card { background: #FFFFFF; border: 4px solid var(--ink); border-radius: 24px; box-shadow: 0 8px 0 var(--ink); }
.sticker {
  display: inline-flex; align-items: center; gap: 6px;
  border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink);
  padding: 6px 12px; font-weight: 800; background: var(--yellow); color: var(--ink);
}
.pill-dark { background: var(--ink); color: #FFFFFF; border-radius: 999px; padding: 6px 14px; font-weight: 800; }
.pill-white { background: #FFFFFF; color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; padding: 3px 14px; font-weight: 800; }

.logo { display: inline-flex; align-items: center; gap: .45em; text-decoration: none; color: #FFFFFF; font-size: 26px; }
.logo-badge {
  width: 1.5em; height: 1.5em; border-radius: .42em; background: var(--yellow);
  border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); color: var(--ink); transform: rotate(-8deg); font-size: .8em;
}
.logo-word { font-family: var(--display); text-shadow: 3px 3px 0 var(--ink); }
.logo-word .accent { color: var(--yellow); }
.logo.dark { color: var(--ink); }
.logo.dark .logo-word { text-shadow: none; }
.logo.dark .logo-word .accent { color: var(--purple); }

.a0 { background: var(--pink); }
.a1 { background: var(--blue); }
.a2 { background: var(--green); }
.a3 { background: var(--yellow); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 800; font-size: 14px; }
.input {
  width: 100%; min-height: 56px; padding: 0 14px;
  background: var(--lilac); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 14px; font-weight: 700; font-size: 18px;
}
.input:focus { outline: 3px solid var(--yellow); outline-offset: 2px; }
.input.code { font-family: var(--display); font-size: 30px; letter-spacing: 4px; text-align: center; min-height: 64px; }

.banner {
  position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: #FFFFFF; border: 3px solid #FFFFFF; border-radius: 14px;
  padding: 10px 16px; font-weight: 800; font-size: 15px; max-width: calc(100vw - 28px); text-align: center;
}
.toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%) rotate(-2deg); z-index: 70;
  background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  border-radius: 14px; padding: 12px 16px; font-weight: 800; font-size: 15px; max-width: calc(100vw - 28px); text-align: center;
  animation: kw-up .3s ease both;
}

/* =====================================================================
   TELEFOON (spelers)
   ===================================================================== */
.phone {
  position: relative; z-index: 1;
  max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px;
}
.grow { flex: 1; }
.center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.p-logo { display: flex; justify-content: center; padding-top: 14px; }
.p-logo .logo { font-size: 40px; }
.p-avatars { display: flex; justify-content: center; align-items: flex-end; gap: 4px; height: 96px; }
.p-card { padding: 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.p-card h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; text-align: center; }
.p-error { background: var(--pink); border: 3px solid var(--ink); border-radius: 12px; padding: 10px 12px; font-weight: 800; font-size: 15px; }
.p-note { margin: 0; text-align: center; font-size: 15px; font-weight: 700; color: #FFFFFF; }
.p-note a { font-weight: 800; }

.p-title { margin: 0; font-family: var(--display); font-weight: 400; font-size: 32px; text-align: center; line-height: 1.1; }
.p-white-title { color: #FFFFFF; text-shadow: 4px 4px 0 var(--ink); }

/* avatar kiezen */
.p-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.p-preview-av { display: flex; transition: transform .2s cubic-bezier(.3, 1.8, .5, 1); }
.p-preview-av.bump { transform: scale(1.25) rotate(-12deg); }
.p-namesticker { background: #FFFFFF; transform: rotate(-2deg); font-size: 18px; }
.p-avgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.p-av {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; min-height: 92px;
  background: #FFFFFF; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 3px 0 var(--ink);
  transition: transform .22s cubic-bezier(.3, 1.8, .5, 1), background .15s;
}
.p-av span { font-size: 11px; font-weight: 800; white-space: nowrap; }
.p-av[aria-checked="true"] { background: var(--pink); box-shadow: 0 5px 0 var(--ink); transform: rotate(-5deg) scale(1.08); }
.p-av:nth-child(even)[aria-checked="true"] { transform: rotate(5deg) scale(1.08); }

.p-bubble { background: #FFFFFF; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); padding: 14px 16px; font-weight: 800; font-size: 17px; text-align: center; }

/* vraag */
.p-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.p-me { display: flex; align-items: center; gap: 8px; background: #FFFFFF; border: 3px solid var(--ink); border-radius: 999px; padding: 3px 14px 3px 3px; font-weight: 800; font-size: 15px; min-width: 0; }
.p-me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.p-streak { background: var(--orange); font-size: 14px; padding: 4px 10px; }
.p-timer {
  width: 52px; height: 52px; border-radius: 999px; background: var(--yellow);
  border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 21px; flex: none;
}
.p-timer.urgent { background: var(--pink); animation: kw-pulse .5s ease-in-out infinite; }
.p-qcard { background: #FFFFFF; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink); padding: 14px 16px; transform: rotate(-1deg); }
.p-qcard small { font-size: 12px; font-weight: 800; color: var(--muted); }
.p-qcard p { margin: 4px 0 0; font-family: var(--display); font-size: 21px; line-height: 1.2; }
.p-powers { display: flex; gap: 10px; }
.p-power {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  font-weight: 800; font-size: 15px; background: #FFFFFF; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink);
  transition: transform .22s cubic-bezier(.3, 1.6, .5, 1), background .15s;
}
.p-power b { font-family: var(--display); font-weight: 400; }
.p-power[aria-pressed="true"] { background: var(--pink); box-shadow: 0 0 0 var(--ink); transform: translateY(4px) rotate(-2deg) scale(1.04); }
.p-power:disabled { opacity: .45; box-shadow: none; transform: translateY(4px); cursor: default; }
.p-answers { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-bottom: 6px; min-height: 260px; }
.p-answers.n2 { grid-template-columns: 1fr; }
.p-ans {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px;
  color: var(--ink); border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 7px 0 var(--ink);
  min-height: 110px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), opacity .2s, box-shadow .1s;
}
.p-ans:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--ink); }
.p-ans .letter { width: 34px; height: 34px; border-radius: 999px; background: #FFFFFF; border: 3px solid var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.p-ans .txt { font-family: var(--display); font-size: 19px; line-height: 1.15; text-align: center; overflow-wrap: break-word; max-width: 100%; }
.p-ans .txt.s { font-size: 42px; }
.p-ans .txt.m { font-size: 25px; }
.p-ans .txt.l { font-family: var(--body); font-weight: 800; font-size: 17px; }
.p-ans.gone { background: #4A2BC2; opacity: .35; box-shadow: none; transform: scale(.85) rotate(-6deg); }
.p-ans.gone:nth-child(even) { transform: scale(.85) rotate(6deg); }
.p-ready { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.p-ready-num { font-family: var(--display); font-size: 120px; line-height: 1; color: #FFFFFF; text-shadow: 7px 7px 0 var(--ink); }

/* resultaat */
.p-verdict { font-family: var(--display); font-size: 84px; line-height: 1; color: #FFFFFF; text-shadow: 6px 6px 0 var(--ink); display: inline-block; transform: rotate(-4deg); }
.p-sub { font-size: 16px; font-weight: 800; text-align: center; }
.p-line { background: #FFFFFF; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); padding: 10px 14px; }
.p-line-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; }
.p-line-row b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.p-line.l { --tilt: -1deg; animation: kw-in-l .5s cubic-bezier(.3, 1.3, .5, 1) both; }
.p-line.r { --tilt: 1deg; animation: kw-in-r .5s cubic-bezier(.3, 1.3, .5, 1) both; }
.p-bar { height: 14px; background: var(--lilac); border: 2px solid var(--ink); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.p-bar > div { height: 100%; width: 0; background: var(--yellow); border-right: 2px solid var(--ink); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.p-total { background: #FFFFFF; border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 7px 0 var(--ink); padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.p-total b { font-family: var(--display); font-weight: 400; font-size: 42px; line-height: 1; display: inline-block; transition: transform .2s cubic-bezier(.3, 1.8, .5, 1); }
.p-total b.bump { transform: scale(1.2); }
.p-rank { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 14px; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); background: var(--yellow); transform: rotate(-2deg); font-weight: 800; }
.p-rank b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.p-rank.plain { background: #FFFFFF; }

.p-bigrank { font-family: var(--display); font-size: 120px; line-height: 1; color: #FFFFFF; text-shadow: 7px 7px 0 var(--ink); }

/* eindstand */
.p-place { font-family: var(--display); font-size: 52px; line-height: 1.05; color: #FFFFFF; text-shadow: 5px 5px 0 var(--ink); transform: rotate(-3deg); display: inline-block; }
.p-place.gold { color: var(--yellow); }
.p-quip { background: #FFFFFF; border: 3px solid var(--ink); border-radius: 12px; padding: 6px 12px; font-weight: 800; font-size: 15px; text-align: center; }
.p-stats { display: flex; gap: 8px; }
.p-stat { flex: 1; background: #FFFFFF; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.p-stat:nth-child(2) { transform: rotate(-2deg); }
.p-stat b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.p-stat span { font-size: 12px; font-weight: 800; color: var(--muted); }
.p-history { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.p-history div { aspect-ratio: 1; border-radius: 7px; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.p-history .y { background: var(--green); }
.p-history .n { background: var(--pink); }
.p-crown { margin-bottom: -16px; position: relative; z-index: 2; }

.sheet-back { position: fixed; inset: 0; background: rgba(20, 17, 43, .75); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: kw-fade .2s both; }
.sheet { width: 100%; max-width: 480px; background: #FFFFFF; border-top: 4px solid var(--ink); border-radius: 26px 26px 0 0; padding: 14px 18px max(22px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; animation: kw-up .35s cubic-bezier(.3, 1.3, .5, 1) both; }
.sheet img { width: 56%; align-self: center; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 6px 8px 0 var(--purple); transform: rotate(3deg); }
.sheet-row { display: flex; gap: 10px; }
.sheet-row > * { flex: 1; }

/* =====================================================================
   GROOT SCHERM (host): alles in rem, schaalt mee met het scherm
   ===================================================================== */
html.host { font-size: min(1.25vw, 2.2222vh); }
html.host body { overflow: hidden; height: 100vh; }
.h-app { position: relative; z-index: 1; width: 100vw; height: 100vh; overflow: hidden; }
.h-screen { position: absolute; inset: 0; padding: 2.1rem 3.2rem 1.9rem; display: flex; flex-direction: column; gap: 1.3rem; color: #FFFFFF; }
.h-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.h-top .logo { font-size: 1.6rem; }
.h-top .pill-dark { font-size: 1.15rem; padding: .5rem 1.1rem; }
.h-codepill { font-size: 1.15rem; padding: .4rem 1rem; border-radius: .8rem; }
.h-codepill b { font-family: var(--display); font-weight: 400; }
html.host .btn { font-size: 1.5rem; min-height: 4.2rem; padding: .8rem 1.8rem; border-radius: 1.1rem; box-shadow: 0 .45rem 0 var(--ink); border-width: .25rem; }
html.host .btn.small { font-size: 1rem; min-height: 2.8rem; padding: 0 1rem; border-radius: .75rem; box-shadow: 0 .25rem 0 var(--ink); border-width: .19rem; }
.h-corner { position: fixed; right: .8rem; bottom: .8rem; z-index: 30; display: flex; gap: .5rem; }
.h-corner[hidden] { display: none; }
.h-corner button { font-family: var(--body); font-weight: 800; font-size: .85rem; background: rgba(20, 17, 43, .65); color: #FFFFFF; border: 2px solid rgba(255, 255, 255, .5); border-radius: .6rem; padding: .35rem .7rem; }

/* poort */
.h-gate { align-items: center; justify-content: center; }
.h-gate .card { padding: 2.4rem 2.8rem; color: var(--ink); text-align: center; display: flex; flex-direction: column; gap: 1.2rem; align-items: center; max-width: 46rem; }
.h-gate h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 3rem; line-height: 1.1; }
.h-gate p { margin: 0; font-size: 1.3rem; font-weight: 600; }

/* wachtruimte */
.h-lobby { flex-direction: row; gap: 2.8rem; }
.h-lobby-left { width: 27rem; display: flex; flex-direction: column; gap: 1.1rem; flex: none; }
.h-join { margin: 0; font-size: 1.45rem; font-weight: 700; }
.h-join .pill-white { font-size: 1.3rem; }
.h-code { color: var(--ink); text-align: center; font-family: var(--display); font-size: 4.1rem; letter-spacing: .05rem; line-height: 1; padding: 1.2rem .8rem; white-space: nowrap; border-width: .25rem; box-shadow: 0 .6rem 0 var(--ink); border-radius: 1.5rem; }
.h-qr-row { display: flex; align-items: center; gap: 1rem; font-weight: 800; font-size: 1.15rem; }
.h-qr { width: 7.5rem; height: 7.5rem; flex: none; background: #FFFFFF; border: .25rem solid var(--ink); border-radius: .9rem; box-shadow: 0 .35rem 0 var(--ink); padding: .3rem; transform: rotate(3deg); }
.h-qr svg, .h-qr img { display: block; width: 100%; height: 100%; }
.h-lobby-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.3rem; }
.h-lobby-head { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.h-count { font-size: 3rem; text-shadow: .25rem .25rem 0 var(--ink); }
.h-bubble { background: #FFFFFF; color: var(--ink); border: .19rem solid var(--ink); border-radius: 1rem; box-shadow: 0 .25rem 0 var(--ink); padding: .6rem 1rem; font-size: 1.15rem; font-weight: 700; transform: rotate(-2deg); }
.h-players { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.2rem, 1fr)); align-content: start; gap: .9rem; padding: .4rem .3rem 1rem; }
.h-player {
  --tilt: 0deg;
  background: #FFFFFF; color: var(--ink); border: .19rem solid var(--ink); border-radius: 1.1rem; box-shadow: 0 .3rem 0 var(--ink);
  padding: .75rem .4rem .6rem; display: flex; flex-direction: column; align-items: center; gap: .35rem; min-width: 0;
  transform: rotate(var(--tilt));
}
.h-player-name { font-size: 1.1rem; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-player.offline { opacity: .45; }
.h-hint { margin: 0; font-size: 1rem; font-weight: 600; opacity: .85; }
.h-empty { grid-column: 1 / -1; font-size: 1.5rem; font-weight: 800; opacity: .9; padding-top: 2rem; }

/* vraag */
.h-q-mid { display: flex; align-items: center; gap: 1.8rem; }
.h-q-card { flex: 1; color: var(--ink); padding: 1.7rem 2.1rem; transform: rotate(-1deg); border-width: .25rem; box-shadow: 0 .6rem 0 var(--ink); border-radius: 1.5rem; }
.h-q-card h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 3.2rem; line-height: 1.12; overflow-wrap: anywhere; }
.h-timer {
  width: 8.8rem; height: 8.8rem; border-radius: 999px; background: var(--yellow); color: var(--ink);
  border: .32rem solid var(--ink); box-shadow: 0 .5rem 0 var(--ink);
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 3.8rem;
}
.h-timer.urgent { background: var(--pink); animation: kw-pulse .5s ease-in-out infinite; }
.h-answers { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.h-answers.n2 { grid-template-rows: 1fr; }
.h-ans {
  position: relative; color: var(--ink); border: .25rem solid var(--ink); border-radius: 1.4rem; box-shadow: 0 .5rem 0 var(--ink);
  padding: 0 1.7rem; display: flex; align-items: center; gap: 1.3rem; min-width: 0; transition: opacity .4s, transform .4s cubic-bezier(.3, 1.4, .5, 1);
}
.h-ans .letter { width: 3.6rem; height: 3.6rem; flex: none; border-radius: 999px; background: #FFFFFF; border: .19rem solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 1.6rem; }
.h-ans .txt { font-family: var(--display); font-size: 2.4rem; line-height: 1.1; overflow-wrap: anywhere; }
.h-ans.hide { opacity: 0; transform: scale(.6); }
.h-ans.dim { opacity: .3; transform: scale(.95); }
.h-ans.win { transform: scale(1.03) rotate(-1deg); }
.h-ans .h-count-badge { margin-left: auto; font-family: var(--display); font-size: 2rem; background: #FFFFFF; border: .19rem solid var(--ink); border-radius: .8rem; padding: .2rem .8rem; }
.h-ans .h-check { position: absolute; right: -1rem; top: -1.4rem; background: var(--green); font-size: 1.2rem; padding: .3rem .8rem; border-radius: .8rem; border-width: .19rem; transform: rotate(8deg); }
.h-bottom { display: flex; align-items: center; gap: 1rem; font-size: 1.25rem; font-weight: 800; }
.h-bar { flex: 1; height: 1.1rem; background: var(--ink); border-radius: 999px; overflow: hidden; border: .19rem solid var(--ink); }
.h-bar > div { height: 100%; width: 0; background: var(--green); border-radius: 999px; transition: width .4s; }
.h-ready { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; padding: 3rem; background: var(--purple); transition: opacity .35s; }
.h-ready.gone { opacity: 0; pointer-events: none; }
.h-ready-num { font-family: var(--display); font-size: 12rem; line-height: 1; text-shadow: .6rem .6rem 0 var(--ink); }
.h-ready-q { max-width: 60rem; text-align: center; color: var(--ink); padding: 1.6rem 2rem; border-width: .25rem; box-shadow: 0 .6rem 0 var(--ink); border-radius: 1.5rem; transform: rotate(-1deg); }
.h-ready-q p { margin: 0; font-family: var(--display); font-size: 3rem; line-height: 1.15; }
.h-ready-label { font-family: var(--display); font-size: 2rem; text-shadow: .2rem .2rem 0 var(--ink); }

/* tussenstand */
.h-lb-title { margin: 0; font-family: var(--display); font-weight: 400; font-size: 3.6rem; text-shadow: .3rem .3rem 0 var(--ink); transform: rotate(-2deg); }
.h-lb-list { --row: 5.6rem; position: relative; height: calc(var(--row) * 5); }
.h-row {
  position: absolute; left: 0; right: 0; height: 4.7rem; color: var(--ink);
  background: #FFFFFF; border: .19rem solid var(--ink); border-radius: 1.1rem; box-shadow: 0 .32rem 0 var(--ink); overflow: hidden;
  transition: top .85s cubic-bezier(.3, 1.35, .5, 1), opacity .4s, transform .3s;
}
.h-row-bar { position: absolute; left: 0; top: 0; bottom: 0; background: #E6DCFF; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.h-row-in { position: relative; display: flex; align-items: center; gap: 1.2rem; height: 100%; padding: 0 1.5rem; }
.h-row-rank { font-family: var(--display); font-size: 1.9rem; width: 2.4rem; }
.h-row-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: .9rem; font-family: var(--display); font-size: 1.8rem; }
.h-row-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-row-streak { font-family: var(--display); font-size: .95rem; background: var(--orange); border: .19rem solid var(--ink); border-radius: .6rem; padding: .15rem .6rem; transform: rotate(-6deg) scale(0); transition: transform .4s cubic-bezier(.3, 1.8, .5, 1); white-space: nowrap; }
.h-row-move { font-family: var(--display); font-size: 1.1rem; width: 4rem; text-align: center; border-radius: .6rem; padding: .25rem 0; border: .19rem solid var(--ink); background: #FFFFFF; transform: scale(0); transition: transform .4s cubic-bezier(.3, 1.8, .5, 1); }
.h-row-move.upv { background: var(--green); }
.h-row-move.downv { background: var(--pink); }
.h-row-gain { font-size: 1.25rem; font-weight: 800; width: 6rem; text-align: center; border-radius: .6rem; padding: .25rem 0; border: .19rem solid transparent; transform: scale(0); transition: transform .4s cubic-bezier(.3, 1.8, .5, 1), opacity .4s; }
.h-row-gain.plus { background: var(--green); border-color: var(--ink); }
.h-row-gain.minus { background: var(--pink); border-color: var(--ink); }
.h-row-score { font-family: var(--display); font-size: 1.9rem; width: 9rem; text-align: right; }
.h-row.show .h-row-gain, .h-row.moved .h-row-move { transform: scale(1) rotate(0); }
.h-row.moved .h-row-streak { transform: scale(1) rotate(-6deg); }
.h-white-hint { margin: 0; font-size: 1.15rem; font-weight: 700; }

/* podium */
.h-caption { position: absolute; left: 0; right: 0; top: 6.2rem; text-align: center; z-index: 9; font-family: var(--display); font-size: 3.8rem; line-height: 1; text-shadow: .25rem .25rem 0 var(--ink); }
.h-caption.in { animation: kw-pop .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.h-caption.drum { animation: kw-drum .09s linear infinite; }
.h-caption.champ { font-size: 6rem; color: var(--yellow); text-shadow: .4rem .4rem 0 var(--ink); animation: kw-slam .6s cubic-bezier(.3, 1.3, .5, 1) both; top: 5.2rem; }
.h-dim { position: absolute; inset: 0; background: #000000; opacity: 0; pointer-events: none; z-index: 8; transition: opacity .4s; }
.h-dim.on { opacity: .6; }
.h-stage { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; z-index: 4; }
.h-col { position: absolute; bottom: 0; width: 16.2rem; display: flex; flex-direction: column; align-items: center; visibility: hidden; }
.h-col.show { visibility: visible; }
.h-col.p1 { left: calc(50% - 8.1rem); }
.h-col.p2 { left: calc(50% - 8.1rem - 19rem); }
.h-col.p3 { left: calc(50% - 8.1rem + 19rem); }
.h-col-head { display: flex; flex-direction: column; align-items: center; gap: .4rem; margin-bottom: .9rem; }
.h-col.show .h-col-head { animation: kw-drop 1.1s cubic-bezier(.3, .9, .4, 1) .25s both; }
.h-col-name { font-family: var(--display); font-size: 1.8rem; text-shadow: .19rem .19rem 0 var(--ink); max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-col.p1 .h-col-name { font-size: 2.5rem; }
.h-col-score { font-family: var(--display); font-size: 1.15rem; color: var(--ink); background: #FFFFFF; border: .19rem solid var(--ink); border-radius: 999px; box-shadow: 0 .19rem 0 var(--ink); padding: .1rem .9rem; }
.h-col-block { width: 100%; border: .25rem solid var(--ink); border-bottom: none; border-radius: 1.25rem 1.25rem 0 0; display: flex; justify-content: center; padding-top: .7rem; transform-origin: 50% 100%; transform: scaleY(0); }
.h-col.show .h-col-block { animation: kw-grow .6s cubic-bezier(.3, 1.4, .5, 1) both; }
.h-col-block span { font-family: var(--display); font-size: 4rem; line-height: 1; color: var(--ink); }
.h-col.p1 .h-col-block { height: 14rem; background: var(--yellow); }
.h-col.p1 .h-col-block span { font-size: 5.2rem; }
.h-col.p2 .h-col-block { height: 10.3rem; background: var(--blue); }
.h-col.p3 .h-col-block { height: 6.9rem; background: var(--orange); }
.h-col.p1.show .h-col-block { box-shadow: 0 0 5rem 1.2rem rgba(255, 210, 63, .55); }
.h-col-av { display: flex; flex-direction: column; align-items: center; }
.h-crown { width: 5.2rem; margin-bottom: -2.4rem; position: relative; z-index: 2; opacity: 0; }
.h-col.crowned .h-crown { animation: kw-pop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.h-col.crowned .h-col-av { animation: kw-hop 1s ease-in-out .5s infinite; }
.h-end { position: absolute; right: 3.2rem; top: 2.1rem; z-index: 12; display: flex; gap: .7rem; }

/* ---------- pakketten en betalen ---------- */
.h-gate .card.gate-wide { max-width: 72rem; width: 100%; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; width: 100%; }
.tier { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1.3rem .8rem 1.1rem; background: var(--lilac); color: var(--ink); border: .22rem solid var(--ink); border-radius: 1.2rem; box-shadow: 0 .4rem 0 var(--ink); font: inherit; cursor: pointer; transition: transform .12s; }
.tier:hover:not(:disabled) { transform: translateY(-.25rem) rotate(-1deg); }
.tier:active:not(:disabled) { transform: translateY(.3rem); box-shadow: 0 .1rem 0 var(--ink); }
.tier.hot { background: var(--yellow); }
.tier.owned { background: var(--green); }
.tier.soon { opacity: .55; cursor: not-allowed; }
.tier.busy { opacity: .7; cursor: progress; }
.tier-flag { position: absolute; top: -.9rem; background: var(--pink); color: #FFFFFF; border: .16rem solid var(--ink); border-radius: 999px; padding: .1rem .7rem; font-weight: 800; font-size: .85rem; transform: rotate(-4deg); }
.tier-name { font-family: var(--display); font-size: 1.5rem; }
.tier-max { font-weight: 600; font-size: 1.05rem; }
.tier-max b { font-family: var(--display); font-weight: 400; font-size: 1.3rem; }
.tier-price { font-family: var(--display); font-size: 2rem; line-height: 1.1; }
.tier-price s { font-family: var(--body); font-size: 1rem; font-weight: 700; opacity: .6; }
.tier-note { font-size: .9rem; font-weight: 600; color: var(--muted); }
.gate-small { font-size: 1rem !important; font-weight: 500 !important; color: var(--muted); line-height: 1.5; }
.gate-small a { color: var(--purple); font-weight: 800; }
.gate-error { background: #FFE3EC; border: .19rem solid #B0003A; color: #8A002E; border-radius: .9rem; padding: .7rem 1rem; font-weight: 700; }
.gate-ticket { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem; background: #DFFBEA; border: .19rem solid var(--ink); border-radius: .9rem; padding: .6rem 1rem; font-weight: 600; font-size: 1.1rem; }
.h-max { font-size: .55em; opacity: .8; }
.h-upsell { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; background: var(--yellow); color: var(--ink); border: .19rem solid var(--ink); border-radius: 1rem; box-shadow: 0 .3rem 0 var(--ink); padding: .6rem .6rem .6rem 1.1rem; font-size: 1.15rem; font-weight: 600; animation: kw-pop .4s both; }
.h-upsell[hidden] { display: none; }
.h-upsell span { flex: 1; min-width: 14rem; }
