html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #102c2d; overscroll-behavior: none; }
body { height: 100dvh; }
#game-stage {
  position: absolute; left: 50%; top: 50%; width: 100%; height: 100%;
  transform: translate(-50%, -50%);
}
#game-frame { display: block; width: 100%; height: 100%; border: 0; touch-action: none; }
#fullscreen-toggle {
  position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right));
  width: 44px; height: 44px; display: grid; place-items: center;
  padding: 0; border: 1px solid #fff2d980; border-radius: 12px;
  background: #102c2dcc; color: #fff2d9; cursor: pointer; touch-action: manipulation;
}
#fullscreen-toggle:focus-visible { outline: 3px solid #ffd45c; outline-offset: 3px; }
#fullscreen-toggle[hidden] { display: none; }
#fullscreen-status {
  position: absolute; right: 12px; top: 60px; max-width: min(320px, 80%);
  padding: 10px 14px; border-radius: 10px; background: #102c2d; color: #fff2d9;
  font: 16px/1.5 system-ui, sans-serif;
}
@media (orientation: portrait) {
  #game-stage { width: 100dvh; height: 100dvw; transform: translate(-50%, -50%) rotate(90deg); }
  #fullscreen-toggle { top: 12px; right: max(12px, env(safe-area-inset-bottom)); }
}
