/* ===== 部隊・スキル図鑑 ===== */

/* 一覧ヘッダー */
.enc-list-header { padding: 16px 16px 8px; }
.enc-title { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.enc-subtitle { font-size: 11px; color: #7dd3fc; margin: 0; }

/* タブ */
.enc-tabs { display: flex; gap: 8px; padding: 8px 16px 4px; }
.enc-tab {
  flex: 1; padding: 10px 6px; border-radius: 10px;
  border: 1.5px solid rgba(125,211,252,.25);
  background: rgba(0,0,0,.3); color: #8aaccf;
  font-weight: 700; font-size: 13px; cursor: pointer; transition: all .15s;
}
.enc-tab.enc-tab-on {
  background: linear-gradient(135deg, #22d3ee, #34d399);
  color: #06101d; border-color: transparent;
}

/* セクション見出し */
.enc-section-label {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px 4px; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; color: #7dd3fc;
}
.enc-section-icon { font-size: 16px; }

/* グリッド */
.enc-body { padding-bottom: 80px; }
.enc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; padding: 4px 16px 6px;
}

/* カード */
.enc-card {
  border-radius: 12px; padding: 8px 6px 10px;
  cursor: pointer; background: rgba(4,12,28,.55);
  border: 1.5px solid #444;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform .12s, opacity .12s;
}
.enc-card:active { transform: scale(.95); }
.enc-card.enc-unowned { filter: grayscale(.75) brightness(.6); }

.enc-card-top {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  min-height: 18px;
}
.enc-lock-icon { font-size: 11px; opacity: .85; }

/* カード画像(assetImg ラッパー + img) */
.enc-card-img {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 64px;
}
.enc-card-img img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.enc-card-img .asset-fallback { font-size: 30px; line-height: 1; }

.enc-card-name {
  font-size: 9.5px; font-weight: 700; text-align: center;
  line-height: 1.3; color: #c8d9eb; word-break: break-all;
}

/* レアリティバッジ */
.enc-rarity {
  font-size: 9px; font-weight: 800; padding: 1px 5px;
  border-radius: 4px; color: #fff; white-space: nowrap; flex-shrink: 0;
}
.enc-rarity-n   { background: #6b7280; }
.enc-rarity-r   { background: #3b82f6; }
.enc-rarity-sr  { background: #a855f7; }
.enc-rarity-ssr { background: #d97706; }
.enc-rarity-ija   { background: #a855f7; }
.enc-rarity-nexus { background: #d97706; }
.enc-rarity-toy   { background: #6b7280; }
.enc-rarity-animal { background: #6b7280; }
.enc-rarity-work  { background: #3b82f6; }

/* ===== 戻るボタン ===== */
.enc-back { padding: 12px 16px 4px; }
.enc-back-btn {
  background: rgba(0,0,0,.3); border: 1px solid rgba(125,211,252,.3);
  border-radius: 8px; color: #7dd3fc; padding: 7px 14px;
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.enc-back-btn:active { opacity: .75; }

/* ===== 3Dビューア ===== */
.enc-3d-viewer {
  width: 100%; height: 280px; min-height: 180px;
  background: #08111f; overflow: hidden; position: relative;
}
.enc-3d-viewer canvas { width: 100% !important; height: 100% !important; display: block; }
.enc-3d-viewer.enc-3d-unowned { filter: grayscale(.8) brightness(.6); }

/* ===== 詳細カード ===== */
.enc-detail-card {
  margin: 10px 0 80px;
  border: 1.5px solid #444;
}

/* 所持状態バナー */
.enc-own-banner {
  text-align: center; font-size: 12px; font-weight: 700;
  padding: 6px 10px; border-radius: 8px; margin-bottom: 12px;
}
.enc-own-loading { background: rgba(255,255,255,.05); color: #6b7280; }
.enc-owned  { background: rgba(52,211,153,.15); color: #6ee7b7; }
.enc-notowned { background: rgba(239,68,68,.12); color: #fca5a5; }

/* 詳細ヘッダー(画像+名前+バッジ) */
.enc-detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.enc-dh-img {
  flex-shrink: 0; width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.2); border-radius: 10px; overflow: hidden;
}
.enc-dh-img img { width: 100%; height: 100%; object-fit: contain; }
.enc-dh-img .asset-fallback { font-size: 44px; line-height: 1; }
.enc-dh-name { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.enc-dh-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.enc-series-tag {
  font-size: 10px; color: #fde68a; font-weight: 600;
  background: rgba(253,230,138,.1); padding: 1px 6px; border-radius: 4px;
}
.enc-base-tag { font-size: 10px; color: #7dd3fc; }

/* ステータス表 */
.enc-stats { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.enc-stats tr:not(:last-child) td { border-bottom: 1px solid rgba(255,255,255,.06); }
.enc-sl { font-size: 11px; color: #8aaccf; padding: 6px 0; width: 56%; }
.enc-sv { font-size: 13px; font-weight: 700; text-align: right; }

/* 特殊能力リスト */
.enc-traits { margin-bottom: 14px; }
.enc-traits-hd { font-size: 12px; font-weight: 700; color: #7dd3fc; margin-bottom: 6px; }
.enc-trait {
  font-size: 11px; line-height: 1.65; color: #b8cde0;
  padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.06);
}

/* フレーバーテキスト */
.enc-flavor {
  font-size: 12px; color: #7a9abd; line-height: 1.65;
  padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07);
}

/* ===== スキル詳細 ===== */
.enc-skill-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

/* プロフィールページからの図鑑ボタン */
.enc-entry-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(34,211,238,.1), rgba(52,211,153,.1));
  border: 1.5px solid rgba(34,211,238,.3); cursor: pointer;
  transition: transform .12s;
}
.enc-entry-card:active { transform: scale(.98); }
.enc-entry-icon { font-size: 32px; }
.enc-entry-main { flex: 1; }
.enc-entry-title { font-size: 15px; font-weight: 800; margin-bottom: 2px; }
.enc-entry-sub { font-size: 11px; color: #7dd3fc; }
.enc-entry-arrow { font-size: 18px; color: #7dd3fc; }
