:root {
  --bg: #f7f7f5;
  --panel: #ffffff;
  --text: #1c1c1a;
  --muted: #6b6b66;
  --line: #e4e4df;
  --accent: #2456d6;
  --ok: #1f9d55;
  --warn: #c98a00;
  --bad: #d23c3c;
  --interim: #8a8a84;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --panel: #1b1b1a;
    --text: #ececea;
    --muted: #9a9a94;
    --line: #2d2d2a;
    --accent: #7ea2ff;
    --interim: #77776f;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
}
header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-wrap: wrap;
}
header h1 { font-size: 17px; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
header .spacer { flex: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--line); background: var(--bg); white-space: nowrap;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.pill.ok .dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.pill.warn .dot { background: var(--warn); animation: blink 1s infinite; }
.pill.bad .dot { background: var(--bad); }
@keyframes blink { 50% { opacity: .3; } }
button {
  font: inherit; font-size: 14px; padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer;
}
button:hover { border-color: var(--muted); }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.big { font-size: 20px; padding: 18px 40px; border-radius: 14px; }
.error-bar {
  display: none; padding: 10px 16px; background: color-mix(in srgb, var(--bad) 15%, var(--panel));
  color: var(--bad); font-size: 14px; border-bottom: 1px solid var(--line);
}
.error-bar.show { display: block; }
main { flex: 1; overflow-y: auto; position: relative; }
#transcript { max-width: 860px; margin: 0 auto; padding: 24px 16px 120px; }
.para { margin: 0 0 18px; font-size: 20px; line-height: 1.55; }
.para time { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.para .interim { color: var(--interim); }
.empty { color: var(--muted); text-align: center; margin-top: 18vh; font-size: 17px; }
#jump {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: none; box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
#jump.show { display: block; }
label.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.meter { width: 90px; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.meter > div { height: 100%; width: 0; background: var(--ok); transition: width 80ms linear; }
.center { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 16vh; text-align: center; padding: 0 16px; }
.center p { color: var(--muted); max-width: 420px; margin: 0; }
@media (max-width: 600px) {
  .para { font-size: 18px; }
  header h1 { font-size: 15px; }
}
