:root {
  --bg: #f4f6f9; --card: #fff; --text: #172033; --muted: #5d6779; --line: #dfe3ea;
  --brand: #0b5cab; --brand-ink: #fff; --ok: #1d7a46; --warn-bg: #fff4d6; --warn: #7a5300;
  --err: #b42318; --rec: #d92d20; --chip: #eef3fa;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f141c; --card: #182130; --text: #e8edf5; --muted: #9aa6b8; --line: #2a3546;
          --brand: #4d9bf0; --brand-ink: #071425; --chip: #223047; --warn-bg: #3a2f10; --warn: #f3d27a; --err: #ff8a80; --ok: #5ed492; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
main { max-width: 520px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
.hidden { display: none !important; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 12px; }
.brand { font-weight: 700; font-size: 20px; } .brand span { color: var(--brand); }
.banner { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-bottom: 12px; }
.card { background: var(--card); border-radius: 16px; padding: 18px; box-shadow: 0 1px 3px rgb(0 0 0 / .08); margin-bottom: 16px; }
h1, h2 { margin: 0 0 12px; font-size: 22px; } h3 { font-size: 15px; color: var(--muted); margin: 18px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
input, textarea, select { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px; margin-top: 4px; }
textarea { resize: vertical; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 12px; padding: 13px 18px; min-height: 48px; }
.primary { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.secondary { background: var(--chip); color: var(--text); }
.link { background: none; color: var(--brand); padding: 6px; min-height: 0; }
button:disabled { opacity: .55; }
form > button, form > label { margin-top: 12px; width: 100%; }
.hello { text-align: center; color: var(--muted); margin: 8px 0 0; }
.mic { display: block; margin: 28px auto 14px; width: 168px; height: 168px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 10px 30px rgb(11 92 171 / .35); transition: transform .15s, background .2s; -webkit-tap-highlight-color: transparent; }
.mic svg { width: 76px; height: 76px; fill: var(--brand-ink); }
.mic:active { transform: scale(.96); }
.mic.recording { background: var(--rec); animation: pulse 1.3s infinite; }
.mic.busy { opacity: .6; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(217 45 32 / .5); } 70% { box-shadow: 0 0 0 26px rgb(217 45 32 / 0); } 100% { box-shadow: 0 0 0 0 rgb(217 45 32 / 0); } }
.hint { text-align: center; color: var(--muted); font-size: 15px; margin: 0 0 18px; min-height: 3em; }
.field { margin-bottom: 12px; }
.row { display: flex; gap: 12px; } .row .field { flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.chip { background: var(--chip); color: var(--text); border-radius: 999px; padding: 9px 14px; min-height: 40px; font-size: 15px; }
.chosen { display: flex; justify-content: space-between; align-items: center; background: var(--chip); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.notice { margin: 0; font-size: 15px; color: var(--warn); }
.warning { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-bottom: 10px; }
.error { color: var(--err); font-size: 15px; min-height: 1em; margin: 8px 0 0; }
.actions { display: flex; gap: 10px; margin-top: 8px; } .actions button { flex: 1; }
.done { text-align: center; }
.check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 36px; line-height: 64px; margin: 4px auto 10px; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; text-align: left; margin: 12px 0 18px; }
dt { color: var(--muted); } dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
#recent { list-style: none; padding: 0; margin: 0; }
#recent li { background: var(--card); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; font-size: 15px; }
#recent .meta { color: var(--muted); font-size: 13px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--chip); margin-left: 6px; }
.badge.failed { background: var(--err); color: #fff; }

.muted { color: var(--muted); font-size: 13px; }
.heard { color: var(--muted); font-size: 14px; font-style: italic; margin: -6px 0 12px; overflow-wrap: anywhere; }
