/* Fullscreen is a game surface and one toolbar, not a scrolled library page.
   Keep the iframe in place so expanding/rotating never restarts a live game. */
:root .player-screen.is-fullscreen {
  box-sizing: border-box;
  background: #000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
}
:root .player-screen.is-viewport-fullscreen {
  position: fixed;
  inset: auto;
  left: var(--ps2-fullscreen-left, 0px);
  top: var(--ps2-fullscreen-top, 0px);
  width: var(--ps2-fullscreen-width, 100vw);
  height: var(--ps2-fullscreen-height, 100dvh);
  z-index: 1000;
}
:root .player-screen.is-fullscreen .player-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
  gap: 0;
  margin: 0;
  padding: env(safe-area-inset-top, 0px) max(4px, env(safe-area-inset-right)) 0 max(4px, env(safe-area-inset-left));
  background: #080c16;
}
:root .player-screen.is-fullscreen .back-link,
:root .player-screen.is-fullscreen .player-title,
:root .player-screen.is-fullscreen .player-bottom,
:root .player-screen.is-fullscreen .quick-controls,
:root .player-screen.is-fullscreen .delivery-status,
:root .player-screen.is-fullscreen .memory-card-launcher,
:root .player-screen.is-fullscreen .game-storage,
:root .player-screen.is-fullscreen .player-ad:empty { display: none; }
:root .player-screen.is-fullscreen .player-actions {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 2px 0;
}
:root .player-screen.is-fullscreen .player-actions > button {
  flex: 0 0 auto;
  min-height: 40px;
  margin: 0;
  border-radius: 5px;
}
:root .player-screen.is-fullscreen .player-actions .button {
  padding: 8px 10px;
  font-size: 11px;
  gap: 6px;
}
:root .player-screen.is-fullscreen #touchControlsButton { margin-right: 0; }
:root .player-screen.is-fullscreen #fullscreenButton { order: 10; width: 40px; }
:root .player-screen.is-fullscreen .player-stage {
  flex: 1 1 0;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  min-width: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #000;
}
/* Future populated banners keep their slots. Empty placeholders cost no pixels. */
:root .player-screen.is-fullscreen .player-ad { flex: 0 0 auto; min-height: 0; margin: 0; border-radius: 0; }
@media (max-width: 620px) {
  :root .player-screen.is-fullscreen .player-actions { gap: 2px; }
  :root .player-screen.is-fullscreen .player-actions > button { min-height: 44px; }
  :root .player-screen.is-fullscreen .player-actions .button { padding: 8px; font-size: 10px; gap: 0; }
  :root .player-screen.is-fullscreen #controlsButton { width: 36px; font-size: 0; }
  :root .player-screen.is-fullscreen #fullscreenButton { width: 36px; }
}
