/* XP Arena — de ene gedeelde stylesheet voor alle minigames: speelpagina's
   (elke map's index.php) én pack-editors (elke map's editor.php). Vervangt sinds 2026-10-28
   de losse minigames/play.css + minigames/editor.css, plus ~40 regels CSS
   die letterlijk gedupliceerd in 14 editors' eigen <style>-blok stonden.

   Usage (one folder up, same convention as ../xp-quest-hud.js), placed
   BEFORE each page's own <style> block:
     <link rel="stylesheet" href="../minigames.css?<?php echo filemtime(__DIR__ . '/../minigames.css'); ?>">

   Scoping — speel- en editorpagina's gebruiken dezelfde klassenamen met een
   andere look (.btn is grijs gevuld bij spelen, oranje outline in editors;
   .hint/.card/body-padding verschillen licht), dus elke sectie hieronder is
   gescoped op de body-class:
     - Play:        :where(body:not(.mg-editor)) …   (alle speelpagina's, geen class nodig)
     - Editor:      :where(.mg-editor) …             (alle 16 editors, <body class="mg-editor">)
     - Editor base: :where(.mg-editor:not(.new-design)) …
                    (de 14 standalone editors; Quiz/Collect laden css/ui.css
                    en hebben body.new-design, die krijgen alleen de knoppen)
   Alles via :where() zodat de specificiteit exact gelijk blijft aan de oude
   ongescopede regels: een page-local regel met dezelfde selector in de
   eigen <style> van een pagina wint nog steeds op source order.

   NOT used by: Maze Master/Quiz/Flashcards/Gallery/Collect's speelpagina's
   (eigen look, zie minigames/README.md), activity-sheet/sheet.css (print). */

:root {
  --bg-base:#1a1b2f; --bg-card:#242540; --bg-modal:#2e3050;
  --primary:#ff9c00; --primary-hover:#e88c00; --primary-dim:rgba(255,156,0,0.07); --primary-focus:rgba(255,156,0,0.55);
  --text-primary:#ffffff; --text-secondary:rgba(255,255,255,0.65); --text-muted:rgba(255,255,255,0.52); --text-placeholder:rgba(255,255,255,0.26);
  --border-input:rgba(255,255,255,0.13); --border-subtle:rgba(127,130,168,0.20); --panel-outline:#443c52;
  --good:#4caf50; --bad:#e05a4e;
}
/* Niet op Quiz/Collect's editor (body.new-design): die hadden dit nooit, hun
   css/ui.css-layout rekent op content-box. */
:where(body:not(.new-design)), :where(body:not(.new-design)) * { box-sizing:border-box; }


/* =========================================================================
   PLAY — gedeelde basis van elke speelpagina (was play.css). Ontstaan
   2026-08-27 toen 9 index.php's byte-identieke kopieën bleken te hebben van
   dezelfde tokens/body/.wrap/h1/.topbar/.card/.btn/.status/picker-lijst.
   ========================================================================= */

body:where(:not(.mg-editor)) { margin:0; min-height:100vh; background:var(--bg-base); color:var(--text-primary); font-family:'Ubuntu',system-ui,sans-serif; padding:24px 16px 60px; }
:where(body:not(.mg-editor)) .wrap { margin:0 auto; } /* max-width stays page-local — differs per game */

:where(body:not(.mg-editor)) h1 { font-size:1.4em; font-weight:700; margin:0 0 6px; text-align:center; } /* some pages override margin to 0 0 18px when there's no subtitle right below */

:where(body:not(.mg-editor)) .topbar { display:flex; justify-content:flex-end; margin-bottom:10px; }
:where(body:not(.mg-editor)) .topbar a.btn { text-decoration:none; }

:where(body:not(.mg-editor)) .card { background:var(--bg-card); border:1px solid var(--panel-outline); border-radius:14px; padding:18px; margin-bottom:18px; }
:where(body:not(.mg-editor)) .hint { font-size:0.85em; color:var(--text-muted); }

