/* Landscape corrections only. Boards keep their game-specific ratios and rules. */
@media(orientation:landscape) and (max-height:600px){
 body[data-game-landscape="pvz"] #game{grid-template-rows:46px minmax(0,1fr) 30px 26px!important;}
 body[data-game-landscape="card-sort"] .play-options{display:flex;flex-wrap:nowrap!important;align-items:center;gap:4px!important;width:100%;height:44px!important;min-height:44px;margin:0!important;}
 body[data-game-landscape="card-sort"] .play-options>.tool{flex:1;min-width:0;padding:4px 5px;font-size:11px;white-space:nowrap;}
 body[data-game-landscape="card-sort"] .play-options>#coins{flex:none;min-width:44px;width:44px;}
 body[data-game-landscape="find-ball"] #home:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,.85fr);grid-template-rows:28px minmax(0,1fr) 56px 44px 28px;gap:4px 12px;min-height:0;position:relative;}
 body[data-game-landscape="find-ball"] #home>.home-topline{display:none;}
 body[data-game-landscape="find-ball"] #home>.hero{grid-area:2/1/4/2;display:grid;place-items:center;width:100%;height:100%;min-height:0;margin:0;padding:0;container-type:size;}
 body[data-game-landscape="find-ball"] #home .album-wrap{width:min(180px,75cqh);aspect-ratio:3/4;}
 body[data-game-landscape="find-ball"] #home>.start-wrap{grid-area:2/2;position:static;inset:auto;align-self:center;width:100%;max-width:280px;min-height:56px;margin:0;}
 body[data-game-landscape="find-ball"] #home>.home-actions{grid-area:3/2;position:static;inset:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%;height:56px;margin:0;padding:0;}
 body[data-game-landscape="find-ball"] #home .home-actions>.mode{position:static;min-width:44px;width:100%;min-height:56px;height:56px;margin:0;padding:3px;}
 body[data-game-landscape="find-ball"] #home .home-actions>.mode b{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;max-width:100%;font-size:10px;line-height:1.2;white-space:normal;}
 body[data-game-landscape="find-ball"] #home .home-actions .ui-icon{width:20px;height:20px;}
 body[data-game-landscape="find-ball"] #home>.sponsors-top{grid-area:1/1/2/3;margin:0!important;height:28px;min-height:28px;}
 body[data-game-landscape="find-ball"] #home>.sponsors-top .sponsor-link{height:28px;min-height:28px;padding-block:3px;}
 body[data-game-landscape="find-ball"] #home>.sponsors-bottom{grid-area:4/1/5/3;margin:0!important;height:44px;min-height:44px;}
 body[data-game-landscape="find-ball"] #home>.sponsors-bottom .sponsor-link{height:44px;min-height:44px;padding:4px 8px;}
 body[data-game-landscape="find-ball"] #home>.footer{grid-area:5/1/6/3;position:static;height:28px;min-height:28px;margin:0;padding:0;}
 body[data-game-landscape="find-ball"] .home-header{height:48px;min-height:48px;}
 body[data-game-landscape="find-ball"] #game:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:40px 28px 26px minmax(0,1fr) 44px 28px;gap:2px;min-height:0;}
 body[data-game-landscape="find-ball"] #game>.battle-heading{grid-row:1;}
 body[data-game-landscape="find-ball"] #game>.difference-dots{grid-row:2;margin:0;}
 body[data-game-landscape="find-ball"] #game>.sponsors-top{grid-row:3;margin:0 auto!important;}
 body[data-game-landscape="find-ball"] #game>#boards{grid-row:4;width:min(calc(100% - 100px),calc((var(--game-height) - 190px) * 3.2))!important;align-self:center;justify-self:center;margin:0;}
 body[data-game-landscape="find-ball"] #game>.sponsors-bottom{grid-row:5;margin:0 auto!important;}
 body[data-game-landscape="find-ball"] #game>.battle-footer{grid-row:6;position:static;justify-self:end;align-self:end;height:28px;min-height:28px;margin:0;}
 body[data-game-landscape="find-ball"] #game>#caption{display:none;}
 body[data-game-landscape="bridge-keeper"] #game:has(>#overlay.pause-screen:not([hidden])) #hud>#pause,
 body[data-game-landscape="bridge-keeper"] #game:has(>#overlay.pause-screen:not([hidden]))>footer{visibility:hidden;}
}
@media(orientation:landscape) and (max-height:540px){
 body[data-game-landscape="block-fit"] .game-controls>#tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%!important;padding:0!important;gap:4px!important;}
 body[data-game-landscape="block-fit"] .game-controls>#tray>.piece{box-sizing:border-box;width:100%!important;min-width:0;max-width:100%;}
 body[data-game-landscape="tile-trio"] .game-card .game-controls{box-sizing:border-box;padding-bottom:4px!important;}
 body[data-game-landscape="tile-trio"] .game-card .game-controls>.actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:44px;height:48px!important;min-height:48px!important;gap:4px!important;}
 body[data-game-landscape="tile-trio"] .game-card .game-controls>.actions button{height:44px!important;min-height:44px!important;}
 body[data-game-landscape="snake-arena"] .game-card .actions{grid-template-columns:repeat(3,minmax(44px,1fr))!important;grid-template-rows:44px;height:48px!important;min-height:48px!important;gap:4px!important;}
 body[data-game-landscape="snake-arena"] .game-card .actions button{height:44px!important;min-height:44px!important;}
 body[data-game-landscape="block-fit"] .game-card .game-controls>.actions,
 body[data-game-landscape="sand-clear"] .game-card .game-controls>.actions{height:92px!important;min-height:92px!important;grid-template-rows:44px 44px;gap:4px!important;}
 body[data-game-landscape="block-fit"] .game-card .game-controls>.actions button,
 body[data-game-landscape="sand-clear"] .game-card .game-controls>.actions button{height:44px!important;min-height:44px!important;}
 body[data-game-landscape="pixel-clear"][data-screen="battle"] #board-frame{width:min(calc(100vw - 250px),calc(var(--game-frame-height) - var(--game-navigation-height) - 128px))!important;height:auto!important;aspect-ratio:1;align-self:center;justify-self:center;}
 body[data-game-landscape="pixel-clear"][data-screen="battle"] #pause-cover{position:absolute!important;inset:0!important;width:100%;height:100%;z-index:3;}
 body[data-game-landscape="pixel-clear"] #pause-cover>button{box-sizing:border-box;min-width:0;max-width:calc(100% - 12px);min-height:44px;padding:8px 12px;}
}
