html { background: #070a14; -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: transparent;
}

/* The background: a deep navy-to-charcoal gradient with two faint, slow glows (cool blue and warm brass). */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  background:
    radial-gradient(42% 42% at 22% 22%, rgba(64, 96, 168, 0.26), transparent 70%),
    radial-gradient(38% 38% at 82% 84%, rgba(176, 141, 87, 0.14), transparent 70%),
    linear-gradient(160deg, #060912, #0c1122 55%, #11162a);
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  to { transform: translate3d(2%, -2%, 0) rotate(4deg) scale(1.06); }
}

/* The whole screen is the playground. */
canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
}
canvas:active { cursor: grabbing; }

/* The name for screen readers and search engines, not for the eye. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Sound on and off. */
.sound {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(243, 215, 158, 0.25);
  border-radius: 50%;
  background: rgba(10, 14, 30, 0.55);
  color: #e9dcc0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sound:hover { border-color: rgba(243, 215, 158, 0.55); }
.sound svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound .off, .sound[aria-pressed="true"] .on { display: none; }
.sound[aria-pressed="true"] .off { display: block; }

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}
