  /* ── Game select ────────────────────────────────────────────────────── */
  #screen-game-select { align-items: center; justify-content: center; }
  .game-select-box { width: 100%; max-width: 560px; padding: 0 24px; }
  .gs-header { text-align: center; margin-bottom: 32px; }
  .gs-emoji { font-size: 44px; margin-bottom: 12px; }
  .gs-title { font-size: 24px; font-weight: 700; color: var(--gold); }
  .gs-sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
  .game-options { display: flex; flex-direction: column; gap: 14px; }
  .game-option { display: flex; align-items: center; gap: 20px; padding: 22px 26px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    cursor: pointer; text-align: left; font-family: inherit; color: var(--text);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%; box-shadow: 0 1px 0 rgba(12, 15, 11, 0.10); }
  .game-option:hover { border-color: var(--gold); background: var(--gold-bg);
    transform: translateY(-2px); box-shadow: 0 8px 24px rgba(21,36,216,0.08), 0 1px 0 rgba(12, 15, 11, 0.10); }
  .go-icon { font-size: 30px; flex-shrink: 0; line-height: 1; }
  .go-name { font-size: 16px; font-weight: 600; display: block; letter-spacing: 0.01em; }
  .go-desc { font-size: 13px; color: var(--muted); margin-top: 3px; display: block; line-height: 1.45; }
  .skip-link { display: block; text-align: center; margin-top: 20px;
    color: var(--muted); font-size: 13px; cursor: pointer; }
  .skip-link:hover { color: var(--text); }

  /* ── Mini-game shared ───────────────────────────────────────────────── */
  .mg-topbar { display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
  .mg-topbar-left { display: flex; align-items: center; gap: 16px; }
  .mg-game-label { font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--muted); }
  .mg-timer { background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 6px 12px; font-size: 14px; font-weight: 600;
    font-variant-numeric: tabular-nums; color: var(--text); }
  .mg-timer.urgent { border-color: var(--red); color: var(--red); }
  .mg-body-inner { flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 24px; overflow-y: auto; }

  /* ── Riddles ────────────────────────────────────────────────────────── */
  #screen-riddles { overflow: hidden; }
  .riddle-wrapper { width: 100%; max-width: 560px; }
  .riddle-q-card { background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 32px; margin-bottom: 16px; }
  .riddle-counter { font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
  .riddle-text { font-size: 17px; line-height: 1.75; color: var(--text); }
  .riddle-input-row { display: flex; gap: 12px; margin-bottom: 10px; }
  .riddle-input-row input { flex: 1; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 16px; font-family: inherit; font-size: 15px;
    color: var(--text); outline: none; transition: border-color 0.15s; }
  .riddle-input-row input:focus { border-color: var(--gold); }
  .riddle-result { text-align: center; font-size: 15px; font-weight: 600; padding: 12px;
    border-radius: var(--radius); margin-bottom: 12px; display: none; }
  .riddle-result.correct { color: var(--green); background: var(--green-bg); border: 1px solid var(--green-line); }
  .riddle-result.wrong { color: var(--red); background: var(--red-bg); border: 1px solid var(--red-line); }
  .riddle-footer { display: flex; gap: 12px; }

  /* ── Sudoku ─────────────────────────────────────────────────────────── */
  #screen-sudoku { overflow-y: auto; }
  .sudoku-wrapper { width: 100%; max-width: 360px; }
  .sudoku-grid { display: grid; grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--gold-dim); border-radius: var(--radius); overflow: hidden;
    margin-bottom: 16px; background: var(--border); gap: 1px;
    box-shadow: 0 2px 6px rgba(12,15,11,0.12); }
  .sudoku-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    font-size: clamp(22px, 6vw, 32px); font-weight: 600; cursor: pointer;
    background: var(--card); transition: background 0.1s; user-select: none; }
  .sudoku-cell.given { color: var(--text); cursor: default; }
  .sudoku-cell.editable { color: var(--gold); }
  .sudoku-cell.selected { background: var(--gold-bg); outline: 2px solid var(--gold); outline-offset: -2px; }
  .sudoku-cell.highlight { background: #e7eae2; }
  .sudoku-cell.error-cell { color: var(--red); }
  .sudoku-cell.solved-flash { background: var(--green-bg); }
  .sudoku-numpad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
  /* Wordle */
  #screen-wordle { overflow-y: auto; }
  .wordle-wrapper { width: 100%; max-width: 360px; display:flex; flex-direction:column; align-items:center; }
  .wordle-board { display: grid; grid-template-rows: repeat(6, 1fr); gap: 7px; margin-bottom: 18px; padding: 4px; }
  .wordle-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
  .wordle-tile { width: 54px; height: 54px; display:flex; align-items:center; justify-content:center;
    font-size: 24px; font-weight: 700; text-transform: uppercase; color: var(--text); letter-spacing: 0.02em;
    background: var(--card); border: 2px solid var(--border); border-radius: var(--radius);
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.15s ease; }
  .wordle-tile.filled { border-color: var(--subtle); }
  .wordle-tile.correct { background: var(--green-bg); border-color: var(--green-line); color: var(--bs-ink); }
  .wordle-tile.present { background: #e4e7f9; border-color: #aab2ea; color: var(--bs-ink); }
  .wordle-tile.absent { background: #e7eae2; border-color: var(--bs-rule); color: var(--bs-ink-2); }
  .wordle-status { text-align:center; min-height: 20px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
  .wordle-status.win { color: var(--green); font-weight:600; }
  .wordle-status.lose { color: var(--red); font-weight:600; }
  .wordle-keyboard { display: grid; gap: 6px; width: 100%; margin-bottom: 14px; }
  .wordle-keyrow { display: flex; justify-content: center; gap: 5px; }
  .wordle-key { min-width: 28px; height: 42px; padding: 0 8px; display:flex; align-items:center; justify-content:center;
    font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text);
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; user-select:none; }
  .wordle-key:hover { border-color: var(--gold); }
  .wordle-key.wide { min-width: 50px; font-size: 11px; letter-spacing: 0.06em; }
  .wordle-key.correct { background: var(--green-bg); border-color: var(--green-line); color: var(--bs-ink); }
  .wordle-key.present { background: #e4e7f9; border-color: #aab2ea; color: var(--bs-ink); }
  .wordle-key.absent { background: #e7eae2; border-color: var(--bs-rule); color: var(--bs-ink-2); }
  /* Memory */
  #screen-memory { overflow-y: auto; }
  .memory-wrapper { width: 100%; max-width: 360px; display:flex; flex-direction:column; align-items:center; }
  .memory-stats { display:flex; gap: 18px; margin-bottom: 14px; font-size: 13px; color: var(--muted); letter-spacing:0.06em; }
  .memory-stats .ms-num { color: var(--gold); font-weight: 700; font-size: 18px; }
  .memory-status { text-align:center; min-height: 22px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
  .memory-status.go { color: var(--gold); font-weight:600; }
  .memory-status.fail { color: var(--red); font-weight:600; }
  .memory-pad { display: grid; gap: 10px; margin-bottom: 18px;
    padding: 14px; background: rgba(255,255,255,0.015); border: 1px solid var(--border); border-radius: var(--radius); }
  /* Single-palette tiles — the puzzle is positional working memory, not color discrimination.
     Inspired by Simon Says hardware; chess-club aesthetic via muted gold. */
  .memory-tile { aspect-ratio: 1; border-radius: var(--radius); cursor: pointer;
    background: var(--bs-ink); border: 1px solid var(--bs-ink-2); color: var(--bs-sheet);
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.25s ease, border-color 0.15s ease; }
  .memory-tile:hover { background: var(--bs-ink-2); border-color: var(--bs-ink-3); }
  .memory-tile:active { transform: scale(0.97); }
  .memory-tile.flash { background: var(--bs-blue); border-color: var(--bs-ink); box-shadow: 0 0 0 3px rgba(21,36,216,0.22); }
  .memory-tile.dim { opacity: 0.5; pointer-events: none; }
  .mg-actions { display: flex; gap: 10px; width: 100%; max-width: 360px; }
  .numpad-btn { aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    font-family: inherit; font-size: 16px; font-weight: 600; color: var(--text);
    cursor: pointer; transition: background 0.1s, border-color 0.1s; }
  .numpad-btn:hover { border-color: var(--gold); background: var(--gold-bg); }
  .sudoku-actions { display: flex; gap: 10px; }
  .sudoku-status { text-align: center; font-size: 13px; color: var(--muted);
    margin-bottom: 10px; min-height: 20px; }
  .sudoku-status.solved { color: var(--green); font-weight: 600; }

  /* ── Drills (cognitive warm-ups) ────────────────────────────────────── */
  #screen-drills, #screen-drill-stage { overflow-y: auto; }
  /* The shared mini-game body vertically centers its content; a taller-than-
     viewport flex-centered child gets its TOP clipped unreachably. The hub
     is the one tall surface — anchor it to the top. */
  #screen-drills .mg-body-inner { justify-content: flex-start; }
  .drills-wrapper { width: 100%; max-width: 920px; padding-bottom: 24px; }
  .drill-option { display: flex; align-items: center; gap: 16px; padding: 16px 20px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    cursor: pointer; text-align: left; font-family: inherit; color: var(--text); width: 100%;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease; }
  .drill-option:hover { border-color: var(--gold); background: var(--gold-bg);
    transform: translateY(-1px); }
  .drill-option .do-best { margin-left: auto; font-size: 11px; font-weight: 700;
    letter-spacing: 0.06em; color: var(--gold); white-space: nowrap;
    font-variant-numeric: tabular-nums; }
  .drill-summary-card { background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
  .drill-summary-title { font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
  .drill-sum-row { display: flex; align-items: center; gap: 12px; padding: 8px 0;
    border-bottom: 1px solid var(--subtle); font-size: 13px; }
  .drill-sum-row:last-child { border-bottom: none; padding-bottom: 0; }
  .drill-sum-name { flex: 1; color: var(--text); }
  .drill-sum-stat { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .drill-spark { flex-shrink: 0; }
  .drill-spark polyline { fill: none; stroke: var(--gold); stroke-width: 1.5; }
  .drill-sum-empty { font-size: 13px; color: var(--muted); text-align: center; padding: 6px 0; }
  .drill-warmup-row { display: flex; gap: 10px; flex-wrap: wrap; }
  .drill-warmup-chip { flex: 1 1 120px; display: flex; flex-direction: column; align-items: center;
    gap: 4px; padding: 12px 10px; background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer; font: inherit; color: var(--text); }
  .drill-warmup-chip:hover { border-color: var(--gold); background: var(--gold-bg); }
  .drill-warmup-chip .wu-name { font-size: 13px; font-weight: 600; }
  .drill-warmup-chip .wu-hint { font-size: 11px; color: var(--muted); }
  .drill-warmup-chip .wu-done { font-size: 11px; font-weight: 700; color: var(--gold); }
  .rs-passage { max-width: 640px; width: 100%; margin-top: 12px; text-align: left;
    font-size: 16px; line-height: 1.65; color: var(--text); white-space: pre-wrap; }
  .rs-choice { display: block; width: 100%; max-width: 640px; margin-top: 10px;
    padding: 12px 14px; text-align: left; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
    font-family: inherit; font-size: 14px; line-height: 1.5; cursor: pointer; }
  .rs-choice:hover { border-color: var(--gold-dim); background: var(--gold-bg); }
  .rs-choice.right { border-color: var(--green); color: var(--green); }
  .rs-choice.wrong { border-color: var(--red); color: var(--red); }
  .rot-target { display: flex; justify-content: center; padding: 10px 0 16px; }
  .rot-options { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
  .rot-option { background: transparent; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 8px; cursor: pointer; touch-action: manipulation; }
  .rot-option:hover { border-color: var(--gold); }
  .rot-option.bad { border-color: var(--red); }
  .rot-grid { display: grid; gap: 2px; }
  .rot-cell { background: var(--bs-stock-2); border-radius: var(--radius); }
  .rot-cell.on { background: var(--gold); }

  /* ── Cognition Lab hub (domain wings + hero) ──────────────────────────── */
  .cog-head { padding: 6px 2px 2px; }
  .cog-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.22em;
    text-transform: uppercase; color: var(--gold); }
  .cog-tagline { font-family: 'Lora', Georgia, serif; font-style: italic;
    font-size: 14px; color: var(--muted); margin-top: 4px; }
  .cog-hero { position: relative; overflow: hidden; border: 1px solid var(--gold-dim);
    border-radius: var(--radius); padding: 20px 22px 18px; margin-top: 14px;
    background:
      radial-gradient(120% 160% at 0% 0%, rgba(21,36,216,0.08), transparent 55%),
      linear-gradient(160deg, var(--bs-stock-2) 0%, var(--card) 60%); }
  .cog-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(12,15,11,0.035) 1px, transparent 1px);
    background-size: 14px 14px; }
  .cog-hero-title { font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }
  .cog-hero-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .cog-hero-track { display: flex; gap: 6px; margin: 12px 0 14px; max-width: 260px; }
  .cog-seg { flex: 1; height: 4px; border-radius: var(--radius); background: var(--subtle);
    position: relative; overflow: hidden; }
  .cog-seg.done::before { content: ''; position: absolute; inset: 0; border-radius: var(--radius);
    background: var(--gold); transform-origin: left;
    animation: cogSegFill 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
  @keyframes cogSegFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .cog-domain { margin-top: 22px; --dacc: var(--gold); --dacc-bg: var(--gold-bg); }
  .cog-domain[data-domain="speed"]  { --dacc: var(--teal);   --dacc-bg: var(--teal-bg); }
  .cog-domain[data-domain="memory"] { --dacc: var(--purple); --dacc-bg: var(--purple-bg); }
  .cog-domain[data-domain="focus"]  { --dacc: var(--gold);   --dacc-bg: var(--gold-bg); }
  .cog-domain[data-domain="skill"]  { --dacc: var(--green);  --dacc-bg: var(--green-bg); }
  .cog-domain-head { display: flex; align-items: center; gap: 10px; padding: 0 2px 10px; }
  .cog-domain-dot { width: 7px; height: 7px; border-radius: var(--radius); background: var(--dacc);
    transform: rotate(45deg); flex-shrink: 0; }
  .cog-domain-name { font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--text); }
  .cog-domain-sub { font-size: 11px; color: var(--muted); }
  .cog-domain-rule { flex: 1; height: 1px;
    background: linear-gradient(90deg, var(--border), transparent); }
  .cog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px; }
  .cog-tile { display: flex; flex-direction: column; align-items: stretch; gap: 5px;
    padding: 14px 16px 12px; text-align: left; background: var(--card);
    border: 1px solid var(--border); border-left: 3px solid var(--dacc-bg);
    border-radius: var(--radius); cursor: pointer; font: inherit; color: var(--text);
    position: relative; touch-action: manipulation;
    opacity: 0; animation: cogTileIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
  .cog-tile:hover { border-color: var(--dacc); border-left-color: var(--dacc);
    transform: translateY(-1px); box-shadow: 0 6px 18px rgba(12, 15, 11, 0.16); }
  .cog-tile:active { transform: translateY(0); }
  .cog-grid .cog-tile:nth-child(2) { animation-delay: 0.05s; }
  .cog-grid .cog-tile:nth-child(3) { animation-delay: 0.10s; }
  .cog-grid .cog-tile:nth-child(4) { animation-delay: 0.15s; }
  .cog-grid .cog-tile:nth-child(5) { animation-delay: 0.20s; }
  .cog-grid .cog-tile:nth-child(6) { animation-delay: 0.25s; }
  .cog-grid .cog-tile:nth-child(7) { animation-delay: 0.30s; }
  @keyframes cogTileIn { from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); } }
  @media (prefers-reduced-motion: reduce) {
    .cog-tile, .cog-seg.done::before { animation: none; opacity: 1; }
  }
  .cog-tile-top { display: flex; align-items: center; justify-content: space-between; }
  .cog-tile .go-icon { font-size: 20px; width: auto; }
  .cog-tile .go-name { font-size: 14px; font-weight: 650; }
  .cog-tile .go-desc { font-size: 11.5px; color: var(--muted); line-height: 1.45;
    min-height: 2.6em; }
  .cog-tile .do-best { font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
    color: var(--dacc); font-variant-numeric: tabular-nums; }
  .cog-tile-spark { height: 22px; display: flex; align-items: flex-end; }
  .cog-tile-spark .drill-spark polyline { stroke: var(--dacc); opacity: 0.85; }
  .cog-domain .drill-warmup-chip:hover,
  .cog-hero .drill-warmup-chip:hover { border-color: var(--gold); }
  /* Result moment */
  /* font-size/font-weight are set by the second .drill-score-big rule further
     down (same selector, same specificity, later in source), so declaring them
     here never reached either live instance. Only what is unique remains. */
  .drill-score-big { letter-spacing: -0.02em;
    line-height: 1; font-variant-numeric: tabular-nums; }
  .drill-delta { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
    font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
    border: 1px solid var(--border); color: var(--muted);
    font-variant-numeric: tabular-nums; }
  .drill-delta.up { color: var(--green); border-color: var(--green-line); }
  .drill-delta.down { color: var(--muted); }
  .drill-pb-flash { animation: pbPulse 1.6s ease-in-out 2; }
  @keyframes pbPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
  /* Dashboard Cognition Index hero */
  .ci-hero { display: flex; align-items: center; gap: 20px; padding: 4px 2px 16px;
    border-bottom: 1px solid var(--border); margin-bottom: 14px; }
  .ci-badge { flex-shrink: 0; width: 96px; height: 96px; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(circle at 35% 30%, rgba(21,36,216,0.18), transparent 70%);
    border: 2px solid var(--gold); }
  .ci-badge-num { font-size: 34px; font-weight: 750; line-height: 1;
    color: var(--gold); font-variant-numeric: tabular-nums; }
  .ci-badge-lbl { font-size: 8px; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--muted); margin-top: 3px; }
  .ci-badge.locked { border-color: var(--subtle); }
  .ci-badge.locked .ci-badge-num { font-size: 26px; color: var(--muted); }
  .ci-domains { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
  .ci-drow { display: grid; grid-template-columns: 78px 1fr 38px; align-items: center; gap: 10px; }
  .ci-dname { font-size: 11px; color: var(--muted); text-transform: capitalize; }
  .ci-dbar { height: 6px; border-radius: var(--radius); background: var(--subtle); overflow: hidden; }
  .ci-dfill { height: 100%; border-radius: var(--radius); background: var(--gold);
    transform-origin: left; animation: ciFill 0.7s cubic-bezier(0.16,1,0.3,1) both; }
  @keyframes ciFill { from { transform: scaleX(0); } }
  .ci-dval { font-size: 12px; font-weight: 700; text-align: right;
    color: var(--text); font-variant-numeric: tabular-nums; }
  .ci-hint { font-size: 11px; color: var(--muted); font-style: italic; }
  @media (prefers-reduced-motion: reduce) { .ci-dfill { animation: none; } }
  .ci-gains { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 12px 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
  .ci-gains-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--green); }
  .ci-gain-chip { font-size: 12px; color: var(--text); padding: 4px 10px;
    border-radius: 999px; border: 1px solid var(--green-line);
    background: var(--green-bg); font-variant-numeric: tabular-nums; }
  .ci-gain-chip b { color: var(--muted); font-weight: 600; margin-right: 2px; }
  .drill-stage-wrapper { width: 100%; max-width: 480px; display: flex;
    flex-direction: column; align-items: center; }
  .drill-status { text-align: center; min-height: 22px; font-size: 13px;
    color: var(--muted); margin-bottom: 12px; }
  .drill-status.go { color: var(--gold); font-weight: 600; }
  .drill-status.fail { color: var(--red); font-weight: 600; }
  .drill-meta-row { display: flex; gap: 18px; margin-bottom: 12px; font-size: 13px;
    color: var(--muted); letter-spacing: 0.06em; }
  .drill-meta-row .ms-num { color: var(--gold); font-weight: 700; font-size: 18px; }
  .rt-panel { width: 100%; min-height: 260px; border-radius: var(--radius); display: flex;
    align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
    cursor: pointer; user-select: none; touch-action: manipulation;
    border: 1px solid var(--border);
    background: var(--card); color: var(--text); }
  .rt-panel.wait { background: var(--bs-ink); border-color: var(--red); color: var(--red); }
  .rt-panel.go { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
  .drill-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%;
    max-width: 340px; padding: 14px; background: rgba(255,255,255,0.015);
    border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; }
  .digit-display { min-height: 96px; display: flex; align-items: center; justify-content: center;
    font-size: 56px; font-weight: 700; color: var(--text); letter-spacing: 0.1em;
    font-variant-numeric: tabular-nums; }
  .digit-entry { min-height: 34px; text-align: center; font-size: 24px; font-weight: 700;
    color: var(--gold); letter-spacing: 0.18em; margin-bottom: 10px;
    font-variant-numeric: tabular-nums; }
  .drill-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    width: 100%; max-width: 280px; margin-bottom: 8px; }
  .drill-result-panel { width: 100%; text-align: center; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; }
  .drill-score-big { font-size: 44px; font-weight: 700; color: var(--gold); margin: 8px 0 2px; }
  .drill-score-unit { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
  .drill-result-stats { display: flex; justify-content: center; gap: 28px; margin-bottom: 8px; }
  .drill-rs-item { font-size: 12px; color: var(--muted); }
  .drill-rs-item b { display: block; font-size: 18px; color: var(--text); font-weight: 700; }
  .drill-pb-flash { font-size: 13px; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
  .drill-flavor { font-size: 12px; color: var(--muted); margin-top: 8px; font-style: italic; }
  /* Phase-2 drill stages (corsi, visual memory, chimp, n-back, stroop, SDMT) */
  .corsi-board { position: relative; width: 100%; max-width: 340px; aspect-ratio: 1;
    background: rgba(255,255,255,0.015); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 14px; }
  .corsi-blk { position: absolute; width: 16%; aspect-ratio: 1; border-radius: var(--radius);
    background: var(--bs-ink); border: 1px solid var(--bs-ink-2); cursor: pointer; padding: 0;
    transition: background 0.1s ease; }
  .corsi-blk:hover { background: var(--bs-ink-2); border-color: var(--bs-ink-3); }
  .corsi-blk.flash { background: var(--bs-blue); border-color: var(--bs-ink); box-shadow: 0 0 0 3px rgba(21,36,216,0.22); }
  .corsi-blk.flash-bad { background: var(--red-bg); border-color: var(--red-line); box-shadow: 0 0 16px rgba(198,34,34,0.35); }
  .vm-grid { display: grid; gap: 8px; width: 100%; max-width: 340px; padding: 14px;
    background: rgba(255,255,255,0.015); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 14px; }
  .vm-tile { aspect-ratio: 1; border-radius: var(--radius); background: var(--bs-ink);
    border: 1px solid var(--bs-ink-2); cursor: pointer; padding: 0;
    transition: background 0.12s ease; }
  .vm-tile.lit { background: #f5efdf; border-color: #fff; }
  .vm-tile.hit { background: var(--green-bg); border-color: var(--green-line); }
  .vm-tile.miss { background: var(--red-bg); border-color: var(--red-line); }
  /* Under ~480px the 8-column grid gives ~33px cells — below the 44px touch
     minimum, and a chimp mis-tap costs a strike. 6 columns keeps 48 cells
     (rows auto-flow); the engine addresses cells by index, not geometry. */
  @media (max-width: 480px) { .chimp-grid { grid-template-columns: repeat(6, 1fr) !important; } }
  .chimp-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px;
    width: 100%; max-width: 480px; margin-bottom: 14px; }
  .chimp-cell { aspect-ratio: 1; border-radius: var(--radius); border: 1px solid transparent;
    background: transparent; font-family: inherit; font-size: 15px; font-weight: 700;
    color: var(--gold); cursor: default; padding: 0; }
  .chimp-cell.num { background: var(--card); border-color: var(--gold); cursor: pointer; }
  .chimp-cell.masked { background: var(--card); border-color: var(--border);
    color: transparent; cursor: pointer; }
  .nback-tile { aspect-ratio: 1; border-radius: var(--radius); background: var(--bs-ink);
    border: 1px solid var(--bs-ink-2); }
  .nback-tile.on { background: var(--bs-blue); border-color: var(--bs-ink);
    box-shadow: 0 0 28px rgba(91,141,239,0.5); }
  .stroop-word { width: 100%; min-height: 140px; display: flex; align-items: center;
    justify-content: center; font-size: 48px; font-weight: 800; letter-spacing: 0.04em;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 14px; user-select: none; }
  .stroop-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    width: 100%; max-width: 440px; margin-bottom: 8px; }
  .stroop-btn { padding: 14px 0; border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--card); font-family: inherit; font-size: 13px; font-weight: 700;
    letter-spacing: 0.08em; cursor: pointer; }
  .stroop-btn:hover { background: var(--gold-bg); }
  .sd-key { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; width: 100%;
    max-width: 480px; margin-bottom: 14px; }
  .sd-key-cell { display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 0; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 13px; color: var(--muted); }
  .sd-key-cell .sym { font-size: 18px; color: var(--gold); }
  .sd-stim { min-height: 110px; display: flex; align-items: center; justify-content: center;
    font-size: 64px; color: var(--text); }
  .nm-bar-wrap { width: 100%; max-width: 340px; height: 6px; border-radius: var(--radius);
    background: var(--subtle); overflow: hidden; margin-bottom: 14px; }
  .nm-bar { height: 100%; background: var(--gold); transform-origin: left center; }

