/* Authored learning scenes share a single readable play surface and real action dock. */
#game-root[data-challenge] .stage-inner { height:100%; min-height:0; }
#game-root[data-challenge] .stage { background:#fffaf0; }
.learn-scene { --learn-ink:#203f48; --learn-green:#286752; --learn-accent:#efd073; color:var(--learn-ink); width:100%; height:100%; min-height:0; display:flex; flex-direction:column; align-items:stretch; gap:10px; padding:12px; position:relative; isolation:isolate; container-type:inline-size; }
.learn-sky { position:absolute; z-index:-1; inset:0; display:flex; justify-content:space-between; padding:0 5%; font-size:70px; color:#7bbed44d; pointer-events:none; }
.learn-sky span:last-child { color:#ebc36770; }
.learn-step { margin:0; font-size:13px; font-weight:800; text-align:center; letter-spacing:.04em; color:#41665c; }
.learn-board { flex:1; min-height:0; display:flex; flex-wrap:wrap; align-content:center; justify-content:center; align-items:center; gap:14px; overflow:auto; overscroll-behavior:contain; padding:4px 4px 8px; }
.learn-status { font-size:16px; font-weight:700; text-align:center; margin:0; }
.learn-status:empty,.learn-actions:empty { display:none; }
.learn-actions { display:flex; justify-content:center; gap:8px; width:100%; flex-wrap:wrap; }
.learn-button,.learn-place,.learn-share-side,.learn-track-cell { min-width:48px; min-height:48px; border:2px solid #a7b8aa; border-radius:18px; background:#fffefa; color:#203f48; box-shadow:0 4px 0 #d2d8c9; font:inherit; font-weight:750; padding:10px 14px; cursor:pointer; touch-action:manipulation; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:5px; }
.learn-button:hover,.learn-place:hover,.learn-share-side:hover { border-color:#286752; }
.learn-button:focus-visible,.learn-place:focus-visible,.learn-share-side:focus-visible,.learn-track-cell:focus-visible { outline:4px solid #286752; outline-offset:3px; }
.learn-button[aria-pressed=true] { border-color:#286752; background:#e3f1e8; box-shadow:0 0 0 3px #efd073; }
.learn-button:disabled { opacity:1; cursor:default; color:#48605b; background:#e6eddf; box-shadow:none; }
.learn-actions>.learn-button { background:#286752; color:#fff; border-color:#1c4c3c; box-shadow:0 3px 0 #1b4437; flex:1; max-width:300px; }
.learn-actions>.learn-button:disabled { background:#48665a; color:#fff; }
.learn-choices { width:100%; max-width:800px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.learn-choices:has(> :nth-child(2):last-child) { grid-template-columns:repeat(2,minmax(0,1fr)); }
.learn-choices:has(> :nth-child(4):last-child) { grid-template-columns:repeat(4,minmax(0,1fr)); }
.learn-choices .learn-button { min-height:100px; font-size:clamp(17px,3cqw,25px); }
.learn-token { display:inline-flex; flex-direction:column; align-items:center; justify-content:center; font-size:52px; line-height:1.1; gap:5px; vertical-align:middle; }
.learn-token>span:not(.emoji):last-child { font-size:16px; line-height:1.15; }
.learn-token :is(svg,img) { width:1em; height:1em; object-fit:contain; }
.learn-token .emoji { font-size:1em; line-height:1; }
.learn-board>.learn-token { font-size:70px; }
.learn-reveal { font-size:110px!important; }
.learn-big-number { font-size:clamp(42px,9cqw,80px); line-height:1.1; color:#245d78; }
.learn-choices .learn-big-number { font-size:50px; }
.learn-right { border-color:#286752!important; background:#d6f0dc!important; }
.learn-miss { border-color:#ba732d!important; background:#fff2d6!important; }
.learn-choices .is-narrating,.learn-board .is-narrating { outline:4px solid #c99115; outline-offset:3px; border-radius:12px; }
.learn-group { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; max-width:100%; padding:6px; }
.learn-object { position:relative; display:flex; align-items:center; justify-content:center; min-width:32px; min-height:34px; }
.learn-object .learn-token { font-size:34px; }
.learn-count { position:absolute; right:-4px; top:-6px; background:#fff0a9; border:2px solid #966800; color:#3c390f; font-size:18px; border-radius:50%; min-width:26px; text-align:center; }
.learn-counted { background:#e0eedb; border-radius:8px; }
.learn-five-frame { display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:4px; width:300px; }
.learn-five-frame .learn-object { border:2px solid #799885; border-radius:8px; background:#fffefa; aspect-ratio:1; }
.learn-scattered { gap:20px; max-width:380px; }
.learn-scattered .learn-object:nth-child(even) { transform:translateY(10px); }
.learn-tray { width:min(100%,550px); min-height:96px; display:flex; align-items:center; justify-content:center; background:#e8efdc; border-radius:22px; padding:12px; }
.learn-ticket { border:2px dashed #9e7538; background:#fff0c0; border-radius:12px; padding:12px 22px; font-size:28px; font-weight:800; }
.learn-carriages,.learn-number-pool { display:flex; gap:9px; justify-content:center; flex-wrap:wrap; width:100%; }
.learn-carriages[hidden] { display:none; }
.learn-carriage { display:flex; align-items:center; justify-content:center; background:#e2edf0; border:2px solid #72949b; border-bottom:6px solid #3c6570; border-radius:12px; min-width:52px; min-height:58px; font-size:32px; font-weight:800; padding:4px; }
.learn-gap { border:3px dashed #98702b; background:#fff0bb; padding:8px; border-radius:10px; }
.learn-number-pool .learn-button { font-size:28px; min-width:58px; }
.learn-trace { width:min(100%,380px); height:min(100%,350px); min-height:170px; }
.learn-trace canvas { width:100%; height:100%; }
.learn-sharing { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; width:100%; max-width:700px; }
.learn-share-side { padding:8px; }
.learn-share-side>.learn-token { font-size:45px; }
.learn-equality { font-size:36px; font-weight:800; }
.learn-large-objects .learn-object .learn-token { font-size:42px; }
.learn-small-objects .learn-object .learn-token { font-size:28px; }
.learn-shelf,.learn-room { display:flex; gap:12px; width:100%; justify-content:center; }
.learn-shelf>.learn-button { flex:1; max-width:190px; }
.learn-place { flex:1; max-width:240px; min-height:90px; background:#e6efde; border-style:dashed; }
.learn-place>.learn-token~.learn-token { font-size:30px; }
.learn-plan { width:100%; text-align:center; background:#fff0ba; font-size:18px; font-weight:750; }
.learn-plan:empty { display:none; }
.learn-shelf [data-object] { border-top:8px solid var(--object-colour,#a7b8aa); }
.learn-pattern,.learn-band { width:100%; display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap; }
.learn-pattern .learn-token { font-size:38px; }
.learn-pattern-item { padding:3px; }
.learn-pattern-item.learn-unit { background:#fff0bd; border-block:2px solid #d6b653; }
.learn-shape { display:inline-flex; width:70px; height:70px; padding:8px; }
.learn-shape svg { width:100%; height:100%; }
.learn-shape-house { display:flex; flex-direction:column; align-items:center; }
.learn-shape-house>.learn-shape { width:120px; height:85px; padding:0; margin:-10px; }
.learn-memory { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; width:min(100%,650px); }
.learn-memory .learn-button { min-height:105px; font-size:35px; background:#e5eef2; }
.learn-memory .learn-token { font-size:40px; }
.learn-rhythm { display:flex; gap:20px; }
.learn-beat { background:#fff0af!important; outline:4px solid #bb8311; }
.learn-garage { width:180px; height:120px; background:#a9bbad; border:4px solid #577263; position:relative; display:flex; justify-content:center; align-items:flex-end; padding:10px; margin-top:35px; }
.learn-roof { position:absolute; inset:-38px -20px auto; height:40px; background:#ad6046; clip-path:polygon(50% 0,100% 100%,0 100%); }
.learn-door { position:absolute; z-index:1; width:70%; height:90%; background:repeating-linear-gradient(#607c7e 0 8px,#9bb0ae 9px 18px); bottom:0; border:3px solid #426466; transform-origin:top; transition:transform .4s; }
.learn-garage.door-open .learn-door { transform:scaleY(.12); }
.learn-garage.door-closed .learn-door { transform:scaleY(1); }
.learn-garage.roof-missing:not(.roof-on) .learn-roof { opacity:0; }
.learn-garage.roof-missing:not(.roof-on)::after { content:'💧 💧'; position:absolute; top:-42px; color:#27668c; font-size:28px; }
.learn-garage>.learn-token { transition:transform .4s; }
.learn-garage.car-outside>.learn-token { transform:translateX(-90px); z-index:2; }
.learn-drive { width:min(100%,580px); display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; touch-action:none; background:#abcaa1; padding:8px; border-radius:18px; }
.learn-track-cell { height:56px; min-width:0; padding:0; box-shadow:none; border:3px double #657875; border-radius:8px; background:#f4e8c8; }
.learn-track-cell .learn-token { font-size:38px; }
.learn-station { font-size:30px; font-weight:800; color:#203f48; border-radius:8px; background:#ffdb74; padding:4px 8px; }
.learn-steering { display:flex; gap:8px; width:100%; justify-content:center; }
.learn-steering .learn-button { font-size:27px; flex:1; max-width:80px; touch-action:none; }
.learn-hop-sky { width:100%; height:230px; position:relative; background:#264c69; border-radius:20px; }
.learn-hop-star { position:absolute; color:#ffe3a3; font-size:35px; border-bottom:5px solid #96bbc7; }
.learn-hopper { position:absolute; left:8%; bottom:22%; transform:translateY(-45px); transition:left .35s,bottom .35s; }
.learn-lit { color:#fff7bf; text-shadow:0 0 18px #ffd96a; }
.learn-block-house { display:flex; align-items:center; justify-content:center; gap:18px; min-height:130px; width:100%; background:#efe6ca; border-radius:18px; padding:14px; }
.learn-piece { display:inline-grid; grid-template-columns:repeat(3,24px); grid-template-rows:repeat(3,24px); gap:2px; }
.learn-piece i { background:#4a8279; border:2px solid #285749; border-radius:4px; }
.learn-block-gap .learn-piece i { background:#fffdf3; border:2px dashed #6e795f; }
.learn-built { background:#d9edcf; border:3px solid #42754b; }
.learn-built .learn-block-gap .learn-piece i { background:#4a8279; border-style:solid; }
.learn-outline { outline:4px solid #b78012; }
#game-root .intro-challenge { display:block; text-decoration:underline; text-underline-offset:3px; color:#28584f; font-size:15px; font-weight:750; margin-top:12px; padding:8px; min-height:44px; }
#game-root .practice-path-note { font-size:14px; color:#30594c; padding:6px; }
body.immersive #game-root[data-challenge] .stage { padding:6px; overflow:hidden; }
body.immersive .learn-scene { padding:5px; gap:6px; }
body.immersive .learn-step { font-size:11px; }
body.immersive .learn-status { font-size:13px; }
body.immersive .learn-board { gap:8px; }
@media(max-width:600px) {
 .learn-choices { gap:7px; }.learn-choices:has(> :nth-child(4):last-child) { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .learn-choices .learn-button { min-height:72px; font-size:17px; padding:6px; }
 .learn-token { font-size:36px; }.learn-token>span:not(.emoji):last-child { font-size:13px; }.learn-board>.learn-token { font-size:42px; }
 .learn-object .learn-token { font-size:27px; }.learn-group { gap:5px; }.learn-five-frame { width:235px; }
 .learn-choices .learn-group .learn-object { min-width:20px; min-height:24px; }.learn-choices .learn-group .learn-token { font-size:20px; }
 .learn-actions>.learn-button { padding:8px; font-size:15px; min-height:48px; }.learn-shelf,.learn-room { gap:7px; }.learn-shelf .learn-button,.learn-place { padding:5px; font-size:14px; }
 .learn-memory .learn-button { min-height:75px; }.learn-memory { gap:8px; }.learn-memory .learn-token { font-size:31px; }
 .learn-pattern .learn-token { font-size:28px; }.learn-carriage { min-width:40px; min-height:46px; font-size:25px; }.learn-carriages { gap:5px; }
 .learn-large-objects .learn-object .learn-token { font-size:31px; }.learn-small-objects .learn-object .learn-token { font-size:22px; }.learn-sharing { gap:8px; }
 .learn-drive { gap:2px; padding:5px; }.learn-track-cell { height:48px; }.learn-garage { width:115px; height:80px; }.learn-shape { width:58px;height:58px; }
}
@media(max-height:650px) {
 .learn-board { gap:6px; }.learn-step { display:none; }.learn-token { font-size:30px; }.learn-board>.learn-token { font-size:38px; }
 .learn-choices .learn-button { min-height:54px; }.learn-choices .learn-big-number { font-size:30px; }.learn-choices .learn-token { font-size:28px; }
 .learn-pattern .learn-token { font-size:23px; }.learn-memory .learn-button { min-height:65px; }.learn-memory .learn-token { font-size:26px; }
 .learn-hop-sky { height:160px; }.learn-track-cell { height:44px; }.learn-tray { min-height:55px; padding:6px; }.learn-ticket { padding:5px 12px;font-size:23px; }
 .learn-group { padding:2px; }.learn-object { min-height:26px; }.learn-object .learn-token { font-size:23px; }.learn-five-frame { width:200px; }
 .learn-trace { min-height:130px; }.learn-shape { width:50px; height:50px; }.learn-place { min-height:65px; }.learn-shape-house { display:none; }
}
@media(max-height:600px) and (orientation:landscape) {
 .learn-actions { flex-direction:column; }.learn-actions>.learn-button { max-width:none;width:100%;font-size:14px;min-height:44px;padding:5px; }
 .learn-steering { display:grid;grid-template-columns:repeat(2,1fr);gap:5px; }.learn-steering .learn-button { font-size:22px; padding:4px; min-height:44px; }
 .learn-drive { max-width:300px; }.learn-board>.learn-carriages { width:auto; }.learn-track-cell { height:39px; min-height:39px; }
 .learn-memory { grid-template-columns:repeat(6,1fr);gap:6px; }.learn-memory .learn-button { min-height:72px;font-size:22px;padding:5px; }
 .learn-group { max-width:280px; }.learn-sharing .learn-group { max-width:200px; }.learn-choices { max-width:580px; }
 .learn-shelf,.learn-room { width:48%; }.learn-shelf .learn-token,.learn-place .learn-token { font-size:28px; }.learn-shelf .learn-button,.learn-place { font-size:12px; min-width:44px; padding:4px; }
 .learn-board>.learn-pattern { width:auto; }.learn-board>.learn-block-house { width:45%; }.learn-block-house { min-height:100px;padding:6px; }.learn-piece { grid-template-columns:repeat(3,20px);grid-template-rows:repeat(3,20px); }
}
@media(prefers-reduced-motion:reduce) { .learn-hopper,.learn-door { transition:none; } }
/* Let the play objects carry more visual weight than the surrounding chrome. */
.learn-count-it .learn-board>.learn-group { border-bottom:10px solid #c29a65; border-radius:0 0 25px 25px; background:linear-gradient(transparent 50%,#f0e1bd 50%); padding:20px; min-width:70%; }
.learn-count-it .learn-board>.learn-group .learn-object { min-width:48px;min-height:48px;cursor:pointer;touch-action:manipulation; }
.learn-count-it .learn-board>.learn-group .learn-token { font-size:44px; }
.learn-count-it .learn-board>.learn-group .learn-counted { transform:translateY(8px); }
.learn-choices .learn-button { font-size:clamp(23px,4cqw,32px); }
.learn-letter-hunt .learn-board>.learn-token { font-size:100px; }
.learn-first-sounds .learn-board>.learn-token,.learn-rhyme-time .learn-board>.learn-token { font-size:90px; }
.learn-first-sounds .learn-choices .learn-token,.learn-rhyme-time .learn-choices .learn-token { font-size:55px; }
@media(max-width:600px) { .learn-choices .learn-button { font-size:22px; }.learn-choices .learn-button:has(.learn-token) { font-size:16px; } }
@media(max-height:650px) { .learn-count-it .learn-board>.learn-group { padding:4px;min-width:0; }.learn-count-it .learn-board>.learn-group .learn-token {font-size:30px;}.learn-letter-hunt .learn-board>.learn-token,.learn-first-sounds .learn-board>.learn-token,.learn-rhyme-time .learn-board>.learn-token {font-size:42px;}.learn-first-sounds .learn-choices .learn-token,.learn-rhyme-time .learn-choices .learn-token {font-size:30px;}.learn-choices .learn-button {font-size:20px;}.learn-track-cell {height:44px;min-height:44px;} }

/* Pictures remain large enough to carry the task's meaning on a phone. */
.learn-home-art { display:block; width:64px; height:64px; }
.learn-home-art svg { width:100%; height:100%; }
.learn-choices .learn-button { min-width:0; }
.learn-number-home { display:flex; flex-direction:column; align-items:center; width:100%; min-width:0; }
.learn-number-home .learn-group { width:100%; max-width:100%; gap:3px; padding:2px; }
.learn-number-home .learn-object { min-width:0; }
.learn-number-hunt .learn-board>.learn-big-number { flex-basis:100%; text-align:center; }
.learn-number-home>.learn-token { font-size:35px; }
.learn-ten-label { display:block; font-size:15px; margin-top:3px; }
.learn-ten-and-more .learn-object:nth-child(-n+10) { background:#e7efdf; border-color:#426953; }
.learn-ten-and-more .learn-object:nth-child(11) { grid-column:1; margin-top:10px; }
.learn-ten-and-more .learn-object:nth-child(n+12) { margin-top:10px; }
.learn-picture-route { position:relative; display:block; width:min(420px,95%); aspect-ratio:1.4; min-height:190px; }
.learn-picture-route [data-number] { position:absolute; transform:translate(-50%,-50%); min-width:44px; min-height:44px; width:44px; height:44px; padding:4px; border-radius:50%; z-index:1; }
.learn-dot-lines,.learn-star-lines { position:absolute; inset:0; pointer-events:none; }
.learn-dot-lines svg,.learn-star-lines svg { width:100%; height:100%; overflow:visible; }
.learn-picture-route svg { width:100%; height:100%; }
.learn-picture-route [data-number]:disabled { opacity:1; background:#e0efd9; color:#22534b; }
.learn-drawing-finished [data-number] { opacity:.55!important; }
.learn-turn-workshop { position:relative; width:160px; height:150px; }
.learn-turn-workshop>.learn-shape { position:absolute; width:130px; height:130px; inset:10px; }
.learn-turn-workshop .learn-turn-piece { opacity:.75; }
.learn-turn-workshop .learn-shape-slot svg { filter:drop-shadow(0 0 2px #294d45); }
.learn-star-lines path { opacity:0; }.learn-constellation .learn-star-lines path { opacity:1; }
.learn-hop-star { transform:translate(-50%,50%); }
.learn-hopper { transform:translate(-50%,-12px); }
@media(max-height:600px) and (orientation:landscape) {
 .learn-picture-route { width:240px; min-height:140px; }
 .learn-number-hunt .learn-board>.learn-big-number { flex-basis:auto; font-size:36px; }
 .learn-number-hunt .learn-choices:has(.learn-number-home) { width:calc(100% - 55px); }
 .learn-number-hunt .learn-choices:has(.learn-number-home) .learn-button { padding:5px; font-size:14px; }
 .learn-number-home>.learn-token { font-size:25px; }
 .learn-number-home .learn-five-frame .learn-object { height:25px; min-height:25px; aspect-ratio:auto; }
 .learn-turn-workshop { width:110px; height:105px; }.learn-turn-workshop>.learn-shape { width:90px; height:90px; }
 .learn-garage.car-outside>.learn-token { transform:translateX(-65px); }
 .learn-home-art { width:45px; height:45px; }
}
@media(prefers-reduced-motion:reduce) { .learn-garage>.learn-token { transition:none; } }
@media(max-width:600px) and (orientation:portrait) {
 .learn-number-hunt .learn-choices:has(.learn-number-home) { grid-template-columns:1fr; max-width:340px; }
 .learn-number-hunt .learn-choices:has(.learn-number-home) .learn-button { min-height:75px; gap:2px; }
 .learn-number-home { flex-direction:row; gap:8px; }
 .learn-number-home>.learn-token { font-size:32px; flex-shrink:0; }
 .learn-number-home .learn-group { flex:1; max-width:250px; }
 .learn-number-home .learn-group .learn-object { min-height:22px; }
 .learn-number-home .learn-five-frame .learn-object { height:28px; min-height:28px; aspect-ratio:auto; }
 .learn-number-home .learn-group .learn-token { font-size:20px; }
}
