* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #231F20; }

#unity-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#unity-canvas {
  background: #231F20;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Desktop: keep the 8:5 aspect, cap at 960×600, shrink to fit small windows */
#unity-container.unity-desktop #unity-canvas {
  aspect-ratio: 8 / 5;
  width: min(960px, 96vw, 150vh);
  height: auto;
  max-width: 100vw;
}

/* Mobile: fill the whole screen edge-to-edge. CameraFitter.cs widens the camera
   in portrait so the full board stays visible and the game's background fills the
   screen (no black bars). (dvh avoids the iOS Safari URL-bar cutoff.) */
#unity-container.unity-mobile {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #231F20;
  touch-action: none;
}

#unity-container.unity-mobile #unity-canvas {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
}

#unity-loading-bar {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center; }
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-dark.png') no-repeat center; }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center; }

#unity-footer { position: relative; }
.unity-mobile #unity-footer { display: none; }

#unity-webgl-logo { float: left; width: 204px; height: 38px; background: url('webgl-logo.png') no-repeat center; }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px; }
#unity-fullscreen-button { cursor: pointer; float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center; }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none; }
