/* ================= Kids' games (/games) ================= */
.game-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.4rem; }
.game-back { font-weight: 550; }
.game-title { margin-top: 0.3rem; }
.lang-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.lang-toggle button { border: none; background: var(--bg-elevated); color: var(--text-muted); padding: 0.35rem 0.8rem; cursor: pointer; font-weight: 600; }
.lang-toggle button.on { background: var(--accent); color: #fff; }

.game-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; margin: 1.5rem 0; }
.game-card .game-emoji { font-size: 2.6rem; line-height: 1; display: block; margin-bottom: 0.5rem; }
.game-card .badges { margin-top: 0.7rem; }

.game-panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); padding: 1.3rem; margin: 1rem 0; }
.game-panel h3 { margin-top: 0; }
.game-setup-row { margin: 0.9rem 0; }
.game-setup-row > .row-label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill { border: 2px solid var(--border); background: var(--bg); color: var(--text); border-radius: 999px; padding: 0.55rem 1.1rem; font-size: 1.05rem; cursor: pointer; }
.pill:hover { border-color: var(--accent); }
.pill.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.game-bar { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); margin-bottom: 0.8rem; flex-wrap: wrap; gap: 0.5rem; }
.game-progress { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; margin-bottom: 1.2rem; }
.game-progress > div { height: 100%; background: var(--accent); transition: width .25s ease; }

.big-question { font-size: 2.6rem; font-weight: 700; text-align: center; margin: 1rem 0; font-family: var(--font-mono); }
.answer-row { display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap; }
.answer-input { width: 9rem; font-size: 2rem; text-align: center; padding: 0.4rem; border: 2px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); }
.answer-input:focus { outline: none; border-color: var(--accent); }
.feedback { text-align: center; font-size: 1.3rem; font-weight: 700; min-height: 2rem; margin-top: 0.8rem; }
.feedback.good { color: var(--soft-success-text); }
.feedback.bad  { color: var(--soft-error-text); }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 1rem; }
.choice { font-size: 1.6rem; font-weight: 700; padding: 0.9rem; border: 2px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); cursor: pointer; }
.choice:hover:not(:disabled) { border-color: var(--accent); }
.choice.correct { background: var(--soft-success); border-color: var(--soft-success-text); color: var(--soft-success-text); }
.choice.wrong   { background: var(--soft-error);   border-color: var(--soft-error-text);   color: var(--soft-error-text); }

.result-box { text-align: center; }
.result-box .stars { font-size: 2.6rem; letter-spacing: 0.2rem; }
.result-box .score { font-size: 1.6rem; font-weight: 700; margin: 0.4rem 0; }
.result-box .btn { margin: 0.3rem; }

/* memory */
.memory-grid { display: grid; gap: 0.6rem; max-width: 560px; margin: 0 auto; }
.mem-card { aspect-ratio: 1; font-size: 2.2rem; border-radius: var(--radius); border: 2px solid var(--border); background: var(--accent); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: transform .15s ease; }
.mem-card.up { background: var(--bg-elevated); color: inherit; transform: scale(1.04); }
.mem-card.done { background: var(--soft-success); border-color: var(--soft-success-text); cursor: default; }
@media (max-width: 480px) { .mem-card { font-size: 1.7rem; } }

/* word scramble */
.word-emoji { font-size: 4rem; text-align: center; line-height: 1.2; }
.slot-row, .tile-row { display: flex; justify-content: center; gap: 0.45rem; flex-wrap: wrap; margin: 0.8rem 0; }
.slot { width: 2.6rem; height: 3rem; border-bottom: 3px solid var(--accent); text-align: center; font-size: 1.8rem; font-weight: 700; text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; }
.tile { width: 3rem; height: 3.2rem; font-size: 1.7rem; font-weight: 700; text-transform: uppercase; border: 2px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); cursor: pointer; }
.tile:disabled { opacity: 0.25; cursor: default; }
.shake { animation: shake .35s; }
@keyframes shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }

/* clock */
.clock-wrap { display: flex; justify-content: center; margin: 0.5rem 0; }
.clock-svg { width: min(260px, 70vw); height: auto; }
.clock-face { fill: var(--bg); stroke: var(--text); stroke-width: 4; }
.clock-num { fill: var(--text); font-size: 15px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.clock-tick { stroke: var(--text-muted); stroke-width: 1.5; }
.clock-hand-h { stroke: var(--text); stroke-width: 6; stroke-linecap: round; }
.clock-hand-m { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.clock-dot { fill: var(--text); }

/* patterns */
.seq-row { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.seq-num { min-width: 3.4rem; padding: 0.6rem 0.4rem; text-align: center; font-size: 1.6rem; font-weight: 700; font-family: var(--font-mono); border: 2px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.seq-num.unknown { border-style: dashed; border-color: var(--accent); color: var(--accent); }

/* ---- quiz visuals ---- */
.quiz-visual { display: flex; justify-content: center; margin: 0.8rem 0; }
.quiz-visual svg { max-width: 100%; height: auto; }
.choice-big .choice { font-size: 1.7rem; }
.coin-row { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; align-items: center; max-width: 440px; }

/* ---- sudoku ---- */
.sudoku { display: grid; grid-template-columns: repeat(4, 1fr); width: min(320px, 90%); margin: 0.8rem auto; border: 3px solid var(--text); border-radius: 6px; overflow: hidden; }
.sd-cell { aspect-ratio: 1; font-size: 1.9rem; font-weight: 700; border: 1px solid var(--border); background: var(--bg); color: var(--accent); cursor: pointer; padding: 0; }
.sd-cell.given { background: var(--accent-soft); color: var(--text); cursor: default; }
.sd-cell.sel { outline: 3px solid var(--accent); outline-offset: -3px; background: var(--soft-warning); color: var(--text); }
.sd-cell.bad { background: var(--soft-error); color: var(--soft-error-text); }
.sd-cell.bx { border-right: 3px solid var(--text); }
.sd-cell.by { border-bottom: 3px solid var(--text); }
.sd-pad { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.6rem; }
.sd-pad .choice { width: 4rem; padding: 0.6rem 0; }

/* ---- simon ---- */
.simon { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; width: min(320px, 90%); margin: 1rem auto; }
.simon-pad { aspect-ratio: 1; border-radius: 22px; border: 4px solid rgba(0,0,0,0.25); cursor: pointer; opacity: 0.55; transition: opacity .08s, transform .08s; }
.simon-pad:disabled { cursor: default; }
.simon-pad.lit { opacity: 1; transform: scale(1.05); box-shadow: 0 0 22px currentColor; }
.simon-pad.pad0 { background: #2ecc71; color: #2ecc71; border-top-left-radius: 100%; }
.simon-pad.pad1 { background: #e74c3c; color: #e74c3c; border-top-right-radius: 100%; }
.simon-pad.pad2 { background: #f1c40f; color: #f1c40f; border-bottom-left-radius: 100%; }
.simon-pad.pad3 { background: #3498db; color: #3498db; border-bottom-right-radius: 100%; }

/* ---- whack-a-mole ---- */
.mole-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; width: min(360px, 94%); margin: 0.8rem auto; }
.hole { aspect-ratio: 1; border-radius: 50%; border: none; background: radial-gradient(circle at 50% 60%, #3b2a1a 0 55%, #6b4a2b 56% 100%); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; overflow: hidden; }
.hole .critter { font-size: 3.2rem; transform: translateY(110%); transition: transform .1s ease-out; }
.hole.up .critter { transform: translateY(0); }

/* ---- tic-tac-toe ---- */
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; width: min(330px, 92%); margin: 0.8rem auto; }
.ttt-cell { aspect-ratio: 1; font-size: 2.6rem; border: 2px solid var(--border); border-radius: var(--radius); background: var(--bg); cursor: pointer; padding: 0; }
.ttt-cell:hover:not(:disabled) { border-color: var(--accent); }
.ttt-cell:disabled { cursor: default; }
.ttt-cell.win { background: var(--soft-success); border-color: var(--soft-success-text); }

/* ---- chess ---- */
.chs-layout { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-start; justify-content: center; padding: 0.8rem; }
.chs-main { flex: 0 1 auto; }
.chs-side { flex: 1 1 260px; min-width: 240px; max-width: 420px; }
/* the board is as big as the screen allows, so all eight rows show without scrolling */
.chs-wrap { width: min(600px, calc(100vw - 3.5rem), max(300px, calc(100vh - 250px))); margin: 0 auto; container-type: inline-size; }
.chs-wrap.theater-on { container-type: size; }
.chs-side .feedback { min-height: 2.6em; }
.chs-board { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1; border: 3px solid #4a3b2a; border-radius: 6px; overflow: hidden; }
.chs-sq { position: relative; min-width: 0; min-height: 0; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 0; cursor: pointer; font-size: 10cqw; line-height: 1; }
.chs-sq.light { background: #eeeed2; }
.chs-sq.dark { background: #769656; }
.chs-sq.last { box-shadow: inset 0 0 0 100px rgba(255, 235, 59, 0.38); }
.chs-sq.selected { box-shadow: inset 0 0 0 100px rgba(80, 160, 255, 0.45); }
.chs-sq.check { box-shadow: inset 0 0 0 100px rgba(255, 60, 60, 0.55); }
.chs-sq.cap { box-shadow: inset 0 0 0 0.9cqw rgba(220, 60, 60, 0.85); }
.chs-piece { position: absolute; inset: 4%; display: block; user-select: none; pointer-events: none; }
.chs-piece svg.pc { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0.3cqw 0.3cqw rgba(0, 0, 0, 0.3)); }
.chs-dot { position: absolute; width: 28%; height: 28%; border-radius: 50%; background: rgba(0, 0, 0, 0.25); pointer-events: none; }
.chs-promo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 1cqw; background: rgba(0, 0, 0, 0.55); }
.chs-promo-btn { width: 16cqw; height: 16cqw; padding: 4px; border: 2px solid var(--border); border-radius: var(--radius); background: #eeeed2; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.chs-promo-btn:hover { border-color: var(--accent); }
.chs-result { position: absolute; left: 6cqw; right: 6cqw; top: 50%; transform: translateY(-50%); z-index: 3; padding: 3cqw 3cqw 2.5cqw; border-radius: 3cqw; text-align: center;
              background: rgba(255, 255, 255, 0.95); border: 0.6cqw solid #4a3b2a; box-shadow: 0 1cqw 4cqw rgba(0, 0, 0, 0.45); color: #222; }
.chs-result.good { border-color: #2e8b57; }
.chs-result.bad { border-color: #b3261e; }
.chs-result-text { font-weight: 800; font-size: max(1rem, 4.2cqw); line-height: 1.25; }
.chs-result-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 2cqw; }
.chs-moves { text-align: center; color: var(--text-muted, inherit); font-size: 0.9rem; min-height: 1.4em; word-spacing: 0.1em; }

/* ---- catch the stars ---- */
.fall-area { position: relative; height: 380px; overflow: hidden; border-radius: var(--radius); background: linear-gradient(#10224a, #2a2f6b); }
.fall-item { position: absolute; top: -3rem; font-size: 2.6rem; line-height: 1; background: none; border: none; cursor: pointer; padding: 0.2rem; animation-name: fall; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes fall { from { top: -3rem; } to { top: 100%; } }
.fall-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,0.55); color: #fff; }
.fall-over .muted { color: #ddd; }

/* ---- hub sections ---- */
.games-section-title { display: flex; align-items: center; gap: 0.5rem; margin-top: 2rem; }

/* ---- arcade (canvas) games ---- */
.arcade-canvas { display: block; width: 100%; margin: 1rem auto; border-radius: var(--radius); border: 2px solid var(--border); touch-action: none; background: #123; cursor: pointer; user-select: none; -webkit-user-select: none; }
.arcade-options .pill { min-width: 3rem; }
.swatch { display: inline-block; width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 2px solid rgba(0,0,0,0.35); vertical-align: middle; }

/* ---- first-person clean-up game ---- */
.cleanup-wrap { width: 100%; max-width: 900px; margin: 1rem auto; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 2px solid var(--border); background: #123; overflow: hidden; }

/* ---- theater mode / full screen ---- */
.theater-on { position: fixed !important; inset: 0 !important; margin: auto !important; z-index: 2000 !important; max-width: none !important; max-height: none !important;
              width: min(100vw, calc(100vh * var(--ar, 1.6))) !important; height: min(100vh, calc(100vw / var(--ar, 1.6))) !important;
              border: none !important; border-radius: 0 !important; box-shadow: 0 0 0 200vmax rgba(4, 6, 18, 0.97) !important; }
.theater-close { position: fixed; top: 10px; right: 14px; z-index: 2100; padding: 8px 14px; border-radius: 10px; border: 2px solid rgba(255,255,255,0.7);
                 background: rgba(0,0,0,0.65); color: #fff; font: 700 14px system-ui, sans-serif; cursor: pointer; }
.theater-close:hover { background: rgba(40, 40, 60, 0.9); }
.theater-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 0.4rem 0 0.2rem; }

/* ---- big text and emoji in quiz questions ---- */
.quiz-big { text-align: center; font-weight: 800; margin: 0.6rem 0; line-height: 1.2; letter-spacing: 0.02em; }
.quiz-emoji { text-align: center; font-size: 5rem; line-height: 1.1; margin: 0.3rem 0; }

.sudoku.n6 { width: min(380px, 94%); }
.sudoku.n6 .sd-cell { font-size: 1.5rem; }
.sd-pad { flex-wrap: wrap; }
.sd-pad .choice { width: 3.4rem; }

.games-sub-title { margin: 1.4rem 0 0.5rem; font-size: 1.15rem; }

/* ---- hub (/games): big kid-friendly buttons ---- */
.kid { text-align: center; }
.kid-title { font-size: 2.6rem; margin: 1rem 0 0.6rem; }
.kid-back { display: inline-block; margin-bottom: 0.6rem; font-size: 1.1rem; font-weight: 700; }
.kid-big { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.2rem; margin: 1.5rem 0; }
.kid-giant { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; min-height: 220px; border-radius: 28px; background: var(--c); color: #fff; font-size: 2rem; font-weight: 900; text-decoration: none; box-shadow: 0 6px 0 rgba(0,0,0,.25); transition: transform .12s; }
.kid-giant > span[aria-hidden] { font-size: 5.5rem; line-height: 1; }
.kid-giant small { font-size: 1rem; font-weight: 600; opacity: .85; }
.kid-giant:hover { transform: translateY(-4px); text-decoration: none; }
@media (max-width: 480px) { .kid-big > :last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 160px; } }
/* six doors in one row on a wide screen (Muziek is the sixth): a little smaller so the longest word (Bordspellen) still fits */
@media (min-width: 760px) {
    .kid-big.six { grid-template-columns: repeat(6, 1fr); gap: 0.8rem; }
    .kid-big.six .kid-giant { min-height: 190px; border-radius: 24px; font-size: 1.2rem; padding: 0 0.2rem; }
    .kid-big.six .kid-giant > span[aria-hidden] { font-size: 4.4rem; }
}
.kid-h { margin: 1.6rem 0 0.6rem; text-align: left; }
.kid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.9rem; }
.kid-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; padding: 1rem 0.5rem; min-height: 130px; border: 3px solid var(--accent); border-radius: 22px; background: var(--bg-elevated); color: var(--text); text-decoration: none; font-weight: 800; }
.kid-btn:hover { background: var(--accent-soft); text-decoration: none; transform: translateY(-3px); }
.kid-emoji { font-size: 3.6rem; line-height: 1; }
.kid-name { font-size: 1rem; line-height: 1.15; }
.kid-nl { font-size: 0.8rem; font-weight: 600; line-height: 1.15; color: var(--text-muted, #646464); }
.kid-btn { position: relative; }
.kid-new { position: absolute; top: 8px; right: 8px; padding: 1px 8px; border-radius: 999px; background: #ffd23f; color: #3a2d00; font-size: 0.68rem; font-weight: 900; }
.hub-foot { margin-top: 2.5rem; }

/* ---- Dierenredders · Animal Rangers (touch-first: every control is at least 48px) ---- */
.rg { --rg-radius: 18px; }
.rg button:focus-visible, .rg summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rg .bi { display: block; }
.rg .bi-main { display: block; font-weight: 650; }
.rg .bi-sub { display: block; font-size: 0.82em; color: var(--text-muted); font-weight: 450; }
.rg-card { padding: 1rem; border: 1px solid var(--border); border-radius: var(--rg-radius); background: var(--bg-elevated); }
.rg-lead { font-size: 1.1rem; margin-top: 0; }
.rg-h { margin: 1.1rem 0 0.5rem; font-size: 1.15rem; }
.rg-note { color: var(--text-muted); font-size: 0.92rem; margin: 0.4rem 0; }
.rg-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.5rem 0; }
.rg-actions { margin-top: 1.2rem; }
.rg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.4rem 0 0.8rem; }
.rg-chip { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 48px; padding: 0 0.9rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elevated); font-weight: 650; }

.rg-hero, .rg-pill, .rg-toggle, .rg-small, .rg-big, .rg-tool, .rg-world, .rg-level, .rg-choice, .rg-spot { font: inherit; color: var(--text); cursor: pointer; }
.rg-hero { display: flex; align-items: center; gap: 0.6rem; min-height: 72px; padding: 0.4rem 1.4rem; border: 3px solid var(--border); border-radius: var(--rg-radius); background: var(--bg-elevated); font-size: 1.3rem; font-weight: 800; }
.rg-hero.on, .rg-pill.on, .rg-toggle.on, .rg-tool.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.rg-hero-face { font-size: 2.6rem; line-height: 1; }
.rg-pill { min-height: 56px; min-width: 64px; padding: 0 1rem; border: 3px solid var(--border); border-radius: 999px; background: var(--bg-elevated); font-weight: 750; font-size: 1.05rem; }
.rg-toggle { min-height: 52px; padding: 0 1rem; border: 2px solid var(--border); border-radius: 12px; background: var(--bg-elevated); font-weight: 650; }
.rg-small { min-height: 48px; min-width: 48px; padding: 0 0.9rem; border: 2px solid var(--border); border-radius: 12px; background: var(--bg-elevated); font-weight: 650; }
.rg-help { font-size: 1.4rem; font-weight: 900; border-radius: 50%; }
.rg-big { min-height: 60px; padding: 0.4rem 1.4rem; border: none; border-radius: 16px; background: var(--accent); color: #fff; font-size: 1.1rem; font-weight: 800; box-shadow: 0 4px 0 rgba(0,0,0,.22); }
.rg-big.alt { background: var(--bg-elevated); color: var(--text); border: 2px solid var(--accent); box-shadow: none; }
.rg-big:active { transform: translateY(2px); }
.rg-grownups { margin-top: 1.2rem; padding: 0.5rem 0.8rem; border: 1px dashed var(--border); border-radius: 12px; }
.rg-grownups summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; color: var(--text-muted); }

.rg-worlds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.8rem; }
.rg-world { position: relative; display: flex; flex-direction: column; gap: 0.2rem; min-height: 150px; padding: 0.9rem; text-align: left; border: 3px solid transparent; border-radius: var(--rg-radius); color: #fff;
            background: linear-gradient(145deg, hsl(var(--h) 60% 38%), hsl(calc(var(--h) + 30) 55% 24%)); }
.rg-world.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rg-world:disabled { filter: grayscale(.7) brightness(.8); cursor: not-allowed; }
.rg-world-emoji { font-size: 2.6rem; line-height: 1; }
.rg-world-name { font-weight: 850; font-size: 1.05rem; }
.rg-world-sub { font-size: 0.85rem; opacity: .95; }
.rg-world-sub .bi-sub { color: rgba(255,255,255,.8); }
.rg-world-tool { margin-top: auto; font-size: 0.85rem; font-weight: 650; }
.rg-done { position: absolute; top: 8px; right: 10px; padding: 1px 8px; border-radius: 999px; background: rgba(0,0,0,.4); font-size: 0.8rem; font-weight: 700; }
.rg-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.7rem; }
.rg-level { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; min-height: 132px; padding: 0.7rem; border: 3px solid var(--border); border-radius: var(--rg-radius); background: var(--bg-elevated); text-align: center; }
.rg-level.boss { border-color: #e0a526; background: linear-gradient(var(--bg-elevated), var(--soft-warning)); }
.rg-level:disabled { opacity: .5; cursor: not-allowed; }
.rg-level-emoji { font-size: 2.8rem; line-height: 1; }
.rg-level-name { font-weight: 700; font-size: 0.95rem; }
.rg-level-stars { font-size: 1.1rem; letter-spacing: 2px; }

.rg-trust { display: flex; align-items: center; gap: 0.5rem; flex: 1 1 260px; min-height: 48px; padding: 0 0.8rem; border: 2px solid var(--border); border-radius: 12px; background: var(--bg-elevated); }
.rg-trust-mood { font-size: 1.6rem; }
.rg-trust-label { font-size: 0.82rem; font-weight: 650; white-space: nowrap; }
.rg-trust-bar { flex: 1; height: 14px; border-radius: 999px; background: var(--border); overflow: hidden; }
.rg-trust-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #e57373, #ffd54f 45%, #66bb6a); background-size: 220px 100%; transition: width .35s; }
.rg-trust-num { font-weight: 800; min-width: 3ch; text-align: right; }
.rg-tip { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.8rem; padding: 0.6rem 0.9rem; border: 2px solid #e0a526; border-radius: var(--rg-radius); background: var(--soft-warning); color: var(--soft-warning-text); }
.rg-tip-who { font-size: 2rem; }
.rg-tip-text { flex: 1 1 220px; font-weight: 600; }

.rg-play { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (min-width: 900px) { .rg-play { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.rg-stage { padding: 0.8rem; border: 1px solid var(--border); border-radius: var(--rg-radius); background: linear-gradient(var(--accent-soft), var(--bg-elevated)); }
.rg-steps { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.4rem; }
.rg-step { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); font-size: 0.78rem; color: var(--text-muted); }
.rg-step.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.rg-step.done { background: var(--soft-success); color: var(--soft-success-text); border-color: transparent; }
.rg-art { position: relative; max-width: 560px; margin: 0 auto; }
.rg-art .rg-animal { width: 100%; height: auto; display: block; }
.rg-ranger { position: absolute; left: 2px; bottom: 6px; font-size: 2.6rem; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.rg-hearts { position: absolute; top: 4px; left: 40%; font-size: 1.3rem; animation: rg-float 2.4s ease-in-out infinite; }
.rg-file { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 0.6rem; padding: 0.6rem 0.8rem; border: 1px dashed var(--border); border-radius: 12px; background: var(--bg-elevated); font-size: 0.92rem; }
.rg-spot { position: absolute; width: 56px; height: 56px; transform: translate(-50%, -50%); border-radius: 50%; border: 3px dashed var(--accent); background: rgba(255,255,255,.35); display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: rg-pulse 1.8s ease-in-out infinite; }
.rg-spot.wrong { border-style: solid; border-color: #c0392b; background: rgba(192,57,43,.25); animation: none; }
.rg-spot.wrong::after { content: "✖"; position: absolute; top: 12px; font-size: 1.4rem; color: #c0392b; }
.rg-spot.right { border-style: solid; border-color: #2e8b57; background: rgba(46,139,87,.3); animation: none; }
.rg-spot.right::after { content: "✔"; position: absolute; top: 12px; font-size: 1.5rem; color: #1f6d41; }
.rg-spot-label { position: absolute; top: 100%; margin-top: 2px; padding: 0 6px; border-radius: 8px; background: var(--bg-elevated); color: var(--text); font-size: 0.72rem; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.25); }

.rg-panel { padding: 0.9rem; border: 1px solid var(--border); border-radius: var(--rg-radius); background: var(--bg-elevated); }
.rg-story { padding: 0.6rem 0.8rem; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 6px; }
.rg-q { font-size: 1.1rem; margin: 0.2rem 0 0.8rem; }
.rg-choices { display: grid; gap: 0.6rem; }
.rg-choice { display: flex; align-items: center; gap: 0.6rem; min-height: 64px; padding: 0.5rem 0.9rem; text-align: left; border: 3px solid var(--border); border-radius: 14px; background: var(--bg); }
.rg-choice:hover:not(:disabled) { border-color: var(--accent); }
.rg-choice.right { border-color: #2e8b57; background: var(--soft-success); }
.rg-choice.wrong { border-color: #c0392b; background: var(--soft-error); text-decoration: line-through; }
.rg-choice.dim { opacity: .55; }
.rg-choice:disabled { cursor: default; }
.rg-mark { flex: 0 0 1.4rem; font-weight: 900; font-size: 1.2rem; }
.rg-choice.right .rg-mark { color: #1f6d41; } .rg-choice.wrong .rg-mark { color: #b0281c; }
.rg-feedback { min-height: 1.5rem; margin: 0.7rem 0; display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 600; }
.rg-feedback.good { color: var(--soft-success-text); } .rg-feedback.bad { color: var(--soft-error-text); } .rg-feedback.hint { color: var(--soft-warning-text); }
.rg-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0; }
.rg-tool { min-height: 56px; padding: 0 0.9rem; border: 3px solid var(--border); border-radius: 14px; background: var(--bg); font-weight: 650; display: inline-flex; align-items: center; gap: 0.4rem; text-align: left; }

.rg-won { text-align: center; }
.rg-won-stars { font-size: 2.6rem; letter-spacing: 6px; animation: rg-pop .6s ease-out; }
.rg-won-card { max-width: 440px; margin: 0.8rem auto; text-align: left; }
.rg-reward { padding: 0.6rem 0.8rem; border: 2px solid #e0a526; border-radius: 12px; background: var(--soft-warning); color: var(--soft-warning-text); text-align: left; }
.rg-clues { display: grid; gap: 0.6rem; margin: 0.6rem 0; }
.rg-clues-case { max-height: 260px; overflow-y: auto; }
.rg-clue { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); text-align: left; }
.rg-clue p { margin: 0.2rem 0; font-size: 0.92rem; }
.rg-clue-emoji { font-size: 2rem; line-height: 1; }
.rg-clue-means { color: var(--text-muted); }

.rg-book { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.9rem; }
.rg-acard { padding: 0.7rem; border: 3px solid hsl(var(--h) 50% 55%); border-radius: var(--rg-radius); background: linear-gradient(hsl(var(--h) 60% 94% / .55), var(--bg-elevated)); }
.rg-acard.locked { border-color: var(--border); background: var(--bg-elevated); }
.rg-acard h3 { margin: 0.3rem 0; }
.rg-acard-art { max-width: 220px; margin: 0 auto; }
.rg-acard-art svg { width: 100%; height: auto; display: block; }
.rg-acard-row { margin: 0.2rem 0; font-size: 0.88rem; } .rg-acard-row b { display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.rg-acard-fact { margin: 0.4rem 0 0; padding: 0.4rem 0.6rem; border-radius: 10px; background: var(--soft-info); color: var(--text); font-size: 0.88rem; }
.rg-silhouette { filter: brightness(0) opacity(.28); }
.rg-silhouette .rg-body, .rg-silhouette .rg-tail, .rg-silhouette .rg-ear, .rg-silhouette .rg-lid { animation: none; }

/* gentle life: breathing, tail wag, ear flick, blinking (CSS only) */
.rg-animal .rg-body { transform-box: fill-box; transform-origin: 50% 100%; animation: rg-breathe 3.2s ease-in-out infinite; }
.rg-animal .rg-tail { transform-box: fill-box; transform-origin: 100% 50%; animation: rg-wag 1.7s ease-in-out infinite; }
.rg-animal .rg-ear { transform-box: fill-box; transform-origin: 50% 100%; animation: rg-flick 6s ease-in-out infinite; }
.rg-animal .rg-lid { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); animation: rg-blink 4.6s infinite; }
.rg-stage.scared .rg-animal { animation: rg-shiver .22s linear infinite alternate; }
.rg-stage.scared .rg-animal .rg-tail { animation-duration: .35s; }
@keyframes rg-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, 1.03); } }
@keyframes rg-wag { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(9deg); } }
@keyframes rg-flick { 0%, 90%, 100% { transform: rotate(0); } 94% { transform: rotate(-8deg); } 97% { transform: rotate(4deg); } }
@keyframes rg-blink { 0%, 92%, 100% { transform: scaleY(0); } 95% { transform: scaleY(1); } }
@keyframes rg-shiver { from { transform: translateX(-1.5px); } to { transform: translateX(1.5px); } }
@keyframes rg-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47,127,193,.45); } 50% { box-shadow: 0 0 0 10px rgba(47,127,193,0); } }
@keyframes rg-float { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-8px); opacity: 1; } }
@keyframes rg-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rg *, .rg-animal * { animation: none !important; transition: none !important; } }
@media (max-width: 520px) { .rg-trust-label { display: none; } }

@media (max-width: 899px) { .rg-art { max-width: 400px; } }

/* ---- Dierenredders: the walkable 3D farm and the card pop-up ---- */
.rg-world3d { width: 100%; aspect-ratio: 16 / 10; min-height: 340px; max-height: 74vh; border-radius: var(--rg-radius); border: 2px solid var(--border); overflow: hidden; background: #9fd3f2; }
.rg-cardpop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(8, 12, 24, .72); overflow-y: auto; }
.rg-cardpop-inner { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; width: min(380px, 100%); max-height: 100%; }
.rg-cardpop-title { color: #fff; font-weight: 900; font-size: 1.35rem; text-align: center; text-shadow: 0 2px 6px rgba(0,0,0,.5); animation: rg-pop .6s ease-out; }
.rg-flip { width: 100%; perspective: 1100px; }
.rg-flip-card { position: relative; width: 100%; transform-style: preserve-3d; animation: rg-flip 1s .25s ease-out both; }
.rg-flip-front { backface-visibility: hidden; transform: rotateY(180deg); background: var(--bg-elevated); border-radius: var(--rg-radius); }
.rg-flip-back { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 6rem; border-radius: var(--rg-radius); backface-visibility: hidden;
                background: repeating-linear-gradient(45deg, #2f7fc1, #2f7fc1 14px, #3b91d6 14px, #3b91d6 28px); border: 4px solid #fff; }
.rg-flip-card .rg-acard { box-shadow: 0 10px 30px rgba(0,0,0,.45); }
@keyframes rg-flip { from { transform: rotateY(0deg) scale(.85); } to { transform: rotateY(180deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .rg-flip-card { animation: none; transform: rotateY(180deg); } .rg-cardpop-title { animation: none; } }
@media (max-width: 899px) { .rg-world3d { aspect-ratio: 4 / 5; max-height: 70vh; } }

.rg-world3d.theater-on .rg-guide { right: 190px !important; }
/* the card inside the 3D world is compact so the button stays in view */
.rg-world3d .rg-acard { padding: 0.45rem 0.6rem; }
.rg-world3d .rg-acard h3 { margin: 0.1rem 0; font-size: 1.05rem; }
.rg-world3d .rg-acard-art { max-width: 130px; }
.rg-world3d .rg-acard-row { margin: 0.1rem 0; font-size: 0.76rem; }
.rg-world3d .rg-acard-row b { display: inline; margin-right: 0.3rem; }
.rg-world3d .rg-acard-fact { margin-top: 0.25rem; padding: 0.25rem 0.45rem; font-size: 0.76rem; }
.rg-world3d .rg-flip-back { font-size: 4rem; }

/* ---- Mendeleev Master: periodic table ---- */
.pt-wrap { overflow-x: auto; margin: 0.6rem 0; padding-bottom: 0.3rem; }
.pt { display: grid; grid-template-columns: repeat(18, minmax(34px, 1fr)); grid-template-rows: repeat(7, auto) 0.6rem repeat(2, auto); gap: 2px; min-width: 700px; max-width: 980px; margin: 0 auto; }
.pt-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; line-height: 1; font: inherit; color: var(--text);
  border: 1px solid hsl(var(--h, 0) 55% 45% / 0.65); border-radius: 5px; background: hsl(var(--h, 0) 75% 55% / 0.26); }
.pt-cell b { font-size: 0.95rem; }
.pt-cell small { font-size: 0.58rem; opacity: 0.75; }
.pt-cell.tap { cursor: pointer; }
.pt-cell.tap:hover { outline: 3px solid var(--accent); outline-offset: -1px; }
.pt-neutral { --h: 210; background: var(--bg-elevated); border-color: var(--border); }
.pt-target { outline: 3px solid var(--accent); outline-offset: -1px; animation: ptpulse 1s ease-in-out infinite; }
.pt-right { outline: 3px solid #2e9e4f; outline-offset: -1px; background: rgba(46, 158, 79, 0.45); animation: ptpulse 0.8s ease-in-out infinite; }
.pt-wrong { outline: 3px solid #d64545; outline-offset: -1px; background: rgba(214, 69, 69, 0.4); }
.pt-ph { grid-row-end: span 1; display: flex; align-items: center; justify-content: center; font-size: 0.55rem; color: var(--text-muted); border: 1px dashed var(--border); border-radius: 5px; }
@keyframes ptpulse { 50% { transform: scale(1.12); } }
.pt-legend { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; margin: 0.4rem 0; }
.pt-chip { padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: var(--text); border: 1px solid hsl(var(--h, 0) 55% 45% / 0.65); background: hsl(var(--h, 0) 75% 55% / 0.26); }
.fam-alkali { --h: 5; } .fam-earth { --h: 30; } .fam-transition { --h: 52; } .fam-post { --h: 135; } .fam-metalloid { --h: 170; }
.fam-nonmetal { --h: 205; } .fam-halogen { --h: 255; } .fam-noble { --h: 295; } .fam-lanthanide { --h: 330; } .fam-actinide { --h: 350; }

/* ---- Word Guess ---- */
.wg { outline: none; max-width: 460px; margin-left: auto; margin-right: auto; }
.wg-board { display: grid; gap: 6px; margin: 0.4rem auto 0.6rem; max-width: 340px; }
.wg-row { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; }
.wg-tile { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; font-weight: 800; border: 2px solid var(--border); border-radius: 8px; background: var(--bg-elevated); text-transform: uppercase; }
.wg-tile.typed { border-color: var(--accent); transform: scale(1.04); }
.wg-tile.s0 { background: #8e949b; border-color: #8e949b; color: #fff; }
.wg-tile.s1 { background: #e0a82e; border-color: #e0a82e; color: #fff; }
.wg-tile.s2 { background: #3aa655; border-color: #3aa655; color: #fff; }
.wg-tile.flip { animation: wgflip 0.5s both; }
@keyframes wgflip { 0% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.wg-msg { min-height: 1.5rem; text-align: center; font-weight: 600; color: var(--text-muted); }
.wg-keys { display: grid; gap: 6px; margin-top: 0.4rem; }
.wg-keyrow { display: flex; justify-content: center; gap: 4px; }
.wg-key { flex: 1 1 0; max-width: 44px; min-width: 0; padding: 0.7rem 0; font: inherit; font-weight: 700; font-size: 0.95rem; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-elevated); color: var(--text); cursor: pointer; }
.wg-key.wide { max-width: 64px; flex: 1.5 1 0; font-size: 0.8rem; }
.wg-key.s0 { background: #8e949b; color: #fff; border-color: #8e949b; }
.wg-key.s1 { background: #e0a82e; color: #fff; border-color: #e0a82e; }
.wg-key.s2 { background: #3aa655; color: #fff; border-color: #3aa655; }

/* ---- Merge Pets ---- */
.mp { outline: none; max-width: 460px; margin-left: auto; margin-right: auto; text-align: center; }
.mp-board { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 8px; padding: 8px; margin: 0.5rem auto; max-width: 420px; background: var(--border); border-radius: 14px; touch-action: none; user-select: none; -webkit-user-select: none; }
.mp-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255, 255, 255, 0.35); line-height: 1; }
.mp-animal { font-size: clamp(1.6rem, 9vw, 2.6rem); }
.mp-cell small { font-size: 0.65rem; font-weight: 700; opacity: 0.7; }
.mp-cell.pop { animation: mppop 0.2s ease-out; }
@keyframes mppop { 0% { transform: scale(0.6); } 100% { transform: scale(1); } }
.mp-cell.t1 { background: hsl(100 60% 85%); } .mp-cell.t2 { background: hsl(120 55% 80%); } .mp-cell.t3 { background: hsl(50 90% 80%); }
.mp-cell.t4 { background: hsl(0 80% 85%); } .mp-cell.t5 { background: hsl(150 60% 78%); } .mp-cell.t6 { background: hsl(330 70% 85%); }
.mp-cell.t7 { background: hsl(25 90% 80%); } .mp-cell.t8 { background: hsl(210 15% 82%); } .mp-cell.t9 { background: hsl(40 95% 70%); }
.mp-cell.t10 { background: hsl(30 95% 65%); } .mp-cell.t11 { background: hsl(280 70% 82%); } .mp-cell.t12 { background: hsl(10 85% 65%); }
.mp-pad { display: grid; gap: 4px; justify-items: center; margin: 0.4rem 0; }

/* ---- Garden Sweep ---- */
.gs { max-width: 480px; margin-left: auto; margin-right: auto; }
.gs-mode { display: flex; gap: 0.4rem; justify-content: center; margin: 0.3rem 0 0.6rem; }
.gs-board { display: grid; grid-template-columns: repeat(var(--w), 1fr); gap: 3px; margin: 0 auto; max-width: 440px; user-select: none; -webkit-user-select: none; }
.gs-cell { aspect-ratio: 1; padding: 0; display: flex; align-items: center; justify-content: center; font: inherit; font-weight: 800; font-size: clamp(0.9rem, 4.5vw, 1.4rem); border: none; border-radius: 6px; cursor: pointer; }
.gs-cell.grass { background: #5fbf5a; box-shadow: inset 0 -3px 0 #3d9a3a; }
.gs-cell.grass:hover { background: #74d06e; }
.gs-cell.flag { background: #5fbf5a; box-shadow: inset 0 -3px 0 #3d9a3a; }
.gs-cell.wrong { background: #e57373; }
.gs-cell.open { background: #efe2c3; color: #333; cursor: default; }
.gs-cell.boom { background: #ffd54f; }
.gs-cell.n1 { color: #1e6fd0; } .gs-cell.n2 { color: #2e8b3a; } .gs-cell.n3 { color: #d33; } .gs-cell.n4 { color: #6a2cb5; }
.gs-cell.n5 { color: #b35c00; } .gs-cell.n6 { color: #008b8b; } .gs-cell.n7 { color: #222; } .gs-cell.n8 { color: #666; }

/* ---- Fun batch 2 ---- */
.fun-pad { display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; margin: 0.4rem auto; max-width: 480px; }
.fun-btn { font-size: 1.4rem; min-width: 3.4rem; touch-action: manipulation; user-select: none; -webkit-user-select: none; }

/* Cupcake Factory */
.cf { max-width: 560px; margin-left: auto; margin-right: auto; }
.cf-main { text-align: center; }
.cf-count { font-size: 2.4rem; font-weight: 800; }
.cf-rate { color: var(--text-muted); margin-bottom: 0.3rem; }
.cf-bake { position: relative; display: flex; justify-content: center; padding: 0.6rem 0; min-height: 190px; }
.cf-cake { border: none; background: radial-gradient(circle at 50% 40%, var(--accent-soft), transparent 70%); border-radius: 50%; width: 170px; height: 170px; cursor: pointer; font-size: 5.5rem; line-height: 1; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.cf-pop { display: inline-block; }
.cf-pop.a { animation: cfpop1 0.15s ease-out; } .cf-pop.b { animation: cfpop2 0.15s ease-out; }
@keyframes cfpop1 { 0% { transform: scale(0.85); } 100% { transform: scale(1); } }
@keyframes cfpop2 { 0% { transform: scale(0.85); } 100% { transform: scale(1); } }
.cf-golden { position: absolute; font-size: 2.6rem; border: none; background: none; cursor: pointer; animation: cfgold 0.8s ease-in-out infinite alternate; }
@keyframes cfgold { from { transform: scale(0.9) rotate(-8deg); } to { transform: scale(1.15) rotate(8deg); } }
.cf-shop { display: grid; gap: 0.4rem; margin: 0.8rem 0; }
.cf-item { display: grid; grid-template-columns: 2.4rem 1fr auto; align-items: center; gap: 0.6rem; padding: 0.55rem 0.8rem; border: 2px solid var(--border); border-radius: 14px; background: var(--bg-elevated); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cf-item:not([disabled]):hover { border-color: var(--accent); }
.cf-item[disabled] { opacity: 0.5; cursor: default; }
.cf-ico { font-size: 1.7rem; text-align: center; }
.cf-txt { display: grid; } .cf-txt small { color: var(--text-muted); }
.cf-cost { font-weight: 800; color: var(--accent); }

/* Honey Words */
.hw { outline: none; max-width: 480px; margin-left: auto; margin-right: auto; text-align: center; }
.hw-rank { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 0.3rem; }
.hw-word { min-height: 2.6rem; font-size: 2rem; font-weight: 800; letter-spacing: 0.12em; margin-top: 0.5rem; }
.hw-word .mid { color: #e0a82e; }
.hw-caret { opacity: 0.4; animation: hwblink 1s steps(2) infinite; }
@keyframes hwblink { 50% { opacity: 0; } }
.hw-msg { min-height: 1.4rem; font-weight: 700; }
.hw-msg.good { color: #2e8b3a; } .hw-msg.bad { color: #d64545; }
.hw-hex { position: relative; width: 250px; height: 250px; margin: 0.4rem auto 0.8rem; }
.hw-cell { position: absolute; left: 50%; top: 50%; width: 70px; height: 62px; margin: -31px 0 0 -35px; border: none; font: inherit; font-size: 1.6rem; font-weight: 800; color: #333; background: #efe2c3; cursor: pointer; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); transform: rotate(var(--a, 0deg)) translateY(-78px) rotate(calc(-1 * var(--a, 0deg))); user-select: none; -webkit-user-select: none; }
.hw-cell:hover { background: #f5dba0; }
.hw-cell.center { background: #f5c542; transform: none; }
.hw-actions { display: flex; gap: 0.4rem; justify-content: center; margin-bottom: 0.6rem; }
.hw-hints { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; margin-bottom: 0.5rem; }
.hw-chip { font-size: 0.8rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--accent-soft); }
.hw-found { text-align: left; margin: 0.5rem 0; }
.hw-w { display: inline-block; margin: 0.15rem 0.3rem 0.15rem 0; padding: 0.1rem 0.5rem; border-radius: 8px; background: var(--bg-elevated); border: 1px solid var(--border); }
.hw-w.queen { background: #f5c542; color: #333; font-weight: 800; }

/* ---- hub language: all three texts are in the page, the chosen one is shown ---- */
.l-nl, .l-en, .l-fr { display: none; }
html[data-gl="nl"] .l-nl, html[data-gl="en"] .l-en, html[data-gl="fr"] .l-fr { display: inline; }
html:not([data-gl]) .l-en { display: inline; }
.gl-switch { display: flex; justify-content: flex-end; gap: 0; margin-top: 0.5rem; }
.gl-btn { padding: 0.3rem 0.9rem; font: inherit; font-weight: 700; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); cursor: pointer; }
.gl-btn:first-child { border-radius: 999px 0 0 999px; } .gl-btn:last-child { border-radius: 0 999px 999px 0; }
html[data-gl="nl"] .gl-nl, html[data-gl="en"] .gl-en, html[data-gl="fr"] .gl-fr { background: var(--accent); color: #fff; border-color: var(--accent); }
.kid-name { font-size: 1.12rem; font-weight: 800; }
.kid-giant { font-size: 1.6rem; font-weight: 800; }

/* ---- whole-site language: blocks of page text carry data-l, only the chosen language is shown ---- */
[data-l] { display: none; }
html[data-gl="nl"] [data-l="nl"], html[data-gl="en"] [data-l="en"], html[data-gl="fr"] [data-l="fr"] { display: contents; }
html:not([data-gl]) [data-l="en"] { display: contents; }
.site-header .header-inner { position: relative; padding-right: 8rem; max-width: 1240px; }   /* the same width as the footer and the wide pages (app.css) */
.lang-flags { display: flex; gap: 0.35rem; align-items: center; position: absolute; top: 1.05rem; right: 1rem; }
.flag-btn { padding: 0; width: 30px; height: 20px; border: 2px solid transparent; border-radius: 4px; background: none; cursor: pointer; opacity: .55; line-height: 0; overflow: hidden; }
.flag-btn svg { width: 100%; height: 100%; display: block; border-radius: 2px; }
.flag-btn:hover { opacity: 1; }
html[data-gl="nl"] .fl-nl, html[data-gl="en"] .fl-en, html[data-gl="fr"] .fl-fr { opacity: 1; border-color: var(--accent); }

/* ---- super sudoku (9x9) ---- */
.sudoku.n9 { grid-template-columns: repeat(9, 1fr); width: min(470px, 98%); }
.sudoku.n9 .sd-cell { font-size: 1.35rem; position: relative; }
.sd-cell.peer { background: color-mix(in srgb, var(--accent) 9%, var(--bg)); }
.sd-cell.given.peer { background: color-mix(in srgb, var(--accent) 16%, var(--accent-soft)); }
.sd-cell.same { background: color-mix(in srgb, var(--accent) 26%, var(--bg)); }
.sd-cell.wrong { outline: 3px solid #d33; outline-offset: -3px; }
.sd-notes { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; height: 100%; font-size: .58rem; line-height: 1; font-weight: 600; color: var(--text-muted); align-items: center; justify-items: center; padding: 2px; box-sizing: border-box; }
.sd-pad .choice small { display: block; font-size: .6rem; font-weight: 400; opacity: .7; min-height: .8em; }
.sd-pad .choice { width: 2.9rem; padding: .35rem 0; }
.sd-tools { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: .6rem; }
.sd-tools .btn.on { background: var(--accent); color: #fff; }
@media (max-width: 480px) { .sudoku.n9 .sd-cell { font-size: 1.1rem; } .sd-pad .choice { width: 2.4rem; } }

/* ---- game search ---- */
.gs-form { display: flex; gap: .4rem; max-width: 26rem; margin: .8rem auto; }
.gs-form input { flex: 1; min-width: 0; padding: .55rem .9rem; border: 2px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; }
.gs-form input:focus { outline: none; border-color: var(--accent); }
.gs-form button { border: 2px solid var(--border); background: var(--bg-elevated); border-radius: 999px; padding: 0 .9rem; cursor: pointer; font-size: 1rem; }
.gs-compact { margin: 0; max-width: 15rem; }
.gs-compact input { padding: .3rem .7rem; font-size: .9rem; }
.gs-compact button { padding: 0 .6rem; }
.game-header { flex-wrap: wrap; gap: .5rem; }

/* Body lab / Body study: our own schematic body */
.body-map { display: block; margin: 0 auto; max-width: 100%; }
.body-map .bm-body { fill: #f3d2b5; stroke: #c89a76; stroke-width: 3; }
.body-map .bm-limb { stroke: #f3d2b5; stroke-linecap: round; fill: none; }
.body-map .bm-hot { fill: #ef476f; fill-opacity: .75; stroke: #fff; stroke-width: 3; }
.body-map .bm-spot { fill: #7a8cff; fill-opacity: .35; stroke: #4b5bd6; stroke-width: 1.5; }
.body-map .bm-spot.bm-hot { fill: #ef476f; fill-opacity: .8; stroke: #fff; stroke-width: 3; }
.body-study { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: center; margin-top: 1rem; }
.body-study .body-card { flex: 1 1 260px; min-width: 240px; }
.bc-list { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.bc-latin { font-style: italic; opacity: .8; margin: -.5rem 0 .5rem; }
.body-map .bm-heart { fill: #f2a3a3; stroke: #c25b5b; stroke-width: 3; }
.body-map .bm-vessel { stroke: #d96b6b; stroke-linecap: round; fill: none; }
.body-map .bm-line { stroke: #b04a4a; stroke-width: 2.5; opacity: .55; }
.body-map .bm-white { fill: #fdfdfd; stroke: #9aa4b2; stroke-width: 3; }
.body-map .bm-iris { fill: #4f8fd6; stroke: #2d5f9c; stroke-width: 2; }
.body-map .bm-lens { fill: #cfe8ff; stroke: #6aa0d6; stroke-width: 2; }
.body-map .bm-retina { fill: none; stroke: #e58f3b; stroke-width: 7; stroke-linecap: round; }
.body-map .bm-brain, .body-map .bm-brain2 { fill: #f4b3c4; stroke: #c06b86; stroke-width: 3; }
.body-map .bm-brainstem { stroke: #e79bb0; stroke-linecap: round; fill: none; }
table.sheet { width: 100%; border-collapse: collapse; font-size: .85rem; margin-bottom: 1.5rem; }
table.sheet th, table.sheet td { border: 1px solid #c9ced6; padding: .3rem .45rem; vertical-align: top; text-align: left; }
table.sheet th { background: #eef1f5; }

/* the mascot */
.mascot { display: block; margin: 0 auto; overflow: visible; }
.mascot-happy { animation: mascot-bob 3.2s ease-in-out infinite; }
.mascot-cheer { animation: mascot-hop .75s ease-in-out infinite; }
.mascot-oops { animation: mascot-shake .5s ease-in-out infinite; }
.mascot-think { animation: mascot-tilt 3.6s ease-in-out infinite; transform-origin: 50% 90%; }
.mascot .m-sparkle { animation: mascot-twinkle 1s ease-in-out infinite; transform-origin: center; }
.mascot .m-drop { animation: mascot-drip 1.2s ease-in infinite; }
@keyframes mascot-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes mascot-hop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-14px); } }
@keyframes mascot-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
@keyframes mascot-tilt { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes mascot-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes mascot-drip { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mascot, .mascot .m-sparkle, .mascot .m-drop { animation: none; } }
.kid-hero { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.kid-hero .kid-title { margin: 0; }
.mascot-fb { text-align: center; margin: .25rem 0 0; min-height: 64px; }
.kid-crew { display: flex; justify-content: center; align-items: flex-end; gap: .4rem; flex-wrap: wrap; }
.kid-crew .mascot:nth-child(2) { animation-delay: -.8s; } .kid-crew .mascot:nth-child(3) { animation-delay: -1.6s; } .kid-crew .mascot:nth-child(4) { animation-delay: -2.4s; } .kid-crew .mascot:nth-child(5) { animation-delay: -3.2s; }
.kid-crew .mascot { margin: 0; transition: transform .2s; } .kid-crew .mascot:hover { transform: translateY(-8px) scale(1.06); }
.game-titlebar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.buddy { flex: none; height: 64px; min-width: 48px; }
.buddy > span { display: none; }
.buddy[data-mood=happy] > .buddy-happy, .buddy[data-mood=cheer] > .buddy-cheer, .buddy[data-mood=think] > .buddy-think, .buddy[data-mood=oops] > .buddy-oops { display: block; }
.buddy .mascot { margin: 0; }

/* Electricity study page */
.elec-study { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; align-items: center; }
.elec-card { text-align: center; max-width: 34rem; }
.elec-symbol-box { background: #fff; border: 2px solid #3a2a2a22; border-radius: 14px; padding: .6rem 1.2rem; display: inline-block; margin-bottom: .6rem; }
.elec-symbol { display: block; margin: 0 auto; }

/* ---- full chess (members) ---- */
.cac.cac-site { --c-panel: var(--bg-elevated); --c-panel-2: var(--bg); --c-text: var(--text); --c-muted: var(--text-muted); --c-line: var(--border); --c-accent: var(--accent); --c-accent-ink: #fff; --c-radius: var(--radius); }
.chess-room { width: min(1280px, calc(100vw - 3rem)); margin-left: 50%; transform: translateX(-50%); }
.chess-room-note { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin: 0.4rem 0; }
.cac.cac-site .app { padding-top: 4px; }
.cac.cac-site .topbar .brand { font-size: 1.1rem; }

/* ---- chess lobby (members) ---- */
.cm-tabs { display: flex; gap: 0.5rem; justify-content: center; margin: 0.6rem 0 0.8rem; flex-wrap: wrap; }
.cm-card { max-width: 720px; margin-left: auto; margin-right: auto; }
.cm-card h3 { margin: 1.1rem 0 0.4rem; }
.cm-row { margin: 0.5rem 0; }
.cm-row label { display: flex; flex-direction: column; gap: 0.25rem; max-width: 20rem; font-weight: 600; }
.cm-check { display: flex; gap: 0.5rem; align-items: center; margin: 0.4rem 0; }
.cm-list { list-style: none; padding: 0; margin: 0.3rem 0; }
.cm-list li { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 0.45rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cm-turn { color: var(--accent); font-weight: 700; margin-left: 0.5rem; }
.cm-code { font-size: 2.2rem; font-weight: 800; letter-spacing: 0.25em; text-align: center; margin: 0.4rem 0; font-variant-numeric: tabular-nums; }
.cm-invite { background: var(--soft-success, rgba(60, 160, 90, 0.12)); border-radius: var(--radius); padding: 0.6rem 0.8rem; display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }

/* ---- GameRoom table games (Four in a Row, Hearts) ---- */
.rm-table { max-width: 860px; margin: 0 auto; }
.rm-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.rm-seats { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: .3rem 0 .8rem; }
.rm-seat { padding: .25rem .7rem; border: 1px solid var(--border); border-radius: 999px; font-size: .9rem; }
.rm-seat.me { border-color: var(--accent); font-weight: 600; }
.rm-seat.turn { background: var(--accent); color: #fff; }
.rm-seat.empty { opacity: .55; border-style: dashed; }
.rm-status { font-size: 1.1rem; margin: .4rem 0; }
.rm-status.mine { font-weight: 700; color: var(--accent); }
.rm-over { text-align: center; margin-top: 1rem; }
.rm-four { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 10px; background: #1d4ed8; border-radius: 14px; max-width: 460px; margin: 0 auto; }
.rm-drop { border: 0; background: transparent; color: #fff; font-size: 1.1rem; cursor: pointer; padding: 0 0 2px; }
.rm-drop:disabled { opacity: .25; cursor: default; }
.rm-cell { aspect-ratio: 1; border-radius: 50%; background: #f1f5f9; }
.rm-cell.p1 { background: #dc2626; }
.rm-cell.p2 { background: #facc15; }
.rm-cell.open { cursor: pointer; }
.rm-cell.open:hover { background: #dbe4ee; }
/* the newest disc is a ::before that falls from above the board, so the cell itself stays an empty hole until it lands */
.rm-cell.fall { position: relative; z-index: 2; }
.rm-cell.fall.p1, .rm-cell.fall.p2 { background: #f1f5f9; }
.rm-cell.fall::before { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 3px #fff inset; animation: rm-fall calc(.25s + var(--rows) * .07s) cubic-bezier(.55, 0, 1, .6) both, rm-land .22s ease-out calc(.25s + var(--rows) * .07s); }
.rm-cell.fall.p1::before { background: #dc2626; }
.rm-cell.fall.p2::before { background: #facc15; }
.rm-cell.win { animation: rm-flash .7s ease-in-out infinite alternate; z-index: 1; }
.rm-cell.win.fall { animation-delay: .9s; z-index: 2; }
@keyframes rm-fall { from { transform: translateY(calc((var(--rows) + 1) * -1 * (100% + 6px))); } to { transform: translateY(0); } }
@keyframes rm-land { 0% { transform: translateY(0) scaleY(1); } 40% { transform: translateY(0) scaleY(.82); } 100% { transform: translateY(0) scaleY(1); } }
.rm-hearts { position: relative; display: grid; grid-template-columns: 1fr 1.4fr 1fr; grid-template-areas: ". top ." "left trick right" "scores scores scores"; gap: .6rem; align-items: center; }
.rm-opp { text-align: center; display: flex; flex-direction: column; gap: .1rem; padding: .4rem; border-radius: 10px; border: 1px solid transparent; }
.rm-opp.turn { border-color: var(--accent); }
.rm-opp.pos2 { grid-area: top; } .rm-opp.pos1 { grid-area: left; } .rm-opp.pos3 { grid-area: right; }
.rm-trick { grid-area: trick; display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: repeat(3, 4.8rem); grid-template-areas: ". t ." "l . r" ". b ."; justify-items: center; align-items: center; }
.rm-slot.pos2 { grid-area: t; } .rm-slot.pos1 { grid-area: l; } .rm-slot.pos3 { grid-area: r; } .rm-slot.pos0 { grid-area: b; }
.rm-scores { grid-area: scores; font-size: .9rem; }
.rm-scores table { border-collapse: collapse; } .rm-scores td, .rm-scores th { padding: .1rem .7rem; text-align: center; } .rm-scores th.me { color: var(--accent); }
.rm-hand { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 1rem 0 .4rem; }
.rm-card { min-width: 3.5rem; padding: .85rem .25rem; border: 1px solid var(--border); border-radius: 9px; background: #fff; font-size: 1.4rem; font-weight: 600; display: inline-block; text-align: center; }
.rm-card.red { color: #dc2626; } .rm-card.black { color: #0f172a; }
.rm-card.small { min-width: 0; padding: .1rem .4rem; font-size: 1.05rem; border-radius: 6px; }
button.rm-card { cursor: pointer; }
button.rm-card:disabled { opacity: .35; cursor: default; }
button.rm-card.picked { transform: translateY(-10px); border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
@media (max-width: 560px) { .rm-card { min-width: 2.7rem; padding: .65rem .15rem; font-size: 1.15rem; } .rm-card.small { font-size: .9rem; } .rm-trick { grid-template-rows: repeat(3, 4rem); } }
@keyframes rm-flash { from { transform: scale(1); box-shadow: 0 0 0 4px #16a34a, 0 0 8px #16a34a; filter: brightness(1); } to { transform: scale(1.18); box-shadow: 0 0 0 6px #fff, 0 0 28px 8px #16a34a; filter: brightness(1.5); } }
@keyframes rm-pop { 0% { transform: scale(.7); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.rm-result { text-align: center; font-size: 1.5rem; font-weight: 800; padding: .6rem 1rem; margin: .5rem auto; max-width: 460px; border-radius: 12px; animation: rm-pop .5s ease-out, rm-blink 1s ease-in-out .5s 6; }
.rm-result.won { background: #dcfce7; color: #166534; } .rm-result.lost { background: #fee2e2; color: #991b1b; } .rm-result.draw { background: #e2e8f0; color: #334155; }
@keyframes rm-blink { 50% { filter: brightness(1.25); transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .rm-cell.fall::before, .rm-cell.win, .rm-result { animation: none; } .rm-cell.win { box-shadow: 0 0 0 4px #16a34a; } }

/* ---- Draughts ---- */
.rm-draughts { display: grid; grid-template-columns: repeat(10, 1fr); max-width: 520px; margin: 0 auto; border: 6px solid #5b3a1f; border-radius: 6px; user-select: none; }
.rm-dsq { aspect-ratio: 1; position: relative; display: flex; align-items: center; justify-content: center; }
.rm-dsq.light { background: #f0d9b5; }
.rm-dsq.dark { background: #8b5e3c; }
.rm-dsq.last { background: #a8793f; }
.rm-dsq.from { cursor: pointer; box-shadow: inset 0 0 0 3px #16a34a; }
.rm-dsq.sel { box-shadow: inset 0 0 0 4px #facc15; }
.rm-dsq.via { box-shadow: inset 0 0 0 3px #facc15; }
.rm-dsq.step { cursor: pointer; }
.rm-dsq.step::after { content: ""; position: absolute; width: 34%; height: 34%; border-radius: 50%; background: rgba(250, 204, 21, .85); }
.rm-dpiece { width: 80%; height: 80%; border-radius: 50%; box-shadow: 0 2px 3px rgba(0, 0, 0, .5), inset 0 0 0 3px rgba(0, 0, 0, .12); display: flex; align-items: center; justify-content: center; font-size: 1.1em; }
.rm-dpiece.w { background: radial-gradient(circle at 35% 30%, #fff, #d9dee5); }
.rm-dpiece.b { background: radial-gradient(circle at 35% 30%, #4b5563, #111827); }
.rm-dpiece.king::after { content: "♛"; color: #f59e0b; text-shadow: 0 0 2px #000; }
.rm-dnote { text-align: center; font-size: .85rem; margin-top: .5rem; }

/* ---- Backgammon ---- */
.rm-bgdice { display: flex; gap: .5rem; align-items: center; justify-content: center; font-size: 2.6rem; line-height: 1; margin: .3rem 0 .6rem; min-height: 2.8rem; flex-wrap: wrap; }
.rm-die.used { opacity: .25; }
.rm-bg { display: grid; grid-template-columns: repeat(6, 1fr) .55fr repeat(6, 1fr) .8fr; grid-template-rows: 13rem 13rem; max-width: 700px; margin: 0 auto; background: #14532d; border: 6px solid #5b3a1f; border-radius: 8px; user-select: none; }
.rm-pt { position: relative; display: flex; flex-direction: column; align-items: center; padding: 2px 0; z-index: 0; }
.rm-pt.top { justify-content: flex-start; }
.rm-pt.bottom { justify-content: flex-end; flex-direction: column-reverse; }
.rm-pt::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.rm-pt.top::before { clip-path: polygon(8% 0, 92% 0, 50% 92%); }
.rm-pt.bottom::before { clip-path: polygon(50% 8%, 8% 100%, 92% 100%); }
.rm-pt.a::before { background: #d6c4a0; }
.rm-pt.b::before { background: #8a3b2a; }
.rm-pt.src { cursor: pointer; box-shadow: inset 0 0 0 2px #4ade80; }
.rm-pt.sel { box-shadow: inset 0 0 0 3px #facc15; }
.rm-pt.target { cursor: pointer; box-shadow: inset 0 0 0 3px #facc15; background: rgba(250, 204, 21, .18); }
.rm-ptn { position: absolute; font-size: .6rem; color: rgba(255, 255, 255, .55); z-index: 2; }
.rm-pt.top .rm-ptn { bottom: 1px; } .rm-pt.bottom .rm-ptn { top: 1px; }
.rm-chk { width: 78%; max-width: 2.1rem; aspect-ratio: 1; border-radius: 50%; margin: 1px 0; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; box-shadow: 0 2px 3px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(0, 0, 0, .15); position: relative; z-index: 1; }
.rm-chk.w { background: radial-gradient(circle at 35% 30%, #fff, #d9dee5); color: #111827; }
.rm-chk.b { background: radial-gradient(circle at 35% 30%, #4b5563, #111827); color: #fff; }
.rm-bar { background: #5b3a1f; display: flex; flex-direction: column; align-items: center; padding: 4px 0; }
.rm-bar.src { cursor: pointer; box-shadow: inset 0 0 0 2px #4ade80; } .rm-bar.sel { box-shadow: inset 0 0 0 3px #facc15; }
.rm-bar-fill { flex: 1; }
.rm-off { display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .25); border-left: 4px solid #5b3a1f; }
.rm-off.target { cursor: pointer; box-shadow: inset 0 0 0 3px #facc15; background: rgba(250, 204, 21, .25); }
.rm-bgnote { text-align: center; font-size: .85rem; margin-top: .5rem; }
@media (max-width: 560px) { .rm-bg { grid-template-rows: 9.5rem 9.5rem; } .rm-die { font-size: 2.1rem; } .rm-chk { font-size: .6rem; max-width: 1.6rem; } }
@media (prefers-reduced-motion: reduce) { .rm-dsq.step::after { transition: none; } }

/* ---- Word game ---- */
.rm-wgscores { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: baseline; justify-content: center; margin: .3rem 0 .6rem; }
.rm-wgscore { padding: .15rem .5rem; border-radius: 8px; border: 1px solid transparent; }
.rm-wgscore.turn { border-color: var(--accent); }
.rm-wgscore.me b { color: var(--accent); }
.rm-wgpts { font-weight: 700; font-size: 1.1em; margin: 0 .2rem; }
.rm-wgboard { display: grid; grid-template-columns: repeat(15, 1fr); gap: 1px; max-width: 640px; margin: 0 auto; background: #2d4a3a; border: 4px solid #2d4a3a; border-radius: 6px; user-select: none; }
.rm-wgcell { aspect-ratio: 1; position: relative; display: flex; align-items: center; justify-content: center; background: #e8e2cf; font-size: clamp(.45rem, 1.6vw, .7rem); font-weight: 700; color: rgba(0, 0, 0, .45); }
.rm-wgcell.tw { background: #d9534f; color: #fff; }
.rm-wgcell.dw { background: #f2a7a4; color: #7a1f1c; }
.rm-wgcell.tl { background: #3f83c7; color: #fff; }
.rm-wgcell.dl { background: #aed3ee; color: #1b4f7a; }
.rm-wgcell.centre { font-size: clamp(.7rem, 2.4vw, 1.1rem); }
.rm-wgcell.open { cursor: pointer; box-shadow: inset 0 0 0 2px rgba(250, 204, 21, .9); }
.rm-wtile { position: relative; display: inline-flex; align-items: center; justify-content: center; background: #f4d9a0; color: #2a1d0a; border: 1px solid #b58a3c; border-radius: 4px; font-weight: 800; font-size: clamp(.75rem, 2.6vw, 1.2rem); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.rm-wgcell .rm-wtile { width: 94%; height: 94%; }
.rm-wtile sub { position: absolute; right: 2px; bottom: 0; font-size: .5em; font-weight: 600; }
.rm-wtile.blank { color: #1d4ed8; }
.rm-wtile.last { box-shadow: 0 0 0 2px #16a34a; }
.rm-wtile.last.flash { animation: rm-wflash 0.5s ease-in-out 2; }
@keyframes rm-wflash { 0%, 100% { background: #f4d9a0; transform: scale(1); } 50% { background: #86efac; transform: scale(1.18); box-shadow: 0 0 0 4px #16a34a, 0 0 12px 4px rgba(22, 163, 74, .7); z-index: 2; } }
@media (prefers-reduced-motion: reduce) { .rm-wtile.last.flash { animation: none; } }
.rm-wtile.pending { background: #fde68a; border-color: #d97706; cursor: pointer; box-shadow: 0 0 0 2px #facc15; }
.rm-wgrack { display: flex; gap: 6px; justify-content: center; margin: .8rem 0 .4rem; flex-wrap: wrap; }
.rm-wtile.rack { width: 2.7rem; height: 2.7rem; font-size: 1.4rem; cursor: pointer; }
.rm-wtile.rack:disabled { cursor: default; }
.rm-wtile.rack.sel { transform: translateY(-8px); box-shadow: 0 0 0 3px #facc15; }
.rm-wtile.rack.used { opacity: .25; }
.rm-wtile.rack.ex { transform: translateY(-8px); background: #fecaca; border-color: #dc2626; }
.rm-wgactions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; align-items: center; }
.rm-wgpreview { text-align: center; font-size: .95rem; }
.rm-wgpreview.bad { color: #b91c1c; }
.rm-wgblank { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; align-items: center; margin: .5rem 0; }
.rm-wgblank .btn { padding: .2rem .5rem; min-width: 2rem; }
.rm-wgnote { text-align: center; font-size: .85rem; }
.rm-wgword { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: #1d6fa5; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rm-wghint { text-align: center; font-size: .8rem; margin: .1rem 0; }
.rm-wgword:hover, .rm-wgword:focus-visible { color: #0f4c75; text-decoration-thickness: 2px; }
.rm-wgdef { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; max-width: 36rem; margin: .5rem auto; padding: .5rem .75rem; border: 1px solid #c9d6df; border-radius: .5rem; background: #f4f8fb; font-size: .92rem; }
.rm-wgdef .btn { padding: .1rem .5rem; }
@media (max-width: 560px) { .rm-wtile.rack { width: 2.3rem; height: 2.3rem; font-size: 1.2rem; } }

/* The shared CA_Help hint, walkthrough and manual on the members' game pages: the site's buttons and the quiet variant the help component uses. */
.btn.btn-quiet { background: transparent; color: #1d6fa5; border: 1px solid #1d6fa5; }
.gm-manual { max-width: 46rem; margin: 0 auto; }
.gm-manual .ca-manual-tools { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.rm-card.won { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(34, 197, 94, .55), 0 2px 10px rgba(0, 0, 0, .25); transform: translateY(-4px); }
/* the word game rack: tiles can be dragged into another order */
.rm-wtile.rack { touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.rm-wtile.rack.shifting { transition: transform .12s ease; }
.rm-wtile.rack.dragging { transition: none; z-index: 5; cursor: grabbing; box-shadow: 0 6px 14px rgba(0, 0, 0, .35); opacity: .95; }
.rm-wghint { text-align: center; font-size: .8rem; margin: .1rem 0; }
/* Kingen: what this deal is about, above the table */
.rm-deal { display: flex; flex-wrap: wrap; gap: .25rem .8rem; align-items: baseline; justify-content: center; margin: .3rem 0 .6rem; font-size: .92rem; }
.rm-deal .rm-trump .red { color: #dc2626; } .rm-deal .rm-trump .black { color: #0f172a; }
/* Rikiki: the players with their bids, the trick on the table and the bidding buttons */
.rk-players { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: .4rem 0; }
.rk-player { display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 7rem; padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.rk-player.turn { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(29, 111, 165, .3); }
.rk-player.me { background: #f1f7fb; }
.rk-bid { font-size: .85rem; }
.rk-trick { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: .7rem 0; min-height: 4.2rem; }
.rk-slot { display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 3.4rem; }
.rk-empty { display: inline-block; min-width: 2.6rem; height: 2.4rem; border: 1px dashed var(--border); border-radius: 7px; }
.rk-bidding { text-align: center; margin: .6rem 0; }
.rk-bidding .btn { min-width: 2.6rem; margin: .15rem; }
.rk-scores td.rk-hit { color: #15803d; font-weight: 600; }
.rk-scores { overflow-x: auto; }

/* Chess: strength slider (Elo) with the band names underneath */
.elo-box { margin: 0.4rem 0 0.8rem; padding: 0.7rem 0.9rem 0.6rem; border: 2px solid var(--border); border-radius: 14px; background: var(--bg); }
.elo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; margin-bottom: 0.35rem; }
.elo-band { font-weight: 700; font-size: 1.15rem; color: var(--accent); }
.elo-num { font-variant-numeric: tabular-nums; color: var(--text-muted, var(--text)); font-size: 1.05rem; }
.elo-range { width: 100%; accent-color: var(--accent); height: 2rem; cursor: pointer; }
.elo-bands { display: flex; margin-top: -0.1rem; }
.elo-bands span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 0.72rem; color: var(--text-muted, var(--text)); opacity: 0.85; overflow: hidden; text-overflow: ellipsis; }
.elo-note { margin-top: 0.45rem; font-size: 0.75rem; line-height: 1.35; opacity: 0.7; }

/* Chess mentor: coloured target squares, danger rings, and the explanation card */
.chs-sq.safe .chs-dot { background: rgba(40, 160, 70, 0.75); }
.chs-sq.contested .chs-dot { background: rgba(240, 160, 20, 0.9); }
.chs-sq.danger .chs-dot { background: rgba(220, 50, 50, 0.9); }
.chs-sq.cap.safe { box-shadow: inset 0 0 0 0.9cqw rgba(40, 160, 70, 0.9); }
.chs-sq.cap.contested { box-shadow: inset 0 0 0 0.9cqw rgba(240, 160, 20, 0.95); }
.chs-sq.cap.danger { box-shadow: inset 0 0 0 0.9cqw rgba(220, 50, 50, 0.95); }
.chs-sq.threat { outline: 0.8cqw solid rgba(220, 50, 50, 0.95); outline-offset: -0.8cqw; }
.chs-sq.opp { outline: 0.8cqw dashed rgba(40, 160, 70, 0.95); outline-offset: -0.8cqw; }
.mentor-card { margin: 0.4rem 0 0.8rem; padding: 0.7rem 0.9rem; border: 2px solid var(--border); border-radius: 14px; background: var(--bg); font-size: 0.95rem; line-height: 1.4; }
.mentor-card p { margin: 0.35rem 0; }
.mentor-title { font-weight: 700; font-size: 1.15rem; color: var(--accent); }
.mentor-sq { font-weight: 600; font-size: 0.9rem; opacity: 0.7; margin-left: 0.3rem; }
.mentor-warn { font-weight: 600; color: #c03030; }
.mentor-sq-line.danger { color: #b02828; }
.mentor-sq-line.contested { color: #a86a00; }
.mentor-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin-top: 0.5rem; font-size: 0.78rem; opacity: 0.85; }
.mentor-legend .lg { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; margin-right: 0.3rem; vertical-align: -1px; }
.mentor-legend .lg.safe { background: rgba(40, 160, 70, 0.85); }
.mentor-legend .lg.contested { background: rgba(240, 160, 20, 0.95); }
.mentor-legend .lg.danger { background: rgba(220, 50, 50, 0.95); }
.mentor-legend .lg.threat { border-radius: 2px; background: transparent; border: 2px solid rgba(220, 50, 50, 0.95); }
.mentor-legend .lg.opp { border-radius: 2px; background: transparent; border: 2px dashed rgba(40, 160, 70, 0.95); }

/* Chess course */
.chs-star { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 6cqw; pointer-events: none; text-shadow: 0 0 4px rgba(255, 255, 255, 0.9); animation: chs-star-pulse 1.2s ease-in-out infinite; }
@keyframes chs-star-pulse { 0%, 100% { transform: scale(0.9); } 50% { transform: scale(1.15); } }
.lesson-card { margin: 0.4rem 0 0.8rem; padding: 0.8rem 0.9rem; border: 2px solid var(--accent); border-radius: 14px; background: var(--bg); line-height: 1.45; }
.lesson-card p { margin: 0.45rem 0; }
.lesson-step { font-size: 0.8rem; opacity: 0.7; }
.lesson-bar { height: 5px; border-radius: 3px; background: var(--border); margin: 0.25rem 0 0.5rem; overflow: hidden; }
.lesson-bar i { display: block; height: 100%; background: var(--accent); transition: width 0.3s; }
.lesson-title { font-weight: 700; font-size: 1.2rem; color: var(--accent); }
.lesson-task { font-weight: 600; }
.lesson-hint { color: #8a6500; }
.lesson-wrong { color: #b02828; }
.lesson-done { color: #1f7a3a; font-weight: 600; }
.lesson-btns { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }

/* Chess coach */
.chs-sq.hintfrom { outline: 0.8cqw solid rgba(60, 120, 230, 0.95); outline-offset: -0.8cqw; }
.chs-sq.hintto { box-shadow: inset 0 0 0 100px rgba(60, 120, 230, 0.35); outline: 0.8cqw solid rgba(60, 120, 230, 0.95); outline-offset: -0.8cqw; }
.coach-warn { margin: 0.4rem 0 0.8rem; padding: 0.7rem 0.9rem; border: 2px solid #c03030; border-radius: 14px; background: var(--bg); line-height: 1.4; }
.coach-warn p { margin: 0.3rem 0; color: #b02828; font-weight: 600; }
.coach-hint { margin: 0.4rem 0 0.8rem; padding: 0.7rem 0.9rem; border: 2px solid rgba(60, 120, 230, 0.9); border-radius: 14px; background: var(--bg); line-height: 1.4; }
.coach-hint p { margin: 0.3rem 0; }
.coach-busy { margin: 0.3rem 0; opacity: 0.8; }
.elo-ends { display: flex; justify-content: space-between; font-size: 0.72rem; opacity: 0.75; margin-top: -0.1rem; }

/* ---- The Learning area (/learn): every learning game and tool, by subject (LearnCatalog). Calmer than the Toy Box: it is for every age. */
.learn { margin: 0 auto; }
.learn-title { margin: 0.4rem 0 0.4rem; font-size: 2rem; }
.learn-lead { color: var(--text-muted); max-width: 46rem; margin: 0 0 1rem; }
.learn-back { display: inline-block; margin-bottom: 0.6rem; }
.learn-h { margin: 1.8rem 0 0.7rem; font-size: 1.2rem; display: flex; align-items: baseline; gap: 0.5rem; }
.learn-count { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 999px; padding: 0 0.5rem; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.learn-grid-wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.learn-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; padding: 0.85rem 0.9rem;
  border: 1px solid var(--border); border-left: 4px solid hsl(var(--h, 210) 55% 50%); border-radius: 12px;
  background: var(--bg-elevated); color: var(--text); text-decoration: none; min-height: 92px;
}
.learn-tile:hover { text-decoration: none; border-color: hsl(var(--h, 210) 55% 50%); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); }
.learn-tile-emoji { font-size: 1.6rem; line-height: 1; }
.learn-tile-name { font-weight: 700; line-height: 1.25; }
.learn-tile-blurb { font-size: 0.85rem; color: var(--text-muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.learn-tile.is-wide { min-height: 130px; }
.learn-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.8rem; }
.learn-cat {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.8rem; align-items: center; padding: 0.9rem 1rem;
  border-radius: 14px; border: 1px solid var(--border); background: linear-gradient(135deg, hsl(var(--h) 60% 50% / 0.12), transparent 70%), var(--bg-elevated);
  color: var(--text); text-decoration: none;
}
.learn-cat:hover { text-decoration: none; border-color: hsl(var(--h) 55% 50%); transform: translateY(-2px); }
.learn-cat-emoji { grid-row: 1 / span 2; font-size: 2rem; line-height: 1; }
.learn-cat-n { font-size: 0.85rem; color: var(--text-muted); }
.learn-cat.is-empty { opacity: 0.55; }
.learn-pick {
  display: flex; gap: 1rem; align-items: center; margin: 0.8rem 0 0.4rem; padding: 1rem 1.2rem; border-radius: 16px; text-decoration: none; color: var(--text);
  border: 2px solid hsl(var(--h) 55% 50%); background: linear-gradient(120deg, hsl(var(--h) 60% 50% / 0.14), var(--bg-elevated) 65%);
}
.learn-pick:hover { text-decoration: none; transform: translateY(-2px); }
.learn-pick-emoji { font-size: 2.8rem; line-height: 1; }
.learn-pick-text { display: flex; flex-direction: column; gap: 0.15rem; }
.learn-pick-label { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.learn-pick-blurb { color: var(--text-muted); font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.learn-soon { margin-top: 2rem; color: var(--text-muted); font-size: 0.9rem; }
.learn-foot { margin-top: 2.2rem; }
@media (prefers-reduced-motion: reduce) { .learn-tile:hover, .learn-cat:hover, .learn-pick:hover { transform: none; } }

/* ---- players ("who's playing?"), the quiz extras and "my robot" (kids.js, PlayerPicker, ChoiceQuiz, MyRobot) */
.game-titlebar .player-chip-wrap { margin-left: auto; }
.player-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .7rem .2rem .3rem; border-radius: 999px; border: 1px solid var(--border, #d6dbe1); background: var(--surface, #fff); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.player-chip:hover { border-color: #2f80ed; }
.player-chip svg { display: block; }
.player-chip-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-modal { position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 42, .55); display: grid; place-items: center; padding: 16px; }
.player-card { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface, #fff); color: inherit; border-radius: 18px; padding: 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.player-card h2 { margin: 0 0 12px; text-align: center; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.player-tile { position: relative; border: 2px solid transparent; border-radius: 14px; background: var(--soft, #f3f5f8); }
.player-tile.is-me { border-color: #2f80ed; }
.player-pick { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; border-radius: 12px; }
.player-pick:hover { background: rgba(47, 128, 237, .08); }
.player-name { font-weight: 700; font-size: 1.05rem; }
.player-rank { font-size: .8rem; opacity: .75; }
.player-remove { position: absolute; top: 4px; right: 4px; border: 0; background: transparent; cursor: pointer; font-size: 1rem; }
.player-confirm { display: flex; flex-direction: column; gap: 6px; padding: 8px; font-size: .85rem; }
.player-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.player-new { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.player-new label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; width: min(320px, 100%); }
.player-new input { font: inherit; font-size: 1.1rem; padding: .5rem .7rem; border-radius: 10px; border: 1px solid var(--border, #d6dbe1); }
.player-colours { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.player-colour { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; background: var(--c); cursor: pointer; }
.player-colour.on { border-color: #111; box-shadow: 0 0 0 2px #fff inset; }
.player-note { margin: 12px 0 0; font-size: .8rem; opacity: .75; text-align: center; }
.btn-danger { background: #c0392b; }
.pill-stars { color: #f2a20c; margin-left: .25rem; letter-spacing: -1px; }
.quiz-tools { display: inline-flex; align-items: center; gap: .5rem; }
.quiz-tool { border: 1px solid var(--border, #d6dbe1); background: var(--surface, #fff); border-radius: 999px; width: 2rem; height: 2rem; cursor: pointer; font-size: 1rem; line-height: 1; }
.quiz-streak { font-weight: 800; color: #b7791f; animation: quiz-pop .5s ease-out; }
.quiz-retry { font-weight: 700; color: #6b46c1; }
.quiz-retry-intro { text-align: center; margin: .2rem 0 .6rem; color: #6b46c1; font-weight: 600; }
.quiz-explain { margin: .6rem auto 0; max-width: 46rem; padding: .6rem .9rem; border-radius: 12px; background: #fff8e1; color: #5b4300; font-size: 1rem; font-weight: 500; text-align: left; }
.quiz-learned { font-weight: 700; color: #6b46c1; }
.quiz-rankup { display: flex; flex-direction: column; align-items: center; gap: .3rem; animation: quiz-pop .6s ease-out; }
.quiz-pause { margin: .8rem auto; max-width: 32rem; padding: .8rem 1rem; border-radius: 14px; background: #e8f5e9; color: #1e4620; text-align: left; }
@keyframes quiz-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .quiz-streak, .quiz-rankup { animation: none; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .quiz-explain { background: #3b3216; color: #fbe7a6; }
  :root:not([data-theme="light"]) .quiz-pause { background: #1d3a22; color: #cdebd0; }
}
:root[data-theme="dark"] .quiz-explain { background: #3b3216; color: #fbe7a6; }
:root[data-theme="dark"] .quiz-pause { background: #1d3a22; color: #cdebd0; }
.robot-hero { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.robot-info { flex: 1 1 260px; }
.robot-info h2 { margin: 0; }
.robot-rank { font-size: 1.2rem; font-weight: 700; margin: .2rem 0 .6rem; }
.robot-next p { margin: .4rem 0; }
.robot-how, .robot-tip { font-size: .9rem; }
.robot-h { margin: 0 0 .6rem; font-size: 1.15rem; }
.robot-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.robot-badge { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--soft, #f3f5f8); opacity: .55; filter: grayscale(1); }
.robot-badge.is-got { opacity: 1; filter: none; background: #fff3d6; }
.robot-badge-icon { font-size: 1.6rem; }
.robot-badge-text { font-size: .85rem; }
.robot-badge-count { font-size: .8rem; font-weight: 700; }
.robot-album-h { margin: 1rem 0 .4rem; font-size: 1rem; }
.robot-stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.robot-sticker { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; border: 2px dashed var(--border, #d6dbe1); color: inherit; text-decoration: none; text-align: center; }
.robot-sticker .robot-sticker-emoji { font-size: 1.8rem; filter: grayscale(1); opacity: .45; }
.robot-sticker.is-got { border-style: solid; border-color: #f2a20c; background: #fff8e8; }
.robot-sticker.is-gold { border-style: solid; border-color: #d4a017; background: linear-gradient(135deg, #fff4c2, #ffe08a); }
.robot-sticker.is-got .robot-sticker-emoji, .robot-sticker.is-gold .robot-sticker-emoji { filter: none; opacity: 1; }
.robot-sticker-name { font-size: .75rem; line-height: 1.2; }
.robot-sticker-stars { font-size: .75rem; color: #f2a20c; letter-spacing: -1px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .robot-badge.is-got, :root:not([data-theme="light"]) .robot-sticker.is-got { background: #3b3216; }
  :root:not([data-theme="light"]) .robot-sticker.is-gold { background: linear-gradient(135deg, #5a4a12, #7a6315); }
}
:root[data-theme="dark"] .robot-badge.is-got, :root[data-theme="dark"] .robot-sticker.is-got { background: #3b3216; }
:root[data-theme="dark"] .robot-sticker.is-gold { background: linear-gradient(135deg, #5a4a12, #7a6315); }

/* the player and the robot above a lab (LabRobotWatch) */
.lab-robot-bar { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; max-width: 1320px; margin: 0 auto .5rem; }
.lab-robot-bar .player-chip-wrap { margin-left: 0; }
.lab-robot-link { font-weight: 600; text-decoration: none; }
.lab-rankup { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 12px; max-width: min(520px, calc(100vw - 32px)); padding: 10px 18px 10px 10px; border-radius: 18px; background: var(--surface, #fff); color: inherit; box-shadow: 0 12px 40px rgba(0,0,0,.3); animation: quiz-pop .6s ease-out; cursor: pointer; }
.lab-rankup div { display: flex; flex-direction: column; gap: 2px; }
@media (prefers-reduced-motion: reduce) { .lab-rankup { animation: none; } }
.robot-labs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.robot-lab { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--soft, #f3f5f8); color: inherit; text-decoration: none; }
.robot-lab:hover { outline: 2px solid #2f80ed; }
.robot-lab-icon { grid-row: 1 / 3; font-size: 1.8rem; }
.robot-lab-name { font-weight: 700; }
.robot-lab-count { grid-column: 2; font-size: .8rem; opacity: .8; }
.robot-lab-stars { grid-row: 1 / 3; grid-column: 3; font-weight: 700; }

/* the age picker above the games (AgeBar + kids.js): matching games first, the others dimmed, never hidden */
.age-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .4rem 0 1rem; }
.age-bar-h { font-size: 1.3rem; }
.age-bar-label { font-weight: 700; margin-right: .2rem; }
.age-pill { display: inline-flex; flex-direction: column; align-items: center; min-width: 3.2rem; padding: .3rem .55rem; border: 2px solid var(--border); border-radius: 12px; background: var(--bg-elevated, #fff); color: var(--text); cursor: pointer; font: inherit; line-height: 1.1; }
.age-pill b { font-size: 1.05rem; }
.age-pill small { font-size: .68rem; opacity: .75; white-space: nowrap; }
.age-pill.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.age-pill.on small { opacity: .95; }
.age-pill:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.age-off { opacity: .38; filter: grayscale(.7); }
.age-off:hover, .age-off:focus-visible { opacity: .8; filter: none; }
.kid-age { position: absolute; left: 8px; bottom: 6px; font-size: .7rem; font-weight: 700; opacity: .55; }
@media (max-width: 600px) { .age-pill { min-width: 2.6rem; padding: .25rem .4rem; } .age-pill small { display: none; } }

/* ---------- calm mode and teacher/parent mode (ModeToggles, kids.js keeps both per player) ---------- */
.mode-toggles { display: inline-flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.age-bar .mode-toggles { margin-left: auto; }
.mode-pill { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.2rem; padding: .25rem .7rem; border: 2px solid var(--border); border-radius: 999px; background: var(--bg-elevated, var(--bg)); color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; }
.mode-pill[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.mode-pill:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 600px) { .mode-pill { font-size: .78rem; padding: .2rem .5rem; } }
/* calm mode: nothing moves, flashes or slides (the canvas games read html[data-calm] themselves) */
html[data-calm="1"] *, html[data-calm="1"] *::before, html[data-calm="1"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
/* teacher/parent mode: worksheets and class filters only show then */
.teacher-only { display: none !important; }
html[data-teacher="1"] .teacher-only { display: inline-flex !important; }
html[data-teacher="1"] label.teacher-only { display: flex !important; }
.adv-filter { align-items: center; gap: .5rem; margin: .6rem auto; max-width: 480px; padding: .5rem .8rem; border: 2px dashed var(--accent); border-radius: 12px; font-size: .92rem; cursor: pointer; }
.adv-filter input { width: 1.2rem; height: 1.2rem; flex: none; }
/* "hide the advanced missions for my class": Circuit Lab's level buttons 31-46 (a setting of this computer) */
html[data-hide-adv="1"] .circuit-page .arcade-options .game-setup-row:first-child .pill:nth-child(n+31):nth-child(-n+46) { display: none; }

/* ---------- "In het echt…" safety card (RealLifeCard) ---------- */
.real-life { display: flex; gap: .7rem; align-items: flex-start; max-width: 640px; margin: 1rem auto; padding: .75rem 1rem; border-radius: 14px; border: 2px solid #e0b04a; background: #fff8e6; color: #3d3220; }
.real-life p { margin: 0; line-height: 1.45; }
.real-life b { margin-right: .3rem; }
.real-life-icon { font-size: 1.8rem; line-height: 1; flex: none; }
@media (prefers-color-scheme: dark) { .real-life { background: #3a3120; color: #f4ead2; border-color: #a8812f; } }

/* ---------- "Oefen ook:" chips (PractiseLinks) ---------- */
.practise-links { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: center; margin: .9rem auto; max-width: 720px; }
.practise-label { font-weight: 700; }
.practise-chip { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.4rem; padding: .3rem .8rem; border: 2px solid var(--accent); border-radius: 999px; color: var(--accent); background: var(--bg-elevated, var(--bg)); font-weight: 600; text-decoration: none; }
.practise-chip:hover, .practise-chip:focus-visible { background: var(--accent); color: #fff; text-decoration: none; }

/* ---------- the age suggestion on a quiz ---------- */
.age-hint { margin: .3rem 0 .6rem; font-weight: 600; }

/* ---------- printable worksheet (QuizWorksheet: games/{key}?worksheet=N) ---------- */
.ws { max-width: 800px; margin: 0 auto; }
.ws-tools { margin: .5rem 0 1rem; }
.ws-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.ws-page { background: #fff; color: #111; border: 1px solid var(--border); border-radius: 8px; padding: 1.2rem 1.5rem; margin-bottom: 1.2rem; }
.ws-head h2 { margin: 0 0 .2rem; }
.ws-level, .ws-how { margin: .2rem 0; color: #444; }
.ws-fill { margin: .6rem 0; }
.ws-line { display: inline-block; width: 14rem; border-bottom: 1px solid #333; margin-right: 1rem; }
.ws-line.ws-short { width: 7rem; }
.ws-list { padding-left: 1.6rem; }
.ws-q { margin: 0 0 .9rem; break-inside: avoid; page-break-inside: avoid; }
.ws-prompt { margin: 0 0 .3rem; font-weight: 600; }
.ws-visual { max-width: 260px; margin: .2rem 0 .4rem; }
.ws-visual svg { max-width: 100%; height: auto; max-height: 160px; }
.ws-options { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .25rem 1rem; }
.ws-box { display: inline-block; width: .9rem; height: .9rem; border: 1.5px solid #333; border-radius: 3px; vertical-align: -2px; margin-right: .2rem; }
.ws-answers li { margin: .25rem 0; }
.ws-explain { color: #555; font-size: .9rem; }
.ws-foot { margin-top: 1rem; color: #777; font-size: .8rem; }
@media print {
    body:has(.ws) .site-header, body:has(.ws) .site-footer, body:has(.ws) .game-header, body:has(.ws) .game-titlebar, body:has(.ws) .ws-tools, body:has(.ws) .practise-links { display: none !important; }
    body:has(.ws) { background: #fff !important; color: #000 !important; }
    body:has(.ws) .site-main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
    .ws-page { border: none; border-radius: 0; padding: 0; margin: 0; }
    .ws-key { break-before: page; page-break-before: always; }
}

/* ================= Quiz shell (ChoiceQuiz): a colour per game, focus while playing, big chunky answers ================= */
.qshell { --qc: hsl(var(--qh) 62% 38%); --qc-soft: hsl(var(--qh) 70% 95%); --qc-mid: hsl(var(--qh) 50% 82%); --qc-on: #fff; --qs-good: #1f8f4e; --qs-bad: #c9443f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qshell { --qc: hsl(var(--qh) 66% 66%); --qc-soft: hsl(var(--qh) 18% 20%); --qc-mid: hsl(var(--qh) 20% 32%); --qc-on: #12161f; --qs-good: #4cc784; --qs-bad: #ef7570; } }
:root[data-theme="dark"] .qshell { --qc: hsl(var(--qh) 66% 66%); --qc-soft: hsl(var(--qh) 18% 20%); --qc-mid: hsl(var(--qh) 20% 32%); --qc-on: #12161f; --qs-good: #4cc784; --qs-bad: #ef7570; }

.qshell .game-title { color: var(--qc); }
.qshell .game-panel { background: var(--qc-soft); border: 2px solid var(--qc-mid); border-radius: 22px; padding: 1.4rem; }
.qshell .game-bar { font-weight: 800; font-size: 1.1rem; color: var(--text); }

/* one block per question */
.qs-steps { display: flex; gap: 5px; margin: 0 0 1.3rem; }
.qs-steps i { flex: 1; height: 14px; border-radius: 99px; background: var(--qc-mid); transition: background .25s; }
.qs-steps i.done { background: var(--qc); }
.qs-steps i.now { background: color-mix(in srgb, var(--qc) 55%, var(--qc-mid)); }
.qs-prompt { text-align: center; margin: 0; font-weight: 800; font-size: clamp(1.3rem, 3.4vw, 1.85rem); line-height: 1.25; }

/* the answers: thick, pressable buttons in the game's colour; green and red only ever mean right and wrong */
.qshell .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.qshell .choice { overflow-wrap: break-word; }
.qshell .choice { background: var(--qc); color: var(--qc-on); border: 0; border-radius: 18px; min-height: 4.4rem; padding: 1rem .8rem; font-size: clamp(1.3rem, 3.2vw, 1.8rem); font-weight: 800; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); transition: transform .08s, box-shadow .08s, opacity .2s, filter .15s; }
.qshell .choice:hover:not(:disabled) { filter: brightness(1.08); border: 0; }
.qshell .choice:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.qshell .choice:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.qshell .choice:disabled { cursor: default; }
.qshell .choice:disabled:not(.correct):not(.wrong) { opacity: .4; }
.qshell .choice.correct { background: var(--qs-good); color: #fff; border: 0; }
.qshell .choice.wrong { background: var(--qs-bad); color: #fff; border: 0; }
.qshell .choice.correct::before { content: "✓ "; }
.qshell .choice.wrong::before { content: "✗ "; }
html:not([data-calm="1"]) .qshell .choice.correct { animation: qs-pop .45s; }
html:not([data-calm="1"]) .qshell .choice.wrong { animation: qs-shake .4s; }
@keyframes qs-pop { 50% { transform: scale(1.06); } }
@keyframes qs-shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.qshell .feedback { font-size: 1.35rem; min-height: 3.4rem; }

/* start screen: bigger level buttons and one big Play button */
.qshell .pill { border: 2px solid var(--qc-mid); background: var(--bg-elevated); border-radius: 16px; padding: .75rem 1.2rem; font-size: 1.15rem; font-weight: 600; }
.qshell .pill:hover { border-color: var(--qc); }
.qshell .pill.on { border-color: var(--qc); background: var(--qc); color: var(--qc-on); }
.qshell .pill.on .pill-stars { color: #ffd54a; }
.qshell .game-panel > .btn:not(.btn-secondary), .qshell .result-box .btn:not(.btn-secondary):first-of-type { background: var(--qc); color: var(--qc-on); border: 0; border-radius: 99px; font-size: 1.5rem; font-weight: 800; padding: .7rem 2.2rem; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); }
.qshell .game-panel > .btn:not(.btn-secondary):active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }

/* focus while playing: site menu and footer go, so does the search and the teacher switches; the game fills the screen */
body:has(.qshell.playing) .site-header, body:has(.qshell.playing) .site-footer { display: none; }
.qshell.playing .game-header .gs-form, .qshell.playing .game-header .mode-toggles { display: none; }
body:has(.qshell.playing) .site-main { padding-top: 1rem; }

@media (max-width: 520px) {
    .qshell .game-panel { padding: 1rem; border-radius: 18px; }
    .qshell .choice-grid { gap: .7rem; }
    .qshell .choice { font-size: 1.05rem; padding: .8rem .4rem; }
}

/* long mission lists (the circuit lab): numbered tiles instead of a wall of pills */
.lvl-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: .6rem; }
.lvl-head { grid-column: 1 / -1; margin-top: .6rem; font-weight: 800; color: var(--qc); }
.lvl-head:first-child { margin-top: 0; }
.lvl { display: grid; place-items: center; gap: 0; aspect-ratio: 1; padding: .3rem; border: 2px solid var(--qc-mid); border-radius: 16px; background: var(--bg-elevated); color: var(--text); cursor: pointer; font: inherit; line-height: 1.1; }
.lvl:hover { border-color: var(--qc); }
.lvl:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.lvl-ic { font-size: 1.6rem; }
.lvl-n { font-size: .8rem; font-weight: 800; color: var(--text-muted); }
.lvl.on { background: var(--qc); border-color: var(--qc); color: var(--qc-on); box-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.lvl.on .lvl-n { color: var(--qc-on); }
.lvl-now { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; width: 100%; margin: 0 0 .8rem; padding: .7rem 1rem; border: 2px solid var(--qc-mid); border-radius: 16px; background: var(--bg-elevated); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.lvl-now:hover { border-color: var(--qc); }
.lvl-now-name { font-size: 1.3rem; font-weight: 800; }
.lvl-now-change { color: var(--qc); font-weight: 700; }

/* ================= Learning area and hub: bigger, colourful tiles, easier to read for a child ================= */
.learn-tile, .learn-cat { --lt-bg: hsl(var(--h, 210) 70% 96%); --lt-bd: hsl(var(--h, 210) 45% 80%); --lt-sh: hsl(var(--h, 210) 40% 76%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .learn-tile, :root:not([data-theme="light"]) .learn-cat { --lt-bg: hsl(var(--h, 210) 20% 20%); --lt-bd: hsl(var(--h, 210) 20% 32%); --lt-sh: rgba(0, 0, 0, .35); } }
:root[data-theme="dark"] .learn-tile, :root[data-theme="dark"] .learn-cat { --lt-bg: hsl(var(--h, 210) 20% 20%); --lt-bd: hsl(var(--h, 210) 20% 32%); --lt-sh: rgba(0, 0, 0, .35); }

.learn-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 1rem; }
.learn-tile { align-items: center; justify-content: center; text-align: center; gap: .5rem; min-height: 132px; padding: 1rem .8rem; border: 2px solid var(--lt-bd); border-radius: 20px; background: var(--lt-bg); box-shadow: 0 4px 0 var(--lt-sh); }
.learn-tile:hover { border-color: hsl(var(--h, 210) 55% 50%); transform: translateY(-3px); box-shadow: 0 7px 0 var(--lt-sh); }
.learn-tile-emoji { font-size: 3rem; }
.learn-tile-name { font-size: 1.1rem; font-weight: 800; }
.learn-tile.is-wide { align-items: flex-start; text-align: left; min-height: 150px; }
.learn-tile.is-wide .learn-tile-emoji { font-size: 2.4rem; }
.learn-tile-blurb { font-size: .92rem; color: var(--text); opacity: .8; }
.learn-tile:focus-visible, .learn-cat:focus-visible, .learn-pick:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.learn-cats { gap: 1rem; }
.learn-cat { padding: 1.1rem 1.2rem; border: 2px solid var(--lt-bd); border-radius: 20px; background: var(--lt-bg); box-shadow: 0 4px 0 var(--lt-sh); }
.learn-cat-emoji { font-size: 2.8rem; }
.learn-cat strong { font-size: 1.15rem; }
.learn-cat-n { font-size: .92rem; }
.learn-h { font-size: 1.45rem; }
.learn-title { font-size: 2.4rem; }
.learn-lead { font-size: 1.1rem; }
.learn-count { font-size: .9rem; }
.age-pill { min-width: 3.8rem; padding: .45rem .7rem; border-radius: 14px; }
.age-pill b { font-size: 1.25rem; }
.age-pill small { font-size: .74rem; }
@media (max-width: 520px) { .learn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; } .learn-tile-emoji { font-size: 2.5rem; } .learn-tile-name { font-size: 1rem; } }

/* hub: the "carry on" tile (filled in by kids.js from what this browser remembers) */
.kid-continue { display: flex; align-items: center; gap: 1rem; margin: 1.4rem 0 0; padding: .9rem 1.3rem; border: 2px dashed var(--text); border-radius: 20px; background: var(--bg-elevated); color: var(--text); text-decoration: none; }
.kid-continue:hover { text-decoration: none; border-style: solid; }
.kid-continue[hidden] { display: none; }
.kid-continue-emoji { font-size: 2.6rem; line-height: 1; }
.kid-continue-text { display: grid; line-height: 1.25; }
.kid-continue-text small { color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .75rem; }
.kid-continue-text strong { font-size: 1.3rem; }
.kid-continue-go { margin-left: auto; font-size: 1.8rem; color: var(--accent); }

/* ================= Lessons for teachers (/teacher) and pupils (/lesson) ================= */
.lesson-page { max-width: 52rem; margin: 0 auto; padding-bottom: 3rem; --ls-card: var(--bg-elevated); --ls-line: var(--border); }
.lesson-kicker { margin: .6rem 0 0; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; color: var(--text-muted); }
.lesson-title { font-size: 2.3rem; margin: .3rem 0 .6rem; }
.lesson-lead { font-size: 1.1rem; color: var(--text-muted); max-width: 44rem; }
.lesson-steps { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .8rem; }
.lesson-step { display: grid; grid-template-columns: 2.4rem 2.6rem minmax(0, 1fr) auto auto; align-items: center; gap: .8rem; padding: .8rem 1rem; border: 2px solid var(--ls-line); border-radius: 18px; background: var(--ls-card); }
.lesson-step.is-done { border-color: #1f8f4e; }
.lesson-num { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); font-weight: 800; }
.is-done .lesson-num { background: #1f8f4e; color: #fff; }
.lesson-emoji { font-size: 2.2rem; line-height: 1; text-align: center; }
.lesson-name { display: grid; min-width: 0; line-height: 1.25; }
.lesson-name strong { font-size: 1.15rem; }
.lesson-name small { color: var(--text-muted); font-size: .85rem; }
.lesson-stars { font-size: 1.4rem; color: #e0a400; letter-spacing: 2px; white-space: nowrap; }
.lesson-step .btn { white-space: nowrap; }
.lesson-hand, .teacher-card { margin-top: 1.5rem; padding: 1.2rem 1.4rem; border: 2px solid var(--ls-line); border-radius: 20px; background: var(--ls-card); }
.teacher-card + .teacher-card { margin-top: 1.5rem; }
.teacher-card h2, .lesson-hand h2 { margin-top: 0; }
.teacher-card h3 { margin: 1.3rem 0 .5rem; font-size: 1.1rem; }
.lesson-label { display: block; font-weight: 700; margin: .8rem 0 .3rem; }
.lesson-input { width: 100%; padding: .65rem .8rem; font: inherit; font-size: 1.05rem; border: 2px solid var(--ls-line); border-radius: 12px; background: var(--bg); color: var(--text); }
.lesson-input:focus-visible, .lesson-code:focus-visible, .lesson-lvl select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lesson-code { width: 100%; margin: .5rem 0; padding: .65rem .8rem; font: .95rem/1.4 var(--font-mono, monospace); border: 2px solid var(--ls-line); border-radius: 12px; background: var(--bg); color: var(--text); word-break: break-all; resize: vertical; }
.lesson-hand-row, .lesson-link-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.lesson-hand-row .lesson-input { flex: 1 1 12rem; width: auto; }
.lesson-link-row .lesson-input { flex: 1 1 18rem; width: auto; font-size: .9rem; }
.is-builder .lesson-step { grid-template-columns: 2.4rem 2.6rem minmax(0, 1fr) auto auto; }
.lesson-lvl { display: grid; font-size: .75rem; font-weight: 700; color: var(--text-muted); }
.lesson-lvl select { font: inherit; font-size: .95rem; padding: .25rem; border-radius: 8px; border: 2px solid var(--ls-line); background: var(--bg); color: var(--text); }
.lesson-tools { display: inline-flex; gap: .3rem; }
.lesson-tools .quiz-tool { width: 2.2rem; height: 2.2rem; }
.lesson-results { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .4rem; max-height: 22rem; overflow-y: auto; }
.lesson-results li { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .4rem .6rem; border-radius: 12px; border: 1px solid var(--ls-line); }
.lesson-results small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-qr { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1rem; }
.lesson-qr img { background: #fff; padding: 8px; border-radius: 12px; border: 2px solid var(--ls-line); }
.lesson-qr p { flex: 1 1 14rem; margin: 0; }
.lesson-table-wrap { overflow-x: auto; margin-top: 1rem; }
.lesson-table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.lesson-table th, .lesson-table td { padding: .5rem .7rem; border-bottom: 1px solid var(--ls-line); text-align: left; white-space: nowrap; }
.lesson-table thead th { font-size: .8rem; color: var(--text-muted); }
.lesson-table td { color: #c88f00; letter-spacing: 1px; }
.lesson-table td.is-zero { color: var(--text-muted); }
.lesson-table td:last-child { color: var(--text); letter-spacing: 0; }
.kid-teacher-link { text-align: center; margin: 1rem 0 0; }
.kid-teacher-link a { font-weight: 700; }
@media (max-width: 560px) {
    .lesson-step { grid-template-columns: 2.2rem minmax(0, 1fr) auto; }
    .lesson-emoji { display: none; }
    .lesson-stars { grid-column: 2; }
    .lesson-step .btn, .lesson-lvl, .lesson-tools { grid-column: 2 / -1; }
}

/* ================= Smartboard mode (ChoiceQuiz ?board=1): huge text for a whole class, colour-card answers ================= */
.board { display: grid; gap: 1.2rem; margin: .5rem 0 1.5rem; }
.board-top { display: flex; justify-content: space-between; align-items: center; font-size: 1.4rem; font-weight: 800; }
.board-top-tools { display: inline-flex; gap: .5rem; }
.board-top-tools .quiz-tool { width: 3rem; height: 3rem; font-size: 1.4rem; }
.board-q { margin: 0; text-align: center; font-weight: 800; font-size: clamp(2rem, 5.5vw, 4.2rem); line-height: 1.15; }
.board-visual svg { max-height: 38vh; width: auto; }
.board-visual { font-size: clamp(4rem, 12vw, 8rem); }
.board-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.board-opt { display: flex; align-items: center; gap: 1.2rem; padding: 1.2rem 1.6rem; border-radius: 28px; color: #fff; box-shadow: 0 8px 0 rgba(0, 0, 0, .25); transition: opacity .25s, transform .25s; min-height: 7rem; }
.board-opt.c0 { background: #d64545; }
.board-opt.c1 { background: #2f6fd0; }
.board-opt.c2 { background: #f0b90b; color: #2a2100; }
.board-opt.c3 { background: #2a8f56; }
.board-letter { flex: none; display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #1d2433; font-weight: 900; font-size: 2.2rem; }
.board-text { font-weight: 800; font-size: clamp(1.8rem, 4.2vw, 3.4rem); line-height: 1.1; overflow-wrap: break-word; min-width: 0; }
.board-opt.is-dim { opacity: .25; }
.board-opt.is-right { transform: scale(1.04); outline: 8px solid var(--text); outline-offset: 4px; }
.board-opt.is-right .board-text::after { content: " ✓"; }
.board-explain { max-width: none; font-size: clamp(1.2rem, 2.6vw, 2rem); text-align: center; }
.board-actions { display: flex; justify-content: center; }
.board-actions .btn { font-size: clamp(1.4rem, 3vw, 2.2rem); padding: .8rem 2.4rem; border-radius: 99px; }
body:has(.board) .site-main { max-width: none; padding-inline: 2vw; }
@media (max-width: 700px) { .board-opts { grid-template-columns: 1fr; } .board-opt { min-height: 5rem; } }
@media (prefers-reduced-motion: reduce) { .board-opt { transition: none; } }
.qshell:has(.board) .game-header, .qshell:has(.board) .game-titlebar { display: none; }
.board { gap: .8rem; }
.board-q { font-size: clamp(1.8rem, 4.6vw, 3.4rem); }
.board-opt { min-height: 5.5rem; padding: .9rem 1.4rem; border-radius: 24px; }
.board-letter { width: 3.4rem; height: 3.4rem; font-size: 1.9rem; }
.board-text { font-size: clamp(1.6rem, 3.6vw, 2.8rem); }
.board-visual .quiz-emoji, .board-visual svg { max-height: 26vh; }
.board-visual svg { height: min(24vh, 11rem); width: auto; }
