/* ==============================
   components.css
   共通部品スタイル
============================== */

/* ===== フッター ===== */
.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #444;
  font-size: 0.9rem;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer small {
  color: #ccc;
}

/* ===== あらすじBOX ===== */
.novel-prologue {
  background-color: #111;
  border-left: 4px solid #4eaaff;
  padding: 1rem;
  margin-bottom: 2rem;
}

.novel-prologue h3 {
  margin-bottom: 0.5rem;
  color: #82cfff;
}

/* ===== 画像 ===== */
.attack-img {
  max-width: 300px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 1.5rem auto;
  padding-bottom: 1rem;
}

/* ===== キャラクター見出し ===== */
.character-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.episode-result .character-header {
  gap: 1rem;
}

.character-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border: 1px solid #aaa;
}

/* ===== ステータスBOX ===== */
.episode-result {
  border: 1px solid #ccc;
  padding: 0.5rem;
  margin-top: 2rem;
}

/* ===== 字下げ補助 ===== */
.indent {
  display: inline-block;
  width: 1em;
}

/* ===== ステータスバー ===== */
.status-label {
  font-weight: bold;
  font-family: monospace;
  margin-top: 1em;
  margin-bottom: 0.25em;
}

.status-bar {
  width: 200px;
  height: 16px;
  background-color: #000;
  border: 2px solid #666;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

/* 上限減少部分 */
.hp-maxloss,
.spirit-maxloss {
  position: absolute;
  top: 0;
  height: 100%;
  background-color: #222;
  z-index: 0;
}

/* すでに削られていた部分 */
.hp-missing,
.spirit-missing {
  position: absolute;
  top: 0;
  height: 100%;
  background-color: #555;
  z-index: 1;
}

/* 今回減少部分 */
.hp-loss,
.spirit-loss {
  position: absolute;
  top: 0;
  height: 100%;
  background-color: #d00;
  z-index: 2;
}

/* 現在値 */
.hp-fill,
.spirit-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 3;
  border-radius: 3px 0 0 3px;
}

.hp-fill {
  background-color: #0f0;
}

.spirit-fill {
  background-color: #ff0;
}

/* 回復分 */
.hp-heal,
.spirit-heal {
  position: absolute;
  top: 0;
  height: 100%;
  background-color: #00f;
  opacity: 0.6;
  z-index: 2;
}/* ===== 状態異常バッジ ===== */
.status-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.effect-badge {
  font-family: monospace;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: #222;
  color: #fff;
  border: 1px solid #555;
  box-shadow: inset 0 0 2px #000;
}

.effect-badge.red {
  background-color: #400;
  color: #f88;
  border-color: #a00;
}

.effect-badge.blue {
  background-color: #003366;
  color: #aaddff;
  border-color: #227;
}

.effect-badge.yellow {
  background-color: #664400;
  color: #ffe08a;
  border-color: #aa7700;
}

/* ===== タグ ===== */
.tags {
  margin-top: 0.5em;
  margin-bottom: 1em;
}

.tag {
  display: inline-block;
  background: #fff;
  color: #000;
  border: 1px solid #aaa;
  padding: 2px 6px;
  font-size: 0.85em;
  border-radius: 4px;
  margin-right: 0.3em;
}

/* ===== 開閉詳細 ===== */
details.char-details1 summary,
details.char-details2 summary {
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

details.char-details2 summary {
  font-size: 1.25rem;
}

details.char-details1 summary::after {
  content: "▶";
  font-size: 1.1rem;
}

details.char-details1[open] summary::after {
  content: "▼";
}

details.char-details2 summary::after {
  content: "▷";
  font-size: 1.1rem;
}

details.char-details2[open] summary::after {
  content: "▽";
}

/* ===== エピソードナビ ===== */
.episode-nav {
  margin-top: 2rem;
  text-align: center;
}

.episode-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== 年齢確認 ===== */
#age-check-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: #000;
  color: #fff;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}