/* web/skills.css — CompanionLand skills panel + Train session (AMENDMENT 6).
   Loaded alongside web/style.css, whose CSS custom properties (--paper,
   --panel, --accent, --line, etc.) and shared classes (.barTrack, .barFill,
   .muted, .section, button.primary/.secondary/.ghost) this file reuses
   rather than redefining, per the pet card's existing visual language. */

/* ---------------------------------------------------------------- panel (renderPanel) */
.skGate {
  font-size: 12px; line-height: 1.5; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; margin-bottom: 12px;
}
.skGate b { color: var(--ink); font-weight: 600; }
.skGate.skGateMet { border-color: var(--accent); color: var(--ink); }

.skRows { display: flex; flex-direction: column; gap: 10px; }
.skRow {
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
  padding: 10px 12px; text-align: left;
}
.skRow.clickable { cursor: pointer; transition: border-color 0.15s; }
.skRow.clickable:hover { border-color: var(--accent); }

.skRowTop { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.skIcon { font-size: 15px; line-height: 1; flex: none; }
.skName { font-size: 13px; font-weight: 600; color: var(--ink); flex: 1; min-width: 0; }

.skPips { display: flex; gap: 3px; flex: none; }
.skPip {
  width: 9px; height: 9px; border-radius: 3px;
  background: var(--paper-2); border: 1px solid var(--line);
}
.skPip.filled { background: var(--accent); border-color: var(--accent); }

.skRowBar { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.skXpTrack { flex: 1; height: 6px; }
.skXpFill { background: var(--green-2); }
.skXpLabel { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.skCapLabel { font-size: 10px; color: var(--muted); white-space: nowrap; flex: none; }
.skCapLabel.atCap { color: var(--accent); }

.skHow { font-size: 11.5px; color: var(--muted); margin: 0; line-height: 1.4; }

.skTrainBtn { width: 100%; margin-top: 4px; }

/* ---------------------------------------------------------------- overlay shell */
.skOverlay {
  position: fixed; inset: 0; z-index: 66;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.skCard {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: 420px; max-width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 24px 24px;
  box-shadow: 0 20px 60px var(--shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.skCard h2 { font-size: 19px; margin-bottom: 4px; padding-right: 20px; }
.skClose {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 22px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 4px;
}
.skClose:hover { color: var(--ink); }
.skPickHint { margin-bottom: 14px; font-size: 12.5px; }
.skStarting { text-align: center; padding: 30px 0; }

/* ---------------------------------------------------------------- skill picker */
.skPickList { display: flex; flex-direction: column; gap: 8px; }
.skPickRow {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
  padding: 10px 12px; cursor: pointer; color: var(--ink); font: inherit;
  transition: border-color 0.15s;
}
.skPickRow:hover { border-color: var(--accent); }
.skPickName { flex: 1; font-size: 13.5px; font-weight: 600; text-align: left; }

.skTrickList { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.skTrickChip {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  background: var(--panel-2); color: var(--ink); cursor: pointer; font-size: 13px;
}
.skTrickChip:hover { border-color: var(--accent); }
.skPickBack { display: flex; justify-content: flex-start; }

/* ---------------------------------------------------------------- session */
.skRules { margin-bottom: 14px; font-size: 12.5px; }
.skSession { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.skTimerRow {
  width: 100%; display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.skXpLive { color: var(--accent); font-weight: 600; }

.skPromptWrap { padding: 8px 0 4px; }
.skPromptBtn {
  position: relative; width: 132px; height: 132px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--line); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  min-height: 0; padding: 0;
}
.skPromptBtn:hover { border-color: var(--accent); }
.skRingSvg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.skRingTrack { fill: none; stroke: var(--line); stroke-width: 4; }
.skRingSweet { fill: none; stroke: color-mix(in srgb, var(--green-1) 70%, var(--accent)); stroke-width: 4; opacity: 0.55; }
.skRingFill { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.skPromptText {
  position: relative; z-index: 1; font-family: var(--font-display); font-weight: 560;
  font-size: 14px; text-align: center; padding: 0 14px; color: var(--ink); line-height: 1.25;
}
.skFeedback { min-height: 1.4em; font-size: 13px; color: var(--accent); font-weight: 600; margin: 0; }

/* ---------------------------------------------------------------- end card */
.skEndStats { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.skLevelUps { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.skLevelUp {
  font-size: 13px; font-weight: 600; color: var(--accent-ink); background: var(--accent);
  border-radius: 8px; padding: 6px 10px;
}
.skEndLine {
  font-family: var(--font-display); font-style: italic; font-size: 14.5px; line-height: 1.5;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin: 10px 0 4px;
}
.skEndActions { display: flex; justify-content: flex-end; margin-top: 14px; }

/* ---------------------------------------------------------------- skill-up floater */
.skFloater {
  position: fixed; pointer-events: none; z-index: 67; transform: translate(-50%, 0);
  color: var(--accent); font-family: var(--font-display); font-weight: 650; font-size: 14px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  animation: skFloatUp 1.15s ease-out forwards;
}
@keyframes skFloatUp {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.85); }
  15% { opacity: 1; transform: translate(-50%, -6px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(1); }
}

/* ---------------------------------------------------------------- mobile */
@media (max-width: 640px) {
  .skCard { width: 100%; max-height: 92vh; padding: 22px 18px 20px; border-radius: 14px; }
  .skPromptBtn { width: 116px; height: 116px; }
  .skClose { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; top: 4px; right: 4px; }
  .skPickRow, .skTrickChip, .skTrainBtn, #skDoneBtn, #skBackToSkills { min-height: 44px; }
  .skRow.clickable { min-height: 44px; }
}
