:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#f8fbff;background:#08080c;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;--panel: rgba(14, 18, 31, .74);--panel-strong: rgba(12, 16, 28, .92);--panel-solid: #101522;--line: rgba(255, 255, 255, .12);--line-strong: rgba(128, 217, 255, .38);--muted: #a9b4c5;--brand: #40b4ff;--brand-2: #9b6bfa;--accent: #67e8b9;--danger: #ff7a9a}*{box-sizing:border-box}html,body,#app{width:100%;height:100%;min-height:0;overflow:hidden}body{margin:0;min-width:320px;min-height:100vh;background:radial-gradient(circle at 12% 18%,rgba(64,180,255,.18),transparent 32%),radial-gradient(circle at 88% 0%,rgba(155,107,250,.18),transparent 28%),radial-gradient(circle at 72% 92%,rgba(103,232,185,.12),transparent 30%),linear-gradient(135deg,#08080c,#111827 52%,#090b12);overflow:hidden}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled,textarea:disabled,input:disabled{cursor:not-allowed}.chat-page{height:100vh;height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}.topbar{flex:0 0 auto;height:70px;padding:0 clamp(16px,6vw,96px);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#0a0c14e6;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.brand{flex:0 0 auto;display:inline-flex;align-items:center;gap:10px;color:#40b4ff;line-height:1;text-decoration:none;white-space:nowrap}.brand img{width:50px;height:50px;border-radius:8px;object-fit:contain}.brand span{background:linear-gradient(45deg,#f2b5db,#9b6bfa,#3b52ec 50%,#4ccaf6 80%,#abf3ff);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;font-weight:700;font-size:22px;display:inline-block}.ghost-btn{border:1px solid rgba(64,180,255,.35);border-radius:999px;padding:10px 18px;color:#dff3ff;background:#40b4ff1a;transition:transform .2s ease,border-color .2s ease,background .2s ease}.ghost-btn:hover:not(:disabled){transform:translateY(-1px);border-color:#40b4ffcc;background:#40b4ff29}.ghost-btn.compact{padding:9px 14px;font-size:13px}.ghost-btn:disabled{opacity:.5}.chat-layout{width:min(1400px,calc(100% - 32px));height:calc(100vh - 70px);height:calc(100dvh - 70px);min-height:0;margin:0 auto;padding:18px 0;flex:1;display:grid;grid-template-columns:300px minmax(0,1fr);gap:18px}.chat-sidebar,.chat-main,.message-panel,.composer,.quote-preview{border:1px solid var(--line);background:var(--panel);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);box-shadow:0 24px 80px #0000002e}.chat-sidebar{min-height:0;overflow:hidden;display:grid;grid-template-rows:minmax(0,.9fr) minmax(0,1.2fr);gap:14px;padding:16px;border-radius:24px}.sidebar-section{min-height:0;display:flex;flex-direction:column;gap:10px}.sidebar-section-header{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:38px}.sidebar-section-header h2{margin:0;color:#e9f6ff;font-size:14px;font-weight:800}.section-count{display:block;margin-top:3px;color:#8291a6;font-size:12px;line-height:1.2}.mini-icon-btn,.session-edit-btn,.assistant-icon-btn,.assistant-tool-btn,.quote-preview-header button{border:1px solid rgba(255,255,255,.12);color:#dff3ff;background:#ffffff14;transition:background .2s ease,border-color .2s ease,transform .2s ease}.mini-icon-btn{width:30px;height:30px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#07131f;font-size:20px;font-weight:900;background:linear-gradient(135deg,#abf3ff,#40b4ff 56%,#67e8b9)}.mini-icon-btn:hover:not(:disabled),.session-edit-btn:hover:not(:disabled),.assistant-icon-btn:hover,.assistant-tool-btn:hover,.quote-preview-header button:hover{transform:translateY(-1px);border-color:var(--line-strong);background:#40b4ff29}.project-list,.session-list{min-height:0;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:8px;padding-right:2px;scrollbar-width:none;-ms-overflow-style:none}.project-list::-webkit-scrollbar,.session-list::-webkit-scrollbar,.message-panel::-webkit-scrollbar{width:0;height:0}.project-list::-webkit-scrollbar-thumb,.session-list::-webkit-scrollbar-thumb,.message-panel::-webkit-scrollbar-thumb{background:transparent}.project-item,.session-item{position:relative;min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px;border:1px solid rgba(255,255,255,.08);border-radius:12px;color:#dcecff;background:#ffffff0e;outline:none;overflow:hidden;cursor:pointer}.project-item:hover,.session-item:hover,.project-item:focus-visible,.session-item:focus-visible{border-color:#80d9ff66;background:#40b4ff1f}.project-item.active,.session-item.active{border-color:#40b4ffa8;color:#fff;background:linear-gradient(90deg,rgba(64,180,255,.34),transparent 5px),linear-gradient(135deg,#40b4ff33,#67e8b91a)}.item-copy{min-width:0;display:flex;flex:1 1 auto;flex-direction:column;gap:5px}.item-title,.session-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:750;line-height:1.2}.item-meta{min-width:0;overflow:hidden;color:#8291a6;font-size:12px;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.item-state{flex:0 0 auto;border:1px solid rgba(103,232,185,.28);border-radius:999px;padding:3px 7px;color:#b7f7df;background:#67e8b91a;font-size:12px;font-weight:800;line-height:1}.session-edit-btn{width:28px;height:28px;flex:0 0 auto;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;font-size:13px}.session-edit-input{width:100%;min-width:0;border:1px solid rgba(128,217,255,.42);border-radius:10px;outline:none;padding:8px 10px;color:#fff;background:#060c16c7}.sidebar-empty{margin:8px 2px 0;padding:14px 12px;border:1px dashed rgba(255,255,255,.1);border-radius:12px;color:#7f8da3;font-size:13px;text-align:center;background:#ffffff09}.chat-main{min-width:0;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto auto;gap:14px;padding:16px;border-radius:24px}.chat-header{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:2px 2px 10px;border-bottom:1px solid rgba(255,255,255,.08)}.chat-kicker{margin:0 0 6px;color:var(--accent);font-size:12px;font-weight:800}.chat-header h1{margin:0;font-size:22px;line-height:1.2}.messages-wrap{position:relative;min-height:0;overflow:hidden}.message-panel{height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;padding:22px;border-radius:20px;scrollbar-width:none;-ms-overflow-style:none}.message-list{min-height:100%}.empty-chat{min-height:100%;display:grid;place-items:center;color:#8ea0b7;text-align:center}.message-row{display:grid;grid-template-columns:46px minmax(0,1fr);gap:12px;align-items:flex-start;margin-bottom:18px}.message-row.is-user{grid-template-columns:minmax(0,1fr) 46px}.message-row.is-user .avatar{grid-column:2;grid-row:1;background:linear-gradient(135deg,#40b4ff,#67e8b9)}.message-row.is-user .bubble{grid-column:1;justify-self:end;background:linear-gradient(135deg,#40b4ff33,#67e8b91f)}.avatar{width:46px;height:46px;min-width:46px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center}.user-avatar{color:#fff;font-size:14px;font-weight:700}.ai-avatar-wrap{background:transparent}.ai-avatar{width:100%;height:100%;display:block;object-fit:cover;border-radius:50%}.bubble{width:fit-content;max-width:min(820px,100%);padding:14px 16px;border:1px solid rgba(255,255,255,.1);border-radius:18px;color:#eef6ff;background:#ffffff14;box-shadow:0 12px 36px #00000024}.plain-message{margin:0;white-space:pre-wrap;word-break:break-word;line-height:1.8}.message-quote-inline{margin-bottom:10px;padding:9px 10px;border-left:3px solid rgba(103,232,185,.85);border-radius:10px;background:#67e8b91a}.message-quote-inline span{display:block;margin-bottom:4px;color:#b7f7df;font-size:12px;font-weight:800}.message-quote-inline p{margin:0;color:#cad8e8;font-size:13px;line-height:1.55}.assistant-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-2px 0 12px;padding-bottom:10px;border-bottom:1px solid rgba(255,255,255,.08)}.assistant-toolbar-left,.assistant-toolbar-right{display:inline-flex;align-items:center;gap:8px}.assistant-tool-btn{min-height:30px;border-radius:10px;padding:5px 10px;font-size:13px}.streaming-label{color:#b7f7df;font-size:12px;font-weight:800}.assistant-icon-btn{min-width:32px;height:32px;border-radius:10px;padding:0 8px;display:inline-flex;align-items:center;justify-content:center;font-weight:800}.message-collapse-placeholder{width:100%;border:1px dashed rgba(128,217,255,.34);border-radius:12px;padding:12px;color:#bcd0e5;background:#060c1673;text-align:left}.message-error{margin:10px 0 0;color:var(--danger);font-size:13px;line-height:1.6}.typing-cursor{display:inline-block;margin-left:2px;color:var(--brand);font-weight:800;animation:cursor-blink 1s steps(2,start) infinite}@keyframes cursor-blink{0%,45%{opacity:1}46%,to{opacity:0}}.markdown-body{color:#eef6ff;line-height:1.8;min-width:0;overflow-wrap:anywhere}.markdown-body h1,.markdown-body h2,.markdown-body h3{margin:.9em 0 .45em;color:#fff;font-weight:800;line-height:1.25}.markdown-body h1:first-child,.markdown-body h2:first-child,.markdown-body h3:first-child,.markdown-body p:first-child{margin-top:0}.markdown-body h1{font-size:24px}.markdown-body h2{font-size:20px}.markdown-body h3{font-size:17px}.markdown-body p{margin:0 0 .75em;white-space:normal}.markdown-body p:last-child{margin-bottom:0}.markdown-body ul,.markdown-body ol{margin:.3em 0 .85em;padding-left:1.35em}.markdown-body li{margin:.18em 0;padding-left:.2em}.markdown-body li::marker{color:#80d9ff}.markdown-body li>p{margin:.2em 0}.markdown-body pre{max-width:100%;margin:.85em 0;padding:14px 16px;overflow-x:auto;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:#080c14;scrollbar-width:none;-ms-overflow-style:none}.markdown-body pre::-webkit-scrollbar{width:0;height:0}.markdown-body code{padding:2px 6px;border-radius:6px;color:#dff3ff;background:#ffffff1f;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:.92em}.markdown-body pre code{display:block;padding:0;color:inherit;background:transparent;white-space:pre}.markdown-body blockquote{margin:.85em 0;padding:.2em 0 .2em 1em;border-left:3px solid rgba(64,180,255,.8);color:#c7d7ea}.markdown-body table{width:100%;margin:.85em 0;border-collapse:collapse;display:block;overflow-x:auto}.markdown-body th,.markdown-body td{padding:8px 10px;border:1px solid rgba(255,255,255,.14);text-align:left}.markdown-body th{color:#fff;background:#40b4ff24}.markdown-body a{color:#80d9ff;text-decoration:none}.markdown-body a:hover{text-decoration:underline}.scroll-bottom-btn{position:absolute;right:18px;bottom:18px;width:42px;height:42px;border:1px solid rgba(128,217,255,.55);border-radius:50%;color:#07131f;font-size:22px;font-weight:900;background:linear-gradient(135deg,#abf3ff,#40b4ff 56%,#67e8b9);box-shadow:0 12px 30px #00000052}.quote-preview{border-radius:18px;padding:12px 14px;background:#080d18e0}.quote-preview-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;color:#b7f7df;font-size:13px;font-weight:800}.quote-preview-header button{width:28px;height:28px;border-radius:9px}.quote-preview-content{margin:0;color:#cbd7e6;font-size:13px;line-height:1.6}.composer{align-items:end;display:grid;grid-template-columns:minmax(0,1fr) 96px;gap:12px;padding:14px;border-radius:20px;background:#0a0d18db}.composer textarea{width:100%;min-height:48px;max-height:120px;resize:none;overflow-y:auto;border:0;outline:0;padding:14px 16px;border-radius:16px;color:#fff;background:#ffffff14;line-height:1.5;scrollbar-width:none;-ms-overflow-style:none}.composer textarea::-webkit-scrollbar{width:0;height:0}.composer textarea::placeholder{color:#7f8da3}.composer button{min-height:48px;max-height:120px;border:0;border-radius:16px;color:#06131f;font-weight:800;background:linear-gradient(135deg,#abf3ff,#40b4ff 50%,#67e8b9)}.composer button:disabled{filter:grayscale(.55);opacity:.55}.composer .stop-btn{color:#fff;background:linear-gradient(135deg,#ff7a9a,#9b6bfa)}.error-message,.safe-tip{margin:0;text-align:center;font-size:13px}.error-message{color:var(--danger)}.safe-tip{color:#7f8da3}@media(max-width:900px){.topbar{padding:0 16px}.brand img{width:44px;height:44px}.chat-layout{width:calc(100% - 20px);height:calc(100vh - 70px);height:calc(100dvh - 70px);min-height:0;grid-template-columns:1fr;grid-template-rows:minmax(112px,24vh) minmax(0,1fr);padding:12px 0;gap:12px}.chat-sidebar{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);grid-template-rows:minmax(0,1fr);max-height:none;overflow:hidden;padding:12px;border-radius:20px}.project-list,.session-list{max-height:none}.chat-main{min-height:0;padding:12px;border-radius:20px}.chat-header{align-items:flex-start}.chat-header h1{font-size:19px}.message-panel{height:100%;min-height:0;padding:16px;border-radius:18px}.message-row,.message-row.is-user{grid-template-columns:38px minmax(0,1fr)}.message-row.is-user .avatar{grid-column:1}.message-row.is-user .bubble{grid-column:2;justify-self:stretch}.avatar{width:38px;height:38px;min-width:38px}.bubble{width:100%;max-width:100%}.assistant-toolbar{align-items:flex-start}.composer{grid-template-columns:minmax(0,1fr) 88px;gap:8px;padding:10px}.composer button{height:46px;white-space:nowrap}}@media(max-width:520px){.topbar .ghost-btn{padding:8px 12px;font-size:13px}.brand span{font-size:19px}.chat-sidebar{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);grid-template-rows:minmax(0,1fr)}.item-state{display:none}.chat-header{flex-direction:column;gap:10px}.chat-header .ghost-btn{width:100%}.assistant-toolbar{flex-direction:column;gap:10px}.assistant-toolbar-left,.assistant-toolbar-right{width:100%;justify-content:space-between}}
