:root { color-scheme: light dark; --bg:#0f172a; --card:#1e293b; --text:#e2e8f0; --muted:#94a3b8; --accent:#38bdf8; --red:#ef4444; --line:#334155; }
@media (prefers-color-scheme: light) {
  :root { --bg:#f1f5f9; --card:#ffffff; --text:#0f172a; --muted:#64748b; --accent:#0369a1; --line:#cbd5e1; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; background:var(--bg); color:var(--text); font:16px/1.45 -apple-system, system-ui, "PingFang SC", sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom)); }
h1 { font-size: 1.4rem; margin: 8px 0 14px; }
h2 { font-size: 1rem; margin: 16px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.muted { color: var(--muted); font-size: .85rem; }
.field { display:block; margin: 10px 0; font-size:.85rem; color: var(--muted); }
input, select, textarea { width:100%; margin-top:4px; padding:10px; font-size:16px; border-radius:10px; border:1px solid var(--line); background: var(--bg); color: var(--text); }
textarea { font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
button, .linkbtn, .filebtn { font-size:16px; padding:11px 14px; border-radius:10px; border:1px solid var(--line); background: var(--bg); color: var(--text); cursor:pointer; text-decoration:none; display:inline-block; }
button.primary { background: var(--accent); color:#00121c; border-color: var(--accent); font-weight:600; }
button:disabled { opacity:.45; }
.row { display:flex; gap:10px; margin-top:12px; }
.row.wrap { flex-wrap: wrap; }
.row > * { flex: 1 1 auto; text-align:center; }
.recwrap { display:flex; align-items:center; gap:16px; margin-top:12px; }
.rec { width:76px; height:76px; border-radius:50%; border:4px solid var(--text); background: transparent; padding:0; flex:none; display:grid; place-items:center; }
.rec span { width:46px; height:46px; border-radius:50%; background: var(--red); display:block; transition: all .15s; }
.rec.on span { width:28px; height:28px; border-radius:6px; }
.timer { font-size: 2rem; font-variant-numeric: tabular-nums; font-weight:600; }
.meter { height:6px; background: var(--bg); border-radius:3px; margin-top:12px; overflow:hidden; }
.meter div { height:100%; width:0; background: var(--accent); transition: width .08s; }
.progress { height:8px; background: var(--bg); border-radius:4px; margin-top:12px; overflow:hidden; }
.progress div { height:100%; width:0; background: var(--accent); transition: width .3s; }
.banner { background:#7c2d12; color:#ffedd5; border-radius:10px; padding:10px 12px; margin-bottom:12px; font-size:.9rem; }
.banner.ok { background:#14532d; color:#dcfce7; }
.linkbtn { margin-top:8px; }
summary { cursor:pointer; font-weight:600; }
#cmpOut .res { margin-top:12px; border-top:1px solid var(--line); padding-top:10px; }
#cmpOut h3 { font-size:.95rem; margin:0 0 6px; }
#cmpOut pre { white-space:pre-wrap; word-break:break-word; font:14px/1.5 -apple-system, system-ui, "PingFang SC", sans-serif; margin:0 0 8px; max-height:220px; overflow:auto; background:var(--bg); padding:8px; border-radius:8px; }
#audioRow { margin-top:14px; }
