/* ===================================================
   build_guides.css - 構築ガイド固有スタイル
   共通スタイル（.site-page-tab, .tactics-color-btn, .combo-badge 等）は tactics.css から再利用
   =================================================== */

/* === 一覧パネル === */
.build-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.build-list-header h2 {
  color: #e0e0e0;
  font-size: 1.3rem;
}

.build-panel {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
  text-decoration: none;
  display: block;
  color: inherit;
}
.build-panel:hover {
  border-color: #e94560;
}

/* Board Hero - 一覧の盤面表示 */
.build-board-hero {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem 0;
  min-height: 180px;
}
.build-board-slot {
  width: 110px;
  text-align: center;
  flex-shrink: 0;
}
.build-board-slot img {
  width: 100%;
  border-radius: 5px;
  border: 1px solid #0f3460;
  display: block;
}
.build-board-slot.is-sleep {
  width: 110px;
}
.build-board-slot.is-sleep img {
  transform: rotate(-90deg);
  margin: calc((110px * 1.4 - 110px) / 2) 0;
}
.build-board-slot.is-stun img {
  transform: rotate(180deg);
}
.build-board-slot.is-empty {
  width: 110px;
  height: 154px;
  border: 1px dashed #333;
  border-radius: 5px;
  opacity: 0.3;
}
.build-board-ap {
  font-size: 0.72rem;
  color: #4fc3f7;
  font-weight: bold;
  margin-top: 3px;
}