:where(body:not(.mg-editor)) .btn { display:inline-flex; align-items:center; gap:6px; border:none; border-radius:8px; padding:10px 18px; font-size:0.85em; font-weight:700; text-transform:uppercase; letter-spacing:1.2px; cursor:pointer; background:rgba(255,255,255,0.10); color:#fff; text-decoration:none; }
:where(body:not(.mg-editor)) .btn.primary { background:var(--primary); color:#1a1b2f; }
:where(body:not(.mg-editor)) .btn.primary:hover { background:var(--primary-hover); }
:where(body:not(.mg-editor)) .btn:hover { background:rgba(255,255,255,0.16); }
:where(body:not(.mg-editor)) .btn:disabled { opacity:0.4; cursor:not-allowed; }

:where(body:not(.mg-editor)) .status { text-align:center; color:var(--text-muted); margin-top:10px; }

/* The "choose a puzzle/interview/story" picker screen — same shape
   everywhere, just two different class-name conventions in the wild
   (.puzzlelist/.puzzleitem vs. Adventure's .packlist/.packitem). */
:where(body:not(.mg-editor)) .puzzlelist, :where(body:not(.mg-editor)) .packlist { display:flex; flex-direction:column; gap:8px; }
:where(body:not(.mg-editor)) .puzzleitem, :where(body:not(.mg-editor)) .packitem { display:flex; align-items:center; justify-content:space-between; gap:10px; background:rgba(255,255,255,0.05); border:1px solid var(--border-input); border-radius:8px; padding:10px 14px; text-decoration:none; color:var(--text-primary); }
:where(body:not(.mg-editor)) .puzzleitem:hover, :where(body:not(.mg-editor)) .packitem:hover { background:rgba(255,255,255,0.09); }
:where(body:not(.mg-editor)) .puzzleitem .name, :where(body:not(.mg-editor)) .packitem .name { font-weight:600; }
:where(body:not(.mg-editor)) .puzzleitem .go, :where(body:not(.mg-editor)) .packitem .go { color:var(--primary); font-size:0.8em; text-transform:uppercase; letter-spacing:1px; font-weight:700; }

@media (min-width: 980px) {
  :where(body:not(.mg-editor)) .puzzlelist, :where(body:not(.mg-editor)) .packlist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Mobile base. body has 0 side padding here, so .wrap carries the real
   side padding and .card gets a matching negative margin so it still spans
   edge-to-edge (fixed 2026-08-27, first found on Interview).

   2026-11-06: .wrap krijgt op mobiel `max-width:none !important`. Zonder dat
   bleef een pagina met een eigen smallere wrap (Adventure 640px) tussen 641
   en 767px een smalle kolom: de kaart werd al vierkant/randloos terwijl hij
   niet 100% breed was -- precies wat Ruben zag. Door de wrap op mobiel los te
   laten, is de kaart in dit hele bereik echt viewport-breed en wint elke
   minigame de volle schermbreedte (tot 127px extra op 767px bij een 640px-
   wrap). Op een telefoon (<640px) verandert er niets aan de bestaande layout,
   want daar was de wrap toch al smaller dan zijn max-width. */
@media (max-width: 767px) {
  body:where(:not(.mg-editor)) { padding: 0 0 40px; }
  :where(body:not(.mg-editor)) .wrap { padding: 0 14px; max-width: none !important; }
  :where(body:not(.mg-editor)) h1 { font-size: 1.1em; margin: 10px 0 6px; }
  :where(body:not(.mg-editor)) .card { border-radius: 0; border-left: none; border-right: none; padding: 12px; margin-left: -14px; margin-right: -14px; }
  :where(body:not(.mg-editor)) .topbar { padding: 8px 0 0; }
  :where(body:not(.mg-editor)) .btn { padding: 8px 14px; font-size: 0.78em; letter-spacing: 0.8px; }
}


/* =========================================================================
   EDITOR — knoppen, actiebalk, secundaire acties, AI-veld, share-status
   (was editor.css, 2026-08-23: "zoals het bij quiz nu is, zo wil ik het bij
   alle minigames hebben qua knop styling"). Definieert BEIDE klassensystemen
   met exact hetzelfde resultaat:
     - .btn-xp-primary / .btn-xp-outline (+ .btn-xp-danger/-info/-ghost) —
       Quiz/Collect's markup (die laden ook css/ui.css, deze regels winnen
       daar op source order).
     - .btn / .btn.primary / .btn.danger / .btn.ai / .btn.ghost — de rest.
   ========================================================================= */

:where(.mg-editor) .btn-xp-primary, :where(.mg-editor) .btn.primary {
	display: inline-block;
	width: auto;
	padding: 12px 30px;
	background: #ff9c00;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-family: 'Ubuntu', sans-serif;
	font-size: 0.82em;
	font-weight: 700;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.18s;
	text-decoration: none;
	margin: 0;
}
:where(.mg-editor) .btn-xp-primary:hover,  :where(.mg-editor) .btn.primary:hover  { background: #e88c00; color: #fff; text-decoration: none; }
:where(.mg-editor) .btn-xp-primary:active, :where(.mg-editor) .btn.primary:active { transform: scale(0.98); }

:where(.mg-editor) .btn-xp-outline, :where(.mg-editor) .btn {
	display: inline-block;
	width: auto;
	padding: 9px 24px;
	border: 2px solid #ff9c00;
	background: transparent;
	color: #ff9c00;
	border-radius: 8px;
	font-family: 'Ubuntu', sans-serif;
	font-size: 0.82em;
	font-weight: 700;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.18s;
	text-decoration: none;
	margin: 0;
}
:where(.mg-editor) .btn-xp-outline:hover, :where(.mg-editor) .btn:hover { background: rgba(255,156,0,0.10); color: #ff9c00; text-decoration: none; }
:where(.mg-editor) .btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Rode variant, voor destructieve acties -- altijd gecombineerd als
   class="btn-xp-outline btn-xp-danger" of class="btn danger". */
:where(.mg-editor) .btn-xp-danger, :where(.mg-editor) .btn.danger { border-color: #dc3545; color: #ff8a97; }
:where(.mg-editor) .btn-xp-danger:hover, :where(.mg-editor) .btn.danger:hover { background: rgba(220,53,69,0.12); color: #ff8a97; }

/* Blauwe variant, voor "Generate/Get X with AI"-knoppen -- altijd
   gecombineerd als class="btn-xp-outline btn-xp-info" of class="btn ai". */
:where(.mg-editor) .btn-xp-info, :where(.mg-editor) .btn.ai { border-color: #3b82f6; color: #7db8ff; }
:where(.mg-editor) .btn-xp-info:hover, :where(.mg-editor) .btn.ai:hover { background: rgba(59,130,246,0.12); color: #7db8ff; }

/* "Ghost" variant, voor de secundaire van twee "terug"-knoppen naast elkaar
   (Back to list, naast het normale Back to quest) -- géén rand/achtergrond,
   alleen gedempte tekst tot je 'm hovert. */
:where(.mg-editor) .btn-xp-ghost, :where(.mg-editor) .btn.ghost { border-color: transparent; color: rgba(255,255,255,0.52); }
:where(.mg-editor) .btn-xp-ghost:hover, :where(.mg-editor) .btn.ghost:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: transparent; }

/* Vaste balk onderin met de kern-acties (Generate with AI / Preview / Save
   -- nooit meer dan dat). flex-wrap:nowrap + overflow-x:auto garandeert één
   regel, ook op een heel smal scherm (dan scrolt de balk zelf zijdelings). */
:where(.mg-editor) .action-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
	display: flex; flex-wrap: nowrap; align-items: center; gap: 8px;
	padding: 10px 16px; overflow-x: auto;
	background: rgba(26,27,47,0.97);
	border-top: 2px solid #ff9c00;
	box-shadow: 0 -4px 18px rgba(0,0,0,0.3);
}
:where(.mg-editor) .action-bar > * { flex-shrink: 0; }
:where(.mg-editor) .action-bar form { margin: 0; display: inline-flex; gap: 8px; }
:where(.mg-editor) .action-bar .action-bar-spacer { flex: 1 1 auto; min-width: 8px; }
/* Lijn-iconen in de actiebalk (editor-sections.js voegt ze toe); op mobiel
   alleen het icoon, vierkante knoppen. */
:where(.mg-editor) .action-bar .ab-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
:where(.mg-editor) .action-bar .ab-icon { width: 16px; height: 16px; flex-shrink: 0; }
:where(.mg-editor) .action-bar input.ab-btn[data-ab-icon] { background-repeat: no-repeat; background-position: 12px center; background-size: 16px 16px; padding-left: 34px; }
:where(.mg-editor) .action-bar input.ab-btn[data-ab-icon="save"] {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h11l3 3v13a2 2 0 01-2 2H7a2 2 0 01-2-2z'/%3E%3Cpath d='M8 3v5h7V3M8 21v-7h8v7'/%3E%3C/svg%3E");
}
@media (max-width: 600px) {
	:where(.mg-editor) .action-bar { padding: 8px 10px; gap: 8px; }
	:where(.mg-editor) .action-bar .ab-label { display: none; }
	:where(.mg-editor) .action-bar .ab-btn, :where(.mg-editor) .action-bar #packShareBtn {
		box-sizing: border-box; width: 44px; height: 44px; padding: 0; font-size: 0; gap: 0; border-radius: 10px; margin: 0;
	}
	:where(.mg-editor) .action-bar .ab-icon, :where(.mg-editor) .action-bar #packShareBtn svg { width: 20px; height: 20px; margin: 0; }
	:where(.mg-editor) .action-bar input.ab-btn[data-ab-icon] { color: transparent; background-position: center; background-size: 20px 20px; padding: 0; }
}

/* Onderaan de editor (los van de vaste balk) -- gedempte tekstlinkjes voor
   Duplicate/Delete, géén boxed-button-look. Twee klassenamen, zelfde stijl:
   quiz/collect gebruiken .pack-editor-secondary-actions, de rest
   .secondary-actions. */
:where(.mg-editor) .pack-editor-secondary-actions, :where(.mg-editor) .secondary-actions { margin-top: 16px; display: flex; gap: 16px; }
:where(.mg-editor) .pack-editor-secondary-actions input[type="submit"], :where(.mg-editor) .secondary-actions input[type="submit"] {
	width: auto; background: none; border: none; color: rgba(255,255,255,0.5);
	font-size: 0.82em; font-family: inherit; font-weight: 400; text-transform: none;
	letter-spacing: 0; padding: 0; cursor: pointer;
}
:where(.mg-editor) .pack-editor-secondary-actions input[type="submit"]:hover, :where(.mg-editor) .secondary-actions input[type="submit"]:hover { color: #fff; text-decoration: underline; }
:where(.mg-editor) .pack-editor-secondary-actions input[name="delete_pack"], :where(.mg-editor) .secondary-actions input[name="delete_pack"] { color: rgba(255,138,151,0.65); }
:where(.mg-editor) .pack-editor-secondary-actions input[name="delete_pack"]:hover, :where(.mg-editor) .secondary-actions input[name="delete_pack"]:hover { color: #ff8a80; }

/* Auto-growing "textarea disguised as a single-line input" for the AI-modal
   theme/topic fields. Starts at rows="1" and grows with its content via each
   editor's own small xpAutoGrowTextarea() helper; min-height gives it a
   taller starting point than a bare one-line textarea. */
:where(.mg-editor) .ai-autogrow {
	resize: none;
	overflow: hidden;
	line-height: 1.4;
	min-height: 2.8em;
}

/* "Get share link"-knop (publiceren = delen, 2026-09-28): de link zelf zodra
   gedeeld (.pack-share-status) en de badge in de packs-lijst
   (.pack-published-badge). NB: tot 2026-10-28 waren deze twee regels dood
   doordat .ai-autogrow hierboven in de oude editor.css zijn sluitende }
   miste — ze zijn nu voor het eerst echt actief. */
:where(.mg-editor) .pack-share-status {
	display: block;
	font-size: 0.82em;
	color: rgba(255,255,255,0.6);
	margin-bottom: 6px;
}
:where(.mg-editor) .pack-share-status a { color: #ff9c00; word-break: break-all; }
:where(.mg-editor) .pack-published-badge {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 8px;
	border-radius: 999px;
	border: 1px solid rgba(255,156,0,0.5);
	background: rgba(255,156,0,0.12);
	color: #ff9c00;
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	vertical-align: middle;
}


/* =========================================================================
   EDITOR BASE — layout/formulier/packs-lijst/AI-modal-regels die tot
   2026-10-28 letterlijk identiek in elk van de 14 standalone editors' eigen
   <style> stonden. Niet voor Quiz/Collect (body.new-design, die leunen op
   css/ui.css). Bewust NIET hier: de element-selectors (input/select/textarea,
   select option, ::placeholder) en .wrap/textarea.wide/.header .hint — die
   verschillen per editor of ontbreken in Gallery, en blijven daarom
   page-local.
   ========================================================================= */

body:where(.mg-editor:not(.new-design)) { margin:0; min-height:100vh; background:var(--bg-base); color:var(--text-primary); font-family:'Ubuntu',system-ui,sans-serif; padding:24px 16px 84px; }
:where(.mg-editor:not(.new-design)) .header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:20px; }
:where(.mg-editor:not(.new-design)) .header h1 { font-size:1.4em; font-weight:700; margin:0; }
:where(.mg-editor:not(.new-design)) .card { background:var(--bg-card); border:1px solid var(--panel-outline); border-radius:14px; padding:18px; margin-bottom:18px; }
:where(.mg-editor:not(.new-design)) .card h3 { margin:0 0 12px; font-size:0.78em; text-transform:uppercase; letter-spacing:0.05em; color:var(--text-muted); font-weight:700; }
:where(.mg-editor:not(.new-design)) .hint { font-size:0.82em; color:var(--text-muted); }
:where(.mg-editor:not(.new-design)) .error { color:#ff8a80; font-size:0.85em; margin-top:8px; font-weight:600; }
:where(.mg-editor:not(.new-design)) .form-row { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:10px; }
:where(.mg-editor:not(.new-design)) .field { display:flex; flex-direction:column; gap:4px; margin-bottom:10px; }
:where(.mg-editor:not(.new-design)) .field label { font-size:0.75em; font-weight:700; color:var(--text-muted); }
:where(.mg-editor:not(.new-design)) .field-row { display:flex; gap:10px; }
:where(.mg-editor:not(.new-design)) .field-row .field { flex:1; }

/* Mobiel: dezelfde edge-to-edge kaart als de speelpagina's. Editors hadden
   tot 2026-11-06 altijd body-padding 16 + kaart-padding 18 = 34px per kant,
   ook op een telefoon -- fors minder bruikbare breedte dan een speelpagina.
   Nu draagt .wrap de 14px zijmarge en hangen de kaarten met -14px naar de
   schermranden; de inhoud houdt 12px lucht. `max-width:none !important` doet
   hetzelfde als bij de speelpagina's: een eigen smallere wrap (Gallery 720px)
   mag op mobiel niet als smalle kolom blijven staan, anders is een randloze
   kaart tussen 641 en 767px weer niet 100% breed. */
@media (max-width: 767px) {
  body:where(.mg-editor:not(.new-design)) { padding-left: 0; padding-right: 0; }
  :where(.mg-editor:not(.new-design)) .wrap { padding-left: 14px; padding-right: 14px; max-width: none !important; }
  :where(.mg-editor:not(.new-design)) .card { border-radius: 0; border-left: none; border-right: none; padding-left: 12px; padding-right: 12px; margin-left: -14px; margin-right: -14px; }
}

/* AI-modal (backdrop/close/stappen) */
:where(.mg-editor:not(.new-design)) .modal-backdrop { position:fixed; inset:0; background:rgba(0,0,0,0.68); display:flex; align-items:center; justify-content:center; padding:16px; z-index:50; }
:where(.mg-editor:not(.new-design)) .modal h2 { margin:0 0 6px; font-size:1.3em; font-weight:700; }
:where(.mg-editor:not(.new-design)) .modal-close { position:absolute; top:14px; right:14px; border:none; background:rgba(255,255,255,0.09); border-radius:50%; width:28px; height:28px; cursor:pointer; color:#fff; }
:where(.mg-editor:not(.new-design)) .modal-close:hover { background:rgba(255,255,255,0.17); }
:where(.mg-editor:not(.new-design)) .modal-step { margin-top:18px; padding-top:16px; border-top:1px solid var(--border-subtle); }
:where(.mg-editor:not(.new-design)) .modal-step h4 { margin:0 0 10px; font-size:0.8em; text-transform:uppercase; letter-spacing:0.05em; color:var(--text-muted); }
:where(.mg-editor:not(.new-design)) .steps { display:flex; margin-top:16px; border:1px solid var(--border-input); border-radius:8px; overflow:hidden; }
:where(.mg-editor:not(.new-design)) .step { flex:1; display:flex; align-items:center; justify-content:center; gap:6px; padding:8px 6px; font-size:0.75em; font-weight:600; color:var(--text-muted); border-right:1px solid var(--border-input); cursor:pointer; }
:where(.mg-editor:not(.new-design)) .step:hover { color:#fff; background:rgba(255,255,255,0.04); }
:where(.mg-editor:not(.new-design)) .step:last-child { border-right:none; }
:where(.mg-editor:not(.new-design)) .step.active { color:#fff; background:rgba(255,255,255,0.06); }
:where(.mg-editor:not(.new-design)) .step.done { color:#fff; }
:where(.mg-editor:not(.new-design)) .step-num { width:18px; height:18px; border-radius:50%; border:1px solid var(--text-muted); display:flex; align-items:center; justify-content:center; font-size:0.68em; flex-shrink:0; }
:where(.mg-editor:not(.new-design)) .step.active .step-num, :where(.mg-editor:not(.new-design)) .step.done .step-num { border-color:var(--primary); background:var(--primary); color:#1a1b2f; }

/* "Your packs"-lijst + This quest/This game/All my packs scope-filter */
:where(.mg-editor:not(.new-design)) .pack-table { width:100%; border-collapse:collapse; margin-bottom:6px; }
:where(.mg-editor:not(.new-design)) .pack-table th, :where(.mg-editor:not(.new-design)) .pack-table td { text-align:left; padding:7px 8px; border-bottom:1px solid var(--border-subtle); font-size:0.85em; }
:where(.mg-editor:not(.new-design)) .pack-table a { margin-right:10px; color:var(--primary); text-decoration:none; }
:where(.mg-editor:not(.new-design)) .pack-table a:hover { text-decoration:underline; }
:where(.mg-editor:not(.new-design)) .pack-muted { color:var(--text-placeholder); }
:where(.mg-editor:not(.new-design)) .pack-copy-form { display:inline; }
:where(.mg-editor:not(.new-design)) .pack-linklike { float:none; width:auto; background:none; border:none; color:var(--primary); font-size:inherit; font-family:inherit; padding:0; cursor:pointer; text-decoration:none; }
:where(.mg-editor:not(.new-design)) .pack-linklike:hover { text-decoration:underline; }
:where(.mg-editor:not(.new-design)) .pack-scope-row { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:10px; }
:where(.mg-editor:not(.new-design)) .pack-scope-btn { appearance:none; padding:5px 10px; border-radius:6px; background:rgba(255,255,255,0.05); border:1px solid var(--border-input); color:var(--text-muted); font-size:0.8em; cursor:pointer; }
:where(.mg-editor:not(.new-design)) .pack-scope-btn:hover { color:#fff; border-color:rgba(255,255,255,0.3); }
:where(.mg-editor:not(.new-design)) .pack-scope-btn.active { color:var(--primary); border-color:rgba(255,156,0,0.5); background:var(--primary-dim); }
:where(.mg-editor:not(.new-design)) .linked-notice { background:rgba(255,156,0,0.08); border:1px solid rgba(255,156,0,0.25); padding:6px 10px; border-radius:6px; margin-bottom:10px; font-size:0.8em; }

/* ==========================================================================
   Gedeelde regels (CSS-opschoning fase 2, 2026-10-30)
   Letterlijk identieke regels die in meerdere pagina-<style>-blokken
   stonden; hier één keer. "was:" noemt de bestanden waar ze vandaan komen.
   ========================================================================== */
/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-copy-form {
    display: inline;
}

/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-error {
    background: rgba(220,53,69,0.12);
    border: 1px solid rgba(220,53,69,0.35);
    color: var(--text-primary);
    padding: 7px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 0.85em;
}

/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-linked-notice {
    background: rgba(255,156,0,0.08);
    border: 1px solid rgba(255,156,0,0.25);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 0.8em;
}

/* was: geohunt/editor.php, interview/editor.php */
:where(.mg-editor) .responses-notice {
    background:rgba(76,175,80,0.08);
    border:1px solid rgba(76,175,80,0.3);
    padding:8px 12px;
    border-radius:6px;
    margin-bottom:10px;
    font-size:0.85em;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

/* --- Gedeelde regels, ronde 2 (2026-10-30): letterlijk identiek in meerdere pagina-<style>-blokken --- */
/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-modal-backdrop {
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.68);
    display:none;
    align-items:center;
    justify-content:center;
    padding:16px;
    z-index:60;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-modal-backdrop.open {
    display:flex;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-modal h2 {
    margin:0 0 6px;
    font-size:1.25em;
    font-weight:700;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-modal-step {
    margin-top:16px;
    padding-top:14px;
    border-top:1px solid var(--border-subtle);
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-modal-step h4 {
    margin:0 0 8px;
    font-size:0.78em;
    text-transform:uppercase;
    letter-spacing:0.05em;
    color:var(--text-muted);
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-field {
    display:flex;
    flex-direction:column;
    gap:4px;
    margin-bottom:10px;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-field label {
    font-size:0.82em;
    font-weight:500;
    color:var(--text-muted);
    letter-spacing:0.2px;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-field input::placeholder,
:where(.mg-editor) .ai-field textarea::placeholder {
    color:var(--text-placeholder);
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-field select option {
    color:#1a1b2f;
    background:#fff;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-field-row {
    display:flex;
    gap:10px;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-field-row .ai-field {
    flex:1;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-modal textarea.wide::placeholder {
    color:var(--text-placeholder);
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-step {
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:7px 6px;
    font-size:0.72em;
    font-weight:600;
    color:var(--text-muted);
    border-right:1px solid var(--border-input);
    cursor:pointer;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-step:last-child {
    border-right:none;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-step.done {
    color:var(--text-primary);
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-step-num {
    width:17px;
    height:17px;
    border-radius:50%;
    border:1px solid var(--text-muted);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:0.65em;
    flex-shrink:0;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-step.active .ai-step-num,
:where(.mg-editor) .ai-step.done .ai-step-num {
    border-color:var(--primary);
    background:var(--primary);
    color:#1a1b2f;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-modal-row {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    margin-top:10px;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-modal-error {
    color:#ff8a80;
    font-size:0.82em;
    margin-top:8px;
    font-weight:600;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-modal-hint {
    color:var(--text-muted);
    font-size:0.8em;
    margin:2px 0 0;
}

/* Questcontext-note in de AI-modal (pack-quest-context.php). De note komt per
   editor als los element in #aiStep1/#aiQuizStep1, dus de gedeelde
   editor-inputregel (:where(.mg-editor:not(.new-design)) input, regel ~700)
   raakt dit vinkje ook: die zet width:100% + padding op ELKE input. Zonder de
   expliciete maat hieronder werd de checkbox de halve modal breed en werd de
   tekst in een smalle kolom geperst (alle editors behalve Quiz, 2026-11-16). */
:where(.mg-editor) .xp-quest-context-toggle {
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin:0 0 12px;
    padding:8px 11px;
    border:1px solid rgba(255,255,255,0.11);
    border-radius:8px;
    background:rgba(255,255,255,0.04);
    font-size:0.8em;
    line-height:1.45;
    color:var(--text-secondary);
    cursor:pointer;
    transition:border-color 0.15s, background 0.15s;
}
:where(.mg-editor) .xp-quest-context-toggle:hover {
    border-color:rgba(255,255,255,0.22);
    background:rgba(255,255,255,0.06);
}
:where(.mg-editor) .xp-quest-context-toggle:has(input:focus-visible) {
    outline:2px solid var(--primary-focus);
    outline-offset:1px;
}
:where(.mg-editor) .xp-quest-context-toggle input[type="checkbox"] {
    width:16px;
    height:16px;
    margin:1px 0 0;
    padding:0;
    flex:0 0 auto;
    float:none;
    box-sizing:border-box;
    border:0;
    background:none;
    accent-color:var(--primary);
    cursor:pointer;
}
:where(.mg-editor) .xp-quest-context-toggle > span { flex:1 1 auto; min-width:0; }
:where(.mg-editor) .xp-quest-context-toggle strong { color:var(--text-primary); font-weight:600; }
:where(.mg-editor) .xp-quest-context-toggle .xp-quest-context-hint { color:var(--text-muted); }

/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-page .new-card {
    margin-bottom: 12px;
}

/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-page .new-card-body {
    padding: 12px 14px;
}

/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-page .new-card-body h2 {
    margin: 0 0 8px;
    font-size: 0.95em;
}

/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-intro {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin: 0 0 10px;
}

/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-muted {
    color: rgba(255,255,255,0.35);
}

/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-linklike {
    float: none;
    display: inline;
    width: auto;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    color: var(--primary);
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
}

/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-linklike:hover {
    text-decoration: underline;
}

/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}

/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-table th,
:where(.mg-editor) .pack-editor-table td {
    text-align: left;
    padding: 5px 8px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.85em;
}

/* was: collect/editor.php, quiz/editor.php */
:where(.mg-editor) .pack-editor-table a {
    margin-right: 8px;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-modal-close {
    position:absolute;
    top:13px;
    right:13px;
    border:none;
    background:rgba(255,255,255,0.09);
    border-radius:50%;
    width:28px;
    height:28px;
    cursor:pointer;
    color:var(--text-primary);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0;
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-modal-close:hover {
    background:rgba(255,255,255,0.17);
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-field input:focus,
:where(.mg-editor) .ai-field select:focus,
:where(.mg-editor) .ai-field textarea:focus {
    outline:none;
    border-color:var(--primary-focus);
    background:rgba(255,255,255,0.10);
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-modal textarea.wide:focus {
    outline:none;
    border-color:var(--primary-focus);
    background:rgba(255,255,255,0.10);
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-modal textarea.wide[readonly] {
    background:rgba(255,255,255,0.04);
    color:var(--text-secondary);
}

/* was: interview/editor.php, quiz/editor.php */
:where(.mg-editor) .ai-step.active {
    color:var(--text-primary);
    background:rgba(255,255,255,0.06);
}

/* was: crossword/index.php, wordsearch/index.php */
:where(body:not(.mg-editor)) .toolbar {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
    margin-bottom:14px;
}

/* was: connections/index.php, drag-sequence/index.php */
:where(body:not(.mg-editor)) .q-bar-num {
    flex:0 0 auto;
    width:34px;
    height:34px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:rgba(0,0,0,.2);
    font-size:1em;
    font-weight:800;
}

/* was: connections/index.php, drag-sequence/index.php */
:where(body:not(.mg-editor)) .q-bar-text {
    flex:1 1 auto;
    min-width:0;
}

/* was: connections/index.php, drag-sequence/index.php */
:where(body:not(.mg-editor)) .bar.pass-met {
    background:linear-gradient(90deg,#1e7e34,#28a745);
}

/* --- Editor-formulierbasis (CSS-opschoning, 2026-10-30) ---------------------
   Stond met kleine variaties in 13 editors (font-size 0.85/0.9em, focus-
   kleur via --primary-focus/--primary/rgba, modal-achtergrond var/#2e3050).
   Gelijkgetrokken naar de meest gebruikte variant. Alleen editors zonder
   .new-design (quiz/collect gebruiken css/ui.css's formulieren). Echte
   afwijkingen staan nog als 1 regel in de pagina zelf. */
:where(.mg-editor:not(.new-design)) input,
:where(.mg-editor:not(.new-design)) select,
:where(.mg-editor:not(.new-design)) textarea {
    background: rgba(255,255,255,0.07); border: 1px solid var(--border-input); border-radius: 8px;
    color: #fff; padding: 8px 10px; font-size: 0.85em; font-family: inherit;
    width: 100%; box-sizing: border-box;
}
:where(.mg-editor:not(.new-design)) input:focus,
:where(.mg-editor:not(.new-design)) select:focus,
:where(.mg-editor:not(.new-design)) textarea:focus { background: rgba(255,255,255,0.10); border-color: var(--primary-focus); outline: none; }
:where(.mg-editor:not(.new-design)) input::placeholder,
:where(.mg-editor:not(.new-design)) textarea::placeholder { color: var(--text-placeholder); }
:where(.mg-editor:not(.new-design)) select option { background: #fff; color: #1a1b2f; }
:where(.mg-editor:not(.new-design)) textarea.wide { width: 100%; resize: vertical; box-sizing: border-box; }
:where(.mg-editor:not(.new-design)) .header .hint { color: var(--text-muted); font-size: 0.8em; }
:where(.mg-editor:not(.new-design)) .toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
:where(.mg-editor:not(.new-design)) .layout { display: block; }
:where(.mg-editor:not(.new-design)) .col-left,
:where(.mg-editor:not(.new-design)) .col-right { min-width: 0; }
:where(.mg-editor:not(.new-design)) .check { display: flex; align-items: center; gap: 6px; font-size: 0.85em; color: var(--text-secondary); cursor: pointer; }
:where(.mg-editor:not(.new-design)) .check input[type="checkbox"] { width: auto; flex: none; }
:where(.mg-editor:not(.new-design)) .report { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--border-input); border-radius: 10px; font-size: 0.85em; }
:where(.mg-editor:not(.new-design)) .modal {
    background: var(--bg-modal); border: 1px solid var(--panel-outline); border-radius: 16px;
    padding: 36px 40px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; position: relative;
}

/* --- Gedeelde regels, ronde 2 (2026-10-30): letterlijk identiek in meerdere pagina-<style>-blokken --- */
/* was: cipher/editor.php, crossword/editor.php, wordsearch/editor.php */
:where(.mg-editor:not(.new-design)) .report.warn {
    border-color:#c98a2e;
}

/* was: cipher/editor.php, crossword/editor.php, wordsearch/editor.php */
:where(.mg-editor:not(.new-design)) .reportcount {
    font-size:1.05em;
    font-weight:700;
}

/* was: codebreaker/editor.php, drag-sequence/editor.php */
:where(.mg-editor:not(.new-design)) .round-card {
    border:1px solid var(--border-subtle);
    border-radius:10px;
    padding:14px;
    margin-bottom:14px;
    background:rgba(255,255,255,0.02);
}

/* was: crossword/editor.php, wordsearch/editor.php */
:where(.mg-editor:not(.new-design)) .genrow {
    display:flex;
    gap:8px;
    margin-bottom:8px;
    align-items:center;
}

/* was: crossword/editor.php, wordsearch/editor.php */
:where(.mg-editor:not(.new-design)) .genrow .rownum {
    width:20px;
    flex-shrink:0;
    text-align:right;
    font-size:0.75em;
    color:var(--text-muted);
    font-weight:700;
}

/* was: crossword/editor.php, wordsearch/editor.php */
:where(.mg-editor:not(.new-design)) .genrow .delRow {
    padding:4px 9px;
}

/* was: interview/editor.php, mazemaster/editor.php */
:where(.mg-editor:not(.new-design)) .qcard-head {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:8px;
}

/* --- Speelpagina-onderdelen (CSS-opschoning, 2026-10-31) ---------------------
   Stonden (bijna) gelijk in meerdere speelpagina's; gelijkgetrokken naar de
   meest gebruikte variant. Pagina-specifieke afwijkingen (bv. crossword's
   .reveal-kleuren, de .img-wrap-breedte per scherm) blijven in de pagina. */
:where(body:not(.mg-editor)) .subtitle { text-align: center; color: var(--text-muted); font-size: 0.85em; margin-bottom: 18px; }
:where(body:not(.mg-editor)) .reveal { background: var(--bg-card); border: 1px solid var(--good); border-radius: 14px; padding: 22px; text-align: center; margin-bottom: 18px; }
:where(body:not(.mg-editor)) .reveal h3 { font-size: 1.1em; margin: 0 0 10px; }
/* Vraag-balk + voortgang (connections, drag-sequence) */
:where(body:not(.mg-editor)) .q-bar { display: flex; align-items: center; gap: 12px; background: var(--q-color); color: var(--q-text-color); border-radius: 12px; padding: 12px 16px 12px 12px; font-weight: 700; font-size: 1.08em; line-height: 1.35; margin-bottom: 16px; }
:where(body:not(.mg-editor)) .progress-wrap { position: relative; margin: 0 0 18px; }
:where(body:not(.mg-editor)) .progress { height: 10px; background: #0b0f14; border-radius: 999px; overflow: hidden; border: 1px solid var(--panel-outline); }
/* Vraag-afbeelding (adventure, connections, drag-sequence) */
:where(body:not(.mg-editor)) .img-wrap { width: 50%; aspect-ratio: 16/9; background: #a2a7af; border-radius: 12px; overflow: hidden; margin: 0 auto 18px; display: grid; place-items: center; border: 1px solid var(--panel-outline); }
:where(body:not(.mg-editor)) .img-wrap img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/9; }

/* --- Score-slider (pass/bonus), gedeeld door de pack-editors -----------------
   Hoort bij ../score-slider.js (XPScoreSlider). Stoplicht op één balk
   (Ruben 2026-10-31: groen hoort bij het beste): rood-grijs = nog geen XP,
   geel = quest-XP, groen = ook bonus-XP. Zonder bonus is pass zelf groen. */
:where(.mg-editor) .xp-score { --xs-none:#5a3a46; --xs-pass:#ffc233; --xs-bonus:#4caf50; margin:6px 0 14px; user-select:none; }
:where(.mg-editor) .xp-score.is-nobonus { --xs-pass:#4caf50; }
:where(.mg-editor) .xp-score-readouts { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:18px; }
:where(.mg-editor) .xp-score-readout { border-radius:12px; padding:10px 14px; border:1px solid; background:rgba(0,0,0,0.18); }
:where(.mg-editor) .xp-score-readout.is-pass { border-color:rgba(255,194,51,0.6); background:linear-gradient(135deg, rgba(255,194,51,0.22), rgba(255,194,51,0.05)); }
:where(.mg-editor) .xp-score-readout.is-bonus { border-color:rgba(76,175,80,0.55); background:linear-gradient(135deg, rgba(76,175,80,0.20), rgba(76,175,80,0.05)); }
:where(.mg-editor) .xp-score.is-nobonus .xp-score-readout.is-pass { border-color:rgba(76,175,80,0.55); background:linear-gradient(135deg, rgba(76,175,80,0.20), rgba(76,175,80,0.05)); }
:where(.mg-editor) .xp-score-readout.is-off { opacity:.5; border-style:dashed; background:transparent; }
:where(.mg-editor) .xp-score-readout.is-bonus { position:relative; }
:where(.mg-editor) .xp-score-readout.is-clickable { cursor:pointer; opacity:.75; transition:opacity .15s, background .15s; }
:where(.mg-editor) .xp-score-readout.is-clickable:hover, :where(.mg-editor) .xp-score-readout.is-clickable:focus-visible { opacity:1; background:rgba(76,175,80,0.10); outline:none; }
:where(.mg-editor) .xp-score-readout.is-clickable .xp-score-readout-sub { color:var(--xs-bonus); font-weight:700; }
:where(.mg-editor) .xp-score-switch { position:absolute; top:8px; right:8px; width:36px; height:20px; margin:0; padding:0; border:0; border-radius:999px; background:rgba(255,255,255,0.18); cursor:pointer; transition:background .15s; }
:where(.mg-editor) .xp-score-switch.is-on { background:var(--xs-bonus); }
:where(.mg-editor) .xp-score-switch:disabled { opacity:.4; cursor:default; }
:where(.mg-editor) .xp-score-switch:focus-visible { outline:2px solid #fff; outline-offset:2px; }
:where(.mg-editor) .xp-score-switch-knob { position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,0.4); transition:left .15s; }
:where(.mg-editor) .xp-score-switch.is-on .xp-score-switch-knob { left:18px; }
:where(.mg-editor) .xp-score-readout.is-bonus .xp-score-readout-head { padding-right:44px; }
:where(.mg-editor) .xp-score-readout.is-off .xp-score-switch { opacity:1; }
:where(.mg-editor) .xp-score-readout-head { display:flex; align-items:center; gap:6px; font-size:0.72em; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-secondary); }
:where(.mg-editor) .xp-score-readout-icon { display:inline-grid; place-items:center; width:18px; height:18px; border-radius:50%; font-size:11px; line-height:1; color:#1a1b2f; }
:where(.mg-editor) .is-bonus .xp-score-readout-icon { font-size:12px; padding-bottom:1px; box-sizing:border-box; }
:where(.mg-editor) .is-pass .xp-score-readout-icon { background:var(--xs-pass); }
:where(.mg-editor) .is-bonus .xp-score-readout-icon { background:var(--xs-bonus); }
:where(.mg-editor) .xp-score-readout-big { font-size:1.05em; color:var(--text-secondary); margin-top:4px; }
:where(.mg-editor) .xp-score-readout-big strong { font-size:1.9em; line-height:1; color:var(--text-primary); margin-right:2px; }
:where(.mg-editor) .xp-score-readout-sub { font-size:0.8em; color:var(--text-muted); margin-top:2px; }

:where(.mg-editor) .xp-score-trackwrap { position:relative; height:58px; margin:0 14px; }
:where(.mg-editor) .xp-score-track { position:absolute; left:0; right:0; top:22px; height:14px; border-radius:999px; background:var(--xs-none); cursor:pointer; overflow:hidden; box-shadow:inset 0 1px 3px rgba(0,0,0,0.4); }
:where(.mg-editor) .xp-score-zone { position:absolute; top:0; bottom:0; left:0; }
:where(.mg-editor) .xp-score-zone.is-none { background:repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 6px, transparent 6px 12px); }
:where(.mg-editor) .xp-score-zone.is-pass { background:var(--xs-pass); }
:where(.mg-editor) .xp-score-zone.is-bonus { background:var(--xs-bonus); }
:where(.mg-editor) .xp-score-ticks { position:absolute; left:0; right:0; top:40px; height:16px; pointer-events:none; }
:where(.mg-editor) .xp-score-tick { position:absolute; top:0; width:1px; height:5px; background:rgba(255,255,255,0.25); }
:where(.mg-editor) .xp-score-tick-num { position:absolute; top:5px; left:0; transform:translateX(-50%); font-size:10px; color:var(--text-muted); }
:where(.mg-editor) .xp-score-thumb { position:absolute; top:29px; width:26px; height:26px; margin:0; padding:0; border-radius:50%; border:3px solid #fff; transform:translate(-50%, -50%); cursor:grab; touch-action:none; box-shadow:0 2px 8px rgba(0,0,0,0.45); transition:transform .1s; z-index:2; }
:where(.mg-editor) .xp-score-thumb.is-pass { background:var(--xs-pass); }
:where(.mg-editor) .xp-score-thumb.is-bonus { background:var(--xs-bonus); z-index:3; }
:where(.mg-editor) .xp-score-thumb:hover, :where(.mg-editor) .xp-score-thumb:focus-visible { transform:translate(-50%, -50%) scale(1.15); outline:none; }
:where(.mg-editor) .xp-score-thumb.is-dragging { cursor:grabbing; transform:translate(-50%, -50%) scale(1.2); }
:where(.mg-editor) .xp-score-thumb.is-locked { cursor:default; transform:translate(-50%, -50%); }
:where(.mg-editor) .xp-score-thumb-label { position:absolute; bottom:calc(100% + 6px); left:50%; transform:translateX(-50%); min-width:22px; padding:1px 6px; border-radius:6px; font-size:12px; font-weight:800; color:#1a1b2f; white-space:nowrap; pointer-events:none; }
:where(.mg-editor) .xp-score-thumb.is-pass .xp-score-thumb-label { background:var(--xs-pass); }
:where(.mg-editor) .xp-score-thumb.is-bonus .xp-score-thumb-label { background:var(--xs-bonus); }

:where(.mg-editor) .xp-score-footer { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:12px; }
:where(.mg-editor) .xp-score-toggle { flex:0 0 auto; width:auto; margin:0; padding:5px 12px; border-radius:999px; border:1px dashed rgba(76,175,80,0.6); background:transparent; color:var(--xs-bonus); font-size:0.82em; font-weight:700; cursor:pointer; }
:where(.mg-editor) .xp-score-toggle.is-on { border-style:solid; background:rgba(76,175,80,0.15); }
:where(.mg-editor) .xp-score-toggle:disabled { opacity:.4; cursor:default; }
:where(.mg-editor) .xp-score-summary { flex:1 1 220px; font-size:0.85em; color:var(--text-secondary); }
:where(.mg-editor) .xp-score-empty { padding:12px; border:1px dashed var(--border-input); border-radius:10px; color:var(--text-muted); font-size:0.85em; text-align:center; }
:where(.mg-editor) .xp-score.is-nobonus .xp-score-readouts { grid-template-columns:minmax(0, 320px); }
/* min/max-modus (Collect, Gallery, Word Cloud): groen = minimum, blauw = maximum (bonus) -- bewust anders dan de geel/groene score-modus */
:where(.mg-editor) .xp-score.is-range { --xs-pass:#4caf50; --xs-bonus:#6ea8ff; }
:where(.mg-editor) .xp-score.is-range .xp-score-readout.is-pass { border-color:rgba(76,175,80,0.55); background:linear-gradient(135deg, rgba(76,175,80,0.20), rgba(76,175,80,0.05)); }
:where(.mg-editor) .xp-score.is-range .xp-score-readout.is-bonus:not(.is-off) { border-color:rgba(110,168,255,0.6); background:linear-gradient(135deg, rgba(110,168,255,0.20), rgba(110,168,255,0.05)); }
:where(.mg-editor) .xp-score.is-range .xp-score-readout.is-bonus .xp-score-readout-icon { font-size:14px; font-weight:700; padding-bottom:2px; }
@media (max-width:520px) { :where(.mg-editor) .xp-score-readouts { grid-template-columns:1fr; } }

/* --- Inklapbare editor-blokken -------------------------------------------------
   Hoort bij ../editor-sections.js (XPEditorSections). Een aangeraakt blok klapt
   in zodra je in een ander blok begint en toont dan een samenvatting. */
:where(.mg-editor) .mg-section-head { display:flex; align-items:center; gap:12px; cursor:pointer; user-select:none; margin:-4px 0 0; }
:where(.mg-editor) .mg-section-head h3 { margin:0 !important; flex:0 0 auto; }
:where(.mg-editor) .mg-section-summary { flex:1 1 auto; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:0.88em; font-weight:500; color:rgba(255,255,255,0.85); display:none; }
:where(.mg-editor) .mg-section-chevron { flex:0 0 auto; margin-left:auto; display:inline-grid; place-items:center; width:26px; height:26px; border-radius:50%; color:var(--text-muted); transition:transform .2s, background .15s; }
:where(.mg-editor) .mg-section-head:hover .mg-section-chevron { background:rgba(255,255,255,0.08); color:var(--text-primary); }
:where(.mg-editor) .mg-section-head:focus-visible { outline:2px solid var(--primary-focus); outline-offset:4px; border-radius:8px; }
:where(.mg-editor) .mg-section-body { margin-top:12px; }
:where(.mg-editor) .mg-section-enhanced.is-collapsed { padding-top:12px; padding-bottom:12px; }
:where(.mg-editor) .mg-section-enhanced.is-collapsed .mg-section-body { display:none; }
:where(.mg-editor) .mg-section-enhanced.is-collapsed .mg-section-summary { display:block; }
:where(.mg-editor) .mg-section-enhanced.is-collapsed .mg-section-chevron { transform:rotate(-90deg); }
:where(.mg-editor) .mg-section-enhanced.is-collapsed:hover { border-color:rgba(255,156,0,0.35); }
/* Quiz/Collect (body.new-design) hebben geen .card -- daar geeft .mg-section zelf het blok-uiterlijk */
:where(.mg-editor.new-design) .mg-section { background:rgba(255,255,255,0.03); border:1px solid var(--border-subtle); border-radius:14px; padding:16px 18px; margin:0 0 16px; clear:both; }
:where(.mg-editor.new-design) .mg-section-head h3 { font-size:0.78em; text-transform:uppercase; letter-spacing:0.05em; color:var(--text-muted); font-weight:700; }

/* Mobiel, Quiz/Collect (body.new-design). Deze editors hebben geen .wrap/
   .card maar .pack-editor-page + losse .mg-section's; hun padding stapelde
   op een telefoon tot 16 (page) + 18 (sectie) + 10 (question-card) = 44px
   per kant. De page houdt nu 14px voor koppen/intro, terwijl secties (en de
   Your packs/New pack-kaarten) met -14px naar de rand hangen en zelf 14px
   binnenmarge houden -- content-inset 14 i.p.v. 34, en 24 i.p.v. 44 voor
   een vraagkaart. `max-width:none !important` laat de page op mobiel
   meegroeien met het scherm (Collect's page is max. 720px), zodat de
   randloze secties in het hele 641-767px-bereik echt 100% breed zijn. */
@media (max-width: 767px) {
  body:where(.mg-editor.new-design) .pack-editor-page { padding-left: 14px; padding-right: 14px; max-width: none !important; }
  :where(.mg-editor.new-design) .pack-editor-page .mg-section { border-radius: 0; border-left: none; border-right: none; padding-left: 14px; padding-right: 14px; margin-left: -14px; margin-right: -14px; }
  :where(.mg-editor.new-design) .pack-editor-page .new-card { border-radius: 0; border-left: none; border-right: none; margin-left: -14px; margin-right: -14px; }
}

/* Sticky topbar (back-knoppen + pack-titel) en compacte kop (2026-10-31, eerst Quiz) */
:where(.mg-editor) .pack-editor-topbar { --pe-top:24px; position:sticky; top:0; z-index:60; display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:calc(-1 * var(--pe-top)) calc(50% - 50vw) 14px; padding:10px calc(50vw - 50%); background:rgba(26,27,47,0.94); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); border-bottom:1px solid var(--border-subtle); }
:where(.mg-editor) .pack-editor-topbar .btn-xp-outline { display:inline-block; width:auto; margin:0; }
/* De pack-editor-help-link gebruikt dezelfde ronde "?"-look als .help uit
   css/ui.css, maar 19 van de 21 editors laden ui.css niet. Daarom hier
   dezelfde waarden, scoped op .mg-editor; quiz/collect (die ui.css wel
   laden) krijgen zo exact dezelfde look in plaats van een dubbele stijl. */
:where(.mg-editor) .pack-editor-help { display:inline-flex; align-items:center; justify-content:center; float:none; flex:0 0 auto; width:28px; height:28px; margin-left:4px; background:rgba(var(--surface-tint-rgb, 255,255,255), 0.09); background-image:none; border-radius:50%; box-shadow:none; opacity:1; transform:none; transition:background 0.2s; text-decoration:none; }
:where(.mg-editor) .pack-editor-help::before { content:"?"; color:var(--text-secondary, rgba(255,255,255,0.62)); font-size:13px; font-weight:700; line-height:1; }
:where(.mg-editor) .pack-editor-help:hover { background:rgba(var(--surface-tint-rgb, 255,255,255), 0.17); opacity:1; transform:none; text-decoration:none; }
:where(.mg-editor) .pack-editor-topbar-title { flex:1 1 140px; min-width:0; display:flex; align-items:baseline; justify-content:flex-end; gap:8px; white-space:nowrap; overflow:hidden; }
:where(.mg-editor) .pack-editor-topbar-kind { flex:0 0 auto; font-size:0.7em; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); }
:where(.mg-editor) .pack-editor-topbar-title strong { min-width:0; overflow:hidden; text-overflow:ellipsis; color:var(--text-primary); font-size:1em; }
:where(.mg-editor) .pack-editor-meta { color:var(--text-muted); font-size:0.8em; margin:0 0 10px; }
:where(.mg-editor) .pack-editor-flat { background:none; border:0; padding:0; margin:0; box-shadow:none; }

/* data-sections="rich": secties als losse kaarten + visuele samenvatting (editor-sections.js) */
:where(.mg-editor[data-sections="rich"]) .mg-section { background:var(--bg-card); border-color:rgba(127,130,168,0.28); }
:where(.mg-editor) .mg-section-enhanced.is-collapsed .mg-section-summary.is-rich { display:flex; }
:where(.mg-editor) .mg-section-summary.is-rich { align-items:center; gap:6px; }
:where(.mg-editor) .mg-sum-chip { flex:0 1 auto; min-width:0; display:inline-flex; align-items:baseline; gap:5px; padding:2px 10px; border-radius:999px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.10); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
:where(.mg-editor) .mg-sum-chip-label { flex:0 0 auto; font-size:0.82em; color:var(--text-muted); }
:where(.mg-editor) .mg-sum-chip-value { min-width:0; overflow:hidden; text-overflow:ellipsis; color:var(--text-primary); }
:where(.mg-editor) .mg-sum-chip.is-secret .mg-sum-chip-value { font-family:"Courier New", monospace; letter-spacing:.04em; }
:where(.mg-editor) .mg-sum-chip.is-empty { color:var(--text-muted); font-style:italic; }
:where(.mg-editor) .mg-sum-chip.is-pass { border-color:rgba(255,194,51,0.55); background:rgba(255,194,51,0.12); }
:where(.mg-editor) .mg-sum-chip.is-bonus { border-color:rgba(76,175,80,0.55); background:rgba(76,175,80,0.14); }
:where(.mg-editor) .mg-sum-chip.is-pass.is-only { border-color:rgba(76,175,80,0.55); background:rgba(76,175,80,0.14); }
:where(.mg-editor) .mg-sum-chip-icon { display:inline-grid; place-items:center; align-self:center; width:15px; height:15px; border-radius:50%; font-size:9px; color:#1a1b2f; background:#ffc233; }
:where(.mg-editor) .mg-sum-chip.is-bonus .mg-sum-chip-icon, :where(.mg-editor) .mg-sum-chip.is-only .mg-sum-chip-icon { background:#4caf50; }

/* Pack-titel als settings-knop + settings-modal (2026-10-31, eerst Quiz) */
:where(.mg-editor) .pack-editor-topbar-title.is-button { appearance:none; -webkit-appearance:none; width:auto; margin:0 0 0 auto; padding:6px 10px; border-radius:10px; border:1px solid transparent; background:transparent; font:inherit; color:inherit; cursor:pointer; align-items:center; flex:0 1 auto; max-width:100%; transition:background .15s, border-color .15s; }
:where(.mg-editor) .pack-editor-topbar-title.is-button:hover, :where(.mg-editor) .pack-editor-topbar-title.is-button:focus-visible { background:rgba(255,255,255,0.06); border-color:var(--border-subtle); outline:none; }
:where(.mg-editor) .pack-settings-gear { flex:0 0 auto; font-size:1.05em; color:var(--text-muted); transition:color .15s; }
:where(.mg-editor) .pack-editor-topbar-title.is-button:hover .pack-settings-gear { color:var(--primary); }
:where(.mg-editor) .pack-settings-modal { max-width:440px; max-height:90vh; overflow-y:auto; padding:26px 28px; text-align:left; }
:where(.mg-editor) .pack-settings-modal h2 { margin:0 0 16px; font-size:1.15em; text-align:left; }
:where(.mg-editor) .pack-settings-field { margin-bottom:12px; }
:where(.mg-editor) .pack-settings-field label { display:block; float:none; width:auto; margin:0 0 4px; font-size:0.85em; color:var(--text-primary); }
:where(.mg-editor) .pack-settings-field :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { display:block; float:none; width:100%; box-sizing:border-box; margin:0; padding:9px 12px; font-size:0.95em; font-family:inherit; background:rgba(255,255,255,0.07); border:1px solid var(--border-input); border-radius:var(--radius-btn, 8px); color:var(--text-primary); }
:where(.mg-editor) .pack-settings-field :is(input, select, textarea):focus { outline:none; border-color:var(--primary); }
:where(.mg-editor) .pack-settings-optional { font-size:0.85em; color:var(--text-muted); margin-left:4px; }
:where(.mg-editor) .pack-settings-hint { margin:4px 0 0; font-size:0.78em; color:var(--text-muted); }
:where(.mg-editor) .pack-settings-error { margin:0 0 10px; padding:7px 10px; border-radius:8px; font-size:0.85em; background:rgba(220,53,69,0.15); border:1px solid rgba(220,53,69,0.5); color:#ff8a97; }
:where(.mg-editor) .pack-settings-group { margin-top:18px; padding-top:14px; border-top:1px solid var(--border-subtle); }
:where(.mg-editor) .pack-settings-group h4 { margin:0 0 8px; font-size:0.72em; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); }
:where(.mg-editor) .pack-settings-group.is-danger h4 { color:#ff8a97; }
:where(.mg-editor) .pack-settings-row { display:flex; flex-wrap:wrap; gap:8px; margin:0; padding:0; background:none; border:0; }
:where(.mg-editor) .pack-settings-row .btn-xp-outline { display:inline-block; width:auto; margin:0; text-decoration:none; }
/* Topbar op één regel houden: titel krimpt (ellipsis) i.p.v. naar een tweede regel; pas op telefoonbreedte wrappen */
:where(.mg-editor) .pack-editor-topbar { flex-wrap:nowrap; }
:where(.mg-editor) .pack-editor-topbar > a { flex:0 0 auto; }
:where(.mg-editor) .pack-editor-topbar-title.is-button { min-width:0; }
@media (max-width: 760px) { :where(.mg-editor) .pack-editor-topbar-kind { display:none; } }
@media (max-width: 560px) { :where(.mg-editor) .pack-editor-topbar { flex-wrap:wrap; } }
/* Topbar-bleed: over de volle breedte, inhoud uitgelijnd met de container; --pe-top = padding-top van body/container */
body:where(.mg-editor) { overflow-x:clip; }
:where(.mg-editor.new-design) .pack-editor-topbar { --pe-top:18px; }
:where(.mg-editor) .pack-editor-heading { font-size:1.25em; margin:0 0 4px; color:var(--text-primary); }
:where(.mg-editor) .pack-editor-intro { margin:0 0 14px; }
/* Velden in de settings-modal, ongeacht de eigen veld-markup van de editor (.field, label+input, ...) */
:where(.mg-editor) #packSettingsFields .field, :where(.mg-editor) #packSettingsFields .form-row { display:block; margin:0; }
:where(.mg-editor) #packSettingsFields > * { margin:0 0 14px; }
:where(.mg-editor) #packSettingsFields .field label, :where(.mg-editor) #packSettingsFields label { display:block; float:none; width:auto; text-align:left; padding:0; margin:0 0 4px; font-size:0.85em; font-weight:400; color:var(--text-primary); text-transform:none; letter-spacing:0; }
:where(.mg-editor) #packSettingsFields label:has(input[type=checkbox]), :where(.mg-editor) #packSettingsFields label:has(input[type=radio]) { display:flex; align-items:center; gap:8px; }
:where(.mg-editor) #packSettingsFields .hint { margin:4px 0 0; font-size:0.78em; color:var(--text-muted); }
:where(.mg-editor) #packSettingsFields select option { color:#fff; background:#2e3050; }
/* Settings-modal ruimer (2026-10-31): twee kolommen; tekstvelden naast elkaar,
   vinkjes/keuzes over de volle breedte met de uitleg ingesprongen onder de tekst. */
:where(.mg-editor) .pack-settings-modal { max-width:620px; padding:28px 32px; }
:where(.mg-editor) #packSettingsFields { display:grid; grid-template-columns:1fr 1fr; gap:18px 20px; margin-bottom:6px; }
:where(.mg-editor) #packSettingsFields > * { margin:0; min-width:0; }
:where(.mg-editor) #packSettingsFields > :has([data-pack-title]) { order:-2; }
:where(.mg-editor) #packSettingsFields > :has([data-pack-code]) { order:-1; }
:where(.mg-editor) #packSettingsFields > :has(input[type=checkbox], input[type=radio], textarea) { grid-column:1 / -1; }
:where(.mg-editor) #packSettingsFields label:has(> input[type=checkbox]) { gap:10px; font-size:0.92em; line-height:1.35; cursor:pointer; }
:where(.mg-editor) #packSettingsFields label:has(> input[type=checkbox]) + :is(.hint, .pack-settings-hint) { margin:4px 0 0 26px; }
:where(.mg-editor) #packSettingsFields input[type=checkbox], :where(.mg-editor) #packSettingsFields input[type=radio] { width:16px; height:16px; margin:0; flex:0 0 auto; float:none; }
:where(.mg-editor) #packSettingsFields .type-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
:where(.mg-editor) #packSettingsFields .field label.pack-settings-option, :where(.mg-editor) #packSettingsFields label.pack-settings-option { display:flex; align-items:flex-start; gap:12px; margin:0; padding:12px 14px; border:1px solid var(--border-input); border-radius:10px; cursor:pointer; }
:where(.mg-editor) #packSettingsFields .pack-settings-option:has(input:checked) { border-color:var(--primary); background:rgba(255,255,255,0.05); }
:where(.mg-editor) #packSettingsFields .pack-settings-option input { margin-top:2px; }
:where(.mg-editor) #packSettingsFields .pack-settings-option strong { display:block; font-weight:600; }
:where(.mg-editor) #packSettingsFields .pack-settings-option small { display:block; margin-top:2px; font-size:0.85em; color:var(--text-muted); }
/* ?-uitleg in de settings-modal (pack-settings.js addHelpBadges) */
:where(.mg-editor) .pack-help-badge { display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; margin:0 0 0 6px; padding:1px 0 0; box-sizing:border-box; border:none; border-radius:50%; background:rgba(255,255,255,0.1); color:var(--text-secondary, rgba(255,255,255,0.65)); font-size:10px; font-weight:700; line-height:1; vertical-align:middle; cursor:help; flex:0 0 auto; text-transform:none; letter-spacing:0; }
:where(.mg-editor) .pack-help-badge:hover, :where(.mg-editor) .pack-help-badge:focus { background:rgba(255,255,255,0.2); color:var(--text-primary, #fff); outline:none; }
:where(.mg-editor) .pack-help-tip { display:none; position:fixed; z-index:1000; max-width:260px; padding:8px 11px; border-radius:8px; background:#1d1f33; border:1px solid var(--border-card, #443c52); box-shadow:0 6px 20px rgba(0,0,0,0.4); color:var(--text-primary, #fff); font-size:0.8rem; line-height:1.4; pointer-events:none; }
@media (max-width:560px) { :where(.mg-editor) #packSettingsFields, :where(.mg-editor) #packSettingsFields .type-row { grid-template-columns:1fr; } :where(.mg-editor) .pack-settings-modal { padding:24px 20px; } }
/* rich: .card-editors -- zelfde kaartuiterlijk als de quiz-secties */
:where(.mg-editor[data-sections="rich"]:not(.new-design)) .card.mg-section-enhanced h3 { margin:0 !important; }
/* Settings-modal zelfstandig (de .card-editors laden css/ui.css niet) -- zelfde look als .xp-modal */
:where(.mg-editor) #packSettingsModal { display:none; position:fixed; inset:0; z-index:500; background:rgba(0,0,0,0.68); align-items:center; justify-content:center; padding:16px; }
:where(.mg-editor) #packSettingsModal.active { display:flex; }
:where(.mg-editor) #packSettingsModal .pack-settings-modal { position:relative; width:100%; box-sizing:border-box; background:var(--bg-modal, #2e3050); border:1px solid var(--border-card, #443c52); border-radius:16px; color:var(--text-primary); animation:xpIn 0.2s ease; }
:where(.mg-editor) #packSettingsModal .xp-modal-close { position:absolute; top:13px; right:13px; width:28px; height:28px; padding:0; border:none; border-radius:50%; background:rgba(255,255,255,0.09); color:var(--text-secondary, rgba(255,255,255,0.62)); font-size:13px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; }
:where(.mg-editor) #packSettingsModal .xp-modal-close:hover { background:rgba(255,255,255,0.17); }
@keyframes xpIn { from { opacity:0; transform:translateY(-12px) scale(0.97); } to { opacity:1; transform:none; } }
/* Share-modal (kaart 2707): dezelfde look als #packSettingsModal, want de
   .card-editors laden css/ui.css niet. Wordt door ../pack-editor-share.php naar
   <body> verplaatst (buiten de vaste actiebalk). */
:where(.mg-editor) #packShareModal { display:none; position:fixed; inset:0; z-index:600; background:rgba(0,0,0,0.68); align-items:center; justify-content:center; padding:16px; }
:where(.mg-editor) #packShareModal.active { display:flex; }
:where(.mg-editor) #packShareModal .pack-share-dialog { position:relative; width:100%; max-width:440px; box-sizing:border-box; padding:26px 28px; background:var(--bg-modal, #2e3050); border:1px solid var(--border-card, #443c52); border-radius:16px; color:var(--text-primary); text-align:left; animation:xpIn 0.2s ease; }
:where(.mg-editor) #packShareModal h2 { margin:0 34px 10px 0; font-size:1.15em; text-align:left; }
:where(.mg-editor) #packShareModal .pack-share-intro { margin:0 0 12px; font-size:0.92em; line-height:1.45; }
:where(.mg-editor) #packShareModal .pack-share-points { margin:0 0 18px; padding-left:18px; font-size:0.85em; line-height:1.45; color:var(--text-secondary, rgba(255,255,255,0.68)); }
:where(.mg-editor) #packShareModal .pack-share-points li { margin:0 0 6px; }
:where(.mg-editor) #packShareModal .pack-share-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; margin:0; }
:where(.mg-editor) #packShareModal .xp-modal-close { position:absolute; top:13px; right:13px; width:28px; height:28px; padding:0; border:none; border-radius:50%; background:rgba(255,255,255,0.09); color:var(--text-secondary, rgba(255,255,255,0.62)); font-size:13px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; }
:where(.mg-editor) #packShareModal .xp-modal-close:hover { background:rgba(255,255,255,0.17); }
:where(.mg-editor) #packShareBtn svg { width:16px; height:16px; margin:0 6px 0 0; vertical-align:-3px; }
/* Vragen uit andere packs (../pack-item-import.js, 2026-11-04) -- zelfde look als de settings-modal */
:where(.mg-editor) #packItemImportModal { display:none; position:fixed; inset:0; z-index:510; background:rgba(0,0,0,0.68); align-items:center; justify-content:center; padding:16px; }
:where(.mg-editor) #packItemImportModal.active { display:flex; }
:where(.mg-editor) #packItemImportModal .pii-modal { position:relative; display:flex; flex-direction:column; width:100%; max-width:680px; max-height:90vh; box-sizing:border-box; padding:24px 26px 18px; background:var(--bg-modal, #2e3050); border:1px solid var(--border-card, #443c52); border-radius:16px; color:var(--text-primary, #fff); text-align:left; animation:xpIn 0.2s ease; }
:where(.mg-editor) #packItemImportModal h2 { margin:0 36px 4px 0; font-size:1.15em; text-align:left; }
:where(.mg-editor) #packItemImportModal .pii-sub { margin:0 0 12px; font-size:0.85em; color:var(--text-muted, rgba(255,255,255,0.55)); }
:where(.mg-editor) #packItemImportModal .xp-modal-close { position:absolute; top:13px; right:13px; width:28px; height:28px; padding:0; border:none; border-radius:50%; background:rgba(255,255,255,0.09); color:var(--text-secondary, rgba(255,255,255,0.62)); font-size:13px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; }
:where(.mg-editor) #packItemImportModal .pii-search { display:block; float:none; width:100%; box-sizing:border-box; margin:0 0 10px; padding:9px 12px; border-radius:10px; border:1px solid var(--border-card, #443c52); background:rgba(0,0,0,0.25); color:inherit; font:inherit; font-size:0.9em; }
:where(.mg-editor) #packItemImportModal .pii-scroll { flex:1 1 auto; min-height:120px; overflow-y:auto; margin:0 -6px; padding:0 6px; }
:where(.mg-editor) #packItemImportModal .pii-pack { margin:0 0 8px; border:1px solid var(--border-subtle, rgba(255,255,255,0.1)); border-radius:12px; background:rgba(255,255,255,0.03); }
:where(.mg-editor) #packItemImportModal .pii-pack-head { display:flex; align-items:center; gap:10px; padding:10px 12px; cursor:pointer; user-select:none; }
:where(.mg-editor) #packItemImportModal .pii-pack-head:hover { background:rgba(255,255,255,0.04); border-radius:12px; }
:where(.mg-editor) #packItemImportModal .pii-caret { width:12px; color:var(--text-muted, rgba(255,255,255,0.55)); transition:transform .15s; }
:where(.mg-editor) #packItemImportModal .pii-pack.open .pii-caret { transform:rotate(90deg); }
:where(.mg-editor) #packItemImportModal .pii-pack-title { flex:1 1 auto; min-width:0; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
:where(.mg-editor) #packItemImportModal .pii-chip { flex:0 0 auto; padding:2px 8px; border-radius:999px; background:rgba(255,255,255,0.08); font-size:0.72em; color:var(--text-secondary, rgba(255,255,255,0.7)); white-space:nowrap; }
:where(.mg-editor) #packItemImportModal .pii-chip.is-picked { background:#2f8f5b; color:#fff; }
:where(.mg-editor) #packItemImportModal .pii-items { display:none; padding:0 12px 10px; }
:where(.mg-editor) #packItemImportModal .pii-pack.open .pii-items { display:block; }
:where(.mg-editor) #packItemImportModal .pii-all { display:inline-block; margin:0 0 6px; padding:0; border:0; background:none; color:var(--accent, #8fb3ff); font:inherit; font-size:0.8em; cursor:pointer; }
:where(.mg-editor) #packItemImportModal label.pii-item { display:flex; float:none; width:auto; align-items:flex-start; gap:10px; margin:0; padding:7px 6px; border-radius:8px; cursor:pointer; font-size:0.9em; line-height:1.35; }
:where(.mg-editor) #packItemImportModal label.pii-item:hover { background:rgba(255,255,255,0.05); }
:where(.mg-editor) #packItemImportModal label.pii-item.is-off { cursor:default; opacity:0.5; }
:where(.mg-editor) #packItemImportModal label.pii-item.is-off:hover { background:none; }
:where(.mg-editor) #packItemImportModal .pii-item input { float:none; width:auto; flex:0 0 auto; margin:2px 0 0; }
:where(.mg-editor) #packItemImportModal .pii-item-body { flex:1 1 auto; min-width:0; }
:where(.mg-editor) #packItemImportModal .pii-q { display:block; overflow-wrap:anywhere; }
:where(.mg-editor) #packItemImportModal .pii-a { display:block; margin-top:2px; font-size:0.85em; color:var(--text-muted, rgba(255,255,255,0.55)); overflow-wrap:anywhere; }
:where(.mg-editor) #packItemImportModal .pii-a b { color:#7ddc9f; font-weight:600; }
:where(.mg-editor) #packItemImportModal .pii-why { display:block; margin-top:2px; font-size:0.8em; color:#ffb36b; }
:where(.mg-editor) #packItemImportModal .pii-note { display:block; margin-top:2px; font-size:0.8em; color:var(--text-secondary, rgba(255,255,255,0.7)); font-style:italic; }
:where(.mg-editor) #packItemImportModal .pii-empty { padding:24px 8px; text-align:center; color:var(--text-muted, rgba(255,255,255,0.55)); font-size:0.9em; }
:where(.mg-editor) #packItemImportModal .pii-foot { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top:14px; padding-top:12px; border-top:1px solid var(--border-subtle, rgba(255,255,255,0.1)); }
:where(.mg-editor) #packItemImportModal .pii-foot .pii-count { margin-right:auto; font-size:0.85em; color:var(--text-muted, rgba(255,255,255,0.55)); }
:where(.mg-editor) #packItemImportModal .pii-foot button { display:inline-block; float:none; width:auto; margin:0; }
:where(.mg-editor) #packItemImportModal .pii-foot button:disabled { opacity:0.45; cursor:default; }
@media (max-width:560px) { :where(.mg-editor) #packItemImportModal .pii-modal { padding:20px 16px 14px; } }
/* Kleine "+ Add question/card"- en "Reuse"-knopjes onder een lijst (2026-11-04, Ruben: de Quiz-stijl overal) */
:where(.mg-editor) button.mg-add-btn { display:inline-block; float:none; width:auto; margin:2px 0 0; padding:3px 9px; border:none; border-radius:5px; background:#2b3340; color:#fff; font:inherit; font-size:0.78em; font-weight:400; line-height:14px; text-transform:none; letter-spacing:normal; box-shadow:none; cursor:pointer; }
:where(.mg-editor) button.mg-add-btn:hover { background:#3a4456; color:#fff; transform:none; }
:where(.mg-editor) .pack-editor-import { margin:0 0 14px; padding:0; background:none; border:0; }
:where(.mg-editor) .pack-editor-import label { display:inline-block; float:none; width:auto; margin:0; cursor:pointer; }

/* =========================================================================
   ITEM LIST -- vaste schil van een itemlijst in de pack-editors (kaart 2585,
   2026-11-11, naar het voorbeeld van de Live Poll-editor). Hoort bij
   item-list.js (XPItemList) en item-types.js (XPItemTypes, de kleuren en
   iconen). --mg-accent is de typekleur van een item of knop.
   ========================================================================= */
:where(.mg-editor) .mg-item { position:relative; background:rgba(255,255,255,0.03); border:1px solid var(--border-subtle); border-left:4px solid var(--mg-accent, var(--primary)); border-radius:12px; padding:10px 14px 12px; margin-bottom:0; }
:where(.mg-editor) .mg-item + .mg-item { margin-top:12px; }
:where(.mg-editor) .mg-item-head { display:flex; align-items:center; gap:8px; margin:0 0 10px; }
:where(.mg-editor) .mg-item-handle { flex:none; display:inline-grid; place-items:center; width:26px; height:30px; margin:0 0 0 -6px; padding:0; border:0; border-radius:7px; background:none; color:var(--text-muted); cursor:grab; touch-action:none; float:none; box-shadow:none; }
:where(.mg-editor) .mg-item-handle svg { width:18px; height:18px; fill:currentColor; }
:where(.mg-editor) .mg-item-handle:hover, :where(.mg-editor) .mg-item-handle:focus-visible { color:var(--text-primary); background:rgba(255,255,255,0.06); outline:none; }
:where(.mg-editor) .mg-item-handle:focus-visible { box-shadow:0 0 0 2px var(--primary-focus); }
:where(.mg-editor) .mg-item-handle:active { cursor:grabbing; }
:where(.mg-editor) .mg-item-num { flex:none; width:26px; height:26px; border-radius:50%; background:var(--mg-accent, var(--primary)); color:#1a1b2f; font-weight:700; font-size:0.85em; display:inline-flex; align-items:center; justify-content:center; }
:where(.mg-editor) .mg-item-type { flex:0 1 auto; min-width:0; overflow:hidden; display:inline-flex; align-items:center; gap:6px; float:none; width:auto; margin:0; padding:4px 10px 4px 8px; border-radius:999px; background:color-mix(in srgb, var(--mg-accent, var(--primary)) 16%, transparent); border:1px solid color-mix(in srgb, var(--mg-accent, var(--primary)) 45%, transparent); color:#fff; font-size:0.82em; font-weight:700; line-height:1.2; white-space:nowrap; }
:where(.mg-editor) .mg-item-type-icon, :where(.mg-editor) .mg-type-icon, :where(.mg-editor) .mg-addbtn-icon { display:inline-grid; place-items:center; color:var(--mg-accent, var(--primary)); flex:none; }
:where(.mg-editor) .mg-item-type-icon svg, :where(.mg-editor) .mg-type-icon svg { width:15px; height:15px; }
:where(.mg-editor) .mg-item-type.is-select { padding-right:4px; cursor:pointer; }
:where(.mg-editor) .mg-item-type select { float:none; width:auto; min-width:0; max-width:100%; text-overflow:ellipsis; margin:0; padding:2px 22px 2px 2px; border:0; border-radius:6px; background:transparent; color:#fff; font:inherit; cursor:pointer; box-shadow:none; }
:where(.mg-editor) .mg-item-type select:focus { outline:2px solid var(--primary-focus); outline-offset:1px; }
:where(.mg-editor) .mg-item-type select option { color:#fff; background:#2e3050; }
:where(.mg-editor) .mg-item-spacer { flex:1 1 auto; }
:where(.mg-editor) .mg-item-tool { flex:none; display:inline-grid; place-items:center; width:30px; height:30px; margin:0; padding:0; float:none; border:1px solid var(--border-input); border-radius:8px; background:rgba(255,255,255,0.04); color:#fff; cursor:pointer; box-shadow:none; }
:where(.mg-editor) .mg-item-tool svg { width:16px; height:16px; }
:where(.mg-editor) .mg-item-tool:hover { border-color:var(--primary); }
:where(.mg-editor) .mg-item-tool.is-danger:hover { border-color:var(--bad); color:var(--bad); }
:where(.mg-editor) .mg-item-tool:disabled { opacity:.3; cursor:default; border-color:var(--border-input); color:#fff; }
/* Slepen (SortableJS): de kaart die je vastpakt en het lege landingsvlak */
:where(.mg-editor) .mg-item-chosen { border-color:var(--mg-accent, var(--primary)); box-shadow:0 8px 24px rgba(0,0,0,0.35); }
:where(.mg-editor) .mg-item-ghost { opacity:1 !important; background:rgba(255,255,255,0.02); border:2px dashed var(--mg-accent, var(--primary)); }
:where(.mg-editor) .mg-item-ghost > * { visibility:hidden; }
:where(.mg-editor) .sortable-fallback { opacity:.92 !important; }
/* Kleine typechip, bijv. in de reuse-modal */
:where(.mg-editor) .mg-type-chip { display:inline-flex; align-items:center; gap:4px; padding:1px 8px 1px 5px; border-radius:999px; background:color-mix(in srgb, var(--mg-accent) 16%, transparent); border:1px solid color-mix(in srgb, var(--mg-accent) 40%, transparent); font-size:0.78em; font-weight:700; color:#fff; vertical-align:1px; white-space:nowrap; }
:where(.mg-editor) .mg-type-chip svg { width:12px; height:12px; }
/* Addbar onderaan de lijst */
:where(.mg-editor) .mg-addbar { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:8px; margin-top:14px; }
:where(.mg-editor) .mg-addbtn { display:flex; align-items:flex-start; gap:10px; float:none; width:auto; margin:0; padding:10px 12px; text-align:left; background:rgba(255,255,255,0.04); border:1px dashed var(--border-input); border-left:4px solid var(--mg-accent, var(--primary)); border-radius:12px; color:#fff; font:inherit; text-transform:none; letter-spacing:normal; box-shadow:none; cursor:pointer; }
:where(.mg-editor) .mg-addbtn:hover { border-color:var(--mg-accent, var(--primary)); background:var(--primary-dim); transform:none; }
:where(.mg-editor) .mg-addbtn-icon { margin-top:1px; }
:where(.mg-editor) .mg-addbtn-icon.is-text { font-size:1.05em; line-height:1.2; }
:where(.mg-editor) .mg-item-type.is-text { gap:5px; }
:where(.mg-editor) .mg-addbtn-icon svg { width:18px; height:18px; }
:where(.mg-editor) .mg-addbtn-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
:where(.mg-editor) .mg-addbtn-text b { font-size:0.9em; font-weight:700; }
:where(.mg-editor) .mg-addbtn-text span { font-size:0.75em; color:var(--text-muted); line-height:1.35; }
:where(.mg-editor) .mg-addbar.is-single { grid-template-columns:1fr; }
:where(.mg-editor) .mg-addbar.is-single .mg-addbtn { align-items:center; justify-content:center; text-align:center; }
:where(.mg-editor) .mg-addbar ~ #packItemImportBtn { margin-top:10px; }
/* Rich samenvatting in een ingeklapte kop: aantal per type (editor-sections.js) */
:where(.mg-editor) .mg-sum-chip.mg-sum-type { align-items:center; border-color:color-mix(in srgb, var(--mg-accent) 45%, transparent); background:color-mix(in srgb, var(--mg-accent) 14%, transparent); }
:where(.mg-editor) .mg-sum-chip.mg-sum-type .mg-type-icon svg { width:13px; height:13px; }
@media (max-width:560px) {
  :where(.mg-editor) .mg-item { padding:8px 10px 10px; }
  :where(.mg-editor) .mg-item-head { gap:6px; }
  :where(.mg-editor) .mg-item-spacer { flex-basis:0; }
  :where(.mg-editor) .mg-addbar { grid-template-columns:1fr 1fr; }
  :where(.mg-editor) .mg-addbtn-text span { display:none; }
}

/* =========================================================================
   READING -- Fill the Gaps (gapfill/) en Mark the Text (marktext/).
   Herschreven 2026-11-10 (kaart 2557, "alles moet simpeler"):
   - Fill the Gaps (body.gf-play): tekst met gaten (.gf-gap) op één kaart,
     daaronder de woordenbank (.gf-dock, plakt onderin bij een lange tekst).
     Woorden (.gf-chip) sleep je naar een gat; .gf-ghost volgt de vinger.
   - Mark the Text (body.mt-play): één opdracht (.mt-prompt) boven één zin
     als losse woordknoppen (.mt-word), tik = markeren/demarkeren.
   Gedeeld: .rd-btn (grote knop), .rd-msg (feedbackregel), .rd-code.
   De editors hebben hun eigen <style>.
   ========================================================================= */
:where(body.gf-play, body.mt-play, body.sw-play) .wrap { max-width:640px; }
:where(body.gf-play, body.mt-play, body.sw-play) .quest-img-wrap { margin:-18px -18px 14px; border-radius:13px 13px 0 0; overflow:hidden; background:rgba(0,0,0,0.25); }
:where(body.gf-play, body.mt-play, body.sw-play) .quest-img-wrap img { display:block; width:100%; height:180px; object-fit:cover; margin:0; border-radius:0; }
/* Op mobiel is de kaart zelf randloos met 12px padding (zie de mobile base
   bovenaan), dus de hero moet die 12px volgen en geen afgeronde hoeken. */
@media (max-width: 767px) {
  :where(body.gf-play, body.mt-play, body.sw-play) .quest-img-wrap { margin:-12px -12px 14px; border-radius:0; }
}
:where(body.gf-play, body.mt-play, body.sw-play) .rd-btn { appearance:none; display:block; width:100%; min-height:50px; margin:12px 0 0; padding:0 18px; border:none; border-radius:12px; background:var(--primary); color:#1a1b2f; font:inherit; font-size:1.05rem; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; cursor:pointer; }
:where(body.gf-play, body.mt-play, body.sw-play) .rd-btn:hover { background:var(--primary-hover); }
:where(body.gf-play, body.mt-play, body.sw-play) .rd-btn.ghost { background:rgba(255,255,255,0.08); color:#fff; border:1px solid var(--border-input); letter-spacing:normal; text-transform:none; }
:where(body.gf-play, body.mt-play, body.sw-play) .rd-msg { text-align:center; margin:10px 0 0; font-size:0.95rem; line-height:1.4; color:var(--text-secondary); }
:where(body.gf-play, body.mt-play, body.sw-play) .rd-msg:empty { margin:0; }
:where(body.gf-play, body.mt-play, body.sw-play) .rd-msg.bad { color:#ff9a8f; }
:where(body.gf-play, body.mt-play, body.sw-play) .rd-msg.warn { color:#ffc247; }
:where(body.gf-play, body.mt-play, body.sw-play) .rd-msg.good { color:#9be29e; font-size:1.15rem; font-weight:700; }
:where(body.gf-play, body.mt-play, body.sw-play) .rd-code { margin:10px 0 0; padding:10px; border-radius:10px; background:rgba(255,156,0,0.12); border:1px solid var(--primary); color:#fff; font-size:1rem; text-align:center; font-weight:700; }
/* Waarom er geen XP is bij een niet-perfecte eerste Check (2026-11-23). */
:where(body.gf-play) .rd-msg .gf-finish-hint { margin-top:6px; font-size:0.95rem; font-weight:400; color:var(--text-secondary); }
:where(body.gf-play, body.mt-play, body.sw-play) .rd-btn, :where(body.gf-play) .gf-chip, :where(body.gf-play) .gf-gap, :where(body.mt-play) .mt-word { -webkit-tap-highlight-color:transparent; }
@keyframes rdShake { 0%,100% { transform:translateX(0); } 20%,60% { transform:translateX(-4px); } 40%,80% { transform:translateX(4px); } }
@keyframes rdBad { 0%,55% { border-color:var(--bad); background:rgba(224,90,78,0.30); } 100% { } }

/* --- Fill the Gaps --- */
:where(body.gf-play) .gf-text { font-size:1.15rem; line-height:2.4; }
:where(body.gf-play) .gf-text p { margin:0 0 8px; }
:where(body.gf-play) .gf-gap { display:inline-block; box-sizing:border-box; min-width:76px; min-height:36px; padding:0 12px; margin:0 2px; line-height:32px; vertical-align:middle; border-radius:10px; border:2px dashed rgba(255,156,0,0.55); background:rgba(255,156,0,0.06); color:#fff; font-weight:700; text-align:center; cursor:pointer; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; transition:background .12s, box-shadow .12s; }
:where(body.gf-play) .gf-gap:focus-visible { outline:2px solid #fff; outline-offset:2px; }
:where(body.gf-play) .gf-gap.picked { border-style:solid; border-color:var(--primary); background:rgba(255,156,0,0.20); box-shadow:0 0 0 3px var(--primary-focus); }
:where(body.gf-play) .gf-gap.filled { border-style:solid; border-color:var(--primary); background:rgba(255,156,0,0.14); cursor:grab; touch-action:none; }
:where(body.gf-play) .gf-gap.over { background:rgba(255,156,0,0.30); box-shadow:0 0 0 3px var(--primary-focus); }
:where(body.gf-play) .gf-gap.ok { border-style:solid; border-color:var(--good); background:rgba(76,175,80,0.20); cursor:default; touch-action:auto; }
:where(body.gf-play) .gf-gap.bad { animation:rdBad 1.2s ease, rdShake .4s ease; }
:where(body.gf-play) .gf-gap.need { animation:rdShake .4s ease; border-color:#ffc247; }
:where(body.gf-play) .gf-gap.lifted { opacity:0.35; }
:where(body.gf-play) .gf-dock { position:sticky; bottom:0; z-index:20; margin:0 0 18px; padding:14px 14px calc(14px + env(safe-area-inset-bottom)); background:var(--bg-card); border:1px solid var(--panel-outline); border-radius:14px; box-shadow:0 -6px 24px rgba(0,0,0,0.35); }
:where(body.gf-play) .gf-bank-label { margin:0 0 10px; font-size:0.72rem; font-weight:700; letter-spacing:0.14em; text-transform:uppercase; color:var(--text-muted); text-align:center; }
:where(body.gf-play) .gf-bank { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; min-height:44px; padding:2px; border-radius:12px; }
:where(body.gf-play) .gf-bank.over { background:rgba(255,255,255,0.05); outline:2px dashed var(--border-input); }
:where(body.gf-play) .gf-bank-empty { align-self:center; color:var(--text-muted); font-size:0.9em; }
:where(body.gf-play) .gf-chip { appearance:none; display:inline-flex; align-items:center; box-sizing:border-box; min-height:44px; padding:0 16px; border-radius:22px; border:2px solid var(--primary); background:rgba(255,156,0,0.08); color:#fff; font:inherit; font-size:1.05rem; font-weight:700; white-space:nowrap; cursor:grab; touch-action:none; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
@media (hover:hover) { :where(body.gf-play) .gf-chip:hover { background:rgba(255,156,0,0.20); } }
:where(body.gf-play) .gf-chip.lifted { opacity:0.35; }
:where(body.gf-play) .gf-ghost { position:fixed; left:0; top:0; z-index:1000; pointer-events:none; background:var(--bg-modal); box-shadow:0 10px 24px rgba(0,0,0,0.5); }
:where(body.gf-play.gf-dragging), :where(body.gf-play.gf-dragging) * { cursor:grabbing !important; }

/* --- Mark the Text --- */
:where(body.mt-play) .mt-progress { display:flex; gap:4px; margin:0 0 14px; }
:where(body.mt-play) .mt-progress span { flex:1; height:5px; border-radius:3px; background:rgba(255,255,255,0.12); }
:where(body.mt-play) .mt-progress span.right { background:var(--good); }
:where(body.mt-play) .mt-progress span.skipped { background:rgba(224,90,78,0.6); }
:where(body.mt-play) .mt-progress span.current { background:var(--primary); }
:where(body.mt-play) .mt-prompt { margin:0 0 14px; padding:12px 14px; border-left:4px solid var(--primary); border-radius:0 10px 10px 0; background:rgba(255,255,255,0.05); font-size:1.05rem; line-height:1.45; }
:where(body.mt-play) .mt-prompt b { color:var(--primary); }
:where(body.mt-play) .mt-sentence { display:flex; flex-wrap:wrap; align-content:flex-start; gap:6px 0; min-height:80px; padding:14px 10px; border-radius:12px; border:1px solid var(--border-subtle); background:var(--bg-base); }
/* Woorden moeten als een gewone zin lezen. De 2px rand voor de markering zit
   daarom in een inset box-shadow i.p.v. een border: die kost geen breedte, dus
   de ruimte tussen twee woorden is precies de 2px padding aan elke kant (4px,
   ongeveer een normale spatie) en de zin verspringt niet als een woord
   gemarkeerd wordt. */
:where(body.mt-play) .mt-word { appearance:none; min-height:44px; padding:0 5px; border:0; border-radius:8px; box-shadow:inset 0 0 0 2px transparent; background:transparent; color:#fff; font:inherit; font-size:1.15rem; cursor:pointer; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; touch-action:manipulation; }
@media (hover:hover) { :where(body.mt-play) .mt-word:hover { background:rgba(255,255,255,0.07); } }
:where(body.mt-play) .mt-word.on { box-shadow:inset 0 0 0 2px var(--primary); background:rgba(255,156,0,0.18); font-weight:700; }
:where(body.mt-play) .mt-word.ok { box-shadow:inset 0 0 0 2px var(--good); background:rgba(76,175,80,0.22); font-weight:700; cursor:default; }
:where(body.mt-play) .mt-word.bad { box-shadow:inset 0 0 0 2px var(--bad); background:rgba(224,90,78,0.25); animation:rdShake .4s ease; }
:where(body.mt-play) .mt-word.reveal { box-shadow:none; outline:2px dashed var(--good); outline-offset:-2px; }
:where(body.mt-play) .mt-word:disabled { cursor:default; }
:where(body.mt-play) .mt-punct { align-self:center; margin-left:-1px; padding:0 1px; font-size:1.15rem; color:var(--text-secondary); }
:where(body.mt-play) .mt-actions { display:flex; gap:8px; }
:where(body.mt-play) .mt-actions .rd-btn { flex:1; }
:where(body.mt-play) .mt-actions .rd-btn.ghost { flex:0 0 auto; width:auto; }
:where(body.mt-play) .mt-score { margin:6px 0 4px; font-size:1.6rem; font-weight:700; text-align:center; }

/* --- Cipher glyphs (2026-11-11) ---
   Een cipher-pack kiest een stijl; de opgeslagen cipherMap blijft platte
   ASCII-codeletters A-Z en deze klassen tekenen de glyph. Zie
   minigames/cipher/glyphs.js. font-display:block houdt de glyph-box leeg
   (geen flits van de fallback-letter) tot het font geladen is; de vaste
   width/height voorkomt layout-shift. */
@font-face {
    font-family: 'XP Cipher Runic';
    src: url('cipher/fonts/NotoSansRunic-runic.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: block;
    unicode-range: U+16A0-16F8;
}
.cipher-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    line-height: 1;
    letter-spacing: 0;
    vertical-align: middle;
    font-style: normal;
}
.cipher-glyph svg { display: block; width: 100%; height: 100%; }
.cipher-glyph.cipher-style-runes { font-family: 'XP Cipher Runic', 'Noto Sans Runic', serif; }

/* =========================================================================
   BOSS BATTLE (bossbattle/, kaart 2111, 2026-11-13) -- live event-minigame.
   Twee weergaven van dezelfde index.php:
   - body.bb-present  groot scherm (presenter + preview): .bb-stage met boss-
     paneel (.bb-boss, portret + HP-balk + klasteller), vraagpaneel (.bb-q),
     spelersraster (.bb-roster) en de bediening (.bb-controls).
   - body.bb-phone    telefoon: profiel kiezen (.bb-pick), vraag (.bb-p-opt),
     eigen uitslag (.bb-p-result) en eigen health (.bb-p-me).
   Gedeeld: .bb-hp (health-balk), .bb-ico (klasse-icoon), animaties.
   Animaties licht houden: shake bij een hit (zoals de oude .damage-class),
   zwevende getallen, een korte banner.
   ========================================================================= */
body.bb-present, body.bb-phone { background:radial-gradient(1100px 650px at 20% -10%, rgba(232,80,91,0.13), transparent 60%), radial-gradient(900px 600px at 110% 110%, rgba(142,92,240,0.14), transparent 60%), linear-gradient(160deg, #15132a, #221a38); background-attachment:fixed; }
body.bb-present { padding:0; overflow:hidden; height:100vh; }
body.bb-phone { padding:14px 14px calc(28px + env(safe-area-inset-bottom, 0px)); }
:where(body.bb-present, body.bb-phone) button { font-family:inherit; }
.bb-msg { max-width:460px; margin:12vh auto 0; text-align:center; background:var(--bg-card); border:1px solid var(--panel-outline); border-radius:16px; padding:28px 24px; }
.bb-msg p { color:var(--text-secondary); line-height:1.5; margin:0 0 18px; }

@keyframes bbShake { 0%,100% { transform:translate(0,0) rotate(0); } 15% { transform:translate(-10px,3px) rotate(-2deg); } 35% { transform:translate(9px,-3px) rotate(2deg); } 55% { transform:translate(-6px,2px) rotate(-1deg); } 75% { transform:translate(4px,-1px) rotate(1deg); } }
@keyframes bbFloat { 0% { transform:translate(-50%, 0) scale(.6); opacity:0; } 15% { transform:translate(-50%, -14px) scale(1.15); opacity:1; } 100% { transform:translate(-50%, -90px) scale(1); opacity:0; } }
@keyframes bbBanner { 0% { transform:translate(-50%,-50%) scale(.4) rotate(-6deg); opacity:0; } 18% { transform:translate(-50%,-50%) scale(1.12) rotate(-3deg); opacity:1; } 30% { transform:translate(-50%,-50%) scale(1) rotate(-3deg); } 82% { opacity:1; } 100% { transform:translate(-50%,-50%) scale(1) rotate(-3deg); opacity:0; } }
@keyframes bbPop { 0% { transform:scale(.3); opacity:0; } 70% { transform:scale(1.1); opacity:1; } 100% { transform:scale(1); } }
@keyframes bbFadeUp { from { transform:translateY(16px); opacity:0; } to { transform:none; opacity:1; } }
@keyframes bbFlashBad { 0%,100% { box-shadow:0 0 0 0 rgba(224,90,78,0); } 30% { box-shadow:0 0 0 4px rgba(224,90,78,0.9); background:rgba(224,90,78,0.30); } }
@keyframes bbFlashGood { 0%,100% { box-shadow:0 0 0 0 rgba(63,181,101,0); } 30% { box-shadow:0 0 0 4px rgba(63,181,101,0.9); background:rgba(63,181,101,0.25); } }
/* De baas duikt naar voren en een geraakte speler krijgt een echte klap. */
@keyframes bbBossStrike { 0%,100% { transform:scale(1); } 25% { transform:scale(1.04); } 50% { transform:scale(1.13); } 72% { transform:scale(1.05); } }
@keyframes bbTileHit { 0% { transform:none; } 18% { transform:translate(-4px, 3px) scale(.93) rotate(-2deg); } 42% { transform:translate(4px, -2px) scale(1.04) rotate(2deg); } 66% { transform:translate(-2px, 1px) scale(.98); } 100% { transform:none; } }
@keyframes bbKo { 0% { transform:scale(1); } 55% { transform:scale(.6) rotate(-8deg) translateY(2px); } 100% { transform:scale(.55) rotate(-4deg); } }
@keyframes bbPulse { 0%,100% { opacity:1; } 50% { opacity:.45; } }
@media (prefers-reduced-motion: reduce) {
  .bb-shake, .bb-float, .bb-banner, .bb-callout { animation-duration:.01s !important; }
  .bb-pl.is-hit { animation:none; }
  .bb-pl.is-ko { animation:none; transform:scale(.55) rotate(-4deg); }
  .bb-portrait img.is-attacking { animation:none; }
  /* Feedback 5: statische gloed en banners blijven, beweging gaat uit. */
  .bb-fx-p, .bb-fx-ghost, .bb-fx-ring, .bb-fx-ico, .bb-xslash, .bb-flash, .bb-shard, .bb-shot, .bb-fx-plus, .bb-fx-star, .bb-heal-ring, .bb-heal-spark, .bb-smash-flash, .bb-smash-ring { display:none; }
  .bb-main.is-smash { animation:none; }
  .bb-battle .bb-boss, .bb-battle .bb-q { transition:none; }
  .bb-pl.is-healed .bb-av { animation:none; }
  .bb-dome { animation:none; }
  .bb-fx-beam { transition:none; }
  .bb-boss.is-enraged .bb-portrait { animation:none; }
  .bb-pl.is-armed .bb-mana i { animation:none; }
  .bb-pl.is-full .bb-mana::before { animation:none; opacity:1; }
  .bb-p-abil:not(.is-armed) { animation:none; }
  body.bb-phone.is-armed { animation:none; box-shadow:inset 0 0 0 4px var(--bb-armed, #8e5cf0); }
  .bb-pl, .bb-pl .bb-av { transition:none; }
}

/* Klasse-icoon: witte vechter-SVG op een tegel in de klassekleur (Feedback 5).
   Laadt de SVG niet, dan blijft het emoji-icoon als fallback staan. */
.bb-ico { position:relative; display:inline-flex; align-items:center; justify-content:center; width:1.7em; height:1.7em; border-radius:8px; background:var(--bb-prof, #8e5cf0); overflow:hidden; flex-shrink:0; vertical-align:middle; line-height:1; }
.bb-ico img { position:relative; width:78%; height:78%; object-fit:contain; }
.bb-ico-lg { width:4.4em; height:4.4em; border-radius:20px; }
.bb-ico-lg img { width:68%; height:68%; }
/* Health-balk */
.bb-hp { position:relative; height:10px; border-radius:999px; background:rgba(255,255,255,0.10); overflow:hidden; }
.bb-hp > i { position:absolute; left:0; top:0; bottom:0; width:100%; border-radius:999px; background:linear-gradient(90deg, #3fb565, #7ad48e); transition:width .6s ease, background .3s; }
.bb-hp.is-mid > i { background:linear-gradient(90deg, #e0a21b, #f2c45a); }
.bb-hp.is-low > i { background:linear-gradient(90deg, #c8382c, #e8605b); }

/* ---------- Presenter ---------- */
.bb-stage { position:fixed; inset:0; display:flex; flex-direction:column; }
.bb-top { display:flex; align-items:center; gap:14px; padding:12px 22px; }
.bb-top-title { flex:1; min-width:0; font-weight:700; font-size:clamp(14px, 1.5vh + .4vw, 22px); color:var(--text-secondary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bb-chip { display:inline-flex; align-items:center; gap:8px; background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.10); border-radius:999px; padding:5px 14px; font-size:clamp(12px, 1.3vh + .3vw, 19px); white-space:nowrap; }
.bb-chip b { color:var(--primary); letter-spacing:.05em; }
.bb-chip.demo { background:rgba(59,139,235,0.18); border-color:rgba(59,139,235,0.5); color:#a9cdff; font-weight:700; font-size:13px; }
.bb-demo-banner { margin:0 22px 8px; padding:9px 16px; border-radius:10px; background:rgba(59,139,235,0.14); border:1px solid rgba(59,139,235,0.5); color:#d7e7ff; font-size:clamp(12px, 1.5vh, 16px); text-align:center; }
.bb-demo-banner a { color:#fff; font-weight:700; }
.bb-main { flex:1; min-height:0; position:relative; padding:0 clamp(16px, 3vw, 56px); }
.bb-screen { position:absolute; inset:0 clamp(16px, 3vw, 56px); display:flex; flex-direction:column; animation:bbFadeUp .4s ease both; }

/* Boss-paneel */
.bb-boss { position:relative; display:flex; flex-direction:column; gap:1vh; }
.bb-portrait { position:relative; border-radius:22px; overflow:hidden; background:#0d0c1a; box-shadow:0 18px 50px rgba(0,0,0,0.45), inset 0 0 0 2px rgba(255,255,255,0.06); aspect-ratio:16/9; }
.bb-portrait img { display:block; width:100%; height:100%; object-fit:cover; transition:filter .6s, transform .6s; }
.bb-portrait.is-hit img { filter:brightness(1.7) saturate(1.3); }
.bb-portrait img.is-attacking { animation:bbBossStrike .65s ease; }
.bb-portrait.is-down img { filter:grayscale(1) brightness(.55); transform:scale(1.04) rotate(-2deg); }
.bb-shake { animation:bbShake .45s ease; }
.bb-boss-name { position:absolute; left:14px; bottom:12px; font-weight:700; font-size:clamp(18px, 3vh + .4vw, 40px); text-shadow:0 3px 14px rgba(0,0,0,0.85); }
/* Woedende baas: rode gloed en een langzame pulse, zodat je ziet dat hij
   extra hard slaat nu hij bijna dood was. */
.bb-boss.is-enraged .bb-portrait { box-shadow:0 18px 50px rgba(0,0,0,0.45), inset 0 0 0 2px rgba(255,106,92,0.55), 0 0 42px rgba(255,56,36,0.38); animation:bbEnrage 1.8s ease-in-out infinite; }
.bb-boss.is-enraged .bb-portrait img { filter:saturate(1.25) contrast(1.06); }
.bb-boss.is-enraged .bb-boss-name { color:#ff8a7a; }
@keyframes bbEnrage { 0%,100% { transform:scale(1); } 50% { transform:scale(1.018); } }
/* Verslagen baas: ingezakt, grijs en met een duidelijke stempel. De woede-
   gloed en pulse gaan uit, ook als is-enraged nog op het paneel staat. */
.bb-boss.is-dead .bb-portrait { animation:none; transform:rotate(-2deg) scale(.97); box-shadow:0 18px 50px rgba(0,0,0,0.55), inset 0 0 0 2px rgba(255,255,255,0.06); }
.bb-boss.is-dead .bb-portrait img { filter:grayscale(1) brightness(.42) contrast(1.12); transform:scale(1.03); }
.bb-boss.is-dead .bb-portrait::after { content:'DEFEATED'; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%) rotate(-8deg); padding:.12em .42em; border:4px solid rgba(200,56,44,0.85); border-radius:10px; color:rgba(255,130,118,0.95); background:rgba(10,8,18,0.45); font-size:clamp(20px, 4.6vh, 52px); font-weight:900; letter-spacing:.08em; text-shadow:0 2px 10px rgba(0,0,0,0.8); pointer-events:none; }
.bb-boss.is-dead .bb-boss-name { color:rgba(255,255,255,0.38); text-decoration:line-through; text-decoration-color:rgba(200,56,44,0.8); }
.bb-boss.is-dead .bb-boss-hp .bb-hp > i { background:#4a4a58; }
.bb-boss.is-dead .bb-boss-hp-num { color:rgba(255,255,255,0.42); }
.bb-boss.is-dead .bb-counter { opacity:.45; }
.bb-boss-hp { display:flex; align-items:center; gap:12px; }
.bb-boss-hp .bb-hp { flex:1; height:clamp(16px, 2.6vh, 30px); box-shadow:inset 0 0 0 2px rgba(255,255,255,0.08); }
.bb-boss-hp .bb-hp > i { background:linear-gradient(90deg, #c8382c, #ff6a5c); transition:width .35s ease; }
.bb-boss-hp-num { font-weight:700; font-size:clamp(14px, 2.2vh + .3vw, 30px); min-width:5.5em; text-align:right; font-variant-numeric:tabular-nums; }
.bb-counter { display:flex; align-items:baseline; gap:10px; color:var(--text-secondary); font-size:clamp(13px, 1.7vh + .3vw, 24px); }
.bb-counter b { color:#8ee0a6; font-size:1.5em; font-variant-numeric:tabular-nums; }
.bb-float { position:absolute; left:50%; top:40%; font-weight:800; font-size:clamp(26px, 5vh, 64px); color:#fff; text-shadow:0 3px 0 #b3261e, 0 6px 18px rgba(0,0,0,0.7); pointer-events:none; animation:bbFloat 1.3s ease-out forwards; white-space:nowrap; z-index:3; }
.bb-float.crit { color:#ffd23f; font-size:clamp(36px, 7.5vh, 96px); text-shadow:0 3px 0 #b36b00, 0 6px 22px rgba(0,0,0,0.75); }
/* De woede-heal van de boss: een groot groen getal met een eigen, ruimere sprong. */
.bb-float.heal { color:#b9ffd4; font-size:clamp(48px, 9.5vh, 128px); text-shadow:0 0 14px rgba(62,224,160,0.95), 0 0 40px rgba(62,224,160,0.65), 0 4px 0 #0d5a35; animation:bbFloatHeal 1.7s ease-out forwards; }
@keyframes bbFloatHeal { 0% { transform:translate(-50%, 10px) scale(.5); opacity:0; } 16% { transform:translate(-50%, -18px) scale(1.2); opacity:1; } 100% { transform:translate(-50%, -150px) scale(1.05); opacity:0; } }
.bb-banner { position:absolute; left:50%; top:45%; z-index:10; padding:.25em .7em; border-radius:18px; font-weight:800; font-size:clamp(30px, 8vh + 1vw, 110px); white-space:nowrap; pointer-events:none; animation:bbBanner 1.7s ease forwards; text-shadow:0 4px 0 rgba(0,0,0,0.35); }
/* Crit-banner op de baas: bovenkant van het portret, zodat hij niet met de
   aanvallers botst. */
.bb-banner.is-on-boss { top:9%; font-size:clamp(22px, 4.2vh + .5vw, 64px); }
.bb-banner.crit { color:#2a1600; background:linear-gradient(135deg, #ffd23f, #ff9c00); box-shadow:0 20px 60px rgba(255,156,0,0.45); }
.bb-banner.strike { color:#fff; background:linear-gradient(135deg, #c8382c, #8e1f3c); box-shadow:0 20px 60px rgba(200,56,44,0.45); }
.bb-banner.shield { color:#eaf6ff; background:linear-gradient(135deg, #2a8fd6, #4553c9); box-shadow:0 20px 60px rgba(42,143,214,0.45); }
.bb-banner.heal { color:#0e2a14; background:linear-gradient(135deg, #8ee0a6, #3fb565); box-shadow:0 20px 60px rgba(63,181,101,0.45); }

/* Lobby: boven baas + join-blok, onder over de volle breedte de spelersstrook */
.bb-lobby { display:flex; flex-direction:column; gap:1.6vh; }
.bb-lobby-top { flex:1; min-height:0; display:grid; grid-template-columns:minmax(0, 1.05fr) minmax(0, 1fr); gap:clamp(16px, 3vw, 48px); align-items:center; }
.bb-lobby h1 { font-size:clamp(26px, 4.6vh + .8vw, 62px); line-height:1.08; margin:0 0 1.4vh; text-align:left; }
.bb-lobby h1 small { display:block; font-size:.42em; color:var(--text-secondary); font-weight:500; margin-bottom:.4em; letter-spacing:.06em; text-transform:uppercase; }
.bb-join { display:flex; align-items:center; gap:clamp(14px, 2.4vw, 40px); background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.10); border-radius:24px; padding:clamp(14px, 2.4vh, 30px) clamp(16px, 2.6vw, 40px); }
.bb-join-step { color:var(--text-secondary); font-size:clamp(14px, 1.7vh + .3vw, 24px); }
.bb-join-url { font-size:clamp(20px, 3vh + .5vw, 42px); font-weight:700; margin:2px 0 12px; }
.bb-join-pin { font-size:clamp(40px, 8vh + 1vw, 110px); font-weight:700; letter-spacing:.08em; color:var(--primary); line-height:1; text-shadow:0 0 40px rgba(255,156,0,0.35); }
.bb-join-qr { background:#fff; padding:10px; border-radius:16px; width:clamp(120px, 22vh, 240px); height:clamp(120px, 22vh, 240px); flex-shrink:0; }
.bb-join-qr img, .bb-join-qr canvas { width:100% !important; height:100% !important; display:block; }
.bb-lobby-count { margin:2vh 0 1vh; color:var(--text-secondary); font-size:clamp(15px, 1.9vh + .3vw, 26px); }
.bb-lobby-count b { color:#fff; font-size:1.4em; }
.bb-diff { display:inline-flex; gap:6px; align-items:center; margin-top:1.4vh; font-size:clamp(12px, 1.4vh + .2vw, 18px); color:var(--text-secondary); }
.bb-diff b { color:#fff; }

/* Spelersstrook (Feedback 3, vloeiende maat sinds Feedback 6). De maat komt uit
   present.js (fitRoster) als --bb-tile; alles hier hangt daaraan. */
.bb-av { position:relative; display:inline-flex; align-items:center; justify-content:center; width:var(--bb-av, 56px); height:var(--bb-av, 56px); border-radius:16px; flex-shrink:0; overflow:hidden; background:var(--bb-prof, #4a4a63); box-shadow:inset 0 -3px 0 rgba(0,0,0,0.28), 0 0 0 2px rgba(255,255,255,0.10); font-size:calc(var(--bb-av, 56px) * .46); line-height:1; }
.bb-av > i { font-style:normal; }
.bb-av img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.bb-av img + i { display:none; }
.bb-pl .bb-av { box-shadow:inset 0 -3px 0 rgba(0,0,0,0.28), 0 0 0 2px var(--bb-prof, #4a4a63); }
.bb-av-sm { --bb-av:34px; border-radius:10px; }
.bb-av-big { --bb-av:clamp(118px, 17vh, 200px); border-radius:24px; box-shadow:inset 0 -6px 0 rgba(0,0,0,0.28), 0 0 0 3px var(--bb-prof, #4a4a63), 0 22px 40px rgba(0,0,0,0.5); }
.bb-roster { --bb-tile:64px; --bb-gap:8px; position:relative; display:flex; flex-wrap:wrap; justify-content:center; align-content:flex-start; gap:var(--bb-gap); padding:10px; overflow:hidden; overflow:clip; overflow-clip-margin:36px; }
.bb-roster-lobby { max-height:26vh; }
.bb-roster-end { max-height:18vh; margin-top:1.4vh; }
/* Met weinig spelers mogen de strokken hoger worden, zodat de portretten groot
   kunnen (30vh in lobby/battle, iets minder op het eindscherm). */
.bb-battle .bb-roster.is-big, .bb-roster-lobby.is-big { max-height:30vh; }
.bb-roster-end.is-big { max-height:22vh; }
.bb-pl { position:relative; display:flex; flex-direction:column; align-items:center; gap:clamp(2px, calc(var(--bb-tile) * .04), 6px); width:var(--bb-tile); min-width:0; animation:bbPop .4s cubic-bezier(.2,.9,.3,1.3) both; transition:opacity .4s, filter .4s, width .25s ease, transform .25s ease; }
/* Nieuwe speler erbij: de maat springt meteen goed, zonder transition. */
.bb-roster.no-anim .bb-pl, .bb-roster.no-anim .bb-pl .bb-av { transition:none; }
.bb-pl .av { position:relative; display:block; width:100%; }
/* Klassennaam boven de avatar: klein, in de klassekleur en met wat
   letterafstand, zodat hij leest zonder te schreeuwen. */
.bb-pl .bb-cls { max-width:100%; min-height:1.1em; padding:0 1px; font-size:clamp(8px, calc(var(--bb-tile) * .14), 15px); line-height:1.1; font-weight:600; letter-spacing:.06em; text-transform:uppercase; text-align:center; color:var(--bb-prof, #8e5cf0); opacity:.75; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bb-roster.is-tiny .bb-pl .bb-cls { font-size:7px; letter-spacing:0; }
/* Level-badge linksonder op de avatar: de tegenhanger van het
   geantwoord-vinkje rechtsboven, dus ook een stukje over de hoek. De
   health-balk krijgt 2px extra ruimte zodat de badge er niet op valt. */
.bb-pl .bb-lvl { position:absolute; left:0; bottom:0; z-index:2; transform:translate(-22%, 22%); display:inline-flex; align-items:center; justify-content:center; min-width:1.5em; height:1.5em; padding:0 .34em; border-radius:999px; background:rgba(10,9,20,.9); border:1.5px solid var(--bb-prof, #4a4a63); color:#fff; font-size:clamp(7px, calc(var(--bb-tile) * .16), 14px); font-weight:800; line-height:1; white-space:nowrap; font-variant-numeric:tabular-nums; box-shadow:0 2px 6px rgba(0,0,0,.5); }
.bb-pl .bb-av { --bb-av:var(--bb-tile); width:var(--bb-tile); height:var(--bb-tile); border-radius:calc(var(--bb-tile) * .2); transition:width .25s ease, height .25s ease, border-radius .25s ease; }
.bb-pl .bb-hp { width:100%; height:clamp(11px, calc(var(--bb-tile) * .18), 20px); margin-top:2px; }
/* Het HP-getal in de balk; de vulling (i) ligt eronder, dit cijfer erboven. */
.bb-pl .bb-hp-num { position:absolute; inset:0; z-index:1; display:flex; align-items:center; justify-content:center; font-size:clamp(7px, calc(var(--bb-tile) * .12), 13px); font-weight:800; line-height:1; color:#fff; letter-spacing:-.01em; font-variant-numeric:tabular-nums; text-shadow:0 1px 2px rgba(0,0,0,.85), 0 0 3px rgba(0,0,0,.55); pointer-events:none; }
.bb-pl .bb-mana { display:flex; gap:3px; width:100%; justify-content:center; position:relative; }
.bb-pl .bb-mana i { flex:1; max-width:13px; height:clamp(2px, calc(var(--bb-tile) * .05), 6px); border-radius:2px; background:rgba(255,255,255,0.16); }
.bb-pl .bb-mana i.is-on { background:var(--bb-prof, #8e5cf0); box-shadow:0 0 7px var(--bb-prof, #8e5cf0); }
/* Ability klaar: de drie mana-pilletjes worden wit met een felle warme gloed. */
.bb-pl.is-full .bb-mana::before { content:''; position:absolute; left:2%; right:2%; top:-4px; bottom:-4px; border-radius:999px; background:radial-gradient(ellipse at 50% 50%, rgba(255,179,71,0.8), rgba(255,156,0,0) 70%); animation:bbManaHalo 1.6s ease-in-out infinite; pointer-events:none; }
.bb-pl.is-full .bb-mana i { background:#fff; transform:scaleY(1.8); box-shadow:0 0 4px #fff, 0 0 10px #ffb347, 0 0 20px #ff9c00; }
@keyframes bbManaHalo { 0%,100% { opacity:.55; } 50% { opacity:1; } }
.bb-pl.is-armed .bb-mana i { animation:bbManaArmed 0.9s ease-in-out infinite; }
@keyframes bbManaArmed { 0%,100% { box-shadow:0 0 4px #fff, 0 0 12px #ffb347, 0 0 22px #ff9c00; } 50% { box-shadow:0 0 6px #fff, 0 0 18px #ffb347, 0 0 34px #ff9c00; } }
.bb-pl .n { max-width:100%; font-size:clamp(10px, calc(var(--bb-tile) * .16), 22px); line-height:1.15; font-weight:700; color:var(--text-secondary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Onder ongeveer 40px past de naam niet meer; alleen in de title. */
.bb-roster.is-tiny .bb-pl .n { display:none; }
.bb-pl-ok { position:absolute; top:0; right:0; width:1.35em; height:1.35em; border-radius:50%; background:var(--bb-prof, #3fb565); color:#fff; font-size:clamp(9px, calc(var(--bb-tile) * .26), 20px); font-weight:800; display:none; align-items:center; justify-content:center; line-height:1; text-shadow:0 1px 1px rgba(0,0,0,.45); box-shadow:0 0 0 2px rgba(8,8,18,.55), 0 2px 6px rgba(0,0,0,.45); transform:translate(25%, -25%); }
.bb-pl.has-answered .bb-pl-ok { display:flex; }
.bb-pl.has-answered .bb-av { box-shadow:inset 0 -3px 0 rgba(0,0,0,0.28), 0 0 0 3px var(--bb-prof, #ff9c00), 0 0 12px var(--bb-prof, #ff9c00); }
.bb-pl.is-hit { animation:bbTileHit .45s ease; }
.bb-pl.is-hit .bb-av { animation:bbFlashBad .6s ease; }
/* Dood: geen KO-badge, maar een veel kleinere, grijze tegel. De tegel krimpt
   visueel rond zijn eigen midden, zodat hij niet omhoog verspringt. */
.bb-pl.is-ko { opacity:.4; transform:scale(.55) rotate(-4deg); transform-origin:50% 50%; animation:bbKo .5s ease; }
.bb-pl.is-ko .bb-av { filter:grayscale(1) brightness(.65); }
/* Een KO-speler heeft geen health/mana meer; die komen pas terug als een
   Healer hem weer in het gevecht brengt. */
.bb-pl.is-ko .bb-hp, .bb-pl.is-ko .bb-mana { display:none; }
.bb-pl.is-ko .n { opacity:.65; }
.bb-pl.is-wait { opacity:.5; }
.bb-pl.is-wait .bb-hp { visibility:hidden; }
.bb-pl.flash-bad .bb-av { animation:bbFlashBad .9s ease; }
.bb-pl.flash-good .bb-av { animation:bbFlashGood .9s ease; }
/* Frost Shield: een ijsgloed over de spelersstrook tijdens de klap. */
.bb-roster.is-shielded::after { content:''; position:absolute; inset:-2px; border-radius:18px; background:linear-gradient(180deg, rgba(42,143,214,0.30), rgba(169,205,255,0.10)); box-shadow:inset 0 0 0 2px rgba(169,205,255,0.70), 0 0 30px rgba(42,143,214,0.45); pointer-events:none; animation:bbShieldGlow 1.4s ease both; }
@keyframes bbShieldGlow { 0% { opacity:0; } 15% { opacity:1; } 75% { opacity:1; } 100% { opacity:0; } }
.bb-pl-float { position:absolute; left:50%; top:-4px; font-weight:800; font-size:clamp(15px, 2.2vh, 26px); pointer-events:none; animation:bbFloat 1.4s ease-out forwards; z-index:2; text-shadow:0 2px 8px rgba(0,0,0,0.7); }
.bb-pl-float.bad { color:#ff8a80; }
.bb-pl-float.good { color:#8ee0a6; }

/* Battle-scherm. De spelersstrook staat onderin over de volle breedte. */
/* De baas links wat ruimte geven, zodat de rode woede-gloed niet tegen de
   rand van het scherm wordt afgesneden (de glow reikt ~42px buiten het portret). */
.bb-battle .bb-boss, .bb-lobby .bb-boss, .bb-end .bb-boss { margin-left:clamp(18px, 3.4vw, 44px); }
.bb-battle { display:grid; grid-template-columns:minmax(0, 0.95fr) minmax(0, 1.25fr); grid-template-rows:minmax(0, 1fr) auto; align-content:stretch; gap:2.4vh clamp(14px, 2.4vw, 40px); overflow:auto; padding-bottom:1vh; }
.bb-battle .bb-boss { grid-row:1; grid-column:1; align-self:center; }
.bb-battle .bb-q { grid-row:1; grid-column:2; align-self:center; }
.bb-battle .bb-roster { grid-row:2; grid-column:1 / -1; align-self:end; max-height:22vh; }
.bb-q { display:flex; flex-direction:column; min-width:0; }
.bb-q-meta { display:flex; align-items:center; gap:10px; margin-bottom:1vh; }
.bb-q-num { font-weight:700; color:var(--primary); letter-spacing:.08em; text-transform:uppercase; font-size:clamp(12px, 1.3vh + .2vw, 18px); flex:1; }
.bb-q-ring { display:inline-flex; align-items:center; gap:8px; font-weight:700; font-size:clamp(13px, 1.6vh + .2vw, 22px); background:rgba(255,255,255,0.07); border-radius:999px; padding:4px 14px; font-variant-numeric:tabular-nums; }
.bb-q-ring.is-timer { background:rgba(59,139,235,0.20); color:#a9cdff; }
.bb-q-ring.is-urgent { background:rgba(224,90,78,0.25); color:#ffaaa2; animation:bbPulse .8s ease infinite; }
.bb-q-text { font-size:clamp(20px, 3.4vh + .9vw, 52px); line-height:1.15; font-weight:700; margin:0 0 1.6vh; }
.bb-q-text.is-long { font-size:clamp(17px, 2.6vh + .6vw, 38px); }
.bb-opts { display:grid; grid-template-columns:1fr 1fr; gap:clamp(8px, 1.2vh, 16px); }
.bb-opt { position:relative; display:flex; align-items:center; gap:12px; border-radius:14px; padding:clamp(10px, 1.6vh, 20px) 16px; color:#fff; font-weight:700; font-size:clamp(14px, 2vh + .3vw, 30px); line-height:1.15; box-shadow:inset 0 -5px 0 rgba(0,0,0,0.22); transition:opacity .5s, filter .5s, transform .3s; min-width:0; }
.bb-opt .k { width:1.6em; height:1.6em; border-radius:8px; background:rgba(0,0,0,0.22); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.bb-opt .k svg, .bb-chart-row .k svg, .bb-p-opt .k svg { width:64%; height:64%; display:block; }
.bb-opt .t { overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; flex:1; }
.bb-opt .c { font-size:.75em; opacity:.85; font-variant-numeric:tabular-nums; display:none; }
.bb-resolved .bb-opt .c { display:inline; }
.bb-resolved .bb-opt:not(.is-correct) { opacity:.3; filter:grayscale(.7); }
.bb-resolved .bb-opt.is-correct { box-shadow:inset 0 -5px 0 rgba(0,0,0,0.22), 0 0 0 4px #3fb565; transform:scale(1.02); }
/* Staafgrafiekje na de afrekening (als de antwoordtegels uit staan): onder de
   vraag, over de volle breedte van de vraagkolom. */
.bb-chart { display:flex; flex-direction:column; gap:8px; min-width:0; margin-top:1.2vh; animation:bbFadeUp .35s ease both; }
.bb-chart-bars { display:flex; flex-direction:column; gap:6px; }
.bb-chart-row { position:relative; display:flex; align-items:center; gap:9px; padding:6px 10px; border-radius:10px; background:rgba(255,255,255,0.06); overflow:hidden; font-size:clamp(11px, 1.25vh + .2vw, 17px); }
.bb-chart-row .fill { position:absolute; left:0; top:0; bottom:0; background:var(--bb-opt, #8e5cf0); opacity:.4; transition:width .5s ease; }
.bb-chart-row .k { position:relative; width:1.6em; height:1.6em; border-radius:6px; background:rgba(0,0,0,0.30); display:flex; align-items:center; justify-content:center; font-weight:800; flex-shrink:0; }
.bb-chart-row .t { position:relative; flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:700; }
.bb-chart-row .n { position:relative; font-weight:800; font-variant-numeric:tabular-nums; }
.bb-chart-row .ok { position:relative; color:#8ee0a6; font-weight:800; }
.bb-chart-row.is-right { box-shadow:inset 0 0 0 2px #3fb565; }
.bb-chart-row:not(.is-right) { opacity:.7; }
.bb-chart-answer { font-size:clamp(12px, 1.4vh + .2vw, 18px); color:var(--text-secondary); }
.bb-chart-answer b { color:#8ee0a6; }

/* Aanval: uitval naar de baas (Feedback 3). De positie naast het portret en
   de beweging zelf zet present.js met de Web Animations API; hier alleen de
   vorm van de kaart en de laag eromheen. */
.bb-atk-layer { position:fixed; inset:0; z-index:22; pointer-events:none; overflow:hidden; }
.bb-atk { position:absolute; left:0; top:0; z-index:4; display:flex; flex-direction:column; align-items:center; gap:10px; }
.bb-atk b { display:block; max-width:24ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; background:rgba(12,10,24,0.86); border:2px solid var(--bb-prof, #4a4a63); border-radius:999px; padding:3px 14px; font-size:clamp(12px, 1.6vh + .2vw, 20px); }
.bb-atk.is-crit .bb-av-big { --bb-av:clamp(140px, 20vh, 230px); box-shadow:inset 0 -6px 0 rgba(0,0,0,0.28), 0 0 0 4px #ffd23f, 0 0 60px rgba(255,210,63,0.55); }
.bb-atk.is-crit b { border-color:#ffd23f; color:#ffe9a8; }
.bb-salvo-row { display:flex; align-items:flex-end; gap:6px; }
.bb-salvo-row .plus { align-self:center; font-weight:800; background:rgba(12,10,24,0.86); border:2px solid rgba(255,255,255,0.25); border-radius:999px; padding:2px 10px; font-size:clamp(12px, 1.5vh + .2vw, 18px); }

/* Ability-effecten (Feedback 5): dim, aura + ring, deeltjes, spoor, slash,
   schermflits, ijskoepel, stralen en plusjes. Alleen transform/opacity/
   box-shadow. */
.bb-dim { position:fixed; inset:0; background:radial-gradient(ellipse var(--rx, 1px) var(--ry, 1px) at var(--sx, 50%) var(--sy, 50%), rgba(7,6,15,0) 45%, rgba(7,6,15,0.92) 100%); opacity:0; transition:opacity .35s ease; pointer-events:none; z-index:1; }
.bb-dim.is-on { opacity:.85; }

/* Gevechtsmodus (review kaart 2111): tijdens de afrekening zoomt het
   bosspaneel naar het midden (--fight zet present.js) en wijkt de vraag. */
.bb-battle .bb-boss { transition:transform .5s cubic-bezier(.3,.8,.3,1); transform-origin:50% 50%; }
.bb-battle.is-fight, .bb-battle.is-fight-out { overflow:hidden; }
.bb-battle.is-fight .bb-boss { transform:var(--fight, none); z-index:3; }
.bb-battle .bb-q { transition:opacity .35s ease, transform .45s ease; }
.bb-battle.is-fight .bb-q { opacity:0; transform:translateX(6vw); pointer-events:none; }
.bb-pl .av { transition:opacity .2s ease; }
.bb-pl.is-out .av { opacity:.3; }
.bb-float.is-fx { z-index:6; }

/* Callout: een vaste plek bovenaan het portret (ability's, de klap van de
   baas, Defeated). --c is de rand- en gloedkleur. */
.bb-callout { position:absolute; z-index:9; padding:.18em .8em; border-radius:999px; font-weight:800; font-size:clamp(20px, 3.4vh + .4vw, 48px); white-space:nowrap; color:#fff; background:rgba(12,10,24,0.9); border:3px solid var(--c, #ffd23f); box-shadow:0 0 26px var(--c, #ffd23f); pointer-events:none; animation:bbCallout 1.7s ease forwards; }
.bb-callout.strike { --c:#ff5a4f; }
.bb-callout.shield { --c:#7cc4ff; }
.bb-callout.heal { --c:#12968c; }
.bb-callout.defeat { --c:#ffd23f; color:#ffd23f; font-size:clamp(28px, 6vh + .6vw, 80px); }
.bb-callout.smash { --c:#ff3b2f; font-size:clamp(30px, 5.6vh + .7vw, 78px); border-width:4px; background:rgba(40,6,4,0.94); box-shadow:0 0 34px rgba(255,59,47,0.9), 0 0 80px rgba(255,59,47,0.45); letter-spacing:.02em; }
@keyframes bbCallout { 0% { opacity:0; transform:translate(-50%, -12px) scale(.7); } 12% { opacity:1; transform:translate(-50%, 0) scale(1.07); } 20% { transform:translate(-50%, 0) scale(1); } 80% { opacity:1; transform:translate(-50%, 0) scale(1); } 100% { opacity:0; transform:translate(-50%, -14px) scale(.96); } }

/* Vuurbal van de baas naar een speler (of de ijskoepel). */
.bb-shot { position:absolute; width:clamp(22px, 3.2vh, 40px); height:clamp(22px, 3.2vh, 40px); border-radius:50%; background:radial-gradient(circle at 40% 40%, #fff 0 16%, #ffd27a 30%, #ff5a2a 58%, rgba(200,30,20,0) 72%); box-shadow:0 0 26px 8px rgba(255,90,40,0.55); z-index:5; pointer-events:none; }
.bb-shot.is-smash { width:clamp(44px, 6.6vh, 84px); height:clamp(44px, 6.6vh, 84px); box-shadow:0 0 34px 12px rgba(255,60,30,0.70), 0 0 70px 22px rgba(255,30,20,0.35); }
/* Impact van de extra zware aanval: rode flits over het scherm, een schokgolf
   op het doelwit en een korte schud van het speelveld. */
.bb-smash-flash { position:fixed; inset:0; background:radial-gradient(ellipse at 50% 55%, rgba(255,80,60,0.42), rgba(255,80,60,0) 62%); animation:bbSmashFlash .5s ease-out both; pointer-events:none; z-index:20; }
.bb-smash-ring { position:fixed; border-radius:50%; border:4px solid rgba(255,106,92,0.95); box-shadow:0 0 30px 8px rgba(255,56,36,0.65), inset 0 0 26px rgba(255,56,36,0.55); animation:bbSmashRing .75s ease-out forwards; pointer-events:none; z-index:21; }
.bb-main.is-smash { animation:bbSmashShake .52s ease; }
.bb-fx-aura { position:absolute; inset:-14px; border-radius:34px; box-shadow:0 0 0 3px var(--bb-prof, #8e5cf0), 0 0 46px var(--bb-prof, #8e5cf0); opacity:0; animation:bbAura 1.5s ease-out forwards; pointer-events:none; }
.bb-fx-ring { position:absolute; inset:-9px; border-radius:30px; background:conic-gradient(from 0deg, var(--bb-prof, #8e5cf0), transparent 50%, var(--bb-prof, #8e5cf0)); animation:bbSpin 1.6s linear infinite; opacity:.85; pointer-events:none; z-index:-1; }
.bb-fx-ico { position:absolute; top:-2.6em; left:50%; width:2.6em; height:2.6em; opacity:0; animation:bbFxIco 1.3s ease forwards; pointer-events:none; }
.bb-fx-p { position:absolute; bottom:20%; width:7px; height:7px; border-radius:50%; opacity:0; animation:bbFxP 1.1s ease-out forwards; pointer-events:none; }
.bb-fx-ghost { position:absolute; pointer-events:none; animation:bbGhost .32s ease-out forwards; }
.bb-fx-throw { animation:bbThrow 1.2s ease-out both; }
@keyframes bbAura { 0% { opacity:0; transform:scale(.85); } 30% { opacity:1; transform:scale(1); } 100% { opacity:0; transform:scale(1.08); } }
@keyframes bbFxIco { 0% { opacity:0; transform:translate(-50%, 10px) scale(.7); } 25% { opacity:1; transform:translate(-50%, 0) scale(1); } 75% { opacity:1; transform:translate(-50%, 0) scale(1); } 100% { opacity:0; transform:translate(-50%, -12px) scale(1); } }
@keyframes bbFxP { 0% { opacity:0; transform:translateY(10px) scale(.6); } 25% { opacity:1; } 100% { opacity:0; transform:translateY(-90px) scale(.3); } }
@keyframes bbGhost { from { opacity:var(--ghost-o, .4); } to { opacity:0; } }
@keyframes bbThrow { 0% { opacity:0; transform:translateY(30px) scale(.8); } 25% { opacity:1; transform:none; } 70% { opacity:1; } 100% { opacity:0; transform:translateY(-20px) scale(.95); } }
.bb-xslash { position:fixed; pointer-events:none; z-index:7; }
.bb-xslash i { position:absolute; left:-8%; top:50%; width:116%; height:clamp(10px, 2.2vh, 24px); margin-top:clamp(-12px, -1.1vh, -5px); border-radius:50%; background:linear-gradient(90deg, transparent, #fff 14%, #fff 86%, transparent); box-shadow:0 0 18px 4px var(--c, #e06a1b), 0 0 50px 10px var(--c, #e06a1b); transform-origin:0 50%; animation:bbX .34s ease-out both; }
.bb-xslash i + i { transform-origin:100% 50%; animation-name:bbX2; animation-delay:.12s; }
@keyframes bbX { 0% { opacity:1; transform:rotate(30deg) scaleX(0); } 45% { opacity:1; transform:rotate(30deg) scaleX(1); } 100% { opacity:0; transform:rotate(30deg) scaleX(1) scaleY(.3); } }
@keyframes bbX2 { 0% { opacity:1; transform:rotate(-30deg) scaleX(0); } 45% { opacity:1; transform:rotate(-30deg) scaleX(1); } 100% { opacity:0; transform:rotate(-30deg) scaleX(1) scaleY(.3); } }
.bb-flash { position:fixed; inset:0; background:#fff; opacity:0; pointer-events:none; z-index:8; animation:bbFlash .16s ease-out forwards; }
@keyframes bbFlash { 0% { opacity:.65; } 100% { opacity:0; } }
.bb-float.is-power { font-size:clamp(40px, 8.5vh, 110px); }
.bb-float.is-power small { display:block; font-size:.26em; letter-spacing:.12em; font-weight:800; color:#ffd23f; text-shadow:none; margin-bottom:2px; }
.bb-pl-float.shield { color:#a9d9ff; }
.bb-pl-float.smash { color:#fff; font-size:clamp(26px, 4.6vh, 56px); text-shadow:0 0 12px #ff3b2f, 0 0 30px #ff3b2f, 0 3px 0 #6b0f08; }
.bb-dome { position:fixed; border-radius:50% 50% 0 0 / 100% 100% 0 0; border:3px solid rgba(235,248,255,0.92); border-bottom:0; background:radial-gradient(50% 100% at 50% 100%, rgba(140,205,255,0.06) 0%, rgba(140,205,255,0.2) 70%, rgba(225,246,255,0.55) 96%, rgba(225,246,255,0) 100%), repeating-linear-gradient(60deg, rgba(255,255,255,0.08) 0 2px, transparent 2px 26px), repeating-linear-gradient(-60deg, rgba(255,255,255,0.08) 0 2px, transparent 2px 26px); box-shadow:0 0 44px rgba(120,190,255,0.6), inset 0 10px 34px rgba(255,255,255,0.3); pointer-events:none; z-index:3; transform-origin:50% 100%; animation:bbDomeIn .5s cubic-bezier(.3,1.4,.5,1) both; }
.bb-dome.is-breaking { animation:bbDomeOut .45s ease-in forwards; }
.bb-dome .s { position:absolute; color:#fff; font-style:normal; opacity:.85; animation:bbSnow 3s ease-in-out infinite; }
.bb-dome .s1 { left:16%; top:34%; font-size:13px; }
.bb-dome .s2 { left:38%; top:55%; font-size:16px; animation-delay:.6s; }
.bb-dome .s3 { left:64%; top:30%; font-size:12px; animation-delay:1.1s; }
.bb-dome .s4 { left:84%; top:52%; font-size:15px; animation-delay:1.6s; }
.bb-dome-hit { position:absolute; width:60px; height:28px; border-radius:50%; background:radial-gradient(closest-side, rgba(255,255,255,0.95), rgba(160,215,255,0.5), transparent); animation:bbDomeHit .4s ease-out forwards; pointer-events:none; }
.bb-shard { position:fixed; width:22px; height:30px; margin:-15px 0 0 -11px; background:linear-gradient(160deg, #fff, #a9dcff 55%, rgba(120,190,255,0.55)); clip-path:polygon(50% 0, 100% 68%, 42% 100%, 0 40%); pointer-events:none; z-index:3; animation:bbShard .9s cubic-bezier(.2,.6,.4,1) both; }
@keyframes bbDomeIn { from { opacity:0; transform:scaleY(.2) scaleX(.86); } to { opacity:1; transform:none; } }
@keyframes bbDomeOut { to { opacity:0; transform:scaleY(.15) scaleX(.9); } }
@keyframes bbSnow { 0%,100% { opacity:.35; transform:translateY(0); } 50% { opacity:.95; transform:translateY(-6px); } }
@keyframes bbDomeHit { 0% { opacity:0; transform:scale(.4); } 30% { opacity:1; } 100% { opacity:0; transform:scale(1.3); } }
@keyframes bbShard { 0% { opacity:1; transform:none; } 100% { opacity:0; transform:translate(var(--dx, 30px), var(--dy, 60px)) rotate(var(--rot, 90deg)) scale(.6); } }
.bb-fx-beam { position:fixed; height:10px; margin-top:-5px; border-radius:6px; background:linear-gradient(0deg, var(--c, #12968c), #fff 42%, #fff 58%, var(--c, #12968c)); box-shadow:0 0 14px 3px var(--c, #12968c), 0 0 34px 8px var(--c, #12968c); transform-origin:left center; transition:transform .3s ease-out, opacity .3s ease; pointer-events:none; z-index:4; }
.bb-fx-plus { position:fixed; font-weight:900; font-size:clamp(22px, 3.4vh, 42px); color:#fff; text-shadow:0 0 10px var(--c, #12968c), 0 0 24px var(--c, #12968c); animation:bbPlus 1s ease-out both; pointer-events:none; z-index:5; }
/* Sterretjes bij de Heal (checklist 2111): kleine vonken rond de tegel. */
.bb-fx-star { position:fixed; font-weight:900; font-size:clamp(15px, 2.2vh, 30px); line-height:1; color:#fff; text-shadow:0 0 8px var(--c, #12968c), 0 0 20px var(--c, #12968c); animation:bbStar 1.2s ease-out both; pointer-events:none; z-index:5; }
/* Grote woede-heal van de boss (checklist 2111): een groene ring om het
   portret met opstijgende plussen en sterretjes. */
.bb-heal-ring { position:fixed; border-radius:18px; border:3px solid rgba(142,224,166,0.95); box-shadow:0 0 34px 10px rgba(62,224,160,0.55), inset 0 0 46px rgba(62,224,160,0.40); animation:bbHealRing 1.6s ease-out forwards; pointer-events:none; z-index:4; }
.bb-heal-spark { position:fixed; font-weight:900; line-height:1; color:#c9ffdd; text-shadow:0 0 10px #3ee0a0, 0 0 26px #3ee0a0; animation:bbHealSpark 1.6s ease-out both; pointer-events:none; z-index:5; }
.bb-pl.is-healed .bb-av { animation:bbHealGlow 1.1s ease-out; }
@keyframes bbHealGlow { 0% { box-shadow:inset 0 -3px 0 rgba(0,0,0,0.28); } 30% { box-shadow:inset 0 -3px 0 rgba(0,0,0,0.28), 0 0 0 3px #7dffc4, 0 0 30px #3ee0a0; } 100% { box-shadow:inset 0 -3px 0 rgba(0,0,0,0.28); } }
@keyframes bbPlus { 0% { opacity:0; transform:translateY(8px) scale(.6); } 25% { opacity:1; transform:translateY(-8px) scale(1.1); } 100% { opacity:0; transform:translateY(-70px) scale(.9); } }
@keyframes bbStar { 0% { opacity:0; transform:translateY(6px) scale(.4) rotate(0deg); } 22% { opacity:1; transform:translateY(-10px) scale(1.15) rotate(50deg); } 100% { opacity:0; transform:translateY(-70px) scale(.65) rotate(190deg); } }
@keyframes bbHealRing { 0% { opacity:0; transform:scale(.9); } 20% { opacity:1; } 100% { opacity:0; transform:scale(1.14); } }
@keyframes bbHealSpark { 0% { opacity:0; transform:translateY(20px) scale(.45) rotate(0deg); } 20% { opacity:1; } 100% { opacity:0; transform:translateY(-100px) scale(1.1) rotate(120deg); } }
@keyframes bbSmashFlash { 0% { opacity:0; } 16% { opacity:1; } 100% { opacity:0; } }
@keyframes bbSmashRing { 0% { opacity:1; transform:scale(.25); } 100% { opacity:0; transform:scale(1.65); } }
@keyframes bbSmashShake { 0%,100% { transform:none; } 12% { transform:translate(-9px, 4px) rotate(-.3deg); } 28% { transform:translate(8px, -5px) rotate(.3deg); } 46% { transform:translate(-6px, 3px); } 64% { transform:translate(5px, -2px); } 82% { transform:translate(-3px, 1px); } }

/* Einde */
.bb-end { display:grid; grid-template-columns:minmax(0, 0.9fr) minmax(0, 1.1fr); gap:clamp(16px, 3vw, 48px); align-items:center; }
.bb-end h1 { text-align:left; font-size:clamp(34px, 7vh + 1vw, 96px); margin:0; line-height:1; }
.bb-end h1.victory { color:#ffd23f; text-shadow:0 0 40px rgba(255,210,63,0.4); }
.bb-end h1.defeat { color:#ff8a80; }
.bb-end h1.escaped { color:#a9cdff; }
.bb-end-sub { color:var(--text-secondary); font-size:clamp(15px, 2vh + .3vw, 26px); margin:1vh 0 2.4vh; }
.bb-awards { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:12px; margin-bottom:2vh; }
.bb-award { background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.10); border-radius:16px; padding:12px 14px; animation:bbPop .5s cubic-bezier(.2,.9,.3,1.3) both; }
.bb-award small { display:block; color:var(--text-muted); text-transform:uppercase; letter-spacing:.08em; font-size:11px; font-weight:700; }
.bb-award b { display:block; font-size:clamp(17px, 2.4vh + .3vw, 30px); margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bb-award span { color:var(--text-secondary); font-size:.9em; }
/* Hero-kaarten (kaart 2651): de bonus staat als losse regel onder de stat. */
.bb-award .bb-award-bonus { display:block; margin-top:4px; color:#ffd54a; font-style:normal; font-weight:700; }
.bb-award-hero { border-color:rgba(255,213,74,0.28); }
/* Bij een gelijke stand staan alle namen in de kaart; laat ze daarom doorlopen. */
.bb-award-hero b { white-space:normal; overflow:visible; text-overflow:clip; }
.bb-rank { display:flex; flex-direction:column; gap:6px; max-height:34vh; overflow:auto; }
.bb-rank-row { display:grid; grid-template-columns:2em minmax(0, 1fr) auto auto; gap:10px; align-items:center; background:rgba(255,255,255,0.04); border-radius:10px; padding:6px 10px; font-size:clamp(13px, 1.5vh + .2vw, 19px); }
.bb-rank-row .n { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:700; display:flex; gap:8px; align-items:center; }
.bb-rank-row .d { color:#ffb199; font-weight:700; font-variant-numeric:tabular-nums; }
.bb-rank-row .h { color:#8ee0a6; font-weight:700; font-variant-numeric:tabular-nums; }

/* Bediening (zelfde vorm als Live Poll) */
.bb-controls { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 18px 14px; flex-wrap:wrap; transition:opacity .3s, transform .3s; }
.bb-idle .bb-controls { opacity:0; transform:translateY(20px); pointer-events:none; }
.bb-idle { cursor:none; }
.bb-cgroup { display:flex; align-items:center; gap:8px; flex-wrap:wrap; position:relative; }
.bb-btn { display:inline-flex; align-items:center; gap:7px; border:1px solid rgba(255,255,255,0.10); background:rgba(255,255,255,0.07); color:#fff; border-radius:10px; padding:9px 14px; font-size:14px; font-weight:700; cursor:pointer; text-decoration:none; white-space:nowrap; }
.bb-btn:hover { background:rgba(255,255,255,0.13); }
.bb-btn:disabled { opacity:.35; cursor:default; }
.bb-btn.primary { background:var(--primary); border-color:var(--primary); color:#1a1b2f; padding:10px 22px; font-size:15px; }
.bb-btn.primary:hover { background:var(--primary-hover); }
.bb-btn.attack { background:linear-gradient(135deg, #e8505b, #c8382c); border-color:#e8505b; color:#fff; }
.bb-status { color:var(--text-secondary); font-weight:700; font-size:14px; }
.bb-menu { position:absolute; right:0; bottom:calc(100% + 8px); width:min(320px, calc(100vw - 32px)); max-height:70vh; overflow:auto; background:var(--bg-modal); border:1px solid var(--panel-outline); border-radius:14px; padding:6px; box-shadow:0 18px 50px rgba(0,0,0,0.45); z-index:30; }
.bb-menu[hidden] { display:none; }
.bb-menu-label { color:var(--text-muted); font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; padding:8px 10px 4px; }
.bb-menu-item { display:flex; align-items:center; gap:8px; width:100%; background:transparent; border:0; color:#fff; padding:8px 10px; border-radius:8px; font:inherit; font-size:13px; font-weight:600; text-align:left; cursor:pointer; text-decoration:none; }
.bb-menu-item:hover { background:rgba(255,255,255,0.08); }
.bb-menu-item:disabled { opacity:.35; cursor:default; }
.bb-menu-chips { display:flex; flex-wrap:wrap; gap:6px; padding:4px 8px 6px; }
.bb-menu-chips button { background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.10); color:#fff; border-radius:8px; padding:6px 10px; font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.bb-toast { position:fixed; left:50%; top:14px; transform:translateX(-50%); background:#e05a4e; color:#fff; font-weight:700; border-radius:10px; padding:8px 16px; display:none; z-index:40; }
.bb-toast.is-on { display:block; }

@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  body.bb-present { overflow:auto; height:auto; }
  .bb-stage { position:static; min-height:100vh; }
  .bb-screen { position:static; }
  .bb-main { padding:0 16px; }
  .bb-lobby-top, .bb-battle, .bb-end { grid-template-columns:1fr; }
  .bb-battle .bb-boss, .bb-battle .bb-q, .bb-battle .bb-roster { grid-column:1; grid-row:auto; }
  .bb-join { flex-direction:column; }
  .bb-opts { grid-template-columns:1fr; }
}

/* ---------- Telefoon ---------- */
.bb-p { max-width:520px; margin:0 auto; }
.bb-p-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; font-size:.85em; color:var(--text-muted); }
.bb-p-head b { color:#fff; }
.bb-p-test { background:rgba(59,139,235,0.12); border:1px solid rgba(59,139,235,0.4); color:#a9cdff; border-radius:10px; padding:8px 12px; font-size:.82em; font-weight:600; margin-bottom:10px; }
.bb-p-screen { animation:bbFadeUp .35s ease both; }
/* Spelerkaart op de telefoon (kaart 2111): avatar, naam/level, HP-balk
   eronder en een ruime power-up-balk. De baas-balk blijft compact. */
.bb-p-bars { display:flex; flex-direction:column; gap:10px; margin-bottom:14px; }
.bb-p-bar { display:grid; grid-template-columns:auto minmax(0, 1fr) auto; gap:10px; align-items:center; font-size:.85em; font-weight:700; }
.bb-p-bar.boss { background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.08); border-radius:14px; padding:8px 12px; }
.bb-p-bar .bb-hp { height:10px; }
.bb-p-bar .num { font-variant-numeric:tabular-nums; color:var(--text-secondary); min-width:4.5em; text-align:right; }
.bb-p-bar.boss .bb-hp > i { background:linear-gradient(90deg, #c8382c, #ff6a5c); }
.bb-p-bar img { width:28px; height:28px; border-radius:8px; object-fit:cover; }
.bb-p-hero { position:relative; background:linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04)); border:1px solid rgba(255,255,255,0.12); border-radius:18px; padding:12px 14px 14px; }
.bb-p-hero-id { display:flex; align-items:center; gap:14px; margin-bottom:12px; }
.bb-p-av { --bb-av:88px; border-radius:22px; box-shadow:inset 0 -4px 0 rgba(0,0,0,0.28), 0 0 0 3px var(--bb-prof, #8e5cf0), 0 14px 30px rgba(0,0,0,0.45); }
.bb-p-av.is-icon { box-shadow:inset 0 -4px 0 rgba(0,0,0,0.28), 0 0 0 3px var(--bb-prof, #8e5cf0); }
.bb-p-av.is-icon img { position:relative; inset:auto; width:64%; height:64%; object-fit:contain; }
.bb-p-hero-txt { min-width:0; }
.bb-p-hero-txt b { display:block; font-size:1.2em; line-height:1.2; }
.bb-p-hero-txt small { display:block; color:var(--text-muted); font-size:.82em; margin-top:3px; }
.bb-p-hprow { display:flex; align-items:center; gap:8px; }
.bb-p-hprow .lbl { font-size:.72em; font-weight:800; letter-spacing:.08em; color:var(--text-muted); }
.bb-p-hprow .bb-hp { flex:1; height:14px; }
.bb-p-hprow .num { font-size:.82em; font-weight:700; font-variant-numeric:tabular-nums; color:var(--text-secondary); min-width:4.6em; text-align:right; }
.bb-p-mana { display:flex; align-items:center; gap:10px; margin:10px 0 0; padding:9px 10px; border-radius:12px; background:rgba(0,0,0,0.22); font-size:.82em; font-weight:700; color:var(--text-secondary); }
.bb-p-mana .lbl { flex:none; letter-spacing:.03em; }
.bb-p-mana .dots { display:flex; gap:5px; flex:1; min-width:0; }
.bb-p-mana .dots i { flex:1; height:13px; border-radius:7px; background:rgba(255,255,255,0.14); transition:background .25s, box-shadow .25s; }
.bb-p-mana .dots i.is-on { background:var(--bb-prof, #8e5cf0); box-shadow:0 0 10px var(--bb-prof, #8e5cf0); }
.bb-p-mana .ready { flex:none; color:var(--bb-prof, #8e5cf0); font-size:.92em; }
.bb-p-mana .num { flex:none; color:var(--text-muted); font-variant-numeric:tabular-nums; }
.bb-p-mana.is-full { color:var(--bb-prof, #8e5cf0); }
.bb-p-lobby-av { display:flex; justify-content:center; margin-bottom:14px; }
@media (max-height:640px) {
  .bb-p-av { --bb-av:64px; border-radius:16px; }
  .bb-p-hero { padding:10px 12px 12px; }
  .bb-p-hero-id { margin-bottom:9px; }
}
.bb-p-abil { display:block; width:100%; margin:0 0 12px; padding:12px 14px; border:0; border-radius:14px; background:var(--bb-prof, #8e5cf0); color:#fff; font-weight:800; font-size:1em; font-family:inherit; cursor:pointer; box-shadow:inset 0 -5px 0 rgba(0,0,0,0.22); }
.bb-p-abil.is-armed { background:linear-gradient(135deg, #ffd23f, #ff9c00); color:#2a1600; }
@keyframes bbBtnPulse { 0%,100% { box-shadow:inset 0 -5px 0 rgba(0,0,0,0.22), 0 0 10px var(--bb-prof, #8e5cf0); } 50% { box-shadow:inset 0 -5px 0 rgba(0,0,0,0.22), 0 0 26px var(--bb-prof, #8e5cf0); } }
.bb-p-abil:not(.is-armed) { animation:bbBtnPulse 2s ease-in-out infinite; }
@keyframes bbArmedFrame { 0%,100% { box-shadow:inset 0 0 0 4px var(--bb-armed, #8e5cf0); } 50% { box-shadow:inset 0 0 0 4px var(--bb-armed, #8e5cf0), inset 0 0 30px var(--bb-armed, #8e5cf0); } }
body.bb-phone.is-armed { animation:bbArmedFrame 2s ease-in-out infinite; }
.bb-p-ko { background:rgba(224,90,78,0.14); border:1px solid rgba(224,90,78,0.45); color:#ffd0cb; border-radius:12px; padding:10px 12px; font-size:.88em; line-height:1.4; margin-bottom:12px; }
.bb-p-dead { background:rgba(224,90,78,0.14); border:1px solid rgba(224,90,78,0.45); color:#ffd0cb; border-radius:16px; padding:18px 16px; font-size:1em; line-height:1.5; text-align:center; margin:8px 0 12px; }
.bb-p-dead h2 { margin:0 0 6px; color:#fff; font-size:1.35em; }
.bb-p-dead p { margin:0 0 8px; }
.bb-p-dead small { display:block; color:var(--text-secondary); font-size:.85em; }
.bb-p-dead small.ready { color:#8ee0a6; font-weight:700; margin-top:4px; }
.bb-p-wait { text-align:center; padding:8vh 8px 0; }
.bb-p-wait h2 { font-size:1.6em; margin:0 0 8px; }
.bb-p-wait p { color:var(--text-secondary); margin:0; line-height:1.5; }
.bb-p-big { font-size:60px; line-height:1; margin-bottom:10px; }
.bb-p-dots { display:flex; gap:10px; justify-content:center; margin:24px 0; }
.bb-p-dots i { width:13px; height:13px; border-radius:50%; background:var(--primary); animation:bbPulse 1.2s ease infinite; }
.bb-p-dots i:nth-child(2) { animation-delay:.2s; }
.bb-p-dots i:nth-child(3) { animation-delay:.4s; }
.bb-pick h2 { text-align:center; margin:4px 0 4px; font-size:1.45em; }
.bb-pick > p { text-align:center; color:var(--text-secondary); margin:0 0 14px; }
.bb-pick-tiles { display:grid; gap:10px; }
.bb-pick-tile { display:grid; grid-template-columns:auto minmax(0, 1fr); gap:4px 14px; align-items:center; text-align:left; width:100%; border:2px solid rgba(255,255,255,0.10); background:rgba(255,255,255,0.06); color:#fff; border-radius:16px; padding:14px 16px; cursor:pointer; -webkit-tap-highlight-color:transparent; transition:transform .1s, border-color .2s, background .2s; }
.bb-pick-tile:active { transform:scale(.98); }
.bb-pick-tile .bb-ico { grid-row:1 / span 3; font-size:1.9em; }
.bb-pick-tile b { font-size:1.2em; }
.bb-pick-tile .stats { font-size:.85em; color:var(--text-secondary); font-weight:700; }
.bb-pick-tile .blurb { font-size:.85em; color:var(--text-muted); line-height:1.35; }
.bb-pick-tile.is-on { border-color:var(--bb-prof, var(--primary)); background:rgba(255,255,255,0.12); }
.bb-p-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:.78em; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--primary); margin-bottom:6px; }
.bb-p-timer { background:rgba(59,139,235,0.18); color:#a9cdff; border-radius:999px; padding:3px 10px; letter-spacing:0; display:none; }
.bb-p-timer.is-on { display:inline-block; }
.bb-p-timer.is-urgent { background:rgba(224,90,78,0.22); color:#ffaaa2; }
.bb-p-q { font-size:1.3em; font-weight:700; line-height:1.25; margin:0 0 14px; }
.bb-p-opts { display:grid; gap:10px; }
.bb-p-opts.two-col { grid-template-columns:1fr 1fr; }
.bb-p-opt { position:relative; display:flex; align-items:center; gap:12px; min-height:62px; border:0; border-radius:16px; padding:12px 16px; color:#fff; font-size:1.02em; font-weight:700; text-align:left; cursor:pointer; box-shadow:inset 0 -5px 0 rgba(0,0,0,0.22); transition:transform .1s, opacity .25s, filter .25s, box-shadow .2s; -webkit-tap-highlight-color:transparent; }
.bb-p-opts.two-col .bb-p-opt { flex-direction:column; justify-content:center; text-align:center; min-height:96px; gap:8px; }
.bb-p-opt:active { transform:scale(.97); }
.bb-p-opt .k { width:28px; height:28px; border-radius:7px; background:rgba(0,0,0,0.22); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.bb-p-opts.two-col .bb-p-opt .k { display:flex; width:30px; height:30px; }
.bb-p-opts.has-pick .bb-p-opt:not(.is-picked) { opacity:.4; filter:saturate(.5); }
.bb-p-opt.is-picked { box-shadow:inset 0 -5px 0 rgba(0,0,0,0.22), 0 0 0 4px #fff; }
.bb-p-opts.is-resolved .bb-p-opt.is-correct { opacity:1; filter:none; box-shadow:inset 0 -5px 0 rgba(0,0,0,0.22), 0 0 0 4px #3fb565; }
.bb-p-opts.is-locked .bb-p-opt { cursor:default; }
.bb-p-status { margin-top:14px; text-align:center; font-size:.92em; color:var(--text-secondary); min-height:1.4em; }
.bb-p-status.ok { color:#8ee0a6; font-weight:700; }
.bb-p-status.closed { color:#ffaaa2; font-weight:700; }
.bb-p-status.err { color:#ff8a80; font-weight:700; }
.bb-p-result { margin-top:16px; border-radius:16px; padding:14px 16px; text-align:center; animation:bbPop .45s cubic-bezier(.2,.9,.3,1.3) both; }
.bb-p-result.good { background:rgba(63,181,101,0.18); border:1px solid rgba(63,181,101,0.6); }
.bb-p-result.bad { background:rgba(224,90,78,0.15); border:1px solid rgba(224,90,78,0.5); }
.bb-p-result.crit { background:rgba(255,210,63,0.16); border:1px solid rgba(255,210,63,0.7); }
.bb-p-result.is-ability { background:rgba(255,255,255,0.07); border:1px solid var(--bb-prof, #8e5cf0); animation:bbPRFlash .9s ease-out; }
@keyframes bbPRFlash { 0% { box-shadow:0 0 0 0 transparent; } 25% { box-shadow:0 0 0 6px var(--bb-prof, #8e5cf0), 0 0 40px var(--bb-prof, #8e5cf0); } 100% { box-shadow:0 0 0 0 transparent; } }
.bb-p-result .bb-ico-lg { margin:0 auto 10px; font-size:1.1em; }
.bb-p-result h3 { margin:0 0 6px; font-size:1.35em; }
.bb-p-result p { margin:4px 0 0; color:var(--text-secondary); line-height:1.4; }
.bb-p-result p.heal { color:#8ee0a6; font-weight:700; }
.bb-p-result p.hurt { color:#ffaaa2; font-weight:700; }
.bb-p-end-stats { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; margin-top:18px; }
.bb-p-end-stats.is-four { grid-template-columns:repeat(4, 1fr); gap:6px; }
.bb-p-end-stats div { background:rgba(255,255,255,0.06); border-radius:12px; padding:10px 6px; text-align:center; }
.bb-p-end-stats b { display:block; font-size:1.4em; }
.bb-p-end-stats small { color:var(--text-muted); font-size:.75em; text-transform:uppercase; letter-spacing:.06em; font-weight:700; }
/* Eindscherm van de telefoon (kaart 2651): hero-regel + bonus. */
.bb-p-hero-line { color:#ffd54a; font-weight:700; margin-top:12px !important; }
.bb-p-hero-bonus { color:#ffd54a; font-size:1.15em; font-weight:700; margin-top:4px !important; }

/* =========================================================================
   RESULTS -- gedeelde uitslag-pagina's (kaart 2659, 2026-11-16). Live Poll
   was het voorbeeld: open kaarten per vraag, gekleurde balkrijen met
   "aantal · %", grote gemiddelden, een verdeelde balk bij ratings en open
   antwoorden als anonieme pillen. Geen nieuwe stylesheet: alles hier is
   mg-res-*. Pagina-unieke CSS blijft in het <style>-blok van die pagina.
   Bewust gewone klassenselectors (geen :where(body:not(.mg-editor))): deze
   pagina's hebben geen speel- of editorlook nodig en de klassen zijn uniek
   genoeg. De HTML komt uit minigames/results-lib.php.
   ========================================================================= */

.mg-res-top { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; flex-wrap:wrap; margin-bottom:14px; }
.mg-res-kicker { color:var(--primary); font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.mg-res-top h1 { text-align:left; margin:4px 0 4px; font-size:1.8em; }
.mg-res-sub { margin:0; color:var(--text-secondary); }
.mg-res-actions { display:flex; gap:8px; flex-wrap:wrap; }
.mg-res-actions .btn { text-transform:none; letter-spacing:0; }

.mg-res-meta { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.mg-res-chip { background:rgba(255,255,255,0.08); border:1px solid var(--border-subtle); border-radius:999px; padding:5px 12px; font-size:.82em; font-weight:700; }
.mg-res-notice, .mg-res-empty { background:rgba(59,139,235,0.10); border:1px solid rgba(59,139,235,0.35); color:#cfe2ff; border-radius:12px; padding:14px 16px; margin-bottom:18px; line-height:1.5; }
.mg-res-empty { background:rgba(255,156,0,0.10); border-color:rgba(255,156,0,0.35); color:#ffe0b0; }

.mg-res-card { background:var(--bg-card); border:1px solid var(--panel-outline); border-radius:16px; padding:18px; margin-bottom:16px; }
.mg-res-card-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; flex-wrap:wrap; }
.mg-res-num { color:var(--primary); font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.mg-res-type { color:var(--text-muted); border:1px solid var(--border-subtle); border-radius:999px; padding:2px 9px; font-size:.76em; margin-left:8px; }
.mg-res-total { color:var(--text-muted); font-size:.85em; }
.mg-res-q { text-align:left; margin:0 0 14px; font-size:1.15em; line-height:1.3; }

.mg-res-rows { display:block; }
.mg-res-row { display:grid; grid-template-columns:minmax(0,1fr) 40% 84px; align-items:center; gap:10px; margin:8px 0; }
.mg-res-label { display:flex; align-items:center; gap:8px; min-width:0; }
.mg-res-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.mg-res-label span { overflow:hidden; text-overflow:ellipsis; }
.mg-res-bar { height:14px; background:rgba(255,255,255,0.07); border-radius:999px; overflow:hidden; }
.mg-res-bar i { display:block; height:100%; border-radius:999px; }
.mg-res-val { text-align:right; font-weight:700; font-size:.85em; white-space:nowrap; color:var(--text-secondary); }
.mg-res-row.is-correct .mg-res-label { color:#8ee0a6; font-weight:700; }
.mg-res-row.is-correct .mg-res-val { color:#8ee0a6; }

.mg-res-paragraph { margin:0 0 14px; line-height:1.5; }

/* Eén verdeelde balk (rating 1-5) plus legenda. Segmenten met 0 tellen
   staan niet in de balk, maar wel in de legenda. */
.mg-res-stack { display:flex; height:26px; border-radius:999px; overflow:hidden; background:rgba(255,255,255,0.07); margin:0 0 10px; }
.mg-res-stack .mg-res-seg { display:flex; align-items:center; justify-content:center; height:100%; min-width:0; overflow:hidden; color:#1a1b2f; font-size:.76em; font-weight:700; font-style:normal; }
.mg-res-stack .mg-res-seg.is-empty { background:rgba(255,255,255,0.05); }
.mg-res-legend { display:flex; flex-wrap:wrap; gap:6px 14px; margin:0 0 4px; font-size:.85em; color:var(--text-secondary); }
.mg-res-legend-item { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.mg-res-legend-item b { color:var(--text-primary); }

/* Open antwoorden: anonieme pillen, geen namen. */
.mg-res-answers { display:flex; flex-wrap:wrap; gap:8px; }
.mg-res-answer { background:rgba(255,255,255,0.06); border:1px solid var(--border-subtle); border-radius:14px; padding:8px 12px; font-size:.92em; line-height:1.4; max-width:100%; overflow-wrap:anywhere; }
.mg-res-answers:not(.is-expanded) .mg-res-answer.is-extra { display:none; }
.mg-res-more { background:none; border:1px dashed var(--border-subtle); border-radius:14px; padding:8px 12px; color:var(--text-muted); font:inherit; font-size:.88em; cursor:pointer; }
.mg-res-more:hover { color:var(--text-primary); border-color:var(--primary); }

.mg-res-avg { font-size:2.2em; font-weight:700; margin:0 0 10px; line-height:1.1; }
.mg-res-avg small { font-size:.38em; color:var(--text-muted); text-transform:uppercase; letter-spacing:.08em; margin-left:4px; }
.mg-res-avg .mg-res-stars { font-size:.5em; letter-spacing:2px; margin-left:8px; vertical-align:2px; }
.mg-res-star-on { color:#f5b82e; }
.mg-res-star-off { color:rgba(255,255,255,.22); }
.mg-res-none { color:var(--text-muted); font-style:italic; margin:8px 0 0; }

.mg-res-words { display:flex; flex-wrap:wrap; gap:8px; }
.mg-res-word { background:rgba(255,255,255,0.08); border:1px solid var(--border-subtle); border-radius:999px; padding:6px 12px; font-weight:700; }
.mg-res-word b { color:var(--primary); margin-left:6px; }

/* Inklapbaar blok ("Who answered what", de volledige lijst per persoon). */
.mg-res-toggle { margin:14px 0 0; padding-top:12px; border-top:1px solid var(--border-subtle); }
.mg-res-toggle > summary { cursor:pointer; color:var(--text-secondary); font-weight:700; }
.mg-res-toggle > summary:hover { color:var(--text-primary); }
.mg-res-toggle-body { margin-top:10px; }
.mg-res-people { margin:0 0 18px; }
.mg-res-people > summary { cursor:pointer; color:var(--text-secondary); font-weight:700; }
.mg-res-names { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.mg-res-name { background:rgba(255,255,255,0.07); border:1px solid var(--border-subtle); border-radius:999px; padding:4px 10px; font-size:.82em; }

.mg-res-foot { color:var(--text-muted); font-size:.82em; text-align:center; margin-top:22px; }

@media (max-width:640px) {
  .mg-res-row { grid-template-columns:1fr; gap:6px; }
  .mg-res-bar { grid-row:2; }
  .mg-res-val { text-align:left; }
  .mg-res-top h1 { font-size:1.45em; }
  .mg-res-legend { font-size:.8em; }
}
