:root{--bg:#14202b;--fg:#f3efe6;--ok:#6fd0a0;--warm:#f2b35a;--bad:#e5766c;--idle:#5a7184}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--fg);font:18px/1.5 system-ui,sans-serif}
#stage{display:grid;place-items:center;gap:12px;padding:24px 12px 8px;min-height:42vh}
#blob{width:min(46vw,260px);aspect-ratio:1;border-radius:50%;background:var(--idle);transition:background .8s,transform .8s;animation:breathe 4s ease-in-out infinite}
body[data-state=LISTENING] #blob{background:var(--ok)}
body[data-state=SPEAKING] #blob{background:var(--warm);transform:scale(1.08)}
body[data-state=PROCESSING] #blob{background:#8aa4ff}
body[data-state=ERROR] #blob{background:var(--bad)}
@keyframes breathe{50%{transform:scale(1.04)}}
@media (prefers-reduced-motion:reduce){#blob{animation:none;transition:none}}
#said{font-size:1.6rem;margin:0;text-align:center}
main{max-width:720px;margin:0 auto;padding:12px 16px 40px}
.row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:10px 0}
button,input[type=number],#text{font:inherit;padding:12px 16px;border-radius:10px;border:2px solid var(--idle);background:#1d2e3d;color:var(--fg)}
button{min-height:48px;cursor:pointer}
#text{flex:1;min-width:200px}
:focus-visible{outline:3px solid var(--warm);outline-offset:2px}
#resume{display:none}body[data-state=PAUSED] #resume{display:inline-block}
label{display:block;margin:10px 0}
#msg{min-height:1.5em;color:var(--warm)}
#meter{flex:1;height:14px;background:#1d2e3d;border-radius:7px;overflow:hidden}
#lvl{display:block;height:100%;width:0;background:var(--idle)}#lvl.on{background:var(--ok)}
pre{background:#0d151d;padding:10px;border-radius:8px;max-height:260px;overflow:auto;font-size:13px;white-space:pre-wrap}
