:root {
  --bg: #f6f5f2; --panel: #ffffff; --ink: #1d1d1f; --muted: #6b6b70; --line: #e3e1dc;
  --accent: #2f6f5e; --accent-ink: #fff; --bot: #eef4f1; --callee: #f1eff9;
  --ok: #2f7d4f; --warn: #b7791f; --bad: #b83232; --stop: #c62828;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #151618; --panel: #1e1f22; --ink: #ececee; --muted: #9a9aa2; --line: #2e2f33;
    --accent: #5fb39b; --accent-ink: #0d1512; --bot: #1f2a26; --callee: #26233a; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45; }
main { max-width: 760px; margin: 0 auto; padding: 20px 16px 80px; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
header h1 { font-size: 19px; margin: 0; letter-spacing: -0.01em; }
header nav a, header nav button { color: var(--muted); margin-left: 14px; font-size: 14px; text-decoration: none;
  background: none; border: 0; cursor: pointer; padding: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); font: inherit; }
textarea { min-height: 70px; resize: vertical; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
button.primary, button.stop, button.ghost { font: inherit; border: 0; border-radius: 8px; padding: 10px 16px; cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
button.stop { background: var(--stop); color: #fff; font-weight: 700; padding: 12px 22px; }
button:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: 10px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.hidden { display: none !important; }
.err { color: var(--bad); margin-top: 8px; white-space: pre-wrap; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; border: 1px solid var(--line); }
.chip.speaking { color: var(--accent); border-color: var(--accent); }
.chip.listening { color: var(--warn); border-color: var(--warn); }
.chip.thinking { color: var(--muted); }
.chip.success { color: var(--ok); border-color: var(--ok); }
.chip.partial { color: var(--warn); border-color: var(--warn); }
.chip.failed, .chip.stopped { color: var(--bad); border-color: var(--bad); }
.transcript { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.bubble { padding: 8px 12px; border-radius: 10px; max-width: 85%; }
.bubble.bot { background: var(--bot); align-self: flex-start; }
.bubble.callee { background: var(--callee); align-self: flex-end; }
.bubble small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
.muted { color: var(--muted); }
.meter { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.meter > div { height: 100%; width: 0; background: var(--warn); transition: width .08s; }
.plan-line { font-size: 16px; font-style: italic; }
.list a { color: inherit; text-decoration: none; display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
