:root {
  color-scheme: dark;
  background: #000;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  touch-action: none;
}

#unity-container {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
}

#unity-stage {
  position: relative;
  width: min(100vw, calc(100dvh * 9 / 16));
  height: min(100dvh, calc(100vw * 16 / 9));
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #000;
}

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

#unity-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
}

#unity-loading[hidden] {
  display: none;
}

#unity-progress-track {
  width: clamp(144px, 44%, 240px);
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #252525;
}

#unity-progress-value {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  transition: width 120ms ease-out;
}

#unity-warning {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  z-index: 2;
  width: min(90%, 420px);
  transform: translateX(-50%);
  color: #fff;
  font: 14px/1.4 system-ui, sans-serif;
  text-align: center;
}

#unity-warning:empty {
  display: none;
}

#unity-warning > div {
  margin-bottom: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgb(36 36 36 / 92%);
}

#unity-warning > .error {
  background: rgb(150 24 24 / 95%);
}

@supports not (height: 100dvh) {
  #unity-stage {
    width: min(100vw, calc(100vh * 9 / 16));
    height: min(100vh, calc(100vw * 16 / 9));
  }
}
