#gameShell.is-classroom{position:fixed;inset:0;z-index:100;width:100%;height:100dvh;max-width:none;min-height:0;margin:0;border:0;border-radius:0;overflow:hidden;display:flex;flex-direction:column;background:#fffaf8;color:var(--classroom-ink)}
#gameShell.is-classroom .toolbar{flex:none;padding:8px 16px;gap:8px}
#gameShell.is-classroom .toolbar .tools{gap:10px;flex:1;justify-content:flex-end}
#gameShell.is-classroom .stat{min-width:90px;font-size:14px;padding:6px 10px}
#gameShell.is-classroom .stat strong{font-size:24px}
#gameShell.is-classroom .stat:not(:first-child),#gameShell.is-classroom .phase-track,#gameShell.is-classroom #restartBtn,#gameShell.is-classroom .mission small,#gameShell.is-classroom .mission-icon,#gameShell.is-classroom .board-tag,#gameShell.is-classroom .case-note{display:none}
#gameShell.is-classroom .tool{min-height:52px;font-size:22px;padding:8px 16px;color:#30323a}
#gameShell.is-classroom .progress{flex:none;height:4px}
#gameShell.is-classroom .play{flex:1;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px;padding:10px 16px 12px}
#gameShell.is-classroom .mission{padding:10px 16px;flex:none}
#gameShell.is-classroom .mission strong{font-size:var(--classroom-task);line-height:1.18;margin:0;color:#30303c}
#gameShell.is-classroom .workbench,#gameShell.is-classroom .workbench.free-plans{min-height:0;display:grid;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr)}
#gameShell.is-classroom[data-classroom-view=model] #controls,#gameShell.is-classroom[data-classroom-view=answer] #boardHost{display:none}
#gameShell.is-classroom .board{min-height:0;padding:10px 18px;display:flex;flex-direction:column;justify-content:center;gap:8px}
#gameShell.is-classroom .board::before{display:none}
#gameShell.is-classroom .board>*{flex-shrink:0}
#gameShell.is-classroom .controls{min-height:0;display:flex;flex-direction:column;justify-content:center;padding:18px clamp(20px,6vw,110px);gap:12px;background:#fff}
#gameShell.is-classroom .controls h2{font-size:var(--classroom-task);margin:0;color:#30303c}
#gameShell.is-classroom .controls>p{font-size:var(--classroom-body);line-height:1.25;margin:0;color:var(--classroom-muted)}
#gameShell.is-classroom .choice-list{gap:12px}
#gameShell.is-classroom .choice{min-height:68px;font-size:var(--classroom-choice);line-height:1.2;padding:14px 20px;color:#292d38}
#gameShell.is-classroom .check,#gameShell.is-classroom .next{font-size:var(--classroom-choice);min-height:58px;padding:10px 20px;margin:0}
#gameShell.is-classroom .bottom{display:flex;align-items:stretch;gap:12px}
#gameShell.is-classroom .feedback{flex:1;min-height:52px;font-size:var(--classroom-body);line-height:1.2;padding:10px 14px;color:#303541}
#gameShell.is-classroom .feedback.good{color:#145b32;border:2px solid #478863;background:#d7efdf}
#gameShell.is-classroom .feedback.bad{color:#85243d;border:2px solid #bd566e;background:#fce1e6}
#gameShell.is-classroom .draw-instruction{font-size:var(--classroom-body);margin:0;text-align:center;color:var(--classroom-muted)}
#gameShell.is-classroom #gardenGrid,#gameShell.is-classroom #stoneGrid,#gameShell.is-classroom #groupModel{flex:1;min-height:0;height:100%;max-height:none;max-width:none;width:100%}
#gameShell.is-classroom #drawPlans{width:min(900px,100%);margin:0 auto}
#gameShell.is-classroom .garden-slot{min-height:58px}
#gameShell.is-classroom .garden-slot strong,#gameShell.is-classroom .slot-check{font-size:var(--classroom-choice)}
#gameShell.is-classroom .garden-slot .remove-garden{height:44px;width:44px;font-size:28px;right:2px;top:4px}
#gameShell.is-classroom .garden-slot.revealed{padding-right:38px}
#gameShell.is-classroom .stone-builder{flex:1;min-height:0;max-width:none;gap:20px}
#gameShell.is-classroom .stone-reserve{flex-basis:230px}
#gameShell.is-classroom .stone-reserve strong{font-size:24px}
#gameShell.is-classroom #reserveStones{height:210px}
#gameShell.is-classroom #reserveStones span{width:24px;height:24px}
#gameShell.is-classroom #squareEquation{font-size:var(--classroom-task);min-height:40px}
#gameShell.is-classroom .group-pairs{gap:10px;margin:0}
#gameShell.is-classroom .group-pairs span{font-size:var(--classroom-body);padding:5px 15px;color:#493765}
#gameShell.is-classroom .group-pairs .found{color:#145b32}
#gameShell.is-classroom .group-equation{margin:4px auto;width:min(760px,100%);gap:20px}
#gameShell.is-classroom .group-equation span{font-size:var(--classroom-body)}
#gameShell.is-classroom .group-equation b{font-size:40px}
#gameShell.is-classroom .group-value{font-size:44px;min-height:64px;max-width:180px}
#gameShell.is-classroom .group-keypad{width:min(760px,100%);margin:0 auto;grid-template-columns:repeat(6,1fr);gap:10px}
#gameShell.is-classroom .group-keypad button{font-size:34px;min-height:60px}
#gameShell.is-classroom .shelf-game{flex:1;min-height:0;max-width:none;width:100%;grid-template-columns:minmax(280px,.65fr) minmax(0,1.35fr);gap:24px;margin:0}
#gameShell.is-classroom .shelf-rack{display:grid;grid-template-rows:repeat(5,minmax(0,1fr));min-height:0}
#gameShell.is-classroom .shelf-row{min-height:0;padding:6px 10px;gap:10px;border-bottom-width:5px}
#gameShell.is-classroom .shelf-name{font-size:24px;flex-basis:85px}
#gameShell.is-classroom .shelf-name small{font-size:20px}
#gameShell.is-classroom .box-store strong{font-size:24px}
#gameShell.is-classroom .box-items{gap:8px;min-height:0}
#gameShell.is-classroom .packing-box{width:clamp(34px,3.2vw,52px);height:clamp(34px,3.2vw,52px);flex-basis:clamp(34px,3.2vw,52px)}
#gameShell.is-classroom .packing-box:before{left:42%;width:16%}
#gameShell.is-classroom .target-number{width:180px;height:100px;margin:0 auto 12px}
#gameShell.is-classroom .target-number strong{font-size:58px}
#gameShell.is-classroom .target-number small{font-size:20px}
#gameShell.is-classroom .evidence-strip{gap:14px;margin:8px 0}
#gameShell.is-classroom .evidence-chip{font-size:32px;padding:12px 20px}
#gameShell.is-classroom .array-caption{font-size:var(--classroom-body);line-height:1.25;margin:12px auto;max-width:1050px;color:#303541}
#gameShell.is-classroom .generalization-models{flex:1;min-height:0;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:16px}
#gameShell.is-classroom .generalization-example{min-height:0;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;text-align:center;padding:16px}
#gameShell.is-classroom .generalization-example svg{min-height:0;height:100%;max-height:none}
#gameShell.is-classroom .generalization-example strong{font-size:var(--classroom-task)}
#gameShell.is-classroom .generalization-example span{font-size:var(--classroom-body)}
#gameShell.is-classroom .number-button{font-size:var(--classroom-choice);min-height:76px;padding:14px}
#gameShell.is-classroom .garden-result{font-size:var(--classroom-body);min-height:0;padding:16px}
#gameShell.is-classroom .garden-result strong,#gameShell.is-classroom .garden-result b{font-size:var(--classroom-task)}
#gameShell.is-classroom .garden-result em,#gameShell.is-classroom .garden-result span{font-size:var(--classroom-body)}
/* On short displays, reduce surrounding furniture, never the answer text. */
@media(max-height:700px){#gameShell.is-classroom .toolbar{padding:4px 12px}#gameShell.is-classroom .play{padding:6px 12px;gap:6px}#gameShell.is-classroom .mission{padding:6px 12px}#gameShell.is-classroom .controls{gap:8px;padding:10px 24px}#gameShell.is-classroom .controls>p{display:none}#gameShell.is-classroom .choice{padding:8px 14px;min-height:54px}#gameShell.is-classroom .shelf-name small{display:none}#gameShell.is-classroom .generalization-example{padding:8px}#gameShell.is-classroom .target-number{height:75px}#gameShell.is-classroom .garden-result.empty span{display:none}}
@media(max-width:900px) and (orientation:portrait){#gameShell.is-classroom .generalization-models{grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr))}#gameShell.is-classroom .generalization-example{grid-template-columns:minmax(0,1fr) minmax(220px,.7fr);grid-template-rows:minmax(0,1fr)}#gameShell.is-classroom #planSoundBtn{display:none}#gameShell.is-classroom .shelf-game{grid-template-columns:230px minmax(0,1fr)}#gameShell.is-classroom .packing-box{width:34px;height:34px;flex-basis:34px}#gameShell.is-classroom .shelf-name{flex-basis:65px}#gameShell.is-classroom .box-items{gap:5px}}
@media(max-height:700px){
 #gameShell.is-classroom .stone-reserve{padding:10px}
 #gameShell.is-classroom #reserveStones{height:150px}
 #gameShell.is-classroom #reserveStones span{width:18px;height:18px}
 #gameShell.is-classroom:has(.group-keypad) .controls h2{display:none}
 #gameShell.is-classroom:has(#gardenStage) .evidence-chip:not(.found){display:none}
 #gameShell.is-classroom:has(#gardenStage) .garden-result{padding:8px;margin:0;min-height:0}
 #gameShell.is-classroom:has(#gardenStage) .evidence-strip{margin:4px 0}
}
#gameShell.is-classroom #finishLayer .modal{width:min(1000px,94vw);padding:28px}
#gameShell.is-classroom #finishLayer h2{font-size:40px}
#gameShell.is-classroom #finishLayer p,#gameShell.is-classroom #finishLayer .summary,#gameShell.is-classroom #finishLayer a{font-size:24px;line-height:1.3}
#gameShell.is-classroom #finishLayer .summary strong{font-size:32px}
#gameShell.is-classroom #finishLayer .start{min-height:60px;font-size:28px}
#gameShell.is-classroom:has(#gardenStage) .target-number{display:none}
#gameShell.is-classroom:has(#gardenStage) .evidence-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:12px}
#gameShell.is-classroom:has(#gardenStage) .evidence-chip{font-size:28px;padding:10px;white-space:normal;text-align:center;justify-content:center}
#gameShell.is-classroom #finishLayer .summary,#gameShell.is-classroom #finishLayer .modal-icon{display:none}
#gameShell.is-classroom #finishLayer h2{margin:0 0 12px}
#gameShell.is-classroom #finishLayer p{margin:12px 0}
