/* ── 도감: 부위별 추가 옵션 ── */
.panel-codex { height: min(760px, 100%); }
.codex-modes { flex: none; display: flex; gap: 6px; margin-bottom: 10px; }
.codex-mode {
  font: inherit; font-size: 15px; font-weight: 800; min-height: 38px; padding: 0 16px; border-radius: 10px; cursor: pointer;
  color: var(--muted); background: transparent; border: 1px solid var(--line);
}
.codex-mode:hover { color: var(--text); }
.codex-mode.is-on { color: var(--accent-2); border-color: var(--accent-2); background: rgba(232, 163, 58, 0.1); }
.codex-bar { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.codex-slots { display: flex; flex-wrap: wrap; gap: 6px; }
.codex-chip {
  font: inherit; font-size: 14px; font-weight: 700; min-height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  color: var(--muted); background: rgba(20, 20, 26, 0.7); border: 1px solid var(--line);
}
.codex-chip:hover { color: var(--text); border-color: #6a6a74; }
.codex-chip.is-on { color: #1a1206; background: var(--accent-2); border-color: var(--accent-2); }
.codex-lv-box { display: flex; align-items: center; gap: 6px; }
.codex-lv-label { font-size: 13px; color: var(--muted); }
.codex-step { min-width: 36px; padding: 0; font-size: 18px; }
.codex-lv { min-width: 30px; text-align: center; font-size: 17px; font-weight: 800; color: var(--accent-2); }

.codex-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.codex-sub { margin: 6px 0 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
.codex-affixes { display: flex; flex-direction: column; gap: 6px; }
.codex-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border: 1px solid #2c2a26; border-radius: 10px; background: var(--panel-2);
}
.codex-affix { font-size: 15px; color: #a8c8ff; min-width: 0; }
.codex-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; flex: none; max-width: 55%; }
.codex-tag {
  font-size: 12px; padding: 2px 8px; border-radius: 999px;
  color: var(--muted); border: 1px solid var(--line); background: rgba(8, 8, 10, 0.5);
}
.codex-tag.is-only { color: var(--accent-2); border-color: var(--accent-2); }

.codex-bases { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.codex-base {
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 8px 10px; border: 1px solid #2c2a26; border-radius: 10px; background: rgba(20, 20, 24, 0.6);
}
.codex-base-icon { grid-row: span 2; width: 44px; height: 44px; object-fit: contain; }
.codex-base-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.codex-base-lv { font-size: 12px; color: var(--muted); }

/* 고유 장비 카드 */
.codex-uniques { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.codex-unique {
  display: flex; gap: 12px; padding: 10px 12px; border: 1px solid rgba(217, 178, 106, 0.45); border-radius: 10px;
  background: linear-gradient(180deg, rgba(217, 178, 106, 0.1), rgba(20, 18, 14, 0.7));
}
.codex-unique-icon { width: 56px; height: 56px; object-fit: contain; flex: none; }
.codex-unique-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.codex-unique-name { font-size: 16px; font-weight: 800; }
.codex-unique-sub { font-size: 12px; color: var(--muted); }
.codex-unique-affix { font-size: 13px; color: #a8c8ff; }
.codex-unique-power { font-size: 13px; line-height: 1.5; color: var(--r5); }
.codex-unique-lore { font-size: 12px; font-style: italic; color: #b8a888; }

@media (max-width: 600px) {
  .codex-chip { font-size: 13px; padding: 0 10px; min-height: 32px; }
  .codex-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .codex-tags { justify-content: flex-start; max-width: none; }
}