.build-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.build-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: inline-block;
  flex-shrink: 0;
  box-sizing: border-box;
}
.build-axis-name {
  font-size: 1.15rem;
  font-weight: bold;
  color: #e0e0e0;
}
.build-strategy-badge {
  font-size: 0.72rem;
  font-weight: bold;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  color: #fff;
}
.build-partner-badge {
  font-size: 0.72rem;
  font-weight: bold;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  color: #fff;
  background: #555;
}
.build-summary {
  font-size: 0.88rem;
  color: #aaa;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.build-stats-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}
.build-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: bold;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  color: #fff;
}
.stat-removal { background: #c62828; }
.stat-board { background: #2e7d32; }
.stat-assault { background: #e65100; }
.stat-search { background: #1565c0; }
.build-detail-btn {
  float: right;
  background: transparent;
  border: 1px solid #e94560;
  color: #e94560;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.build-detail-btn:hover {
  background: #e94560;
  color: #fff;
}
.build-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* === 詳細ページ === */
.detail-page { padding-bottom: 3rem; }
.breadcrumb {
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 1.5rem;
}
.breadcrumb a {
  color: #e94560;
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

.detail-header { margin-bottom: 2rem; }
.detail-header-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.detail-axis-name { font-size: 1.6rem; font-weight: bold; color: #e0e0e0; }
.detail-summary {
  font-size: 0.95rem;
  color: #aaa;
  line-height: 1.7;
  max-width: 700px;
}
.detail-section { margin-bottom: 2.5rem; }
.detail-section-title {
  font-size: 1.15rem;
  color: #e0e0e0;
  border-left: 3px solid #e94560;
  padding-left: 0.75rem;
  margin-bottom: 1.25rem;
}

/* Board (Large - detail) */
.detail-board {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 1rem;
  background: #0d1b3e;
  border-radius: 8px;
  border: 1px solid #0f3460;
  min-height: 240px;
}
.detail-board-slot { width: 120px; text-align: center; flex-shrink: 0; }
.detail-board-slot img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #0f3460;
  display: block;
}
.detail-board-slot.is-sleep img {
  transform: rotate(-90deg);
  margin: calc((120px * 1.4 - 120px) / 2) 0;
}
.detail-board-slot.is-stun img {
  transform: rotate(180deg);
}
.detail-board-slot.is-empty {
  width: 120px;
  height: 168px;
  border: 1px dashed #333;
  border-radius: 6px;
  opacity: 0.3;
}
.detail-board-name { font-size: 0.75rem; color: #aaa; margin-top: 4px; }
.detail-board-info { font-size: 0.7rem; color: #888; }
.detail-board-ap { font-size: 0.78rem; color: #4fc3f7; font-weight: bold; }
.detail-board-state { font-size: 0.65rem; color: #f9a825; }

/* Combo Input Cards */
.combo-input-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #0d1b3e;
  border-radius: 8px;
  border: 1px solid #0f3460;
}
.combo-input-card { text-align: center; width: 100px; }
.combo-input-card img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid #0f3460;
}
.combo-input-name { font-size: 0.7rem; color: #aaa; margin-top: 3px; }
.combo-input-role { font-size: 0.6rem; color: #888; }
.build-combo-arrow { color: #888; font-size: 1.5rem; }
.combo-transform-label {
  font-size: 0.55rem;
  color: #e94560;
  background: rgba(233,69,96,0.15);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  margin-top: 2px;
  display: inline-block;
}

/* Step Slider */
.step-slider {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 8px;
  overflow: hidden;
}
.step-slider-viewport { position: relative; }
.step-slide {
  display: none;
  flex-direction: column;
  padding: 1.25rem;
}
.step-slide.is-active { display: flex; }

.step-slide-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.step-number {
  background: #e94560;
  color: #fff;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: bold; flex-shrink: 0;
}
.step-file {
  font-size: 0.7rem;
  color: #4fc3f7;
  font-weight: bold;
  background: rgba(79,195,247,0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}
.step-badges { display: flex; gap: 0.3rem; margin-left: auto; }
.step-badge {
  font-size: 0.68rem;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: #fff;
}

/* Board snapshot (step) */
.step-board {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: center;
  padding: 1.25rem 1rem;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  margin-bottom: 1rem;
  min-height: 180px;
}
.step-board-slot {
  width: 105px;
  text-align: center;
  flex-shrink: 0;
  position: relative;
}
.step-board-slot img {
  width: 100%;
  border-radius: 4px;
  border: 2px solid #0f3460;
  display: block;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.step-board-slot.is-sleep img {
  transform: rotate(-90deg);
  margin: calc((105px * 1.4 - 105px) / 2) 0;
}
.step-board-slot.is-stun img {
  transform: rotate(180deg);
}
.step-board-slot.is-empty {
  width: 105px;
  height: 147px;
  border: 1px dashed #333;
  border-radius: 4px;
  opacity: 0.2;
}
.step-board-slot.is-actor img { border-color: #e94560; box-shadow: 0 0 8px rgba(233,69,96,0.6); }
.step-board-slot.is-changed img { border-color: #4fc3f7; box-shadow: 0 0 6px rgba(79,195,247,0.5); }
.step-board-name {
  font-size: 0.65rem;
  color: #888;
  margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.step-board-slot.is-actor .step-board-name { color: #e94560; font-weight: bold; }
.step-board-slot.is-changed .step-board-name { color: #4fc3f7; font-weight: bold; }

/* Set card support in step board (card peeks above main card) */
.step-board:has(.has-set-card) {
  padding-top: 2rem;
}
.step-board-slot.has-set-card > img {
  position: relative;
  z-index: 10;
}
.step-board-slot.has-set-card .step-board-name { display: none; }
.step-board-set-card {
  position: absolute;
  top: -12%;
  left: 2%;
  right: 2%;
  z-index: 3;
  pointer-events: none;
}
.step-board-set-img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.6);
  filter: saturate(0.8);
}
/* Prevent set card from inheriting sleep rotation/margin */
.step-board-slot.is-sleep .step-board-set-card img {
  transform: none;
  margin: 0;
}

/* Step description */
.step-desc {
  font-size: 0.88rem;
  color: #aaa;
  line-height: 1.7;
}

/* Navigation bar */
.step-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #0f3460;
  background: rgba(0,0,0,0.15);
}
.step-nav-btn {
  background: transparent;
  border: 1px solid #e94560;
  color: #e94560;
  padding: 0.4rem 1rem;
  border-radius: 5px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
}
.step-nav-btn:hover:not(:disabled) { background: #e94560; color: #fff; }
.step-nav-btn:disabled { opacity: 0.3; cursor: default; }
.step-nav-indicator {
  font-size: 0.82rem;
  color: #888;
  min-width: 60px;
  text-align: center;
}
.step-nav-indicator strong { color: #e0e0e0; }

/* Traits (Strengths / Weaknesses) */
.traits-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.traits-col-header {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: bold; margin-bottom: 0.6rem; padding-bottom: 0.4rem;
  border-bottom: 2px solid #0f3460;
}
.traits-col-header.is-strength { color: #66bb6a; border-bottom-color: rgba(46,125,50,0.53); }
.traits-col-header.is-weakness { color: #ff6b6b; border-bottom-color: rgba(198,40,40,0.53); }
.traits-col-header svg { width: 16px; height: 16px; flex-shrink: 0; }
.trait-item { margin-bottom: 0.6rem; }
.trait-item:last-child { margin-bottom: 0; }
.trait-title {
  font-size: 0.82rem; font-weight: bold; color: #e0e0e0;
  display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.15rem;
}
.trait-title::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.is-strength .trait-title::before { background: #66bb6a; }
.is-weakness .trait-title::before { background: #ff6b6b; }
.trait-desc { font-size: 0.78rem; color: #aaa; line-height: 1.55; padding-left: 0.95rem; }

/* Matchup Section */
.matchup-list { display: flex; flex-direction: column; gap: 0.6rem; }
.matchup-item {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  padding: 0.85rem;
  border-left: 3px solid #c62828;
}
.matchup-header {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem;
}
.matchup-name { font-size: 0.88rem; font-weight: bold; color: #e0e0e0; }
.matchup-severity {
  font-size: 0.65rem; font-weight: bold; color: #fff;
  padding: 0.1rem 0.4rem; border-radius: 3px; margin-left: auto;
}
.matchup-severity.hard { background: #c62828; }
.matchup-severity.even { background: #e65100; }
.matchup-reason { font-size: 0.8rem; color: #aaa; line-height: 1.6; margin-bottom: 0.3rem; }
.matchup-tip { font-size: 0.78rem; color: #4fc3f7; line-height: 1.5; }
.matchup-tip::before { content: "\2192  "; }

/* Deck Skeleton */
.deck-skeleton { display: flex; flex-direction: column; gap: 0.75rem; }
.deck-group {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  padding: 0.85rem;
}
.deck-card-list { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.deck-card {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid #0f3460;
  border-radius: 5px;
  padding: 0.4rem;
}
.deck-card-img { flex-shrink: 0; }
.deck-card-img img { width: 100%; border-radius: 3px; border: 1px solid #0f3460; }
.deck-card-info { display: flex; flex-direction: column; align-items: center; margin-top: 0.3rem; }
.deck-card-name { font-size: 0.65rem; font-weight: bold; color: #e0e0e0; text-align: center; line-height: 1.3; }
.deck-card-meta { font-size: 0.6rem; color: #888; margin-top: 0.15rem; }

/* Case Card Section */
.case-cards-list { display: flex; flex-direction: column; gap: 0.75rem; }
.case-card-item {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.case-card-img { width: 72px; flex-shrink: 0; }
.case-card-img img { width: 100%; border-radius: 4px; border: 1px solid #0f3460; display: block; }
.case-card-body { flex: 1; }
.case-card-name { font-size: 0.85rem; font-weight: bold; color: #e0e0e0; margin-bottom: 0.3rem; }
.case-card-reason {
  font-size: 0.82rem;
  color: #aaa;
  line-height: 1.6;
}

/* Alt Cards (おすすめカード) */
.alt-category { margin-bottom: 1.5rem; }
.alt-category-header {
  font-size: 0.95rem; font-weight: bold; color: #e0e0e0;
  margin-bottom: 0.5rem; padding-bottom: 0.35rem;
  border-bottom: 1px solid #0f3460;
}
.alt-category-desc {
  font-size: 0.8rem; color: #888; margin-bottom: 0.75rem; line-height: 1.5;
}
.alt-cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem;
}
.alt-card-item {
  display: flex; gap: 0.75rem;
  background: #0d1b3e; border: 1px solid #0f3460; border-radius: 6px; padding: 0.75rem;
  transition: border-color 0.2s;
}
.alt-card-item:hover { border-color: #e94560; }
.alt-card-img { width: 70px; flex-shrink: 0; }
.alt-card-img img { width: 100%; border-radius: 4px; }
.alt-card-info { flex: 1; }
.alt-card-name { font-size: 0.82rem; font-weight: bold; color: #e0e0e0; margin-bottom: 0.2rem; }
.alt-card-meta { font-size: 0.7rem; color: #888; margin-bottom: 0.35rem; }
.alt-card-reason { font-size: 0.78rem; color: #aaa; line-height: 1.5; }

/* Mulligan Priority */
.mulligan-groups { display: flex; flex-direction: column; gap: 0.75rem; }
.mulligan-group {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  padding: 0.75rem 1rem;
}
.mulligan-group-header {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem;
}
.mulligan-rank {
  font-size: 0.7rem; font-weight: bold; color: #fff;
  padding: 0.15rem 0.5rem; border-radius: 4px;
}
.mulligan-rank.rank-high { background: #e94560; }
.mulligan-rank.rank-mid { background: #e65100; }
.mulligan-rank.rank-low { background: #1565c0; }
.mulligan-group-label { font-size: 0.82rem; font-weight: bold; color: #e0e0e0; }
.mulligan-cards {
  display: flex; gap: 12px; margin-bottom: 0.6rem; flex-wrap: wrap;
}
.mulligan-card { width: 72px; text-align: center; flex-shrink: 0; }
.mulligan-card img {
  width: 100%; border-radius: 4px; border: 1px solid #0f3460; display: block;
}
.mulligan-card-name {
  font-size: 0.62rem; color: #888; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mulligan-group-reason { font-size: 0.8rem; color: #aaa; line-height: 1.5; }
.mulligan-note {
  font-size: 0.8rem; color: #888; line-height: 1.6;
  margin-top: 0.75rem; padding: 0.6rem 0.75rem;
  border-left: 2px solid #888;
}

/* Win Path (試合の流れ) */
.win-path {
  background: #0d1b3e; border: 1px solid #0f3460; border-radius: 8px; padding: 1.25rem;
}
.win-path-title { font-size: 0.95rem; font-weight: bold; color: #e94560; margin-bottom: 0.75rem; }
.win-path-phases { display: flex; flex-direction: column; gap: 0.75rem; }
.win-path-phase { display: flex; gap: 0.75rem; align-items: flex-start; }
.win-path-label {
  background: #e94560; color: #fff; padding: 0.2rem 0.5rem; border-radius: 4px;
  font-size: 0.7rem; font-weight: bold; flex-shrink: 0; min-width: 64px; text-align: center;
}
.win-path-desc { font-size: 0.85rem; color: #aaa; line-height: 1.5; }

/* Tips */
.tips-grid { display: flex; flex-direction: column; gap: 0.6rem; }
.tip-card {
  display: flex; gap: 0.75rem; align-items: flex-start;
  background: #0d1b3e; border: 1px solid #0f3460; border-radius: 8px; padding: 0.85rem 1rem;
  transition: border-color 0.2s;
}
.tip-card:hover { border-color: #4fc3f7; }
.tip-num {
  background: #4fc3f7; color: #1a1a2e;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: bold; flex-shrink: 0; margin-top: 0.1rem;
}
.tip-body { flex: 1; }
.tip-heading { font-size: 0.85rem; font-weight: bold; color: #e0e0e0; margin-bottom: 0.15rem; }
.tip-desc { font-size: 0.78rem; color: #aaa; line-height: 1.55; }

/* === Responsive (640px) === */
@media (max-width: 640px) {
  /* 一覧ヘッダー */
  .build-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  /* 一覧パネル */
  .build-panel { padding: 0.75rem; margin-bottom: 1rem; }
  .build-board-hero { gap: 4px; padding: 0.75rem 0; min-height: 120px; overflow-x: auto; }
  .build-board-slot { width: 58px; }
  .build-board-slot.is-sleep { width: 58px; }
  .build-board-slot.is-sleep img { transform: rotate(-90deg) scale(0.72); margin: 0; }
  .build-board-slot.is-stun img { transform: rotate(180deg); }
  .build-board-slot.is-empty { height: 81px; }
  .build-board-ap { font-size: 0.6rem; }
  .build-info { margin-bottom: 0.5rem; }
  .build-axis-name { font-size: 1rem; }
  .build-summary { margin-bottom: 0.75rem; }

  /* 詳細ヘッダー */
  .detail-header { margin-bottom: 2rem; }
  .detail-axis-name { font-size: 1.3rem; }
  .detail-summary { font-size: 0.85rem; margin-top: 0.5rem; }

  /* セクション間の余白 */
  .detail-section {
    margin-bottom: 1.5rem;
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 1rem;
  }
  .detail-section-title { font-size: 1.05rem; margin-bottom: 1rem; }

  /* Traits */
  .traits-columns { grid-template-columns: 1fr; gap: 0.75rem; }
  .trait-desc { font-size: 0.75rem; }

  /* コンボ入力カード */
  .combo-input-cards { flex-wrap: wrap; gap: 0.6rem; padding: 0.85rem; }
  .combo-input-card { width: 70px; }
  .build-combo-arrow { font-size: 1.2rem; }

  /* ステップスライダー */
  .step-slide { padding: 1rem 0.85rem; }
  .step-slide-header { margin-bottom: 0.85rem; }
  .step-board { gap: 4px; padding: 0.75rem 0.25rem; min-height: 120px; overflow-x: auto; }
  .step-board:has(.has-set-card) { padding-top: 1.5rem; }
  .step-board-slot { width: 56px; }
  .step-board-slot.is-sleep img { transform: rotate(-90deg) scale(0.72); margin: 0; }
  .step-board-slot.is-stun img { transform: rotate(180deg); }
  .step-board-slot.is-empty { width: 56px; height: 78px; }
  .step-board-name { font-size: 0.55rem; }
  .step-desc { font-size: 0.82rem; margin-top: 0.15rem; }
  .step-nav { padding: 0.65rem 0.85rem; gap: 0.75rem; }
  .step-nav-btn { padding: 0.4rem 0.75rem; font-size: 0.78rem; min-width: 68px; }

  /* 詳細ボード */
  .detail-board { gap: 6px; padding: 1rem 0.5rem; min-height: 160px; overflow-x: auto; }
  .detail-board-slot { width: 60px; }
  .detail-board-slot.is-sleep img { transform: rotate(-90deg) scale(0.72); margin: 0; }
  .detail-board-slot.is-stun img { transform: rotate(180deg); }
  .detail-board-slot.is-empty { width: 60px; height: 84px; }
  .detail-board-name { font-size: 0.6rem; margin-top: 4px; }

  /* デッキの骨格 */
  .deck-card-list { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .deck-card { padding: 0.3rem; }
  .deck-card-name { font-size: 0.6rem; }

  /* 事件カード */
  .case-card-item { padding: 0.75rem; }
  .case-card-img { width: 58px; }
  .case-card-reason { font-size: 0.78rem; }

  /* 苦手な対面 */
  .matchup-item { padding: 0.75rem; }
  .matchup-reason { font-size: 0.78rem; }
  .matchup-tip { font-size: 0.75rem; }

  /* おすすめカード */
  .alt-category { margin-bottom: 1.75rem; }
  .alt-category-header { margin-bottom: 0.5rem; }
  .alt-category-desc { margin-bottom: 0.75rem; }
  .alt-cards-grid { grid-template-columns: 1fr; gap: 0.6rem; }
  .alt-card-item { padding: 0.75rem; }
  .alt-card-img { width: 60px; }
  .alt-card-reason { font-size: 0.75rem; }

  /* マリガン */
  .mulligan-group { padding: 0.75rem; }
  .mulligan-group-header { margin-bottom: 0.5rem; }
  .mulligan-card { width: 58px; }
  .mulligan-cards { gap: 10px; margin-bottom: 0.5rem; }
  .mulligan-group-reason { font-size: 0.78rem; }
  .mulligan-note { font-size: 0.75rem; margin-top: 0.75rem; }

  /* 勝ち方 */
  .win-path { padding: 1rem; }
  .win-path-phase { flex-direction: column; gap: 0.35rem; }
  .win-path-phase + .win-path-phase { margin-top: 0.25rem; }
  .win-path-desc { font-size: 0.82rem; }

  /* コツ */
  .tip-card { padding: 0.75rem 0.85rem; gap: 0.6rem; }
  .tip-num { width: 22px; height: 22px; font-size: 0.68rem; }
  .tip-heading { font-size: 0.82rem; }
  .tip-desc { font-size: 0.75rem; }
}
/* === Card Scanner === */

.card-scanner-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(22, 33, 62, 0.9);
  border: 1px solid #0f3460;
  color: #e0e0e0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  padding: 0;
}

.card-scanner-btn:hover {
  background: #e94560;
  border-color: #e94560;
  color: #fff;
}

.card-scanner-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Scanner Overlay */
.scanner-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 3000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.scanner-overlay.active {
  display: flex;
}

.scanner-video-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 65vh;
  width: calc(65vh * 5 / 7);
  max-width: 80vw;
  max-height: 80vh;
  border: 2px solid rgba(233, 69, 96, 0.8);
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1;
}

.scanner-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(233, 69, 96, 0.9);
  border-radius: 50%;
  z-index: 2;
}

.scanner-spinner.active {
  display: block;
  animation: scanner-spin 0.8s linear infinite;
}

@keyframes scanner-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.scanner-guide::after {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  pointer-events: none;
}

.scanner-status {
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 2;
}

.scanner-sleeve-note {
  position: absolute;
  top: 3.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  white-space: nowrap;
  z-index: 2;
}

.scanner-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  line-height: 1;
}

.scanner-close-btn:hover {
  background: rgba(233, 69, 96, 0.8);
}

/* Candidate Selection Screen */
.scanner-candidates {
  display: none;
  position: absolute;
  inset: 0;
  background: #0a0a14;
  z-index: 10;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.scanner-candidates-header {
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  padding: 3.5rem 1rem 0.5rem;
  text-align: center;
}

.scanner-candidates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0.5rem 1rem;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
}

.scanner-candidate {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s;
  min-width: 0;
}

.scanner-candidate:active {
  transform: scale(0.95);
}

.scanner-candidate img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  filter: saturate(0.8);
}

.scanner-candidate:hover img {
  border-color: #e94560;
}

.scanner-candidate span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.7rem;
  margin-top: 4px;
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.scanner-candidates-actions {
  display: flex;
  gap: 12px;
  padding: 1rem 1rem 2rem;
  justify-content: center;
}

.scanner-action-btn {
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

.scanner-action-retry {
  background: rgba(233, 69, 96, 0.8);
  color: #fff;
}

.scanner-action-retry:hover {
  background: #e94560;
}

.scanner-action-close {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
}

.scanner-action-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.scanner-candidates-note {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.65rem;
  padding: 0 1rem 0.5rem;
  text-align: center;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .scanner-guide {
    height: 60vh;
    width: calc(60vh * 5 / 7);
  }
}
/* === Loading Progress Bar === */
.load-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: rgba(13, 27, 62, 0.95);
  backdrop-filter: blur(4px);
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  transition: opacity 0.5s, transform 0.5s;
}

.load-progress.done {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.load-progress-text {
  font-size: 0.82rem;
  color: #e0e0e0;
  white-space: nowrap;
  flex-shrink: 0;
}

.load-progress-track {
  flex: 1;
  height: 10px;
  background: #1a1a2e;
  border-radius: 5px;
  overflow: hidden;
}

.load-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e94560, #ff6b81);
  border-radius: 5px;
  transition: width 0.3s;
}

.load-progress-pct {
  font-size: 0.85rem;
  font-weight: bold;
  color: #e94560;
  min-width: 3.5rem;
  text-align: right;
  flex-shrink: 0;
}

/* === Base Theme === */
body {
  background: #1a1a2e;
  color: #e0e0e0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
}

/* Disable double-tap zoom on mobile */
*, *::before, *::after {
  touch-action: manipulation;
  box-sizing: border-box;
}

/* === Site Notice Banner === */
.site-notice {
  background: #2a1a00;
  border-bottom: 1px solid #e9a000;
  color: #f5c842;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

.site-notice-icon {
  margin-right: 0.3rem;
}

/* === Sticky Top Wrapper === */
.sticky-top {
  position: sticky;
  top: 0;
  z-index: 900;
}

/* === Header === */
.header {
  background: #16213e;
  padding: 1.25rem 2rem;
  text-align: center;
  border-bottom: 2px solid #e94560;
}

.header h1 {
  color: #e94560;
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.header-icon {
  width: 1.8em;
  height: 1.8em;
  vertical-align: middle;
}

.header-disclaimer {
  color: #888;
  font-size: 0.72rem;
  margin: 0.5rem 0 0;
}

/* === Controls Bar === */
.controls {
  background: #16213e;
  padding: 1rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid #0f3460;
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.search-input {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #e0e0e0;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  width: 240px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: #e94560;
}

/* === Color Filter Buttons === */
.color-filters {
  display: flex;
  gap: 4px;
}

.color-filter-btn {
  width: 30px;
  height: 30px;
  border: 2px solid transparent;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s;
  opacity: 0.3;
}

.color-filter-btn.active {
  opacity: 1;
  border-color: #fff;
}

.color-filter-btn[data-color="青"] { background: #1565c0; color: #fff; }
.color-filter-btn[data-color="緑"] { background: #2e7d32; color: #fff; }
.color-filter-btn[data-color="白"] { background: #cfd8dc; color: #1a1a2e; }
.color-filter-btn[data-color="赤"] { background: #c62828; color: #fff; }
.color-filter-btn[data-color="黄"] { background: #f9a825; color: #1a1a2e; }
.color-filter-btn[data-color="黒"] { background: #424242; color: #fff; }

.search-input::placeholder {
  color: #666;
}

/* === SP Filter Toggle (hidden on PC) === */
.sp-filter-toggle {
  display: none;
}

/* === Filter Panel (always visible on PC) === */
.filter-panel {
  display: block;
  width: 100%;
}

.filter-panel-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  padding-top: 0.75rem;
  border-top: 1px solid #0f3460;
}

.level-filters-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* === Type Filter Buttons === */
.type-filters {
  display: flex;
  gap: 4px;
}

.type-filter-btn {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #aaa;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.type-filter-btn:hover {
  border-color: #4fc3f7;
  color: #e0e0e0;
}

.type-filter-btn.active {
  background: #0f3460;
  border-color: #4fc3f7;
  color: #4fc3f7;
}

.sort-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.sort-label {
  font-size: 0.85rem;
  color: #aaa;
  margin-right: 0.25rem;
}

.sort-btn {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #aaa;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.sort-btn:hover {
  border-color: #e94560;
  color: #e0e0e0;
}

.sort-btn.active {
  background: #e94560;
  border-color: #e94560;
  color: #fff;
}

/* Arrow indicator for sort direction */
.sort-btn.active::after {
  content: " \25BC"; /* ▼ descending */
  font-size: 0.65rem;
}

.sort-btn.active.asc::after {
  content: " \25B2"; /* ▲ ascending */
}

/* === Section Titles === */
.section-title {
  font-size: 1.2rem;
  padding: 1rem 2rem 0.5rem;
  margin: 0 auto;
  color: #e94560;
  border-bottom: 1px solid #0f3460;
  max-width: 1050px;
}

/* === Card Grid === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 1rem 2rem;
  max-width: 1050px;
  margin: 0 auto;
}

.card-item {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  background: #16213e;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.3);
}

.card-item img {
  width: 100%;
  height: auto;
  display: block;
  background: #0d1b3e;
  filter: saturate(0.8);
}

.card-item .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.92) 100%);
  padding: 2rem 0.4rem 0.4rem;
}

.card-item .card-name {
  font-size: 0.82rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  text-align: center;
  color: #fff;
  text-shadow:
    -1px -1px 0 rgba(0, 0, 0, 0.7),
     1px -1px 0 rgba(0, 0, 0, 0.7),
    -1px  1px 0 rgba(0, 0, 0, 0.7),
     1px  1px 0 rgba(0, 0, 0, 0.7),
     0    0   4px rgba(0, 0, 0, 0.5),
     2px  3px 6px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-stars {
  display: flex;
  justify-content: space-between;
  font-size: 0.55rem;
  line-height: 1;
  margin-top: 0.2rem;
}

.stars-standalone {
  color: #f9a825;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.stars-synergy {
  color: #4fc3f7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* === Modal === */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  padding: 2rem 0 6rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #16213e;
  border-radius: 12px;
  max-width: 800px;
  width: 92%;
  margin: 2rem auto 6rem;
  position: relative;
  border: 1px solid #0f3460;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.modal-top-bar {
  display: flex;
  align-items: center;
}

.modal-breadcrumbs {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow-x: auto;
}

.breadcrumb-item,
.breadcrumb-current {
  display: inline-block;
  max-width: 10em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.breadcrumb-item {
  color: #4fc3f7;
  cursor: pointer;
}

.breadcrumb-item:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: #666;
  margin: 0 0.3rem;
}

.breadcrumb-current {
  color: #999;
}

.modal-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: rgba(22, 33, 62, 0.9);
  border: 1px solid #0f3460;
  border-radius: 50%;
  color: #e0e0e0;
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.modal-close:hover {
  color: #e94560;
  border-color: #e94560;
}

/* === Modal Header === */
.modal-header {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  clear: both;
  position: relative;
}

.modal-header img {
  width: 240px;
  height: auto;
  border-radius: 8px;
  flex-shrink: 0;
  align-self: flex-start;
}

.modal-info {
  flex: 1;
  min-width: 0;
}

.modal-info h2 {
  margin: 0 0 0.75rem;
  color: #e94560;
  font-size: 1.4rem;
  line-height: 1.4;
}

.name-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #fff;
  background: #0f3460;
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  vertical-align: middle;
  margin-right: 0.3rem;
  position: relative;
  top: -0.1rem;
  box-sizing: border-box;
}

.name-color-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #fff;
  vertical-align: middle;
  margin-right: 0.3rem;
  position: relative;
  top: -0.1rem;
  box-sizing: border-box;
}

.modal-card-no {
  color: #aaa;
  font-size: 0.75rem;
  text-align: right;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

.modal-meta-bottom {
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.modal-meta-bottom > span {
  background: #0f3460;
  border: 1px solid #1a4a8a;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  color: #fff;
  font-size: 0.8rem;
  font-weight: bold;
}

.lp-keyhole {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

.lp-keyhole-circle {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #636363;
  box-sizing: border-box;
}

.lp-keyhole-notch {
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 10px solid #636363;
  margin-top: -6px;
}

.lp-keyhole-num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-55%, -50%);
  color: #fff;
  font-size: 1.3rem;
  font-weight: bold;
  line-height: 1;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

/* === Info Badges === */
.info-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.info-badge {
  background: #0f3460;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* === Color Badges === */
.color-blue { background: #1565c0; }
.color-red { background: #c62828; }
.color-green { background: #2e7d32; }
.color-yellow { background: #f9a825; color: #1a1a2e; }
.color-white { background: #cfd8dc; color: #1a1a2e; }
.color-black { background: #424242; }

/* === Abilities (inline in modal-info) === */
.abilities-inline {
  margin-top: 0.5rem;
}

.abilities-toggle {
  display: none; /* hidden on desktop, shown on mobile */
}

.abilities-inline-content {
  /* visible on desktop */
}

.ability-item {
  background: #0d1b3e;
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.6;
  border-left: 3px solid #e94560;
}

.ability-timing {
  color: #e94560;
  font-weight: bold;
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}

.ability-turn-limit {
  color: #888;
  font-size: 0.76rem;
  margin-top: 0.25rem;
}

/* === Score Section === */
.score-section {
  padding: 1rem 1.5rem;
  border-top: 1px solid #0f3460;
}

.score-section h3 {
  color: #e94560;
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.score-label {
  font-size: 0.82rem;
  color: #aaa;
  margin-bottom: 0.2rem;
}

.score-bar-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.score-bar {
  flex: 1;
  height: 8px;
  background: #0a0a1a;
  border-radius: 4px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.score-value {
  font-weight: bold;
  min-width: 2.5rem;
  text-align: right;
  font-size: 0.9rem;
}

/* === Analysis / Detail Sections === */
.detail-section {
  padding: 1rem 1.5rem;
  border-top: 1px solid #0f3460;
}

.detail-section h3 {
  color: #e94560;
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.detail-text {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #ccc;
  margin-bottom: 0.75rem;
}

.detail-text:last-child {
  margin-bottom: 0;
}

/* === Deck Type Tags === */
.deck-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.deck-type-tag {
  background: #e94560;
  color: #fff;
  padding: 0.2rem 0.7rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* === Synergy Grid === */
.synergy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.synergy-card {
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s;
  position: relative;
  background: #0d1b3e;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.synergy-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.synergy-card img {
  width: 100%;
  display: block;
}

.synergy-name {
  font-size: 0.65rem;
  padding: 0.3rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.75);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Selected synergy card */
.synergy-card.selected {
  transform: scale(1.05);
  box-shadow: 0 0 0 2px #e94560, 0 4px 12px rgba(233, 69, 96, 0.4);
}

/* Synergy detail panel */
.synergy-detail-panel {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(13, 27, 62, 0.8);
  border: 1px solid rgba(233, 69, 96, 0.3);
  border-radius: 8px;
}
.synergy-detail-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.synergy-detail-name {
  font-weight: bold;
  font-size: 0.95rem;
}
.synergy-detail-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0 0 12px 0;
  color: rgba(255,255,255,0.9);
}
.synergy-detail-nav-btn {
  background: transparent;
  color: #e94560;
  border: 1px solid #e94560;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s, color 0.2s;
}
.synergy-detail-nav-btn:hover {
  background: #e94560;
  color: #fff;
}

/* === Variants Grid === */
.variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.variant-card {
  border-radius: 6px;
  overflow: hidden;
  background: #0d1b3e;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.variant-card img {
  width: 100%;
  display: block;
}

.variant-label {
  font-size: 0.72rem;
  padding: 0.3rem;
  color: #aaa;
}

/* === Card Q&A (LINE-style chat bubbles) === */
.qa-section-label {
  color: #e94560;
  font-size: 0.82rem;
  font-weight: bold;
  margin: 1rem 0 0.4rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #1a3a6a;
}

.qa-pair {
  margin-bottom: 0.6rem;
}

.qa-pair:last-child {
  margin-bottom: 0;
}

.qa-bubble-row {
  display: flex;
  margin-bottom: 0.4rem;
}

.qa-bubble-row.is-question {
  justify-content: flex-end;
}

.qa-bubble-row.is-answer {
  justify-content: flex-start;
}

.qa-bubble {
  max-width: 85%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.6;
  position: relative;
  word-break: break-word;
}

.qa-bubble-row.is-question .qa-bubble {
  background: #3b82f6;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.qa-bubble-row.is-answer .qa-bubble {
  background: #1e2d4a;
  color: #ddd;
  border-bottom-left-radius: 4px;
}

.qa-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 0.5rem;
  align-self: flex-start;
  margin-top: 2px;
}

/* === Review Request Button === */
.review-request-section {
  text-align: right;
  padding: 1rem 1.5rem 1.5rem;
}

.review-request-btn {
  background: transparent;
  border: 1px solid #e94560;
  color: #e94560;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.review-request-btn:hover {
  background: #e94560;
  color: #fff;
}

.review-request-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

.review-request-btn.sent {
  border-color: #4caf50;
  color: #4caf50;
  opacity: 1;
}

.review-request-section-inline {
  padding: 0.8rem 0 0;
  text-align: right;
}

/* === Loading State === */
.loading {
  text-align: center;
  padding: 3rem;
  color: #aaa;
  font-size: 1rem;
}

/* === Site Footer === */
.site-footer {
  background: #16213e;
  border-top: 2px solid #e94560;
  padding: 1.5rem 2rem;
  text-align: center;
  margin-top: 2rem;
}

.site-footer .copyright {
  color: #e0e0e0;
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.site-footer .disclaimer {
  color: #888;
  font-size: 0.75rem;
  margin: 0;
}

.site-footer .footer-links {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
}

.site-footer .footer-links a {
  color: #e94560;
  text-decoration: none;
}

.site-footer .footer-links a:hover {
  text-decoration: underline;
}

.site-footer .footer-sep {
  color: #555;
  margin: 0 0.4rem;
}

/* === Trait Filter === */
.trait-filter-row {
  width: 100%;
  padding-top: 0.75rem;
  border-top: 1px solid #0f3460;
}

.trait-filter-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trait-filter-label {
  font-size: 0.85rem;
  color: #aaa;
}

.trait-toggle-all-btn {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #aaa;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.trait-toggle-all-btn:hover {
  border-color: #4fc3f7;
  color: #e0e0e0;
}

.trait-expand-btn {
  background: none;
  border: none;
  color: #4fc3f7;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

.trait-expand-btn:hover {
  color: #81d4fa;
}

.trait-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 0.5rem;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.trait-filter-buttons.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.trait-filter-btn {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #aaa;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.trait-filter-btn:hover {
  border-color: #4fc3f7;
  color: #e0e0e0;
}

.trait-filter-btn.active {
  background: #0f3460;
  border-color: #4fc3f7;
  color: #4fc3f7;
}

/* === Pack Filter === */
.pack-filter-row {
  width: 100%;
  padding-top: 0.75rem;
  border-top: 1px solid #0f3460;
}

.pack-filter-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pack-filter-label {
  font-size: 0.85rem;
  color: #aaa;
}

.pack-toggle-all-btn {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #aaa;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pack-toggle-all-btn:hover {
  border-color: #4fc3f7;
  color: #e0e0e0;
}

.pack-expand-btn {
  background: none;
  border: none;
  color: #4fc3f7;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

.pack-expand-btn:hover {
  color: #81d4fa;
}

.pack-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 0.5rem;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.pack-filter-buttons.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.pack-filter-btn {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #aaa;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.pack-filter-btn:hover {
  border-color: #4fc3f7;
  color: #e0e0e0;
}

.pack-filter-btn.active {
  background: #0f3460;
  border-color: #4fc3f7;
  color: #4fc3f7;
}

.pack-category-label {
  font-size: 0.72rem;
  color: #888;
  margin-left: 0.3rem;
  margin-right: 0.1rem;
  white-space: nowrap;
}

.pack-category-label:first-child {
  margin-left: 0;
}

.level-filter-label {
  font-size: 0.85rem;
  color: #aaa;
  flex-shrink: 0;
}

.level-filters {
  display: flex;
  gap: 4px;
}

.level-filter-btn {
  width: 30px;
  height: 30px;
  border: 2px solid transparent;
  border-radius: 4px;
  background: #0d1b3e;
  color: #aaa;
  font-size: 0.82rem;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s, color 0.2s;
  opacity: 0.3;
}

.level-filter-btn.active {
  opacity: 1;
  border-color: #4fc3f7;
  color: #4fc3f7;
}

/* === Restriction Badge (Thumbnail) === */
.restriction-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

/* === Newness Badge (NEW / UPDATE) === */
.newness-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  line-height: 1.4;
  pointer-events: none;
}
.new-badge {
  background: #e94560;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.update-badge {
  background: #ff9800;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* === Restriction Badge (Modal) === */
.restriction-modal-0 { background: #c62828 !important; color: #fff !important; }
.restriction-modal-1 { background: #e65100 !important; color: #fff !important; }
.restriction-modal-2 { background: #f9a825 !important; color: #1a1a2e !important; }

/* === Last Updated === */
.last-updated {
  text-align: right;
  padding: 0.5rem 1.5rem 1rem;
  font-size: 0.72rem;
  color: #666;
}

/* === Image Protection === */
.card-grid img,
.modal-content img,
.synergy-card img,
.variant-card img {
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* === Abilities Popup (mobile) === */
.abilities-popup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.abilities-popup {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 10px;
  max-width: 420px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.abilities-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #0f3460;
  color: #e94560;
  font-weight: bold;
  font-size: 0.95rem;
}

.abilities-popup-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 0.2rem;
  line-height: 1;
}

.abilities-popup-close:hover {
  color: #e94560;
}

.abilities-popup-body {
  padding: 0.75rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* === Strengths / Weaknesses visual distinction === */
.detail-strengths {
}

.detail-weaknesses {
}

.eval-heading {
  display: inline-block;
  margin-top: 0.6rem;
}

.detail-text .eval-heading:first-of-type {
  margin-top: 0;
}

.card-ref {
  color: #4a90d9;
}

/* === Card Ref Tooltip === */
.card-ref-tooltip {
  position: fixed;
  z-index: 10001;
  display: none;
  filter: saturate(0.8);
}
.card-ref-tooltip img {
  width: 120px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  display: block;
}
/* PC: no pointer-events so hover doesn't flicker */
@media (hover: hover) {
  .card-ref-tooltip {
    pointer-events: none;
  }
}
/* Mobile: bubble style with arrow */
@media (hover: none) {
  .card-ref-tooltip {
    pointer-events: auto;
  }
  .card-ref-tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
  }
  .card-ref-tooltip.arrow-bottom::after {
    top: 100%;
    border-top-color: rgba(0, 0, 0, 0.5);
  }
  .card-ref-tooltip.arrow-top::after {
    bottom: 100%;
    border-bottom-color: rgba(0, 0, 0, 0.5);
  }
}

/* === Skeleton Loader === */
.skeleton-loader {
  padding: 1.5rem;
}

.skeleton-header {
  display: flex;
  gap: 1.5rem;
}

.skeleton-image {
  width: 240px;
  height: 335px;
  border-radius: 8px;
  background: #0d1b3e;
  flex-shrink: 0;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.skeleton-body {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: #0d1b3e;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line-title {
  height: 22px;
  width: 60%;
}

.skeleton-line-short {
  width: 40%;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: #666;
  font-size: 0.9rem;
  max-width: 1050px;
  margin: 0 auto;
}

/* === Scroll to Top Button === */
.fixed-bottom-actions {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.scroll-top-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(22, 33, 62, 0.9);
  border: 1px solid #0f3460;
  color: #e0e0e0;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, background 0.2s, border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top-btn:hover {
  background: #e94560;
  border-color: #e94560;
  color: #fff;
}

/* === Responsive === */
@media (max-width: 640px) {
  .fixed-bottom-actions {
    bottom: 1rem;
    right: 1rem;
  }

  .header {
    padding: 0.75rem 1rem;
  }

  .header h1 {
    font-size: 1.15rem;
  }

  .header-icon {
    width: 1.4em;
    height: 1.4em;
  }

  .header-disclaimer {
    font-size: 0.62rem;
  }

  .controls {
    padding: 0.75rem;
  }

  .controls-row {
    width: 100%;
  }

  .search-input {
    width: 100%;
    flex: 1;
    min-width: 0;
  }

  /* SP filter toggle button */
  .sp-filter-toggle {
    display: block;
    width: 100%;
    background: #0d1b3e;
    border: 1px solid #0f3460;
    border-radius: 6px;
    color: #4fc3f7;
    padding: 0.4rem;
    font-size: 0.82rem;
    cursor: pointer;
    text-align: center;
  }

  .sp-filter-toggle:hover {
    border-color: #4fc3f7;
  }

  /* SP filter panel collapse */
  .filter-panel.sp-collapsed {
    display: none;
  }

  /* SP filter panel: flex so color + type sit on one line */
  .filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }

  .filter-panel-row,
  .trait-filter-row,
  .pack-filter-row {
    width: 100%;
  }

  .filter-panel-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Sort buttons: shrink font on SP */
  .sort-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }

  .sort-label {
    font-size: 0.78rem;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 8px;
    padding: 0.75rem;
  }

  .section-title {
    padding: 0.75rem;
    font-size: 1.1rem;
  }

  .modal-header {
    gap: 0.75rem;
    padding: 1rem;
  }

  .modal-meta-bottom {
    right: 1rem;
  }

  .modal-header img {
    width: 120px;
    height: auto;
  }

  .modal-info h2 {
    font-size: 1rem;
    margin: 0 0 0.4rem;
  }

  .name-level-badge {
    width: 24px;
    height: 24px;
    min-width: 24px;
    font-size: 0.85rem;
  }

  .name-color-dot {
    width: 14px;
    height: 14px;
  }

  .info-row {
    gap: 0.3rem;
    margin-bottom: 0.3rem;
  }

  .info-badge {
    padding: 0.15rem 0.45rem;
    font-size: 0.75rem;
  }

  /* Abilities popup trigger on mobile */
  .abilities-toggle {
    display: inline-flex;
    position: absolute;
    left: 140px;
    bottom: 1rem;
    background: #0f3460;
    border: 1px solid #1a4a8a;
    border-radius: 4px;
    color: #fff;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
  }

  .abilities-inline-content {
    display: none;
  }

  .detail-section {
    padding: 0.75rem 1rem;
  }

  .score-section {
    padding: 0.75rem 1rem;
  }

  .trait-filter-btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.72rem;
  }

  .pack-filter-btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.72rem;
  }

  .pack-category-label {
    font-size: 0.65rem;
  }

  .level-filter-btn {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  .restriction-badge {
    width: 22px;
    height: 22px;
  }

  .newness-badge {
    padding: 1px 4px;
    font-size: 0.5rem;
  }

  .skeleton-image {
    width: 120px;
    height: 167px;
  }

  .skeleton-header {
    gap: 0.75rem;
  }

  .skeleton-loader {
    padding: 1rem;
  }
}
/* ===================================================
   combos.css - コンボページ固有スタイル
   =================================================== */

/* === Combo Panel (Index) === */
.combo-panel {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}

.combo-panel:hover {
  border-color: #e94560;
}

.combo-panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.combo-title {
  color: #e0e0e0;
  font-size: 1.1rem;
  margin: 0;
  flex-shrink: 0;
}

/* === Stats badges (index) === */
.combo-stats-inline {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

.combo-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: bold;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: #fff;
}

.combo-stat-num {
  font-size: 0.85rem;
}

.stat-removal { background: #c62828; }
.stat-board { background: #2e7d32; }
.stat-search { background: #1565c0; }
.stat-sleep { background: #6a1b9a; }
.stat-disrupt { background: #6a1b9a; }
.stat-assault { background: #e65100; }

/* === Combo Color Dot === */
.combo-color-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #fff;
  vertical-align: middle;
  margin-right: 0.3rem;
  box-sizing: border-box;
}

/* === Board display (shared index & show) === */
.combo-board {
  margin: 0.75rem 0;
}

.combo-board-show {
  margin: 1.5rem 0;
}

.combo-board-label {
  color: #888;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Board grid: 5 card-ratio slots.
   Active card fills slot. Sleep card is rotated and scaled to the same visual
   card-width so it doesn't overflow the slot. */
.combo-board-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 0 auto;
  padding-bottom: 1.2rem; /* room for card names below slots */
  overflow: visible;
}

.combo-board-slot {
  aspect-ratio: 5 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  min-width: 0;
}

.combo-board-slot.is-empty {
  background: rgba(15, 52, 96, 0.15);
  border: 1px dashed rgba(15, 52, 96, 0.5);
}

.combo-board-slot.is-empty::after {
  content: "EMPTY";
  color: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 0.12em;
}

.combo-board-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  min-width: 0;
}

/* Sleep: rotate so the card appears sideways.
   overflow:hidden on the slot clips the excess height. */
.combo-board-slot.is-sleep .combo-board-img {
  transform: rotate(-90deg);
}

/* Stun: flip the card upside-down. */
.combo-board-slot.is-stun .combo-board-img {
  transform: rotate(180deg);
}

.combo-board-name {
  position: absolute;
  bottom: -1.1rem;
  left: 0;
  right: 0;
  color: #ccc;
  font-size: 0.65rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* Sleep guard badge: shield icon on top-right of board card */
.combo-board-sleep-guard {
  position: absolute;
  bottom: 2px;
  right: 2px;
  z-index: 20;
  pointer-events: none;
  filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff);
}

.combo-board-sleep-guard svg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: #64b5f6;
  stroke-width: 2;
  stroke-linejoin: round;
}

.combo-board-slot.is-sleep .combo-board-name {
  color: #ab47bc;
}

.combo-board-slot.is-stun .combo-board-name {
  color: #e53935;
}

/* Icon help button & popover */
.combo-icon-help-wrap {
  position: relative;
  margin-left: auto;
}

.combo-icon-help-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #555;
  background: transparent;
  color: #888;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}

.combo-icon-help-btn:hover {
  border-color: #aaa;
  color: #ccc;
}

.combo-icon-help-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.combo-icon-help-popover.active {
  display: block;
}

.combo-icon-help-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ccc;
  font-size: 0.8rem;
}

.combo-icon-help-row + .combo-icon-help-row {
  margin-top: 0.5rem;
}

.combo-icon-help-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #64b5f6;
  stroke-width: 2;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Grid padding only when set cards are present */
.combo-board-grid:has(.has-set-card) {
  padding-top: 1.5rem;
}

.combo-board-grid:has(.combo-board-set-card + .combo-board-set-card) {
  padding-top: 2.5rem;
}

.combo-board-grid:has(.combo-board-set-card + .combo-board-set-card + .combo-board-set-card) {
  padding-top: 3.5rem;
}

/* === Set card display (card stacked behind, peeking above) === */
.combo-board-slot.has-set-card {
  overflow: visible;
}

.combo-board-img-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 4px;
  position: relative;
  z-index: 10;
}

.combo-board-slot.has-set-card .combo-board-img {
  min-width: 0;
}

.combo-board-slot.is-sleep .combo-board-img-wrap .combo-board-img {
  transform: rotate(-90deg);
}

.combo-board-slot.is-stun .combo-board-img-wrap .combo-board-img {
  transform: rotate(180deg);
}

/* Set cards: closest to main card = highest z-index among set cards */
.combo-board-set-card {
  position: absolute;
  top: -12%;
  left: 2%;
  right: 2%;
  z-index: 3;
  pointer-events: none;
}

.combo-board-set-img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Set card count badge (inside .combo-board-set-card) */
.combo-board-set-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 1;
  background: rgba(13, 27, 62, 0.9);
  color: #e0e0e0;
  font-size: 0.6rem;
  font-weight: bold;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  pointer-events: none;
  line-height: 1.2;
}

/* Name is clipped by overflow:hidden on normal slots; hide it explicitly here */
.combo-board-slot.has-set-card .combo-board-name {
  display: none;
}

/* Multiple set cards: each further up with lower z-index */
.combo-board-set-card + .combo-board-set-card {
  top: -24%;
  z-index: 2;
}

.combo-board-set-card + .combo-board-set-card + .combo-board-set-card {
  top: -36%;
  z-index: 1;
}

/* === Case card indicator (index panel) === */
.combo-flow-case {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: rgba(15, 52, 96, 0.4);
  border-radius: 6px;
  border-left: 3px solid #e94560;
}

.combo-flow-case-img {
  width: 50px;
  object-fit: contain;
  border-radius: 3px;
  filter: saturate(0.8);
  flex-shrink: 0;
}

.combo-flow-case-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.combo-flow-case-label {
  color: #e94560;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 0.1rem 0.35rem;
  background: rgba(233, 69, 96, 0.15);
  border-radius: 3px;
  flex-shrink: 0;
}

.combo-flow-case-name {
  color: #ccc;
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Flow layout (index panel) === */
.combo-flow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.combo-flow-input {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.combo-flow-card {
  width: 72px;
  text-align: center;
}

.combo-flow-card img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  filter: saturate(0.8);
}

.combo-flow-card-name {
  font-size: 0.6rem;
  color: #ccc;
  margin-top: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combo-flow-arrow {
  color: #e94560;
  font-size: 1.5rem;
  font-weight: bold;
  flex-shrink: 0;
}

.combo-flow-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding-bottom: 1.2rem;
  overflow: visible;
}

.combo-flow-board:has(.has-set-card) {
  padding-top: 1.5rem;
}

.combo-flow-board:has(.combo-board-set-card + .combo-board-set-card) {
  padding-top: 2.5rem;
}

.combo-flow-board:has(.combo-board-set-card + .combo-board-set-card + .combo-board-set-card) {
  padding-top: 3.5rem;
}

/* === Panel footer (index) === */
.combo-panel-footer {
  margin-bottom: 0.5rem;
}

.combo-panel-summary {
  font-size: 0.8rem;
  color: #aaa;
  line-height: 1.5;
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === Stat badge zero state === */
.combo-stat.is-zero {
  opacity: 0.3;
}

/* === Controls bar (index) === */
.combo-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.combo-search-input {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  width: 200px;
  transition: border-color 0.2s;
}

.combo-search-input::placeholder {
  color: #666;
}

.combo-search-input:focus {
  border-color: #e94560;
}

/* === Situation Panel === */
.combo-situation-panel {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.combo-situation-title {
  color: #e0e0e0;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.combo-situation-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.combo-situation-label {
  color: #aaa;
  font-size: 0.8rem;
  min-width: 6em;
  flex-shrink: 0;
}

.combo-situation-radios {
  display: flex;
  gap: 0.35rem;
}

.combo-situation-radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #0f3460;
  background: transparent;
  color: #888;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  user-select: none;
}

.combo-situation-radio input {
  display: none;
}

.combo-situation-radio:hover {
  border-color: #e94560;
  color: #e0e0e0;
}

.combo-situation-radio.active {
  background: #e94560;
  border-color: #e94560;
  color: #fff;
}

.combo-situation-radio.is-disabled {
  opacity: 0.25;
  pointer-events: none;
  cursor: default;
}

.combo-situation-note {
  color: #666;
  font-size: 0.72rem;
  margin-top: 0.25rem;
}

/* === Not recommended combo (situational) === */
.combo-panel.is-not-recommended {
  opacity: 0.45;
  filter: saturate(0.5);
  transition: opacity 0.25s, filter 0.25s, border-color 0.2s;
}

.combo-panel.is-not-recommended:hover {
  opacity: 0.7;
}

/* === Detail button (index) === */
.combo-detail-btn {
  display: block;
  width: 100%;
  text-align: center;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  font-family: inherit;
  padding: 0.6rem 1.5rem;
  margin-top: 1rem;
  background: linear-gradient(135deg, #e94560, #c62828);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(233, 69, 96, 0.25);
}

.combo-detail-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.45);
}

.combo-empty {
  color: #888;
  text-align: center;
  padding: 3rem 0;
  font-size: 0.9rem;
}

/* === Badges (show page header) === */
.combo-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.combo-badges-show {
  justify-content: center;
  margin-top: 0.75rem;
}

/* === Card Flow (show page) === */
.combo-cards-flow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.combo-cards-flow .combo-arrow {
  margin-top: 70px;
}

.combo-cards-flow-show {
  margin: 1.5rem 0;
}

.combo-arrow {
  color: #e94560;
  font-size: 1.5rem;
  font-weight: bold;
  flex-shrink: 0;
}

.combo-card-slot {
  text-align: center;
  flex-shrink: 0;
}

.combo-card-img-wrapper {
  position: relative;
  display: inline-block;
}

.combo-card-img-wrapper > img {
  width: 120px;
  height: 168px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.combo-card-img-wrapper.has-overlay > img {
  position: relative;
  z-index: 2;
}

/* Overlay: related card stacked on top, offset to bottom-right */
.combo-card-img-wrapper.has-overlay {
  margin-right: 30px;
  margin-bottom: 24px;
}

.combo-card-overlay {
  position: absolute;
  top: 24px;
  left: 30px;
  width: 120px;
  height: 168px;
  z-index: 1;
}

.combo-card-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
  opacity: 0.7;
  filter: brightness(0.75);
}

.combo-card-overlay-label {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(13, 27, 62, 0.9);
  color: #e94560;
  font-size: 0.6rem;
  font-weight: bold;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  z-index: 2;
}

.combo-card-name {
  color: #e0e0e0;
  font-size: 0.8rem;
  margin-top: 0.4rem;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combo-card-no {
  color: #888;
  font-size: 0.7rem;
}

.combo-card-relation {
  color: #aaa;
  font-size: 0.7rem;
  margin-top: 0.2rem;
}

.relation-type-label {
  background: #0f3460;
  color: #e0e0e0;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.65rem;
}

/* === Case note === */
.combo-case-note {
  color: #aaa;
  font-size: 0.8rem;
  text-align: center;
  margin: 0.5rem 0;
  padding: 0.4rem 0.75rem;
  background: rgba(15, 52, 96, 0.4);
  border-radius: 4px;
}

/* === Show page: Case required === */
.combo-case-required {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.combo-case-label {
  color: #e94560;
  font-size: 0.85rem;
  font-weight: bold;
  display: block;
  margin-bottom: 0.75rem;
}

.combo-case-card {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.combo-case-card img {
  width: 80px;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.combo-case-info {
  text-align: left;
}

.combo-case-name {
  color: #e0e0e0;
  font-size: 0.9rem;
  font-weight: bold;
}

.combo-case-no {
  color: #888;
  font-size: 0.75rem;
}

/* === Show page: Summary === */
.combo-show-summary {
  color: #ccc;
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: center;
  margin: 0 0 1.5rem;
  padding: 0 1rem;
}

/* === Steps section === */
.combo-steps-section {
  margin-top: 2rem;
}

.combo-steps-title {
  color: #e94560;
  font-size: 1.15rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #0f3460;
}

.combo-file-group {
  margin-bottom: 1.5rem;
}

.combo-file-header {
  color: #e94560;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.75rem;
  background: rgba(233, 69, 96, 0.1);
  border-left: 3px solid #e94560;
  border-radius: 0 4px 4px 0;
}

.combo-step {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: rgba(15, 52, 96, 0.3);
  border-radius: 6px;
}

.combo-step-number {
  color: #e94560;
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.combo-step-main {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.combo-step-body {
  flex: 1;
  min-width: 0;
}

.combo-step-actor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.combo-step-actor-imgs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.combo-step-actor-img {
  width: 36px;
  height: 50px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.combo-step-trigger-img {
  border: 2px solid #ab47bc;
}

.combo-step-actor-name {
  color: #e0e0e0;
  font-size: 0.8rem;
  font-weight: bold;
}

.combo-step-desc {
  color: #ccc;
  font-size: 0.85rem;
  line-height: 1.6;
}

.combo-step-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.combo-step-badge {
  margin-top: 0;
}

/* === Step Board Snapshot === */
.combo-step-snapshot {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  flex: 0 0 65%;
}

.combo-step-snapshot-slot {
  aspect-ratio: 5 / 7;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.combo-step-snapshot-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  opacity: 0.4;
  filter: brightness(0.6);
  transition: opacity 0.2s, filter 0.2s;
}

.combo-step-snapshot-slot.is-empty {
  background: rgba(15, 52, 96, 0.15);
  border: 1px dashed rgba(15, 52, 96, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.combo-step-snapshot-slot.is-empty::after {
  content: "EMPTY";
  color: rgba(255, 255, 255, 0.08);
  font-size: 0.5rem;
  font-weight: bold;
  letter-spacing: 0.1em;
}

/* Actor: the card performing the action this step - gold highlight */
.combo-step-snapshot-slot.is-actor img {
  opacity: 1;
  filter: brightness(1.1);
  box-shadow: 0 2px 12px rgba(255, 193, 7, 0.6);
}

.combo-step-snapshot-slot.is-actor::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #ffc107;
  border-radius: 3px;
  pointer-events: none;
}

/* Trigger: the card whose ability was triggered - purple highlight */
.combo-step-snapshot-slot.is-trigger img {
  opacity: 1;
  filter: brightness(1.05);
  box-shadow: 0 2px 12px rgba(171, 71, 188, 0.6);
}

.combo-step-snapshot-slot.is-trigger::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #ab47bc;
  border-radius: 3px;
  pointer-events: none;
}

/* Changed: cards that changed since previous step - red highlight */
.combo-step-snapshot-slot.is-changed img {
  opacity: 1;
  filter: brightness(1);
  box-shadow: 0 2px 10px rgba(233, 69, 96, 0.5);
}

.combo-step-snapshot-slot.is-changed::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #e94560;
  border-radius: 3px;
  pointer-events: none;
}

.combo-step-snapshot-slot.is-sleep img {
  transform: rotate(-90deg);
}

.combo-step-snapshot-slot.is-stun img {
  transform: rotate(180deg);
}

/* === Action type badges (summon/declare/trigger) === */
.badge-action {
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: #fff;
  line-height: 1;
}

.badge-action-summon {
  background: #00897b;
}

.badge-action-declare {
  background: #ffc107;
  color: #1a1a2e;
}

.badge-action-trigger {
  background: #ab47bc;
}

/* === Combo Modal === */
.combo-modal-header {
  text-align: center;
  padding: 1.5rem 1.5rem 0;
}

.combo-modal-title {
  color: #e0e0e0;
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.combo-modal-color {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-right: 0.5rem;
}

.combo-modal-stats {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.combo-modal-body {
  padding: 1rem 1.5rem 1.5rem;
}

.combo-modal-summary {
  color: #ccc;
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: center;
  margin: 0.75rem 0 1rem;
}

.combo-modal-section-label {
  color: #888;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 0.5rem;
}

/* === Alternatives Section === */
.combo-alternatives {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(15, 52, 96, 0.2);
  border-radius: 8px;
}

.combo-alt-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.combo-alt-row + .combo-alt-row {
  border-top: 1px solid rgba(15, 52, 96, 0.4);
}

.combo-alt-original {
  flex-shrink: 0;
  text-align: center;
  width: 80px;
}

.combo-alt-original img {
  width: 80px;
  height: 112px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.combo-alt-arrow {
  color: #e94560;
  font-size: 1.25rem;
  font-weight: bold;
  flex-shrink: 0;
}

.combo-alt-grid {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.combo-alt-card {
  text-align: center;
  width: 80px;
}

.combo-alt-card img {
  width: 80px;
  height: 112px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.combo-alt-card-name {
  color: #ccc;
  font-size: 0.65rem;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Axis Badge === */
.combo-axis-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: bold;
  color: #e0e0e0;
  background: rgba(15, 52, 96, 0.7);
  border: 1px solid #0f3460;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.combo-show-axis {
  text-align: center;
  margin-bottom: 0.5rem;
}

/* === Variant Badge === */
.combo-variant-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: bold;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
}

.combo-variant-removal {
  background: rgba(198, 40, 40, 0.25);
  color: #ef9a9a;
  border: 1px solid rgba(198, 40, 40, 0.4);
}

.combo-variant-assault {
  background: rgba(249, 168, 37, 0.25);
  color: #fff176;
  border: 1px solid rgba(249, 168, 37, 0.4);
}

/* === Variant Indicator === */
.combo-variant-indicator {
  font-size: 0.75rem;
  text-align: center;
  color: #90a4ae;
  padding: 0.3rem 0;
}

.combo-variant-indicator-removal {
  color: #ef9a9a;
}

.combo-variant-indicator-assault {
  color: #fff176;
}

/* === Variant Pair Link (show page) === */
.combo-variant-pair-link {
  display: inline-block;
  font-size: 0.75rem;
  color: #90caf9;
  text-decoration: none;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(144, 202, 249, 0.3);
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.combo-variant-pair-link:hover {
  background: rgba(144, 202, 249, 0.15);
  color: #bbdefb;
}

/* === Analysis Section (show & modal) === */
.combo-analysis-section {
  margin-top: 2rem;
}

.combo-analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.combo-analysis-col {
  background: rgba(15, 52, 96, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.combo-analysis-heading {
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.combo-analysis-strengths .combo-analysis-heading {
  color: #4caf50;
}

.combo-analysis-weaknesses .combo-analysis-heading {
  color: #ef5350;
}

.combo-analysis-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.combo-analysis-list li {
  color: #ccc;
  font-size: 0.8rem;
  line-height: 1.6;
  padding: 0.2rem 0;
}

.combo-analysis-category {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: bold;
  color: #e0e0e0;
  background: rgba(15, 52, 96, 0.6);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-right: 0.4rem;
  vertical-align: middle;
}

/* === Improvement Cards === */
.combo-improvement-section {
  margin-top: 0.5rem;
}

.combo-improvement-section .combo-analysis-heading {
  color: #42a5f5;
}

.combo-improvement-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.combo-improvement-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(15, 52, 96, 0.2);
  border-radius: 6px;
}

.combo-improvement-card img {
  width: 48px;
  height: 67px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  filter: saturate(0.8);
  flex-shrink: 0;
}

.combo-improvement-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.combo-improvement-name {
  color: #e0e0e0;
  font-size: 0.8rem;
  font-weight: bold;
}

.combo-improvement-reason {
  color: #aaa;
  font-size: 0.75rem;
  line-height: 1.5;
}

/* === Responsive === */
@media (max-width: 640px) {
  .combo-panel {
    padding: 0.75rem;
    margin-bottom: 1rem;
  }

  .combo-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .combo-title {
    font-size: 1rem;
  }

  .combo-stat {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }

  .combo-stat-num {
    font-size: 0.75rem;
  }

  .combo-flow {
    flex-direction: column;
    align-items: center;
  }

  .combo-flow-input {
    justify-content: center;
  }

  .combo-flow-card {
    width: 60px;
  }

  .combo-flow-card-name {
    font-size: 0.55rem;
  }

  .combo-flow-arrow {
    transform: rotate(90deg);
    text-align: center;
  }

  .combo-flow-board {
    gap: 4px;
    padding-bottom: 1rem;
  }

  .combo-flow-case {
    gap: 0.4rem;
    padding: 0.3rem 0.5rem;
  }

  .combo-flow-case-img {
    width: 40px;
  }

  .combo-flow-case-name {
    font-size: 0.7rem;
  }

  .combo-controls {
    flex-direction: column;
    align-items: stretch;
    position: relative;
  }

  .combo-search-input {
    width: 100%;
  }

  .combo-situation-panel {
    padding: 0.75rem;
  }

  .combo-situation-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .combo-situation-radio {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
  }

  .combo-icon-help-wrap {
    position: absolute;
    right: 0;
    bottom: 0;
    margin-left: 0;
  }

  .combo-board {
    margin: 0.5rem 0;
  }

  .combo-board-sleep-guard svg {
    width: 36px;
    height: 36px;
  }

  .combo-board-grid {
    gap: 4px;
    padding-bottom: 1rem;
  }

  .combo-board-name {
    font-size: 0.55rem;
    bottom: -0.9rem;
  }

  .combo-board-slot.is-empty::after {
    font-size: 0.55rem;
  }

  .combo-detail-btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    margin-top: 0.75rem;
  }

  .combo-cards-flow {
    gap: 0.25rem;
  }

  .combo-card-img-wrapper > img {
    width: 72px;
    height: 101px;
  }

  .combo-card-img-wrapper.has-overlay {
    margin-right: 18px;
    margin-bottom: 14px;
  }

  .combo-card-overlay {
    top: 14px;
    left: 18px;
    width: 72px;
    height: 101px;
  }

  .combo-card-overlay-label {
    font-size: 0.5rem;
    padding: 0.1rem 0.3rem;
  }

  .combo-card-name {
    max-width: 84px;
    font-size: 0.65rem;
  }

  .combo-card-no {
    font-size: 0.6rem;
  }

  .combo-arrow {
    font-size: 1rem;
    margin-top: 40px;
  }

  .combo-cards-flow .combo-arrow {
    margin-top: 40px;
  }

  .combo-step {
    padding: 0.6rem;
  }

  .combo-step-main {
    flex-direction: column;
    gap: 0.6rem;
  }

  .combo-step-snapshot {
    flex: none;
    width: 100%;
  }

  .combo-step-body {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.5rem;
    align-items: start;
  }

  /* display:contents makes actor's children (imgs + name) direct grid items */
  .combo-step-actor {
    display: contents;
  }

  .combo-step-actor-imgs {
    grid-column: 1;
    grid-row: 1 / span 3;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Overlay: trigger card behind actor card, like card flow */
  .combo-step-actor-imgs.has-trigger {
    margin-right: 12px;
    margin-bottom: 12px;
  }

  .combo-step-actor-imgs.has-trigger > .combo-step-actor-img:first-child {
    position: relative;
    z-index: 2;
  }

  .combo-step-actor-imgs.has-trigger > .combo-step-trigger-img {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    opacity: 0.7;
    filter: brightness(0.75);
  }

  .combo-step-actor-img {
    width: 48px;
    height: 67px;
  }

  /* Name label: right column row 1, above description */
  .combo-step-actor-name {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.7rem;
    text-align: left;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .combo-step-desc {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.8rem;
  }

  .combo-step-badges {
    grid-column: 2;
    grid-row: 3;
  }

  .combo-step-snapshot-slot.is-empty::after {
    font-size: 0.4rem;
  }

  .badge-action {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }

  .combo-case-card {
    flex-direction: column;
  }

  .combo-case-info {
    text-align: center;
  }

  .combo-show-summary {
    font-size: 0.82rem;
    padding: 0 0.5rem;
  }

  .combo-steps-title {
    font-size: 1rem;
  }

  .combo-file-header {
    font-size: 0.82rem;
  }

  .combo-modal-header {
    padding: 1rem 1rem 0;
  }

  .combo-modal-title {
    font-size: 1.05rem;
  }

  .combo-modal-body {
    padding: 0.75rem 1rem 1rem;
  }

  .combo-modal-summary {
    font-size: 0.82rem;
  }

  .combo-alternatives {
    padding: 0.75rem;
  }

  .combo-alt-row {
    gap: 0.5rem;
  }

  .combo-alt-original {
    width: 60px;
  }

  .combo-alt-original img {
    width: 60px;
    height: 84px;
  }

  .combo-alt-card {
    width: 60px;
  }

  .combo-alt-card img {
    width: 60px;
    height: 84px;
  }

  .combo-alt-arrow {
    font-size: 1rem;
  }

  .combo-alt-card-name {
    font-size: 0.55rem;
  }

  .combo-analysis-grid {
    grid-template-columns: 1fr;
  }

  .combo-analysis-list li {
    font-size: 0.75rem;
  }

  .combo-improvement-card img {
    width: 40px;
    height: 56px;
  }

  .combo-improvement-name {
    font-size: 0.72rem;
  }

  .combo-improvement-reason {
    font-size: 0.68rem;
  }

}
/* === Contact Page === */
.contact-page {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.contact-container {
  max-width: 600px;
  width: 100%;
}

.contact-title {
  color: #e94560;
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
  text-align: center;
}

.contact-description {
  color: #aaa;
  font-size: 0.88rem;
  text-align: center;
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

.contact-notice {
  background: #1b5e20;
  color: #c8e6c9;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}

.contact-errors {
  background: #b71c1c;
  color: #ffcdd2;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.contact-errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.contact-form {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 12px;
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  color: #ccc;
  margin-bottom: 0.35rem;
}

.form-label.required::after {
  content: " *";
  color: #e94560;
}

.form-input {
  width: 100%;
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #e0e0e0;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.form-input:focus {
  border-color: #e94560;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  text-align: center;
  margin-top: 1.5rem;
}

.form-submit {
  background: #e94560;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.65rem 2.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.form-submit:hover {
  background: #d63851;
}

.contact-back {
  text-align: center;
  margin-top: 1.5rem;
}

.contact-back a {
  color: #e94560;
  text-decoration: none;
  font-size: 0.85rem;
}

.contact-back a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .contact-page {
    padding: 1rem 0.75rem;
  }

  .contact-form {
    padding: 1rem;
  }
}
/* ===================================================
   tactics.css - サイト共通ナビゲーション + 戦術ガイド系共通スタイル
   =================================================== */

/* === Site Page Tabs (shared header navigation) === */
.site-page-tabs {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 0.75rem;
}

.site-page-tab {
  color: #888;
  text-decoration: none;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: bold;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  transition: color 0.2s, background 0.2s;
  position: relative;
  top: 2px; /* overlap with header border-bottom */
}

.site-page-tab:hover {
  color: #e0e0e0;
  background: rgba(233, 69, 96, 0.08);
}

.site-page-tab.active {
  color: #e94560;
  background: #1a1a2e;
  border-color: #e94560;
}

.site-page-tab.disabled {
  color: #555;
  cursor: default;
  pointer-events: none;
}

.site-page-tab-soon {
  font-size: 0.55rem;
  color: #555;
  font-weight: normal;
  margin-left: 0.2rem;
  vertical-align: super;
}

/* === Content wrapper === */
.tactics-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* === Color Tabs === */
.tactics-color-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.tactics-color-btn {
  padding: 0.5rem 1rem;
  border: 2px solid transparent;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s, transform 0.15s;
  opacity: 0.5;
  position: relative;
}

.tactics-color-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.tactics-color-btn.active {
  opacity: 1;
  border-color: #fff;
  transform: scale(1.05);
}

.tactics-color-btn[data-color="全"] { background: #0f3460; color: #e0e0e0; }
.tactics-color-btn[data-color="赤"] { background: #c62828; color: #fff; }
.tactics-color-btn[data-color="青"] { background: #1565c0; color: #fff; }
.tactics-color-btn[data-color="緑"] { background: #2e7d32; color: #fff; }
.tactics-color-btn[data-color="白"] { background: #cfd8dc; color: #1a1a2e; }
.tactics-color-btn[data-color="黄"] { background: #f9a825; color: #1a1a2e; }
.tactics-color-btn[data-color="黒"] { background: #424242; color: #fff; }
.tactics-color-btn[data-color="混色"] { background: linear-gradient(135deg, #1565c0, #c62828, #f9a825); color: #fff; }

.tactics-color-count {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-left: 0.25rem;
}

/* === Combo detail page: back link + title === */
.tactics-detail-nav {
  text-align: center;
  margin-bottom: 0.75rem;
}

.tactics-back-link {
  color: #e94560;
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.tactics-back-link:hover {
  opacity: 0.8;
}

.tactics-detail-title {
  color: #e94560;
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-align: center;
}

/* === Effect type badges (shared across tactics pages) === */
.combo-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  white-space: nowrap;
}

.badge-removal { background: #c62828; color: #fff; }
.badge-board { background: #2e7d32; color: #fff; }
.badge-search { background: #1565c0; color: #fff; }
.badge-sleep { background: #6a1b9a; color: #fff; }
.badge-stun { background: #6a1b9a; color: #fff; }
.badge-assault { background: #e65100; color: #fff; }
.badge-draw { background: #1976d2; color: #fff; }

/* === Responsive === */
@media (max-width: 640px) {
  .site-page-tabs {
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-page-tab {
    padding: 0.3rem 0.5rem;
    font-size: 0.68rem;
  }

  .site-page-tab-soon {
    font-size: 0.45rem;
  }

  .tactics-content {
    padding: 1rem 0.5rem;
    max-width: 100%;
    overflow-x: hidden;
  }

  .tactics-color-tabs {
    gap: 4px;
  }

  .tactics-color-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
  }

  .tactics-color-count {
    font-size: 0.6rem;
  }

  .tactics-detail-title {
    font-size: 1.1rem;
  }

  .tactics-detail-nav {
    margin-bottom: 0.5rem;
  }

  .tactics-back-link {
    font-size: 0.8rem;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
