/* Shared viewport frame: controls stay above playfields and captions keep their space. */
:is(.fz-screen,.snake-screen,.turbo-race,.juice-screen,.color-screen,.gate-game.gate-lesson){box-sizing:border-box;height:100dvh;min-height:0;padding-top:max(8px,env(safe-area-inset-top));padding-bottom:max(18px,env(safe-area-inset-bottom))}
:is(.fz-screen,.snake-screen,.turbo-race,.juice-screen,.color-screen,.gate-game.gate-lesson) .game-toolbar{position:sticky;top:0;z-index:50;flex-shrink:0;min-height:56px;box-sizing:border-box}
.fz-wrap{container-type:size}
.fz-wrap .fz-board{width:min(100%,calc((100cqh - 82px)*4/3))}
.fz-wrap .fz-board[data-layout="tall"]{width:min(100%,calc((100cqh - 82px)*500/760))}
.fz-help{flex:none;text-align:center;line-height:1.3;margin:6px 0 0;max-width:100%}
.fz-message{line-height:1.3;overflow-wrap:anywhere;min-height:24px}
@media(max-width:600px){
 :is(.fz-screen,.snake-screen,.turbo-race,.juice-screen,.color-screen,.gate-game.gate-lesson){padding-left:6px;padding-right:6px}
 :is(.fz-screen,.snake-screen,.turbo-race,.juice-screen,.color-screen,.gate-game.gate-lesson) .game-toolbar{width:100%;margin:0;padding:2px;gap:3px}
 .game-toolbar .game-controls{gap:5px}
}
@media(max-height:520px) and (orientation:landscape){.gate-lesson>.gate-help{display:block;font-size:11px;line-height:1.2}.juice-screen.juice-a{grid-template-rows:56px 42px auto 1fr auto}.juice-a .juice-scene{width:min(100%,calc((100dvh - 140px)*5/3))}}
@media(max-width:600px) and (min-height:501px){.juice-a .juice-scene{width:min(100%,800px,calc((100dvh - 400px)*5/3))}}
