/* NPC Generator (restyle, as the dice-roller pilot): the parts the tool's script builds (the NPC's lines,
   the kept rows and their buttons, the Copied state) and the controls its styles.css draws by ID, in the
   pack's tool-part look. Loads after tool-bridge.css and tabletop-tool.css. Tokens only. */

/* Generate: the pack's primary button (styles.css draws #generate in the heading face with a lift) */
.studio-tool .gen-bar { margin-bottom: 18px; }
.studio-tool #generate {
  font-family: var(--font-label); font-size: var(--label-size); font-weight: var(--label-weight-strong);
  letter-spacing: calc(var(--label-tracking) * .6); text-transform: uppercase; line-height: 1.2;
  padding: 14px 26px; min-height: 44px; border-radius: var(--radius); box-shadow: none; transition: background-color .16s ease;
}
.studio-tool #generate:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); transform: none; box-shadow: none; }

/* the generated NPC (#result-stage.jsw-gen): the script writes .result-line rows (.rk label, .rv value);
   drawn as the pack's definition list (.jsw-dl): label in the label face, value in the body face,
   the name as the card's heading */
.studio-tool .jsw-gen { margin-bottom: 18px; padding-top: 6px; padding-bottom: 6px; }
.studio-tool .result-line {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 4px 24px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.studio-tool .result-line:last-child { border-bottom: 0; }
.studio-tool .result-line .rk {
  flex: none; font-family: var(--font-label); font-size: var(--label-size); font-weight: var(--label-weight);
  letter-spacing: calc(var(--label-tracking) * .6); text-transform: uppercase; color: var(--text-muted);
}
.studio-tool .result-line .rv { font-size: 1.05rem; line-height: 1.5; color: var(--text); }
.studio-tool .result-line .rv.big {
  font-family: var(--font-display); font-weight: var(--display-weight); text-transform: var(--display-transform);
  letter-spacing: var(--display-tracking); line-height: 1.1; font-size: clamp(1.75rem, 5vw, 2.5rem); color: var(--heading);
}
@media (max-width: 420px) {
  .studio-tool .result-line { grid-template-columns: 1fr; }
}

/* Copy / Keep / Add to Session Notes */
.studio-tool .result-actions { gap: 10px; margin-top: 0; }
/* the script adds .copied for a moment ("Copied ✓", "Added to your NPC log ✓"): styles.css colours it --pos,
   which the bridge maps to the pack's --success; the word in the label carries the meaning, not the colour */

/* Kept: heading row with the pack's small danger button (styles.css draws #clear-kept as bare text) */
.studio-tool .kept-head { margin: 28px 0 14px; }
.studio-tool #clear-kept {
  font-family: var(--font-label); font-size: var(--label-size); font-weight: var(--label-weight-strong);
  letter-spacing: calc(var(--label-tracking) * .6); text-transform: uppercase; line-height: 1.2;
  padding: 8px 14px; margin: 0; min-height: 44px; color: var(--alert); background: transparent; border: 1px solid var(--alert); border-radius: var(--radius);
}
.studio-tool #clear-kept:hover { color: var(--heading); border-color: var(--heading); }

/* kept rows (built by the script) in the pack's results list */
.studio-tool .jsw-results .kept-item {
  grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 12px; margin: 0; padding: 10px 2px;
  background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: .95rem;
}
.studio-tool .kept-item .kt { color: var(--text); }
.studio-tool .k-btn {
  width: auto; min-width: 44px; height: auto; min-height: 44px; padding: 0 10px; font-size: 1.05rem;
  background: transparent; color: var(--text-muted); border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.studio-tool .k-btn:hover { color: var(--accent); border-color: var(--accent); }
.studio-tool .k-btn.x:hover { color: var(--alert); border-color: var(--alert); }
.studio-tool .k-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.studio-tool .jsw-results .empty-note {
  margin: 0; padding: 22px 0; border: 0; border-radius: 0; text-align: center; color: var(--text-dim); font-size: .95rem;
}

/* the privacy note under the list */
.studio-tool .note { margin: 18px 0 0; max-width: 68ch; font-size: .9rem; line-height: 1.55; color: var(--text-muted); }
