.variety-game .variety-surface{position:relative;display:flex;align-items:center;justify-content:center;min-height:0;padding:12px 0}.variety-stage{overflow:visible}.variety-workspace .run-button{margin:0;min-height:44px}.variety-workspace .extra-actions{flex-wrap:nowrap}.variety-game .surface>div[id=board]{width:100%;max-width:480px;aspect-ratio:1;min-width:0;flex:none}.variety-game .stage-header{color:#cbd5e9}.variety-game .extra-task{min-height:24px}.variety-game button:focus-visible{outline:3px solid #ffe878;outline-offset:2px}
.parking-board{position:relative;background-color:#354157;background-image:linear-gradient(#64718a44 1px,transparent 1px),linear-gradient(90deg,#64718a44 1px,transparent 1px);background-size:16.6667% 16.6667%;border:3px solid #8190a9;border-right-color:#96da8a;border-radius:9px;touch-action:none}.park-car{position:absolute;padding:5px;border:4px solid #354157;border-radius:10px;background:var(--car-color);color:#222b3e;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:clamp(16px,4vw,27px);font-weight:800;touch-action:none;cursor:grab}.park-car small{font-size:16px;line-height:16px}.park-car.target-car{background:#ff8978;color:#401f21}.park-car.selected-car{outline:3px solid white;outline-offset:-4px;z-index:2}.park-exit{position:absolute;z-index:4;right:0;top:0;background:#cdeb87;color:#243721;padding:2px 7px;border-radius:5px;font-size:12px;font-weight:800;pointer-events:none}.parking-controls{display:flex;align-items:center;gap:8px}.parking-controls button{height:44px;min-width:70px;border-radius:9px;border:1px solid #cbd3e3;background:#edf1f8;font-size:27px}.parking-controls strong{flex:1;text-align:center;font-size:15px}
.balance-board{display:flex;flex-direction:column;justify-content:center;gap:12px;color:#f4f6fc}.balance-title,.weight-label,.sorting-label{font-size:12px;letter-spacing:1px;text-align:center;color:#bfcae0;display:block}.balance-pans{display:grid;grid-template-columns:1fr 27px 1fr;gap:6px;align-items:start}.balance-pan{min-height:148px;max-height:220px;border:2px solid #85b9e6;border-bottom:6px solid #85b9e6;border-radius:18px;background:#344b6d;color:white;display:flex;flex-direction:column;align-items:center;gap:5px;padding:8px;overflow:auto}.right-pan{border-color:#c4a8f5;background:#4a416b}.pan-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;background:transparent;border:0;color:white;width:100%;min-height:66px}.pan-drop small{font-size:12px;letter-spacing:1px}.pan-drop strong{font-size:32px;line-height:38px}.pan-items{display:flex;flex-wrap:wrap;gap:4px;justify-content:center;min-height:38px}.balance-sign{font-size:28px;align-self:center;text-align:center;color:#e1ebff}.balance-beam{width:82%;height:5px;background:#d9e4f5;align-self:center;border-radius:3px;transition:transform .2s}.weight-tray{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:7px;min-height:48px}.weight{border:2px solid #ffdfa1;background:#ffe5a5;color:#342e22;border-radius:50%;width:44px;height:44px;min-width:44px;font-size:18px;font-weight:800;touch-action:none}.pan-items .weight{width:36px;height:36px;min-width:36px;font-size:16px}.chosen-weight{outline:3px solid white;outline-offset:2px}.all-placed{font-size:14px;color:#d6e0f3}
.mosaic-board{display:grid;grid-template-columns:repeat(var(--n),1fr);grid-template-rows:repeat(var(--n),1fr);gap:3px;padding:6px;background:#77829c;border:3px solid #c9bfed;border-radius:12px}.mosaic-cell{min-width:0;min-height:0;background:#253148;border:1px solid #c9d7eb55;border-radius:5px;color:#233248;font-size:18px;font-weight:800;padding:0}.piece-tray{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}.piece-choice{min-width:48px;min-height:46px;padding:6px;border:1px solid #bbc8dc;background:#eff2f8;border-radius:9px;display:flex;align-items:center;justify-content:center;gap:5px}.piece-choice b{font-size:13px}.piece-choice.selected-piece{background:#e0d4ff;border:2px solid #8068b3}.piece-choice:disabled{opacity:.35}.mini-piece{display:grid;gap:1px;align-content:center;justify-content:center}.mini-piece i{background:var(--piece-color);border:1px solid #2a345533;border-radius:1px}
.sorting-board{display:flex;flex-direction:column;justify-content:center;gap:22px}.sorting-tubes{display:flex;gap:8px;justify-content:center;align-items:stretch}.sort-tube{display:flex;flex-direction:column;align-items:center;gap:8px;background:none;border:0;color:white;min-width:0;flex:1;max-width:68px;padding:0}.tube-content{width:100%;display:flex;flex-direction:column-reverse;align-items:center;justify-content:flex-start;gap:5px;padding:8px 3px;border:2px solid #b2bfd8;border-top:0;border-radius:0 0 20px 20px;background:#7c91b01b}.sort-ball,.empty-ball{display:grid;place-items:center;width:100%;max-width:42px;aspect-ratio:1;border-radius:50%;font-size:21px;font-style:normal;font-weight:700;min-height:24px}.empty-ball{background:#d8e7ff0d;border:1px dashed #b2bfd840}.color-0{background:#ffafa0;color:#65312a}.color-1{background:#9bd4ff;color:#163d63}.color-2{background:#bce693;color:#385720}.color-3{background:#d0b6ff;color:#4c2f6f}.selected-tube .tube-content{outline:3px solid #fff09f;outline-offset:2px;background:#ead99122}.sort-tube b{font-size:14px}.sort-tube.selected-tube{transform:translateY(-7px)}
.recipe-board{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px}.recipe-dashboard{display:flex;align-items:center;justify-content:space-around;gap:20px;width:100%;color:white}.recipe-dashboard>div{text-align:center}.recipe-dashboard small{font-size:12px;display:block;color:#c8d3e8}.recipe-dashboard strong{font-size:30px;line-height:36px}.recipe-pot{border:3px solid #edce88;border-radius:18px;background:#5b4d35;min-height:60px;min-width:110px;padding:8px 18px;text-align:center;color:#fff0ca;font-size:32px;font-weight:800;line-height:40px}.recipe-order,.recipe-ingredients{display:flex;align-items:stretch;justify-content:center;gap:7px;flex-wrap:wrap}.recipe-card,.recipe-slot{min-width:48px;height:50px;border-radius:9px;border:2px solid #f0d993;background:#ffe8ac;color:#3c321d;font-size:21px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:4px 7px;position:relative}.recipe-slot{border:2px dashed #a5b5cf;background:transparent;color:#bbc8df;font-size:15px}.recipe-card small{position:absolute;top:0;left:4px;font-size:10px}.recipe-card:disabled{opacity:.27}.recipe-card.in-recipe{background:#cfc0fa;border-color:#b19fde;color:#342756}
.rhythm-board{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:12px;padding:5px}.rhythm-pad{display:flex;flex-direction:column;align-items:center;justify-content:center;border:3px solid #ffffff33;border-radius:25%;gap:4px;color:#202d40;box-shadow:inset 0 -6px #0002;min-width:0;min-height:0;padding:7px;opacity:.7}.rhythm-pad span{font-size:clamp(28px,7vw,48px);line-height:1.1}.rhythm-pad strong{font-size:16px}.rhythm-pad small{font-size:12px}.rhythm-0{background:#ffa88f}.rhythm-1{background:#99d5ff}.rhythm-2{background:#b8e888}.rhythm-3{background:#d4b4ff}.rhythm-pad:disabled{opacity:.7;cursor:default}.rhythm-pad.lit-pad{opacity:1;border-color:white;outline:4px solid #fff0a7;outline-offset:1px;box-shadow:inset 0 0 0 4px #fff8;transform:scale(.96)}.rhythm-actions{display:flex;gap:8px}.rhythm-actions .run-button{flex:1;font-size:16px}.rhythm-actions .secondary{flex:0 0 108px;font-size:14px}
@media(max-width:750px),(max-width:1000px) and (max-height:550px){.playing .variety-surface{padding:6px 0}.playing .variety-game .stage{gap:4px}.playing .variety-game .extra-task{min-height:20px}.playing .variety-workspace{gap:6px}.playing .variety-workspace>.secondary{min-height:36px;padding:5px 8px;flex:0 0 auto}.playing .variety-workspace .run-button{height:44px;min-height:44px;flex-shrink:0}.playing .park-exit{top:-2px;font-size:12px;line-height:16px}.playing .park-car{border-width:3px;padding:2px;border-radius:8px}.playing .park-car small{font-size:14px;line-height:14px}.playing .balance-board{gap:7px}.playing .balance-pan{padding:5px;min-height:124px;max-height:180px;border-radius:12px}.playing .pan-drop{min-height:53px}.playing .pan-drop strong{font-size:26px;line-height:30px}.playing .balance-title,.playing .weight-label{font-size:12px;letter-spacing:.3px}.playing .weight-tray{gap:5px}.playing .pan-items .weight{width:32px;min-width:32px;height:32px;font-size:14px}.playing .sorting-board{gap:14px}.playing .sorting-tubes{gap:6px}.playing .tube-content{padding:7px 2px;gap:4px}.playing .sort-ball{font-size:18px}.playing .recipe-board{gap:9px}.playing .recipe-pot{font-size:28px;min-height:48px;line-height:32px;padding:5px 18px}.playing .recipe-dashboard strong{font-size:26px;line-height:30px}.playing .recipe-card,.playing .recipe-slot{min-width:42px;height:44px;padding:4px;font-size:19px}.playing .recipe-order,.playing .recipe-ingredients{gap:5px}.playing .rhythm-board{gap:10px}.playing .piece-tray{gap:5px}.playing .piece-choice{padding:4px;min-width:44px}.playing .variety-game .workspace>.message{min-height:52px}.playing .world-label{font-size:15px}}
@media(max-height:550px) and (orientation:landscape){.playing .balance-title,.playing .sorting-label{display:none}.playing .balance-board{gap:3px}.playing .balance-pan{min-height:86px;padding:2px}.playing .pan-drop{min-height:40px}.playing .pan-items{min-height:20px}.playing .pan-items .weight{min-width:24px;width:24px;height:24px;font-size:13px}.playing .weight{width:32px;min-width:32px;height:32px;font-size:14px}.playing .recipe-board{gap:4px}.playing .recipe-pot{min-height:34px;font-size:23px;line-height:26px;padding:3px 8px}.playing .recipe-card,.playing .recipe-slot{height:34px;min-width:35px;font-size:16px}.playing .recipe-dashboard small{font-size:12px}.playing .recipe-dashboard strong{font-size:22px;line-height:25px}.playing .rhythm-pad strong{font-size:14px}.playing .rhythm-pad span{font-size:24px}}
@media(prefers-reduced-motion:reduce){.balance-beam,.rhythm-pad{transition:none;transform:none}.rhythm-pad.lit-pad{transform:none}}
.park-exit,.playing .park-exit{right:-9px;top:calc(41.6667% - 16px);width:28px;height:32px;padding:1px;text-align:center;font-size:25px;line-height:28px}
.playing .variety-game[data-mode=balance] #board,.playing .variety-game[data-mode=sorting] #board,.playing .variety-game[data-mode=recipe] #board{width:100%!important;height:100%!important;aspect-ratio:auto;max-width:480px}
.playing .balance-board{gap:5px}.playing .weight-tray .weight{width:38px;height:38px;min-width:38px}

/* One-tap number puzzle: large targets and a persistent goal reference. */
.sliding-board{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:10px;padding:10px;border:2px solid #8593ad;border-radius:16px;background:#1c2639}.slide-tile{position:relative;border:2px solid #8796b2;border-radius:12px;background:#485772;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation}.slide-tile strong{font-size:clamp(32px,7vw,64px);line-height:1}.slide-tile small{position:absolute;right:9px;bottom:6px;font-size:24px;line-height:1}.slide-tile.slide-ready{background:#d9f582;color:#203018;border-color:#ecffc0;box-shadow:0 3px 0 #8aa74b}.slide-tile:focus-visible{outline:4px solid #fff;outline-offset:2px}.slide-tile.slide-ready:active{transform:translateY(2px);box-shadow:none}.slide-empty{border:2px dashed #b6c2d9;border-radius:12px;display:flex;align-items:center;justify-content:center;background:#28354a;color:#d5deed;font-size:14px;font-weight:700}.sliding-target{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px;background:#f0f2f8;border-radius:12px}.sliding-target>span{font-size:14px;font-weight:700;color:#53607a}.sliding-target-grid{display:grid;grid-template-columns:repeat(3,26px);gap:3px}.sliding-target-grid i{display:flex;align-items:center;justify-content:center;height:24px;background:white;border:1px solid #c1cadd;border-radius:4px;font-size:14px;font-weight:700;font-style:normal}.sliding-target-grid i:last-child{background:transparent;border-style:dashed}@media(max-width:750px),(max-width:1000px) and (max-height:550px){.playing .sliding-board{gap:7px;padding:7px}.playing .sliding-target{padding:6px 10px}.playing .sliding-target-grid{grid-template-columns:repeat(3,22px);gap:2px}.playing .sliding-target-grid i{height:20px}.playing .slide-empty{font-size:12px}.playing .slide-tile small{font-size:20px}}

/* Visual memory cards, without instrument styling. */
.rhythm-pad{border-radius:20px}.rhythm-pad strong{font-size:clamp(14px,2.5vw,19px)}.rhythm-pad.lit-pad{outline:5px solid #fff;outline-offset:-7px}.rhythm-actions .run-button{width:100%}

/* Shared numbered stage picker for every game, including small screens. */
.stage-picker{min-width:0;margin:12px 0 20px}.stage-picker .level-nav{display:flex;gap:8px;overflow-x:auto;flex-wrap:nowrap;padding:4px 2px 8px;margin:0;max-width:100%}.stage-picker .level-nav button{position:relative;flex:0 0 44px;min-width:44px;height:44px;padding:4px;border:1px solid #cbd4e4;border-radius:12px;background:#fff;color:#253047}.stage-picker .level-nav button.current{background:var(--world,#c7b2f5);border-color:#655394}.stage-picker .level-nav button:disabled{opacity:1;background:#e8ebf2;color:#737c8d;cursor:not-allowed}.stage-picker .level-nav button small{position:absolute;right:2px;bottom:0;font-size:11px;line-height:14px}.stage-picker .level-nav button.stage-done{border-color:#6e9a49}.stage-picker .level-nav>span{white-space:nowrap;align-self:center;font-size:12px}.stage-picker .mission-heading{display:flex;align-items:center;justify-content:space-between;margin:10px 0 0;gap:12px}.stage-picker .mission-heading h1{font-size:24px;margin:3px 0}.stage-picker .eyebrow{font-size:12px}
@media(max-width:750px),(max-width:1000px) and (max-height:550px){.playing .game-view{grid-template-rows:44px 98px minmax(0,1fr)!important}.playing .stage-picker{margin:0;min-height:0;overflow:hidden}.playing .stage-picker .level-nav{display:flex!important;height:50px;margin:0;padding:2px 1px 4px;gap:6px}.playing .stage-picker .mission-heading{position:static!important;width:auto!important;height:42px!important;min-height:0;margin:0!important;display:flex!important;background:transparent;padding:0}.playing .stage-picker .mission-heading>div{display:block!important;min-width:0}.playing .stage-picker .mission-heading h1{display:block;font-size:16px;line-height:20px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.playing .stage-picker .mission-heading .eyebrow{font-size:11px;line-height:16px}.playing .stage-picker .mission-badge{display:none}.playing .stage-picker .level-nav button{flex:0 0 44px;min-height:44px;height:44px}.playing .play-heading{padding-right:0!important}}

.stage-picker .level-nav{position:relative}

.pairs-board{display:grid;grid-template-columns:repeat(var(--pair-columns),minmax(0,1fr));grid-template-rows:repeat(var(--pair-rows),minmax(0,1fr));gap:12px;padding:8px}.pair-card{min-width:0;min-height:0;position:relative;border:3px solid #dce4f0;border-radius:18px;background:#fff8e9;display:flex;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation;flex-direction:column;padding:6px}.pair-card>span{font-size:clamp(36px,7vw,70px);line-height:1.2}.pair-card>small{height:18px;font-size:12px;line-height:18px;color:#314c27}.pair-card.pair-picked{border-color:#c4ea63;background:#e9ffc2;box-shadow:0 0 0 3px #c4ea6355}.pair-card.pair-found{opacity:0.45;background:#d2ebc5;border-color:#98c478;cursor:default}.pair-card:focus-visible{outline:3px solid #a990ed;outline-offset:2px}
@media(max-width:750px),(max-width:1000px) and (max-height:550px){.playing .pairs-board{gap:7px;padding:3px}.playing .pair-card{border-radius:12px;padding:3px}.playing .pair-card>span{font-size:clamp(30px,8vw,52px)}.playing .pair-card>small{font-size:11px;height:15px;line-height:15px}.playing .game-view[data-mode=pairs] .workspace{min-height:0}.playing .game-view[data-mode=pairs] .stage{min-height:260px}}

/* Visible navigation and a clear entry to the parent guide. */
.back-button,.playing .play-heading .back-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-width:100px;min-height:44px;height:44px;padding:8px 14px;background:#fff;border:2px solid #b7c3d9;border-radius:12px;color:#26324b;font-size:15px;font-weight:700;box-shadow:0 3px 0 #d9dfeb;text-decoration:none;white-space:nowrap}.back-button:hover{background:#edf1fa;border-color:#677caa}.back-button:focus-visible,.parent-guide-button:focus-visible{outline:3px solid #6a53a6;outline-offset:3px}.parent-guide-button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:12px 20px;border:2px solid #51427e;border-radius:12px;background:#605094;color:white;font-size:16px;font-weight:700;box-shadow:0 3px 0 #423469;cursor:pointer}.parent-guide-button:hover{background:#51427e}.hub-foot{gap:18px;flex-wrap:wrap}.parent-view>.back-button{margin-bottom:24px}
@media(max-width:750px),(max-width:1000px) and (max-height:550px){.playing .play-heading .back-button{min-width:76px;width:auto;padding:5px 7px;font-size:13px;flex-shrink:0}.playing .play-heading .back-button span{display:inline}.playing .play-heading{gap:5px}.playing .world-label{font-size:14px;min-width:0}.playing .world-label b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.playing .world-label>span{display:none}.playing .help-button{padding:5px 7px;font-size:12px;min-width:0;white-space:nowrap;flex-shrink:0}.playing .compact-menu{width:32px;min-width:32px;padding:0}.hub-foot .parent-guide-button{width:100%}footer{gap:12px;flex-wrap:wrap}}

.parent-game{display:flex;align-items:center;gap:20px;width:100%;padding:22px;text-align:left;background:white;border:0;border-bottom:1px solid #d7dfed;color:#252b3c;cursor:pointer}.parent-game:hover{background:#f0f3fc}.parent-game:focus-visible{outline:3px solid #665098;outline-offset:-3px}.parent-game>div{flex:1}.parent-game h2{font-size:20px;margin:0 0 5px}.parent-game p{margin:0;color:#596783;font-size:14px;line-height:1.5}.parent-game-action{display:flex;flex-direction:column;gap:7px;text-align:right;white-space:nowrap}.parent-game-action small{padding:7px 10px;border-radius:8px;background:#eee8fa;color:#514079;font-size:14px;font-weight:700}.simple-balance .balance-pan{display:flex;flex-direction:column;align-items:center;gap:8px}.simple-balance .balance-pan>strong{font-size:44px;line-height:1.1}.count-dots{font-size:19px;line-height:1.3;max-width:150px;overflow-wrap:anywhere;color:#fff}.simple-balance .weight{width:54px;height:54px;position:relative;border-radius:12px}.simple-balance .weight small{font-size:14px;position:absolute;right:3px;bottom:0}.simple-balance .chosen-weight{background:#cfea90;outline:3px solid #fff}.trail-player{display:inline-block;transition:transform .12s ease}.extra-cell.wet .pipe-arm,.extra-cell.wet .pipe-center{animation:water-arrive .18s ease-out}@keyframes water-arrive{from{filter:brightness(1.8);opacity:.35}to{filter:brightness(1);opacity:1}}@media(max-width:750px){.parent-game{padding:14px;gap:10px;flex-wrap:wrap}.parent-game .parent-icon{width:42px;height:42px;flex-shrink:0}.parent-game>div{min-width:150px}.parent-game h2{font-size:17px}.parent-game-action{flex-direction:row;width:100%;justify-content:space-between;align-items:center}.simple-balance .count-dots{font-size:16px}.simple-balance .balance-pan>strong{font-size:34px}.simple-balance .balance-pan{min-height:110px}.simple-balance .weight{width:44px;height:44px}}

/* Let each device keep a readable board instead of squeezing the entire game. */
.learning-benefit{padding:12px 14px;background:#f0edf8;border-radius:12px;color:#41365f;font-size:14px;line-height:1.6}
.extra-cell.light-hint{position:relative;outline:4px solid #c8ef63;outline-offset:-5px}
.extra-cell.light-hint::after{content:'↓';position:absolute;right:8px;top:3px;color:#253047;background:#d9fa89;border-radius:8px;padding:0 8px;font-size:28px}
.simple-balance .balance-beam{margin:8px 0;transform:none!important}
.game-view,.play-layout,.workspace,.stage{min-width:0}
@media(max-width:1100px){
 body.playing{height:auto;min-height:100dvh;overflow:auto;overscroll-behavior:auto}
 body.playing main{height:auto;overflow:visible;padding:12px max(12px,env(safe-area-inset-left)) 24px}
 .playing .game-view{display:flex!important;flex-direction:column;height:auto;gap:14px}
 .playing .play-layout{display:flex!important;flex-direction:column;height:auto;gap:14px}
 .playing .stage,.playing .game-view[data-world] .stage{flex:none;position:static;min-height:0;height:auto;padding:14px;overflow:visible}
 .playing .surface{flex:none;height:auto;min-height:0;overflow:visible;padding:8px 0;}
 .playing .surface>#board{width:100%!important;height:auto!important;max-width:480px;max-height:none;aspect-ratio:1;flex:none}
 .playing .surface>#board.balance-board,.playing .surface>#board.recipe-board,.playing .surface>#board.sorting-board{aspect-ratio:auto;min-height:280px;padding:16px 0}
 .playing .workspace{display:flex!important;flex-direction:column;flex:none;height:auto;min-height:0;overflow:visible;padding:16px;gap:12px}
 .playing .workspace>.extra-instruction,.playing .workspace>.instruction,.playing .workspace>.tutorial{display:block;font-size:15px;line-height:1.6;margin:0}
 .playing .workspace>.message{min-height:44px;max-height:none;height:auto;overflow:visible;padding:12px;font-size:14px;line-height:1.5}
 .playing .stage-picker{height:auto;min-height:100px;flex:none}
 .playing .stage-header{height:auto;min-height:20px;flex:none}
 .playing .extra-task{height:auto;min-height:24px;font-size:14px}
 .playing .direction-palette button,.playing .extra-arrows button{min-height:48px}
 .playing .surface .board{margin:auto}
}
@media(min-width:751px) and (max-width:1100px) and (orientation:portrait){
 .playing main{max-width:780px;margin:auto;padding:20px}
 .playing .workspace{width:100%}
 .playing .surface>#board{max-width:560px}
}
@media(min-width:900px) and (max-width:1100px) and (orientation:landscape){
 .playing .play-layout{display:grid!important;grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);align-items:start;gap:20px}
}
@media(min-width:1101px){.play-layout{grid-template-columns:minmax(0,1.8fr) minmax(320px,1fr)}.workspace{align-self:start}}
@media(max-width:380px){.playing .world-label{font-size:12px}.playing .play-heading{flex-wrap:wrap;height:auto}.playing .compact-menu{display:none}.parent-game-action small{font-size:12px}}
.coin-panel{display:flex;align-items:flex-start;gap:20px;background:#fff8da;border:2px solid #ebcd6e;border-radius:22px;padding:24px;margin:24px 0 28px;color:#40351a}.coin-icon{font-size:46px;line-height:1.2}.coin-panel h2{margin:0 0 10px;font-size:23px}.coin-panel p{margin:8px 0;line-height:1.6;font-size:16px}.coin-panel small{display:block;line-height:1.6;font-size:13px}.coin-panel .text-button{margin-top:12px;text-align:left;text-decoration:underline;color:#514120}.coin-earned{padding:16px;background:#fff5cc;border:2px solid #e6c76a;border-radius:16px;margin:16px 0}.coin-earned>span{font-size:42px}.coin-earned h3{margin:6px 0}.coin-earned p{font-size:15px;line-height:1.6}.world-number{white-space:nowrap}@media(max-width:600px){.coin-panel{padding:18px;gap:12px}.coin-icon{font-size:32px}.coin-panel h2{font-size:20px}.world-number{font-size:11px}}

/* Tablet layout: a single, full-width play area with controls beside the board. */
.playing .stage,.playing .game-view[data-world] .stage{width:100%;max-width:none;align-self:stretch}
.gold-coin{display:inline-flex!important;align-items:center;justify-content:center;flex:none;width:48px;height:48px;border:4px solid #bb7900;border-radius:50%;background:linear-gradient(135deg,#fff1a1,#f5c331 48%,#d58b00);color:#8b5600!important;font-family:Arial,sans-serif;font-size:25px!important;line-height:1;box-shadow:inset 0 0 0 3px #ffe47b,0 3px 0 #996200;text-shadow:0 1px #fff0a3}
.coin-panel{margin-top:28px;padding:20px}.coin-panel h2{font-size:21px}.coin-panel p{margin:6px 0}.coin-panel .text-button{margin-top:5px}
@media(min-width:751px) and (max-width:1366px){
 body.playing{height:var(--play-height,100dvh);min-height:0;overflow:hidden}
 body.playing>header,body.playing>footer{display:none}
 body.playing main{width:100%;max-width:1280px;height:100%;margin:0 auto;padding:12px 18px;overflow:hidden}
 .playing .game-view{height:100%;min-height:0;display:grid!important;grid-template-rows:44px 100px minmax(0,1fr)!important;gap:10px}
 .playing .play-heading{height:44px;margin:0;gap:10px}
 .playing .stage-picker{margin:0;min-height:0;height:100px;overflow:hidden}
 .playing .stage-picker .level-nav{height:52px;padding:3px 1px;gap:7px}
 .playing .stage-picker .mission-heading{height:44px!important;margin:0;align-items:center}
 .playing .stage-picker .mission-heading h1{font-size:20px;margin:0;line-height:25px}
 .playing .stage-picker .mission-heading .eyebrow{font-size:12px}
 .playing .mission-badge{display:none}
 .playing .play-layout{display:grid!important;grid-template-columns:minmax(0,1.45fr) minmax(285px,1fr);gap:16px;align-items:stretch;height:100%;min-height:0}
 .playing .stage,.playing .game-view[data-world] .stage{display:flex;flex-direction:column;position:static;align-self:stretch;width:100%;max-width:none;height:100%;min-height:0!important;margin:0;padding:14px;gap:8px;overflow:hidden}
 .playing .stage-header{height:auto;flex:none;min-height:18px;margin:0;font-size:12px}
 .playing .stage-header span:first-child{font-size:11px}
 .playing .extra-task,.playing .objectives{flex:none;height:auto;min-height:24px;margin:0;font-size:14px}
 .playing .surface,.playing .variety-surface{display:flex;align-items:center;justify-content:center;flex:1 1 0;min-width:0;min-height:0;height:auto;padding:0;overflow:hidden}
 .playing .surface>#board,.playing .variety-game .surface>div[id=board]{width:var(--tablet-board-size,100%)!important;height:var(--tablet-board-size,auto)!important;max-width:100%;max-height:100%;min-height:0;padding:0;flex:none;margin:0 auto;aspect-ratio:1}
 .playing .surface>#board.balance-board,.playing .surface>#board.recipe-board,.playing .surface>#board.sorting-board{width:100%!important;height:auto!important;min-height:0;max-height:100%;aspect-ratio:auto;padding:8px 0;overflow:auto}
 .playing .stage-legend{display:none}
 .playing .workspace{display:flex!important;flex-direction:column;gap:10px;align-self:center;width:100%;max-width:none;height:auto;min-height:0;max-height:100%;overflow-y:auto;margin:0;padding:16px}
 .playing .workspace>.instruction,.playing .workspace>.extra-instruction{display:block;font-size:14px;line-height:1.5;margin:0}
 .playing .workspace>.tutorial,.playing .panel-title,.playing .edit-note{display:none}
 .playing .workspace>.message{height:auto;min-height:0;max-height:none;overflow:visible;font-size:14px;line-height:1.45;padding:10px;margin:0}
 .playing .program,.playing .game-view[data-world] .program{min-height:64px;max-height:112px;padding:6px;gap:5px;overflow:auto;flex-shrink:0}
 .playing .empty-program{min-height:48px;font-size:14px}
 .playing .direction-palette button,.playing .extra-arrows button{height:46px;min-height:46px;font-size:27px}
 .playing .run-button,.playing .stop-button{min-height:44px;height:44px;padding:8px;font-size:16px}
 .playing .program-actions{margin:0}.playing .adventure-tools{margin:0;gap:5px}
 .playing .simple-balance .balance-pan{min-height:105px;padding:8px}.playing .simple-balance .balance-pan>strong{font-size:32px}.playing .count-dots{font-size:15px}
 .playing .world-label{min-width:0;font-size:16px}.playing .world-label b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .playing .compact-menu{display:block;min-width:40px;height:40px;border:1px solid #dfe3ee;border-radius:10px;background:white;font-size:22px}
}
@media(min-width:751px) and (max-width:900px){.playing .play-layout{grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);gap:12px}.playing main{padding:10px 12px}.playing .workspace{padding:12px}}
