﻿:root {
  color-scheme: dark;
  --bg: #100b16; --panel: rgba(31, 22, 43, 0.92); --text: #fff7fb; --muted: #cbb8d7;
  --pink: #ff3ea5; --purple: #8d5cff; --blue: #35c4ff; --gold: #ffd166; --green: #38d996; --red: #ff5b6e;
  --line: rgba(255, 255, 255, 0.13);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: Inter, Segoe UI, system-ui, sans-serif; background: radial-gradient(circle at top left, rgba(255,62,165,.2), transparent 34%), radial-gradient(circle at top right, rgba(53,196,255,.16), transparent 32%), var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button, .file-button { border: 1px solid var(--line); background: #2d2038; color: var(--text); min-height: 44px; border-radius: 8px; padding: 0 16px; cursor: pointer; display: inline-grid; place-items: center; text-decoration: none; }
button:hover:not(:disabled), .file-button:hover { border-color: var(--pink); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { border: 0; background: linear-gradient(135deg, var(--pink), var(--purple)); box-shadow: 0 0 24px rgba(255,62,165,.25); font-weight: 800; }
input, select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: #120d19; color: var(--text); padding: 0 12px; }
.app-shell { width: min(1180px, calc(100% - 24px)); margin: 0 auto; padding: 22px 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.topbar-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo { display: block; object-fit: contain; max-width: 100%; height: auto; filter: drop-shadow(0 0 18px rgba(255,62,165,.36)) drop-shadow(0 0 26px rgba(141,92,255,.22)); }
.brand-logo-small { width: clamp(58px, 10vw, 92px); aspect-ratio: 1; flex: 0 0 auto; }
.screen-logo { display: grid; justify-items: center; margin: 0 auto 14px; text-align: center; }
.brand-logo-main { width: min(360px, 78vw); max-height: 240px; }
.brand-logo-lobby { width: min(210px, 48vw); max-height: 135px; }
.lobby-brand { display: flex; align-items: center; gap: 12px; margin: -8px 0 12px; }
.logo-fallback { color: var(--text); font-size: clamp(26px, 6vw, 42px); text-shadow: 0 0 18px rgba(255,62,165,.48); }
h1, h2, h3, p { margin-top: 0; } h1 { margin-bottom: 0; font-size: clamp(28px, 6vw, 48px); } h2 { font-size: clamp(24px, 5vw, 36px); } h3 { margin-bottom: 0; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: 0; font-size: 12px; font-weight: 900; margin-bottom: 6px; }
.screen { display: none; } .screen.active { display: block; }
.panel { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 18px 70px rgba(0,0,0,.36); padding: clamp(18px, 4vw, 28px); }
.profile-panel { max-width: 820px; margin: 0 auto; }
.field { display: grid; gap: 8px; margin-bottom: 18px; color: var(--muted); font-weight: 700; } .field.compact { margin-bottom: 10px; }
.choice-grid { display: grid; gap: 10px; }
.avatar-groups { display: grid; gap: 20px; }
.avatar-group { display: grid; gap: 10px; }
.avatar-group-title { color: var(--text); font-size: 16px; font-weight: 900; margin: 0; }
.avatar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.avatar-choice { position: relative; min-height: 158px; display: grid; gap: 8px; justify-items: center; align-content: center; border: 1px solid var(--line); border-radius: 8px; background: #171020; cursor: pointer; color: var(--text); padding: 12px; }
.avatar-choice:hover { border-color: rgba(255,62,165,.7); transform: translateY(-1px); }
.avatar-choice.selected { outline: 2px solid var(--pink); border-color: transparent; box-shadow: 0 0 22px rgba(255,62,165,.28); }
.avatar-choice.selected::after { content: "✓"; position: absolute; top: 9px; right: 9px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; background: var(--pink); color: white; font-weight: 900; box-shadow: 0 0 16px rgba(255,62,165,.55); }
.avatar-portrait { width: min(132px, 100%); aspect-ratio: 1; border-radius: 18px; object-fit: cover; background: #120d19; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 8px 28px rgba(0,0,0,.3); }
.avatar-label { color: var(--muted); font-size: 13px; font-weight: 800; }
.custom-avatar-card { border: 1px solid rgba(255,62,165,.35); border-radius: 8px; background: linear-gradient(135deg, rgba(255,62,165,.1), rgba(53,196,255,.08)); padding: 16px; margin-top: 12px; }
.custom-avatar-head { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 16px; align-items: center; }
.custom-avatar-head p { margin-bottom: 0; color: var(--muted); font-weight: 500; }
.custom-photo-preview { width: 110px; aspect-ratio: 1; border-radius: 50%; border: 1px dashed rgba(255,255,255,.35); display: grid; place-items: center; overflow: hidden; background: #120d19; color: var(--muted); }
.custom-photo-preview.selected { border: 3px solid var(--pink); box-shadow: 0 0 24px rgba(255,62,165,.34); }
.custom-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.color-grid { grid-template-columns: repeat(4, minmax(80px, 1fr)); }
.choice { min-height: 52px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #171020; cursor: pointer; font-weight: 900; }
.choice.selected { outline: 2px solid var(--pink); border-color: transparent; }
.color-choice { grid-template-columns: 20px 1fr; justify-items: start; gap: 8px; padding: 0 10px; }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); }
.terms-box { max-height: 190px; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.22); margin-bottom: 14px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: center; margin: 10px 0; color: var(--muted); } .check input { width: auto; min-height: auto; }
.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.status-pill { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--muted); white-space: nowrap; }
.status-pill.online { color: var(--green); border-color: rgba(56,217,150,.4); } .status-pill.offline { color: var(--red); border-color: rgba(255,91,110,.4); }
.lobby-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.room-head, .section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.invite-card { border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.2); padding: 14px; margin: 18px 0; }
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.player-list, .pending-list { display: grid; gap: 10px; margin-top: 12px; }
.player-card, .pending-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: rgba(255,255,255,.04); }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: #120d19; overflow: hidden; border: 1px solid rgba(255,255,255,.16); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-name { font-weight: 900; color: #ffffff; overflow-wrap: anywhere; min-width: 0; }
.player-age { font-weight: 500; color: #b9aec4; font-size: .9em; }
.player-meta { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: end; } .badge { font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.host { color: var(--gold); border-color: rgba(255,209,102,.5); } .badge.ready { color: var(--green); border-color: rgba(56,217,150,.5); } .badge.offline { color: var(--red); }
.pending-panel { margin-top: 18px; } .chat-panel { position: sticky; top: 14px; }
.chat-messages { height: 430px; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: rgba(0,0,0,.22); border: 1px solid var(--line); border-radius: 8px; }
.message { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: center; padding: 9px 10px; border-radius: 8px; background: rgba(255,255,255,.05); overflow-wrap: anywhere; }
.message.system { display: block; color: var(--gold); background: rgba(255,209,102,.08); }
.chat-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #120d19; }
.message strong { color: var(--blue); }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }
.hidden { display: none !important; } .muted { color: var(--muted); } .error { color: var(--red); min-height: 20px; } .notice { color: var(--gold); min-height: 20px; }
@media (max-width: 860px) {
  .topbar { align-items: flex-start; flex-direction: column; } .mode-grid, .lobby-layout, .copy-row, .custom-avatar-head { grid-template-columns: 1fr; }
  .topbar-brand { width: 100%; }
  .brand-logo-small { width: 64px; }
  .brand-logo-main { width: min(300px, 82vw); max-height: 190px; }
  .brand-logo-lobby { width: min(170px, 58vw); max-height: 110px; }
  .avatar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .color-grid { grid-template-columns: repeat(2, 1fr); } .chat-panel { position: static; } .chat-messages { height: 300px; }
  .player-card, .pending-card { grid-template-columns: 48px minmax(0, 1fr); } .badges { grid-column: 1 / -1; justify-content: start; }
}

.back-button { margin-bottom: 14px; background: rgba(255,255,255,.06); }
.profile-back-button { width: max-content; min-width: min(100%, 220px); border-color: rgba(255,62,165,.42); background: rgba(18,13,25,.78); color: var(--text); font-weight: 800; box-shadow: 0 0 18px rgba(141,92,255,.12); }
.profile-back-button:hover { border-color: var(--purple); box-shadow: 0 0 22px rgba(255,62,165,.22); }
.chat-form { grid-template-columns: auto auto auto minmax(0, 1fr) auto; position: relative; }
.chat-form button { white-space: nowrap; }
.emoji-panel { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin: 10px 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(18,13,25,.96); box-shadow: 0 12px 34px rgba(0,0,0,.35); }
.emoji-panel button { min-height: 38px; padding: 0; font-size: 21px; background: rgba(255,255,255,.05); }
.message.mine { margin-left: auto; grid-template-columns: minmax(0, 1fr) 28px; background: rgba(255,62,165,.14); max-width: 88%; }
.message.theirs { margin-right: auto; max-width: 88%; }
.message-body { display: grid; gap: 4px; }
.message-meta { color: var(--muted); font-size: 12px; }
.chat-image-thumb { width: min(230px, 100%); max-height: 180px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); cursor: pointer; display: block; margin-top: 6px; }
.view-once-card { display: grid; gap: 8px; padding: 10px; border: 1px dashed rgba(255,209,102,.45); border-radius: 8px; background: rgba(255,209,102,.08); margin-top: 6px; }
.view-once-card button { width: max-content; }
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.72); }
.modal-card { width: min(540px, 100%); max-height: min(720px, calc(100vh - 32px)); overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #1c1327; box-shadow: 0 24px 90px rgba(0,0,0,.55); padding: clamp(18px, 4vw, 26px); }
.photo-modal-card, .media-compose-card, .image-viewer-card { width: min(680px, 100%); }
.chat-photo-preview, .image-viewer-img { width: 100%; max-height: 58vh; object-fit: contain; border-radius: 8px; background: #0f0a15; border: 1px solid var(--line); }
.chat-media-preview { width: 100%; max-height: 42vh; object-fit: contain; border-radius: 8px; background: #0f0a15; border: 1px solid var(--line); }
.media-preview-wrap { margin-bottom: 12px; }
.media-options { border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; padding: 10px 14px; }
.media-options legend { color: var(--gold); font-weight: 900; padding: 0 6px; }
.media-recipient-list { display: grid; gap: 4px; padding: 6px 0 0 24px; }
.media-recipient-list .check { margin: 4px 0; }
.media-recipient-list img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.media-caption { margin: 6px 0 0; color: var(--text); }
.media-seen-button { min-height: 32px; width: max-content; padding: 0 10px; color: var(--blue); font-size: 12px; }
.media-open-button { min-height: 34px; width: max-content; margin-top: 5px; }
.video-media-card { width: min(250px, 100%); min-height: 100px; margin-top: 6px; border-color: rgba(53,196,255,.4); background: linear-gradient(145deg, rgba(53,196,255,.13), rgba(141,92,255,.13)); font-weight: 900; }
#mediaStatusContent h3 { margin: 14px 0 6px; color: var(--gold); }
#mediaStatusContent ul { margin: 0; padding-left: 22px; color: var(--muted); }
.warning-text { color: var(--gold); font-size: 14px; line-height: 1.45; padding: 10px; border: 1px solid rgba(255,209,102,.28); border-radius: 8px; background: rgba(255,209,102,.08); }
@media (max-width: 680px) {
  .chat-form { grid-template-columns: auto auto auto 1fr; }
  .chat-form .primary { grid-column: 1 / -1; }
  .emoji-panel { grid-template-columns: repeat(5, 1fr); }
  .modal { align-items: stretch; }
  .modal-card { max-height: none; }
}
.code-actions { grid-template-columns: minmax(0, 1fr) auto auto; }
@media (max-width: 680px) { .code-actions { grid-template-columns: 1fr; } }

/* Fase 2A: spelbord en beurtwerking */
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.game-main { min-width: 0; display: grid; gap: 16px; }
.game-sidebar { display: grid; gap: 16px; position: sticky; top: 14px; }
.game-toolbar { padding-bottom: 18px; }
.turn-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.active-turn-avatar { width: 64px; height: 64px; border: 2px solid var(--pink); box-shadow: 0 0 22px rgba(255,62,165,.35); }
.turn-copy h2 { margin: 0 0 4px; font-size: clamp(22px, 4vw, 32px); }
.turn-copy p { margin-bottom: 0; }
.turn-actions { display: grid; grid-template-columns: auto auto; gap: 8px; align-items: center; justify-items: stretch; }
.dice-display { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, #fff, #d9d1e0); color: #21162c; font-size: 30px; font-weight: 1000; box-shadow: 0 0 24px rgba(53,196,255,.28); }
.dice-display.rolling { animation: dice-roll .7s ease; }
@keyframes dice-roll { 0% { transform: rotate(0) scale(.7); } 45% { transform: rotate(220deg) scale(1.18); } 100% { transform: rotate(360deg) scale(1); } }
.turn-timer { min-width: 112px; text-align: center; font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 900; color: var(--gold); }
.turn-actions button { grid-column: 1 / -1; }
.winner-banner { margin-bottom: 16px; padding: 14px; border: 1px solid rgba(255,209,102,.55); border-radius: 8px; background: rgba(255,209,102,.12); color: var(--gold); font-size: clamp(18px, 4vw, 26px); font-weight: 900; text-align: center; }
.board-scroll { overflow: auto; border: 1px solid rgba(255,255,255,.12); border-radius: 28px; background:
  radial-gradient(circle at top, rgba(255,62,165,.12), transparent 34%),
  radial-gradient(circle at bottom right, rgba(53,196,255,.12), transparent 28%),
  linear-gradient(180deg, rgba(15,10,22,.96), rgba(8,6,13,.98));
  padding: 22px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 28px 100px rgba(0,0,0,.42); }
.game-board { min-width: 920px; display: grid; grid-template-columns: repeat(11, minmax(78px, 1fr)); grid-template-rows: repeat(9, 84px); gap: 10px; }
.board-cell { position: relative; min-width: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 20px; background: linear-gradient(160deg, rgba(45,32,56,.98), rgba(18,12,27,.98)); padding: 9px 7px 8px; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; align-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 22px rgba(0,0,0,.2); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, filter .15s ease; }
.board-cell::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at top, rgba(255,255,255,.12), transparent 40%); pointer-events: none; }
.board-cell:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 14px 28px rgba(0,0,0,.28); filter: saturate(1.04); }
.board-cell.type-veilig { background: linear-gradient(145deg, rgba(69,53,92,.55), rgba(17,14,25,.98)); border-color: rgba(255,255,255,.09); }
.board-cell.type-doen { background: linear-gradient(145deg, rgba(255,62,165,.58), rgba(55,15,47,.98)); border-color: #ff65b8; }
.board-cell.type-durf { background: linear-gradient(145deg, rgba(255,94,46,.7), rgba(66,16,22,.98)); border-color: #ff7954; }
.board-cell.type-waarheid { background: linear-gradient(145deg, rgba(35,139,255,.65), rgba(14,32,70,.98)); border-color: #53b8ff; }
.board-cell.type-foto { background: linear-gradient(145deg, rgba(141,92,255,.7), rgba(39,20,74,.98)); border-color: #ad83ff; }
.board-cell.type-film { background: linear-gradient(145deg, rgba(190,30,108,.68), rgba(58,12,45,.98)); border-color: #ee3b97; }
.board-cell.type-bonus { background: linear-gradient(145deg, rgba(255,209,102,.72), rgba(73,48,12,.98)); border-color: var(--gold); }
.board-cell.type-straf { background: linear-gradient(145deg, rgba(139,17,38,.85), rgba(47,8,17,.98)); border-color: #ff435e; }
.board-cell.start { background: linear-gradient(145deg, rgba(56,217,150,.3), rgba(23,16,32,.98)); border-color: var(--green); }
.board-cell.finish { background: linear-gradient(145deg, rgba(255,209,102,.34), rgba(23,16,32,.98)); border-color: var(--gold); box-shadow: 0 0 20px rgba(255,209,102,.2); }
.cell-number { align-self: start; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .02em; }
.cell-type-icon { position: absolute; right: 6px; top: 5px; font-size: 15px; line-height: 1; opacity: .95; }
.cell-type-name { align-self: center; padding: 0 2px; color: #fff; font-size: clamp(11px, 0.98vw, 14px); font-weight: 1000; line-height: 1.08; text-align: center; white-space: normal; word-break: break-word; text-wrap: balance; text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.cell-type-short { display: none; }
.board-cell.start .cell-number, .board-cell.finish .cell-number { color: #fff; font-size: 10px; }
.board-cell.safe-cell .cell-type-icon, .board-cell.safe-cell .cell-type-name { display: none; }
.board-cell.safe-cell .cell-number { align-self: center; color: #fff; font-size: 18px; }
.cell-pawns { position: absolute; inset: auto 4px 5px; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 2px; }
.board-pawn, .pawn-swatch { background: var(--pawn); border: 2px solid #fff; box-shadow: 0 0 11px var(--pawn), 0 2px 5px rgba(0,0,0,.6); }
.board-pawn { width: 23px; height: 23px; border-radius: 50% 50% 45% 45%; display: grid; place-items: center; color: #160d1d; font-size: 10px; font-weight: 1000; }
.moving-pawn { position: fixed; z-index: 100; pointer-events: none; margin: 0; }
.pawn-swatch { width: 18px; height: 18px; border-radius: 50%; }
.game-player-list { display: grid; gap: 8px; margin-top: 12px; }
.game-player-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.04); }
.game-player-card .avatar { width: 42px; height: 42px; }
.game-player-card.active { border-color: var(--pink); background: rgba(255,62,165,.1); box-shadow: 0 0 18px rgba(255,62,165,.13); }
.challenge-panel { padding: 18px; border: 1px solid rgba(255,62,165,.55); border-radius: 12px; background: radial-gradient(circle at top right, rgba(141,92,255,.2), transparent 45%), rgba(24,15,32,.97); box-shadow: 0 0 28px rgba(255,62,165,.14); }
.challenge-execution-screen { min-height: 70vh; padding: clamp(18px, 4vw, 36px); border-color: rgba(255,62,165,.58); background: radial-gradient(circle at top right, rgba(141,92,255,.24), transparent 42%), rgba(20,12,29,.98); display: grid; align-content: start; gap: 18px; }
.challenge-execution-heading { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: 14px; align-items: center; }
.challenge-execution-heading .avatar { width: 64px; height: 64px; }
.challenge-execution-heading h2, .challenge-execution-heading p, .challenge-task-card h3, .challenge-task-card p { margin: 0; }
.challenge-task-card { padding: 18px; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; background: rgba(255,255,255,.05); display: grid; gap: 10px; }
.challenge-task-card > p:first-of-type { font-size: clamp(19px, 3vw, 28px); font-weight: 850; line-height: 1.35; }
.challenge-submission-panel, .challenge-approval-panel, .challenge-result-panel { display: grid; gap: 14px; }
.challenge-submission-panel textarea, .challenge-approval-panel textarea { width: 100%; min-height: 100px; resize: vertical; }
.submission-media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.submission-media-card { padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.04); display: grid; gap: 8px; }
.submission-media-card img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; }
.approval-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 10px; }
.approval-options .check { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.04); }
.challenge-result-panel { padding: 20px; border: 1px solid rgba(255,209,102,.45); border-radius: 14px; background: rgba(255,209,102,.08); }
.challenge-result-panel h2, .challenge-result-panel p { margin: 0; }
.challenge-heading { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.challenge-heading h2, .challenge-heading p { margin: 0; }
.challenge-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.08); font-size: 28px; }
.challenge-timer { color: var(--gold); font-weight: 1000; font-variant-numeric: tabular-nums; }
.challenge-text { margin: 16px 0 8px; font-size: clamp(18px, 3vw, 24px); font-weight: 850; line-height: 1.35; }
.challenge-round-panel { margin: 18px 0 12px; display: grid; gap: 14px; }
.phase-heading { display: flex; align-items: flex-start; gap: 12px; }
.phase-heading h3, .phase-heading p, .proposal-card p { margin: 0; }
.phase-heading p { margin-top: 4px; color: var(--muted); }
.phase-step { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--purple)); font-weight: 1000; }
.challenge-round-panel textarea { width: 100%; min-height: 96px; resize: vertical; }
.filter-note { margin: 0; color: var(--muted); font-size: 13px; }
.proposal-list { display: grid; gap: 10px; }
.proposal-card { display: grid; gap: 8px; padding: 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: rgba(255,255,255,.05); }
.proposal-card.popular { border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255,209,102,.22); }
.proposal-card.selected { border-color: var(--pink); }
.proposal-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.popular-badge { color: #231522; background: var(--gold); }
.vote-card { grid-template-columns: auto 1fr; cursor: pointer; }
.vote-card input { margin-top: 4px; }
.vote-card > span { display: grid; gap: 5px; }
.bonus-panel { margin-top: 16px; padding: 18px; border: 1px solid rgba(255,209,102,.5); border-radius: 14px; background: radial-gradient(circle at top right, rgba(255,209,102,.16), transparent 42%), rgba(24,15,32,.97); box-shadow: 0 0 30px rgba(255,209,102,.16); }
.bonus-heading { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.bonus-heading h2, .bonus-heading p { margin: 0; }
.bonus-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.08); font-size: 28px; color: var(--gold); }
.bonus-timer { color: var(--gold); font-weight: 1000; font-variant-numeric: tabular-nums; }
.bonus-text { margin: 14px 0 8px; font-size: clamp(18px, 3vw, 24px); font-weight: 850; line-height: 1.35; }
.bonus-round-panel { margin: 16px 0 12px; display: grid; gap: 14px; }
.bonus-category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.bonus-category-grid .check { padding: 10px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: rgba(255,255,255,.04); }
.bonus-category-grid input { accent-color: var(--gold); }
.bonus-round-panel textarea { width: 100%; min-height: 96px; resize: vertical; }
.bonus-vote-panel { display: grid; gap: 12px; }
.bonus-vote-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.bonus-vote-options .check { padding: 12px 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: rgba(255,255,255,.04); }
.bonus-vote-options input { accent-color: var(--gold); }
.game-chat-toggle { display: none; position: fixed; right: 14px; bottom: 14px; z-index: 15; background: linear-gradient(135deg, var(--pink), var(--purple)); font-weight: 900; box-shadow: 0 10px 35px rgba(0,0,0,.5); }
.chat-badge { min-width: 21px; height: 21px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--gold); color: #24162c; font-size: 12px; }
.game-toolbar-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.challenge-chat-card { width: min(100%, 390px); padding: 14px; border: 1px solid rgba(255,62,165,.4); border-radius: 14px; background: linear-gradient(145deg, rgba(255,62,165,.12), rgba(141,92,255,.09)); }
.challenge-chat-card header, .challenge-history-card header, .challenge-detail-player { display: flex; align-items: center; gap: 10px; }
.challenge-chat-card .avatar, .challenge-history-card .avatar, .challenge-detail-player .avatar { width: 42px; height: 42px; flex: 0 0 42px; }
.challenge-chat-card header > div, .challenge-history-card header > div { min-width: 0; flex: 1; }
.challenge-chat-card p { margin: 9px 0; }
.challenge-card-task { font-weight: 800; line-height: 1.4; }
.challenge-card-result { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
.challenge-history-modal-card { width: min(960px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; }
.challenge-history-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.challenge-history-filters button { border-radius: 999px; }
.challenge-history-filters button.active { border-color: var(--pink); background: rgba(255,62,165,.2); }
.challenge-history-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 14px; }
.challenge-history-card { display: flex; flex-direction: column; align-items: stretch; padding: 16px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.045); }
.challenge-history-card h3 { margin: 8px 0; line-height: 1.35; }
.challenge-history-card > button:last-child { margin-top: auto; }
.history-media-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.history-media-denied { padding: 10px; border-radius: 9px; background: rgba(255,255,255,.06); color: var(--muted); }
.challenge-detail-card { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; }
.challenge-detail-player p { margin: 4px 0 0; color: var(--muted); }
.challenge-detail-media { margin: 14px 0; padding: 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; }
.challenge-detail-media h3 { margin-top: 0; }
.challenge-score-breakdown { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; margin-top: 16px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.06); }

/* Fase 4A: puntenwinkel en persoonlijke inventaris */
.shop-button, .game-shop-toggle { border-color: rgba(255,209,102,.55); background: linear-gradient(135deg, rgba(255,209,102,.18), rgba(255,62,165,.16)); color: #fff; font-weight: 900; }
.mobile-game-menu { display: none; }
.shop-modal { z-index: 30; }
.shop-modal-card { width: min(1180px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: clamp(16px, 3vw, 28px); background: radial-gradient(circle at top right, rgba(141,92,255,.22), transparent 34%), #171020; border-color: rgba(255,62,165,.42); }
.shop-header { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: 14px; align-items: center; }
.shop-header h2, .shop-header p { margin: 0 0 3px; }
.shop-header > button { width: 42px; height: 42px; padding: 0; border-radius: 50%; }
.shop-avatar { width: 64px; height: 64px; border: 2px solid var(--pink); box-shadow: 0 0 24px rgba(255,62,165,.28); }
.shop-balance-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 18px 0 12px; padding: 14px 18px; border: 1px solid rgba(255,209,102,.4); border-radius: 14px; background: linear-gradient(120deg, rgba(255,209,102,.13), rgba(141,92,255,.1)); color: var(--gold); font-size: clamp(17px, 2.5vw, 22px); font-weight: 1000; }
.shop-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.shop-filters button { border-radius: 999px; }
.shop-filters button.active { border-color: var(--pink); background: rgba(255,62,165,.2); box-shadow: 0 0 15px rgba(255,62,165,.15); }
.shop-category { margin: 22px 0; }
.shop-category > h3 { color: var(--gold); font-size: 20px; }
.shop-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; }
.shop-card { position: relative; display: grid; grid-template-rows: auto 1fr auto auto auto; gap: 10px; padding: 17px; border: 1px solid rgba(255,255,255,.14); border-radius: 17px; background: linear-gradient(155deg, rgba(255,255,255,.075), rgba(255,255,255,.025)); box-shadow: 0 14px 35px rgba(0,0,0,.18); }
.shop-card:hover { border-color: rgba(255,62,165,.45); transform: translateY(-2px); }
.shop-card-icon, .shop-confirm-icon { font-size: 34px; }
.shop-card-copy h4 { margin: 0 0 8px; font-size: 17px; }
.shop-card-copy p, .owned-count { margin: 0; color: var(--muted); line-height: 1.4; }
.price-badge { justify-self: start; padding: 5px 9px; border-radius: 999px; background: var(--gold); color: #25172c; font-size: 13px; font-weight: 1000; }
.inventory-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.13); }
.inventory-section .section-title span { color: var(--green); font-weight: 900; }
.inventory-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.inventory-card { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 13px; border: 1px solid rgba(53,196,255,.2); border-radius: 12px; background: rgba(53,196,255,.05); }
.inventory-card > span { font-size: 24px; }
.inventory-card p { margin: 4px 0; color: var(--gold); }
.inventory-card small { color: var(--muted); line-height: 1.35; }
.shop-footer { margin-top: 22px; justify-content: flex-end; }
.shop-confirm-card { width: min(480px, 100%); border-color: rgba(255,209,102,.45); }
.shop-confirm-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,209,102,.1); }
.shop-confirm-details { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; margin: 18px 0; padding: 15px; border-radius: 12px; background: rgba(255,255,255,.055); }

