/* A cartridge opens as its own full-window game, including the title screen. */
#playerDialog.player-dialog{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:100dvh;margin:0;border:0;border-radius:0;box-shadow:none;overflow:hidden;background:var(--game-wash);padding:0}
#playerDialog::backdrop{background:var(--game-wash,#edf1e6);backdrop-filter:none}
#playerDialog .player-shell{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}
#playerDialog .player-titlebar{height:46px;min-height:46px;position:relative;top:auto;border-radius:0;flex:0 0 auto;padding:0 20px;z-index:20}
#playerDialog .quit-game{font-size:10px;min-width:94px;min-height:34px}
#gameMenu{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;background:#fffdf7}
#gameMenu .room-tabs{top:0;justify-content:center;min-height:61px}
#menuContent{max-width:1280px;margin:0 auto;padding:34px 44px 50px;min-height:calc(100dvh - 107px)}
#gameView{flex:1;min-height:0;overflow:hidden;position:relative;display:flex;flex-direction:column;background:var(--game-ink)}
#gameView[hidden],#gameMenu[hidden]{display:none}
#gameView .game-toolbar{flex:0 0 auto;height:auto;min-height:58px;background:#fffdf5;border-bottom:1px solid #bdcbb3;padding:9px 20px;gap:18px}
#gameView .mission-line{flex:0 0 auto;padding:9px 20px;background:var(--game-wash);min-height:42px}
#gameView .mission-line p{font-size:12px}
#gameView .game-stage{width:100%;max-width:none;flex:1;min-height:0;margin:0;display:flex;align-items:center;justify-content:center;overflow:hidden;aspect-ratio:auto;background:var(--game-ink);border:0;box-shadow:none}
#playerDialog #gameView #gameCanvas{display:block;flex:none;max-width:none;max-height:none;margin:0;image-rendering:pixelated;object-fit:fill}
#gameView .game-instructions{flex:0 0 auto;background:#fffdf5;padding:8px 20px;font-size:10px;min-height:30px}
#gameView .touch-controls{flex:0 0 auto;display:none;position:relative;inset:auto;width:100%;height:auto;background:#f8f8ed;border-top:1px solid #c8d3bb;padding:13px 22px 17px;justify-content:space-between;align-items:center;gap:16px;pointer-events:auto}
#gameView .touch-controls.force-touch{display:flex}
#gameView .touch-controls .touch-actions{flex:0 1 auto;max-width:none;flex-direction:row;margin:0;gap:12px}
#gameView .touch-controls .steering-pad{flex-basis:auto;max-width:none;flex-direction:row;gap:12px}
#gameView .steering-pad button{min-width:80px;min-height:62px;max-width:none}
#gameView .touch-controls .action-key{flex:0 1 auto;min-width:92px;min-height:62px;max-width:none;font-size:11px}
#gameView .touch-controls .command-key{min-height:48px;font-size:10px}
#gameView .touch-controls .touch-hint{display:block;flex-basis:100%;font-size:10px;line-height:1.6;text-align:center;margin:0}
.vertical-pad{display:flex;gap:12px}.vertical-pad button{min-width:78px;min-height:62px}
#gameView .touch-controls[data-hand=left]{flex-direction:row-reverse}
#gameView .touch-controls[data-size=large] button{min-height:74px;min-width:78px;font-size:12px}
#gameView .touch-controls[data-size=large] .dpad{grid-template-columns:54px 54px 54px;grid-template-rows:51px 51px 51px}
#gameView .touch-controls[data-size=large] .dpad button{min-width:0;min-height:51px}
#gameView .game-overlay{position:absolute;inset:0;z-index:15;background:#13291ee8;transform:none;width:100%;height:100%;padding:22px}
#gameView .game-stage:has(.overlay-guide:not([hidden])) .game-overlay{position:absolute;inset:0;transform:none;width:100%;height:100%}
#gameView .overlay-box{max-width:820px;max-height:100%;overflow:auto;padding:24px 28px;border-radius:9px}
.mobile-settings-link{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;background:var(--game-wash);border:1px solid #c7d4ba;border-radius:5px;padding:11px 13px;color:var(--game-ink);font:9px/1.7 var(--mono);min-height:43px;margin-top:11px;text-align:left}
.mobile-manual{max-width:850px;margin:auto}.mobile-manual h2{font-size:32px;letter-spacing:-.8px;line-height:1.3;margin:10px 0 18px}.mobile-manual>p{font:14px/1.9 var(--mono);color:var(--game-ink)}.mobile-manual .eyebrow{font:9px/1.8 var(--mono);color:#7d8f6d;letter-spacing:.7px}
.touch-setting-group{border:1px solid #c5d2b7;background:#f5f6e9;border-radius:7px;padding:18px 20px;margin-top:17px}.touch-setting-group h3{font:13px/1.6 var(--mono);margin:0 0 12px}.touch-setting-group>div{display:flex;gap:9px;flex-wrap:wrap}.touch-setting-group button{font:10px/1.7 var(--mono);min-height:46px;flex:1;padding:10px 14px;border:1px solid #bdcdb0;background:#fffdf3;color:#5f7752;border-radius:5px}.touch-setting-group button[aria-pressed=true]{background:var(--game-ink);border-color:var(--game-ink);color:#fff2cd;box-shadow:2px 2px 0 var(--game-accent)}.mobile-preview{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px;background:var(--game-wash);border:1px dashed var(--game-accent);border-radius:7px;margin:20px 0;font:10px/1.8 var(--mono);color:var(--game-ink)}.mobile-preview>span{display:flex;gap:7px;flex-wrap:wrap}.mobile-preview b{padding:8px 10px;background:#fffdf5;border:1px solid #b2c1a8;border-radius:5px;font-weight:normal}.mobile-preview[data-hand=left]{flex-direction:row-reverse}.mobile-preview[data-size=large] b{padding:13px 15px}.mobile-manual .shop-note{font-size:11px}
.overlay-guide .mobile-manual h2{font-size:23px}.overlay-guide .mobile-manual>p{font-size:11px}.overlay-guide .mobile-preview{padding:12px;margin:12px 0}.overlay-guide .touch-setting-group{padding:12px;margin-top:10px}.overlay-guide .touch-setting-group h3{font-size:11px;margin-bottom:8px}.overlay-guide .touch-setting-group button{font-size:9px;min-height:40px;padding:8px}.overlay-guide .mobile-manual .shop-note{font-size:10px}
@media(pointer:coarse),(max-width:1000px){#gameView .touch-controls{display:flex}}
@media(min-width:1450px){#menuContent{max-width:1400px;padding:42px 55px}.home-cover{min-height:450px}.menu-story h2{font-size:42px}.menu-story .home-tagline{font-size:17px}}
@media(max-width:900px){#gameMenu .room-tabs{justify-content:flex-start}.menu-hero{grid-template-columns:1fr 1fr;gap:24px}#menuContent{padding:26px}.menu-story h2{font-size:29px}.cover-brand .game-mark{width:60px;height:60px}.cover-brand .game-logo>span{font-size:22px}.cover-brand>small{padding-left:75px}.main-menu-actions button{padding:9px;gap:8px}.main-menu-actions small{font-size:8px}}
@media(max-width:620px){#playerDialog .player-titlebar{height:44px;min-height:44px;padding:0 12px}#playerDialog .quit-game{min-width:86px;font-size:9px}.title-home{max-width:52%}.player-titlebar .dialog-wallet{font-size:7px}#gameMenu .room-tabs{min-height:58px}#menuContent{padding:20px 16px 35px}.menu-hero{grid-template-columns:1fr;gap:19px}.home-cover{min-height:210px;max-height:230px}.home-cover canvas{max-height:230px}.menu-story h2{font-size:29px}.main-menu-actions button{min-height:62px}.mobile-settings-link{font-size:9px}#gameView .game-toolbar{padding:7px 10px;gap:11px;min-height:52px;flex-wrap:wrap}#gameView .game-toolbar .run-status{font-size:10px;line-height:1.6}#gameView .game-toolbar .game-tools{gap:5px;margin-left:auto}#gameView .game-toolbar .game-tools button{width:31px;min-width:31px;height:35px;font-size:18px}#gameView .mission-line{padding:8px 12px;min-height:50px;gap:3px;flex-direction:column;align-items:flex-start}#gameView .mission-line p{font-size:11px;line-height:1.6}#gameView .game-instructions{font-size:9px;padding:7px 12px;min-height:27px}#gameView .touch-controls{padding:10px 12px max(15px,env(safe-area-inset-bottom));gap:10px}#gameView .touch-controls .steering-pad{flex-basis:47%;gap:8px}#gameView .steering-pad button{min-width:0;min-height:74px;flex:1;padding:8px;font-size:10px}#gameView .touch-controls .touch-actions{flex:1;flex-basis:40%;max-width:180px;flex-wrap:wrap;gap:8px;justify-content:flex-end}#gameView .touch-controls .action-key{min-width:70px;min-height:56px;flex:1;font-size:10px;padding:9px}#gameView .touch-controls[data-game=platform] .touch-actions{flex-direction:column;max-width:150px}#gameView .touch-controls[data-game=platform] .action-key{min-height:48px}#gameView .touch-controls .touch-hint{font-size:9px;line-height:1.5}#gameView .touch-controls .dpad{grid-template-columns:44px 44px 44px;grid-template-rows:41px 41px 41px;gap:2px}#gameView .touch-controls .dpad button{min-height:41px;padding:5px}.vertical-pad button{min-width:60px;min-height:70px}#gameView .touch-controls[data-size=large] .steering-pad button{min-height:92px}#gameView .touch-controls[data-size=large] .action-key{min-height:60px}#gameView .touch-controls[data-size=large] .dpad{grid-template-columns:49px 49px 49px;grid-template-rows:47px 47px 47px}#gameView .touch-controls[data-size=large] .dpad button{min-height:47px}#gameView .touch-controls .flipper-pad{width:100%;flex-basis:100%}#gameView .touch-controls[data-pad=flippers] .touch-actions{flex-basis:100%;max-width:none;justify-content:center}#gameView .touch-controls[data-pad=none] .touch-actions{max-width:none;flex-basis:100%;justify-content:center}#gameView .game-overlay{position:absolute;inset:0;padding:12px}#gameView .overlay-box{padding:20px 16px;max-width:440px}.overlay-guide .guide-steps{grid-template-columns:1fr}.overlay-guide .guide-steps li{padding:12px}.overlay-guide .guide-steps p{font-size:11px;line-height:1.7}.mobile-manual h2{font-size:28px}.mobile-manual>p{font-size:13px}.mobile-preview{gap:10px;padding:14px}.mobile-preview b{padding:8px}.touch-setting-group{padding:16px}.touch-setting-group button{font-size:10px;padding:10px}.mobile-preview[data-size=large] b{padding:11px}.overlay-guide .mobile-manual h2{font-size:21px}}
@media(max-height:540px) and (min-width:621px){#playerDialog .player-titlebar{height:34px;min-height:34px;padding:0 12px}#gameView .game-toolbar{height:40px;min-height:40px;padding:3px 12px;gap:12px;flex-wrap:nowrap}#gameView .game-tools button{width:30px;min-width:30px;height:30px}#gameView .mission-line{min-height:27px;padding:4px 12px}#gameView .mission-line p{font-size:10px}#gameView .game-instructions{display:none}#gameView .game-stage{padding:0 112px}#gameView .touch-controls{position:absolute;inset:67px 0 0;height:auto;width:100%;background:none;pointer-events:none;border:0;padding:8px 12px;align-content:center;gap:0}#gameView .touch-controls>*{pointer-events:auto}#gameView .touch-controls .steering-pad{flex-direction:column;max-width:95px;flex-basis:95px;gap:13px}#gameView .steering-pad button{min-width:82px;min-height:57px;font-size:10px}#gameView .touch-controls .touch-actions{max-width:95px;flex-basis:95px;flex-direction:column;margin-left:auto;gap:11px}#gameView .touch-controls .action-key{min-width:82px;min-height:57px;font-size:10px}#gameView .touch-controls[data-game=platform] .touch-actions{max-width:95px}#gameView .touch-controls .touch-hint{display:none}#gameView .touch-controls .dpad{grid-template-columns:33px 33px 33px;grid-template-rows:38px 38px 38px;gap:1px}#gameView .touch-controls .dpad button{min-width:0;min-height:38px;padding:3px}#gameView .touch-controls[data-size=large] .dpad{grid-template-columns:35px 35px 35px;grid-template-rows:43px 43px 43px}#gameView .touch-controls[data-size=large] .dpad button{min-height:43px}#gameView .touch-controls[data-size=large] button{min-width:82px;min-height:70px}#gameView .touch-controls[data-hand=left] .touch-actions{margin-left:0;margin-right:auto}#gameView .touch-controls[data-pad=none]{align-content:flex-end}#gameView .touch-controls[data-pad=none] .touch-actions{flex-direction:row;max-width:none;flex-basis:100%;justify-content:flex-end}#gameView .touch-controls[data-pad=flippers] .flipper-pad{display:flex;justify-content:space-between;max-width:none;flex-basis:100%}#gameView .touch-controls[data-pad=flippers] .flipper-pad button{max-width:95px;min-height:75px}#gameView .touch-controls[data-pad=flippers] .touch-actions{position:absolute;bottom:8px;right:12px;max-width:95px}#gameView .overlay-box{max-width:760px;padding:16px}.overlay-guide .guide-steps{grid-template-columns:repeat(3,1fr)}.overlay-guide .guide-steps p{font-size:10px}#gameMenu .room-tabs{top:0}.home-cover{min-height:300px;max-height:none}.menu-hero{grid-template-columns:1fr 1fr}}

#gameView .game-overlay,#gameView .game-stage:has(.overlay-guide:not([hidden])) .game-overlay{position:fixed;inset:46px 0 0;width:100%;height:calc(100dvh - 46px)}
@media(max-width:620px){#gameView .game-overlay,#gameView .game-stage:has(.overlay-guide:not([hidden])) .game-overlay{inset:44px 0 0;height:calc(100dvh - 44px)}}
@media(max-height:540px) and (min-width:621px){#gameView .game-overlay,#gameView .game-stage:has(.overlay-guide:not([hidden])) .game-overlay{inset:34px 0 0;height:calc(100dvh - 34px)}}

.overlay-guide .mobile-manual>.eyebrow,.overlay-guide .mobile-manual>h2{display:none}.overlay-guide .mobile-manual>.shop-note{font-size:9px;line-height:1.65}

@media(max-height:540px) and (min-width:621px){#gameView .touch-controls .vertical-pad{flex-direction:column;max-width:95px;gap:12px}#gameView .vertical-pad button{max-width:95px;min-width:82px;min-height:65px}}

/* The title scene owns the whole viewport, from the very first cartridge click. */
#playerDialog .screen-size{width:34px;height:34px;padding:3px;flex-shrink:0;font-size:21px;color:var(--game-ink)}
#playerDialog[data-screen=home] #gameMenu{scrollbar-gutter:auto;scrollbar-width:none;background:var(--game-ink)}
#playerDialog[data-screen=home] .room-tabs{display:none}
#playerDialog[data-screen=home] #menuContent{width:100%;max-width:none;min-height:0;margin:0;padding:0;background:var(--game-ink)}
#playerDialog[data-screen=home] .menu-hero{position:relative;isolation:isolate;display:grid;grid-template-columns:1fr minmax(370px,450px);gap:6vw;align-items:center;min-height:calc(100dvh - 46px);padding:40px 6vw;overflow:hidden}
#playerDialog[data-screen=home] .home-cover{position:absolute;inset:0;width:100%;height:100%;min-height:0;max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;display:block;z-index:-2}
#playerDialog[data-screen=home] .home-cover canvas{display:block;width:100%;height:100%;min-height:0;max-height:none;object-fit:cover;opacity:1;image-rendering:pixelated}
#playerDialog[data-screen=home] .menu-hero::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(90deg,#0c233a19 15%,#10282b55 55%,#10282b99),linear-gradient(0deg,#0c232c88,transparent 50%)}
#playerDialog[data-screen=home] .cover-brand{inset:24% auto auto 6vw;max-width:40%;padding:23px 25px;background:#10282bd9;border:1px solid #fff2c766;border-radius:6px;box-shadow:5px 5px 0 #10282b55;gap:18px}
#playerDialog[data-screen=home] .cover-brand .game-logo{gap:20px}
#playerDialog[data-screen=home] .cover-brand .game-logo>span{font-size:clamp(26px,3.1vw,46px);line-height:1.5;color:#fff0c6;text-shadow:3px 3px 0 #10282b}
#playerDialog[data-screen=home] .cover-brand .game-mark{width:90px;height:90px;background:var(--game-ink);border-radius:9px}
#playerDialog[data-screen=home] .cover-brand>span{font-size:9px;line-height:1.8;letter-spacing:1.2px}
#playerDialog[data-screen=home] .cover-brand>small{padding-left:0;font-size:10px;line-height:1.8}
#playerDialog[data-screen=home] .menu-story{grid-column:2;padding:25px;background:#fffdf3f5;border:2px solid var(--game-ink);border-radius:8px;box-shadow:7px 7px 0 #10282b66;backdrop-filter:blur(10px);min-width:0}
#playerDialog[data-screen=home] .menu-story h2{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#playerDialog[data-screen=home] .menu-story>.eyebrow{font-size:9px;margin-bottom:10px}
#playerDialog[data-screen=home] .home-tagline{font-size:14px;line-height:1.7;margin-bottom:14px}
#playerDialog[data-screen=home] .home-objective{padding:10px 12px;margin-bottom:12px}
#playerDialog[data-screen=home] .home-objective p{font-size:12px;line-height:1.65;margin-top:5px}
#playerDialog[data-screen=home] .selected-level{padding:9px 10px;margin-bottom:12px}
#playerDialog[data-screen=home] .selected-level strong{font-size:11px}
#playerDialog[data-screen=home] .menu-start{min-height:54px;font-size:12px;box-shadow:3px 3px 0 var(--game-accent)}
#playerDialog[data-screen=home] .main-menu-actions{gap:8px;margin-top:14px}
#playerDialog[data-screen=home] .main-menu-actions button{min-height:58px;padding:10px}
#playerDialog[data-screen=home] .title-extra-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
#playerDialog[data-screen=home] .mobile-settings-link{margin-top:0;min-height:42px;flex:1 1 160px;padding:9px 10px;font-size:8px}
#playerDialog[data-screen=home] .home-details{padding:32px max(6vw,22px) 48px;background:#fffdf7;border-top:3px solid var(--game-accent)}
#playerDialog[data-screen=home] .home-details>*{max-width:1180px;margin-left:auto;margin-right:auto}
#playerDialog[data-screen=home] .mode-picker{flex-wrap:wrap;gap:5px;margin-bottom:12px}
#playerDialog[data-screen=home] .mode-picker button{min-height:38px;font-size:9px;padding:8px}
#playerDialog[data-screen=home] .mode-picker span{font-size:8px}
@media(max-width:900px) and (min-height:541px){
 #playerDialog[data-screen=home] .menu-hero{display:flex;flex-direction:column;justify-content:center;gap:0;padding:154px 22px 28px}
 #playerDialog[data-screen=home] .cover-brand{inset:22px auto auto 50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 44px);padding:14px 20px;gap:9px}
 #playerDialog[data-screen=home] .cover-brand .game-logo{gap:12px}
 #playerDialog[data-screen=home] .cover-brand .game-logo>span{font-size:27px;line-height:1.4}
 #playerDialog[data-screen=home] .cover-brand .game-mark{width:52px;height:52px;padding:7px}
 #playerDialog[data-screen=home] .cover-brand>span{font-size:8px}
 #playerDialog[data-screen=home] .cover-brand>small{font-size:8px}
 #playerDialog[data-screen=home] .menu-story{width:100%;max-width:510px;padding:22px}
 #playerDialog[data-screen=home] .menu-hero::after{background:linear-gradient(0deg,#10282b88,#10282b22 65%)}
}
@media(max-width:620px){
 #playerDialog .screen-size{width:28px;min-width:28px;height:30px;min-height:30px;font-size:18px}
 #playerDialog .player-titlebar{gap:7px}
 #playerDialog .title-home{max-width:43%}
 #playerDialog[data-screen=home] .menu-hero{min-height:calc(100dvh - 44px);padding:149px 14px 24px}
 #playerDialog[data-screen=home] .cover-brand{top:17px;max-width:calc(100% - 28px);padding:12px 15px;gap:7px}
 #playerDialog[data-screen=home] .cover-brand .game-logo>span{font-size:24px}
 #playerDialog[data-screen=home] .menu-story{padding:17px;box-shadow:4px 4px 0 #10282b66}
 #playerDialog[data-screen=home] .menu-story>.eyebrow{font-size:8px;margin-bottom:7px}
 #playerDialog[data-screen=home] .home-tagline{font-size:12px;line-height:1.65;margin-bottom:10px}
 #playerDialog[data-screen=home] .home-objective{padding:8px 10px;margin-bottom:9px}
 #playerDialog[data-screen=home] .home-objective p{font-size:11px;line-height:1.65}
 #playerDialog[data-screen=home] .selected-level{padding:6px 8px;margin-bottom:10px}
 #playerDialog[data-screen=home] .selected-level strong{font-size:10px}
 #playerDialog[data-screen=home] .menu-start{min-height:50px;font-size:11px}
 #playerDialog[data-screen=home] .main-menu-actions{margin-top:12px}
 #playerDialog[data-screen=home] .main-menu-actions button{min-height:53px;padding:8px;gap:7px}
 #playerDialog[data-screen=home] .main-menu-actions b{font-size:9px}
 #playerDialog[data-screen=home] .main-menu-actions small{font-size:7px}
 #playerDialog[data-screen=home] .mobile-settings-link{min-height:40px;font-size:8px;flex-basis:100%}
 #playerDialog[data-screen=home] .title-extra-actions{gap:7px;margin-top:9px}
}
@media(max-height:540px) and (min-width:621px){
 #playerDialog .screen-size{width:29px;min-width:29px;height:28px;min-height:28px;font-size:18px}
 #playerDialog[data-screen=home] .menu-hero{min-height:calc(100dvh - 34px);grid-template-columns:1fr minmax(360px,420px);gap:20px;padding:13px 22px}
 #playerDialog[data-screen=home] .cover-brand{inset:20% auto auto 22px;width:calc(100% - 490px);max-width:none;padding:18px;gap:12px}
 #playerDialog[data-screen=home] .cover-brand .game-logo{gap:12px}
 #playerDialog[data-screen=home] .cover-brand .game-logo>span{font-size:25px}
 #playerDialog[data-screen=home] .cover-brand .game-mark{width:55px;height:55px;padding:8px}
 #playerDialog[data-screen=home] .cover-brand>span,#playerDialog[data-screen=home] .cover-brand>small{font-size:8px}
 #playerDialog[data-screen=home] .menu-story{padding:13px 15px}
 #playerDialog[data-screen=home] .menu-story>.eyebrow,#playerDialog[data-screen=home] .home-objective{display:none}
 #playerDialog[data-screen=home] .home-tagline{font-size:11px;line-height:1.5;margin-bottom:7px}
 #playerDialog[data-screen=home] .selected-level{padding:3px 7px;margin-bottom:7px}
 #playerDialog[data-screen=home] .selected-level strong{font-size:10px}
 #playerDialog[data-screen=home] .menu-start{min-height:41px;font-size:10px}
 #playerDialog[data-screen=home] .main-menu-actions{gap:6px;margin-top:9px}
 #playerDialog[data-screen=home] .main-menu-actions button{min-height:42px;padding:7px}
 #playerDialog[data-screen=home] .main-menu-actions small{display:none}
 #playerDialog[data-screen=home] .main-menu-actions b{font-size:9px}
 #playerDialog[data-screen=home] .mobile-settings-link{min-height:34px;font-size:8px;flex-basis:145px;padding:6px 8px}
 #playerDialog[data-screen=home] .title-extra-actions{margin-top:7px;gap:6px}
 #playerDialog[data-screen=home] .mode-picker{margin-bottom:7px}
 #playerDialog[data-screen=home] .mode-picker button{min-height:30px;padding:5px;font-size:8px}
}

#playerDialog[data-screen=home] #gameMenu::-webkit-scrollbar{display:none}

/* Playing owns the viewport; the arcade and cartridge menu are fully covered. */
body.game-open>.site-header,body.game-open>main,body.game-open>.site-footer{visibility:hidden;pointer-events:none}
#playerDialog[data-screen=playing]{width:100vw;height:100dvh;max-width:none;max-height:none;background:var(--game-ink)}
#playerDialog[data-screen=playing] .player-titlebar,#playerDialog[data-screen=playing] #gameMenu{display:none}
#playerDialog[data-screen=playing] #gameView{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;z-index:30;margin:0;border:0;border-radius:0;box-shadow:none;background:var(--game-ink)}
#playerDialog[data-screen=playing] #gameView[hidden]{display:none}
#playerDialog[data-screen=playing] .game-toolbar{position:relative;z-index:20;display:grid;grid-template-columns:auto auto auto 1fr auto;min-height:48px;padding:6px 16px;gap:18px;background:var(--game-ink);border-bottom:1px solid #ffffff33;color:#fff3d3}
#playerDialog[data-screen=playing] .game-toolbar .score-label{color:#fff3d399}
#playerDialog[data-screen=playing] .game-toolbar .run-status{font-size:11px;color:#fff3d3;margin:0;line-height:1.6}
#playerDialog[data-screen=playing] .game-tools{margin:0;gap:5px}
#playerDialog[data-screen=playing] .game-tools button{width:32px;min-width:32px;height:34px;font-size:19px;background:#fff8e8;color:var(--game-ink);border:1px solid #fff8e877;border-radius:5px}
#playerDialog[data-screen=playing] .back-menu{color:#fff3d3;background:transparent;border:1px solid #fff3d366;border-radius:5px;font-size:9px;padding:7px 9px;min-height:34px}
#playerDialog[data-screen=playing] .mission-line,#playerDialog[data-screen=playing] .game-instructions{display:none}
#playerDialog[data-screen=playing] .game-stage{position:relative;background:var(--game-ink)}
#playerDialog[data-screen=playing] #gameView .touch-controls{background:var(--game-ink);border-top-color:#ffffff33;color:#fff3d3}
#playerDialog[data-screen=playing] .touch-hint{color:#fff3d3b3}
#playerDialog[data-screen=playing] #gameView .game-overlay,#playerDialog[data-screen=playing] #gameView .game-stage:has(.overlay-guide:not([hidden])) .game-overlay{position:fixed;inset:0;width:100vw;height:100dvh}
.shot-meter{position:absolute;left:50%;bottom:30px;transform:translateX(-50%);z-index:5;width:min(400px,calc(100% - 32px));padding:14px 17px 12px;border:2px solid #fff4d3;border-radius:9px;background:#173c32f5;color:#fff4d3;box-shadow:4px 5px 0 #102a2d77;pointer-events:none;font-family:var(--mono)}
.shot-meter[hidden]{display:none}
.shot-meter-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.shot-meter-heading strong{font-size:11px;line-height:1.5}.shot-meter-heading>span{font-size:9px;white-space:nowrap;color:#fff4d3c2}
.shot-meter-track{display:flex;position:relative;height:23px;border:2px solid #fff4d3;border-radius:4px;background:#d9574c}
.shot-meter-track>span{display:block;flex:24}.shot-meter-track>.meter-yellow{flex:19;background:#f0bf54}.shot-meter-track>.meter-green{flex:14;background:#59bf83}
.shot-meter-marker{position:absolute;top:-7px;bottom:-7px;width:4px;transform:translateX(-50%);background:#fffef0;box-shadow:0 0 0 2px #112f2b;border-radius:1px}
.shot-meter-legend{display:grid;grid-template-columns:24fr 19fr 14fr 19fr 24fr;margin-top:7px;font-size:8px;text-align:center;letter-spacing:.3px}.shot-meter-legend b{color:#88e4ab;font-weight:normal}
.shot-meter>p{font-size:10px;line-height:1.7;text-align:center;margin:10px 0 0;color:#fff4d3c2}
.shot-meter[data-quality=green]{border-color:#88e4ab}.shot-meter[data-quality=yellow]{border-color:#f0bf54}.shot-meter[data-quality=red]{border-color:#f28f7c}
@media(max-width:620px){
 #playerDialog[data-screen=playing] .game-toolbar{grid-template-columns:auto 1fr auto;min-height:65px;padding:5px 10px;gap:3px 10px}
 #playerDialog[data-screen=playing] .game-toolbar>div:nth-child(3){display:none}
 #playerDialog[data-screen=playing] .game-toolbar .run-status{grid-column:1/-1;grid-row:2;font-size:9px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #playerDialog[data-screen=playing] .game-tools{gap:4px;grid-column:3;grid-row:1}
 #playerDialog[data-screen=playing] .game-tools button{width:27px;min-width:27px;height:31px;font-size:17px}
 #playerDialog[data-screen=playing] .back-menu{font-size:8px}
 .shot-meter{bottom:22px;padding:13px 14px 10px;width:calc(100% - 28px)}
 .shot-meter-heading strong{font-size:10px}.shot-meter>p{font-size:10px}
}
@media(max-height:540px) and (min-width:621px){
 #playerDialog[data-screen=playing] .game-toolbar{min-height:40px;height:40px;padding:4px 12px;gap:12px}
 #playerDialog[data-screen=playing] .game-toolbar .run-status{font-size:9px}
 #playerDialog[data-screen=playing] .game-tools button{width:29px;min-width:29px;height:30px;font-size:18px}
 #playerDialog[data-screen=playing] #gameView .touch-controls{inset:40px 0 0;background:transparent;border:0}
 .shot-meter{bottom:16px;width:min(350px,calc(100% - 244px));padding:10px 13px 8px}
 .shot-meter-heading{margin-bottom:9px}.shot-meter-heading strong{font-size:10px}.shot-meter-track{height:19px}.shot-meter>p{font-size:9px;margin-top:7px}
}

#playerDialog[data-screen=playing] #gameCanvas:focus{outline:none}
#playerDialog[data-screen=playing] #gameCanvas:focus-visible{outline:1px solid #fff3d344;outline-offset:-1px}
.shot-setup{position:absolute;left:50%;bottom:30px;transform:translateX(-50%);z-index:5;width:min(400px,calc(100% - 32px));padding:13px 16px;border:1px solid #fff0ce99;border-radius:8px;background:#173c32f2;color:#fff4d3;box-shadow:3px 4px 0 #102a2d55;font-family:var(--mono);pointer-events:none}
.shot-setup[hidden]{display:none}.shot-setup>div{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:9px;line-height:1.7}.shot-setup strong{font-size:10px}.shot-setup b{font-size:12px;font-weight:normal;color:#b9e0ba}.shot-setup i{font-style:normal;margin:0 5px;color:#fff0ce77}.shot-setup p{font-size:11px;line-height:1.7;text-align:center;margin:9px 0 5px}.shot-setup small{display:block;font-size:9px;line-height:1.8;text-align:center;color:#fff0cec4}
@media(max-width:620px){.shot-setup{bottom:22px;width:calc(100% - 28px);padding:12px 14px}.shot-setup small{font-size:9px}}
@media(max-height:540px) and (min-width:621px){.shot-setup{bottom:16px;width:min(350px,calc(100% - 244px));padding:9px 12px}.shot-setup p{font-size:10px;margin:6px 0 4px}.shot-setup small{font-size:8px}}
