* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b0f1a;
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  touch-action: none;
}

#game {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: max(16px, env(safe-area-inset-top)) 18px 0;
  pointer-events: none;
  z-index: 5;
}

#scoreBox {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

#score {
  font-family: "Orbitron", sans-serif;
  font-weight: 900;
  font-size: clamp(28px, 8vw, 44px);
  color: #fff;
  text-shadow: 0 0 18px rgba(120, 200, 255, 0.55);
  line-height: 1;
}

#comboLabel {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: clamp(12px, 3vw, 15px);
  color: #ffd166;
  text-shadow: 0 0 10px rgba(255, 209, 102, 0.6);
  letter-spacing: 0.05em;
}

.hidden {
  display: none !important;
}

#muteBtn {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 9, 16, 0.72);
  backdrop-filter: blur(4px);
  z-index: 10;
  padding: 24px;
}

.panel {
  width: min(420px, 100%);
  text-align: center;
  color: #fff;
  animation: pop 0.35s ease;
}

@keyframes pop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.panel h1 {
  font-size: clamp(30px, 9vw, 46px);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-shadow: 0 0 24px rgba(120, 200, 255, 0.6);
}

.panel h1 .sub {
  display: block;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(12px, 3.4vw, 15px);
  font-weight: 700;
  letter-spacing: 0.35em;
  color: #7fd8ff;
  margin-top: 6px;
}

.desc {
  margin-top: 18px;
  font-size: clamp(14px, 3.6vw, 16px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}

.bestRow {
  margin-top: 22px;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(13px, 3.4vw, 15px);
  letter-spacing: 0.15em;
  color: #ffd166;
}

.bestRow span {
  font-weight: 900;
  margin-left: 6px;
}

.primaryBtn {
  margin-top: 26px;
  border: none;
  border-radius: 999px;
  padding: 16px 38px;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 700;
  font-size: clamp(15px, 4vw, 18px);
  color: #0b0f1a;
  background: linear-gradient(135deg, #7fe8ff, #7fa5ff);
  box-shadow: 0 8px 30px rgba(127, 165, 255, 0.45);
  cursor: pointer;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

.goTitle {
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.9);
}

.newBest {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 900;
  color: #ffd166;
  text-shadow: 0 0 18px rgba(255, 209, 102, 0.7);
  margin-bottom: 8px;
  animation: pulse 1s ease-in-out infinite;
}

.resultRow {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 40px;
}

.resultItem {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resultLabel {
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.55);
}

.resultValue {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 900;
  color: #fff;
}
