:root {
  color-scheme: dark;
  --ink: #100812;
  --gold: #ffc76a;
  --orange: #ff8a3d;
}

* {
  box-sizing: border-box;
}

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

body {
  display: grid;
  place-items: center;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 130, 54, 0.16), transparent 42%),
    radial-gradient(circle at 20% 90%, rgba(130, 65, 255, 0.12), transparent 36%),
    radial-gradient(circle at 84% 82%, rgba(45, 235, 200, 0.08), transparent 32%),
    linear-gradient(160deg, #120812 0%, #09060e 58%, #050408 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: -30%;
  pointer-events: none;
  opacity: 0.17;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.75) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255,193,92,0.45) 0 1px, transparent 1.8px);
  background-position: 0 0, 37px 23px;
  background-size: 83px 83px, 127px 127px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 72%);
}

.game-shell {
  position: relative;
  width: min(100vw, 160vh);
  height: min(62.5vw, 100vh);
  aspect-ratio: 16 / 10;
  border-radius: clamp(0px, 1.1vw, 18px);
  overflow: hidden;
  isolation: isolate;
  background: #0c0710;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 215, 150, 0.16),
    0 0 70px rgba(255, 124, 47, 0.08);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
  cursor: default;
  image-rendering: auto;
}

.game-shell.is-playing canvas {
  cursor: none;
}

.screen-glare,
.screen-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.screen-glare {
  background:
    linear-gradient(116deg, rgba(255,255,255,0.055) 0%, transparent 22%),
    linear-gradient(300deg, rgba(255,170,70,0.025) 0%, transparent 38%);
  mix-blend-mode: screen;
  opacity: 0.7;
}

.screen-vignette {
  background:
    radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.25) 82%, rgba(0, 0, 0, 0.48) 100%);
  box-shadow: inset 0 0 70px rgba(0,0,0,0.45);
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffe3b0;
  background: #100812;
  font-size: 1.2rem;
  padding: 2rem;
  text-align: center;
}

@media (max-aspect-ratio: 4/5) {
  .game-shell {
    width: 100vw;
    height: 62.5vw;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen-glare {
    opacity: 0.25;
  }
}
