* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05070f;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 38%, #0c1226 0%, #070a16 52%, #04050c 100%);
}

#stage {
  position: relative;
  width: min(100vw, calc(100vh * 4 / 3));
  height: min(100vh, calc(100vw * 3 / 4));
  aspect-ratio: 4 / 3;
  box-shadow:
    0 0 0 1px rgba(120, 150, 220, 0.10),
    0 0 60px rgba(30, 70, 160, 0.22),
    0 24px 80px rgba(0, 0, 0, 0.65);
}

#stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#gl {
  z-index: 1;
}

#hud {
  z-index: 2;
  pointer-events: none;
}

#fatal {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 4, 4, 0.92);
  color: #ff6a5e;
  font-family: monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  text-align: center;
}
