/* ── バトルシーン ─────────────────────────── */
.battle-stage-label {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 6px;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.9);
  pointer-events: none;
}

#battle-dialogue {
  position: absolute;
  bottom: 140px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  min-height: 70px;
  background: rgba(10, 10, 30, 0.9);
  border: 2px solid #ffd700;
  border-radius: 6px;
  padding: 18px 36px;
  color: #f0f0e0;
  font-size: 24px;
  line-height: 1.6;
  text-align: center;
  white-space: pre-line;
  box-shadow: 0 0 20px rgba(255,215,0,0.15);
}

/* ハートHUD */
.heart-hud {
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 400px;
}

.heart-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
}

/* キャラクターラベル */
.battle-char-label {
  position: absolute;
  color: #ffd700;
  font-size: 15px;
  font-weight: bold;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
  pointer-events: none;
}

/* バトルボタンパネル */
#battle-btn-panel {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#battle-buttons-row {
  display: flex;
  gap: 20px;
}

/* チャージゲージ表示 */
#skill-charge-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10,10,30,0.85);
  border: 1px solid #555;
  border-radius: 6px;
  padding: 6px 20px;
  font-size: 14px;
  color: #aaa;
  letter-spacing: 1px;
}

#charge-label {
  color: #ffaa00;
  font-weight: bold;
  font-size: 15px;
}

#charge-pips {
  display: flex;
  gap: 6px;
}

.charge-pip {
  font-size: 20px;
  color: #444;
  transition: color 0.2s, text-shadow 0.2s;
}

.charge-pip.filled {
  color: #ffaa00;
  text-shadow: 0 0 8px rgba(255,170,0,0.8);
}

#charge-hint {
  color: #666;
  font-size: 12px;
}

/* スキルボタン（チャージ完了時） */
.skill-btn.ready {
  animation: skillReady 0.8s ease-in-out infinite;
}

@keyframes skillReady {
  0%, 100% { box-shadow: 0 0 8px rgba(255,165,0,0.4); }
  50%       { box-shadow: 0 0 20px rgba(255,165,0,0.9); }
}

.battle-btn {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 16px 40px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid;
  transition: background 0.15s, transform 0.1s;
  min-width: 160px;
  white-space: nowrap;
}

.battle-btn:not(:disabled):hover {
  transform: translateY(-3px);
  filter: brightness(1.15);
}

.battle-btn:not(:disabled):active {
  transform: translateY(1px);
}

.battle-btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.battle-btn.keyboard-focus {
  outline: 3px solid #fff;
  transform: translateY(-3px) scale(1.06);
  filter: brightness(1.2);
}

/* たたかうボタン */
#btn-attack {
  background: rgba(255, 60, 60, 0.2);
  color: #ff6060;
  border-color: #ff6060;
}
#btn-attack:not(:disabled):hover {
  background: rgba(255, 60, 60, 0.4);
}

/* ひっさつボタン */
.skill-btn {
  background: rgba(255, 165, 0, 0.2);
  color: #ffaa00;
  border-color: #ffaa00;
}
.skill-btn:not(:disabled):hover {
  background: rgba(255, 165, 0, 0.4);
}

/* かいふくボタン */
.heal-btn {
  background: rgba(60, 200, 100, 0.2);
  color: #40cc70;
  border-color: #40cc70;
}
.heal-btn:not(:disabled):hover {
  background: rgba(60, 200, 100, 0.4);
}

/* つぎへボタン */
#battle-next-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 4px;
  padding: 18px 64px;
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  border: 2px solid #ffd700;
  border-radius: 6px;
  cursor: pointer;
  animation: nextBtnPulse 1.2s ease-in-out infinite;
}

#battle-next-btn:hover {
  background: rgba(255, 215, 0, 0.4);
}

@keyframes nextBtnPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255,215,0,0.3); }
  50%       { box-shadow: 0 0 25px rgba(255,215,0,0.7); }
}

/* エンディング fadeIn */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
