/* Raad de Wagen — carnaval-quizshow: hofkapelblauw, kermislampjes en dikke arcadeknoppen */
:root {
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-game: 'Lilita One', 'Nunito', system-ui, sans-serif;

  /* basis: hofkapelblauw */
  --bg: #1c2a7a;
  --bg-deep: #121c5c;
  --panel: #25358f;
  --panel-2: #2d3fa3;
  --panel-deep: #16215f;
  --edge: #0e1647;
  --line: rgba(255, 255, 255, .10);
  --text: #fff7e6;
  --muted: #b9c2f0;
  --faint: #8290d6;

  /* carnavalskleuren */
  --geel: #ffc628;
  --geel-edge: #c98a00;
  --rood: #e8303f;
  --rood-edge: #9e1523;
  --groen: #1fa85b;
  --groen-edge: #0f6b38;
  --lucht: #2f8ce8;
  --lucht-edge: #1a5aa3;
  --paars: #8a4fd8;
  --paars-edge: #582b9c;
  --roze: #e0489a;
  --roze-edge: #9a2464;
  --oranje: #f47a1f;

  --r-lg: 22px;
  --r: 16px;
  --r-sm: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  background-color: var(--bg);
  /* spotlicht + heel subtiel confettipatroon */
  background-image:
    radial-gradient(900px 520px at 50% -120px, rgba(255, 214, 120, .20), transparent 70%),
    radial-gradient(120% 90% at 50% 120%, var(--bg-deep), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg opacity='.10'%3E%3Crect x='18' y='22' width='10' height='5' rx='1' fill='%23ffc628' transform='rotate(25 23 24)'/%3E%3Crect x='96' y='14' width='9' height='5' rx='1' fill='%23e8303f' transform='rotate(-30 100 16)'/%3E%3Crect x='130' y='70' width='10' height='5' rx='1' fill='%231fa85b' transform='rotate(60 135 72)'/%3E%3Ccircle cx='62' cy='64' r='3' fill='%23fff7e6'/%3E%3Crect x='40' y='116' width='10' height='5' rx='1' fill='%23e8303f' transform='rotate(-55 45 118)'/%3E%3Crect x='104' y='128' width='9' height='5' rx='1' fill='%23ffc628' transform='rotate(15 108 130)'/%3E%3Ccircle cx='146' cy='140' r='2.5' fill='%231fa85b'/%3E%3Ccircle cx='10' cy='88' r='2.5' fill='%23ffc628'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
}
a { color: var(--geel); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; background: var(--panel-deep); padding: 1px 6px; border-radius: 6px; color: var(--text); word-break: break-all; }
h1, h2, h3, h4 { font-family: var(--font-game); font-weight: 400; line-height: 1.1; margin: 0 0 12px; letter-spacing: .01em; }
h1 { font-size: 40px; } h2 { font-size: 26px; } h3 { font-size: 20px; } h4 { font-size: 17px; }
p { margin: 0 0 12px; }
button { font: inherit; color: inherit; }
::selection { background: var(--geel); color: #2a1a00; }
:focus-visible { outline: 3px solid var(--geel); outline-offset: 3px; }
.ic { flex: none; vertical-align: -0.2em; display: inline-block; }
.ic .fill { fill: currentColor; stroke: none; }
.ic-star { color: var(--geel); } .ic-starOff { color: rgba(255,255,255,.18); }
.ic-flame { color: var(--oranje); } .ic-crown, .ic-trophy, .ic-coin { color: var(--geel); }
.ic-heart { color: var(--rood); } .ic-check { color: #5fe39a; } .ic-cross { color: #ff7d88; }
.px-btn .ic, .tagpill .ic, .bottomnav .ic, .topbar .ic, .player-btn .ic, .tile .ic { color: inherit; }

#bg-canvas { display: none; }
.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 900; }
#sc-holder { position: fixed; left: -2000px; top: 0; width: 300px; height: 166px; opacity: 0; pointer-events: none; }
#sc-holder iframe { width: 300px; height: 166px; border: 0; }

/* ---------------------------------------------------------------- panelen (dik, met "onderrand") */
.px-box, .px-card {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  margin: 0 0 22px;
  position: relative;
  box-shadow: 0 6px 0 var(--edge);
}
.px-box.alt, .px-box.dark { background: var(--panel-deep); }
.px-box.cream { background: #fff7e6; color: #2b2250; border-color: #fff7e6; box-shadow: 0 6px 0 #c9b98f; }
.px-box.cream .muted { color: #6d6492; }
.px-box.gold { background: var(--geel); color: #3a2600; border-color: var(--geel); box-shadow: 0 6px 0 var(--geel-edge); }
.px-box.gold .muted { color: #6b4a00; }
.px-box > h2:first-child, .px-box > h3:first-child { margin-top: 0; }
.box-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.box-title h2, .box-title h3 { margin: 0; }
.box-title .spacer { flex: 1; }
.section-label { font-size: 15px; font-weight: 800; color: var(--muted); margin: 0 0 10px; }

/* ---------------------------------------------------------------- arcadeknoppen */
.px-btn {
  --c: var(--panel-2); --e: var(--edge); --t: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-game); font-size: 17px; line-height: 1.1; letter-spacing: .02em;
  color: var(--t); background: var(--c); border: 0; border-radius: var(--r-sm);
  padding: 11px 18px; min-height: 46px; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: 0 5px 0 var(--e), inset 0 2px 0 rgba(255,255,255,.22);
  transform: translateY(0); transition: transform .08s, box-shadow .08s, filter .15s;
  user-select: none; -webkit-user-select: none; position: relative;
}
.px-btn:hover { filter: brightness(1.08); text-decoration: none; color: var(--t); }
.px-btn:active, .px-btn.pressed { transform: translateY(4px); box-shadow: 0 1px 0 var(--e), inset 0 2px 0 rgba(255,255,255,.22); }
.px-btn[disabled], .px-btn.disabled { filter: grayscale(.6) brightness(.8); opacity: .6; cursor: not-allowed; transform: none; }
.px-btn.primary, .px-btn.yellow { --c: var(--geel); --e: var(--geel-edge); --t: #3a2600; }
.px-btn.red { --c: var(--rood); --e: var(--rood-edge); --t: #fff; }
.px-btn.green { --c: var(--groen); --e: var(--groen-edge); --t: #fff; }
.px-btn.blue { --c: var(--lucht); --e: var(--lucht-edge); --t: #fff; }
.px-btn.purple { --c: var(--paars); --e: var(--paars-edge); --t: #fff; }
.px-btn.cream { --c: #fff7e6; --e: #c9b98f; --t: #2b2250; }
.px-btn.dark { --c: rgba(255,255,255,.10); --e: rgba(0,0,0,.25); --t: var(--text); box-shadow: 0 4px 0 var(--e); }
.px-box.cream .px-btn.dark { --c: #ece2c8; --e: #c9b98f; --t: #2b2250; }
.px-btn.big { font-size: 20px; padding: 14px 24px; min-height: 56px; border-radius: 14px; }
.px-btn.huge { font-size: 26px; padding: 18px 34px; min-height: 68px; border-radius: 18px; box-shadow: 0 7px 0 var(--e), inset 0 3px 0 rgba(255,255,255,.25); }
.px-btn.huge:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--e); }
.px-btn.small { font-family: var(--font); font-weight: 800; font-size: 14px; padding: 7px 12px; min-height: 36px; border-radius: 10px; box-shadow: 0 3px 0 var(--e); }
.px-btn.small:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--e); }
.px-btn.block { display: flex; width: 100%; }
.px-btn.icon-only { padding: 6px; min-width: 40px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap { gap: 10px; }
.center { text-align: center; justify-content: center; }
.muted { color: var(--muted); }
.small-text { font-size: 14px; }
.hidden { display: none !important; }
.error-box { background: rgba(232,48,63,.18); border: 2px solid rgba(232,48,63,.55); border-radius: var(--r-sm); padding: 10px 14px; color: #ffd6da; margin: 0 0 12px; }
.ok-box { background: rgba(31,168,91,.18); border: 2px solid rgba(31,168,91,.55); border-radius: var(--r-sm); padding: 10px 14px; }
.big-list li { margin-bottom: 8px; }

/* ---------------------------------------------------------------- formulieren */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 800; color: var(--muted); }
.px-input, .px-select {
  background: var(--panel-deep); color: var(--text); font: inherit; font-weight: 700; font-size: 16px;
  border: 2px solid rgba(255,255,255,.14); border-radius: var(--r-sm); padding: 10px 12px; width: 100%; min-height: 46px; outline: none;
  transition: border-color .15s;
}
.px-input::placeholder { color: var(--faint); }
.px-input:focus, .px-select:focus { border-color: var(--geel); }
.px-select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffc628' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.px-select option { background: var(--panel-deep); color: var(--text); }
textarea.px-input { min-height: 100px; resize: vertical; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; }
.check input { width: 18px; height: 18px; accent-color: var(--geel); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 16px; }

/* ---------------------------------------------------------------- layout */
#app { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; }
#view { flex: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 30px 20px 90px; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px; padding: 0 20px; height: 68px;
  background: var(--bg-deep);
  box-shadow: 0 4px 0 rgba(0,0,0,.25);
}
/* vlaggetjeslijn in carnavalskleuren */
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; top: calc(100% - 3px); height: 18px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='18' viewBox='0 0 120 18'%3E%3Cpath d='M0 2 Q60 7 120 2' fill='none' stroke='%230e1647' stroke-width='2'/%3E%3Cpath d='M6 3.4 L26 4.4 L16 17z' fill='%23e8303f'/%3E%3Cpath d='M46 4.6 L66 4.8 L56 17.5z' fill='%23ffc628'/%3E%3Cpath d='M86 4.3 L106 3.5 L96 17z' fill='%231fa85b'/%3E%3C/svg%3E") 0 0 / 120px 18px repeat-x;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.2));
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--geel); font-family: var(--font-game); font-size: 25px; white-space: nowrap; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--rood); color: #fff; box-shadow: 0 4px 0 var(--rood-edge); transform: rotate(-6deg); }
.brand .b2 { color: var(--text); }
.topnav { display: flex; gap: 4px; margin-left: 10px; }
.topnav a { font-family: var(--font-game); font-size: 17px; color: var(--muted); padding: 8px 14px; border-radius: 12px; }
.topnav a:hover { color: var(--text); background: rgba(255,255,255,.07); text-decoration: none; }
.topnav a.active { color: #3a2600; background: var(--geel); box-shadow: 0 3px 0 var(--geel-edge); }
.topbar .spacer { flex: 1; }
.sound-toggles { display: flex; gap: 8px; }
.sound-toggles .px-btn { --t: var(--faint); }
.sound-toggles .px-btn.on { --t: var(--geel); }
.user-chip { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 4px 14px 4px 4px; border-radius: 999px; background: rgba(255,255,255,.08); }
.user-chip:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.user-chip .uc-text { display: flex; flex-direction: column; line-height: 1.1; }
.user-chip .uc-name { font-family: var(--font-game); font-size: 16px; }
.user-chip .uc-lvl { font-size: 12px; color: var(--muted); font-weight: 800; }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-family: var(--font-game); flex: none; text-shadow: 0 2px 0 rgba(0,0,0,.25); box-shadow: 0 3px 0 rgba(0,0,0,.3), inset 0 0 0 3px rgba(255,255,255,.25); }

.bottomnav { display: none; }
@media (max-width: 1100px) { .user-chip .uc-text { display: none; } .user-chip { padding: 3px; } }
@media (max-width: 860px) {
  .topnav { display: none; }
  .topbar { padding: 0 14px; height: 60px; }
  .brand { font-size: 21px; }
  .bottomnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: var(--bg-deep); box-shadow: 0 -4px 0 rgba(0,0,0,.25);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--faint); font-family: var(--font-game); font-size: 13px; padding: 4px 0; border-radius: 12px; }
  .bottomnav a:hover { text-decoration: none; }
  .bottomnav a.active { color: var(--geel); }
}
@media (max-width: 420px) { .brand .brand-text { display: none; } }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-home { grid-template-columns: 1.5fr 1fr; align-items: start; }
.grid > *, .game-main > *, .admin-layout > *, .lightbox-grid > * { min-width: 0; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-home { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- koppen */
.page-head { margin: 8px 0 26px; }
.page-head h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 6px; color: var(--geel); text-shadow: 0 4px 0 rgba(0,0,0,.3); }
.page-head p { color: var(--muted); margin: 0; font-size: 17px; }
.page-head .page-date { color: var(--text); font-weight: 800; margin-top: 4px; }

/* ---------------------------------------------------------------- kermisbord met lampjes */
.marquee {
  --bulb: 22px;
  --sign: var(--rood);
  --sign-edge: var(--rood-edge);
  position: relative; border-radius: 26px; padding: var(--bulb);
  background: var(--sign);
  box-shadow: 0 8px 0 var(--sign-edge), 0 18px 40px rgba(0,0,0,.35);
  transition: background .3s, box-shadow .3s;
}
/* lampjes: posities komen uit ui.js (layoutBulbs), het looplicht is een CSS-animatie in 3 fasen */
.marquee > .bulbs { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.marquee .bulb {
  --s: calc(var(--bulb) * .52);
  position: absolute; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff 0 16%, #fff4c0 30%, #ffd24a 62%, #e39a08 100%);
  box-shadow: 0 0 0 1.5px rgba(90, 24, 10, .55), 0 0 calc(var(--bulb) * .45) calc(var(--bulb) * .1) rgba(255, 206, 70, .75);
  animation: bulb-chase 1.2s infinite;
}
.marquee .bulb.p1 { animation-delay: -.4s; }
.marquee .bulb.p2 { animation-delay: -.8s; }
@keyframes bulb-chase {
  0%, 66% {
    background: radial-gradient(circle at 38% 32%, #fff 0 16%, #fff4c0 30%, #ffd24a 62%, #e39a08 100%);
    box-shadow: 0 0 0 1.5px rgba(90, 24, 10, .55), 0 0 calc(var(--bulb) * .45) calc(var(--bulb) * .1) rgba(255, 206, 70, .75);
    animation-timing-function: steps(1, end);
  }
  66.7%, 100% {
    background: radial-gradient(circle at 38% 32%, #b0584a 0 14%, #7a2a18 45%, #561a0e 100%);
    box-shadow: 0 0 0 1.5px rgba(60, 14, 6, .6), 0 0 0 0 rgba(255, 206, 70, 0);
    animation-timing-function: steps(1, end);
  }
}
.marquee.win .bulb { animation-duration: .3s; }
.marquee.lose { --sign: #5b2036; --sign-edge: #36101f; }
.marquee.lose .bulb { animation: none; opacity: .35; filter: grayscale(.6); box-shadow: 0 0 0 1.5px rgba(60, 14, 6, .6); }
@media (prefers-reduced-motion: reduce) { .marquee .bulb { animation: none; } }
.marquee-inner { position: relative; z-index: 1; border-radius: 10px; overflow: hidden; background: #0c1240; }

/* ---------------------------------------------------------------- home */
.hero { margin-bottom: 32px; }
.hero .marquee-inner { min-height: 380px; display: flex; align-items: flex-end; padding: 34px; }
.hero-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .8s; }
.hero-img.loaded { opacity: 1; }
.hero .marquee-inner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,18,64,0) 0%, rgba(12,18,64,.55) 45%, rgba(12,18,64,.96) 100%); }
.hero-content { position: relative; z-index: 1; max-width: 640px; }
.game-title { font-family: var(--font-game); font-size: clamp(54px, 9vw, 96px); line-height: .9; color: var(--geel); margin: 0 0 14px; letter-spacing: .01em;
  text-shadow: 0 5px 0 var(--rood-edge), 0 10px 0 rgba(0,0,0,.35); transform: rotate(-2deg); transform-origin: left bottom; }
.hero p { font-size: 19px; color: #eef1ff; margin-bottom: 24px; max-width: 520px; font-weight: 700; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.hero-credit { position: absolute; right: 16px; bottom: 12px; font-size: 13px; color: rgba(255,255,255,.75); z-index: 1; max-width: 45%; text-align: right; font-weight: 700; }
@media (max-width: 600px) { .hero .marquee-inner { min-height: 420px; padding: 20px; } .hero-credit { display: none; } .marquee { --bulb: 16px; } }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 34px; }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile {
  --c: var(--lucht); --e: var(--lucht-edge);
  display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 14px; border-radius: 18px; color: #fff;
  background: var(--c); box-shadow: 0 6px 0 var(--e), inset 0 2px 0 rgba(255,255,255,.22); transition: transform .08s, box-shadow .08s, filter .15s;
}
.tile:hover { text-decoration: none; filter: brightness(1.07); }
.tile:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--e); }
.tile .t-title { font-family: var(--font-game); font-size: 23px; line-height: 1; margin-top: 4px; }
.tile .t-sub { font-size: 14px; opacity: .92; font-weight: 700; }
.tile.red { --c: var(--rood); --e: var(--rood-edge); }
.tile.green { --c: var(--groen); --e: var(--groen-edge); }
.tile.purple { --c: var(--paars); --e: var(--paars-edge); }
.tile.pink { --c: var(--roze); --e: var(--roze-edge); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; }
.stat-row .n { font-family: var(--font-game); font-size: 34px; display: block; color: var(--geel); line-height: 1.1; }
.stat-row .l { font-size: 14px; color: var(--muted); }
.prince { display: flex; align-items: center; gap: 16px; }
.prince .crowned { position: relative; }
.prince .crowned .ic { position: absolute; top: -20px; left: 50%; transform: translateX(-50%) rotate(-8deg); color: #3a2600; }
.prince .pname { font-family: var(--font-game); font-size: 28px; line-height: 1; }
.xpbar { height: 16px; background: var(--panel-deep); border-radius: 999px; position: relative; overflow: hidden; box-shadow: inset 0 2px 0 rgba(0,0,0,.3); }
.xpbar > div { height: 100%; border-radius: 999px; background: linear-gradient(180deg, #6ff0a8, var(--groen)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.xp-caption { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 800; }
.level-badge { font-family: var(--font-game); font-size: 15px; background: var(--geel); color: #3a2600; padding: 3px 10px; border-radius: 999px; display: inline-block; box-shadow: 0 3px 0 var(--geel-edge); }

/* ---------------------------------------------------------------- spelvorm kiezen */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.choice {
  --e: var(--edge);
  position: relative; overflow: hidden; cursor: pointer; text-align: left; width: 100%;
  background: var(--panel); border: 3px solid transparent; border-radius: 20px; padding: 20px; color: var(--text);
  box-shadow: 0 6px 0 var(--e); transition: transform .08s, box-shadow .08s, border-color .15s;
}
.choice:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--e); }
.choice.selected { border-color: var(--geel); --e: var(--geel-edge); }
.choice.selected::after { content: ''; position: absolute; z-index: 3; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; background: var(--geel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a2600' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 18px no-repeat; box-shadow: 0 3px 0 var(--geel-edge); }
.choice.photo-choice { min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; }
.choice .choice-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .6s; }
.choice .choice-bg.loaded { opacity: 1; }
.choice.photo-choice::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(12,18,64,0), rgba(12,18,64,.92)); }
.choice.photo-choice > *:not(.choice-bg) { position: relative; z-index: 2; }
.choice h3 { font-size: 30px; margin-bottom: 4px; color: inherit; }
.choice .stars { margin: 2px 0 10px; display: flex; gap: 2px; }
.choice .pool { font-size: 15px; color: var(--muted); }
.choice.photo-choice .pool { color: #e0e5ff; }
.choice .tag { position: absolute; top: 14px; right: 14px; font-family: var(--font-game); font-size: 16px; background: var(--rood); color: #fff; padding: 4px 10px; border-radius: 10px; transform: rotate(4deg); box-shadow: 0 3px 0 var(--rood-edge); }
.choice.selected .tag { right: 58px; }
.step-label { font-family: var(--font-game); font-size: 24px; color: var(--text); margin: 30px 0 14px; }
.start-bar { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 34px; }

/* ---------------------------------------------------------------- spel */
.game { max-width: 1120px; margin: 0 auto; }
.hud { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.hud .hud-item { font-family: var(--font-game); font-size: 19px; display: flex; align-items: center; gap: 8px; background: var(--panel-deep); padding: 7px 16px; border-radius: 999px; box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.hud .hud-score { color: var(--geel); min-width: 100px; justify-content: center; }
.hud .hud-score.bump { animation: pop .4s; }
.hud .hud-streak.hot { background: var(--oranje); color: #fff; }
.hud .hud-streak.hot .ic { color: #fff; }
.hud .spacer { flex: 1; }
.progress-dots { display: flex; gap: 6px; }
.progress-dots i { width: 16px; height: 16px; border-radius: 50%; background: var(--panel-deep); display: block; box-shadow: inset 0 2px 0 rgba(0,0,0,.35); }
.progress-dots i.ok { background: var(--groen); }
.progress-dots i.bad { background: var(--rood); }
.progress-dots i.cur { background: var(--geel); box-shadow: 0 0 0 4px rgba(255,198,40,.3); }
.game-main { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .game-main { grid-template-columns: 1fr; gap: 26px; } }
.photo-frame { position: relative; }
.photo-stage { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #0a0f38; overflow: hidden; border-radius: 10px; cursor: zoom-in; }
.photo-stage canvas { width: 100%; height: 100%; display: block; }
.photo-stage .loader { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-family: var(--font-game); font-size: 20px; color: var(--muted); background: #0a0f38; }
.photo-stage .loader .ic { animation: bob .8s ease-in-out infinite; color: var(--geel); }
@keyframes bob { 50% { transform: translateY(-6px); } }
.photo-caption { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); z-index: 3; white-space: nowrap; font-family: var(--font-game); font-size: 16px; color: #3a2600; background: var(--geel); padding: 5px 16px; border-radius: 999px; box-shadow: 0 3px 0 var(--geel-edge); }
.hint-bubble { position: absolute; left: 14px; right: 14px; bottom: 14px; background: #fff7e6; color: #2b2250; padding: 10px 14px; font-size: 18px; font-weight: 800; border-radius: 14px; box-shadow: 0 4px 0 #c9b98f; animation: pop .3s; z-index: 3; }
.hint-bubble b { font-size: 13px; display: block; color: var(--rood); }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* afteltimer (ring) */
.timer-ring { position: absolute; top: -18px; right: -18px; z-index: 4; width: 78px; height: 78px; border-radius: 50%; background: var(--bg-deep); box-shadow: 0 5px 0 rgba(0,0,0,.35), 0 0 0 4px var(--geel); display: grid; place-items: center; }
.timer-ring svg { position: absolute; inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); transform: rotate(-90deg); }
.timer-ring .track { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 5; }
.timer-ring .bar { fill: none; stroke: var(--groen); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; transition: stroke .3s; }
.timer-ring span { position: relative; font-family: var(--font-game); font-size: 30px; line-height: 1; }
.timer-ring.warn .bar { stroke: var(--geel); }
.timer-ring.danger .bar { stroke: var(--rood); }
.timer-ring.danger span { color: #ff8b95; animation: pop .5s infinite; }
@media (max-width: 600px) { .timer-ring { width: 62px; height: 62px; top: -14px; right: -8px; } .timer-ring span { font-size: 24px; } }

.question-title { font-family: var(--font-game); font-size: 30px; line-height: 1.05; margin: 2px 0 18px; }
.options { display: grid; gap: 12px; }
.options.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .options { grid-template-columns: 1fr 1fr; } }
@media (max-width: 360px) { .options { grid-template-columns: 1fr; } }
/* antwoordtegels in quizshowkleuren */
.option { justify-content: flex-start !important; text-align: left; white-space: normal !important; min-height: 68px !important; padding: 10px 12px !important; font-size: 18px !important; border-radius: 14px !important; }
.options .option:nth-child(6n+1) { --c: var(--rood); --e: var(--rood-edge); --t: #fff; }
.options .option:nth-child(6n+2) { --c: var(--lucht); --e: var(--lucht-edge); --t: #fff; }
.options .option:nth-child(6n+3) { --c: var(--geel); --e: var(--geel-edge); --t: #3a2600; }
.options .option:nth-child(6n+4) { --c: var(--groen); --e: var(--groen-edge); --t: #fff; }
.options .option:nth-child(6n+5) { --c: var(--paars); --e: var(--paars-edge); --t: #fff; }
.options .option:nth-child(6n+6) { --c: var(--roze); --e: var(--roze-edge); --t: #fff; }
.option[disabled] { opacity: 1; filter: none; cursor: default; }
.option .opt-key { font-family: var(--font-game); font-size: 17px; background: rgba(255,255,255,.28); color: inherit; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.option .opt-logo { width: 34px; height: 34px; object-fit: contain; background: #fff; border-radius: 9px; flex: none; }
.option .opt-name { line-height: 1.05; overflow-wrap: anywhere; }
.option.removed { visibility: hidden; }
.option.is-correct { --c: var(--groen) !important; --e: var(--groen-edge) !important; --t: #fff !important; animation: win .6s; z-index: 2; box-shadow: 0 5px 0 var(--e), 0 0 0 4px #fff, 0 0 30px rgba(111,240,168,.65) !important; }
.option.is-correct .opt-key { background: #fff; color: var(--groen); }
.option.is-wrong { --c: #7b1b2a !important; --e: #4a0e18 !important; --t: #ffd6da !important; animation: shake .4s; }
.option.dimmed { opacity: .32 !important; filter: saturate(.25) !important; }
@keyframes win { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.float-points { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); font-family: var(--font-game); font-size: 38px; color: var(--geel); text-shadow: 0 3px 0 var(--geel-edge), 0 6px 14px rgba(0,0,0,.45); pointer-events: none; animation: floatup 1.4s ease-out forwards; z-index: 5; white-space: nowrap; }
@keyframes floatup { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -16px) scale(1.2); } 100% { opacity: 0; transform: translate(-50%, -80px) scale(1); } }
.jokers { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.jokers .px-btn { flex: 1; min-width: 90px; }
.jokers .cost { font-size: 12px; opacity: .85; font-family: var(--font); font-weight: 800; }
.result-panel { margin-top: 20px; }
.verdict { font-family: var(--font-game); font-size: 42px; line-height: 1; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.verdict.good { color: var(--groen); } .verdict.bad { color: var(--rood); }
.verdict .ic { color: inherit; }
.points-pop { font-size: 17px; color: #6d6492; font-weight: 800; }
.points-pop b { font-family: var(--font-game); font-weight: 400; color: #2b2250; font-size: 28px; }
.breakdown { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.breakdown span { font-size: 13px; font-weight: 800; background: #ece2c8; color: #5b5180; padding: 3px 10px; border-radius: 999px; }
.wagen-info .wi-club { display: flex; align-items: center; gap: 12px; font-family: var(--font-game); font-size: 27px; line-height: 1.05; margin-bottom: 8px; }
.wagen-info .wi-club img { width: 48px; height: 48px; object-fit: contain; background: #fff; border-radius: 12px; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.wagen-info .wi-title { font-size: 18px; font-style: italic; margin-bottom: 12px; }
.wagen-info .wi-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tagpill { font-size: 13px; font-weight: 800; background: rgba(255,255,255,.12); color: var(--text); padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; }
.px-box.cream .tagpill { background: #ece2c8; color: #4b4170; }
.tagpill.yellow { background: var(--geel) !important; color: #3a2600 !important; }
.result-divider { border: 0; border-top: 2px dashed #e0d3b0; margin: 16px 0; }
.next-row { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* aftellen */
.overlay { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; background: rgba(12,18,64,.88); }
.countdown { font-family: var(--font-game); font-size: clamp(130px, 26vw, 260px); line-height: 1; color: var(--geel); text-shadow: 0 10px 0 var(--rood-edge), 0 20px 0 rgba(0,0,0,.35); animation: zoomin .55s cubic-bezier(.2,1.6,.4,1) forwards; }
.countdown.go { color: #fff; font-size: clamp(80px, 15vw, 160px); text-shadow: 0 8px 0 var(--groen-edge), 0 16px 0 rgba(0,0,0,.35); }
@keyframes zoomin { 0% { transform: scale(2.2) rotate(-12deg); opacity: 0; } 100% { transform: scale(1) rotate(-3deg); opacity: 1; } }

/* ---------------------------------------------------------------- uitslag */
.final-head { text-align: center; padding: 34px 22px; }
.final-title { font-family: var(--font-game); font-size: clamp(40px, 6vw, 60px); color: var(--geel); text-shadow: 0 4px 0 rgba(0,0,0,.3); margin: 0 0 4px; }
.final-mode { color: var(--muted); font-weight: 800; }
.final-score { font-family: var(--font-game); font-size: clamp(80px, 14vw, 130px); line-height: 1; margin: 6px 0 0; color: #fff; text-shadow: 0 7px 0 var(--edge); font-variant-numeric: tabular-nums; }
.final-sub { color: var(--muted); margin-bottom: 8px; font-size: 18px; }
.final-stars { display: flex; gap: 8px; justify-content: center; align-items: flex-end; margin: 14px 0 4px; }
.final-stars > span { animation: starpop .5s cubic-bezier(.2,1.8,.4,1) both; }
.final-stars > span:nth-child(2) { margin-bottom: 14px; }
@keyframes starpop { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: scale(1) rotate(0); } }
.final-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; text-align: center; margin: 26px 0; }
@media (max-width: 600px) { .final-stats { grid-template-columns: repeat(2, 1fr); } }
.final-stats > div { background: var(--panel-deep); border-radius: 16px; padding: 14px 8px; box-shadow: inset 0 3px 0 rgba(0,0,0,.2); }
.final-stats .n { font-family: var(--font-game); font-size: 34px; display: block; color: var(--geel); line-height: 1.1; }
.final-stats .l { font-size: 14px; color: var(--muted); }
.banner { font-family: var(--font-game); font-size: 23px; text-align: center; padding: 10px 18px; margin: 16px auto; border-radius: 14px; max-width: 520px; animation: pop .4s; }
.banner.record { background: var(--rood); color: #fff; box-shadow: 0 5px 0 var(--rood-edge); transform: rotate(-1.5deg); }
.banner.level { background: var(--groen); color: #fff; box-shadow: 0 5px 0 var(--groen-edge); transform: rotate(1deg); }
.recap { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.recap .rc { position: relative; background: var(--panel-deep); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 0 rgba(0,0,0,.3); }
.recap .rc img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #0a0f38; }
.recap .rc .rc-badge { position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--groen); box-shadow: 0 3px 0 var(--groen-edge); }
.recap .rc.bad .rc-badge { background: var(--rood); box-shadow: 0 3px 0 var(--rood-edge); }
.recap .rc .rc-badge .ic { color: #fff; }
.recap .rc-body { padding: 8px 12px 12px; }
.recap .rc .rc-club { font-family: var(--font-game); font-size: 18px; line-height: 1.05; }
.recap .rc .rc-meta { font-size: 13px; color: var(--muted); line-height: 1.3; margin-top: 3px; }
.recap .rc .rc-pts { font-family: var(--font-game); font-size: 17px; color: var(--geel); margin-top: 6px; }
.recap .rc.bad .rc-pts { color: var(--faint); }
.achievement-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ach { display: flex; gap: 12px; align-items: center; background: var(--panel-deep); padding: 12px; border-radius: 16px; }
.px-box.gold .ach { background: rgba(255,255,255,.4); color: #3a2600; }
.ach .ach-name { font-family: var(--font-game); font-size: 19px; line-height: 1.1; }
.ach .ach-desc { font-size: 14px; color: var(--muted); line-height: 1.3; }
.px-box.gold .ach .ach-desc { color: #6b4a00; }
.ach.locked { opacity: .45; }
.ach.new { animation: starpop .5s cubic-bezier(.2,1.8,.4,1) both; }
.ach-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--geel); color: #3a2600; flex: none; box-shadow: 0 3px 0 var(--geel-edge); }
.ach-icon .ic { color: inherit; }
.px-box.gold .ach-icon { background: var(--rood); color: #fff; box-shadow: 0 3px 0 var(--rood-edge); }
.ach.locked .ach-icon { background: rgba(255,255,255,.1); color: var(--faint); box-shadow: none; }

/* ---------------------------------------------------------------- ranglijst (scorebord) */
.px-tabs { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; padding: 6px; background: var(--panel-deep); border-radius: 16px; }
.px-tabs button { border: 0; background: transparent; font-family: var(--font-game); font-size: 17px; padding: 8px 16px; border-radius: 11px; cursor: pointer; color: var(--muted); }
.px-tabs button:hover { color: var(--text); }
.px-tabs button.active { background: var(--geel); color: #3a2600; box-shadow: 0 3px 0 var(--geel-edge); }
.subtabs { display: flex; gap: 10px; flex-wrap: wrap; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin: 30px 0 22px; }
.podium .pod { display: flex; flex-direction: column; align-items: center; width: 170px; max-width: 32%; }
.podium .pod .ic-crown { margin-bottom: 2px; transform: rotate(-8deg); }
.podium .pod .pname { font-family: var(--font-game); font-size: 20px; margin: 8px 0 0; text-align: center; overflow-wrap: anywhere; line-height: 1.1; }
.podium .pod .pname a { color: var(--text); }
.podium .pod .pscore { font-weight: 800; color: var(--muted); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.podium .block { width: 100%; border-radius: 14px 14px 0 0; display: flex; align-items: flex-start; justify-content: center; font-family: var(--font-game); font-size: 46px; padding-top: 8px; color: rgba(0,0,0,.3); }
.podium .p1 .block { height: 130px; background: var(--geel); box-shadow: inset 0 -8px 0 var(--geel-edge); }
.podium .p2 .block { height: 96px; background: #c7cde6; box-shadow: inset 0 -8px 0 #8e96b8; }
.podium .p3 .block { height: 72px; background: #e0935a; box-shadow: inset 0 -8px 0 #a55d2b; }
.podium .p1 { order: 2; } .podium .p2 { order: 1; } .podium .p3 { order: 3; }
.board { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.board td, .board th { padding: 9px 12px; text-align: left; }
.board th { font-size: 13px; font-weight: 800; color: var(--faint); }
.board tbody td { background: var(--panel-deep); }
.board tbody td:first-child { border-radius: 12px 0 0 12px; }
.board tbody td:last-child { border-radius: 0 12px 12px 0; }
.board tr.me td { background: rgba(255,198,40,.22); }
.board td.rank { width: 56px; font-family: var(--font-game); font-size: 20px; color: var(--muted); }
.rank-badge { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-family: var(--font-game); font-size: 18px; color: #3a2600; }
.rank-badge.r1 { background: var(--geel); box-shadow: 0 3px 0 var(--geel-edge); } .rank-badge.r2 { background: #c7cde6; box-shadow: 0 3px 0 #8e96b8; } .rank-badge.r3 { background: #e0935a; box-shadow: 0 3px 0 #a55d2b; }
.board td.score { font-family: var(--font-game); font-size: 22px; text-align: right; color: var(--geel); font-variant-numeric: tabular-nums; }
.board .who { display: flex; align-items: center; gap: 10px; }
.board .who a { color: var(--text); font-weight: 800; }

/* ---------------------------------------------------------------- archief (fotokaartjes) */
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr auto; gap: 12px; align-items: end; }
@media (max-width: 900px) { .filters { grid-template-columns: 1fr 1fr; } }
.wagen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
@media (max-width: 520px) { .wagen-grid { grid-template-columns: 1fr 1fr; gap: 14px; } }
.wcard { background: #fff7e6; color: #2b2250; border: 0; border-radius: 8px; padding: 8px 8px 12px; cursor: pointer; text-align: left; display: block; width: 100%; box-shadow: 0 5px 0 #c9b98f, 0 12px 22px rgba(0,0,0,.28); transition: transform .12s; }
.wcard:nth-child(3n+1) { transform: rotate(-1.2deg); } .wcard:nth-child(3n+2) { transform: rotate(.9deg); }
.wcard:hover { transform: rotate(0) scale(1.03); z-index: 2; position: relative; }
.wcard .wc-img { position: relative; aspect-ratio: 4 / 3; background: #0a0f38; overflow: hidden; border-radius: 4px; }
.wcard img.photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.wcard .wc-year { position: absolute; top: 8px; left: 8px; font-family: var(--font-game); font-size: 15px; background: var(--geel); color: #3a2600; padding: 2px 9px; border-radius: 8px; box-shadow: 0 2px 0 var(--geel-edge); }
.wcard .wc-song { position: absolute; top: 8px; right: 8px; background: var(--rood); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 2px 0 var(--rood-edge); }
.wcard .wc-song .ic { color: #fff; }
.wcard .wc-body { padding: 8px 4px 0; }
.wcard .wc-club { font-family: var(--font-game); font-size: 19px; line-height: 1.05; }
.wcard .wc-title { font-size: 14px; line-height: 1.3; color: #6d6492; margin-top: 3px; font-style: italic; }
.pager { display: flex; gap: 12px; justify-content: center; align-items: center; margin: 30px 0; font-weight: 800; color: var(--muted); }

/* modal */
.modal-back { position: fixed; inset: 0; z-index: 600; background: rgba(8,12,44,.84); display: flex; align-items: flex-start; justify-content: center; padding: 40px 14px; overflow-y: auto; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 540px; animation: pop .25s; margin: auto 0; }
.modal .px-box { margin: 0; }
.modal.wide { max-width: 1000px; }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal-head h2 { margin: 0; flex: 1; }
.lightbox-img { width: 100%; max-height: 70vh; object-fit: contain; background: #0a0f38; display: block; border-radius: 12px; }
.lightbox-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
@media (max-width: 800px) { .lightbox-grid { grid-template-columns: 1fr; } }

/* toasts */
#toast-root { position: fixed; top: 90px; right: 16px; z-index: 800; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 32px)); }
.toast { background: #fff7e6; color: #2b2250; border-radius: 16px; box-shadow: 0 5px 0 #c9b98f, 0 10px 24px rgba(0,0,0,.3); padding: 12px 14px; font-size: 15px; font-weight: 700; animation: toastin .35s cubic-bezier(.2,1.5,.4,1); display: flex; gap: 10px; align-items: flex-start; }
.toast .ic { margin-top: 2px; }
.toast.achievement { background: var(--geel); color: #3a2600; box-shadow: 0 5px 0 var(--geel-edge), 0 10px 24px rgba(0,0,0,.3); }
.toast.achievement .ic { color: #3a2600; }
.toast b { display: block; font-family: var(--font-game); font-weight: 400; font-size: 18px; }
@keyframes toastin { from { transform: translateX(40px) scale(.9); opacity: 0; } }

/* wagenlied-speler */
.player { display: flex; gap: 14px; align-items: center; background: var(--panel-deep); color: var(--text); border-radius: 16px; padding: 12px 14px; margin-top: 14px; }
.px-box.cream .player { background: #2b2250; }
.player-btn { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--geel); color: #3a2600; display: grid; place-items: center; cursor: pointer; flex: none; box-shadow: 0 4px 0 var(--geel-edge); transition: transform .08s, box-shadow .08s; }
.player-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--geel-edge); }
.player-body { flex: 1; min-width: 0; }
.player-label { font-size: 13px; font-weight: 800; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.player-title { font-family: var(--font-game); font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 1px 0 7px; }
.player-bar { height: 8px; background: rgba(255,255,255,.12); border-radius: 999px; cursor: pointer; }
.player-fill { height: 100%; width: 0; background: var(--geel); border-radius: 999px; }
.player-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.player-row a { color: var(--muted); }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.eq i { width: 3px; background: var(--geel); height: 4px; border-radius: 1px; }
.player.is-playing .eq i { animation: eq .8s ease-in-out infinite; }
.player.is-playing .eq i:nth-child(2) { animation-delay: .2s; } .player.is-playing .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 50% { height: 12px; } }

/* profiel */
.profile-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.profile-head .pname { font-family: var(--font-game); font-size: 42px; line-height: 1; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.color-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; align-items: center; font-weight: 800; color: var(--muted); }
.color-picker button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.color-picker button.on { border-color: #fff; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.kv > div { background: var(--panel-deep); border-radius: 16px; padding: 14px 16px; border: 2px solid transparent; }
.kv .n { font-family: var(--font-game); font-size: 32px; display: block; line-height: 1.1; color: var(--geel); }
.kv .l { font-size: 14px; color: var(--muted); }
.simple-list { list-style: none; padding: 0; margin: 0; }
.simple-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 2px dashed var(--line); }
.simple-list li:last-child { border-bottom: 0; }

/* spelregels */
.help-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin: 0; }
.help-list > div { background: var(--panel); border-radius: 20px; padding: 20px; box-shadow: 0 6px 0 var(--edge); }
.help-list dt { font-family: var(--font-game); font-size: 23px; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.help-list dt .ic { color: var(--geel); }
.help-list dd { margin: 0; color: #dfe4ff; }

/* inloggen */
.auth-wrap { max-width: 440px; margin: 20px auto; }
.auth-wrap form { display: grid; gap: 16px; }

/* ---------------------------------------------------------------- beheer (functioneel, rustiger) */
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .admin-layout { grid-template-columns: 1fr; } }
.admin-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 100px; }
@media (max-width: 900px) { .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; } }
.admin-nav .px-btn { justify-content: flex-start; font-family: var(--font); font-weight: 800; font-size: 15px; --c: transparent; box-shadow: none; }
.admin-nav .px-btn:hover { --c: rgba(255,255,255,.08); }
.admin-nav .px-btn.active { --c: var(--geel); --t: #3a2600; box-shadow: 0 3px 0 var(--geel-edge); }
.table-wrap { overflow-x: auto; }
.atable { width: 100%; border-collapse: collapse; font-size: 14px; font-weight: 600; }
.atable th { font-size: 13px; font-weight: 800; color: var(--faint); text-align: left; padding: 8px; white-space: nowrap; border-bottom: 2px solid var(--line); }
.atable td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.atable img.thumb { width: 72px; height: 54px; object-fit: cover; display: block; background: #0a0f38; border-radius: 8px; }
.atable tr.off td, .atable tr.exists td { opacity: .5; }
.atable input[type=text] { width: 100%; background: var(--panel-deep); border: 2px solid rgba(255,255,255,.12); border-radius: 8px; color: var(--text); font: inherit; font-size: 13px; padding: 5px 7px; }
.chart { display: flex; align-items: flex-end; gap: 2px; height: 150px; padding: 6px 0; overflow-x: auto; }
.chart .bar { flex: 1 0 8px; min-width: 8px; display: flex; flex-direction: column-reverse; }
.chart .bar i { display: block; }
.chart .bar .g { background: var(--geel); } .chart .bar .k { background: var(--roze); border-radius: 3px 3px 0 0; }
.chart-axis { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 14px; color: var(--muted); flex-wrap: wrap; margin-top: 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: middle; }
.progressbar { height: 12px; background: var(--panel-deep); border-radius: 999px; overflow: hidden; }
.progressbar > div { height: 100%; width: 0; background: var(--geel); transition: width .3s; }
.log { background: var(--panel-deep); border-radius: 10px; padding: 10px; max-height: 240px; overflow: auto; font-size: 13px; font-family: ui-monospace, Consolas, monospace; white-space: pre-wrap; }
.pagelist { max-height: 460px; overflow-y: auto; }
.pill-yes { color: #6ff0a8; } .pill-no { color: var(--muted); }
.klasse-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.klasse-chips label { background: var(--panel-deep); padding: 4px 10px; border-radius: 999px; font-size: 13px; cursor: pointer; display: flex; gap: 6px; align-items: center; }

/* ---------------------------------------------------------------- mobiel */
body.in-game .bottomnav { display: none; }
body.in-game #view { padding-bottom: 28px; }
@media (max-width: 520px) {
  body { font-size: 15px; }
  #view { padding: 26px 14px 100px; }
  .px-box { padding: 16px; }
  h2 { font-size: 23px; }
  .hud { gap: 8px; margin-bottom: 18px; }
  .hud .hud-item { font-size: 16px; padding: 5px 12px; }
  .progress-dots { order: 10; width: 100%; justify-content: space-between; }
  .progress-dots i { width: 24px; height: 12px; border-radius: 6px; }
  .question-title { font-size: 24px; margin-bottom: 12px; }
  .option { min-height: 58px !important; font-size: 16px !important; padding: 8px 10px !important; }
  .option .opt-logo { width: 26px; height: 26px; }
  .option .opt-key { width: 26px; height: 26px; font-size: 15px; }
  .jokers .px-btn { min-width: 0; font-size: 14px; padding: 6px 8px; }
  .jokers .cost { display: none; }
  .verdict { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.option .opt-name { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 520px) { .option .opt-logo { display: none; } }

/* hints (jokers) gestapeld onder in de foto */
.hints { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3; display: flex; flex-direction: column; gap: 8px; }
.hints .hint-bubble { position: static; }
/* wagenlied dat tijdens de vraag meespeelt */
.now-playing { margin-top: 14px; width: 100%; display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 15px;
  color: var(--text); background: var(--panel-deep); padding: 10px 14px; border-radius: 14px; box-shadow: 0 4px 0 rgba(0,0,0,.25); text-align: left; }
.now-playing:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.now-playing .eq i { background: var(--faint); }
.now-playing.is-playing .eq i { background: var(--geel); animation: eq .8s ease-in-out infinite; }
.now-playing.is-playing .eq i:nth-child(2) { animation-delay: .2s; } .now-playing.is-playing .eq i:nth-child(3) { animation-delay: .4s; }

/* ================================================================ app-gevoel */
:root { --topbar-h: 68px; --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px); }
html, body { overscroll-behavior-y: none; }
* { touch-action: manipulation; }
.px-btn, .option, .tile, .choice, .wcard, .bottomnav, .topbar, .hud, .now-playing, .px-tabs, .player-btn {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
img { -webkit-touch-callout: none; }
.px-input, .px-select, textarea { font-size: 16px !important; } /* voorkomt automatisch inzoomen op iOS */

/* vaste bovenbalk */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: calc(var(--topbar-h) + var(--safe-top)); padding-top: var(--safe-top); }
#app { padding-top: calc(var(--topbar-h) + var(--safe-top)); }
#toast-root { top: calc(var(--topbar-h) + var(--safe-top) + 22px); }
.admin-nav { top: calc(var(--topbar-h) + 32px); }

/* wagenlied-knopje in de HUD */
#now-playing:empty { display: none; }
.hud .now-playing { width: auto; margin: 0; padding: 7px 14px; border-radius: 999px; font-family: var(--font-game); font-weight: 400; font-size: 17px; background: var(--panel-deep); box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.hud .now-playing .ic { color: var(--faint); }
.hud .now-playing.is-playing { background: var(--roze); }
.hud .now-playing.is-playing .ic { color: #fff; }
.hud .now-playing.is-playing .eq i { background: #fff; }

@media (max-width: 860px) {
  :root { --topbar-h: 58px; }
  .topbar { height: calc(var(--topbar-h) + var(--safe-top)); }
}

/* ---------------------------------------------------------------- mobiel: zo min mogelijk scrollen */
@media (max-width: 600px) {
  #view { padding: 20px 12px calc(86px + var(--safe-bottom)); }
  body.in-game #view { padding: 16px 12px calc(12px + var(--safe-bottom)); }
  .page-head { margin: 4px 0 14px; }
  .page-head h1 { font-size: 32px; margin-bottom: 2px; }
  .page-head p { font-size: 15px; }
  .px-box { padding: 14px; margin-bottom: 16px; border-radius: 18px; }
  h2 { font-size: 22px; }

  /* home */
  .hero { margin-bottom: 18px; }
  .marquee { --bulb: 14px; border-radius: 20px; }
  .hero .marquee-inner { min-height: 0; height: min(48dvh, 340px); padding: 16px; }
  .game-title { font-size: 46px; margin-bottom: 8px; }
  .hero p { font-size: 14px; margin-bottom: 14px; }
  .hero .px-btn.huge { font-size: 21px; padding: 12px 22px; min-height: 54px; }
  .tiles { gap: 10px; margin-bottom: 18px; }
  .tile { padding: 12px; border-radius: 16px; gap: 4px; }
  .tile .ic { width: 22px; height: 22px; }
  .tile .t-title { font-size: 18px; }
  .tile .t-sub { font-size: 12px; line-height: 1.25; }

  /* spelvorm kiezen: kaarten naast elkaar, vaste startknop */
  .choice-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .choice { padding: 12px; border-radius: 16px; }
  .choice.photo-choice { min-height: 130px; }
  .choice h3 { font-size: 20px; }
  .choice .pool { font-size: 12px; line-height: 1.3; }
  .choice .stars { margin: 0 0 4px; }
  .choice .tag { font-size: 12px; top: 8px; right: 8px; padding: 2px 7px; }
  .choice.selected::after { width: 26px; height: 26px; top: 8px; right: 8px; background-size: 14px; }
  .choice.selected .tag { right: 40px; }
  .step-label { font-size: 19px; margin: 14px 0 8px; }
  .start-bar { position: sticky; bottom: calc(80px + var(--safe-bottom)); margin-top: 16px; z-index: 20; }
  .start-bar .px-btn { width: 100%; }
  .ok-box { padding: 8px 10px; font-size: 14px; }

  /* speelscherm past op één scherm */
  .hud { gap: 6px; margin-bottom: 10px; }
  .hud .hud-item, .hud .now-playing { font-size: 15px; padding: 5px 10px; }
  .hud .now-playing #np-label { display: none; }
  .hud .hud-score { min-width: 64px; }
  .progress-dots { order: 10; width: 100%; gap: 4px; }
  .progress-dots i { flex: 1; width: auto; height: 7px; border-radius: 4px; }
  .game-main { gap: 12px; }
  .photo-stage { aspect-ratio: auto; height: min(58vw, 31dvh); }
  .timer-ring { width: 54px; height: 54px; top: -10px; right: -6px; }
  .timer-ring svg { inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); }
  .timer-ring span { font-size: 21px; }
  .photo-caption { font-size: 13px; bottom: -13px; padding: 3px 12px; }
  .question-title { font-size: 19px; margin: 12px 0 8px; }
  .options { gap: 8px; }
  .option { min-height: 48px !important; font-size: 15px !important; padding: 6px 8px !important; border-radius: 12px !important; gap: 6px !important; }
  .option .opt-key { width: 22px; height: 22px; font-size: 13px; border-radius: 7px; }
  .jokers { margin-top: 10px; gap: 8px; }
  .jokers .px-btn { min-height: 36px; font-size: 13px; padding: 5px 6px; }
  .hints { left: 8px; right: 8px; bottom: 8px; gap: 6px; }
  .hint-bubble { font-size: 15px; padding: 7px 10px; }

  /* uitslag */
  .final-head { padding: 18px 14px; }
  .final-title { font-size: 34px; }
  .final-score { font-size: 70px; }
  .final-stars svg { width: 48px; height: 48px; }
  .final-stars > span:nth-child(2) svg { width: 64px; height: 64px; }
  .final-stats { margin: 14px 0; gap: 8px; }
  .final-stats > div { padding: 10px 6px; }
  .final-stats .n { font-size: 24px; }
  .final-head .btn-row .px-btn.big { font-size: 16px; padding: 10px 14px; min-height: 46px; flex: 1 1 45%; }
  .recap { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* ranglijst */
  .podium { margin: 14px 0; }
  .podium .p1 .block { height: 90px; } .podium .p2 .block { height: 68px; } .podium .p3 .block { height: 50px; }
  .podium .block { font-size: 32px; }
  .px-tabs button { font-size: 15px; padding: 7px 11px; }
}

/* ---------------------------------------------------------------- resultaat als bottom sheet (telefoon/tablet) */
@media (max-width: 900px) {
  .result-panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; margin: 0;
    max-height: 72dvh; overflow-y: auto; overscroll-behavior: contain;
    background: #fff7e6; color: #2b2250; border-radius: 24px 24px 0 0;
    padding: 10px 16px calc(14px + var(--safe-bottom));
    box-shadow: 0 -10px 40px rgba(0,0,0,.45);
    animation: sheetup .4s cubic-bezier(.2,1.2,.4,1);
  }
  .result-panel::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 3px; background: #d8caa6; margin: 0 auto 10px; }
  .result-panel .px-box.cream { padding: 0; margin: 0; border: 0; box-shadow: none; }
  .result-panel .verdict { font-size: 30px; }
  .result-panel .wagen-info .wi-club { font-size: 21px; }
  .result-panel .wagen-info .wi-club img { width: 38px; height: 38px; }
  .result-panel .wi-title { font-size: 15px; margin-bottom: 8px; }
  .result-panel .result-divider { margin: 10px 0; }
  .result-panel .player { margin-top: 10px; padding: 8px 10px; }
  .result-panel .player-btn { width: 42px; height: 42px; }
  .result-panel .next-row { margin-top: 12px; flex-wrap: nowrap; }
  .result-panel .next-row .px-btn.big { font-size: 17px; padding: 10px 14px; min-height: 50px; }
  .result-panel .next-row #next { flex: 1; }
  .result-panel .px-btn.dark { --c: #ece2c8; --e: #c9b98f; --t: #2b2250; }
}
@keyframes sheetup { from { transform: translateY(100%); } }
@media (max-width: 600px) {
  .choice.photo-choice { min-height: 108px; }
  .choice .pool + .pool { display: none; }
  .choice-grid + .step-label { margin-top: 12px; }
  .start-bar { margin-top: 12px; }
  .start-bar .px-btn.huge { font-size: 21px; min-height: 54px; padding: 10px 20px; }
  .ok-box.row { font-size: 13px; padding: 6px 8px; }
  .ok-box.row .px-btn { min-height: 34px; }
}
@media (max-width: 600px) { .choice .tag, .choice.selected .tag { top: auto; bottom: 8px; right: 8px; } }
@media (max-width: 600px) {
  .hero .marquee-inner { height: auto; min-height: 0; padding: 16px 16px 18px; }
  .hero-img::after { content: ''; }
  .hero .marquee-inner { min-height: 250px; }
  .hero p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero .btn-row { flex-wrap: nowrap; gap: 8px; }
  .hero .btn-row .px-btn { flex: 1; min-width: 0; font-size: 18px; padding: 10px 12px; min-height: 50px; white-space: nowrap; }
  .tile { flex-direction: row; align-items: center; gap: 10px; padding: 12px; min-height: 58px; }
  .tile .t-sub { display: none; }
  .tile .t-title { font-size: 16px; margin: 0; }
  #home-top, .grid-home > div > .px-box:not(.gold) { display: none; }
  .grid-home { display: block; }
  .px-box.gold { padding: 12px 14px; }
  .px-box.gold h3 { font-size: 16px; margin-bottom: 0; }
  .px-box.gold .prince { margin-top: 14px !important; }
  .px-box.gold .pname { font-size: 22px; }
}
.prince-label { display: none; font-size: 13px; font-weight: 800; color: #6b4a00; }
@media (max-width: 600px) {
  .px-box.gold > h3 { display: none; }
  .prince-label { display: block; }
  .px-box.gold .prince { margin-top: 6px !important; }
  .px-box.gold .prince .muted { display: none; }
  .px-box.gold .avatar { width: 46px !important; height: 46px !important; font-size: 18px !important; }
  .tile { min-height: 52px; }
}
@media (max-width: 600px) and (max-height: 740px) {
  .hero p { display: none; }
  .hero .marquee-inner { min-height: 200px; }
}

/* ================================================================ app-schil op telefoon en tablet
   De pagina zelf scrollt niet meer (geen meeveren, geen browserbalk-gedoe).
   Alleen het middenstuk scrollt, en alleen als de inhoud echt langer is dan het scherm. */
@media (max-width: 860px) {
  html, body { height: 100%; overflow: hidden; }
  body { position: fixed; inset: 0; width: 100%; }
  #app { position: fixed; inset: 0; min-height: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
  #view {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  }
  /* home: het bord vult precies de ruimte die overblijft */
  #view[data-route="/"] { display: flex; flex-direction: column; }
  #view[data-route="/"] > .hero { flex: 1 1 auto; min-height: 190px; display: flex; margin-bottom: 14px; }
  #view[data-route="/"] > .hero > .marquee-inner { flex: 1; height: auto !important; min-height: 0 !important; }
  #view[data-route="/"] > .tiles { flex: none; margin-bottom: 14px; }
  #view[data-route="/"] > .grid-home { flex: none; }
  #view[data-route="/"] > .grid-home .px-box.gold { margin-bottom: 0; }
  /* spelscherm: de foto vult de ruimte die overblijft */
  #view[data-route="/spel"] { display: flex; flex-direction: column; }
  #view[data-route="/spel"] > .game { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; flex-direction: column; }
  .game > .hud { flex: none; }
  .game > .game-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .game > .game-main > div:first-child { flex: 1 1 auto; min-height: 150px; display: flex; }
  .game .photo-frame { flex: 1; display: flex; }
  .game .photo-stage { flex: 1; height: auto !important; min-height: 0; aspect-ratio: auto; }
  .game #side { flex: none; }
  /* spelvorm kiezen: de optochtkaarten vullen de ruimte die overblijft */
  #view[data-route="/spelen"] { display: flex; flex-direction: column; }
  #view[data-route="/spelen"] > * { flex: none; }
  #view[data-route="/spelen"] > .cat-grid { flex: 1 1 auto; min-height: 96px; max-height: 260px; }
  #view[data-route="/spelen"] > .cat-grid .photo-choice { min-height: 0; height: 100%; }
}
.start-resume { display: none; }
@media (max-width: 860px) {
  #view[data-route="/spelen"] .resume-note { display: none; }
  #view[data-route="/spelen"] .start-resume { display: inline-flex; }
  #view[data-route="/spelen"] .page-head p { display: none; }
  #view[data-route="/spelen"] .start-bar { position: static; flex-wrap: nowrap; gap: 10px; }
  #view[data-route="/spelen"] .start-bar .px-btn { width: auto; flex: 1; }
  #view[data-route="/spelen"] .start-bar .start-resume { flex: 0 0 38%; }
}

/* logo bovenin in dezelfde stijl als de grote titel */
.brand, .brand .b2 { color: var(--geel); }
.brand { font-family: var(--font-game); font-size: 30px; line-height: 1; letter-spacing: .01em;
  text-shadow: 0 2px 0 var(--rood-edge), 0 4px 0 rgba(0,0,0,.35); transform: rotate(-2deg); }
.brand .brand-text { display: inline !important; }
@media (max-width: 860px) { .brand { font-size: 25px; } }
@media (max-width: 380px) { .brand { font-size: 22px; } }

/* heroknoppen op mobiel: breedte volgt de tekst, zodat "Verder spelen" altijd past */
@media (max-width: 600px) {
  .hero .btn-row .px-btn { flex: 1 1 auto; font-size: 17px; padding: 10px 12px; }
  .hero .btn-row .px-btn .ic { display: none; }
}
@media (max-width: 350px) { .hero .btn-row .px-btn { font-size: 15px; padding: 9px 8px; } }

/* eigen avatarfoto */
.avatar-photo { object-fit: cover; display: inline-block; padding: 0; }
.avatar-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.avatar-actions label.px-btn { cursor: pointer; }
