/* A clear entry point and two independent thumb areas. */
.mobile-screen-entry{display:none;align-items:center;justify-content:space-between;gap:14px;padding:12px;background:#fff0cf;color:#61422c;border-bottom:1px solid #c9a978}
.mobile-screen-entry button{flex-shrink:0;border:1px solid #593c29;background:#a74835;color:#fff5df;border-radius:7px;padding:12px 15px;min-height:46px;font:bold 13px Georgia;box-shadow:0 3px 0 #6a3126}
.mobile-screen-entry p{margin:0;font:12px/1.4 Georgia;max-width:380px}
#mobile-music{display:none}
#mobile-rotate{position:absolute;top:65px;left:50%;transform:translateX(-50%);max-width:calc(100% - 24px);width:290px;padding:13px 18px;background:#fff4dcec;color:#503727;border:1px solid #ad8858;border-radius:10px;text-align:center;font:13px/1.4 Georgia;z-index:8;pointer-events:none;box-shadow:0 3px 8px #201a1830}
#mobile-rotate strong{display:block;font-size:17px;margin-bottom:4px}#mobile-rotate[hidden]{display:none}
.cartoon-laboratory .touch-controls{align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;flex-wrap:nowrap;touch-action:none}
.touch-movement{display:grid;grid-template-columns:1fr;gap:7px;width:110px;flex-shrink:0}
.cartoon-laboratory .touch-movement .direction-pad{display:grid;grid-column:auto;grid-row:auto;grid-template-columns:1fr 1fr;gap:7px;width:100%}
.cartoon-laboratory .touch-controls .direction-pad button{width:100%;min-width:0;height:54px;font-size:27px;padding:0}
.cartoon-laboratory .touch-controls .run-button{grid-column:1;grid-row:2;width:100%;height:44px;min-height:44px;padding:5px;font-size:10px}
.touch-actions{display:grid;grid-template-columns:54px 76px;grid-template-rows:44px 44px;gap:7px;flex-shrink:0}
.cartoon-laboratory .arcade .touch-actions button{min-width:0;min-height:44px;width:100%;height:100%;padding:3px;font-size:10px;letter-spacing:0;border-radius:12px}
.cartoon-laboratory .arcade .touch-controls #interact-button{background:#fff5dc;color:#453021;font-size:10px}
.cartoon-laboratory .arcade .touch-controls [data-action=jump]{background:#fff5dc;color:#453021;border-color:#826447}
.touch-actions [data-action=jump]{grid-column:1;grid-row:1}.touch-actions #interact-button{grid-column:1;grid-row:2}
.cartoon-laboratory .touch-actions .belly-button{grid-column:2;grid-row:1 / span 2;font-size:10px;border-radius:24px;background:#b34834;box-shadow:0 4px 0 #773529,inset 0 1px 0 #e39969;border-width:2px}
.cartoon-laboratory .touch-controls button span{display:none}
.cartoon-laboratory .touch-actions .belly-button span{display:block;font-size:30px;line-height:1.2;margin:7px 0 0}
.cartoon-laboratory .touch-controls button:active,.cartoon-laboratory .touch-controls button[aria-pressed=true]{transform:translateY(2px);background:#ebcc8f;box-shadow:0 1px 0 #90704d}
.cartoon-laboratory .touch-controls .belly-button:active{background:#d05b3d}
.cartoon-laboratory .touch-controls button:disabled{opacity:.38;transform:none;cursor:default}
.cartoon-laboratory .is-mission-two .run-button,.cartoon-laboratory .is-mission-three .run-button,.cartoon-laboratory .is-mission-two [data-action=jump]{display:none}
.cartoon-laboratory .is-mission-two .touch-actions{grid-template-rows:64px}.is-mission-two .touch-actions #interact-button{grid-row:1}.cartoon-laboratory .is-mission-two .touch-actions .belly-button{grid-row:1}
@media(pointer:coarse){.mobile-screen-entry{display:flex}.cartoon-laboratory #full{display:block}.cartoon-laboratory .touch-controls{display:flex}}
@media(max-width:950px){.mobile-screen-entry{display:flex}.cartoon-laboratory #full{display:block}}
@media(max-width:700px){.mobile-screen-entry{align-items:flex-start;flex-direction:column;gap:8px}.mobile-screen-entry button{width:100%}.mobile-screen-entry p{font-size:11px}.cartoon-laboratory .touch-controls{display:flex}}
@media(max-width:360px){.cartoon-laboratory .touch-controls{padding:10px 8px;gap:8px}.touch-movement{width:98px}.touch-actions{grid-template-columns:50px 72px;gap:6px}.cartoon-laboratory .hud{gap:6px;padding-left:8px;padding-right:8px}.cartoon-laboratory .power{width:78px}.cartoon-laboratory #hearts{font-size:16px}}
@media(max-width:1000px) and (max-height:600px){.cartoon-laboratory .touch-controls{display:flex}}
/* Both native fullscreen and the iPhone viewport fallback use the same layout. */
body.game-screen-active{overflow:hidden;overscroll-behavior:none}
.cartoon-laboratory .arcade.screen-mode{position:fixed;inset:0;z-index:1400;width:100%;height:100dvh;height:var(--game-screen-height,100dvh);max-width:none;margin:0;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);border:0;border-radius:0;box-shadow:none;display:flex;flex-direction:column;overflow:hidden;background:#302924}
.arcade.screen-mode .mobile-screen-entry,.arcade.screen-mode .route,.arcade.screen-mode .rpg-cast{display:none!important}
.cartoon-laboratory .arcade.screen-mode .hud{height:52px;flex:0 0 52px;display:grid;grid-template-columns:max-content minmax(58px,1fr) max-content 44px 44px 44px;gap:8px;padding:4px 12px;min-width:0}
.arcade.screen-mode .hud-label{font-size:7px;letter-spacing:.4px;margin-bottom:3px}.arcade.screen-mode .power{width:auto;min-width:0;max-width:210px}.arcade.screen-mode .power-line{gap:6px}.arcade.screen-mode .power-track{width:min(115px,100%)}.arcade.screen-mode #power-label{font-size:7px;letter-spacing:0}.arcade.screen-mode .wallet{margin:0;min-width:0}.arcade.screen-mode .wallet strong{font-size:15px}
.cartoon-laboratory .arcade.screen-mode .hud-button{display:block;min-width:44px;width:44px;height:44px;margin:0;padding:0;white-space:nowrap;font-size:20px}
.arcade.screen-mode #mobile-music{display:block}.arcade.screen-mode #mobile-music.is-muted{color:#aa9b83;font-size:16px}
.cartoon-laboratory .arcade.screen-mode .stage{height:auto;flex:1 1 0;min-height:0;width:100%;aspect-ratio:auto}
.arcade.screen-mode #game{height:100%;width:100%;object-fit:fill}
.arcade.screen-mode .touch-controls{flex:0 0 auto}.arcade.screen-mode:not(.screen-touch) .touch-controls{display:none}.arcade.screen-mode.screen-touch .touch-controls{display:flex}
.cartoon-laboratory .arcade.screen-mode .overlay{padding:12px;justify-content:center}.arcade.screen-mode .intro-card{max-width:min(360px,90%);transform:none}.arcade.screen-mode .intro-card h2{font-size:28px;margin:9px 0}.arcade.screen-mode .intro-card p{font-size:11px;line-height:1.45}.arcade.screen-mode .hero-label{display:none}
@media(orientation:landscape){
 .arcade.screen-mode.screen-touch .touch-controls{padding:8px 14px;min-height:82px;gap:18px}
 .arcade.screen-mode .touch-movement{display:flex;align-items:center;width:auto;gap:12px}.cartoon-laboratory .arcade.screen-mode .touch-movement .direction-pad{width:124px;gap:10px}
 .cartoon-laboratory .arcade.screen-mode .direction-pad button{height:60px}
 .cartoon-laboratory .arcade.screen-mode .run-button{width:54px;height:48px;min-height:44px}
 .arcade.screen-mode .touch-actions{display:flex;align-items:center;gap:12px;width:auto}
 .cartoon-laboratory .arcade.screen-mode .touch-actions button{flex:0 0 64px;width:64px;min-width:64px;height:58px;min-height:44px;font-size:11px}
 .cartoon-laboratory .arcade.screen-mode .touch-actions .belly-button{flex-basis:88px;width:88px;min-width:88px;height:66px;font-size:11px;border-radius:20px}
 .arcade.screen-mode .touch-actions .belly-button span{font-size:23px;margin:2px 0 0}
 .cartoon-laboratory .arcade.screen-mode .scene-label{top:7px;left:10px;font-size:9px;padding:5px 9px}
 .arcade.screen-mode .local-exit{min-height:38px;padding:7px 12px}
}
@media(orientation:landscape) and (max-height:420px){.cartoon-laboratory .arcade.screen-mode .hud{height:48px;flex-basis:48px;padding-top:2px;padding-bottom:2px}.arcade.screen-mode .hud-label{font-size:6px}.arcade.screen-mode.screen-touch .touch-controls{min-height:76px;padding-top:5px;padding-bottom:5px}.cartoon-laboratory .arcade.screen-mode .direction-pad button{height:54px}.cartoon-laboratory .arcade.screen-mode .touch-actions .belly-button{height:64px}.arcade.screen-mode .intro-card p{max-width:none;margin:6px 0}.arcade.screen-mode .intro-card{padding:10px 14px}.arcade.screen-mode .intro-tip,.arcade.screen-mode .start-note{display:none}}
@media(orientation:portrait){.cartoon-laboratory .arcade.screen-mode .hud{gap:4px;padding:4px 7px;grid-template-columns:max-content minmax(42px,1fr) max-content 44px 44px 44px}.arcade.screen-mode #hearts{font-size:15px;letter-spacing:0}.arcade.screen-mode .wallet strong{font-size:13px}.arcade.screen-mode .power-line{flex-direction:column;gap:2px;align-items:flex-start}.arcade.screen-mode .power-track{height:5px;width:100%}.arcade.screen-mode .hud-label{font-size:6px}}
@media(orientation:portrait){.arcade.screen-mode .wallet{width:36px;min-width:0;max-width:36px}.arcade.screen-mode .wallet .hud-label{font-size:5px;letter-spacing:0;line-height:1.1;max-height:11px;overflow:hidden;margin-bottom:2px}.arcade.screen-mode .power .hud-label{letter-spacing:0;line-height:1.1;max-width:100%}}
