/* Mobile web corrections, scoped to the four audited games. */
html.pucara-game-host { height: 100dvh; min-height: 100dvh; overflow: hidden; }
.pucara-fullscreen { position:fixed; top:max(8px, env(safe-area-inset-top)); right:max(8px, env(safe-area-inset-right)); z-index:2147483647; width:38px; height:38px; border:1px solid #efc75e; border-radius:50%; background:#030d08e0; color:#ffe599; font:24px/1 Arial,sans-serif; touch-action:manipulation; }
.pucara-fullscreen[hidden] { display:none; }
html.pucara-game-host .app-shell { height:100dvh; min-height:0; }
html.pucara-game-host .tournament-screen { min-height:0; height:100%; }
html.pucara-game-host .classic-panel { min-height:0; max-height:100%; overflow-y:auto; }
html.pucara-game-host .match-result__panel { box-sizing:border-box; min-width:0; width:min(420px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow:auto; }
html.pucara-game-host .tournament-selection-panel,
html.pucara-game-host .tournament-matchup-panel,
html.pucara-game-host .poker-start-card { max-height:calc(100dvh - 24px); overflow-y:auto; }
html.pucara-game-host .modal-card { max-height:calc(100dvh - 24px); overflow-y:auto; }
@media (orientation:landscape) and (max-height:650px) {
  html.pucara-game-host { --pucara-mobile-safe-right:env(safe-area-inset-right,0px); }
}
html.pucara-game-host .menu-card { max-height:calc(100dvh - 24px); overflow:auto; }
html.pucara-game-host .classic-dialog { max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow:auto; }
@media (orientation:landscape) and (max-height:650px) {
  html.pucara-game-host .menu-header > img { max-height:calc(100dvh - 125px); width:auto; max-width:100%; margin:auto; object-fit:contain; }
}
html.pucara-game-host .full-settings { max-height:calc(100dvh - 24px); }
html.pucara-game-host .legal-view { min-height:0; overflow:auto; }
html.pucara-game-host .legal-view iframe { min-height:0; height:55dvh; }
@media (orientation:landscape) and (max-height:650px) {
  html.pucara-game-host .menu-icon-stage { min-height:0; }
  html.pucara-game-host .menu-gallery.menu-icon-stage img.menu-game-icon { width:auto; height:clamp(90px,calc(100dvh - 145px),220px); max-width:100%; }
}
/* During play, the game's own return control leads back to its menu. */
body:has(.backgammon-game) > .pucara-site-back,
body:has(.poker-table) > .pucara-site-back,
body:has(#screen-game.is-active) > .pucara-site-back,
body:has(#screen-puzzles.is-active) > .pucara-site-back,
body:has(#screen-difficulty.is-active) > .pucara-site-back { display:none; }
