:root{--bg-surface: #fbfcfa;--border-color: #dfe5dc;--text-secondary: #718078;--color-positive: #1f8a5b;--color-negative: #b23b32;color:#17201c;background:#f4f6f2;font-family:Inter,PingFang SC,Microsoft YaHei,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh}.auth-shell{display:grid;min-height:100vh;place-items:center;padding:24px;background:#eef3ef}.auth-panel{display:grid;width:min(420px,100%);gap:16px;padding:28px;border:1px solid #dfe7e2;border-radius:8px;background:#fbfcfa;box-shadow:0 20px 60px #1827221f}.auth-brand{color:#14231f}.auth-tabs{grid-template-columns:1fr 1fr}.auth-submit{justify-content:center;min-height:44px}.auth-notice{max-width:none}button,input,textarea,select{font:inherit}button{cursor:pointer}.app-shell{display:grid;grid-template-columns:260px 1fr;min-height:100vh}.side{display:flex;flex-direction:column;gap:24px;padding:24px;color:#eef7ef;background:linear-gradient(180deg,#14221e,#101b18);box-shadow:8px 0 30px #12272114}.brand{display:flex;align-items:center;gap:12px}.brand-mark{display:grid;width:42px;height:42px;place-items:center;border:1px solid rgba(255,255,255,.18);background:#2f6b5f}.brand h1,.topbar h2,.panel h3{margin:0;letter-spacing:0}.brand h1{font-size:21px}.brand p,.topbar p{margin:4px 0 0;color:#97aaa3}.tabs{display:grid;gap:8px}.tabs button,.node-list button,.doc-list button,.option-list button{display:flex;width:100%;gap:10px;align-items:center;border:1px solid transparent;text-align:left}.tabs button{height:42px;padding:0 12px;border-radius:8px;color:#dce7e0;background:transparent}.tabs button.active,.tabs button:hover{border-color:#ffffff1f;background:#4d847638}.workspace{min-width:0;padding:24px 28px;background:radial-gradient(circle at top right,rgba(199,221,212,.3),transparent 32%),#f4f6f2}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.topbar-actions{display:flex;align-items:center;gap:10px}.topbar h2{font-size:24px}.notice{max-width:50%;padding:10px 12px;border:1px solid #d9ded4;background:#fff}.notice.success{border-color:#8fc3a6;color:#1f6b45}.notice.error{border-color:#d79d92;color:#8c2f22}.writing-grid,.rag-grid{display:grid;grid-template-columns:minmax(260px,.8fr) minmax(320px,1fr) minmax(320px,1.15fr);gap:16px;align-items:start}.two-grid,.settings-grid{display:grid;grid-template-columns:minmax(320px,.78fr) minmax(420px,1.22fr);gap:16px;align-items:start}.library-layout{display:grid;grid-template-columns:minmax(380px,.88fr) minmax(520px,1.12fr);gap:16px;align-items:start}.panel{display:grid;gap:14px;padding:16px;border:1px solid #dfe5dc;border-radius:12px;background:#fff;box-shadow:0 8px 24px #2340370d}.panel-head{display:flex;min-height:34px;align-items:center;justify-content:space-between;gap:12px}.panel h3{font-size:16px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field{display:grid;gap:6px}.field.compact input{color:#eef7ef;border-color:#3a5149;background:#203029}.field span{color:#60736b;font-size:13px}input,textarea,select{width:100%;border:1px solid #cfd8d1;border-radius:8px;padding:10px 11px;color:#17201c;background:#fbfcfa;outline:none}textarea{min-height:88px;resize:vertical}input:focus,textarea:focus{border-color:#2f6b5f;box-shadow:0 0 0 3px #2f6b5f24}.field.compact select{color:#eef7ef;border-color:#3a5149;background:#203029}.primary,.icon-button,.send-button,.file-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:8px;color:#fff;background:#2f6b5f}.primary{min-height:40px;padding:0 14px}.primary.accent{background:#9b5d25}.primary.subtle{color:#21443e;border:1px solid #b8cbc4;background:#eef6f3}.primary.ghost{color:#21443e;border:1px solid #d5dfd9;background:#fff}.icon-button,.send-button{width:36px;height:36px}.primary:disabled,.send-button:disabled{cursor:wait;opacity:.62}.actions{display:flex;flex-wrap:wrap;gap:10px}.project-import-actions{align-items:center}.segmented{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.segmented button{min-height:38px;border:1px solid #cfd8d1;border-radius:6px;color:#31443d;background:#fbfcfa}.segmented button.active{color:#fff;border-color:#2f6b5f;background:#2f6b5f}.setting-editor{min-height:calc(100vh - 96px)}.library-browser,.library-editor{min-height:calc(100vh - 96px);align-content:start}.stream-log{position:relative;display:grid;gap:6px;padding:12px 44px 12px 12px;border-left:3px solid #2f6b5f;color:#355249;background:#eef6f3;font-size:13px}.stream-expand{position:absolute;top:8px;right:8px;display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;padding:0;border:1px solid #b8cbc4;border-radius:6px;color:#2f6b5f;background:#fbfffd}.stream-expand:hover{border-color:#2f6b5f;background:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:28px;background:#131f1d6b}.output-modal{display:grid;grid-template-rows:auto minmax(0,1fr);width:min(1120px,100%);max-height:calc(100vh - 56px);overflow:hidden;border:1px solid #dce5df;border-radius:8px;background:#fbfcfa;box-shadow:0 24px 70px #131f1d3d}.output-modal-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid #e1e7df}.output-modal-head h3,.output-modal-head p,.detail-section-head h4{margin:0}.output-modal-head p{margin-top:4px;color:#718078;font-size:13px}.output-modal-body{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:16px;min-height:0;overflow:auto;padding:16px}.output-detail-column{display:grid;align-content:start;gap:12px;min-width:0}.detail-section-head{display:flex;align-items:center;gap:8px;color:#26443d}.detail-block{display:grid;gap:8px;padding:12px;border:1px solid #e1e7df;border-radius:8px;background:#fff}.detail-block strong{display:flex;align-items:baseline;justify-content:space-between;gap:10px;color:#21332e}.detail-block small{color:#718078;font-weight:500}.detail-block pre{max-height:320px;margin:0;overflow:auto;white-space:pre-wrap;word-break:break-word;color:#3e504a;font:13px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.detail-markdown{max-height:360px;min-width:0;overflow:auto;color:#3e504a;font-size:13px;line-height:1.72}.detail-markdown.markdown-body{min-width:0}.markdown-table-wrap{width:100%;overflow:auto;margin:10px 0 14px}.markdown-body table{width:100%;min-width:520px;border-collapse:collapse;font-size:12px;line-height:1.55}.markdown-body th,.markdown-body td{padding:7px 9px;border:1px solid #dfe7e2;text-align:left;vertical-align:top}.markdown-body th{color:#243f38;background:#eef6f3;font-weight:700}.markdown-body td{background:#fff}.detail-empty{min-height:96px}.rag-ref-list{display:flex;flex-wrap:wrap;gap:8px}.rag-ref-list span{padding:5px 8px;border:1px solid #d7b995;border-radius:6px;color:#604821;background:#fff8ec;font-size:12px}.request-status{display:flex;min-height:42px;align-items:center;gap:9px;padding:10px 12px;border:1px solid #b8cbc4;border-radius:6px;color:#21443e;background:#eef6f3;font-size:13px}.import-report{display:grid;gap:6px;padding:10px 12px;border:1px solid #d7b995;border-radius:6px;color:#604821;background:#fff8ec;font-size:13px}.import-report.is-running{border-color:#b8cbc4;color:#21443e;background:#eef6f3}.memory-warning{color:#8c2f22;font-weight:700}.request-status span{flex:1}.cancel-request{border:0;color:#8c2f22;background:transparent;font-size:13px}.cancel-request:hover{text-decoration:underline}.node-list,.doc-list,.option-list,.scene-list{display:grid;gap:8px}.node-list button,.doc-list button{justify-content:space-between;min-height:46px;padding:10px 12px;border-color:#e1e7df;border-radius:6px;background:#fbfcfa}.list-row{display:grid;grid-template-columns:minmax(0,1fr) 36px;gap:8px;align-items:stretch}.list-row-main{justify-content:space-between;min-width:0}.list-row-main span{min-width:0}.list-row-main strong,.list-row-main small{overflow:hidden;text-overflow:ellipsis}.list-row .icon-button{align-self:center;flex:0 0 36px;width:36px;min-width:36px;height:36px;min-height:36px;padding:0;border-color:transparent;border-radius:8px;text-align:center}.doc-list button.active,.list-row-main.active,.node-list button:hover,.node-list button.active{border-color:#2f6b5f;background:#eef6f3}.writing-grid{grid-template-columns:minmax(420px,.9fr) minmax(420px,1.1fr)}.output-tabs{grid-template-columns:repeat(2,1fr)}.library-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}.library-tabs button{display:inline-flex;align-items:center;justify-content:center;gap:6px}.library-filter-panel{display:grid;gap:12px;padding:14px;border:1px solid #e1e7df;border-radius:10px;background:#fcfdfc}.library-filter-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.library-summary-bar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.library-summary-bar>div,.compact-field{display:grid;gap:4px;padding:11px 12px;border:1px solid #e1e7df;border-radius:10px;background:#fbfcfa}.library-summary-bar strong,.compact-field strong{color:#223a34;font-size:18px}.library-summary-bar span,.compact-field span,.library-pagination-info span{color:#70817a;font-size:12px}.compact-field{align-content:end}.compact-field select{padding:6px 8px}.library-list{display:grid;gap:10px;min-height:240px}.library-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:12px;border:1px solid #e1e7df;border-radius:10px;background:#fbfcfa;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}.library-card:hover,.library-card.active{border-color:#8eb4a8;background:#f4faf7;box-shadow:0 0 0 3px #2f6b5f14}.library-card-select{display:grid;gap:8px;padding:0;border:0;color:inherit;background:transparent;text-align:left}.library-card-title{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.library-card-title strong{color:#203832}.library-card-title small{color:#70817a}.library-card-description{color:#3b4d47;line-height:1.6}.library-card-description p{margin:0 0 8px}.library-card-description>:last-child{margin-bottom:0}.library-card-description code{word-break:break-word}.library-card>p{display:-webkit-box;overflow:hidden;margin:0;color:#3b4d47;line-height:1.6;-webkit-box-orient:vertical;-webkit-line-clamp:2}.library-card-meta{display:flex;flex-wrap:wrap;gap:8px}.library-card-meta span{padding:4px 8px;border:1px solid #dce6df;border-radius:999px;color:#496158;background:#fff;font-size:12px}.library-card-delete{align-self:start}.library-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px}.library-pagination-info{display:grid;justify-items:center;gap:2px;text-align:center}.library-pagination-info strong{color:#223a34}.library-editor-section{display:grid;gap:12px;padding:14px;border:1px solid #e1e7df;border-radius:10px;background:#fcfdfc}.library-markdown-preview{display:grid;gap:10px;padding:12px 14px;border:1px solid #dce6df;border-radius:10px;background:#f8fbf9}.library-preview-head{color:#567067;font-size:12px;font-weight:600}.markdown-inline{line-height:1.5}.markdown-inline code{word-break:break-word}.compact-json{min-height:180px}.danger{background:#a23b32}.link-action{color:#2f6b5f;font-size:12px}.json-editor{min-height:620px;font-family:Consolas,Courier New,monospace;line-height:1.55}.outline-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px}.graph-panel{min-width:0}.graph-panel .panel-head small,.graph-inspector small{color:#6d7f77}.graph-canvas{position:relative;min-height:680px;overflow:auto;border:1px solid #dfe5dc;border-radius:8px;background-color:#fbfcfa;background-image:radial-gradient(#d6dfd8 1px,transparent 1px);background-size:18px 18px}.graph-lines{position:absolute;width:100%;height:100%;pointer-events:none}.graph-lines line{stroke:#9eb8ad;stroke-width:2;stroke-dasharray:7 5}.graph-node{position:absolute;display:grid;width:180px;min-height:72px;gap:5px;padding:10px 12px;touch-action:none;border:1px solid #cad8d1;border-left:4px solid #82948e;border-radius:8px;color:#263932;text-align:left;background:#fff;box-shadow:0 3px 10px #273a3314}.graph-node:hover,.graph-node.selected{border-color:#2f6b5f;box-shadow:0 0 0 3px #2f6b5f26}.graph-node.status-generated{border-left-color:#2f6b5f}.graph-node.status-completed{border-left-color:#9b5d25}.graph-node span{color:#2f6b5f;font-size:12px}.graph-node small{overflow:hidden;color:#72827c;text-overflow:ellipsis;white-space:nowrap}.graph-empty{display:grid;min-height:680px;place-items:center;color:#75867e}.graph-inspector{align-content:start}.graph-inspector p{margin:0;color:#455a52;line-height:1.65}.node-list small,.doc-list small,.option-list small,.scene-list small,.source small{color:#6d7f77}.option-list button{display:grid;min-height:112px;padding:12px;border-color:#e1e7df;border-radius:8px;background:#fbfcfa}.option-message{margin:0;padding:14px 12px;border:1px dashed #cad8d1;border-radius:8px;color:#6d7f77;background:#fbfcfa;font-size:13px}.option-message.error{border-color:#e0b7b2;color:#8d332d;background:#fff7f6}.option-list button.active{border-color:#9b5d25;background:#fff7ee}.option-list span,.source p,.source pre{color:#33443e;line-height:1.62}.output-panel,.chat-panel{min-height:calc(100vh - 96px)}.scene-list article,.source{display:grid;gap:6px;padding:12px;border:1px solid #e1e7df;border-radius:8px;background:#fbfcfa}.scene-list p{margin:0;line-height:1.58}.draft{overflow:auto;max-height:58vh;padding:14px;border:1px solid #e1e7df;border-radius:8px;white-space:pre-wrap;line-height:1.7;background:#fbfcfa}.draft-output,.revision-box{display:grid;gap:12px}.revision-box{padding-top:14px;border-top:1px solid #e1e7df}.revision-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.file-button{min-height:40px;padding:0 14px}.file-button input,.hidden-file{display:none}.chat-window{display:flex;min-height:520px;max-height:calc(100vh - 285px);flex-direction:column;gap:16px;overflow:auto;padding:18px;border:1px solid #e2e9e4;border-radius:12px;background:linear-gradient(180deg,#fbfdfb,#f7faf8)}.knowledge-layout{display:grid;grid-template-columns:minmax(360px,.9fr) minmax(420px,1.1fr);gap:18px;align-items:start}.knowledge-import,.knowledge-documents,.conversation-sidebar,.conversation-list,.chat-main{display:grid;gap:12px;align-content:start}.section-eyebrow{color:#2f6b5f;font-size:11px;font-weight:700;letter-spacing:.16em}.section-title{margin:0;font-size:22px!important}.section-desc,.chat-header p{margin:7px 0 0;color:#71827b;line-height:1.65}.extract-button{width:100%}.knowledge-tip,.scope-picker{display:flex;align-items:center;gap:9px;padding:11px 12px;border:1px solid #d6e4de;border-radius:9px;color:#45645b;background:#f1f8f5;font-size:13px}.knowledge-doc-list button,.knowledge-doc-list .list-row-main{min-height:64px}.knowledge-doc-list span{display:grid;gap:6px}.rag-chat-page{display:grid;grid-template-columns:210px minmax(440px,1fr) minmax(260px,320px);gap:16px;align-items:start}.conversation-sidebar,.sources-panel{min-height:calc(100vh - 112px)}.new-chat-button{width:100%}.conversation-list{max-height:calc(100vh - 230px);overflow:auto}.conversation-list button{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:6px;padding:11px 10px;border:1px solid #e1e7df;border-radius:9px;color:#33443e;background:#fbfcfa;text-align:left}.conversation-list .list-row-main{width:100%}.conversation-list button.active,.conversation-list .list-row-main.active{color:#21443e;border-color:#8db6ab;background:#eaf5f1}.conversation-list span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-empty,.source-empty{padding:18px 10px;color:#8a9994;font-size:13px;line-height:1.6;text-align:center}.chat-header{display:flex;align-items:center;justify-content:space-between}.scope-picker{padding:7px 10px}.scope-picker select{padding:5px 7px;border:0;background:transparent;box-shadow:none}.message-row{display:grid;gap:7px}.message-row.user{justify-items:end}.message-row.assistant{justify-items:start}.bubble{width:fit-content;max-width:86%;padding:11px 14px;border-radius:12px;line-height:1.62;white-space:pre-wrap}.bubble.user{align-self:flex-end;color:#fff;background:linear-gradient(135deg,#2f6b5f,#285c53);box-shadow:0 5px 14px #2f6b5f29}.bubble.assistant{align-self:flex-start;color:#17201c;border:1px solid #dfe5dc;background:#fff;box-shadow:0 4px 14px #2a463d0f}.bubble.live{border-color:#d7b995;background:#fff9f1}.markdown-body{min-width:min(86%,560px)}.markdown-body>:first-child{margin-top:0}.markdown-body>:last-child{margin-bottom:0}.markdown-body h2,.markdown-body h3,.markdown-body h4{margin:16px 0 7px;color:#203b34;line-height:1.35}.markdown-body h2{font-size:18px}.markdown-body h3{font-size:16px}.markdown-body h4{font-size:15px}.markdown-body p{margin:0 0 10px}.markdown-body ul,.markdown-body ol{margin:4px 0 12px;padding-left:22px}.markdown-body li{margin:4px 0}.markdown-body code{padding:2px 5px;border-radius:4px;color:#80511f;background:#fff3e4;font-family:Consolas,Courier New,monospace;font-size:.9em}.markdown-body pre{overflow:auto;margin:10px 0;padding:12px;border-radius:8px;background:#1f2e29}.markdown-body pre code{padding:0;color:#ecf5f0;background:transparent}.reasoning-card{width:min(92%,680px);overflow:hidden;border:1px solid #e4d2bd;border-radius:10px;color:#76542f;background:#fffaf4;font-size:13px}.reasoning-card summary{display:flex;align-items:center;gap:7px;padding:9px 11px;cursor:pointer;font-weight:600}.reasoning-card div{max-height:180px;overflow:auto;padding:0 11px 11px;line-height:1.56;white-space:pre-wrap}.live-reasoning{border-color:#dfbf98}.askbar{display:grid;grid-template-columns:1fr 42px;gap:8px}.sources-panel{max-height:calc(100vh - 112px);overflow:auto}.sources-panel .source{border-radius:10px;background:#fcfdfc}.source-nearby summary{display:grid;gap:5px;cursor:pointer;list-style:none}.source-nearby summary::-webkit-details-marker{display:none}.source-nearby summary span{width:fit-content;padding:3px 8px;border:1px solid #d5e3dd;border-radius:999px;color:#2f6b5f;background:#f1f8f5;font-size:12px}.source-nearby[open] summary span{color:#7a552c;border-color:#ead3b8;background:#fff7ed}.source-nearby{display:grid;gap:6px}.source pre{max-height:560px;overflow:auto;margin:4px 0 0;padding:10px;border:1px solid #e2e9e4;border-radius:8px;white-space:pre-wrap;word-break:break-word;background:#fff;font:inherit}.npc-chat-window{min-height:360px;max-height:460px}.npc-chat-empty{min-height:240px}.chat-empty{display:grid;min-height:420px;place-items:center;align-content:center;gap:10px;color:#7c8f88;text-align:center}.chat-empty strong{color:#39574e;font-size:17px}.source p{display:-webkit-box;overflow:hidden;margin:0;-webkit-box-orient:vertical;-webkit-line-clamp:6}.empty{display:grid;min-height:180px;place-items:center;color:#75867e;border:1px dashed #d1dbd3;border-radius:8px;background:#fbfcfa}.spin{animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:1180px){.writing-grid,.rag-grid,.library-layout,.knowledge-layout,.rag-chat-page,.two-grid,.settings-grid,.outline-layout{grid-template-columns:1fr}.output-panel,.chat-panel,.conversation-sidebar,.sources-panel{min-height:auto}.conversation-list{max-height:220px}.output-modal-body{grid-template-columns:1fr}}@media(max-width:680px){.conversation-list{max-height:180px}.chat-window{min-height:420px}}@media(max-width:760px){.app-shell{grid-template-columns:1fr}.side{padding:16px}.tabs{grid-template-columns:1fr 1fr}.workspace{padding:16px}.modal-backdrop{padding:12px}.topbar{align-items:flex-start;flex-direction:column}.notice{max-width:100%}.form-grid{grid-template-columns:1fr}}.dm-parsed-output{display:flex;flex-direction:column;gap:1.25rem}.dm-icon{flex:0 0 auto;vertical-align:-3px;margin-right:4px}.dm-md{margin-top:.5rem}.dm-options-list{display:grid;gap:.5rem;margin:.5rem 0}.dm-option-button{width:100%;padding:.7rem .85rem;border:1px solid #cfded7;border-radius:8px;color:#25463f;background:#f8fbf9;line-height:1.55;text-align:left;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease,transform .18s ease}.dm-option-button:hover{border-color:#2f6b5f;background:#eef6f3;box-shadow:0 5px 14px #2f6b5f1a;transform:translateY(-1px)}.dm-option-button:focus-visible{outline:3px solid rgba(47,107,95,.18);outline-offset:2px}.dm-option-hint{color:var(--text-secondary);font-size:12px}.dm-tip{max-width:none;color:#604821;border-color:#d7b995;background:#fff8ec}.dm-state-grid{display:grid;gap:.75rem;margin-top:.5rem}.dm-state-card{background:var(--bg-surface);padding:.75rem;border-radius:6px;border:1px solid var(--border-color)}.dm-state-name{font-weight:600;margin-bottom:.5rem}.dm-state-details{font-size:.85rem;color:var(--text-secondary);display:grid;gap:.25rem;line-height:1.45}.dm-state-details strong{display:inline;align-items:initial;justify-content:initial;gap:0;color:#344940;font-weight:700}.dm-divider{margin:0 .5rem}.dm-quote{margin:.5rem 0;padding:.5rem 1rem;border-left:4px solid var(--border-color);background:var(--bg-surface)}.dm-text-secondary{color:var(--text-secondary);font-size:.9rem}.dm-text-normal{font-size:.9rem}.dm-mt-sm{margin-top:.25rem}.dm-mt-md{margin-top:.5rem}.dm-positive{color:var(--color-positive)}.dm-negative{color:var(--color-negative)}.dm-affinity{font-weight:700}.dm-success-text{color:var(--color-positive);font-size:.85em;margin-left:4px}.dm-hr{border:0;border-top:1px dashed var(--border-color);margin:.5rem 0}.raw-json-details{font-size:.85rem;color:var(--text-secondary)}.raw-json-details summary{cursor:pointer}.dm-pre{margin-top:.5rem}
