:root{color-scheme:light dark;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:#111827;color:#f9fafb}*{box-sizing:border-box}html,body,#root{width:100%;height:100%;margin:0}button,input,textarea{font:inherit}button{border:0;cursor:pointer}.app{min-height:100%;display:grid;grid-template-columns:minmax(300px,360px) 1fr;background:linear-gradient(135deg,#111827,#263244);background-size:cover;background-position:center}.panel{min-height:100vh;background:#111827e0;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);border-right:1px solid rgba(255,255,255,.12);overflow-y:auto}.tabs{position:sticky;top:0;z-index:3;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:calc(env(safe-area-inset-top) + 12px) 12px 12px;background:#111827f2}.tabs button,.primary,.send,header button,.fileButton{min-height:42px;border-radius:8px;color:#f9fafb;background:#ffffff1f}.tabs button.active,.primary,.send{background:#2563eb}.panelBody{display:grid;gap:14px;padding:14px}label{display:grid;gap:7px;color:#d1d5db;font-size:13px}input,textarea{width:100%;border:1px solid rgba(255,255,255,.16);border-radius:8px;padding:11px 12px;color:#f9fafb;background:#00000038;outline:none}textarea{resize:vertical;line-height:1.45}details{border:1px solid rgba(255,255,255,.12);border-radius:8px;padding:10px;background:#00000029}summary{cursor:pointer;color:#bfdbfe}pre{white-space:pre-wrap;word-break:break-word;margin:10px 0 0;color:#e5e7eb}.fileButton{display:grid;place-items:center;padding:0 12px;text-align:center}.fileButton input{display:none}.switch{grid-template-columns:auto 1fr;align-items:center}.switch input{width:18px;height:18px}.memoryList{display:grid;gap:10px}.memoryItem{display:grid;gap:9px;padding:12px;border-radius:8px;background:#ffffff14}.memoryItem p{margin:0;line-height:1.45;word-break:break-word}.memoryItem button{justify-self:end;padding:8px 12px;border-radius:8px;color:#fecaca;background:#f871712e}.chat{min-width:0;min-height:100vh;display:grid;grid-template-rows:auto 1fr auto auto;background:#0f172a57}header{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:10px;padding:calc(env(safe-area-inset-top) + 10px) 14px 10px;background:#111827b8;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}header span{font-size:12px;color:#d1d5db;white-space:nowrap}.messages{min-height:0;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:14px}.empty,.typing,.error{align-self:center;max-width:80%;padding:10px 12px;border-radius:8px;background:#111827c2;color:#d1d5db;line-height:1.45}.error{margin:0 14px 8px;color:#fecaca;border:1px solid rgba(248,113,113,.3)}.bubbleRow{display:flex;gap:10px;align-items:flex-end}.bubbleRow.me{flex-direction:row-reverse}.avatar{width:34px;height:34px;flex:0 0 34px;border-radius:50%;display:grid;place-items:center;overflow:hidden;color:#111827;background:#e5e7eb;font-size:12px;font-weight:700}.avatar img{width:100%;height:100%;object-fit:cover}.bubble{max-width:min(78%,720px);padding:11px 13px;border-radius:8px;color:#111827;background:#f9fafbeb;box-shadow:0 10px 30px #0000001f}.me .bubble{color:#f9fafb;background:#2563ebf0}.bubble p{margin:0;white-space:pre-wrap;word-break:break-word;line-height:1.55}.thinking{margin-bottom:8px;border-color:#1118271f;background:#11182714}.thinking summary{color:inherit;font-size:12px;opacity:.75}.thinking pre{color:inherit;opacity:.84;font-size:12px}footer{display:grid;grid-template-columns:1fr 70px;gap:10px;padding:10px 14px calc(env(safe-area-inset-bottom) + 12px);background:#111827c7;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}footer textarea{max-height:120px;min-height:44px;background:#ffffff1c}.send:disabled{opacity:.55}@media(max-width:760px){.app{grid-template-columns:1fr}.panel{position:fixed;inset:0 auto 0 0;width:min(88vw,360px);transform:translate(-100%);transition:transform .22s ease;z-index:10}.panel.open{transform:translate(0)}.chat{min-height:100dvh}.messages{padding:12px 10px}.bubble{max-width:calc(100vw - 96px)}.empty{max-width:calc(100vw - 30px)}}
