/* ==========================================================================
   스킬정보 화면 (#/skills, #/skills/patches)
   ========================================================================== */
.skills-host .filters {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  padding: 20px 22px; border-radius: var(--radius); background: var(--panel);
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.field--grow { flex: 1; min-width: 220px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); }
.field select, .field input {
  height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field select {
  appearance: none; padding-right: 38px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e717d' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
}
.field select:focus, .field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 138, 30, .15); }
.filters__reset {
  height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.filters__reset:hover { border-color: var(--ink); color: var(--ink); }

.role-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.role-filters-label { margin-right: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.role-filter {
  height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all .15s;
}
.role-filter:hover { border-color: var(--ink); }
.role-filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.result-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 28px; padding-bottom: 14px; border-bottom: 2px solid var(--line-strong); }
.result-bar #status { font-size: 18px; font-weight: 700; }
.result-bar__hint { font-size: 12px; color: var(--faint); }

.skills-layout { display: grid; grid-template-columns: 148px 1fr; gap: 28px; align-items: start; }
.job-index {
  position: sticky; top: calc(var(--gnb-h) + 16px);
  max-height: calc(100vh - var(--gnb-h) - 32px); overflow-y: auto; padding: 20px 4px 20px 0;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.job-index__family { margin: 14px 0 6px; font-size: 11px; font-weight: 800; color: var(--faint); letter-spacing: .04em; }
.job-index__family:first-child { margin-top: 0; }
.job-index a { display: block; padding: 4px 8px; border-radius: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-index a:hover { background: var(--panel); color: var(--ink); }

.job-section { padding-top: 28px; }
.job-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.job-heading h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.job-heading h2::before { content: ""; display: inline-block; width: 4px; height: 16px; margin-right: 10px; border-radius: 2px; background: var(--brand); vertical-align: -1px; }
.job-meta { font-size: 12px; color: var(--faint); }

.skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.skill { display: flex; flex-direction: column; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: #fff; transition: border-color .15s; }
.skill:hover { border-color: #cfd0d6; }
.skill-heading { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.skill-heading h3 { font-size: 16px; font-weight: 700; }
.role-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid #e3e4e8; background: var(--panel); color: var(--ink-2); font-size: 11.5px; font-weight: 700; cursor: help; }
.role-badge[data-role="사냥 주력"], .role-badge[data-role="이동형 사냥"] { border-color: #cfe8db; background: #eef8f2; color: #2f7a55; }
.role-badge[data-role="보스 주력"], .role-badge[data-role="극딜기"] { border-color: #f6d4dc; background: #fdf0f3; color: #b23a5a; }
.role-badge[data-role="광역기"] { border-color: #d3e3f5; background: #eff5fc; color: #31679e; }
.role-badge[data-role="유틸기"] { border-color: #ecdfbf; background: #fbf6e8; color: #8a6a1f; }
.role-badge[data-role="연계기"] { border-color: #e0d8f3; background: #f5f2fc; color: #6750a4; }
.skill .description { margin-top: 8px; font-size: 13.5px; line-height: 1.65; color: var(--muted); white-space: pre-line; }
.preview-box { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); }
.level-label { font-size: 11.5px; font-weight: 800; color: var(--brand-strong); }
.preview { margin-top: 2px; font-size: 13.5px; line-height: 1.6; color: var(--ink); white-space: pre-line; }
.skill details { margin-top: auto; padding-top: 10px; }
.skill summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0 0; border-top: 1px dashed var(--line);
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; list-style: none;
}
.skill summary::-webkit-details-marker { display: none; }
.skill summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.skill details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.skill summary:hover { color: var(--ink); }
.levels { margin-top: 10px; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.levels table { width: 100%; border-collapse: collapse; font-size: 13px; }
.levels thead th { position: sticky; top: 0; background: var(--panel); font-size: 12px; color: var(--muted); }
.levels th, .levels td { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.levels tbody th { width: 64px; font-weight: 700; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.levels tbody tr:last-child th, .levels tbody tr:last-child td { border-bottom: 0; }
.levels td { white-space: pre-line; }

/* 편의성 패치 */
.patch-intro { margin-bottom: 18px; font-size: 15px; color: var(--ink-2); }
.patch-status { margin-top: 24px; padding-bottom: 14px; border-bottom: 2px solid var(--line-strong); font-size: 14px; color: var(--muted); }
.patch-board { display: grid; }
.patch-post { border-bottom: 1px solid var(--line); }
.patch-post summary {
  display: flex; align-items: center; gap: 14px; padding: 20px 16px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 600;
}
.patch-post summary::-webkit-details-marker { display: none; }
.patch-post summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-left: 4px; border: solid var(--faint); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.patch-post[open] summary::after { transform: rotate(225deg) translateY(-3px); border-color: var(--ink); }
.patch-post summary:hover .patch-title { color: var(--brand-strong); }
.patch-category { flex: none; min-width: 64px; text-align: center; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--panel); color: var(--ink-2); }
.patch-category[data-category="공통"] { background: #eef8f2; color: #2f7a55; }
.patch-category[data-category="모험가"] { background: var(--brand-soft); color: var(--brand-strong); }
.patch-category[data-category="영웅"] { background: #fdf0f3; color: #b23a5a; }
.patch-category[data-category="시그너스"] { background: #f2f0fc; color: #5b4fb0; }
.patch-title { flex: 1; transition: color .15s; }
.patch-count { font-size: 12px; font-weight: 500; color: var(--faint); }
.patch-items { display: grid; gap: 6px; margin: 0 0 18px; padding: 18px 22px 20px 40px; border-radius: 12px; background: var(--panel); list-style: disc; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.patch-items li::marker { color: var(--brand); }
.patch-items li.enhancement { list-style: none; margin: 6px 0 0 -18px; font-weight: 700; color: var(--ink); }

@media (max-width: 860px) {
  .skills-layout { grid-template-columns: 1fr; }
  .job-index { display: none; }
}
@media (max-width: 600px) {
  .skills-host .filters { padding: 16px; }
  .field, .field--grow { min-width: 100%; }
  .filters__reset { width: 100%; }
  .skill-grid { grid-template-columns: 1fr; }
  .result-bar { flex-direction: column; gap: 4px; }
  .patch-post summary { padding: 16px 6px; gap: 10px; font-size: 15px; }
  .patch-count { display: none; }
}
