html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

#unity-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

/*
  Letterbox via CSS vars --play-w / --play-h (set in index.html / playconfig.js).
  Defaults: Flappy portrait 288:512.
  Catalogue hub: FULL_BLEED=1 → canvas fills viewport (game letterbox stays in Unity GameViewport).
*/
#unity-canvas {
  display: block;
  --pw: var(--play-w, 288);
  --ph: var(--play-h, 512);
  width: min(100vw, calc(100vh * var(--pw) / var(--ph)));
  height: min(100vh, calc(100vw * var(--ph) / var(--pw)));
  max-width: 100vw;
  max-height: 100vh;
  background: #000;
  outline: none;
}

html.full-bleed #unity-canvas,
#unity-canvas.full-bleed {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
}

#unity-loading-bar {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: #000;
}

#unity-progress-bar-empty {
  width: min(280px, 70vw);
  height: 4px;
  background: #2a2a2a;
  overflow: hidden;
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: #e8e8e8;
  transition: width 0.1s linear;
}

#unity-warning {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: none;
  z-index: 10;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
}
