:root{color-scheme:dark;--bg:#0b1220;--panel:#111c2e;--line:#2b3b54;--text:#edf4ff;--muted:#a6b5ca;--accent:#6ee7b7;--mouth-fill:#5b1a2a}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font:16px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.vwrap{max-width:560px;margin:0 auto;padding:max(12px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom));min-height:100dvh;display:flex;flex-direction:column;gap:12px}
.vhead{display:flex;align-items:center;justify-content:space-between}.vhead h1{font-size:20px;margin:0;font-weight:600}
.net{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted)}.net i{width:9px;height:9px;border-radius:50%;background:var(--accent)}.net[data-state=offline] i{background:#f59e0b}
.ai-line{margin:0;font-size:13px;color:var(--muted)}
.stage{display:flex;flex-direction:column;align-items:center;gap:6px}.avatar-box{width:min(62vw,260px);aspect-ratio:1}.avatar{width:100%;height:100%;display:block}
.a-head{fill:#1c2d4a;stroke:#3b5379;stroke-width:2}.a-cheek{fill:#2a4468;opacity:.7}.a-eye{fill:#eaf3ff}.a-brow{stroke:#9fb6d8;stroke-width:3;stroke-linecap:round}.a-mouth{stroke:#eaf3ff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;transition:d .08s linear}
.a-badge rect{fill:var(--accent)}.a-badge text{fill:#06251b;font:600 12px system-ui,sans-serif}
.state{margin:0;min-height:1.5em;color:var(--accent);font-size:14px}.hint{margin:0;color:var(--muted);font-size:13px;text-align:center}
.log{flex:1;min-height:90px;max-height:32vh;overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:10px;display:flex;flex-direction:column;gap:8px}
.msg{padding:8px 10px;border-radius:10px;max-width:92%;overflow-wrap:anywhere;white-space:pre-wrap;font-size:15px}.msg.user{align-self:flex-end;background:#1d3a5f}.msg.ai{align-self:flex-start;background:#162a45;border:1px solid var(--line)}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}#form input{flex:1;min-width:0;padding:12px;border-radius:10px;border:1px solid var(--line);background:#0e1a2c;color:var(--text);font-size:16px}
.btn,.mic,select{padding:12px 16px;border-radius:10px;border:1px solid var(--line);background:#16304f;color:var(--text);font-size:15px;cursor:pointer}.btn:hover,.mic:hover{background:#1d3d66}
.controls{justify-content:space-between}.mic{flex:1;min-width:160px}.mic[aria-pressed=true]{background:#14532d;border-color:var(--accent)}
.toggles{gap:16px;font-size:14px;color:var(--muted)}.toggles label{display:inline-flex;gap:6px;align-items:center}.note{margin:0;min-height:1.4em;font-size:13px;color:#fbbf24}
@media (prefers-reduced-motion:reduce){.a-mouth{transition:none}}
