/* space-lander fullscreen: keep the arena clear of the shell dock (top bar, or left rail on short landscape). */
html.pip-immersive body[data-screen="play"] #screen-play {
  top: calc(var(--pip-vvt, 0px) + var(--pip-dock-h, 0px) + 8px);
  left: calc(env(safe-area-inset-left, 0px) + var(--pip-rail-w, 0px));
  right: env(safe-area-inset-right, 0px);
  bottom: 0;
}
html.pip-immersive body[data-screen="play"] .in-game-hud { padding-top: 6px; }
/* full screen: no ad wells, footers or long copy while playing in the stage */
html.pip-immersive .playyard-ad, html.pip-native .playyard-ad,
html.pip-immersive .content-below, html.pip-native .content-below,
html.pip-immersive .hero .facts, html.pip-native .hero .facts { display: none !important; }
html.pip-immersive body:not([data-screen="play"]) #screen-title,
html.pip-immersive body:not([data-screen="play"]) #screen-how,
html.pip-immersive body:not([data-screen="play"]) #screen-missions {
  padding-top: calc(var(--pip-vvt, 0px) + var(--pip-dock-h, 0px) + 8px);
}
/* native full screen: keep controls clear of the home bar and notch */
html.pip-native .touch-controls { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
/* landscape: shorter control strip, arena keeps its height */
@media (orientation: landscape) and (max-height: 520px) {
  body[data-screen="play"] .touch-controls { height: 120px; padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  body[data-screen="play"] .ctrl-btn { width: 64px; height: 64px; }
}
/* depth: soft vignette over the arena, below HUD and controls */
.game-viewport::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  box-shadow: inset 0 0 90px rgba(2, 6, 18, .55); }

/* full screen menus: title, manual and mission screens fit the stage with no page scroll;
   long lists (manual steps, mission tray) scroll inside their own area */
html.pip-immersive .hub-bar, html.pip-native .hub-bar { display: none !important; }
html.pip-immersive body[data-screen="title"] #screen-title,
html.pip-immersive body[data-screen="how"] #screen-how,
html.pip-immersive body[data-screen="missions"] #screen-missions,
html.pip-native body[data-screen="title"] #screen-title,
html.pip-native body[data-screen="how"] #screen-how,
html.pip-native body[data-screen="missions"] #screen-missions {
  display: flex; align-items: center; justify-content: center;
  position: fixed; z-index: 90; overflow: hidden; box-sizing: border-box;
  top: calc(var(--pip-vvt, 0px) + var(--pip-dock-h, 0px));
  left: calc(env(safe-area-inset-left, 0px) + var(--pip-rail-w, 0px));
  right: env(safe-area-inset-right, 0px);
  bottom: env(safe-area-inset-bottom, 0px);
  padding: 8px 12px;
}
html.pip-immersive #screen-title .hero, html.pip-native #screen-title .hero,
html.pip-immersive #screen-how .hero, html.pip-native #screen-how .hero,
html.pip-immersive #screen-missions .hero, html.pip-native #screen-missions .hero {
  display: flex; flex-direction: column; width: 100%; max-height: 100%; min-height: 0;
  box-sizing: border-box; overflow: hidden; margin: 0 auto; padding: 14px 16px;
}
html.pip-immersive .hero .kicker, html.pip-native .hero .kicker,
html.pip-immersive .hero .lede, html.pip-native .hero .lede,
html.pip-immersive .hero .facts, html.pip-native .hero .facts,
html.pip-immersive .hd-about, html.pip-native .hd-about { display: none !important; }
html.pip-immersive .hero .btn, html.pip-native .hero .btn { min-height: 48px; }
html.pip-immersive .hero .btn-row, html.pip-native .hero .btn-row { flex: 0 0 auto; }
html.pip-immersive #screen-how .how-steps, html.pip-native #screen-how .how-steps,
html.pip-immersive #screen-missions .mission-tray, html.pip-native #screen-missions .mission-tray {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
@media (orientation: landscape) and (max-height: 520px) {
  html.pip-immersive #screen-title .hero, html.pip-native #screen-title .hero { padding: 10px 14px; }
  html.pip-immersive .hero h1, html.pip-native .hero h1,
  html.pip-immersive .hero h2, html.pip-native .hero h2 { font-size: 1.3rem; margin-bottom: 6px; }
  html.pip-immersive #screen-title .btn-row, html.pip-native #screen-title .btn-row { flex-wrap: nowrap; }
  html.pip-immersive #screen-title .btn-row .btn, html.pip-native #screen-title .btn-row .btn { flex: 1 1 0; min-width: 0; }
}
