:root {
  --bg: #10131a;
  --fg: #f5f7ff;
  --accent: #ffb03a;
  --accent-2: #5bd6ff;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(1200px 800px at 50% 20%, #1b2233, var(--bg));
  color: var(--fg);
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  overflow: hidden;
}

#stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 5;
  pointer-events: none;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#hud .hud-left {
  display: flex;
  gap: 16px;
}

#hud button {
  pointer-events: auto;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent), #ff6b3a);
  color: #1d1d1d;
  font-weight: 700;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(9, 11, 17, 0.75);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.overlay.hidden {
  display: none;
}

.overlay-card {
  background: rgba(24, 30, 45, 0.92);
  padding: 24px 28px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  text-align: center;
  max-width: 320px;
}

.overlay-card h1 {
  margin: 0 0 12px 0;
  font-size: 24px;
}

.overlay-card p {
  margin: 0 0 16px 0;
  font-size: 14px;
  line-height: 1.6;
}

.overlay-card button {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent-2), #7bffcf);
  color: #0c151a;
  font-weight: 700;
  touch-action: manipulation;
}
