/* Load last on every page. Keep the illustrated worlds and make text legible. */
:root { --accessible-ink:#3d3655; --accessible-muted:#4d5367; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
:is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
 outline:3px solid #492473 !important; outline-offset:3px !important;
 box-shadow:0 0 0 3px #fff !important;
}
:is(.skip,.search-skip):focus { position:fixed; inset:10px 12px auto auto; width:auto; height:auto; max-width:calc(100vw - 24px); z-index:9999; padding:12px 18px; color:#fff; background:#342247; border:2px solid #fff; border-radius:12px; }
:is(button,summary) { touch-action:manipulation; }
.accessibility-links { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:8px 14px; }
.accessibility-links a,.accessibility-links button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 13px; border:1px solid #c5b9d5; border-radius:24px; background:#fffdf8; color:#493760; font:14px/1.5 'Varela Round',Arial,sans-serif; text-decoration:underline; text-underline-offset:4px; cursor:pointer; }
.header .accessibility-statement-link { font-size:14px; }
.footer { flex-wrap:wrap; color:#4d5367; }
.footer button,.footer-brand span,.hero-notes,.hero-copy>p,.section-top>p,.section-kicker,
.age-game-orb small,.age-games-heading p,.age-page-intro,.subject-orb small,
.card-info p,.card-tag,.card-bottom,.puzzle-tools,.play-tip,.game-bottom,
.parent-learning,.parent-learning small,.path-counter,.return-copy p { color:#4d5367; }
:is(.hero-notes,.section-kicker,.game-bottom,.footer,.stage-button small,.subject-orb small,.age-game-orb small) { font-size:max(12px,0.75rem); }
.hero-portal .hero-notes,.hero-portal .eyebrow,.hero-portal .portal-content>p { color:#423653; }
.hero-portal .portal-content>p { background:#fffcf3eb; border-radius:12px; padding:8px; }
.game-dialog[data-world] .game-status { color:#2b573e; }
.game-dialog[data-world] .game-status.error { color:#813c26; }
.game-dialog[data-world] :is(.quiz-prompt,.game-ribbon small,.game-bottom) { color:#4d5367; }
.game-dialog[data-world] .completion-actions .completion-primary { background:#76519c; color:white; }
.subject-orb { --orb-ink:#493760; }
.game-dialog :is(button,.icon-button),.info-dialog :is(button,.icon-button) { min-height:44px; }
.game-dialog .icon-button,.info-dialog .icon-button { min-width:44px; width:44px; height:44px; }
.game-dialog :is(.small-button,.game-voice-tools button),.info-dialog .small-button { white-space:normal; }
.game-tools,.game-voice-tools,.game-meta,.puzzle-tools { flex-wrap:wrap; }
.game-dialog .game-tools { gap:8px; }
.game-body,.game-body>* { min-width:0; max-width:100%; }
.game-dialog .game-header>div { min-width:0; }
.game-dialog .game-header h2 { overflow-wrap:anywhere; }
.memory-continue { margin:12px 0; }
.recall-step { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:10px; padding:12px; background:#fffdf5; color:#3d3655; border:2px solid #b4a1c8; border-radius:18px; }
.recall-step p { flex-basis:100%; text-align:center; }
.sudoku-cell[aria-pressed="true"],.adv-stage [aria-pressed="true"] { border-style:double; }
.accessibility-page { max-width:850px; }
.accessibility-page section { background:#fff; padding:20px 24px; border:1px solid #cbd9e3; border-radius:20px; margin:22px 0; }
.accessibility-page a { text-decoration:underline; text-underline-offset:4px; }
.accessibility-page :is(p,li) { max-width:72ch; overflow-wrap:anywhere; }
.accessibility-page li { margin-block:8px; }
.accessibility-page .accessibility-status { border-inline-start:5px solid #8060a0; background:#fff9ec; padding:14px 18px; border-radius:12px; }
@media(max-width:600px) {
 .header { height:auto; min-height:100px; flex-wrap:wrap; gap:10px; padding-block:12px; }
 .header nav { flex-wrap:wrap; }
 .game-dialog .game-header { gap:10px; padding:16px 13px; flex-wrap:wrap; }
 .game-dialog .game-tools { flex-basis:100%; justify-content:flex-end; }
 .game-dialog .game-meta,.game-dialog .game-body { padding-inline:12px; }
 .game-dialog .game-bottom { gap:10px; flex-wrap:wrap; }
 .footer { padding-bottom:105px; }
 .footer .accessibility-links { width:100%; }
 .info-dialog { padding:64px 18px 24px; }
 .info-dialog .info-close { top:10px; left:10px; }
 .accessibility-page section { padding:16px; }
}
@media(max-width:380px) { .wrap { padding-inline:14px; } .game-dialog .quiz-answers { gap:8px; } }
html[data-reduce-motion="true"],html[data-reduce-motion="true"] * { scroll-behavior:auto !important; }
html[data-reduce-motion="true"] *,html[data-reduce-motion="true"] *::before,html[data-reduce-motion="true"] *::after { animation:none !important; transition:none !important; }
html[data-reduce-motion="true"] .celebration-star { display:none; }
@media(prefers-reduced-motion:reduce) {
 html,html * { scroll-behavior:auto !important; }
 *,*::before,*::after { animation:none !important; transition:none !important; }
 .celebration-star { display:none; }
}
@media(forced-colors:active) {
 :is(a,button,input,select,summary,[role="button"]) { forced-color-adjust:auto; }
 :is(a,button,input,select,summary,[tabindex]):focus-visible { outline:3px solid Highlight !important; box-shadow:none !important; }
 button,[role="button"] { border:2px solid ButtonText !important; }
 [aria-pressed="true"] { outline:3px double Highlight; }
 .shape,.quiz-toy,.animal-sprite,.vocab-sprite { forced-color-adjust:none; }
}

.info-mute { display:block; margin:8px 0 18px; padding:8px 15px; min-height:44px; color:#493760; background:#fff; border:1px solid #b9a6cd; border-radius:24px; }
/* A stable dark backing avoids low contrast on the pastel game themes. */
.game-dialog .adv-shell .adv-primary { background:#664681 !important; color:#fff !important; }
.return-to-game>button,.path-continue { background:#76519c; color:#fff; }
.age-game-play { background:#76519c; }
.game-dialog[data-world] .completion-actions .completion-primary:hover { background:#664681; }
.info-dialog .button.primary,.game-dialog .button.primary { background:#664681; color:#fff; }
.learning-bottom .path-continue { background:#76519c; color:#fff; }
#stages .section-kicker { color:#493760; }

/* Long game titles and all three human-audio controls need separate rows on phones. */
@media(max-width:480px){
 .game-dialog .game-header{display:grid;grid-template-columns:44px minmax(0,1fr);gap:10px;padding:12px 13px;align-items:start}
 .game-dialog .game-header>.close-dialog{grid-column:1;grid-row:1;align-self:start}
 .game-dialog .game-header>div:not(.game-tools){grid-column:2;grid-row:1;min-width:0}
 .game-dialog .game-header .game-tools{grid-column:1/-1;grid-row:2;display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;width:100%}
 .game-dialog .game-header .game-tools .icon-button{width:44px;min-width:44px;height:44px;min-height:44px}
 .game-dialog .game-header h2{font-size:20px;line-height:1.3;overflow-wrap:normal;word-break:normal}
}

/* The device setting explains a read-only motion state; keep its text legible. */
[data-motion-toggle]:disabled{opacity:1;cursor:default}
