/* Shared game canvas. Keep each game's top inset and floating control insets.
   Apply only to the outer game container, never nested stages or dialogs. */
html body > .sg-game-viewport {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
  height: var(--sg-game-visible-height, calc(var(--vh, 1vh) * 100));
  min-height: 0;
}

/* Follow the visible viewport on rotation and browser/PWA size changes.
   Older browsers retain the existing JavaScript --vh fallback above. */
@supports (height: 100dvh) {
  html body > .sg-game-viewport {
    height: var(--sg-game-visible-height, 100dvh);
  }
}
