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

#viewport {
  position: fixed;
  inset: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  display: flex;
  align-items: center;
  justify-content: center;
}

#unity-container {
  position: relative;
  width: min(100%, calc((100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 6 / 13));
  width: min(100%, calc((100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 6 / 13));
  aspect-ratio: 6 / 13;
  background: #231f20;
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}

#loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: white;
  font: 16px sans-serif;
}

#loading[hidden], #warning[hidden] { display: none; }
#progress-track { width: 60%; height: 6px; background: #555; }
#progress { width: 0; height: 100%; background: #f6a336; }
#warning { position: absolute; inset: 0 0 auto; padding: 12px; background: #aa3030; color: white; }
