/* スキル説明一覧の画面（skills.html） */
/* ---- スキル説明一覧の画面（skills.html） ---- */

.skills-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.skills-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skills-controls .skill-filter {
  margin: 0;
}

.kind-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.kind-button {
  padding: 0 10px;
}

.skills-count,
.skills-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.skills-section h2 {
  margin: 8px 0;
}

.skills-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.skills-table th,
.skills-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.skills-table thead th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

/* 列の幅: スキル名 | 説明 | レベルごとの効果 */
.skills-table thead th:nth-child(1) {
  width: 20%;
}

.skills-table thead th:nth-child(2) {
  width: 30%;
}

.skills-table-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

/* レベルごとの効果: 「Lv1」「効果名（部位数）」と効果の 2 列 */
.level-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px 10px;
  margin: 0;
}

.level-list dt {
  color: var(--muted);
  white-space: nowrap;
}

.level-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.level-none {
  color: var(--muted);
}

.rewritten-mark {
  margin-left: 2px;
  color: var(--accent);
  font-size: 0.85em;
}

/* 狭い画面: 表の行をカードのように縦に並べ、見出しの代わりに各欄の名前を添える */
@media (max-width: 720px) {
  .skills-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .skills-table,
  .skills-table tbody,
  .skills-table tr,
  .skills-table th,
  .skills-table td {
    display: block;
  }

  .skills-table th,
  .skills-table td {
    border-bottom: none;
    padding: 4px 12px;
  }

  .skills-table tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }

  .skills-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
  }
}
