.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

.back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.6rem;
  color: var(--neon-cyan);
  letter-spacing: 1px;
}

.hud {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--neon-yellow);
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}

.hud span {
  color: var(--neon-green);
  font-size: 0.85rem;
}

.stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

canvas {
  background: #000;
  border: 2px solid var(--neon-green);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.35);
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.75);
  padding: 1rem;
  text-align: center;
}

.overlay.hidden {
  display: none;
}

.overlay-title {
  font-size: 1.1rem;
  color: var(--neon-magenta);
}

.overlay-msg {
  font-size: 0.6rem;
  color: var(--neon-cyan);
  line-height: 1.8;
}

.controls-hint {
  margin-top: 1rem;
  font-size: 0.5rem;
  color: #666;
  letter-spacing: 1px;
}

.touch-controls {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.dpad-row {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
}

.touch-btn {
  font-size: 0.65rem;
  padding: 0.9em 1.1em;
  user-select: none;
  touch-action: manipulation;
}

@media (pointer: coarse) {
  .touch-controls {
    display: flex;
  }
}
