/* Short landscape screens use a compact header and a separate touch-control rail. */
@media(orientation:landscape) and (max-height:600px) and (max-width:1100px){
 body .shell{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
 body:not([data-view=home]) .shell .game-header{grid-template-columns:1fr 100px 1fr;grid-template-rows:auto;padding:5px 0;gap:8px;min-height:0}
 body:not([data-view=home]) .game-header .brand{grid-column:2;grid-row:1}
 body:not([data-view=home]) .game-header .anniversary-logo{width:84px;height:54px}
 body:not([data-view=home]) .game-header .header-nav{grid-column:1;grid-row:1;grid-template-columns:repeat(3,48px);gap:8px}
 body:not([data-view=home]) .game-header .top-actions{grid-column:3;grid-row:1;gap:8px}
 body:not([data-view=home]) .game-header .header-nav .gorilla-nav-button,body .game-header .top-actions .settings-button{width:48px;height:48px;flex-basis:48px;padding:3px;border-radius:12px}
 body:not([data-view=home]) .game-header .gorilla-sprite,body .settings-sprite{width:40px;height:40px}
 #gameView{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:0 12px}
 #gameView>*{grid-column:1 / -1}
 #gameView .game-heading{grid-row:1;padding:8px 0}
 #gameView .game-heading h1{font-size:22px;max-width:none}
 #gameView .arena{grid-column:1;grid-row:2;min-height:220px;height:calc(100dvh - 112px);aspect-ratio:auto}
 #gameView .touch-controls{grid-column:2;grid-row:2;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;margin:0}
 #gameView .touch-controls button{width:64px;height:64px;flex:0 0 64px;padding:4px;border-radius:50%;display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:22px;touch-action:none}
 #gameView .touch-controls span{font-size:10px;margin:4px 0 0}
 #gameView .hud{padding:12px 16px}.arena .intro{top:25%;left:6%}.arena .intro h2{font-size:29px;margin:6px 0}.arena .intro p,.arena .intro-hint,.arena .intro .pill{display:none}
 #gameView .result,#gameView .pause{padding:12px 18px;top:50%;max-height:95%}.arena .result h2,.arena .pause h2{font-size:27px;margin:4px 0}.arena .result-stats{margin:8px 0}.arena .result-actions{margin-top:8px}
 #pGameView{display:grid;grid-template-columns:minmax(0,1fr) 136px;gap:0 10px}
 #pGameView>*{grid-column:1 / -1}
 #pGameView .pango-heading{grid-row:1;height:34px;margin:0}
 #pGameView .pango-layout{grid-column:1;grid-row:2}
 #pGameView .pango-stage{height:calc(100dvh - 108px);min-height:220px}
 #pGameView .pango-scoreboard{flex-basis:42px;padding:5px 10px;gap:12px}
 #pGameView .pango-touch{grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(3,42px);grid-template-rows:repeat(2,46px);align-self:center;justify-content:center;gap:4px;margin:0}
 #pGameView .pango-touch button{min-width:42px;min-height:46px}
 #pGameView .pango-touch [data-dir=up]{grid-column:2;grid-row:1}#pGameView .pango-touch [data-dir=left]{grid-column:1;grid-row:2}#pGameView .pango-touch [data-dir=down]{grid-column:2;grid-row:2}#pGameView .pango-touch [data-dir=right]{grid-column:3;grid-row:2}
 .pango-overlay{padding:10px 14px;max-height:95%;overflow:auto}.pango-overlay h2{font-size:26px;margin:6px 0}.pango-overlay .eyebrow,.pango-overlay-hint{display:none}.pango-overlay .primary-button{margin-top:10px}
}
@media(orientation:landscape) and (max-height:600px) and (max-width:1100px){
 #pGameView{display:block}
 #pGameView .pango-stage{display:grid;grid-template-columns:minmax(0,1fr) 136px;grid-template-rows:42px minmax(0,1fr);gap:0 10px}
 #pGameView .pango-scoreboard{grid-column:1;grid-row:1;min-height:0}
 #pGameView .pango-board{grid-column:1;grid-row:2;height:100%;min-height:0}
 #pGameView .pango-touch{grid-column:2;grid-row:1 / 3}
 #pGameView .pango-touch button{border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--ink);font-size:24px;touch-action:none}
 #pGameView .pango-overlay p:not(.pango-save){display:none}
 #pGameView .pango-overlay h2{font-size:25px}
 #pGameView .pango-stage:fullscreen{height:100dvh}
 #gameView .arena:fullscreen{height:100dvh;min-height:0}
}
