:root {
  --bg: #ffffff; --fg: #111827; --muted: #6b7280; --line: #e5e7eb; --soft: #f9fafb; --accent: #2563eb;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b0f17; --fg: #e5e7eb; --muted: #9ca3af; --line: #1f2937; --soft: #111827; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-size: 14px; }
main { max-width: 1120px; margin: 0 auto; padding: 32px 16px 48px; }
h1 { font-size: 32px; margin: 0 0 8px; letter-spacing: -0.02em; }
header p { color: var(--muted); margin: 0 0 6px; line-height: 1.6; }
a { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 12px; }
.chips button { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips button[aria-pressed="false"] { opacity: .4; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.panes { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .panes { grid-template-columns: 1fr; } }
.pane { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.out { background: var(--soft); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line); background: var(--bg); font-size: 12px; }
.bar label, .cap { text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--muted); font-size: 11px; }
.bar button { border: 0; background: transparent; color: var(--muted); border-radius: 6px; padding: 6px 10px; font: inherit; cursor: pointer; }
.bar button.on { background: var(--fg); color: var(--bg); }
#mic { border: 1px solid var(--line); }
#mic[aria-pressed="true"] { background: #ffe4e6; color: #be123c; border-color: #fda4af; }
textarea, #output { font: 13px/1.9 ui-monospace, SFMono-Regular, Menlo, monospace; min-height: 340px; padding: 16px; }
textarea { border: 0; resize: vertical; background: var(--bg); color: var(--fg); outline: none; flex: 1; }
#output { white-space: pre-wrap; overflow-wrap: anywhere; flex: 1; overflow: auto; }
mark { border-radius: 4px; padding: 0 2px; color: #111; }
mark sup { font: 600 9px Inter, system-ui, sans-serif; margin-left: 3px; opacity: .7; }
#restore { border-top: 1px solid var(--line); padding: 10px 16px; background: var(--bg); }
#restore-rows { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; font: 12px ui-monospace, monospace; }
#restore-rows span:nth-child(odd) { color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.foot .chips { margin: 12px 0 0; }
.muted { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
#track { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 8px; }
#progress { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.note { color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 24px; }
