:root {
  --screen: #060816;
  --magenta: #ef42d4;
  --purple: #6f2db3;
  --target: #ffd928;
  --pointer: #e62c39;
  --white: #fff;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #03030b;
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

body {
  display: grid;
  place-items: center;
}

#wrap {
  position: relative;
  width: 100vw;
  height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(235, 52, 211, .18), transparent 29%),
    radial-gradient(circle at 50% 70%, rgba(98, 52, 190, .17), transparent 34%),
    linear-gradient(180deg, #080514 0%, #020207 100%);
}

#wrap::before {
  content: "";
  position: absolute;
  inset: -8%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 31%, rgba(255, 73, 224, .17), transparent 23%),
    radial-gradient(ellipse at 50% 67%, rgba(76, 43, 170, .16), transparent 31%);
  filter: blur(31px);
}

#stage {
  position: relative;
  width: min(100vw, 760px);
  height: min(100dvh, 980px);
  display: grid;
  place-items: center;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 760px;
  max-height: 980px;
  filter: drop-shadow(0 0 28px rgba(242, 52, 213, .18));
}

#controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 18px max(24px, env(safe-area-inset-bottom));
  pointer-events: none;
}

/* Big illuminated cabinet-style push button. */
#tap {
  pointer-events: auto;
  cursor: pointer;
  width: min(46vw, 214px);
  height: min(16vw, 96px);
  min-height: 66px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 20%, #ffb1b8 0 7%, #ff6473 20%, #ed2948 52%, #a50724 78%, #650617 100%);
  box-shadow:
    0 8px 0 #610817,
    0 14px 27px rgba(0, 0, 0, .62),
    0 0 0 6px rgba(255, 255, 255, .08),
    0 0 0 13px rgba(107, 55, 204, .58),
    0 0 28px rgba(242, 64, 216, .52),
    inset 0 7px 12px rgba(255, 255, 255, .36);
  font: 900 clamp(18px, 4.3vw, 29px)/1 Arial Black, Impact, sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .45);
  transition: transform 45ms ease, box-shadow 45ms ease;
}

#tap:active,
#tap.pressed {
  transform: translateY(6px) scale(.985);
  box-shadow:
    0 2px 0 #610817,
    0 8px 18px rgba(0, 0, 0, .58),
    0 0 0 6px rgba(255, 255, 255, .07),
    0 0 0 13px rgba(107, 55, 204, .48),
    0 0 19px rgba(242, 64, 216, .46),
    inset 0 4px 9px rgba(255, 255, 255, .25);
}

#tap:focus-visible {
  outline: 3px solid white;
  outline-offset: 5px;
}

#hint {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  color: rgba(255, 255, 255, .42);
  font: 700 11px/1.3 Arial, sans-serif;
  letter-spacing: .08em;
  pointer-events: none;
}

@media (max-height: 720px) {
  #tap {
    width: 178px;
    height: 68px;
    min-height: 58px;
  }

  #controls { padding-bottom: 10px; }
}
