:root {
  color-scheme: dark;
  font-family: Inter, "SF Pro Display", system-ui, sans-serif;
  background: #120d0a;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background:
    radial-gradient(circle at 50% 20%, #4b2b28 0, #17100d 42%, #080706 78%),
    #120d0a;
}

body {
  display: grid;
  place-items: center;
  padding:
    max(6px, env(safe-area-inset-top))
    max(4px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(4px, env(safe-area-inset-left));
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#game-shell {
  position: relative;
  width: min(calc(100vw - 8px), calc((100vh - 16px) * 941 / 1672));
  height: auto;
  aspect-ratio: 941 / 1672;
  box-shadow: 0 0 0 1px #c29a574d, 0 0 58px #000e;
  background: #100c09;
  overflow: hidden;
}

@supports (height: 100svh) {
  html, body { height: 100svh; }

  #game-shell {
    width: min(
      calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 8px),
      calc((100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px) * 941 / 1672)
    );
  }
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

#loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 18px;
  color: #e2c38d;
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, #d2aa6509 8px 9px),
    radial-gradient(circle at 50% 42%, #622b322e, transparent 52%),
    #120d0a;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .2em;
  text-align: center;
}

#loading i {
  display: block;
  width: 180px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #d7b16f, #8f303c, transparent);
  animation: evidence-scan 1.35s ease-in-out infinite alternate;
  transform-origin: center;
}

@keyframes evidence-scan {
  from { transform: scaleX(.25); opacity: .45; }
  to { transform: scaleX(1); opacity: 1; }
}

#loading.hidden { display: none; }
