:root{--bg:#0b1020;--card:#141a2e;--text:#e6e9f2;--muted:#9aa3b8;--line:#2a3352;--accent:#f97316;--me:#1f2a52;--bot:#161d36}
*{box-sizing:border-box}[hidden]{display:none!important}
body{margin:0;background:radial-gradient(1200px 600px at 20% -10%,#1e2a5a 0,var(--bg) 60%);color:var(--text);font:15px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;min-height:100vh}
.chat{width:min(760px,100%);margin:0 auto;min-height:100vh;display:flex;flex-direction:column;padding:18px 16px}
.agent-head{display:flex;gap:14px;align-items:flex-start;border-bottom:1px solid var(--line);padding-bottom:14px}
.avatar{font-size:34px;width:56px;height:56px;border-radius:14px;background:var(--card);display:grid;place-items:center;flex:none}
h1{font-size:20px;margin:2px 0 4px}p{margin:0}.muted{color:var(--muted)}.small{font-size:12px}
.messages{flex:1;display:flex;flex-direction:column;gap:10px;padding:16px 0;overflow-y:auto}
.msg{max-width:85%;padding:10px 14px;border-radius:14px;white-space:pre-wrap;word-wrap:break-word;line-height:1.45}
.msg.user{align-self:flex-end;background:var(--me);border-bottom-right-radius:4px}
.msg.assistant{align-self:flex-start;background:var(--bot);border:1px solid var(--line);border-bottom-left-radius:4px}
.msg.tool{align-self:flex-start;font-size:12px;color:var(--muted);padding:2px 10px}
.msg.error{align-self:center;color:#fca5a5;font-size:13px}
.notice{color:#fde68a;font-size:13px;margin:6px 0}
.composer{display:flex;gap:8px;align-items:flex-end;border-top:1px solid var(--line);padding-top:12px}
textarea{flex:1;font:inherit;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:#0f1530;color:var(--text);resize:none;max-height:160px}
button{font:inherit;padding:10px 18px;border-radius:12px;border:1px solid var(--accent);background:var(--accent);color:#fff;font-weight:600;cursor:pointer}
button:disabled{opacity:.5;cursor:default}
footer{padding:10px 0 0}footer a{color:#fb923c}
.turnstile{margin:8px 0}
.typing::after{content:"▍";animation:blink 1s steps(1) infinite}@keyframes blink{50%{opacity:0}}
