:root{--f:system-ui,-apple-system,'Segoe UI',sans-serif;--m:ui-monospace,Consolas,monospace}*{box-sizing:border-box}[hidden]{display:none!important}
html,body{height:100%}body{margin:0;font:15px/1.55 var(--f);color:#1d2433;background:#fff}#app{display:grid;grid-template-columns:240px 1fr;height:100vh}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}button,textarea{font-family:var(--f);font-size:15px}button{cursor:pointer}
.side{background:#f6f7fa;border-right:1px solid #e5e8ef;padding:20px;display:flex;flex-direction:column;gap:14px}.brand{font-size:20px;color:#5b3fd6}.new{background:#5b3fd6;color:#fff;border:0;border-radius:10px;padding:10px;font-weight:600}.side-note{color:#667085;font-size:13px;margin:auto 0 0}
.chat{display:flex;flex-direction:column;min-width:0;height:100vh}.ch-head{padding:16px 24px;border-bottom:1px solid #e5e8ef}h1{margin:0;font-size:16px}
.log{flex:1;overflow:auto;padding:24px;display:flex;flex-direction:column;gap:18px}.hello{margin:auto;text-align:center}.hello h2{margin:0 0 4px;font-size:26px}.hello p{color:#667085;margin:0}
.m{max-width:min(720px,88%)}.m.user{align-self:flex-end;background:#5b3fd6;color:#fff;border-radius:16px 16px 4px 16px;padding:10px 16px}.m.user p{margin:0}.m.bot{align-self:flex-start}.m.bot p{margin:0 0 .7em}.m.bot ul,.m.bot ol{margin:0 0 .7em;padding-left:22px}.muted{color:#667085}
code{font-family:var(--m);background:#eef0f6;border-radius:5px;padding:1px 5px;font-size:.9em}.code{border:1px solid #e0e4ee;border-radius:10px;overflow:hidden;margin:0 0 .8em}.code code{background:none;padding:0}.ch{display:flex;justify-content:space-between;align-items:center;background:#f3f4f8;padding:4px 12px;font-size:12px;color:#667085}.copy{border:0;background:none;color:#5b3fd6;font-weight:600}pre{margin:0;padding:12px;overflow:auto;font-family:var(--m);font-size:13px;background:#fafbfd}
.tool{border:1px solid #e0e4ee;border-radius:10px;padding:8px 12px;margin-bottom:10px;background:#fafbfd;font-size:14px}.tool summary{cursor:pointer}.tool pre{background:none;padding:6px 0 0;color:#475467}.ok{color:#127a45;font-weight:700}.spin{display:inline-block;width:10px;height:10px;border:2px solid #c9c2f2;border-top-color:#5b3fd6;border-radius:50%;animation:s .8s linear infinite}@keyframes s{to{transform:rotate(360deg)}}
.dots i{display:inline-block;width:7px;height:7px;margin-right:4px;border-radius:50%;background:#9aa4b8;animation:b 1s infinite}.dots i:nth-child(2){animation-delay:.15s}.dots i:nth-child(3){animation-delay:.3s}@keyframes b{50%{transform:translateY(-4px)}}
.sug{display:flex;gap:8px;flex-wrap:wrap;padding:0 24px 8px}.chip{border:1px solid #d5d9e6;background:#fff;border-radius:99px;padding:7px 14px}.chip:hover{background:#f3f1ff}
.composer{display:flex;gap:10px;padding:14px 24px 20px;align-items:flex-end}textarea{flex:1;resize:none;border:1px solid #cfd5e3;border-radius:12px;padding:11px 14px;max-height:140px}.send{background:#5b3fd6;color:#fff;border:0;border-radius:12px;padding:11px 20px;font-weight:600}.send[data-stop=true]{background:#1d2433}
:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}@media(max-width:700px){#app{grid-template-columns:1fr}.side{display:none}}
@media(prefers-reduced-motion:reduce){.spin,.dots i{animation:none}}
