/* =========================
   BLOODLINE 血統管理台帳
   ========================= */

/* ===== アコーディオン ===== */
.accordion {
  margin-bottom: 16px;
}

.accordion-header {
  font-size: 1.3rem;
  font-weight: 700;
  background: #111827;
  color: #f8fafc;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 6px;
  margin-bottom: 6px;
  user-select: none;
  transition: background 0.2s;
}

.accordion-header:hover {
  background: #1f2937;
}

.accordion-content {
  display: none;
  padding: 12px;
  background: rgba(20, 25, 40, 0.9);
  border-radius: 6px;
}

/* ===== グリッド ===== */
.bloodline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

/* ===== カード ===== */
.bloodline-card {
  background: rgba(30, 35, 60, 0.9);
  padding: 16px;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.bloodline-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* ===== タイトル ===== */
.bloodline-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 8px;
}

/* ===== メタ情報 ===== */
.bloodline-meta {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bloodline-meta li {
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #c9c9c9;
  background: rgba(255,255,255,0.06);
  padding: 4px 8px;
  border-radius: 4px;
}

/* ===== 爆発力アイコン ===== */
.clover-icon {
  width: 18px;
  vertical-align: middle;
  margin: 0 4px 0 6px;
}

/* ===== ページ全体 ===== */
.bloodline-challenge {
  margin-top: 24px;
}

/* ===== 戻るボタン ===== */
.hub-return {
  margin-top: 24px;
  text-align: center;
}

.hub-return-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #111827;
  color: #f8fafc;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
}

.hub-return-button:hover {
  background: #1f2937;
}

/* ===== Image Modal ===== */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
}

.image-modal .modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.image-modal .modal-close {
  position: absolute;
  top: 16px;
  right: 24px;
  color: #fff;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .bloodline-grid {
    grid-template-columns: 1fr;
  }

  .bloodline-card {
    padding: 12px;
  }

  .accordion-header {
    font-size: 1.1rem;
  }

  .bloodline-name {
    font-size: 1.1rem;
  }

  .bloodline-meta li {
    font-size: 0.8rem;
  }
}

.card-badge {
  position:absolute;
  top:8px;
  right:10px;
  font-size:1.1rem;
  font-weight:700;
  text-shadow: 0 0 6px rgba(0,0,0,0.6);
}
.bloodline-card {
  position:relative;
}

.card-cover { border:3px solid rgba(60,179,113,0.9); } /* 緑 */
.card-allegro { border:3px solid rgba(229,115,115,0.9); } /* 赤 */
.card-sunkist { border:3px solid #c27c2c; } /* 茶 */
.card-mejiro { border:3px solid rgba(212,175,55,0.95); } /* 金 */
.card-oguri { border:3px solid rgba(102,204,255,0.9); } /* 水 */
.card-historical { border:3px solid rgba(255,217,102,0.95); } /* 黄 */
.card-preserve {
  box-shadow: 0 0 0 2px #aaa inset, 0 0 10px rgba(255,255,255,0.2);
}
/* ===== 凡例 ===== */
.bloodline-legend {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #111827;
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: #c9c9c9;

}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
}

.legend-badge {
  font-weight: 700;
}

/* 色反映 */
.legend-item.cover      { border-left: 4px solid #3cb371; }
.legend-item.allegro    { border-left: 4px solid #e57373; }
.legend-item.sunkist    { border-left: 4px solid #c27c2c; }
.legend-item.mejiro     { border-left: 4px solid #f1c40f; }
.legend-item.oguri      { border-left: 4px solid #66ccff; }
.legend-item.historical { border-left: 4px solid #ffd966; }
.legend-item.preserve   { border-left: 4px solid #aaa; }

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
