:root {
  --bg: #10151f;
  --ink: #cfd8e6;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: radial-gradient(circle at 50% 0%, #1d2740 0%, var(--bg) 70%);
  color: var(--ink);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  /* Not inherited — the canvas sets its own, stricter value below. */
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 360 / 640;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  image-rendering: auto;
  /* Rapid tapping is the whole game, so the play surface opts out of every
     browser touch gesture: no double-tap zoom, no pinch, no pan, and no
     300ms tap delay waiting to see if a second tap is coming. */
  touch-action: none;
  -webkit-touch-callout: none;
}

.hint {
  flex: 0 0 auto;
  margin: 0;
  text-align: center;
  opacity: 0.65;
  font-size: 13px;
}

@media (max-height: 480px) {
  .hint { display: none; }
}
