
    :root{--green:#347b56;--green-dark:#286343;--green-soft:#edf5ef;--ink:#24352d;--muted:#7c887f;--line:#e5eae5;--canvas:#f6f8f5;--amber:#ab7b30;--amber-soft:#fff8eb;--danger:#b4544c;--shadow:0 12px 45px #1d3b2410}
    *{box-sizing:border-box} [hidden]{display:none!important}
    body{margin:0;background:#eaf0e9;color:var(--ink);font:14px/1.65 "Segoe UI","Microsoft YaHei","PingFang SC",sans-serif;-webkit-font-smoothing:antialiased}
    button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button,input,textarea,select{outline:none}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #6da481;outline-offset:3px}
    button{color:inherit}button svg{pointer-events:none}svg.icon{width:19px;height:19px;flex-shrink:0;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
    .preview-bar{height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;gap:12px;background:#eaf0e9;color:#64746a;font-size:12px}
    .preview-left,.preview-tools,.device-switch{display:flex;align-items:center;gap:10px}.preview-label{color:#3c5745;font-weight:600}.preview-sep{width:1px;height:12px;background:#cad6cb}
    .device-switch{gap:2px;padding:3px;border:1px solid #d6e0d6;border-radius:8px;background:#e2eae1}.device-switch button,.quiet-btn{border:0;background:transparent;border-radius:5px;font-size:12px;padding:3px 10px;color:#66796c}.device-switch button.active{background:#fff;color:var(--green);box-shadow:0 1px 3px #213d2210}.quiet-btn:hover{background:#dfe8de}.quiet-btn .icon{width:14px;height:14px;margin-right:3px}
    .stage{height:calc(100dvh - 48px);padding:0 18px 18px;display:flex;justify-content:center;align-items:stretch}
    .frame{width:100%;max-width:1600px;min-width:0;height:100%;background:#fff;border:1px solid #dce5dc;border-radius:14px;box-shadow:var(--shadow);overflow:hidden;position:relative;container-name:peer;container-type:inline-size;transition:width .2s ease}
    body[data-preview="mobile"] .frame{width:390px;max-height:844px;border-radius:24px;border:6px solid #d9e2d8;box-shadow:0 18px 60px #233c2620}
    .app{height:100%;display:flex;flex-direction:column;min-height:0}.app-header{height:48px;flex-shrink:0;padding:0 25px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#fff}
    .brand{display:flex;align-items:center;gap:10px}.brand-symbol{display:grid;place-items:center;width:32px;height:32px;color:#fff;background:var(--green);border-radius:10px}.brand-symbol .icon{width:21px;height:21px}.brand-name{font-size:17px;font-weight:650;letter-spacing:-.45px}.brand-sub{font-size:11px;color:#96a094;margin-left:14px;letter-spacing:.4px}
    .user-menu{display:flex;align-items:center;gap:10px;border:0;background:transparent;text-align:left;padding:6px 0 6px 10px;border-radius:8px}.user-menu:hover{background:var(--canvas)}.user-name{font-size:12px;color:#506358}.user-role{font-size:10px;color:#98a196;line-height:1.2}.user-circle{width:32px;height:32px;display:grid;place-items:center;background:#eff3ed;border:1px solid #e1e8de;border-radius:50%;color:#58745e;font-size:12px;font-weight:600}.user-menu>.icon{width:14px;color:#98a497}
    .workspace{position:relative;flex:1;min-height:0;display:grid;grid-template-columns:278px minmax(0,1fr);background:var(--canvas)}
    .unread{display:inline-block}
    .sidebar{min-height:0;min-width:0;display:flex;flex-direction:column;border-right:1px solid var(--line);background:#fff}
    .sidebar-top{padding:20px 17px 13px}.tabs{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px;background:#f1f4ef;padding:4px;border-radius:8px;margin-bottom:15px}.tab{border:0;border-radius:5px;background:transparent;color:#859082;padding:7px 2px;font-size:12px;font-weight:500;white-space:nowrap}.tab.active{background:white;box-shadow:0 1px 4px #263e2510;color:var(--ink)}.tab .count{margin-left:6px;font-size:10px;color:#9aa592}.tab.active .count{color:var(--green)}
    .search-box{display:flex;align-items:center;gap:7px;padding:6px 9px;border:1px solid #e5eae1;border-radius:7px;color:#98a391;background:#fff}.search-box .icon{width:16px;height:16px}.search-box input{width:100%;min-width:0;border:0;background:transparent;font-size:12px;padding:2px 0;color:var(--ink)}.search-box input::placeholder{color:#abb3a7}
    .sidebar-action{display:flex;align-items:center;justify-content:space-between;padding:6px 20px 10px}.sidebar-caption{font-size:11px;color:#98a294;letter-spacing:.7px}.text-btn{display:inline-flex;align-items:center;gap:4px;color:var(--green);border:0;background:transparent;font-size:12px;padding:4px 0}.text-btn .icon{width:15px;height:15px}.text-btn:hover{color:var(--green-dark)}
    .sidebar-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
    .list-refresh-button{min-height:32px;white-space:nowrap}
    .load-more-tasks{align-self:center;flex-shrink:0;min-height:36px;margin:0 0 8px;justify-content:center}
    .list-refresh-button[aria-busy="true"] .icon{animation:list-refresh-spin .8s linear infinite}
    @keyframes list-refresh-spin{to{transform:rotate(360deg)}}
    @media(prefers-reduced-motion:reduce){.list-refresh-button[aria-busy="true"] .icon{animation:none}}
    .conversation-list{overflow:auto;min-height:0;padding:0 10px 16px;scrollbar-width:thin;scrollbar-color:#dde6d7 transparent}.conversation-item{position:relative;display:flex;gap:10px;text-align:left;border:1px solid transparent;background:transparent;width:100%;border-radius:9px;padding:13px 10px;margin-bottom:5px}.conversation-item:hover{background:#f8faf6}.conversation-item.selected{background:#eff5ed;border-color:#e0ebdb}.conversation-item.selected:before{content:"";position:absolute;left:-1px;top:18px;bottom:18px;width:3px;background:var(--green);border-radius:0 3px 3px 0}.list-icon{width:34px;height:34px;border:1px solid #e3e9df;background:#fff;border-radius:9px;display:grid;place-items:center;color:#678264;flex-shrink:0}.list-icon .icon{width:16px;height:16px}.list-icon.algo{color:#668095;background:#f0f5f7;border-color:#e1eaf0}.list-icon.front{color:#987959;background:#faf5ee;border-color:#efe6d9}.list-body{flex:1;min-width:0}.list-title-line{display:flex;align-items:center;gap:5px;justify-content:space-between}.list-title{font-size:12px;font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.list-time{font-size:10px;color:#9aa58f;white-space:nowrap}.list-preview{font-size:11px;color:#8f9a87;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:3px}.list-meta{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:8px;font-size:10px;color:#85977a}.tiny-state{display:inline-flex;gap:4px;align-items:center}.tiny-dot{width:5px;height:5px;background:#88a976;border-radius:50%;display:inline-block}.tiny-state.wait{color:var(--amber)}.tiny-state.wait .tiny-dot{background:#c9a65a}.tiny-state.stopped{color:#959e91}.tiny-state.stopped .tiny-dot{background:#a1aa98}.unread{min-width:15px;height:15px;line-height:15px;text-align:center;border-radius:4px;background:#4e865d;color:#fff;font-size:9px}.sidebar-footer{margin-top:auto;border-top:1px solid #f0f3ec;padding:13px 20px;display:flex;align-items:center;gap:7px;font-size:11px;color:#9ca692}.sidebar-footer .icon{width:14px;height:14px}.list-empty{text-align:center;padding:34px 10px;color:var(--muted);font-size:12px}
    .chat{position:relative;min-height:0;min-width:0;display:flex;flex-direction:column}.chat-header{flex-shrink:0;min-height:60px;padding:5px 28px;display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid var(--line);background:#ffffffd9}.chat-heading{min-width:0;display:flex;align-items:center;gap:12px}.chat-title{font-size:17px;font-weight:600;line-height:1.5;margin:0;letter-spacing:-.15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-subtitle{display:flex;align-items:center;gap:9px;margin-top:5px;color:#929c89;font-size:11px;flex-wrap:wrap}.mode-badge{display:inline-flex;align-items:center;gap:4px;line-height:1.5;padding:1px 6px;font-size:10px;border-radius:4px;color:#628456;background:#eef3e9;border:1px solid #e3ebda}.mode-badge.chat-mode{background:#f1f5f8;border-color:#e3eaf0;color:#71889a}.mode-badge .icon{width:11px;height:11px}.chat-actions{display:flex;align-items:center;gap:14px;flex-shrink:0}.status-pill{display:inline-flex;align-items:center;gap:6px;color:#718364;font-size:11px;white-space:nowrap}.status-pill .tiny-dot{width:6px;height:6px}.status-pill.wait{color:#b38430}.status-pill.wait .tiny-dot{background:#c29a43}.status-pill.running .tiny-dot{animation:pulse 1.8s ease infinite;background:#629663}.status-pill.stopped{color:#8d9783}.status-pill.stopped .tiny-dot{background:#a1ad93}.icon-btn{display:inline-grid;place-items:center;width:30px;height:30px;padding:0;border:1px solid transparent;border-radius:7px;background:transparent;color:#8a9980}.icon-btn:hover{background:#eaf1e5;border-color:#e0e8d9}.icon-btn .icon{width:18px;height:18px}.back-button{display:none;flex-shrink:0;color:var(--ink)}
    .timeline{flex:1;min-height:0;overflow:auto;padding:24px 30px 12px;scroll-behavior:smooth;scrollbar-width:thin;scrollbar-color:#dfe7d8 transparent}.timeline-inner{max-width:870px;margin:0 auto}.day-divider{display:flex;align-items:center;gap:13px;color:#a7b19b;font-size:10px;justify-content:center;margin:0 0 25px}.day-divider:before,.day-divider:after{content:"";width:32px;height:1px;background:#e3eadd}.message{display:flex;gap:10px;margin-bottom:23px;align-items:flex-start}.message.own{flex-direction:row-reverse}.avatar{width:31px;height:31px;flex-shrink:0;display:grid;place-items:center;border:1px solid #e3eadc;background:#fff;border-radius:10px;font-size:11px;color:#718b66}.avatar.self{background:#dfeedd;border-color:#d6e6d2;color:#54774e;border-radius:50%}.avatar.algo{background:#eaf1f7;border-color:#dce7ed;color:#608097}.avatar.front{background:#f7efe3;border-color:#eee2ce;color:#987a51}.avatar .icon{width:18px;height:18px}.message-body{min-width:0;max-width:min(80%,660px)}.message-meta{display:flex;gap:8px;align-items:center;color:#8b987e;font-size:10px;margin:0 0 6px 2px}.message.own .message-meta{justify-content:flex-end;margin-right:3px}.message-name{color:#5d7152;font-size:11px;font-weight:500}.message-text{font-size:13px;line-height:1.85;overflow-wrap:anywhere;white-space:pre-wrap;padding:13px 16px;border:1px solid #e5ebdf;border-radius:0 11px 11px 11px;background:#fff;color:#42503a}.message.own .message-text{background:#e8f2e3;border-color:#dcebd4;border-radius:11px 0 11px 11px;color:#354d2d}.message-text strong{font-weight:600;color:#2e4825}.message-text p{margin:0 0 9px;white-space:normal}.message-text p:last-child{margin:0}.message-text ul{padding-left:18px;margin:7px 0 0;white-space:normal}.message-text li{padding:2px 0}.message-text code{padding:1px 4px;background:#f0f4eb;border:1px solid #e7eddf;border-radius:4px;font-size:11px;font-family:Consolas,monospace}.message.system{display:block;text-align:center;color:#9aa58d;font-size:10px;margin:15px 0}.message.system .system-label{background:#eef2e8;border-radius:4px;padding:4px 8px;display:inline-block}.human-tag{font-size:9px;color:#a28959;padding:0 4px;border-radius:3px;background:#f5efdf}
    .approval-card{border:1px solid #e8d7b0;background:#fffcf4;border-radius:10px;margin-top:12px;overflow:hidden;white-space:normal;min-width:0}.approval-top{display:flex;align-items:center;gap:8px;padding:12px 15px 0;color:#aa7e2f;font-size:11px;font-weight:550}.approval-top .icon{width:15px;height:15px}.approval-body{padding:8px 15px 13px}.approval-title{font-size:13px;font-weight:600;color:#5b4a2b}.approval-desc{font-size:11px;color:#a1957b;line-height:1.8;margin:5px 0 10px}.approval-detail{font-size:11px;color:#8f7f5d}.approval-detail summary{cursor:pointer}.approval-detail pre{white-space:pre-wrap;font:11px/1.8 Consolas,"Microsoft YaHei",monospace;padding:9px 11px;border:1px solid #eee7d8;border-radius:5px;background:#fffdf8;color:#746442;margin:8px 0 0}.approval-footer{border-top:1px solid #efe6d2;padding:11px 15px;display:flex;gap:8px;align-items:center;background:#fffbf0}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:6px 13px;border:1px solid #dfe5d8;border-radius:7px;background:#fff;font-size:12px;line-height:1.5}.btn:hover{background:#f5f8f0}.btn.primary{background:var(--green);border-color:var(--green);color:#fff}.btn.primary:hover{background:var(--green-dark)}.btn .icon{width:14px;height:14px}.btn.danger{color:var(--danger);border-color:#ebd9d4;background:#fff}.btn.danger:hover{background:#fff4f0}.approval-resolved{display:flex;align-items:center;gap:7px;padding:12px 15px;color:#758366;background:#f7f9ef;border:1px solid #e5ebda;border-radius:8px;font-size:11px;margin-top:10px}.approval-resolved .icon{width:15px;height:15px}
    .composer-area{flex-shrink:0;padding:12px 28px 18px;background:var(--canvas)}.composer-inner{max-width:870px;margin:auto}.composer-box{border:1px solid #dbe4d2;border-radius:12px;background:#fff;box-shadow:0 3px 12px #304a2510;transition:border-color .2s}.composer-box:focus-within{border-color:#9cba88;box-shadow:0 0 0 3px #347b5608}.composer-box textarea{display:block;resize:none;overflow-y:auto;max-height:122px;min-height:56px;width:100%;border:0;background:transparent;padding:15px 16px 5px;color:var(--ink);font-size:13px;line-height:1.65}.composer-box textarea::placeholder{color:#a4af9a}.composer-bottom{padding:8px 12px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px}.composer-left,.composer-right{display:flex;align-items:center;gap:7px}.compose-hint{color:#a4ae98;font-size:10px}.composer-role{display:flex;align-items:center;gap:5px;color:#8d9b80;font-size:10px}.composer-role .icon{width:13px;height:13px}.send-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:64px;height:32px;padding:0 12px;border:0;border-radius:7px;background:var(--green);color:#fff;font-size:12px}.send-btn .icon{width:14px;height:14px}.send-btn:hover{background:var(--green-dark)}.stop-btn{display:inline-flex;gap:5px;align-items:center;border:1px solid #e6eadd;background:#fff;color:#79856b;height:29px;padding:0 8px;border-radius:6px;font-size:10px}.stop-btn .icon{width:11px;height:11px}.composer-footnote{margin-top:8px;color:#abb39f;font-size:10px;display:flex;align-items:center;justify-content:space-between;gap:8px}.prototype-mark{color:#a9b39b}.typing{display:flex;gap:4px;align-items:center;height:16px}.typing span{width:4px;height:4px;border-radius:50%;background:#9bb18c;animation:pulse 1.4s infinite}.typing span:nth-child(2){animation-delay:.2s}.typing span:nth-child(3){animation-delay:.4s}
    .mobile-nav{display:none}.mobile-new{display:none}.detail-panel{position:absolute;z-index:15;right:0;top:0;bottom:0;width:300px;background:#fff;border-left:1px solid var(--line);box-shadow:-10px 0 30px #30402508;overflow:auto}.detail-head{display:flex;align-items:center;justify-content:space-between;padding:23px 20px;border-bottom:1px solid var(--line);font-weight:550}.detail-content{padding:24px 22px}.detail-label{font-size:11px;color:#9ba48f;margin-bottom:7px}.detail-value{font-size:13px;color:#516447;overflow-wrap:anywhere;margin-bottom:23px}.member-row{display:flex;align-items:center;gap:10px;margin-bottom:13px}.member-row small{display:block;color:#a2ad95;font-size:10px}.detail-note{padding:13px;background:#f5f8f0;border:1px solid #e6ecdd;border-radius:8px;font-size:11px;line-height:1.9;color:#7e8e6c}.detail-code{font-family:Consolas,monospace;font-size:11px;color:#7b886a}.detail-shade{position:absolute;inset:0;background:#23342618;z-index:14}
    .login-screen{position:absolute;inset:0;display:grid;grid-template-columns:1fr 1fr;background:#fff;overflow:auto;z-index:30}.login-story{display:flex;flex-direction:column;justify-content:space-between;padding:43px 48px;background:#f2f6ef;border-right:1px solid #e3ebdd}.login-story .brand-name{font-size:20px}.login-story-main{padding:35px 0;max-width:400px}.eyebrow{font-size:11px;letter-spacing:2px;color:#8c9f7c;margin-bottom:16px}.login-story h1{font-size:34px;line-height:1.5;letter-spacing:-1px;font-weight:550;margin:0 0 18px;color:#345031}.login-story p{font-size:13px;line-height:2;color:#8b9c7e;max-width:305px}.story-window{margin-top:30px;background:#ffffffba;border:1px solid #dce7d4;border-radius:12px;padding:16px;max-width:320px}.story-window-head{display:flex;align-items:center;gap:6px;font-size:10px;color:#8b9b7e;padding-bottom:14px;border-bottom:1px solid #edf1e7}.story-window-head .icon{width:12px;height:12px}.story-row{display:flex;gap:9px;align-items:center;margin-top:13px}.story-row .avatar{width:25px;height:25px;font-size:9px;border-radius:7px}.story-line{height:6px;background:#e8efdf;border-radius:3px;width:148px}.story-line.short{width:100px;margin-top:6px;background:#f0f4eb}.login-story-foot{font-size:10px;color:#98a88a;letter-spacing:.5px}.login-form-wrap{display:flex;align-items:center;justify-content:center;padding:40px 38px}.login-form{width:100%;max-width:320px}.login-form h2{font-size:24px;font-weight:550;margin:0 0 7px;letter-spacing:-.4px}.login-intro{font-size:12px;color:#9ba68f;margin:0 0 30px}.field{display:block;margin-bottom:18px}.field-label{display:block;font-size:12px;color:#647759;margin-bottom:8px}.field input,.field textarea,.field select{width:100%;padding:10px 12px;border:1px solid #dfe7d7;border-radius:7px;background:#fff;color:#425938;font-size:13px}.field input:focus,.field textarea:focus,.field select:focus{border-color:#93b37f;outline:2px solid #347b560c;outline-offset:0}.field textarea{resize:vertical;min-height:105px;line-height:1.75}.login-submit{width:100%;margin-top:6px;height:42px}.login-note{margin-top:18px;font-size:11px;color:#9aa88c;text-align:center}.login-mode-note{margin-top:34px;padding-top:20px;border-top:1px solid #edf1e8;font-size:11px;color:#a1ad93;display:flex;gap:6px;align-items:flex-start}.login-mode-note .icon{width:13px;height:13px;margin-top:3px;flex-shrink:0}.login-mobile-brand{display:none}.field-note{font-size:11px;color:#a4ae98;line-height:1.8;margin-top:6px}.form-error{font-size:12px;color:#b2604e;margin:5px 0 10px}.login-password{position:relative}.login-password input{padding-right:42px}.password-toggle{position:absolute;right:7px;top:7px}
    .modal-overlay{position:absolute;inset:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:24px;background:#253b2940;backdrop-filter:blur(2px)}.modal{width:440px;max-width:100%;max-height:100%;background:#fff;border:1px solid #e3e9da;border-radius:14px;box-shadow:0 25px 80px #23382530;overflow:auto}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:22px 24px 12px;gap:10px}.modal-head h2{margin:0;font-size:18px;font-weight:550}.modal-body{padding:8px 24px 22px}.modal-intro{color:#95a086;font-size:12px;margin:0 0 21px}.modal-footer{padding:14px 24px;border-top:1px solid #eaf0e1;display:flex;justify-content:flex-end;gap:9px;background:#fafbf7;border-radius:0 0 14px 14px}.peer-option{display:flex;align-items:center;gap:12px;text-align:left;width:100%;padding:12px;border:1px solid #e1e8d9;border-radius:8px;background:#fff;margin-bottom:9px}.peer-option.selected{border-color:#8aab76;background:#f3f8ee}.peer-option .peer-copy{flex:1;min-width:0}.peer-option strong{font-size:12px;font-weight:550;display:block}.peer-option small{font-size:10px;color:#9baa8c}.peer-option .radio{border:1px solid #cdd9c2;width:15px;height:15px;border-radius:50%}.peer-option.selected .radio{border:4px solid var(--green);background:#fff}.scope-note{display:flex;gap:8px;align-items:center;padding:10px 12px;background:#f1f5f7;border:1px solid #e2e9ed;border-radius:7px;color:#7d919e;font-size:11px;margin:8px 0 19px}.scope-note .icon{width:15px;height:15px}.toast{position:absolute;bottom:28px;left:50%;transform:translateX(-50%);z-index:80;padding:10px 16px;border-radius:9px;background:#2f4736;color:#fff;font-size:12px;box-shadow:0 8px 25px #2a462530;max-width:calc(100% - 36px);white-space:normal;text-align:center;pointer-events:none}.empty-state{padding:50px 18px;color:var(--muted);text-align:center;font-size:12px}
    @keyframes pulse{0%,100%{opacity:.45}50%{opacity:1}}
    @container peer (max-width: 1050px){.workspace{grid-template-columns:248px minmax(0,1fr)}.chat-header{padding:5px 20px}.chat-title{font-size:15px}.timeline{padding:22px 20px 12px}.composer-area{padding:12px 20px 15px}.message-body{max-width:85%}.login-story{padding:35px}.login-story h1{font-size:29px}}
    @container peer (max-width: 680px){
      .app-header{height:48px;padding:0 18px}.brand-name{font-size:16px}.brand-symbol{width:29px;height:29px;border-radius:9px}.brand-sub,.user-name,.user-role,.user-menu>.icon{display:none}.user-menu{padding:0}.user-circle{width:29px;height:29px;font-size:11px}
      .workspace{display:block;position:relative}.sidebar{position:absolute;inset:0;border:0}.sidebar-top{padding:19px 18px 12px}.tabs{padding:4px;margin-bottom:15px}.tab{padding:9px 3px;font-size:13px}.search-box{padding:8px 10px}.search-box input{font-size:13px}.sidebar-action{padding:7px 21px 13px}.sidebar-caption{font-size:11px}.text-btn{font-size:12px}.conversation-list{padding:0 10px 15px}.conversation-item{padding:15px 12px;margin-bottom:5px;border-radius:10px;gap:12px}.list-icon{width:40px;height:40px;border-radius:11px}.list-icon .icon{width:18px;height:18px}.list-title{font-size:13px}.list-preview{font-size:12px;margin-top:4px}.list-meta{font-size:11px;margin-top:8px}.list-time{font-size:11px}.sidebar-footer{padding:14px 20px;font-size:11px}.chat{position:absolute;inset:0;display:none}.app[data-view="chat"] .sidebar{display:none}.app[data-view="chat"] .chat{display:flex}.app[data-view="chat"] .app-header{display:none}.back-button{display:inline-grid;width:24px;margin-left:-4px}.chat-header{min-height:60px;padding:14px 15px;gap:8px}.chat-heading{gap:7px;flex:1;overflow:hidden}.chat-title{font-size:14px;max-width:100%}.chat-subtitle{font-size:10px;gap:6px;margin-top:4px}.chat-actions{gap:5px;flex-direction:column-reverse;align-items:flex-end}.chat-actions .icon-btn{height:20px;width:25px}.status-pill{font-size:9px;gap:4px}.status-pill .tiny-dot{width:5px;height:5px}.mode-badge{font-size:9px;padding:0 4px}.chat-subtitle .project-caption{max-width:148px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
      .timeline{padding:21px 14px 10px}.day-divider{margin-bottom:23px}.message{gap:7px;margin-bottom:20px}.avatar{width:27px;height:27px;font-size:10px;border-radius:8px}.avatar .icon{width:15px;height:15px}.message-body{max-width:calc(100% - 34px)}.message-meta{font-size:9px;gap:6px;margin-bottom:5px}.message-name{font-size:10px}.message-text{font-size:13px;padding:11px 12px;line-height:1.8}.message.own .message-body{max-width:86%}.message.system{font-size:9px}.approval-top{padding:11px 12px 0}.approval-body{padding:8px 12px 12px}.approval-title{font-size:12px}.approval-desc{font-size:10px}.approval-footer{padding:10px 12px;gap:7px}.approval-footer .btn{font-size:11px;padding:6px 10px;min-height:32px}.approval-resolved{padding:10px 12px;font-size:10px}
      .composer-area{padding:10px 12px max(12px,env(safe-area-inset-bottom));border-top:1px solid #e7eddf;background:#fff}.composer-box{border-radius:10px;box-shadow:none;background:#fbfcf8}.composer-box textarea{font-size:16px;min-height:50px;padding:11px 12px 4px;line-height:1.5}.composer-bottom{padding:6px 9px 9px}.compose-hint{display:none}.composer-role{font-size:9px}.composer-role .icon{width:12px;height:12px}.send-btn{height:30px;min-width:56px;font-size:11px}.composer-footnote{font-size:9px;margin-top:7px}.prototype-mark{display:none}.stop-btn{font-size:9px;height:26px;padding:0 6px}.detail-panel{width:min(300px,88%)}
      .login-screen{display:flex;align-items:center;justify-content:center;padding:27px 24px;background:#fbfcf8}.login-story{display:none}.login-form-wrap{padding:0;width:100%;max-width:330px}.login-mobile-brand{display:flex;margin-bottom:43px}.login-form h2{font-size:25px}.login-intro{margin-bottom:26px}.field input,.field select,.field textarea{font-size:16px;padding:11px 12px}.login-password input{padding-right:42px}.password-toggle{top:10px}.login-submit{height:44px}.login-mode-note{margin-top:28px}.modal-overlay{padding:10px;align-items:center}.modal{max-height:calc(100% - 10px);border-radius:12px}.modal-head{padding:19px 19px 9px}.modal-head h2{font-size:17px}.modal-body{padding:8px 19px 17px}.modal-footer{padding:13px 19px}.modal .field{margin-bottom:16px}.modal .field textarea{min-height:95px}.modal-intro{font-size:11px;margin-bottom:17px}.toast{bottom:135px;font-size:11px}
    }
    @container peer (max-width:680px){.back-button{width:32px;height:44px}.chat-heading>div{min-width:0}.chat-actions .icon-btn{height:32px;width:32px}.chat-actions{gap:0}.chat-header{padding-top:6px;padding-bottom:6px}.send-btn{height:38px}.stop-btn{height:32px}.approval-footer .btn{min-height:38px}.user-menu{min-width:44px;min-height:44px;justify-content:flex-end}}
    @media(max-width:600px){.preview-bar{height:38px;padding:0 12px;font-size:10px}.preview-left{gap:7px}.preview-description,.preview-sep{display:none}.preview-tools{gap:4px}.device-switch{padding:2px;gap:0}.device-switch button{font-size:10px;padding:2px 6px}.quiet-btn{font-size:10px;padding:3px 4px}.quiet-btn .icon{width:12px;height:12px;margin-right:0}.reset-label{display:none}.stage{height:calc(100dvh - 38px);padding:0}.frame{border-radius:0;border-left:0;border-right:0;max-width:none}body[data-preview="mobile"] .frame{width:100%;max-height:none;border:0;border-radius:0}.frame{box-shadow:none}}
    @media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
  
/* 正式工作台沿用原型布局，按实际视口自动切换。 */
.stage{height:100dvh;padding:16px}.icon-defs{position:absolute;width:0;height:0;overflow:hidden}.chat-heading>div{min-width:0}.notice{font-size:12px;padding:12px 20px;color:#967639;background:#fff9ec;border-bottom:1px solid #f0e5ca}.empty-chat{margin:16vh auto;text-align:center;color:#8d9c83;line-height:2}.tool-card{font-size:12px}.tool-card summary{cursor:pointer;color:#6a8059}.tool-card pre,.request-details{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.7 Consolas,monospace;margin:8px 0 0;max-height:280px;overflow:auto}.question-form{padding:10px 15px}.question-form .field{margin:8px 0 13px}.question-form .field-label{font-size:12px}.message.system{white-space:pre-wrap}.message-text:empty{display:none}.list-preview{display:block}.detail-head{gap:12px}.field-note.error{color:#b4544c}.peer-option:disabled{opacity:.5}.question-option{font-size:11px;color:#8a987d;margin:3px 0}.chat.offline .status-pill{color:#b4544c}.login-form .login-note{margin-top:24px}.user-menu{min-height:44px}.modal-footer .btn{min-height:38px}.approval-top{padding-bottom:6px}.refresh-button{font-size:11px;color:#698459;border:0;background:transparent}.messages-loading{padding:30px;color:#8d9c83}.plan-view{font-size:12px;color:#839575;margin:0 0 14px;padding:10px 14px;background:#eef4e9;border-radius:8px}.busy{opacity:.65;pointer-events:none}
@media(max-width:600px){.stage{height:100dvh;padding:0}.notice{padding:9px 14px;font-size:11px}.modal-footer{position:sticky;bottom:0;z-index:1}.login-screen{align-items:safe center}.question-form .field input{font-size:16px}}

/* 聊天输入只在外层圆角容器提示焦点，避免文本区叠加方形描边。 */
.composer-box textarea:focus { outline: none; }

/* 图片附件沿用聊天配色；预览可横向滚动，避免挤出手机发送按钮。 */
.image-button {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 8px; border: 1px solid #e0e8d9;
  border-radius: 6px; background: #fff; color: #617d50; font-size: 11px;
}
.image-button .icon { width: 16px; height: 16px; }
/* 新建任务沿用聊天缩略图，弹窗内去掉额外缩进并保留图片操作的触控高度。 */
.new-task-images .image-button { min-height: 36px; }
.new-task-images .image-preview { padding: 8px 0 0; }
.new-task-images .image-draft button { width: 28px; height: 28px; }
.image-preview { display: flex; gap: 10px; overflow-x: auto; padding: 12px 14px 0; }
.image-draft { position: relative; flex: 0 0 80px; min-width: 0; }
.image-draft img {
  display: block; width: 80px; height: 68px; object-fit: cover;
  border: 1px solid #e0e8d9; border-radius: 7px; background: #f1f5ed;
}
.image-draft span {
  display: block; margin-top: 4px; overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis; font-size: 10px; color: #809274;
}
.image-draft button {
  position: absolute; top: 3px; right: 3px; display: grid; place-items: center;
  width: 24px; height: 24px; border: 1px solid #dbe4d2; border-radius: 50%;
  background: #fff; color: #536c46;
}
.image-draft button .icon { width: 13px; height: 13px; }
.message-images { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; white-space: normal; }
.message-images:last-child { margin-bottom: 0; }
.message-images img {
  display: block; max-width: 100%; width: auto; height: auto; max-height: 280px;
  object-fit: contain; border-radius: 7px;
}
.message-image { min-width: 0; max-width: 100%; }
.image-open {
  display: block; max-width: 100%; padding: 0; border: 0; border-radius: 7px;
  background: transparent; cursor: zoom-in;
}
.image-actions { display: flex; gap: 16px; padding-top: 7px; font-size: 12px; }
.image-actions button, .image-actions a {
  padding: 0; border: 0; background: transparent; color: var(--green);
  text-decoration: none; font: inherit; cursor: pointer;
}
.image-actions button:hover, .image-actions a:hover { text-decoration: underline; }
.image-error { display: block; font-size: 12px; color: #967639; padding: 8px 0; }
.image-viewer .modal { width: min(100%, 1000px); }
.image-viewer-body { padding: 10px 20px 20px; text-align: center; }
.image-viewer-body img {
  display: block; max-width: 100%; max-height: calc(100dvh - 200px); width: auto;
  height: auto; object-fit: contain; margin: auto;
}
.image-viewer .btn { text-decoration: none; }
.image-viewer .btn:not(.primary) { color: var(--green); }
.message-body { min-width: 0; }
/* 消息框底部的复制按钮沿用原有紧凑高度。 */
.message-footer {
  display: flex; align-items: center; gap: 12px; margin-top: 9px;
  padding-top: 7px; border-top: 1px solid #e6ecdd; white-space: normal;
}
.message-copy {
  min-height: 0; min-width: 44px; margin-left: auto; flex-shrink: 0; padding: 0 10px; border: 0;
  border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; line-height: inherit;
}
.message-copy:hover { background: var(--green-soft); color: var(--green-dark); }
.markdown { white-space: normal; overflow-wrap: anywhere; line-height: 1.75; }
.markdown p, .markdown ul, .markdown ol, .markdown blockquote, .markdown pre, .markdown-table { margin: 0 0 0.75em; }
.markdown > :last-child { margin-bottom: 0; }
.markdown strong { font-weight: 650; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4, .markdown h5, .markdown h6 {
  margin: 1em 0 0.45em; font-weight: 650; line-height: 1.45; font-size: 1.12em;
}
.markdown h1 { font-size: 1.3em; }
.markdown h2 { font-size: 1.2em; }
.markdown > :first-child { margin-top: 0; }
.markdown ul, .markdown ol { padding-left: 1.5em; }
.markdown li > p { margin-bottom: 0.3em; }
.markdown blockquote { padding: 0.25em 0.8em; border-left: 3px solid #c5d6b9; color: #74826a; }
.markdown code { font-family: Consolas, monospace; font-size: 0.92em; background: #f0f3eb; border-radius: 4px; padding: 0.12em 0.3em; }
.markdown pre { padding: 12px; max-width: 100%; overflow-x: auto; background: #f3f5ef; border-radius: 6px; white-space: pre; }
.markdown pre code { padding: 0; background: transparent; border-radius: 0; }
.markdown a { color: var(--green); text-decoration: underline; }
.markdown hr { border: 0; border-top: 1px solid #e3e9da; margin: 1em 0; }
.markdown-table { max-width: 100%; overflow-x: auto; }
.markdown table { border-collapse: collapse; font-size: 0.95em; }
.markdown th, .markdown td { padding: 6px 10px; border: 1px solid #e3e9da; text-align: left; }
.markdown th { background: #f3f6ee; font-weight: 600; }
@container peer (max-width: 680px) {
  .image-button { min-height: 32px; }
  .composer-left { flex-wrap: wrap; }
}
/* 回合导航沿用工作台的间距和颜色，手机上允许自然换行。 */
.turn-detail { margin-top: 20px; font-size: 12px; line-height: 1.8; }
.turn-link {
  display: block; width: 100%; min-height: 44px; padding: 10px 8px;
  border: 0; border-bottom: 1px solid #e6ecdd; border-radius: 6px;
  background: transparent; color: inherit; font: inherit; text-align: left;
}
.turn-link:hover { background: var(--green-soft); }
.turn-preview { display: block; margin-top: 6px; color: var(--ink); overflow-wrap: anywhere; }
.message.turn-highlight .message-text { outline: 2px solid #75a77d; outline-offset: 3px; }
/* 账号管理沿用工作台的间距和颜色，手机上允许自然换行。 */
.managed-user small { display: block; margin-top: 5px; color: #7e8e6c; overflow-wrap: anywhere; }
.managed-user { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e6ecdd; font-size: 12px; }
.managed-user > div { min-width: 0; }
.managed-user .btn { flex-shrink: 0; }
.user-projects { border: 1px solid #e6ecdd; border-radius: 8px; margin: 0 0 18px; padding: 12px; font-size: 12px; }
.user-projects label { display: flex; align-items: center; gap: 8px; margin: 9px 0; }
.user-projects input, .user-enabled input { width: auto; }
.workspace-add { border: 1px solid #d9e3cd; border-radius: 7px; background: #f3f7ef; color: #51733d; width: 34px; height: 34px; margin-left: 8px; font-size: 23px; line-height: 1; vertical-align: middle; cursor: pointer; }
.workspace-add:focus-visible { outline: 2px solid #769764; outline-offset: 2px; }
.workspace-create { background: #f7faf3; border-top: 1px solid #e6ecdd; padding: 14px 10px; margin-top: 10px; border-radius: 6px; }
.workspace-path { display: block; overflow-wrap: anywhere; font-size: 12px; line-height: 1.8; }
.workspace-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.workspace-actions .btn { min-height: 38px; }
.account-model-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

.conversation-models {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 6px;
  flex: 1;
  min-width: 0;
  max-width: 320px;
  color: #7c8b70;
  font-size: 11px;
}
.conversation-models select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 4px 6px;
  border: 1px solid #dbe4d2;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-overflow: ellipsis;
}
.conversation-models select:disabled { opacity: .65; }
.conversation-models label { min-width: 0; }
.composer-bottom .conversation-models label > span { display: none; }
.detail-panel .conversation-models {
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
  padding: 18px 22px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.detail-panel .conversation-models label > span { display: block; margin-bottom: 5px; }
.fast-toggle { display: flex; align-items: center; justify-content: space-between; min-height: 40px; cursor: pointer; }
.fast-toggle input {
  appearance: none; width: 36px; height: 21px; margin: 0; padding: 2px;
  border: 1px solid #91a18b; border-radius: 12px; background: #e8ede4; cursor: pointer;
}
.fast-toggle input::before {
  content: ''; display: block; width: 15px; height: 15px; border-radius: 50%; background: #576950;
}
.fast-toggle input:checked { background: var(--green); border-color: var(--green); }
.fast-toggle input:checked::before { transform: translateX(15px); background: #fff; }
.fast-toggle input:disabled { opacity: .55; cursor: default; }
.fast-toggle input:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
#conversation-fast-note { display: block; color: #6f7e63; font-size: 11px; }
/* 状态文字只在加载、保存或出错时占行，常态工具栏保持一排。 */
#conversation-model-note { grid-column: 1 / -1; overflow-wrap: anywhere; color: #8d9b80; font-size: 10px; }
.user-enabled { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.account-weekly-quota { margin: 14px 0 20px; padding: 12px 16px; border-radius: 10px; background: var(--green-soft); }
.account-weekly-value { margin: 4px 0; color: var(--green-dark); font-size: 24px; font-weight: 650; }
.account-weekly-quota .field-note { margin: 0; overflow-wrap: anywhere; }

/* 登录页和工作台共用备案页脚，独立占位，避免遮挡手机输入区。 */
body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100dvh;
}
.stage { height: 100%; min-height: 0; }
.site-footer {
  padding: 4px 12px max(4px, env(safe-area-inset-bottom));
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}
.site-footer a { color: var(--green-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* 将固定栏位的留白还给对话记录，消息字号与正文间距沿用现有样式。 */
.stage { padding: 8px; }
.app-header { height: 40px; padding: 0 18px; }
.app-header .brand-symbol, .app-header .user-circle { width: 28px; height: 28px; }
.app-header .user-menu { min-height: 36px; padding-top: 2px; padding-bottom: 2px; }
.app-header .user-menu > div { display: flex; align-items: center; gap: 8px; }
.chat-header { min-height: 44px; padding: 4px 20px; gap: 10px; }
.chat-heading { flex: 1; }
.chat-heading > div { display: flex; align-items: center; gap: 12px; width: 100%; }
.chat-title { flex: 0 1 auto; }
.chat-subtitle { min-width: 0; margin-top: 0; flex-wrap: nowrap; }
.chat-subtitle .mode-badge { flex-shrink: 0; }
.chat-subtitle .project-caption { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-actions { gap: 8px; }
.composer-area { padding: 6px 20px 8px; }
.composer-box textarea { min-height: 40px; padding: 8px 12px; }
/* 空输入时占位提示保持单行，避免窄屏清空内容后再次被提示撑高。 */
.composer-box textarea::placeholder { white-space: nowrap; }
.composer-bottom { align-items: flex-start; flex-wrap: nowrap; justify-content: flex-start; gap: 8px; padding: 2px 10px 4px; }
.composer-bottom > .image-button, .composer-bottom > .send-btn { height: 36px; flex-shrink: 0; white-space: nowrap; }
.composer-bottom > .send-btn { margin-left: auto; }
.composer-role, .stop-btn { flex-shrink: 0; white-space: nowrap; }
.composer-footnote { align-items: center; gap: 8px; min-width: 0; margin-top: 3px; line-height: 1.5; }
#composer-footnote { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.refresh-button { flex-shrink: 0; white-space: nowrap; }
.site-footer { padding: 2px 12px max(2px, env(safe-area-inset-bottom)); font-size: 11px; line-height: 16px; }

/* 手机输入区的图片和发送按钮分居两端，中断按钮放在顶部运行状态旁。 */
@container peer (max-width: 680px) {
  .app-header { height: 44px; padding: 0 14px; }
  .app-header .user-menu { min-height: 44px; }
  .chat-header { min-height: 52px; padding: 4px 10px; gap: 6px; }
  .chat-heading { gap: 6px; }
  .chat-heading > div { display: block; }
  .chat-subtitle { margin-top: 1px; }
  .chat-actions { flex-direction: row; gap: 2px; align-items: center; }
  .chat-actions > .stop-btn { width: 32px; padding: 0; justify-content: center; }
  /* 保留动态按钮名称供读屏识别，手机仅显示停止图标以免挤压会话标题。 */
  .chat-actions > .stop-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .composer-area { padding: 6px 10px max(6px, env(safe-area-inset-bottom)); }
  .composer-box textarea { min-height: 40px; padding: 8px 10px; }
  .composer-bottom { gap: 6px; padding: 2px 8px 6px; }
  .conversation-models { grid-template-columns: minmax(0, 1fr) 68px; font-size: 12px; }
  .composer-bottom > .send-btn .icon { display: none; }
  .composer-footnote { font-size: 9px; }
}
/* 最窄手机仅在输入栏有模型选项时收起图片文字。 */
@container peer (max-width: 360px) {
  .composer-bottom:has(> .conversation-models:not([hidden])) > .image-button { width: 36px; justify-content: center; padding: 0; }
  .composer-bottom:has(> .conversation-models:not([hidden])) > .image-button span { display: none; }
}
@media (max-width: 600px) {
  .stage { padding: 0; }
}
