html, body { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; background: #000; }
#unity-container { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
/* Landscape --game-w:--game-h (default 1920:1080, the game's CanvasScaler reference), scaled to fit the viewport (phone & PC), centered, black bars on the rest.
   index.html overrides both variables for ?w=&h= test sizes. */
:root { --game-w: 1920; --game-h: 1080; }
#unity-canvas {
  display: block; background: #000;
  width: min(100vw, calc(100vh * var(--game-w) / var(--game-h))); height: min(100vh, calc(100vw * var(--game-h) / var(--game-w)));
}
@supports (height: 100dvh) {
  #unity-canvas {
    width: min(100vw, calc(100dvh * var(--game-w) / var(--game-h))); height: min(100dvh, calc(100vw * var(--game-h) / var(--game-w)));
  }
}
#unity-loading-bar {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 40%; max-width: 240px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.2);
}
#unity-progress-bar-full { width: 0%; height: 100%; border-radius: 3px; background: #fff; }
#diagnostics-icon { position: fixed; right: 0; bottom: 10px; }