@media (max-width: 1040px) {
  .game-layout { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 860px) {
  .game-layout { grid-template-columns: 1fr; }
  .game-sidebar { position: static; }
  .turn-card { grid-template-columns: 54px minmax(0, 1fr); }
  .active-turn-avatar { width: 54px; height: 54px; }
  .turn-actions { grid-column: 1 / -1; grid-template-columns: auto 1fr; }
  .game-board { min-width: 760px; grid-template-columns: repeat(11, 62px); grid-template-rows: repeat(9, 72px); gap: 6px; }
  #gameChatSlot .chat-panel { display: none; position: fixed; inset: 12px; z-index: 14; overflow: auto; }
  #gameChatSlot .chat-panel.chat-panel-open { display: block; }
  #gameChatSlot .chat-messages { height: calc(100vh - 190px); }
  .mobile-game-menu { display: flex; position: fixed; right: 14px; bottom: 14px; z-index: 15; gap: 8px; }
  .game-chat-toggle, .game-shop-toggle { display: inline-flex; position: static; align-items: center; gap: 7px; box-shadow: 0 10px 35px rgba(0,0,0,.5); }
}
@media (max-width: 520px) {
  .game-toolbar { padding: 14px; }
  .turn-actions { grid-template-columns: 58px minmax(0, 1fr); }
  .turn-actions button { width: 100%; }
  .game-players-panel { padding: 14px; }
  .board-scroll { margin-inline: -6px; padding: 10px; border-radius: 18px; }
  .game-board { min-width: 650px; grid-template-columns: repeat(11, 54px); grid-template-rows: repeat(9, 64px); gap: 5px; }
  .challenge-heading { grid-template-columns: 44px minmax(0, 1fr); }
  .challenge-icon { width: 44px; height: 44px; }
  .challenge-timer { grid-column: 1 / -1; }
  .challenge-panel .actions button { width: 100%; }
  .challenge-execution-heading { grid-template-columns: 52px minmax(0,1fr); }
  .challenge-execution-heading .avatar { width: 52px; height: 52px; }
  .challenge-execution-heading .challenge-timer { grid-column: 1 / -1; }
  .challenge-execution-screen .actions button { width: 100%; }
  .bonus-heading { grid-template-columns: 44px minmax(0, 1fr); }
  .bonus-icon { width: 44px; height: 44px; }
  .bonus-timer { grid-column: 1 / -1; }
  .bonus-panel .actions button, .bonus-panel button { width: 100%; }
  .open-challenge-history-btn { width: 100%; }
  .challenge-history-modal-card, .challenge-detail-card { width: calc(100vw - 12px); max-height: calc(100vh - 12px); padding: 14px; }
  .challenge-history-list { grid-template-columns: 1fr; }
  .shop-modal { padding: 5px; }
  .shop-modal-card { width: 100%; max-height: calc(100vh - 10px); padding: 14px; }
  .shop-header { grid-template-columns: 50px minmax(0,1fr) auto; }
  .shop-avatar { width: 50px; height: 50px; }
  .shop-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .shop-card { padding: 12px; }
  .shop-card-icon { font-size: 28px; }
  .shop-card-copy h4 { font-size: 14px; }
  .shop-card-copy p { font-size: 12px; }
  .shop-card button { padding-inline: 7px; font-size: 12px; }
  .inventory-grid { grid-template-columns: 1fr; }
}

.own-trap-marker { position:absolute; right:3px; top:3px; min-width:24px; padding:2px; border-color:#ff3ea5; background:#24102d; z-index:3; }
.trap-modal-card { width:min(920px, calc(100vw - 24px)); max-height:92vh; overflow:auto; border-color:#ff3ea5; box-shadow:0 0 32px rgba(255,62,165,.28); }
.trap-steps { display:grid; gap:10px; }
.trap-placement-board { display:grid; grid-template-columns:repeat(11,minmax(48px,1fr)); gap:5px; max-height:330px; overflow:auto; padding:8px; border:1px solid rgba(141,92,255,.45); border-radius:14px; }
.trap-cell { min-height:52px; padding:5px; display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:12px; }
.trap-cell small { font-size:9px; opacity:.8; }
.trap-cell.allowed { border-color:#38d996; box-shadow:inset 0 0 12px rgba(56,217,150,.15); }
.trap-cell.blocked { opacity:.3; filter:grayscale(1); }
.trap-cell.selected { background:#ff3ea5; color:#fff; box-shadow:0 0 18px rgba(255,62,165,.65); }
.own-trap-overview { margin-top:18px; display:grid; gap:8px; }
.own-trap-overview article { display:grid; grid-template-columns:1fr auto; gap:5px 12px; align-items:center; padding:10px; border:1px solid rgba(255,62,165,.35); border-radius:12px; }
.own-trap-overview article span { grid-column:1; color:var(--muted); font-size:13px; }
.own-trap-overview article button { grid-column:2; grid-row:1 / span 2; }
#trapScreen blockquote { margin:14px 0; padding:14px; border-left:4px solid #ff3ea5; background:rgba(255,62,165,.08); }
#trapScreenActions textarea { flex:1 1 100%; min-height:90px; }
@media (max-width:700px) { .trap-placement-board { grid-template-columns:repeat(5,minmax(50px,1fr)); } }
