*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{color:#1f2937;background:#fff;font-family:system-ui,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif}:root{--accent:#00bfff;--accent-hover:#00aae6;--page:#fff;--muted:#6b7280;--line:#e8e8e8;--chip:#f3f4f6;--danger:#a4232b;--danger-line:#f3c9c9}button{font:inherit}.app-shell{background:var(--page);flex-direction:column;height:100%;display:flex;position:relative;overflow:hidden}.app-topbar{border-bottom:1px solid var(--line);background:var(--page);z-index:70;justify-content:space-between;align-items:center;gap:12px;padding:12px 24px 12px 20px;display:flex;position:relative}.app-topbar-left{align-items:baseline;gap:12px;min-width:0;display:flex}.app-title{color:#111827;font-size:18px;font-weight:650}.app-subtitle{color:var(--muted);font-size:13px}.build-tag{background:var(--chip);color:#9ca3af;vertical-align:1px;border-radius:999px;margin-left:6px;padding:0 6px;font-size:11px;display:inline-block}.action-btn{background:var(--accent);color:#fff;font:inherit;cursor:pointer;white-space:nowrap;border:0;border-radius:999px;flex-shrink:0;padding:8px 16px;font-size:13px;font-weight:650}.action-btn:hover{background:var(--accent-hover)}.action-btn:disabled{opacity:.5;cursor:not-allowed}.ghost-btn{border:1px solid var(--line);color:#374151;font:inherit;cursor:pointer;white-space:nowrap;background:#fff;border-radius:999px;align-items:center;gap:4px;padding:4px 10px;font-size:12px;display:inline-flex}.ghost-btn:hover{color:#0369a1;background:#f3fbff;border-color:#b9d8ea}.ghost-btn.saved{color:#0369a1;background:#e6f7ff;border-color:#7dd3fc;font-weight:650}.ghost-btn.saved:hover{background:#d6f1ff}.icon-btn{color:#9ca3af;width:26px;height:26px;font:inherit;cursor:pointer;background:0 0;border:0;border-radius:50%;justify-content:center;align-items:center;padding:0;font-size:15px;line-height:1;display:inline-flex}.icon-btn:hover{background:var(--chip);color:#4b5563}.icon-btn.on{color:#f59e0b}.app-error{border-bottom:1px solid var(--danger-line);color:var(--danger);background:#fff4f4;align-items:flex-start;gap:12px;padding:10px 18px;font-size:13px;line-height:1.5;display:flex}.app-error span{word-break:break-word;flex:1;min-width:0}.app-error-close{border:1px solid var(--danger-line);color:var(--danger);font:inherit;cursor:pointer;background:#fff;border-radius:999px;flex-shrink:0;padding:3px 10px;font-size:12px}.app-error-close:hover{background:#ffecec}.app-body{flex:1;grid-template-columns:15% minmax(0,1fr) 330px;min-height:0;display:grid}.sidebar-collapsed .app-body{grid-template-columns:minmax(0,1fr) 330px}.cards-collapsed .app-body{grid-template-columns:15% minmax(0,1fr)}.cards-collapsed.sidebar-collapsed .app-body{grid-template-columns:minmax(0,1fr)}.panel{flex-direction:column;min-height:0;display:flex}.chat-panel{border-right:1px solid var(--line);border-left:1px solid var(--line);position:relative}.sidebar-collapsed .chat-panel{border-left:0}.cards-collapsed .chat-panel{border-right:0}.sidebar-panel{background:#fafafa;min-width:0}.sidebar-top{border-bottom:1px solid var(--line);flex-direction:column;flex-shrink:0;gap:8px;padding:12px 12px 10px;display:flex}.new-chat-btn{color:#111827;width:100%;font:inherit;cursor:pointer;white-space:nowrap;background:#fff;border:1px solid #dbe6ef;border-radius:999px;justify-content:center;align-items:center;gap:6px;padding:9px 10px;font-size:13px;font-weight:600;display:flex}.new-chat-btn:hover{border-color:var(--accent);color:#0369a1;background:#f2fbff}.new-chat-icon{font-size:14px;line-height:1}.sidebar-sub-btn{border:1px solid var(--line);color:#6b7280;width:100%;font:inherit;cursor:pointer;white-space:nowrap;background:#fff;border-radius:999px;justify-content:center;align-items:center;gap:5px;padding:5px 8px;font-size:11.5px;display:flex}.sidebar-sub-btn:hover{color:#b45309;background:#fffbeb;border-color:#fcd34d}.sidebar-sub-btn.on{color:#b45309;background:#fef3c7;border-color:#fcd34d;font-weight:650}.sidebar-sub-count{color:#fff;text-align:center;background:#f59e0b;border-radius:999px;min-width:16px;padding:0 4px;font-size:10px;line-height:15px}.sidebar-body{flex:1;min-height:0;padding:8px 8px 12px;overflow-y:auto}.conv-list{flex-direction:column;gap:10px;display:flex}.conv-group-title{color:#9ca3af;padding:2px 8px;font-size:11px}.conv-row{border-radius:9px;align-items:center;gap:2px;display:flex;position:relative}.conv-row:hover{background:#f0f2f5}.conv-row.active{background:#e6f2fd}.conv-title{color:#374151;min-width:0;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;flex:1;align-items:center;gap:4px;padding:7px 4px 7px 8px;font-size:12.5px;display:flex}.conv-row.active .conv-title{color:#0369a1;font-weight:600}.conv-title-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.conv-star{color:#f59e0b;flex-shrink:0;font-size:11px}.conv-more{color:#9ca3af;cursor:pointer;opacity:0;background:0 0;border:0;border-radius:6px;flex-shrink:0;width:24px;height:24px;margin-right:3px;padding:0;font-size:14px;line-height:1}.conv-row:hover .conv-more,.conv-row.active .conv-more{opacity:1}.conv-more:hover{color:#4b5563;background:#e5e7eb}.conv-menu{z-index:40;background:#fff;border:1px solid #e2e8f0;border-radius:10px;flex-direction:column;min-width:132px;padding:4px;display:flex;position:absolute;top:30px;right:4px;box-shadow:0 10px 26px #0f172a29}.conv-menu button{color:#374151;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:7px;padding:7px 10px;font-size:12.5px}.conv-menu button:hover{background:#f1f5f9}.conv-menu button.danger:hover{color:var(--danger);background:#fff1f1}.conv-rename{border:1px solid var(--accent);min-width:0;font:inherit;border-radius:8px;flex:1;margin:4px 6px;padding:5px 8px;font-size:12.5px}.conv-rename:focus{outline:none;box-shadow:0 0 0 3px #00bfff29}.conv-empty,.sidebar-notice{border:1px dashed var(--line);color:var(--muted);background:#fff;border-radius:10px;margin:6px 4px;padding:10px 12px;font-size:11.5px;line-height:1.7}.sidebar-foot{border-top:1px solid var(--line);flex-shrink:0;padding:10px 10px 12px}.sidebar-foot-row{gap:6px;display:flex}.sidebar-foot-btn{border:1px solid var(--line);color:#4b5563;min-width:0;font:inherit;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;background:#fff;border-radius:9px;flex:1;padding:6px 4px;font-size:11px;overflow:hidden}.sidebar-foot-btn:hover{border-color:var(--accent);color:#0369a1;background:#f2fbff}.app-cloud{color:#0369a1;background:#f0f9ff;border-bottom:1px solid #cfe8f7;align-items:center;gap:10px;padding:8px 18px;font-size:13px;line-height:1.5;display:flex}.app-cloud span{flex:1;min-width:0}.app-cloud-reload{color:#0369a1;font:inherit;cursor:pointer;background:#fff;border:1px solid #7dd3fc;border-radius:999px;flex-shrink:0;padding:3px 12px;font-size:12px}.app-cloud-reload:hover{background:#e6f7ff}.sync-body{flex-direction:column;gap:10px;padding:14px 16px;display:flex;overflow-y:auto}.sync-label{color:#374151;font-size:12.5px;font-weight:650}.sync-input{border:1px solid var(--line);font:inherit;border-radius:10px;padding:9px 12px;font-size:13px}.sync-input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px #00bfff24}.sync-actions{flex-wrap:wrap;gap:8px;display:flex}.sync-status{border:1px solid var(--line);color:#334155;background:#f8fafc;border-radius:9px;margin:0;padding:8px 12px;font-size:12.5px;line-height:1.7}.sync-meta{color:#9ca3af;margin:0;font-size:11.5px}.sync-tips{border:1px dashed var(--line);background:#fff;border-radius:10px;padding:10px 12px}.sync-tips p{color:#4b5563;margin:0 0 4px;font-size:12px;line-height:1.7}.sync-tips p:last-child{margin-bottom:0}.sync-warn{color:#b45309!important}.theme-dark .sync-label{color:#ced5de}.theme-dark .sync-input,.theme-dark .sync-status{color:#e6e8ec;background:#1a1e24;border-color:#333a45}.theme-dark .sync-tips{background:#1b1f25;border-color:#2f353f}.theme-dark .sync-tips p{color:#b6bfca}.theme-dark .app-cloud{color:#7fd8ff;background:#10222e;border-bottom-color:#1e3f52}.theme-dark .app-cloud-reload{color:#7fd8ff;background:#1a1e24;border-color:#2b4a5c}.topbar-icon-btn{border:1px solid var(--line);color:#4b5563;cursor:pointer;background:#fff;border-radius:8px;justify-content:center;align-items:center;width:30px;height:30px;padding:0;font-size:15px;line-height:1;display:inline-flex}.topbar-icon-btn:hover{border-color:var(--accent);color:#0369a1;background:#f2fbff}.theme-btn{border:1px solid var(--line);color:#4b5563;font:inherit;cursor:pointer;white-space:nowrap;background:#fff;border-radius:999px;flex-shrink:0;align-self:center;padding:4px 10px;font-size:12px;line-height:1.5}.theme-btn:hover{border-color:var(--accent);color:#0369a1;background:#f2fbff}.sidebar-foot-btn.on{border-color:var(--accent);color:#0369a1;font-weight:600}.dot-on{background:var(--accent);vertical-align:1px;border-radius:50%;width:6px;height:6px;margin-left:4px;display:inline-block}.prompt-dialog{border:1px solid var(--line);background:#fff;border-radius:16px;flex-direction:column;width:780px;max-width:94vw;max-height:86vh;animation:.16s ease-out tooltip-in;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 24px 60px #0f172a3d}.prompt-dialog-head{border-bottom:1px solid var(--line);flex-shrink:0;align-items:flex-start;gap:10px;padding:16px 16px 12px;display:flex}.prompt-dialog-icon{font-size:20px;line-height:1.2}.prompt-dialog-titles{flex:1;min-width:0}.prompt-dialog-title{color:#111827;font-size:15px;font-weight:650}.prompt-dialog-desc{color:var(--muted);margin-top:4px;font-size:12px;line-height:1.6}.prompt-dialog-body{flex:1;grid-template-columns:240px minmax(0,1fr);min-height:0;display:grid}.prompt-presets{border-right:1px solid var(--line);background:#fafafa;flex-direction:column;min-height:0;padding:12px;display:flex}.prompt-presets-head{color:#374151;justify-content:space-between;align-items:center;gap:6px;font-size:12px;font-weight:650;display:flex}.prompt-search{border:1px solid var(--line);font:inherit;border-radius:999px;margin:8px 0;padding:6px 10px;font-size:12px}.prompt-search:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px #00bfff24}.prompt-preset-list{flex-direction:column;flex:1;gap:4px;min-height:0;display:flex;overflow-y:auto}.prompt-preset{border:1px solid var(--line);background:#fff;border-radius:9px;align-items:center;gap:4px;display:flex}.prompt-preset:hover{border-color:var(--accent)}.prompt-preset-name{color:#374151;min-width:0;font:inherit;text-align:left;cursor:pointer;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:0;flex:1;padding:7px 9px;font-size:12px;overflow:hidden}.prompt-preset-tag{background:var(--chip);color:#9ca3af;border-radius:999px;margin-right:6px;padding:1px 6px;font-size:10px}.prompt-preset-del{color:#9ca3af;cursor:pointer;background:0 0;border:0;border-radius:50%;flex-shrink:0;width:22px;height:22px;margin-right:4px;padding:0;font-size:11px}.prompt-preset-del:hover{color:var(--danger);background:#fff1f1}.prompt-empty{color:var(--muted);margin:0;padding:10px;font-size:11.5px;line-height:1.7}.prompt-editor{flex-direction:column;min-height:0;padding:12px;display:flex}.prompt-editor textarea{resize:none;border:1px solid var(--line);color:#111827;min-height:180px;font:inherit;border-radius:10px;flex:1;padding:10px 12px;font-size:13px;line-height:1.7}.prompt-editor textarea:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px #00bfff24}.prompt-save-row{gap:6px;margin-top:8px;display:flex}.prompt-save-row input{border:1px solid var(--line);min-width:0;font:inherit;border-radius:999px;flex:1;padding:7px 12px;font-size:12.5px}.prompt-save-row input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px #00bfff24}.prompt-editor-meta{color:#9ca3af;align-items:baseline;gap:10px;margin-top:8px;font-size:11.5px;display:flex}.prompt-hint{color:#0369a1}.prompt-dialog-foot{border-top:1px solid var(--line);flex-shrink:0;align-items:center;gap:8px;padding:12px 16px;display:flex}.prompt-dialog-spacer{flex:1}@media (width<=700px){.prompt-dialog-body{grid-template-columns:minmax(0,1fr)}.prompt-presets{border-right:0;border-bottom:1px solid var(--line);max-height:34vh}}.knowledge-panel{background:#fafafa}.panel-header{color:var(--muted);border-bottom:1px solid var(--line);padding:12px 18px;font-size:13px}.knowledge-head{justify-content:space-between;align-items:center;gap:8px;display:flex}.knowledge-head-right{align-items:center;gap:8px;display:flex}.knowledge-count{text-align:center;background:var(--chip);min-width:20px;color:var(--muted);border-radius:999px;padding:1px 6px;font-size:11px}.fav-open{padding:3px 9px;font-size:12px}.fav-badge{color:#fff;text-align:center;background:#f59e0b;border-radius:999px;min-width:16px;padding:0 4px;font-size:10px;line-height:15px}.message-list,.card-list{flex-direction:column;flex:1;gap:12px;padding:16px 18px;display:flex;overflow:auto}.message-list{width:100%;max-width:920px;margin:0 auto;padding:20px 28px 140px}.bubble{white-space:pre-wrap;border-radius:16px;max-width:78%;padding:10px 14px;line-height:1.75}.bubble.user{color:#111827;background:#00bfff24;align-self:flex-end}.bubble.assistant{background:var(--chip);border:1px solid var(--line);align-self:flex-start}.bubble.error{border-color:var(--danger-line);color:var(--danger);background:#fff4f4}.term-tag{color:#0369a1;font:inherit;cursor:pointer;background:#00bfff29;border:1px dashed #00bfff;border-radius:7px;margin:0 1px;padding:0 7px;font-size:.94em;line-height:1.5;transition:transform .12s,box-shadow .12s,filter .12s;display:inline-block}.term-tag:hover{filter:brightness(.96)saturate(1.2);box-shadow:0 0 0 3px #00bfff29}.term-tag:active{transform:translateY(1px)}.term-tag:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.term-tag:disabled{opacity:.6;cursor:default}.inline-code{background:#11182714;border-radius:5px;padding:1px 5px;font-family:Consolas,Courier New,monospace;font-size:.92em}.md-bold{color:#0f172a;font-weight:700}.md-heading{color:#0f172a;font-weight:700;display:inline}.md-h1{letter-spacing:.2px;font-size:1.22em}.md-h2{letter-spacing:.2px;font-size:1.14em}.md-h3{font-size:1.06em}.md-h4{color:#1f2937;font-size:1em}.code-block{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;margin:8px 0;display:block;overflow:hidden}.code-lang{color:#64748b;background:#eef2f7;border-bottom:1px solid #e2e8f0;padding:4px 10px;font-family:Consolas,Courier New,monospace;font-size:11px;display:block}.code-block pre{margin:0;padding:10px 12px;overflow-x:auto}.code-block code{color:#0f172a;white-space:pre;font-family:Consolas,Courier New,monospace;font-size:12.5px;line-height:1.65}.math{color:#111827;font-family:Cambria Math,Cambria,Times New Roman,Latin Modern Math,serif}.math-inline{vertical-align:baseline;margin:0 3px;padding:0 2px;line-height:1.5;display:inline-block}.math-display{border:1px solid var(--line);text-align:center;background:#f8fafc;border-radius:10px;width:100%;margin:10px 0;padding:10px 6px;display:block;overflow:hidden}.math-display>.math-inner{vertical-align:baseline}.math-inner{max-width:100%;display:inline-block}.bubble-text>.math-display{margin-bottom:0}.knowledge-card-body p:has(>.math-display){margin-bottom:0}.math i{font-style:italic}.math span{line-height:1.25}.caret{vertical-align:-.15em;background:var(--accent);width:2px;height:1em;margin-left:2px;animation:1s steps(2,start) infinite caret-blink;display:inline-block}@keyframes caret-blink{to{visibility:hidden}}.bubble-text.thinking{align-items:center;gap:5px;min-height:20px;display:flex}.dot{background:#9ca3af;border-radius:50%;width:6px;height:6px;animation:1.2s ease-in-out infinite dot-bounce}.dot:nth-child(2){animation-delay:.15s}.dot:nth-child(3){animation-delay:.3s}@keyframes dot-bounce{0%,60%,to{opacity:.45;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}.bubble-role{color:var(--muted);margin-bottom:4px;font-size:12px}.bubble-tools{opacity:.35;justify-content:flex-end;align-items:center;gap:4px;margin-top:6px;transition:opacity .15s;display:flex}.bubble:hover .bubble-tools,.bubble:focus-within .bubble-tools{opacity:1}.bubble-tool-btn{color:#6b7280;cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:24px;height:24px;padding:0;font-size:13px;line-height:1;display:inline-flex}.bubble-tool-btn:hover{color:#111827;background:#11182714}.version-switch{background:#ffffffb3;border-radius:999px;align-items:center;gap:2px;margin-left:2px;padding:0 2px;display:inline-flex}.version-btn{color:#6b7280;cursor:pointer;background:0 0;border:0;border-radius:50%;width:20px;height:20px;padding:0;font-size:14px;line-height:1}.version-btn:hover:not(:disabled){color:#111827;background:#11182714}.version-btn:disabled{opacity:.3;cursor:default}.version-count{text-align:center;color:#6b7280;font-variant-numeric:tabular-nums;min-width:34px;font-size:11.5px}.edit-box{flex-direction:column;gap:8px;min-width:260px;display:flex}.edit-box textarea{resize:vertical;color:#111827;min-height:70px;font:inherit;background:#fff;border:1px solid #cfe3f0;border-radius:10px;padding:8px 10px;font-size:13.5px;line-height:1.7}.edit-box textarea:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px #00bfff29}.edit-actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.edit-actions .action-btn{margin-left:auto;padding:6px 14px;font-size:12.5px}.edit-hint{color:#9ca3af;flex:1;min-width:0;font-size:11px}.composer{background:#fff;border:1px solid #ececec;border-radius:22px;flex-direction:column;gap:8px;width:calc(100% - 48px);max-width:880px;margin:0 auto;padding:10px 12px 10px 16px;display:flex;position:absolute;bottom:18px;left:24px;right:24px;box-shadow:0 8px 28px #0f172a1a}.composer-row{align-items:flex-end;gap:10px;display:flex}.attach-btn{border:1px solid var(--line);cursor:pointer;background:#fff;border-radius:50%;flex-shrink:0;width:36px;height:36px;margin-bottom:4px;font-size:16px;line-height:1}.attach-btn:hover:not(:disabled){border-color:var(--accent);background:#f2fbff}.attach-btn:disabled{opacity:.45;cursor:not-allowed}.attachment-zone{flex-direction:column;gap:6px;display:flex}.attachment-list{flex-wrap:wrap;gap:6px;display:flex}.attachment-chip{border:1px solid var(--line);background:#fafbfc;border-radius:10px;align-items:center;gap:7px;max-width:260px;padding:4px 6px 4px 8px;display:flex}.attachment-thumb{object-fit:cover;border-radius:6px;flex-shrink:0;width:30px;height:30px}.attachment-icon{text-align:center;flex-shrink:0;width:30px;font-size:16px}.attachment-meta{flex-direction:column;min-width:0;line-height:1.35;display:flex}.attachment-name{color:#374151;white-space:nowrap;text-overflow:ellipsis;max-width:160px;font-size:12px;overflow:hidden}.attachment-sub{color:#9ca3af;font-size:10.5px}.attachment-remove{color:#9ca3af;cursor:pointer;background:0 0;border:0;border-radius:50%;flex-shrink:0;width:20px;height:20px;padding:0;font-size:11px}.attachment-remove:hover{color:#4b5563;background:#f1f3f5}.attachment-notice{border:1px solid var(--line);color:#64748b;background:#f8fafc;border-radius:8px;padding:6px 10px;font-size:11.5px;line-height:1.6}.attachment-notice.warn{color:#92400e;background:#fffbeb;border-color:#fcd34d}.attachment-notice code{background:#11182712;border-radius:4px;padding:0 4px;font-family:Consolas,Courier New,monospace}.bubble-attachments{flex-wrap:wrap;gap:6px;margin-bottom:6px;display:flex}.bubble-attachment img{border:1px solid var(--line);border-radius:8px;max-width:180px;max-height:130px;display:block}.bubble-attachment-file{border:1px solid var(--line);color:#475569;word-break:break-all;background:#f8fafc;border-radius:8px;padding:3px 9px;font-size:11.5px;display:inline-block}.composer textarea{resize:none;color:#111827;font:inherit;background:0 0;border:0;flex:1;min-height:44px;max-height:140px;padding:8px 4px}.composer textarea:focus{outline:none}.composer textarea::placeholder{color:#9ca3af}.send-btn{padding:10px 20px}.stop-btn{background:#6b7280}.stop-btn:hover{background:#4b5563}.card-empty,.tree-empty,.fav-empty{border:1px dashed var(--line);color:var(--muted);background:#fff;border-radius:12px;margin:0;padding:12px 14px;font-size:12.5px;line-height:1.7}.knowledge-card{border:1px solid var(--line);border-left:3px solid var(--accent);background:#fff;border-radius:14px;padding:12px 13px;scroll-margin:18px;position:relative}.knowledge-card.fav{box-shadow:inset 0 0 0 1px #f59e0b59}.knowledge-card.saved{background:#f8fcff;border-color:#bfe7fb #bfe7fb #bfe7fb #0369a1}.knowledge-card.active{box-shadow:0 0 0 3px #00bfff38}.knowledge-card-head{justify-content:space-between;align-items:flex-start;gap:6px;margin-bottom:6px;display:flex}.knowledge-card h2{color:#111827;word-break:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:15px;font-weight:650;display:-webkit-box;overflow:hidden}.knowledge-card-tools{flex-shrink:0;align-items:center;gap:4px;display:flex}.chip{border-radius:999px;padding:1px 7px;font-size:10px}.chip-child{color:#0369a1;background:#00bfff24}.chip-saved{color:#0369a1;background:#e6f7ff;border:1px solid #bfe7fb}.knowledge-card-body p{color:#4b5563;margin:0 0 8px;font-size:13px;line-height:1.8}.knowledge-card-body p:last-child{margin-bottom:0}.knowledge-card-state{color:var(--muted);margin:0;font-size:13px;line-height:1.7}.knowledge-card-state.loading{color:#0369a1;animation:1.3s ease-in-out infinite pulse-soft}@keyframes pulse-soft{0%,to{opacity:1}50%{opacity:.45}}.knowledge-card-state.error{color:var(--danger)}.knowledge-card-state.error p{margin:0 0 6px}.knowledge-card-state p{margin:0 0 8px}.knowledge-card-state p:last-child{margin-bottom:0}.knowledge-card-foot{border-top:1px dashed var(--line);flex-wrap:wrap;gap:6px;margin-top:10px;padding-top:8px;display:flex}.followup-form{gap:6px;margin-top:8px;display:flex}.followup-form input{border:1px solid var(--line);min-width:0;font:inherit;color:#111827;border-radius:999px;flex:1;padding:6px 10px;font-size:12px}.followup-form input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px #00bfff24}.followup-form .action-btn{padding:5px 12px;font-size:12px}.tree-section{border-top:1px solid var(--line);background:#fff;flex-shrink:0;max-height:38%;padding:10px 18px 14px;overflow:auto}.tree-head{color:#374151;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:8px;font-size:12px;font-weight:650;display:flex}.tree-count{color:var(--muted);font-size:11px;font-weight:400}.tree-organizing{color:#0369a1;font-size:11px;font-weight:400;animation:1.3s ease-in-out infinite pulse-soft}.tree-canvas{background:radial-gradient(circle at 30% 20%,#1b1f27 0%,#0e1013 100%);border-radius:12px;justify-content:center;padding:4px 0;display:flex}.tree-svg{max-width:100%;height:auto;display:block}.tree-edge{fill:none;stroke:#4a5260;stroke-width:1.6px;stroke-linecap:round}.tree-edge.lit{stroke:#67d5ff;stroke-width:2.4px;stroke-dasharray:none;filter:drop-shadow(0 0 3px #67d5ffd9)}.tree-node-dot{fill:#0e1013;stroke:#c9d2dd;stroke-width:1.6px;transition:fill .16s,stroke .16s}.tree-gnode{cursor:pointer}.tree-gnode:hover .tree-node-dot{stroke:#fff;stroke-width:2px}.tree-gnode.lit .tree-node-dot{fill:#fff;stroke:#fff;filter:drop-shadow(0 0 4px #ffffffe6)}.tree-gnode.selected .tree-node-dot{fill:#fff;stroke:#67d5ff;stroke-width:2px}.tree-hit{fill:#0000;stroke:none}.tree-gnode:focus{outline:none}.tree-gnode:focus-visible .tree-node-dot{stroke:#67d5ff;stroke-width:2.4px;stroke-dasharray:3 2}.term-tooltip{z-index:70;background:#fff;border:1px solid #dbe6ef;border-radius:14px;flex-direction:column;gap:8px;max-height:320px;padding:12px 13px;animation:.14s ease-out tooltip-in;display:flex;position:fixed;box-shadow:0 16px 40px #0f172a2e}.term-tooltip-head,.term-tooltip-foot{flex-shrink:0}@keyframes tooltip-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.term-tooltip-head{justify-content:space-between;align-items:center;gap:8px;display:flex}.term-tooltip-name{word-break:break-word;font-size:14.5px;font-weight:650}.tooltip-fav{border:1px solid var(--line);color:#6b7280;font:inherit;cursor:pointer;background:#fff;border-radius:999px;flex-shrink:0;align-items:center;gap:3px;padding:2px 8px;font-size:11px;display:inline-flex}.tooltip-fav:hover{color:#b45309;background:#fffbeb;border-color:#fcd34d}.tooltip-fav.on{color:#b45309;background:#fef3c7;border-color:#fcd34d;font-weight:650}.term-tooltip-body{overscroll-behavior:contain;color:#4b5563;flex:auto;min-height:0;padding-right:4px;font-size:12.5px;line-height:1.8;overflow-y:auto}.term-tooltip-body p{margin:0 0 8px}.term-tooltip-body p:last-child{margin-bottom:0}.term-tooltip-body .math-display{margin:8px 0;padding:8px 4px;font-size:.96em}.term-tooltip-body .math-inline{margin:0 2px}.term-tooltip-body .term-tag{padding:0 5px;font-size:.92em}.term-tooltip-body::-webkit-scrollbar{width:6px}.term-tooltip-body::-webkit-scrollbar-thumb{background:#d7dee7;border-radius:999px}.term-tooltip-body::-webkit-scrollbar-thumb:hover{background:#b9c4d0}.term-tooltip-state{color:var(--muted);margin:0;font-size:12.5px;line-height:1.7}.term-tooltip-state.loading{color:#0369a1;animation:1.3s ease-in-out infinite pulse-soft}.term-tooltip-state.error{color:var(--danger)}.term-tooltip-state.error p{margin:0 0 6px}.term-tooltip-foot{border-top:1px dashed var(--line);justify-content:space-between;align-items:center;gap:8px;padding-top:8px;display:flex}.term-tooltip-hint{color:#9ca3af;font-size:11px;line-height:1.5}.drawer-layer{z-index:80;position:fixed;inset:0}.drawer-mask{background:#0f172a47;position:absolute;inset:0}.fav-drawer{border-left:1px solid var(--line);background:#fff;flex-direction:column;width:330px;max-width:88vw;height:100%;animation:.18s ease-out drawer-in;display:flex;position:absolute;top:0;right:0;box-shadow:-10px 0 30px #0f172a29}@keyframes drawer-in{0%{opacity:.4;transform:translate(16px)}to{opacity:1;transform:none}}.fav-drawer-head{border-bottom:1px solid var(--line);color:#111827;align-items:center;gap:8px;padding:13px 16px;font-size:14px;font-weight:650;display:flex}.fav-drawer-count{color:var(--muted);flex:1;font-size:12px;font-weight:400}.fav-drawer-body{flex-direction:column;flex:1;gap:10px;padding:14px 16px;display:flex;overflow:auto}.fav-item{border:1px solid var(--line);background:#fff;border-radius:12px;padding:10px 12px}.fav-item.saved{background:#f8fcff;border-color:#bfe7fb}.fav-item-tools{flex-shrink:0;align-items:center;gap:4px;display:flex}.fav-item-head{justify-content:space-between;align-items:center;gap:6px;margin-bottom:4px;display:flex}.fav-item-name{word-break:break-word;font-size:13.5px;font-weight:650}.fav-item-body{color:#6b7280;margin:0 0 8px;font-size:12px;line-height:1.7}@media (width<=1100px){.app-body{grid-template-columns:18% minmax(0,1fr) 300px}.cards-collapsed .app-body{grid-template-columns:18% minmax(0,1fr)}}.drawer-head{color:#374151;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;font-size:13px;font-weight:650;display:flex}.panel-slot{min-width:0;min-height:0;display:flex}.panel-slot>.panel{flex:1;min-width:0}.drawer-backdrop{bottom:0;left:0;right:0;top:calc(58px + env(safe-area-inset-top,0px));z-index:55;background:#0f172a66;border:0;animation:.16s ease-out fade-in;position:fixed}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.panel-drawer{top:calc(58px + env(safe-area-inset-top,0px));z-index:60;min-height:0;padding-bottom:env(safe-area-inset-bottom,0px);display:flex;position:fixed;bottom:0;box-shadow:0 0 40px #0f172a47}.panel-drawer>.panel{flex:1;min-width:0}.drawer-left{width:min(86vw,340px);animation:.2s ease-out drawer-in-left;left:0}.drawer-right{width:min(92vw,380px);animation:.2s ease-out drawer-in-right;right:0}@keyframes drawer-in-left{0%{opacity:.4;transform:translate(-16px)}to{opacity:1;transform:none}}@keyframes drawer-in-right{0%{opacity:.4;transform:translate(16px)}to{opacity:1;transform:none}}@media (width<=900px){.app-body,.cards-collapsed .app-body,.sidebar-collapsed .app-body,.cards-collapsed.sidebar-collapsed .app-body{grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr)}.chat-panel,.sidebar-collapsed .chat-panel,.cards-collapsed .chat-panel{border-bottom:0;border-left:0;border-right:0}.app-topbar{padding:10px 12px;padding-top:max(10px, env(safe-area-inset-top));gap:8px}.app-topbar-left{gap:8px}.app-subtitle{display:none}.app-title{font-size:16px}.message-list{padding:14px 12px 160px}.bubble{max-width:90%;line-height:1.7}.composer{left:8px;right:8px;bottom:max(8px, env(safe-area-inset-bottom));-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#fffffff7;border-radius:20px;gap:6px;width:calc(100% - 16px);padding:8px 10px 8px 12px}.theme-dark .composer{background:#1a1e24f7}.composer textarea{min-height:46px;padding:10px 4px;font-size:16px}.attach-btn{width:42px;height:42px;margin-bottom:2px;font-size:18px}.send-btn{margin-bottom:2px;padding:12px 16px}.attachment-chip{max-width:100%}.attachment-name{max-width:120px}.edit-actions .action-btn{padding:9px 14px}.prompt-dialog{border-radius:14px 14px 0 0;width:100vw;max-width:100vw;max-height:92vh;top:auto;bottom:0;left:0;transform:none}.prompt-dialog-body{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr)}.prompt-presets{border-right:0;border-bottom:1px solid var(--line);max-height:30vh}.tree-section{max-height:40%}}.theme-dark{--page:#14161a;--muted:#9aa4b2;--line:#2a2f37;--chip:#22262c;color:#e6e8ec;background:#14161a}.theme-dark .app-topbar{background:#171a1f;border-bottom-color:#262b33}.theme-dark .app-title{color:#f1f3f6}.theme-dark .app-subtitle{color:#8b95a3}.theme-dark .build-tag{color:#7d8794;background:#232830}.theme-dark .topbar-icon-btn,.theme-dark .theme-btn{color:#c7ced8;background:#1e2229;border-color:#2f353f}.theme-dark .topbar-icon-btn:hover,.theme-dark .theme-btn:hover{border-color:var(--accent);color:#fff;background:#262c35}.theme-dark .ghost-btn,.theme-dark .app-error-close{color:#c7ced8;background:#1e2229;border-color:#2f353f}.theme-dark .ghost-btn:hover{border-color:var(--accent);color:#7fd8ff;background:#262c35}.theme-dark .icon-btn{color:#98a2b0}.theme-dark .icon-btn:hover{color:#e6e8ec;background:#262c35}.theme-dark .app-error{color:#f0aab0;background:#2a1b1d;border-bottom-color:#4a2a2e}.theme-dark .panel-header{border-bottom-color:var(--line);color:#8b95a3}.theme-dark .chat-panel{border-color:var(--line)}.theme-dark .knowledge-panel,.theme-dark .sidebar-panel{background:#171a1f}.theme-dark .message-list,.theme-dark .card-list{background:0 0}.theme-dark .bubble.user{color:#eaf6ff;background:#00bfff33}.theme-dark .bubble.assistant{color:#e6e8ec;background:#20242b;border-color:#2c323b}.theme-dark .bubble.error{color:#f0aab0;background:#2a1b1d;border-color:#4a2a2e}.theme-dark .bubble-role{color:#8b95a3}.theme-dark .bubble-text,.theme-dark .bubble-text span,.theme-dark .bubble-text p{color:inherit}.theme-dark .md-bold,.theme-dark .md-heading{color:#f4f6f9}.theme-dark .md-h4{color:#d7dce3}.theme-dark .inline-code{color:#e6e8ec;background:#ffffff1f}.theme-dark .code-block{background:#1a1e24;border-color:#2c323b}.theme-dark .code-lang{color:#9aa4b2;background:#232830;border-bottom-color:#2c323b}.theme-dark .code-block code{color:#dfe4ea}.theme-dark .math{color:#eaeef3}.theme-dark .math-display{background:#1c2027;border-color:#2c323b}.theme-dark .composer{background:#1a1e24;border-color:#2c323b;box-shadow:0 8px 28px #00000073}.theme-dark .composer textarea{color:#e6e8ec}.theme-dark .composer textarea::placeholder{color:#6d7683}.theme-dark .attach-btn{color:#d7dce3;background:#232830;border-color:#333a45}.theme-dark .attach-btn:hover:not(:disabled){background:#2b323c}.theme-dark .attachment-chip{background:#232830;border-color:#333a45}.theme-dark .attachment-name{color:#d7dce3}.theme-dark .attachment-sub{color:#8b95a3}.theme-dark .attachment-remove{color:#98a2b0}.theme-dark .attachment-remove:hover{color:#f1f3f6;background:#313842}.theme-dark .attachment-notice{color:#9aa4b2;background:#1e2229;border-color:#333a45}.theme-dark .attachment-notice.warn{color:#f2cf7a;background:#3a2f14;border-color:#7a5c14}.theme-dark .bubble-attachment img{border-color:#333a45}.theme-dark .bubble-attachment-file{color:#c7ced8;background:#232830;border-color:#333a45}.theme-dark .edit-box textarea{color:#e6e8ec;background:#1a1e24;border-color:#3a4654}.theme-dark .edit-hint{color:#8b95a3}.theme-dark .bubble-tool-btn{color:#98a2b0}.theme-dark .bubble-tool-btn:hover{color:#fff;background:#ffffff1f}.theme-dark .version-switch{background:#ffffff14}.theme-dark .version-btn{color:#98a2b0}.theme-dark .version-btn:hover:not(:disabled){color:#fff;background:#ffffff1f}.theme-dark .version-count{color:#9aa4b2}.theme-dark .sidebar-top,.theme-dark .sidebar-foot{border-color:var(--line)}.theme-dark .new-chat-btn{color:#e6e8ec;background:#1e2229;border-color:#333a45}.theme-dark .new-chat-btn:hover{border-color:var(--accent);color:#7fd8ff;background:#262c35}.theme-dark .sidebar-sub-btn,.theme-dark .sidebar-foot-btn{color:#a9b3c0;background:#1e2229;border-color:#2f353f}.theme-dark .sidebar-foot-btn.on{border-color:var(--accent);color:#7fd8ff}.theme-dark .conv-row:hover{background:#22272e}.theme-dark .conv-row.active{background:#1d2c3a}.theme-dark .conv-title{color:#c7ced8}.theme-dark .conv-row.active .conv-title{color:#7fd8ff}.theme-dark .conv-group-title{color:#7d8794}.theme-dark .conv-more{color:#8b95a3}.theme-dark .conv-more:hover{color:#e6e8ec;background:#2c333c}.theme-dark .conv-menu{background:#1e2229;border-color:#333a45;box-shadow:0 12px 30px #0000008c}.theme-dark .conv-menu button{color:#d7dce3}.theme-dark .conv-menu button:hover{background:#2a313a}.theme-dark .conv-menu button.danger:hover{color:#f0aab0;background:#3a1f22}.theme-dark .conv-rename,.theme-dark .prompt-search,.theme-dark .prompt-save-row input{color:#e6e8ec;background:#1a1e24;border-color:#333a45}.theme-dark .conv-empty,.theme-dark .card-empty,.theme-dark .tree-empty,.theme-dark .fav-empty,.theme-dark .sidebar-notice{color:#8b95a3;background:#1b1f25;border-color:#2f353f}.theme-dark .drawer-head{color:#ced5de}.theme-dark .drawer-backdrop{background:#0009}.theme-dark .knowledge-head .knowledge-count{color:#9aa4b2;background:#232830}.theme-dark .knowledge-card{background:#1d2128;border-color:#2c323b}.theme-dark .knowledge-card h2{color:#eef1f5}.theme-dark .knowledge-card-body p{color:#ced5de}.theme-dark .knowledge-card-state{color:#9aa4b2}.theme-dark .knowledge-card-state.loading{color:#7fd8ff}.theme-dark .knowledge-card-state.error{color:#f0aab0}.theme-dark .knowledge-card-foot{border-top-color:#2c323b}.theme-dark .knowledge-card.saved{background:#17222b;border-color:#2b4a5c #2b4a5c #2b4a5c #67d5ff}.theme-dark .fav-item{background:#1d2128;border-color:#2c323b}.theme-dark .fav-item.saved{background:#17222b;border-color:#2b4a5c}.theme-dark .fav-item-name{color:#eef1f5}.theme-dark .fav-item-body{color:#9aa4b2}.theme-dark .followup-form input{color:#e6e8ec;background:#1a1e24;border-color:#333a45}.theme-dark .tree-section{border-top-color:var(--line);background:#171a1f}.theme-dark .tree-head{color:#ced5de}.theme-dark .term-tooltip{background:#1e2229;border-color:#333a45;box-shadow:0 16px 40px #0009}.theme-dark .term-tooltip-name{color:#eef1f5}.theme-dark .term-tooltip-body{color:#ced5de}.theme-dark .term-tooltip-state{color:#9aa4b2}.theme-dark .tooltip-fav{color:#a9b3c0;background:#232830;border-color:#333a45}.theme-dark .term-tooltip-foot{border-top-color:#2c323b}.theme-dark .term-tooltip-hint{color:#7d8794}.theme-dark .term-tooltip-body::-webkit-scrollbar-thumb{background:#3a424e}.theme-dark .drawer-mask{background:#0000008c}.theme-dark .fav-drawer,.theme-dark .prompt-dialog{color:#e6e8ec;background:#1a1e24;border-color:#2f353f}.theme-dark .fav-drawer-head,.theme-dark .prompt-dialog-head,.theme-dark .prompt-dialog-foot{border-color:var(--line);color:#eef1f5}.theme-dark .fav-drawer-count,.theme-dark .prompt-dialog-desc,.theme-dark .prompt-editor-meta{color:#8b95a3}.theme-dark .prompt-presets{border-right-color:var(--line);background:#171a1f}.theme-dark .prompt-presets-head{color:#ced5de}.theme-dark .prompt-preset{background:#1e2229;border-color:#333a45}.theme-dark .prompt-preset-name{color:#d7dce3}.theme-dark .prompt-preset-tag{color:#8b95a3;background:#262c35}.theme-dark .prompt-editor textarea{color:#e6e8ec;background:#1a1e24;border-color:#333a45}.theme-dark .prompt-hint{color:#7fd8ff}.theme-dark ::-webkit-scrollbar-thumb{background:#3a424e}.theme-dark ::-webkit-scrollbar-thumb:hover{background:#4a5460}
