:root {
  --bg: #f7f7f5; --card: #fff; --fg: #1f2328; --muted: #6b7280; --line: #e5e7eb;
  --accent: #2563eb; --rec: #dc2626; --ok: #059669; --warn: #b45309;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111315; --card: #1b1e21; --fg: #e6e6e6; --muted: #9aa0a6; --line: #2c3035; --accent: #60a5fa; --rec: #f87171; --ok: #34d399; --warn: #fbbf24; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--fg); text-decoration: none; }
nav { display: flex; gap: 14px; }
nav a { color: var(--muted); text-decoration: none; }
nav a.on { color: var(--fg); font-weight: 600; }
.badge { margin-inline-start: auto; font-size: 13px; color: var(--warn); }
main { max-width: 860px; margin: 0 auto; padding: 16px; padding-bottom: 80px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
h1 { font-size: 22px; margin: 4px 0 12px; } h2 { font-size: 17px; margin: 0 0 10px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; }
textarea { min-height: 80px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; } .row > * { flex: 1 1 140px; }
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 8px; padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-block; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--rec); }
button:disabled { opacity: .5; cursor: default; }
.check { display: flex; align-items: center; gap: 8px; color: var(--fg); font-size: 15px; } .check input { width: auto; }
.recbtn { display: block; margin: 22px auto 8px; width: 132px; height: 132px; border-radius: 50%; border: 0; background: var(--rec); color: #fff; font-size: 20px; font-weight: 700; box-shadow: 0 6px 24px #dc262644; }
.recbtn.stop { background: var(--fg); color: var(--bg); }
.timer { text-align: center; font: 600 34px/1 ui-monospace, Menlo, monospace; margin: 10px 0; direction: ltr; }
.meter { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 8px 0 14px; }
.meter > i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .08s; }
.center { text-align: center; } .muted { color: var(--muted); font-size: 14px; }
.note { background: color-mix(in srgb, var(--warn) 12%, transparent); border-radius: 8px; padding: 8px 12px; font-size: 14px; margin: 10px 0; }
.err { color: var(--rec); }
ul.list { list-style: none; margin: 0; padding: 0; }
ul.list li { border-bottom: 1px solid var(--line); padding: 10px 2px; }
ul.list li:last-child { border-bottom: 0; }
ul.list a { color: var(--fg); text-decoration: none; font-weight: 600; }
.status { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--line); margin-inline-start: 6px; }
.status.done { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.status.error { background: color-mix(in srgb, var(--rec) 18%, transparent); }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; } .progress > i { display: block; height: 100%; background: var(--accent); }
.seg { display: grid; grid-template-columns: 62px 1fr; gap: 2px 10px; padding: 6px 4px; border-radius: 6px; cursor: pointer; }
.seg:hover { background: var(--bg); }
.seg.now { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.seg .t { color: var(--muted); font: 12px ui-monospace, Menlo, monospace; direction: ltr; padding-top: 4px; }
.seg .who { font-weight: 600; font-size: 14px; }
.seg .txt { grid-column: 2; }
.spk-0 { color: #2563eb } .spk-1 { color: #db2777 } .spk-2 { color: #059669 } .spk-3 { color: #d97706 } .spk-4 { color: #7c3aed } .spk-5 { color: #0891b2 }
.md ul { padding-inline-start: 20px; margin: 6px 0; }
audio { width: 100%; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hit { padding: 8px 0; border-bottom: 1px solid var(--line); } .hit a { color: var(--accent); text-decoration: none; font-size: 14px; }
mark { background: color-mix(in srgb, var(--warn) 35%, transparent); color: inherit; }
