/* 5.28 — game page: when a game is open the screen belongs to the game.
   The site bar and footer step aside; one slim row keeps Back, the title, the record and the tools. */
body.is-game-open .topbar,
body.is-game-open .footer { display: none; }
body.is-game-open .game-view { min-height: 100dvh; padding: 0 0 24px; }
body.is-game-open .game-view__header { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; min-height: 56px; margin-bottom: 8px; padding: 6px 0; }
body.is-game-open .game-view__title { justify-content: flex-start; min-width: 0; gap: 10px; }
body.is-game-open .game-view__title > div { min-width: 0; }
body.is-game-open .game-view__icon { width: 36px; height: 36px; border-radius: 11px; font-size: 18px; flex: none; }
body.is-game-open .game-view__title h1 { overflow: hidden; font-size: clamp(16px, 1.6vw, 21px); text-overflow: ellipsis; white-space: nowrap; }
body.is-game-open .back-button { min-height: 44px; }
@media (max-width: 760px) {
  body.is-game-open .game-view__title p { display: none; }
}
/* Sports: the page row already names the game. The panel keeps its tools and the table takes the height of the screen. */
#gameStage .as-game:not(:fullscreen) .as-header > div:first-child { display: none; }
#gameStage .as-game:not(:fullscreen) .as-header { padding: 6px 10px; justify-content: flex-end; }
@media (min-width: 601px) and (min-height: 531px) {
  #gameStage .as-game:not(:fullscreen) .as-stage { height: clamp(360px, calc(100dvh - 210px), 900px); }
}
/* Campaign games: same rule as sports — the page row names the game, so the in-game title block goes
   and the play surface is sized on the height of the screen instead of running under the fold. */
#gameStage > section:not(:fullscreen) > header > div:first-child:has(> h2),
#gameStage .pr-shell:not(:fullscreen) .pr-top > div:first-child,
#gameStage .op-shell:not(:fullscreen) .op-hero > div:first-child { display: none; }
#gameStage > section:not(:fullscreen) > header:has(> div:first-child > h2),
#gameStage .pr-shell:not(:fullscreen) .pr-top,
#gameStage .op-shell:not(:fullscreen) .op-hero { justify-content: flex-end; min-height: 0; margin-bottom: 8px; padding-block: 0; }
@media (min-width: 601px) and (min-height: 531px) {
  #gameStage .pr-shell:not(:fullscreen):not(.campaign-viewport) .pr-stage canvas { height: clamp(390px, calc(100dvh - 262px), 690px); }
  #gameStage .op-shell:not(:fullscreen):not(.campaign-viewport) canvas { height: clamp(390px, calc(100dvh - 262px), 680px); }
}
