/* Reserve espaço para os controles dentro da altura real da tela. */
:is(#app.expanded,#app:fullscreen){
 position:fixed;inset:0;width:100%;height:100vh;height:var(--game-viewport-height,100dvh);
 max-width:none;min-height:0;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;
 padding:max(4px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));
}
:is(#app.expanded,#app:fullscreen)>.topbar{flex:0 0 auto;margin-bottom:5px;min-width:0}
:is(#app.expanded,#app:fullscreen)>.cabinet{display:flex;flex-direction:column;flex:1 1 0;min-height:0;min-width:0;overflow:hidden}
:is(#app.expanded,#app:fullscreen) .playfield,
:is(#app.expanded,#app:fullscreen) .playfield.menu-scene{flex:1 1 0;height:auto!important;min-height:0!important;min-width:0}
:is(#app.expanded,#app:fullscreen) .hud{flex:0 0 auto;padding:5px 9px;gap:8px;min-width:0}
:is(#app.expanded,#app:fullscreen) .hud-chapter{min-width:0}
:is(#app.expanded,#app:fullscreen) .hud-chapter strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:is(#app.expanded,#app:fullscreen) .powerline,
:is(#app.expanded,#app:fullscreen) .companion-status{flex:0 0 auto;padding:4px 9px}
:is(#app.expanded,#app:fullscreen) .controls:not([hidden]){display:flex!important;position:relative;flex:0 0 auto;min-width:0;padding:5px 7px;gap:8px;z-index:12}
:is(#app.expanded,#app:fullscreen) .move-controls{display:grid;grid-template-columns:1fr 1.3fr;gap:5px;flex:1;min-width:0;max-width:240px}
:is(#app.expanded,#app:fullscreen) .action-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex:1.65;min-width:0;max-width:330px}
:is(#app.expanded,#app:fullscreen) .controls button{width:100%;min-width:0;min-height:44px;padding:5px 4px}
:is(#app.expanded,#app:fullscreen) .move-controls .forward{font-size:28px;min-height:44px}
:is(#app.expanded,#app:fullscreen) .action-controls button{font-size:10px}
:is(#app.expanded,#app:fullscreen) .action-controls .laugh{font-size:19px}
:is(#app.expanded,#app:fullscreen)>.bottomline,
:is(#app.expanded,#app:fullscreen)>.support-banner,
:is(#app.expanded,#app:fullscreen)>.account-line{display:none}
:is(#app.expanded,#app:fullscreen) .overlay{padding:12px;overflow:auto;align-items:safe center}
:is(#app.expanded,#app:fullscreen) .menu-panel{margin:auto 0}
:is(#app.expanded,#app:fullscreen) .celebration-controls{align-items:center;justify-content:space-between}
.celebration-controls{display:flex!important;align-items:center;justify-content:space-between;gap:12px}
.celebration-controls[hidden]{display:none!important}
.celebration-controls span{font-size:12px;color:#ffdea2;line-height:1.4}
.celebration-controls button{width:auto!important;min-width:90px!important;padding:9px 16px!important;background:linear-gradient(135deg,#ffeec0,#edbb5b);color:#261e12}
@media(max-height:430px){
 :is(#app.expanded,#app:fullscreen) .topbar .brand-icon{width:28px;height:28px}
 :is(#app.expanded,#app:fullscreen) .top-tools button{height:29px;min-width:29px}
 :is(#app.expanded,#app:fullscreen) .hud-score strong{font-size:16px}
 :is(#app.expanded,#app:fullscreen) .hud-vitals span{font-size:13px}
 :is(#app.expanded,#app:fullscreen) .companion-status{font-size:8px;padding:3px 8px}
 :is(#app.expanded,#app:fullscreen) .powerline{font-size:8px;padding:3px 8px}
}
