:root {
  --bg: #f6f6f3; --card: #ffffff; --fg: #1d1f23; --muted: #656b75; --line: #dcdcd6;
  --accent: #2f6fd0; --eot: #3a7bd5; --int: #e0742a; --speak: rgba(80, 160, 110, 0.25); --err: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #15171a; --card: #1e2125; --fg: #e8e8e4; --muted: #9aa0a8; --line: #33373d; --err: #ff8a80; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
main { max-width: 980px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 0 0 6px; }
.lede { color: var(--muted); margin: 0 0 18px; max-width: 760px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.radio { gap: 6px; }
select, button, input[type=file] { font: inherit; color: inherit; }
select, button { background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 6px 12px; }
button { cursor: pointer; }
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; padding: 8px 22px; font-weight: 600; }
button.small { padding: 2px 8px; font-size: 13px; }
.progress { flex: 1; min-width: 140px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
#bar { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.status { margin: 10px 0 0; color: var(--muted); }
.status.err, .err { color: var(--err); }
.note { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.speakers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.speaker { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
#stereo { margin: 12px 0; }
input[type=file] { max-width: 100%; font-size: 13px; }
details { margin: 8px 0; }
summary { cursor: pointer; color: var(--muted); }
.opts { display: flex; flex-direction: column; gap: 10px; padding: 10px 0 0; }
.actions { margin-top: 12px; }
.live { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 8px; }
.who { font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip { font-weight: 500; font-size: 13px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); transition: background 0.15s, color 0.15s; }
.chip.k-eot.on { background: var(--eot); border-color: var(--eot); color: #fff; }
.chip.k-int.on { background: var(--int); border-color: var(--int); color: #fff; }
.count { font-weight: 400; font-size: 13px; color: var(--muted); }
.k-eot { color: var(--eot); }
.k-int { color: var(--int); }
#timeline { width: 100%; height: 300px; display: block; border: 1px solid var(--line); border-radius: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); margin: 8px 0; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.sliders { margin: 8px 0; }
.sliders input[type=range] { width: 160px; }
.stats { display: grid; grid-template-columns: max-content 1fr max-content 1fr; gap: 6px 16px; margin: 10px 0 0; font-size: 13px; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.about { color: var(--muted); font-size: 14px; }
.about p { max-width: 800px; }
code { font-size: 13px; }
@media (max-width: 600px) {
  .speakers { grid-template-columns: 1fr; }
  #timeline { height: 240px; }
  .stats { grid-template-columns: max-content 1fr; }
}
