:root {
  --bg0: #07051a;
  --bg1: #1a0a3a;
  --bg2: #0d0830;
  --text: #f5f0ff;
  --muted: rgba(220, 200, 255, 0.55);
  --green: #7dff4a;
  --cyan: #5ec8ff;
  --pink: #ff4fd8;
  --font: "Chakra Petch", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #07051a;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  touch-action: none;
  user-select: none;
}

#wrap {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Score lives on the dial; keep DOM node for bridge updates */
#hud {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.hint {
  position: absolute;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
  max-width: 280px;
  pointer-events: none;
}

.hint.hidden {
  visibility: hidden;
}

@media (min-width: 700px) {
  .hint {
    bottom: max(32px, env(safe-area-inset-bottom));
    font-size: 1.05rem;
    max-width: 360px;
  }
}

@media (min-width: 900px) {
  .hint {
    font-size: 1.15rem;
    max-width: 420px;
  }
}
