/* Board-first Kids game shell (P6 pilot): short title bar, board on the first screen,
   a big Play button and settings behind a gear. Loaded only when KidsGameLayout gets boardFirst. */
.kg-board-first .kp-back{margin-bottom:8px}
.kg-board-first .kg-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;margin:0 0 14px}
.kg-board-first .kg-head h1{margin:0!important;font-size:clamp(1.6rem,3.4vw,2.3rem)!important;line-height:1.15;letter-spacing:-.02em}
.kg-board-first .kg-head .kg-listen{margin:0}
.kg-board-first .kg-about{margin:28px 0 0}
.kg-board-first .kg-about .kp-lede{margin-bottom:14px}

.kg-playbar{display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px;margin:0 0 16px}
.kg-playbar .kg-actions{margin:0}
.kg-playbar .kg-actions[hidden]{display:none}
.kg-board-first .kg-play{min-height:60px;min-width:160px;padding:10px 32px;border-radius:999px;border-color:var(--k-gold);background:var(--k-gold);color:#1b1030;font-size:1.25rem;font-weight:850;box-shadow:0 4px 0 #a9792a}
.kg-board-first .kg-play:not(:disabled):hover{background:#ffd98a;border-color:#ffd98a}
.kg-board-first .kg-play:focus-visible{outline:4px solid #ffffff;outline-offset:3px}
.kg-board-first .kg-play{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.kg-board-first .kg-play svg{width:24px;height:24px;flex:0 0 auto}
.kg-playbar>.kp-button-secondary{min-height:60px;border-radius:999px}

.kg-settings{min-width:0}
.kg-settings[open]{flex:1 1 100%;order:9}
.kg-settings>summary{display:inline-flex;align-items:center;gap:8px;min-height:60px;padding:0 20px;border:2px solid var(--k-line);border-radius:999px;background:var(--k-bg-2);color:var(--k-ink,#e8ecff);font-weight:800;cursor:pointer;list-style:none;user-select:none}
.kg-settings>summary::-webkit-details-marker{display:none}
.kg-settings>summary:hover{border-color:var(--k-gold)}
.kg-settings>summary:focus-visible{outline:4px solid var(--k-gold);outline-offset:3px}
.kg-settings[open]>summary{border-color:var(--k-gold);background:var(--k-surface-2)}
.kg-gear{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.kg-settings[open] .kg-gear{transform:rotate(45deg)}
.kg-settings-body{display:flex;flex-direction:column;gap:16px;margin-top:12px;padding:18px;border:1px solid var(--k-line);border-radius:20px;background:var(--k-bg-2)}
.kg-settings-body .mm-setup,.kg-settings-body .mm-learning{margin:0}
.kg-settings-body .mm-learning .kg-levels{flex:1 1 100%}

/* Keyboard instructions only for keyboard users: after a first Tab, or while a control has keyboard focus. */
.kg-board-first .kg-keyboard-note{display:none}
.kg-keys .kg-board-first .kg-keyboard-note,.kg-board-first .kg-stage:has(:focus-visible) .kg-keyboard-note{display:block}

/* Star Maze: the toolbar carries the play bar; settings hold size, movement and print. */
.mz-toolbar .kg-playbar{margin:0}
.kg-settings-label,.mz-settings-label{margin:0!important;font-weight:700;color:var(--k-ink,#e8ecff)!important}
.kg-settings-body .mz-levels{width:fit-content;max-width:100%}
.mz-settings-print .kp-button{display:inline-flex;align-items:center;gap:10px}

@media(max-width:600px){
 .kg-board-first .kg-head{margin-bottom:10px}
 .kg-board-first .kp-back{min-height:40px;margin-bottom:4px}
 .kg-board-first .kg-stage .kg-toolbar{margin-bottom:10px}
 .kg-playbar{gap:8px;margin-bottom:12px}
 .kg-board-first .kg-play{flex:1 1 140px;min-height:56px;font-size:1.15rem;padding:8px 20px}
 .kg-playbar>.kp-button-secondary,.kg-settings>summary{min-height:56px;padding:0 16px}
 .kg-settings-body{padding:14px}
 .kg-settings-body .mz-levels{width:100%}
}
@media(prefers-reduced-motion:reduce){.kg-settings[open] .kg-gear{transform:none}}
@media print{.kg-playbar,.kg-about{display:none!important}}

/* Phones: keep the first screen for the board. The game title stays in the h1, so the stage heading is
   kept for screen readers only; the spoken instruction line gets a smaller size. */
@media(max-width:600px){
 .kg-board-first .kg-head{gap:6px 10px}
 .kg-board-first .kg-head .kg-listen{gap:8px}
 .kg-board-first .kg-head .kg-listen-play,.kg-board-first .kg-head .kg-listen-sound{min-height:44px;padding:6px 14px;font-size:.92rem}
 .kg-board-first .kg-head .kg-listen-caption{margin:0;font-size:.98rem;line-height:1.35}
 .kg-board-first .kg-stage .kg-toolbar h2{position:absolute!important;width:1px;height:1px;margin:-1px!important;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
 .kg-board-first .kg-stage .kg-toolbar{margin-bottom:8px}
 .kg-board-first .kg-stage .kg-toolbar .kg-score{margin:0}
 .kg-board-first .kg-play,.kg-playbar>.kp-button-secondary,.kg-settings>summary{min-height:52px}
 .kg-board-first .kg-stage>.kg-status{margin-top:10px}
}
