:root{--bg:#f7f7f5;--panel:#fff;--sidebar:#eef0ec;--text:#1d211d;--muted:#6b726a;--border:#dde1da;--accent:#2f6f4f;--accent-text:#fff;--user-bubble:#e3ede6;--code-bg:#f0f2ee;--danger:#b3261e;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root{--bg:#161916;--panel:#1d211d;--sidebar:#121512;--text:#e6e9e4;--muted:#949b92;--border:#2d332c;--accent:#5fb487;--accent-text:#0e1a13;--user-bubble:#24332a;--code-bg:#232822;--danger:#f2827a;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:15px;line-height:1.55}button,select,textarea{font:inherit;color:inherit}.muted{color:var(--muted)}.layout{height:100%;display:flex}.sidebar{background:var(--sidebar);border-right:1px solid var(--border);flex-direction:column;flex-shrink:0;gap:8px;width:270px;padding:16px;display:flex}.brand{margin-bottom:12px;font-size:17px;font-weight:700}.brand-mark{color:var(--accent)}.field-label{color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-size:12px}select{border:1px solid var(--border);background:var(--panel);border-radius:8px;padding:8px}.btn-new{border:1px solid var(--border);background:var(--panel);cursor:pointer;text-align:left;border-radius:8px;margin-top:8px;padding:9px 12px;font-weight:600}.btn-new:hover{border-color:var(--accent)}.history{flex-direction:column;flex:1;gap:2px;margin-top:12px;display:flex;overflow-y:auto}.history-item{cursor:pointer;border-radius:8px;align-items:center;gap:4px;padding:7px 10px;font-size:14px;display:flex}.history-item:hover,.history-item.active{background:var(--panel)}.history-title{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.history-del{cursor:pointer;color:var(--muted);opacity:0;background:0 0;border:0;padding:0 4px;font-size:16px;line-height:1}.history-item:hover .history-del{opacity:1}.main{flex-direction:column;flex:1;min-width:0;display:flex}.topbar{border-bottom:1px solid var(--border);background:var(--panel);align-items:center;gap:12px;padding:12px 20px;display:flex}.topbar-title{font-weight:600}.topbar-sub{color:var(--muted);font-size:13px}.menu{cursor:pointer;background:0 0;border:0;font-size:20px;display:none}.messages{flex:1;padding:24px 16px;overflow-y:auto}.thread{flex-direction:column;gap:20px;max-width:820px;margin:0 auto;display:flex}.banner{border:1px solid var(--danger);max-width:820px;color:var(--danger);border-radius:8px;margin:0 auto 16px;padding:10px 14px}.empty{text-align:center;max-width:680px;margin:12vh auto 0}.empty h1{margin:0 0 6px;font-size:28px}.suggestions{flex-wrap:wrap;justify-content:center;gap:8px;margin-top:24px;display:flex}.suggestions button{border:1px solid var(--border);background:var(--panel);cursor:pointer;border-radius:999px;padding:8px 14px}.suggestions button:hover{border-color:var(--accent)}.msg.user{align-self:flex-end;max-width:80%}.bubble{background:var(--user-bubble);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:16px 16px 4px;padding:10px 14px}.msg.assistant{align-self:stretch}.msg.error .md{color:var(--danger)}.md>:first-child{margin-top:0}.md>:last-child{margin-bottom:0}.md h1,.md h2,.md h3{margin:1.2em 0 .5em;line-height:1.3}.md h3{font-size:1.05em}.md hr{border:0;border-top:1px solid var(--border);margin:1.2em 0}.md code{background:var(--code-bg);border-radius:4px;padding:1px 5px;font-size:.9em}.md pre{background:var(--code-bg);border-radius:8px;padding:12px;overflow-x:auto}.md pre code{background:0 0;padding:0}.md table{border-collapse:collapse;max-width:100%;margin:.8em 0;font-size:14px;display:block;overflow-x:auto}.md th,.md td{border:1px solid var(--border);text-align:left;vertical-align:top;padding:6px 10px}.md th{background:var(--code-bg);font-weight:600}.md a{color:var(--accent)}.typing{gap:4px;padding:8px 0;display:flex}.typing span{background:var(--muted);border-radius:50%;width:7px;height:7px;animation:1.2s ease-in-out infinite blink}.typing span:nth-child(2){animation-delay:.2s}.typing span:nth-child(3){animation-delay:.4s}@keyframes blink{0%,80%,to{opacity:.25}40%{opacity:1}}.composer{align-items:flex-end;gap:8px;width:100%;max-width:820px;margin:0 auto;padding:12px 16px 20px;display:flex}.composer textarea{resize:none;field-sizing:content;border:1px solid var(--border);background:var(--panel);border-radius:12px;outline:none;flex:1;min-height:46px;max-height:200px;padding:12px 14px}.composer textarea:focus{border-color:var(--accent)}.send{background:var(--accent);height:46px;color:var(--accent-text);cursor:pointer;border:0;border-radius:12px;padding:0 18px;font-weight:600}.send:disabled{opacity:.45;cursor:default}.send.stop{background:var(--danger);color:#fff}.scrim{display:none}@media (width<=760px){.sidebar{z-index:20;transition:transform .2s;position:fixed;inset:0 auto 0 0;transform:translate(-100%)}.sidebar.open{transform:none}.scrim{z-index:10;background:#00000059;display:block;position:fixed;inset:0}.menu{display:block}.msg.user{max-width:92%}}
