:root{--paper:#f8f7f2;--surface:#fffefa;--sidebar:#eeeee6;--ink:#242e29;--muted:#727b73;--line:#dedfd5;--green:#285b4b;--green-soft:#e9eee7;--danger:#a54434;--sidebar-width:264px;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none;line-height:1.5;color-scheme:light}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button,a,select{touch-action:manipulation}button{color:inherit;cursor:pointer}button:disabled{cursor:default;opacity:.45}button,a,input,textarea,select,summary{outline-offset:4px}button:focus-visible,a:focus-visible,summary:focus-visible,select:focus-visible{outline:2px solid var(--green)}input:focus,textarea:focus{outline:none}button{border:0}a{color:inherit}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.svg-definitions{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:10px;background:transparent;color:var(--muted);text-decoration:none;transition:background .15s,color .15s;flex-shrink:0}.icon-button:hover{background:#e2e6dc;color:var(--ink)}.primary-button,.secondary-button,.danger-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 22px;border-radius:10px;text-decoration:none;font-weight:550}.primary-button{background:var(--green);color:#fff}.primary-button:hover{background:#204b3d}.secondary-button{background:#edeee7}.danger-button{background:var(--danger);color:#fff}.danger-text{color:var(--danger)!important}.mobile-only{display:none}.boot{height:100dvh;display:grid;place-items:center;color:var(--muted);font-size:14px}
.login-view{min-height:100svh;display:grid;place-items:center;padding:40px 24px}.login-panel{width:min(100%,350px);padding-bottom:6vh}.brand-mark{width:54px;height:54px;border:1px solid var(--green);color:var(--green);border-radius:13px;font-family:"Kaiti SC","STKaiti","KaiTi",serif;font-size:36px;display:grid;place-items:center;line-height:1}.brand-mark.small{width:35px;height:35px;font-size:26px;border-radius:8px}.eyebrow{color:var(--muted);font-size:12px;letter-spacing:.14em;margin:28px 0 8px}.login-panel h1{font-size:28px;font-weight:600;letter-spacing:-.04em;margin:0 0 12px}.login-intro{font-size:15px;color:var(--muted);margin:0 0 34px}.login-panel label{display:block;font-size:13px;font-weight:550;margin-bottom:8px}.login-panel input,.simple-dialog input{width:100%;height:50px;border:1px solid var(--line);border-radius:10px;background:var(--surface);padding:12px 14px;color:var(--ink);font-size:16px}.login-panel input:focus,.simple-dialog input:focus{border-color:var(--green);box-shadow:0 0 0 3px #285b4b0c}.login-panel .primary-button{width:100%;margin-top:16px;height:48px}.login-note{font-size:12px;color:var(--muted);line-height:1.7;margin-top:24px}.form-error{font-size:13px;color:var(--danger);margin:9px 0 0}
.app-shell{height:100dvh;display:flex;overflow:hidden}.sidebar{width:var(--sidebar-width);background:var(--sidebar);border-right:1px solid var(--line);display:flex;flex-direction:column;flex-shrink:0;padding:24px 14px 12px;overflow:hidden}.sidebar-brand{display:flex;align-items:center;justify-content:space-between;padding:0 8px 29px}.brand-name{display:flex;align-items:center;gap:12px;text-decoration:none;font-weight:600;font-size:19px;line-height:1.1;letter-spacing:.05em}.brand-subtitle{display:block;font-size:10px;font-weight:400;letter-spacing:.15em;color:var(--muted);margin-top:6px}.new-conversation{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid #d4d8cb;border-radius:10px;min-height:46px;padding:10px 13px;font-size:14px;font-weight:550}.new-conversation:hover{border-color:#9fad9c;background:#fdfdf8}.new-conversation svg{width:19px;height:19px}.history-heading{font-size:11px;color:var(--muted);display:flex;justify-content:space-between;letter-spacing:.06em;padding:28px 12px 10px}.history-list{overflow-y:auto;flex:1;min-height:0;scrollbar-width:thin}.history-empty{color:var(--muted);font-size:13px;margin:10px 12px;line-height:1.8}.history-item{display:flex;align-items:center;gap:11px;width:100%;text-align:left;border-radius:9px;background:transparent;padding:12px 11px;margin:2px 0;min-height:55px}.history-item:hover{background:#e3e7dc}.history-item.active{background:#dfe7db}.history-item svg{width:16px;height:16px;color:#697b6c}.history-item-text{min-width:0;flex:1}.history-title{display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.5}.history-date{display:block;font-size:10px;color:var(--muted);margin-top:3px}.history-running{width:6px;height:6px;background:var(--green);border-radius:50%}.sidebar-footer{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:11px;margin:12px 7px 0;padding-top:10px;border-top:1px solid var(--line)}
.workspace{min-width:0;flex:1;display:flex;flex-direction:column;position:relative}.topbar{height:80px;min-height:80px;padding:0 32px;display:flex;align-items:center;gap:14px;border-bottom:1px solid #e3e4da;background:var(--paper);z-index:3}.current-heading{min-width:0;flex:1}.current-heading h1{font-size:15px;font-weight:550;line-height:1.4;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.current-heading>span{font-size:11px;color:var(--muted);display:block;margin-top:3px}.topbar-actions{display:flex;align-items:center;gap:8px}.model-control{position:relative}.model-control select{color:var(--green);font-weight:550;font-size:13px;padding:9px 27px 9px 12px;border:1px solid #d8dfd2;border-radius:9px;background:var(--paper);max-width:150px;min-height:38px}.conversation-menu{position:relative}.conversation-menu>summary{list-style:none}.conversation-menu>summary::-webkit-details-marker{display:none}.menu-panel{position:absolute;right:0;top:48px;background:var(--surface);border:1px solid var(--line);box-shadow:0 10px 30px #24302812;border-radius:12px;width:170px;padding:6px;z-index:8}.menu-panel button,.menu-panel a{width:100%;text-align:left;display:flex;align-items:center;gap:10px;background:transparent;padding:12px;border-radius:7px;font-size:13px;text-decoration:none}.menu-panel button:hover,.menu-panel a:hover{background:var(--green-soft)}.menu-panel svg{width:17px;height:17px}.notice{display:flex;gap:10px;align-items:center;justify-content:center;padding:8px 16px;background:#f2e9da;border-bottom:1px solid #e4d7c1;font-size:13px;line-height:1.5}.notice>span{max-width:720px}.notice>button:not(.icon-button){color:var(--green);font-size:12px;font-weight:600;white-space:nowrap;background:transparent;text-decoration:underline;text-underline-offset:3px}.notice .icon-button{width:30px;height:30px;margin-left:auto}.notice svg{width:16px;height:16px}
.message-viewport{flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scroll-behavior:auto;scrollbar-gutter:stable}.message-viewport:focus-visible{outline:none}.conversation-content{width:min(100%,850px);margin:0 auto;padding:30px 34px 36px}.empty-state{padding:11vh 0 40px;max-width:560px;margin:0 auto}.empty-symbol{font-family:"Kaiti SC","STKaiti","KaiTi",serif;color:var(--green);font-size:36px;letter-spacing:.13em;margin-bottom:22px;line-height:1}.empty-state h2{font-size:28px;font-weight:500;letter-spacing:-.03em;margin:0 0 10px}.empty-state>p{font-size:15px;color:var(--muted);margin:0}.starter-actions{display:flex;flex-direction:column;margin-top:34px;max-width:330px}.starter-actions button{display:flex;align-items:center;justify-content:space-between;text-align:left;padding:15px 0;border-bottom:1px solid var(--line);background:transparent;font-size:13px;color:#53685a}.starter-actions button:hover{color:var(--green);border-color:#a3b39e}.starter-actions span{font-size:19px;color:#81917f}.message{margin-bottom:34px;min-width:0}.message.user{margin-top:6px;display:flex;flex-direction:column;align-items:flex-end}.message.user .message-body{white-space:pre-wrap;background:var(--green-soft);padding:13px 18px;border-radius:16px 16px 4px 16px;max-width:90%;font-size:15px;line-height:1.75;overflow-wrap:anywhere}.message-header{display:flex;align-items:center;gap:9px;margin-bottom:12px;color:var(--green);font-size:12px;font-weight:600}.message-model{font-size:10px;color:var(--muted);font-weight:400;padding-left:8px;border-left:1px solid var(--line)}.message.assistant .message-body{font-size:16px;line-height:1.9;overflow-wrap:anywhere}.message-body>:first-child{margin-top:0}.message-body>:last-child{margin-bottom:0}.message-body p{margin:0 0 1em}.message-body h1{font-size:24px;margin:1.8em 0 .8em;line-height:1.45}.message-body h2{font-size:21px;margin:1.7em 0 .75em;line-height:1.5}.message-body h3{font-size:18px;margin:1.5em 0 .6em;line-height:1.6}.message-body h4,.message-body h5,.message-body h6{font-size:16px;margin:1.4em 0 .5em}.message-body strong{font-weight:650}.message-body ul,.message-body ol{padding-left:1.5em;margin:.7em 0 1.2em}.message-body li{margin:.35em 0}.message-body li>p{margin:.3em 0}.message-body blockquote{margin:1.2em 0;border-left:3px solid #b6c5ae;padding:2px 0 2px 16px;color:#657060}.message-body a{color:var(--green);text-decoration-thickness:1px;text-underline-offset:3px;word-break:break-word}.message-body code{background:#eaece2;border-radius:4px;padding:2px 5px;font-size:.86em;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.message-body pre{background:#eeeee7;border:1px solid #e3e4d9;border-radius:10px;padding:16px;overflow-x:auto;font-size:13px;line-height:1.7;max-width:100%}.message-body pre code{padding:0;background:none;white-space:pre}.message-body hr{border:0;border-top:1px solid var(--line);margin:1.8em 0}.table-scroll{overflow-x:auto;margin:1.1em 0 1.5em;overscroll-behavior-x:contain;border:1px solid var(--line);border-radius:8px;max-width:100%}.message-body table{border-collapse:collapse;width:100%;font-size:13px;line-height:1.8;min-width:450px;margin:0}.message-body th,.message-body td{text-align:left;vertical-align:top;padding:11px 13px;border-bottom:1px solid var(--line);border-right:1px solid var(--line);min-width:110px}.message-body th{background:#edeee5;font-weight:600}.message-body tr:last-child td{border-bottom:0}.message-body th:last-child,.message-body td:last-child{border-right:0}.message-body img{display:none}.message-footer{display:flex;align-items:center;gap:9px;margin-top:12px;color:var(--muted);font-size:11px}.message-footer .copy-button{display:inline-flex;align-items:center;gap:5px;padding:5px 0;background:transparent;font-size:11px;color:var(--muted)}.message-footer .copy-button:hover{color:var(--green)}.copy-button svg{width:13px;height:13px}.message-status{font-size:11px;color:#8c7660}.streaming .message-body:empty::after{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:#78957c;animation:breathe 1.5s ease-in-out infinite}.streaming .message-header::after{content:"";width:5px;height:5px;background:#6f8e70;border-radius:50%;animation:breathe 1.5s ease-in-out infinite}.message.error .message-body{color:var(--danger)}
.chart-summary{border-bottom:1px solid var(--line);padding:0 0 26px;margin:0 0 30px}.chart-caption{font-size:11px;color:var(--muted);margin:0 0 15px;display:flex;justify-content:space-between}.chart-grid{display:grid;grid-template-columns:repeat(4,1fr);max-width:360px;margin:auto;gap:4px;text-align:center}.pillar-label{font-size:11px;color:var(--muted);margin-bottom:10px}.pillar-stem,.pillar-branch{font-family:"Kaiti SC","STKaiti","KaiTi",serif;font-size:38px;line-height:1.25}.pillar-branch{margin-top:1px}.e-jin{color:#d4a017}.e-mu{color:#2e7d32}.e-shui{color:#1565c0}.e-huo{color:#c0392b}.e-tu{color:#8b5a2b}
.composer-region{position:relative;padding:0 32px max(14px,env(safe-area-inset-bottom));background:var(--paper);z-index:2}.composer{max-width:780px;margin:0 auto;display:flex;gap:10px;align-items:flex-end;border:1px solid #cfd7c8;border-radius:16px;background:var(--surface);padding:10px 10px 10px 17px;box-shadow:0 3px 18px #27352705;transition:border-color .15s,box-shadow .15s}.composer:focus-within{border-color:#9ead98;box-shadow:0 0 0 3px #285b4b05}.composer textarea{display:block;flex:1;min-width:0;resize:none;max-height:180px;min-height:27px;border:0;padding:3px 0 2px;line-height:1.65;background:transparent;font-size:16px;color:var(--ink);margin-bottom:3px}.composer textarea::placeholder{color:#91978c}.send-button{width:36px;height:36px;border-radius:10px;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0}.send-button:hover{background:#1c493a}.send-button:disabled{background:#aab6a4;opacity:.65}.send-button svg{width:20px;height:20px;stroke-width:2}.stop-button{background:#e3e9dd;color:var(--green)}.stop-button:hover{background:#d5dfcf}.stop-button svg{width:18px;height:18px;fill:currentColor;stroke-width:0}.composer-footnote{max-width:780px;margin:9px auto 0;display:flex;justify-content:space-between;gap:10px;font-size:10px;color:#8a9187;line-height:1.5}.generation-status{max-width:780px;margin:0 auto;padding:10px 5px;display:flex;align-items:center;gap:7px;color:#72806c;font-size:11px;min-height:33px}.status-dot{display:inline-block;width:5px;height:5px;border-radius:50%;background:#6f8e70;animation:breathe 1.5s ease-in-out infinite}.jump-to-bottom{position:absolute;left:50%;bottom:calc(100% + 13px);transform:translateX(-50%);display:flex;align-items:center;gap:5px;border:1px solid var(--line);background:var(--surface);border-radius:25px;padding:8px 13px;box-shadow:0 3px 12px #2130260b;font-size:11px;color:#65785f}.jump-to-bottom svg{width:14px;height:14px}
.simple-dialog{border:1px solid var(--line);border-radius:16px;padding:25px;background:var(--surface);width:min(420px,calc(100% - 36px));color:var(--ink);box-shadow:0 15px 70px #14221c24}.simple-dialog::backdrop{background:#1c2c2355;backdrop-filter:blur(2px)}.simple-dialog h2{font-size:19px;font-weight:600;margin:0 0 18px}.simple-dialog p{font-size:14px;color:var(--muted);line-height:1.8;margin:0 0 22px}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}.dialog-actions button{font-size:13px;min-height:42px;padding:9px 19px}.toast{position:fixed;bottom:calc(110px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#293e30;color:white;padding:10px 17px;border-radius:9px;font-size:12px;z-index:30;max-width:calc(100vw - 35px);box-shadow:0 5px 20px #17231d22}.sidebar-backdrop{display:none}
@keyframes breathe{0%,100%{opacity:.4}50%{opacity:1}}
.menu-panel a.disabled{opacity:.45;cursor:default}
@media(min-width:1500px){.conversation-content{max-width:920px;padding-left:40px;padding-right:40px}.composer{max-width:840px}.composer-footnote,.generation-status{max-width:840px}}
@media(max-width:899px){:root{--sidebar-width:280px}.mobile-only{display:inline-flex}.app-shell{height:var(--app-height,100dvh)}.sidebar{position:fixed;inset:0 auto 0 0;height:100dvh;z-index:15;transform:translateX(-101%);transition:transform .2s ease;padding-top:max(20px,env(safe-area-inset-top));box-shadow:10px 0 40px #1c2f2212}.sidebar.open{transform:translateX(0)}.sidebar-backdrop{position:fixed;inset:0;z-index:14;background:#27372b4f;display:block;animation:fade-in .15s ease}.sidebar-brand{padding-bottom:23px}.topbar{height:68px;min-height:68px;padding:0 12px;gap:7px}.current-heading h1{font-size:14px}.current-heading>span{font-size:10px}.topbar-actions{gap:2px}.topbar .icon-button{width:36px;height:40px}.model-control select{padding:8px 23px 8px 9px;font-size:12px;min-height:35px;max-width:117px}.conversation-menu .menu-panel{right:0}.conversation-content{padding:25px 22px 29px;max-width:740px}.composer-region{padding:0 16px max(12px,env(safe-area-inset-bottom))}.composer{border-radius:14px;padding:9px 9px 9px 14px}.composer-footnote{margin-top:8px;padding:0 3px}.composer-footnote #composerHint{display:none}.composer-footnote{justify-content:center}.empty-state{padding-top:10vh;max-width:420px}.empty-state h2{font-size:26px}.empty-symbol{font-size:33px}.message{margin-bottom:30px}.message.assistant .message-body{font-size:16px;line-height:1.9}.message.user .message-body{font-size:15px;max-width:94%;padding:12px 16px}.message-body h1{font-size:22px}.message-body h2{font-size:20px}.message-body h3{font-size:18px}.generation-status{padding-left:4px}.notice{font-size:12px;padding:7px 10px;gap:5px}.notice .icon-button{width:26px}.chart-summary{padding-bottom:23px;margin-bottom:25px}.chart-caption span:last-child{font-size:10px}.chart-grid{max-width:300px}.menu-panel{top:43px}.toast{bottom:calc(100px + env(safe-area-inset-bottom))}}
@media(max-width:390px){.current-heading>span{display:none}.topbar{gap:3px;padding:0 8px}.topbar-actions{gap:0}.topbar .icon-button{width:34px}.current-heading h1{max-width:108px}.model-control select{max-width:111px;font-size:11px;padding-left:7px}.conversation-content{padding-left:18px;padding-right:18px}.composer-region{padding-left:12px;padding-right:12px}.chart-caption{gap:8px}.chart-caption span:last-child{max-width:150px;text-align:right}.empty-state h2{font-size:24px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{.sidebar,.topbar,.composer-region,.notice,.message-footer,.toast{display:none!important}.app-shell,.workspace,.message-viewport{height:auto;display:block;overflow:visible}.conversation-content{max-width:none;padding:0}.message-body table{min-width:0}.table-scroll{overflow:visible}.message{break-inside:avoid}.message.assistant .message-body{font-size:12pt}}
