html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#stage {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  height: 100vh;
  max-width: 100vw;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  background: #000;
}

#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.82);
  color: #4af;
  font-family: "Courier New", Courier, monospace;
  text-align: center;
  cursor: pointer;
}

#overlay.hidden { display: none; }

#overlay-icon {
  width: 96px;
  height: 96px;
  image-rendering: pixelated;
  border-radius: 18px;
}

#overlay h1 {
  color: #f80;
  font-size: 42px;
  margin: 6px 0;
  letter-spacing: 4px;
  text-shadow: 0 0 12px #f40;
}

#overlay p { margin: 2px 0; }

#overlay .hint { color: #888; line-height: 1.6; }

#overlay-score { color: #ff0; font-size: 20px; }
#overlay-best { color: #0f8; }

#overlay-start {
  margin-top: 14px;
  color: #fff;
  animation: blink 1.2s step-end infinite;
}

@keyframes blink { 50% { opacity: 0.15; } }

@media (hover: none) and (pointer: coarse) {
  #overlay .hint { display: none; }
}
