:root {
  --bg: #faf7f2; --card: #ffffff; --text: #1f1a17; --muted: #6b625b; --line: #e7e0d7;
  --accent: #7c3aed; --accent-text: #ffffff; --ok: #15803d; --err: #b91c1c; --chip: #f3eee7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17141a; --card: #221e26; --text: #f2eef5; --muted: #a59cad; --line: #36303c;
    --accent: #a78bfa; --accent-text: #17141a; --ok: #4ade80; --err: #f87171; --chip: #2c2731;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 640px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 28px; line-height: 1.2; margin: 8px 0; }
h2 { font-size: 22px; margin: 0 0 12px; }
.lead, .muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin: 16px 0; }
label { display: block; margin: 0 0 16px; font-weight: 600; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 12px; font: inherit; font-weight: 400;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
textarea { resize: vertical; }
small { font-weight: 400; color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-weight: 600; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { margin: 0; font-weight: 400; background: var(--chip); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.chips input { display: none; }
.chips label:has(input:checked) { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button, .btn { display: inline-block; font: inherit; font-weight: 600; padding: 14px 22px; border-radius: 12px; border: 0;
  background: var(--accent); color: var(--accent-text); cursor: pointer; text-decoration: none; text-align: center; }
button.ghost, .btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button:disabled { opacity: .5; cursor: wait; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.err { color: var(--err); }
.ok { color: var(--ok); }
.lyrics { white-space: pre-wrap; font-family: inherit; margin: 0; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { padding: 8px 0; color: var(--muted); }
.steps li.done { color: var(--ok); }
.steps li.now { color: var(--text); font-weight: 600; }
.steps li.done::before { content: "✓ "; }
.steps li.now::before { content: "● "; }
.steps li:not(.done):not(.now)::before { content: "○ "; }
audio { width: 100%; margin: 8px 0; }
.track { padding: 12px 0; border-top: 1px solid var(--line); }
.track:first-child { border-top: 0; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.fine { font-size: 13px; color: var(--muted); margin-top: 12px; }
a { color: var(--accent); }
.doc h2 { font-size: 19px; margin: 24px 0 8px; }
.doc p, .doc li { margin: 6px 0; }
.doc ul { padding-left: 20px; }
