/* Shared card-game settings. Keep related controls consistent. */
.game-settings{box-sizing:border-box!important;display:block!important;max-width:920px!important;margin:20px auto!important;padding:18px!important;border:1px solid #d8cbe5!important;border-radius:18px!important;background:#fff!important;color:#332255!important;text-align:left!important;font-family:'Trebuchet MS',Arial,sans-serif!important}
.game-settings .game-settings-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}.game-settings .game-settings-heading h2{font-size:18px!important;line-height:1.2!important;margin:0!important;color:#332255!important;letter-spacing:0!important}
.game-settings .game-settings-fields{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;align-items:end!important;gap:14px!important;margin:0!important}
.game-settings label{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important;color:#655075!important;font-size:14px!important;font-weight:700!important;text-align:left!important}
.game-settings select,.game-settings input:not([type=checkbox]){box-sizing:border-box!important;width:100%!important;max-width:none!important;min-height:46px!important;background:#fff!important;color:#332255!important;border:1px solid #bca9d5!important;border-radius:10px!important;padding:10px 12px!important;font:400 15px 'Trebuchet MS',Arial,sans-serif!important}
.game-settings select:focus-visible,.game-settings input:focus-visible{outline:3px solid #7050c6!important;outline-offset:2px}.game-settings .game-settings-heading button{min-height:44px!important;padding:9px 14px!important;font:700 14px 'Trebuchet MS',Arial,sans-serif!important;background:#f5effc!important;color:#61498a!important;border:1px solid #d8cbe5!important;border-radius:12px!important;box-shadow:none!important}
.game-settings details{margin:16px 0 0!important;padding:0!important;text-align:left!important;max-width:none!important}.game-settings summary{font-size:14px!important;font-weight:700!important;cursor:pointer;color:#655075!important}.game-settings details .settings{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-top:14px}.game-settings label:has(input[type=checkbox]){flex-direction:row!important;align-items:center!important}.game-settings .game-settings-help{font-size:13px!important;line-height:1.5!important;color:#726083!important;margin:12px 0 0!important}
a.game-school-back,#phonics-game a.game-school-back{display:inline-flex!important;align-items:center!important;min-height:44px!important;padding:8px 14px!important;border:1px solid #d8cbe5!important;border-radius:12px!important;background:#fff!important;color:#61498a!important;font:700 14px 'Trebuchet MS',Arial,sans-serif!important;text-decoration:none!important}
@media(max-width:540px){.game-settings{padding:14px!important;margin:16px auto!important}.game-settings .game-settings-fields{grid-template-columns:1fr!important}}
/* Settings fold away on phones; live score and cards stay outside. */
.game-settings .game-settings-fold{margin:0!important;padding:0!important;border:0!important;background:transparent!important}.game-settings .game-settings-fold>summary{font-size:16px!important;line-height:24px!important;color:#332255!important;min-height:28px;list-style:disclosure-closed}.game-settings .game-settings-fold[open]>summary{list-style:disclosure-open;margin-bottom:14px}.game-settings .game-settings-content .game-settings-heading:empty{display:none}.game-settings .game-settings-content .st-options{display:flex;flex-wrap:wrap;align-items:end;gap:14px;margin:16px 0 0;padding-top:16px;border-top:1px solid #e7dff0}.game-settings .st-options label{flex:1;min-width:150px}.game-settings .st-options button{min-height:46px}.game-settings .game-settings-heading{justify-content:flex-end}
@media(max-width:700px){
.game-settings{padding:12px 14px!important;margin:12px auto!important}.game-settings .game-settings-fold>summary{min-height:28px!important}.game-settings .game-settings-content .st-options{display:grid;grid-template-columns:1fr;width:100%}
#cards.cards,#phonics-game #ph-cards.ph-cards{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;max-width:420px!important;gap:22px!important;margin:14px auto 24px!important}
#cards.cards>.card,#cards.cards>.play-card,#phonics-game #ph-cards>.ph-card{width:100%!important;min-height:0!important;aspect-ratio:1!important;box-sizing:border-box!important}
#cards .numeral{font-size:clamp(60px,18vw,90px)!important}#cards .size-5 .numeral,#cards .size-6 .numeral{font-size:clamp(52px,15vw,72px)!important}
#phonics-game .ph-item{font-size:clamp(28px,8vw,42px)!important}#phonics-game .items-5 .ph-item{font-size:clamp(24px,7vw,34px)!important}
#phonics-game a.game-school-back{white-space:nowrap}.st-options{gap:10px}.st-live{flex-wrap:wrap;font-size:14px}
}
/* Phase One: compact, consistent headings and centred challenges. */
.game-header,#phonics-game .game-header{display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:1060px;margin:0 auto;padding:18px 20px;color:#332255;background:transparent;box-sizing:border-box}
.game-header h1,#phonics-game .game-header h1{font:900 clamp(22px,3vw,32px)/1.15 'Trebuchet MS',Arial,sans-serif;margin:0;letter-spacing:-.5px;text-align:left}.game-header h1 a{color:inherit;text-decoration:none}.game-header .game-school-back{margin-left:auto;flex-shrink:0}.game-instruction,#phonics-game .game-instruction{font:400 16px/1.5 'Trebuchet MS',Arial,sans-serif;text-align:center;color:#6d5b80;max-width:680px;margin:4px auto 18px}.game-fullscreen{position:fixed;bottom:12px;right:12px;z-index:20;font-size:12px;padding:6px 10px;min-height:36px}
[data-spot-timer].game-timer-empty{display:none!important}#phonics-game .ph-focus:empty{display:none}#phonics-game .ph-focus{margin:6px auto 12px}.game-phase-open{overflow:hidden}.game-phase-overlay[hidden]{display:none!important}.game-phase-overlay{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:20px;background:#24163ac9;backdrop-filter:blur(5px);box-sizing:border-box;overscroll-behavior:contain}.game-phase-box{width:min(100%,780px);max-height:calc(100dvh - 40px);overflow:auto;background:#fff7de;border:3px solid #e8ba57;border-radius:28px;box-shadow:0 20px 80px #0005;text-align:center;color:#332255;font-family:'Trebuchet MS',Arial,sans-serif;padding:clamp(22px,4vw,48px);box-sizing:border-box}.game-phase-box>div{margin:0}.game-phase-box .ph-power,.game-phase-box .power{background:none;border:0;box-shadow:none;margin:0;padding:0;max-width:none}.game-phase-box .eyebrow,.game-phase-box .ph-label{font-size:13px;letter-spacing:1.5px;color:#82612e;font-weight:700;margin-bottom:22px}.game-phase-box .ph-sentence{font-size:clamp(32px,6vw,56px);font-weight:800;line-height:1.4;margin:10px 0 26px}.game-phase-box mark{background:#dfcaf8;color:#422767;border-radius:7px;padding:0 5px}.game-phase-box small{display:block;font-size:15px;line-height:1.4;margin:12px 0 24px;color:#7a654b}.game-phase-box .equation{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;font-size:clamp(38px,7vw,70px);font-weight:900;line-height:1.4;margin:18px 0 26px}.game-phase-box input{font:inherit;width:2.8ch;min-width:90px;max-width:140px;border:3px solid #8f6bce;border-radius:14px;padding:8px;text-align:center;box-sizing:content-box;background:#fff;color:#332255}.game-phase-box button{display:block;min-height:52px;margin:18px auto 0;padding:14px 26px;border:0;border-radius:24px;background:#7752c7;color:#fff;font:800 18px 'Trebuchet MS',Arial,sans-serif;cursor:pointer}.game-phase-box button:focus-visible{outline:4px solid #2f6fbb;outline-offset:4px}.game-success>span{font-size:58px;color:#e8a923}.game-success h2{font-size:clamp(30px,5vw,48px);line-height:1.2;margin:14px 0 26px}.game-fireworks{position:fixed;inset:0;pointer-events:none;z-index:2200;overflow:hidden}.game-fireworks i{position:absolute;left:var(--x);top:var(--y);width:8px;height:8px;border-radius:50%;box-shadow:0 0 12px currentColor;opacity:0;animation:game-burst 1.4s var(--delay) ease-out both}@keyframes game-burst{0%{opacity:0;transform:translate(0,0) scale(.2)}15%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.3)}}
#phonics-game{isolation:auto!important}#phonics-game .ph-header{margin:0}#phonics-game .ph-actions{text-align:center}#action{margin:20px auto}#game .actions{text-align:center}
/* Even spacing for all supported card quantities, without white rectangles covering neighbours. */
#cards.cards>.card>.symbol{width:32%!important;height:32%!important;rotate:0deg!important;transform:none!important;mix-blend-mode:multiply;overflow:visible;border-radius:10px!important}
#cards.cards>.card>.place-0{left:34%!important;top:2%!important;right:auto!important;bottom:auto!important}#cards.cards>.card>.place-1{left:66%!important;top:34%!important;right:auto!important;bottom:auto!important}#cards.cards>.card>.place-2{left:34%!important;top:66%!important;right:auto!important;bottom:auto!important}#cards.cards>.card>.place-3{left:2%!important;top:34%!important;right:auto!important;bottom:auto!important}
#cards.cards>.card:is(.size-5,.size-6)>.symbol{width:25%!important;height:25%!important}#cards.cards>.card:is(.size-5,.size-6)>.place-0{left:37.5%!important;top:4.5%!important}#cards.cards>.card:is(.size-5,.size-6)>.place-1{left:67%!important;top:27%!important}#cards.cards>.card:is(.size-5,.size-6)>.place-2{left:55.5%!important;top:63.5%!important}#cards.cards>.card:is(.size-5,.size-6)>.place-3{left:19.5%!important;top:63.5%!important}#cards.cards>.card:is(.size-5,.size-6)>.place-4{left:8%!important;top:27%!important}#cards.cards>.card.size-6>.place-5{left:37.5%!important;top:35.5%!important}#cards .symbol .objects{width:92%;height:auto;aspect-ratio:1;align-content:center}#cards .symbol .hands{width:94%;height:94%}
@media(max-width:700px){.game-header,#phonics-game .game-header{padding:12px 4px;gap:10px;align-items:center;flex-wrap:wrap}.game-header h1,#phonics-game .game-header h1{font-size:23px}.game-header .game-school-back{font-size:12px!important;padding:6px 9px!important}.game-instruction,#phonics-game .game-instruction{font-size:14px;margin:0 auto 12px}.game-phase-overlay{padding:12px}.game-phase-box{max-height:calc(100dvh - 24px);padding:24px 16px;border-radius:22px}.game-phase-box .ph-sentence{font-size:clamp(30px,8vw,42px)}.game-phase-box .equation{font-size:clamp(34px,9vw,48px);gap:8px}.game-phase-box input{min-width:64px;padding:6px}.game-phase-box button{font-size:17px}.game-phase-box .eyebrow{margin-bottom:12px}.game-phase-box .equation{margin:12px 0 18px}}
@media(prefers-reduced-motion:reduce){.game-fireworks{display:none}.game-phase-overlay *{animation:none!important;scroll-behavior:auto!important}}
.game-settings .st-options button{background:#7752c7;color:white;border:0;border-radius:20px;padding:12px 20px;font:700 16px 'Trebuchet MS',Arial,sans-serif}.game-settings .st-options button:disabled{opacity:.5}.game-top h2{font-size:24px;line-height:1.2;margin:0;color:#332255}.game-header .game-school-back{font-size:14px!important}.game-phase-box [role=status]:empty{display:none}

/* A short discovery after each Topics match; shares the central game overlay. */
.topic-fact-card{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;max-width:600px;margin:auto}
.topic-fact-card>img{width:210px;height:155px;object-fit:contain;mix-blend-mode:multiply}
.topic-fact-card h2{font-size:clamp(26px,5vw,38px);line-height:1.15;margin:0}
.topic-fact-card .topic-fact-text{font-size:clamp(22px,4.8vw,30px);line-height:1.4;margin:0;max-width:27ch;color:#173d3d}
.topic-fact-card small{font-size:14px;color:#526564}
.topic-fact-card small:empty{display:none}
.topic-fact-card .game-next{margin:8px auto 0}
@media(max-height:650px){.topic-fact-card{gap:8px}.topic-fact-card>img{height:100px}.topic-fact-card .topic-fact-text{font-size:22px}}
