:root {
  color-scheme: dark;
  font-family: "Courier New", Courier, monospace;
  background: #0a0014;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 1px;
  height: 100%;
  min-height: 1px;
  margin: 0;
  overflow: hidden;
  background: #0a0014;
}

body {
  overscroll-behavior: none;
}

.experience {
  position: fixed;
  inset: 0;
  min-width: 1px;
  min-height: 1px;
  overflow: hidden;
  background: #0a0014;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.75rem;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  overflow: hidden;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 24% 28%, #ff2ec4 0 8%, transparent 9%),
    radial-gradient(circle at 72% 64%, #ffd200 0 10%, transparent 11%),
    linear-gradient(135deg, #7b2ff7, #00e0ff 48%, #00ff9d);
}

.fallback[hidden] {
  display: none;
}

.fallback p {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0.2rem 0.45rem;
  color: #fff;
  font-size: clamp(0.8rem, 2.4vw, 1.1rem);
  font-weight: 700;
  line-height: 1.45;
  background: rgb(10 0 20 / 78%);
}

.fallback__title {
  display: block;
  max-width: 100%;
  color: #fff;
  font-size: clamp(2.5rem, 20vw, 11rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.08em;
  overflow-wrap: anywhere;
  text-shadow:
    0.04em 0.04em 0 #000,
    -0.04em 0 #ff004d,
    0.04em 0 #00e0ff;
}

.fallback__note {
  opacity: 0.9;
}

.stage {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 1px;
  min-height: 1px;
  padding: 0;
  overflow: hidden;
  color: inherit;
  font: inherit;
  text-align: initial;
  appearance: none;
  border: 0;
  border-radius: 0;
  background: #0a0014;
  cursor: crosshair;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.stage[hidden] {
  display: none;
}

.stage:focus-visible {
  z-index: 3;
  outline: 4px solid #fff;
  outline-offset: -8px;
  box-shadow: inset 0 0 0 8px #0a0014;
}

canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}

.hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: 0.22rem 0.5rem;
  color: #fff;
  font-size: clamp(0.72rem, 2.5vw, 0.9rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.035em;
  text-align: center;
  text-shadow: 0 1px 3px #000;
  background: rgb(10 0 20 / 58%);
  transform: translateX(-50%);
  pointer-events: none;
}

@media (max-height: 18rem) {
  .hint {
    bottom: max(0.25rem, env(safe-area-inset-bottom));
    padding-block: 0.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hint {
    letter-spacing: normal;
  }
}
