/* Skills tab (views/skills.ts) — scoped to .skills-view / .sk-*.
   Colors come ONLY from css/theme.css custom properties. Shared by the PC
   and mobile chromes; everything wraps, no fixed widths past ~120px. */

.skills-view {
  flex: 1; min-height: 0; padding: 12px;
  display: flex; flex-direction: column; gap: 14px; overflow-y: auto;
}
.sk-block { display: flex; flex-direction: column; gap: 6px; }

/* section captions — same voice as the fight panel's cluster captions */
.sk-sec {
  font-size: var(--font-small); color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 1px;
}

/* ---------- character header ---------- */
.sk-head { display: flex; flex-direction: column; gap: 5px; }
.sk-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sk-name {
  font-size: var(--font-title); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sk-lv {
  display: flex; flex-direction: column; align-items: center; padding: 3px 12px 2px;
  background: var(--bg-panel-light); border: var(--border-w) solid var(--border-light);
  border-radius: var(--corner);
}
.sk-lv-cap { font-size: 9px; letter-spacing: 2px; color: var(--text-faint); }
.sk-lv-num {
  font-size: var(--font-large); font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.sk-vital { display: flex; gap: 8px; align-items: center; }
.sk-vital .k-bar { flex: 1; }

/* ---------- stat tiles (the slow track — deliberately NOT skill rows) ---- */
.sk-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.sk-stat {
  flex: 1 1 72px; min-width: 64px; max-width: 120px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 6px 5px;
  background: var(--bg-panel-light); border: var(--border-w) solid var(--border);
  border-bottom: 2px solid var(--tile-c); border-radius: var(--corner);
  cursor: pointer; transition: transform var(--t-lift) ease;
}
.sk-stat:hover { transform: translateY(var(--lift)); }
.sk-stat-abbr {
  font-size: var(--font-small); font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--tile-c);
}
.sk-stat-lv {
  font-size: var(--font-large); font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.sk-stat .k-bar { width: 100%; }
.sk-stat .k-bar > .fill { background: var(--tile-c); }
.sk-stat .k-bar > .label { display: none; }

/* ---------- skill rows: level badge + name + xp bar ---------- */
.sk-sec-rows { display: flex; flex-direction: column; gap: 4px; }
.sk-sec-name { margin-top: 2px; }
.sk-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px;
  cursor: pointer; transition: transform var(--t-lift) ease;
}
.sk-row:hover { transform: translateY(var(--lift)); }
.sk-row-lv {
  width: 34px; height: 34px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-slot); border-radius: 3px;
  border-top: 1px solid var(--bevel-dark); border-left: 1px solid var(--bevel-dark);
  border-bottom: 1px solid var(--bevel-light); border-right: 1px solid var(--bevel-light);
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.sk-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sk-row-top { display: flex; align-items: baseline; gap: 8px; }
.sk-row-name {
  font-size: var(--font-medium); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sk-row-next { white-space: nowrap; }
.sk-row .k-bar > .label { display: none; }
/* about to level (bar ≥ 90%): the fill brightens to the flash tone */
.sk-row .k-bar.near > .fill { background: var(--bar-flash); }

/* ---------- reference fold (subordinate) ---------- */
.sk-ref-head { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.sk-ref-chev { color: var(--text-faint); font-size: var(--font-small); }
.sk-ref-cards { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.sk-ref-card {
  flex: 1 1 220px; min-width: 200px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 3px;
}
.sk-ref-row { display: flex; gap: 6px; align-items: baseline; }
.sk-ref-label { flex: 1; min-width: 0; }
.sk-ref-abbr { font-weight: 600; margin-right: 5px; }
