:root {
  --playables-viewport-height: 100vh;
  --playables-game-width: min(100vw, calc(var(--playables-viewport-height) * 1.777777778));
  --playables-game-height: min(var(--playables-viewport-height), calc(100vw * 0.5625));
}

@supports (height: 100dvh) {
  :root {
    --playables-viewport-height: 100dvh;
  }
}

html,
body {
  width: 100vw;
  height: var(--playables-viewport-height);
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #05070b;
  overscroll-behavior: none;
  touch-action: none;
}

body {
  position: fixed;
  inset: 0;
}

#unity-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: var(--playables-viewport-height);
  min-width: 0;
  min-height: 0;
}

#unity-canvas {
  display: block;
  width: var(--playables-game-width);
  height: var(--playables-game-height);
  min-width: 0;
  min-height: 0;
  background: #05070b;
}

#unity-loading-bar {
  position: absolute;
  left: 50%;
  bottom: calc((var(--playables-viewport-height) - var(--playables-game-height)) / 2 + 32px);
  width: min(280px, max(32px, calc(var(--playables-game-width) - 48px)));
  height: 4px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.18);
}

#unity-loading-label {
  position: absolute;
  left: 50%;
  bottom: calc((var(--playables-viewport-height) - var(--playables-game-height)) / 2 + 48px);
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.86);
  font: 13px/1.2 Arial, sans-serif;
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: #ffffff;
}

#unity-warning {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  z-index: 1;
  display: none;
  padding: 12px 14px;
  color: #ffffff;
  background: rgba(168, 67, 67, 0.94);
  font: 14px/1.4 Arial, sans-serif;
}
