html, body {
  margin: 0;
  height: 100%;
  background: #070b18;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
#wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
canvas {
  width: min(100vw, calc(100vh * 4 / 3));
  height: min(100vh, calc(100vw * 3 / 4));
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #000;
  box-shadow: 0 0 40px rgba(80, 200, 120, 0.25);
}

#touch { display: none; }
@media (pointer: coarse) {
  #touch { display: block; }
}
#touch button {
  position: fixed;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  border: 3px solid rgba(255, 255, 255, 0.7);
  background: rgba(20, 30, 60, 0.55);
  color: #fff;
  font-size: 24px;
  font-family: "Press Start 2P", monospace;
  touch-action: none;
}
#touch button.on { background: rgba(90, 200, 110, 0.7); }
.dpad .up    { left: 84px;  bottom: 156px; }
.dpad .left  { left: 16px;  bottom: 88px; }
.dpad .right { left: 152px; bottom: 88px; }
.dpad .down  { left: 84px;  bottom: 20px; }
.ab .a { right: 20px;  bottom: 70px; width: 80px; height: 80px; border-radius: 50%; background: rgba(200, 40, 40, 0.6); }
.ab .b { right: 116px; bottom: 30px; border-radius: 50%; }
