/* Neutral workspace styles are scoped; the administrator retains its layout. */
.workspace{--bg:#fff;--paper:#fff;--ink:#1a1a1a;--text:#2a2a2a;--muted:#888;--line:#e8e8e8;--primary:#3B6DFF;--primary-hover:#2952CC;--primary-light:#E8EEFF;--success:#10B981;--warning:#F59E0B;--error:#EF4444;--surface-0:#FFFFFF;--surface-1:#FAFAFA;--surface-2:#F5F5F5;--surface-3:#F0F0F0;background:#fff;color:#2a2a2a;overflow:hidden;font-family:"Segoe UI","PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-size:17px}
.workspace button,.workspace input,.workspace select,.workspace textarea{font-family:inherit}.workspace-shell{display:grid;grid-template-columns:260px minmax(0,1fr);height:100dvh;min-height:0}.task-sidebar{display:flex;flex-direction:column;background:#fafafa;padding:25px 13px 12px;border-right:1px solid #e8e8e8;min-height:0;z-index:30}.workspace-brand{padding:0 13px;display:flex;align-items:center;justify-content:space-between;height:35px;margin-bottom:26px}.workspace-brand a{font-size:26px;font-weight:750;letter-spacing:-.8px;color:#1a1a1a}.workspace-brand a span{font-size:17px;font-weight:500;color:#666;margin-left:10px;letter-spacing:0}.new-task{display:flex;align-items:center;gap:12px;margin:0 4px 20px;padding:12px 16px;border:1.5px solid var(--primary);background:var(--primary);color:#fff;border-radius:12px;text-align:left;font-size:17px;font-weight:600;transition:all .2s;box-shadow:0 2px 8px rgba(59,109,255,.2)}.new-task:hover{background:var(--primary-hover);box-shadow:0 4px 12px rgba(59,109,255,.3);transform:translateY(-1px)}.new-task:active{transform:translateY(0)}.new-task span{font-size:22px;line-height:1}.task-list{flex:1;overflow:auto;min-height:0;padding:0 1px;scrollbar-width:thin;scrollbar-color:#ddd transparent}.task-item{width:100%;display:flex;gap:10px;align-items:center;text-align:left;border:0;border-radius:10px;background:transparent;padding:12px 12px;margin-bottom:3px;color:#505050;font-size:16px;line-height:1.4;transition:all .15s}.task-item:hover{background:#f0f0f0}.task-item.active{background:#e8eeff;color:#1a1a1a;font-weight:500;border-left:3px solid var(--primary);padding-left:9px}.task-item-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.task-item-status{width:8px;height:8px;border-radius:50%;background:#bbb;flex-shrink:0;transition:all .3s}.task-item-status.running{background:var(--success);box-shadow:0 0 8px rgba(16,185,129,.4);animation:breathe 1.5s ease-in-out infinite}.task-item-status.unread{background:var(--primary);box-shadow:0 0 6px rgba(59,109,255,.4)}.sidebar-loading{padding:18px 13px;color:#999;font-size:15px}.sidebar-bottom-user{position:relative;padding-top:10px;margin-top:10px;border-top:1px solid #ebebeb}.user-trigger{width:100%;display:flex;align-items:center;gap:10px;background:transparent;border:0;border-radius:11px;padding:10px;color:#333}.user-trigger:hover,.user-trigger[aria-expanded=true]{background:#ececec}.user-avatar{display:grid;place-items:center;width:31px;height:31px;border-radius:50%;background:#dededb;font-size:16px;font-weight:600;flex-shrink:0}.sidebar-user-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font-size:16px}.user-trigger>svg{color:#888}
.chat-main{display:flex;flex-direction:column;min-width:0;min-height:0;background:#fff;position:relative}.chat-header{height:76px;min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 32px}.chat-header-left{display:flex;align-items:center;gap:14px;min-width:0}.plain-icon{display:inline-flex;align-items:center;justify-content:center;background:none;border:0;color:#666;width:38px;height:38px;border-radius:10px;flex-shrink:0;cursor:pointer;transition:all .2s}.plain-icon:hover{background:#f0f0f0;color:#1a1a1a;transform:scale(1.05)}.plain-icon:active{transform:scale(0.95)}.plain-icon:disabled{opacity:.35;cursor:not-allowed}.task-title{border:0;background:none;max-width:400px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font-size:17px;font-weight:500;color:#6d6d6d;padding:5px 0}.task-title:hover{color:#222}.model-control{display:flex;align-items:center;min-width:0;position:relative;color:#858585}.model-control select{border:0;box-shadow:none!important;padding:8px 28px 8px 12px;min-height:38px;max-width:220px;appearance:none;font-size:15px;background:var(--surface-1);color:#555;text-overflow:ellipsis;cursor:pointer;border-radius:10px;transition:all .2s;font-weight:500}.model-control select:hover{background:var(--surface-2)}.model-control>span:last-child{position:absolute;right:8px;pointer-events:none}.chat-scroller{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;scroll-behavior:auto;scrollbar-width:thin;scrollbar-color:#ddd transparent}.chat-messages{width:min(100% - 64px,780px);margin:0 auto;padding:18px 0 24px;min-height:100%}.task-empty{display:flex;align-items:center;justify-content:center;min-height:calc(100dvh - 320px);padding:40px 20px}.welcome-guide{max-width:560px;width:100%}.welcome-guide h2{font-size:28px;font-weight:600;color:#2a2a2a;margin:0 0 32px;letter-spacing:-.6px;text-align:center}.feature-list{list-style:none;padding:0;margin:0 0 32px;display:flex;flex-direction:column;gap:14px}.feature-list li{display:flex;align-items:center;gap:16px;padding:16px 20px;background:#fafafa;border:1px solid #f0f0f0;border-radius:14px;transition:all .2s;cursor:default}.feature-list li:hover{background:#f5f5f5;border-color:#e8e8e8;transform:translateY(-1px)}.feature-icon{font-size:28px;line-height:1;flex-shrink:0}.feature-list>li>div{flex:1;min-width:0}.feature-list strong{display:block;font-size:17px;font-weight:600;color:#222;margin-bottom:4px;letter-spacing:-.2px}.feature-list p{margin:0;font-size:15px;color:#666;line-height:1.5}.welcome-hint{font-size:16px;color:#999;text-align:center;margin:0;line-height:1.6}.chat-message{margin:0 0 28px;line-height:1.8;font-size:17px;overflow-wrap:anywhere;animation:fadeInUp .3s ease-out}@keyframes fadeInUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.user-message{display:flex;flex-direction:column;align-items:flex-end;margin-bottom:32px}.user-bubble{max-width:min(85%,640px);padding:13px 18px;background:var(--primary-light);border:1px solid rgba(59,109,255,.12);border-radius:18px 18px 4px 18px;white-space:pre-wrap;font-size:17px;color:#1a1a1a;box-shadow:0 1px 3px rgba(0,0,0,.05);transition:all .2s}.assistant-message{position:relative;padding:0 2px}
.markdown{line-height:1.85;font-size:17px;color:#333}.markdown>p{margin:0 0 15px}.markdown p:last-child{margin-bottom:0}.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{color:#292929;margin:24px 0 12px;line-height:1.55;letter-spacing:0}.markdown h2{font-size:24px}.markdown h3{font-size:20px}.markdown h4,.markdown h5,.markdown h6{font-size:18px}.markdown ul,.markdown ol{padding-left:24px;margin:12px 0 18px}.markdown li{padding-left:3px;margin:5px 0}.markdown li::marker{color:#555}.markdown code{background:#f0f0f0;padding:2px 5px;border-radius:4px;font-size:16px;font-family:Consolas,"Cascadia Code",monospace}.markdown a{color:#315b83;text-decoration:underline;text-underline-offset:3px}.markdown hr{height:1px;border:0;background:#e8e8e8;margin:25px 0}.markdown blockquote{border-left:3px solid #dcdcdc;padding:4px 16px;color:#777;margin:17px 0}.code-block{border:1px solid #e0e0e0;background:#f8f9fa;border-radius:12px;overflow:hidden;margin:18px 0;box-shadow:0 2px 8px rgba(0,0,0,.04)}.code-heading{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#666;padding:10px 14px;border-bottom:1px solid #e8e8e8;background:#f0f1f3}.code-heading button{border:0;background:var(--primary-light);color:var(--primary);font-size:13px;padding:5px 10px;border-radius:6px;font-weight:500;transition:all .2s}.code-heading button:hover{background:var(--primary);color:#fff}.code-block pre{margin:0;overflow:auto;padding:16px;line-height:1.7;tab-size:2;background:#fafbfc}.code-block pre code{background:transparent;border-radius:0;padding:0;font-size:14px;white-space:pre;font-family:'Cascadia Code',Consolas,monospace}.md-table-wrap{overflow:auto;margin:16px 0}.markdown table{min-width:350px;font-size:16px}.markdown th,.markdown td{padding:9px 12px;max-width:none;white-space:normal;border:1px solid #e5e5e5;background:white}.markdown th{background:#f6f6f6}
.process-entry{margin:9px 0 16px;padding-left:14px;border-left:2px solid #eeeeec;font-size:15px;color:#858585}.process-entry summary{display:flex;gap:8px;align-items:center;list-style:none;cursor:pointer;line-height:1.6;padding:3px 0;min-width:0}.process-entry summary::-webkit-details-marker{display:none}.process-entry summary>span:nth-child(2){flex:1;overflow-wrap:anywhere}.process-entry summary>svg{opacity:.6;transition:transform .15s}.process-entry:not([open]) summary>svg{transform:rotate(-90deg)}.process-dot{display:inline-block;width:5px;height:5px;border-radius:50%;background:#a8aaa5;flex-shrink:0}.process-dot.pulsing{animation:breathe 1.3s ease-in-out infinite}.thinking-content{white-space:pre-wrap;color:#858585;padding:8px 0 2px;font-size:16px;line-height:1.8}.tool-label{margin-top:10px;color:#969696;font-size:14px}.tool-content{font-family:Consolas,monospace;font-size:14px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;max-height:340px;overflow:auto;margin:4px 0 0;color:#777;padding:9px 11px;background:#f8f8f8;border-radius:7px}.process-error{border-color:#dbaca2;color:#a76451}.process-latest{display:flex;align-items:center;gap:8px;color:#999;font-size:15px;margin:14px 0;min-width:0}.process-latest>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.run-error{color:#a14d40;background:#fff4f1;border-radius:9px;padding:11px 13px;font-size:16px;margin:12px 0}.run-state{display:flex;align-items:center;gap:8px;font-size:15px;color:#999;margin:12px 0}.reply-copy{display:inline-flex;border:0;background:none;padding:6px;color:#999;border-radius:6px;margin:10px 0 0 -6px}.reply-copy:hover{background:#f4f4f4;color:#555}
.composer-area{width:min(100% - 64px,800px);margin:0 auto;padding-bottom:max(16px,env(safe-area-inset-bottom));background:#fff;flex-shrink:0}.composer{border:1.5px solid #e0e0e0;box-shadow:0 4px 20px rgba(0,0,0,.06);border-radius:24px;padding:14px 14px 10px;background:#fafafa;transition:all .2s}.composer:focus-within{border-color:var(--primary);background:#fff;box-shadow:0 4px 24px rgba(59,109,255,.12)}.composer textarea{resize:none;border:0!important;box-shadow:none!important;background:transparent;padding:1px 5px 9px;line-height:1.65;font-size:17px;min-height:41px;max-height:210px;outline:0;width:100%;color:#353535;scrollbar-width:thin}.composer textarea::placeholder{color:#a0a0a0}.send-button{height:38px;min-width:38px;border:0;background:var(--primary);color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;gap:5px;padding:0 9px;transition:all .2s;box-shadow:0 2px 8px rgba(59,109,255,.3)}.send-button:hover:not(:disabled){background:var(--primary-hover);transform:scale(1.05);box-shadow:0 3px 12px rgba(59,109,255,.4)}.send-button:active:not(:disabled){transform:scale(0.98)}.send-button:disabled{background:#dedede;color:#fff;cursor:default;box-shadow:none}.send-button.stopping{background:#777}.send-button.resume{border-radius:18px;font-size:15px;padding:0 12px}.composer-hint{min-height:20px;text-align:center;font-size:14px;color:#aaa;padding-top:8px}.composer-error{font-size:15px;color:#a05243;padding:9px 12px;margin-bottom:8px;background:#fff4f0;border-radius:8px;overflow-wrap:anywhere}.connection-note{font-size:14px;color:#999;text-align:center;margin:7px 0}.attachment-tray,.message-attachments{display:flex;gap:8px;flex-wrap:wrap;padding:2px 3px 12px}.message-attachments{padding-top:8px;justify-content:flex-end;max-width:100%}.attachment-chip{display:flex;align-items:center;gap:10px;border:1.5px solid #e0e0e0;border-radius:12px;background:white;padding:10px 12px;max-width:235px;font-size:14px;min-width:0;transition:all .2s;box-shadow:0 1px 3px rgba(0,0,0,.06)}.attachment-chip:hover{border-color:#d0d0d0;box-shadow:0 2px 6px rgba(0,0,0,.1)}.attachment-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.attachment-link{display:flex;align-items:center;gap:8px;min-width:0}.attachment-chip img{width:36px;height:36px;object-fit:cover;border-radius:8px;border:1px solid #e8e8e8}.chip-remove{border:0;background:none;display:flex;color:#999;padding:0 0 0 4px;flex:none;transition:all .2s}.chip-remove:hover{color:var(--error);transform:scale(1.1)}.upload-status{color:#999;font-size:14px}.artifacts{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.artifact-image{display:block;width:min(100%,340px)}.artifact-image img{border-radius:12px;border:1px solid #eee;width:100%;height:auto}
.user-menu{position:absolute;bottom:calc(100% + 10px);left:0;width:285px;background:white;border:1px solid #e0e0e0;border-radius:16px;padding:10px;box-shadow:0 12px 48px rgba(0,0,0,.12);z-index:70;animation:slideUp .2s ease-out}@keyframes slideUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.user-menu-heading{padding:8px 10px 12px;font-weight:600;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-balance{padding:18px;background:linear-gradient(135deg,#1a1a1a 0%,#2d2d2d 100%);border-radius:14px;margin-bottom:10px;box-shadow:0 8px 24px rgba(0,0,0,.15);position:relative;overflow:hidden}.user-balance::after{content:'';position:absolute;top:-50%;right:-20%;width:180px;height:180px;background:radial-gradient(circle,rgba(255,255,255,.08) 0%,transparent 70%);border-radius:50%;pointer-events:none}.user-balance>div:first-child{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:rgba(255,255,255,.65);position:relative;z-index:1}.user-balance>strong{display:block;font-size:34px;font-weight:700;margin:6px 0 16px;font-variant-numeric:tabular-nums;color:#fff;letter-spacing:-.8px;position:relative;z-index:1}.balance-reload{border:0;background:none;color:rgba(255,255,255,.5);font-size:21px;line-height:1;padding:0 2px;transition:all .2s}.balance-reload:hover{color:rgba(255,255,255,.9);transform:rotate(180deg)}.balance-links{display:flex;gap:8px;position:relative;z-index:1}.balance-links .button{flex:1;min-height:36px;font-size:14px;font-weight:600;border:1.5px solid rgba(255,255,255,.2);background:rgba(255,255,255,.12);color:#fff;transition:all .2s}.balance-links .button:hover{background:rgba(255,255,255,.2);border-color:rgba(255,255,255,.35);transform:translateY(-1px)}.user-menu-row{display:flex;align-items:center;gap:11px;border:0;background:none;width:100%;padding:11px 12px;border-radius:10px;text-align:left;color:#555;font-size:15px;transition:all .15s}.user-menu-row:hover{background:#f5f5f5;color:#1a1a1a;transform:translateX(2px)}.user-menu-row svg{color:#8d8d8d}.user-menu-divider{height:1px;background:#eee;margin:5px}.workspace .modal{border-radius:18px;border-color:#e7e7e7;box-shadow:0 20px 80px #00000020}.workspace .modal::backdrop{background:#00000035;backdrop-filter:blur(2px)}.workspace .modal-header h2{font-size:22px}.workspace .modal .button.primary{background:#282828;color:white}.workspace .modal .button.secondary{border-color:#e2e2e2;background:white}.workspace .modal input:focus,.workspace .modal textarea:focus,.workspace .modal select:focus{border-color:#bbb;box-shadow:0 0 0 3px #f1f1f1}.workspace .modal .field label{color:#666}.dialog-copy{font-size:16px;line-height:1.8;margin-bottom:14px}.workspace .recharge-user-id{display:block;white-space:normal;overflow-wrap:anywhere;user-select:all;padding:13px;background:#f6f6f6;border-radius:9px;margin:12px 0 16px;font-size:15px}.bill-list{display:flex;flex-direction:column}.bill-row{display:flex;gap:20px;justify-content:space-between;align-items:center;padding:14px 0;border-bottom:1px solid #eee;font-size:16px}.bill-row strong{font-size:16px;font-weight:500}.bill-row small{display:block;font-size:14px;color:#999;margin-top:3px}.bill-row>span{white-space:nowrap;font-variant-numeric:tabular-nums}.bill-credit{color:#478364}.memory-list{margin-top:25px;display:flex;flex-direction:column;gap:16px}.memory-item textarea{font-size:16px;line-height:1.65;min-height:88px}.memory-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:8px}.memory-actions>span{margin-right:auto;font-size:14px;color:#999}.workspace .price-card{padding:0;border:0}.workspace .price-card>.panel-header{display:none}.workspace .api-panel{padding:0;border:0}.workspace .api-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.workspace .api-heading h2{font-size:18px}.workspace .api-note,.workspace .api-guide p{font-size:15px;line-height:1.8;color:#8e8e8e;margin:12px 0}.workspace .api-guide summary{cursor:pointer;font-size:16px;padding:10px 0}.workspace .api-copy-row{display:flex;align-items:center;gap:12px;margin:15px 0}.workspace .api-copy-row>div{flex:1;min-width:0}.workspace .api-copy-row code{display:block;overflow-wrap:anywhere;font-size:15px}.workspace .api-copy-row button{flex:none}.workspace .api-example{font-size:14px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;border-radius:9px;background:#f6f6f6}.workspace .api-key-row{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:14px 0;border-bottom:1px solid #eee;font-size:15px}.workspace .api-key-row small{display:block;font-size:14px;color:#999}.workspace .api-key-list{margin-top:20px}.workspace .api-actions{display:flex;gap:8px;margin-top:10px}.workspace .api-issued{padding:15px;background:#f5f5f5;border-radius:10px;margin-top:15px;font-size:15px}.workspace .api-issued p{margin-bottom:10px}.mobile-only{display:none}#sidebar-toggle{display:none}.sidebar-backdrop{display:none}.workspace .toast{background:#333}.workspace .toast.error{background:#9f483d}@keyframes breathe{50%{opacity:.3}}
@media(max-width:1000px){.workspace-shell{grid-template-columns:225px minmax(0,1fr)}.chat-messages{width:calc(100% - 44px)}.composer-area{width:calc(100% - 44px)}.chat-header{padding:0 23px}.model-control select{max-width:175px}}
@media(max-width:760px){.workspace-shell{display:block}.chat-main{height:100dvh}.task-sidebar{position:fixed;left:0;top:0;bottom:0;width:min(82vw,300px);transform:translateX(-100%);transition:transform .18s ease;padding-top:max(22px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}.workspace.sidebar-open .task-sidebar{transform:translateX(0)}.sidebar-backdrop{display:block;position:fixed;inset:0;background:#00000030;border:0;z-index:25;padding:0}.mobile-only,#sidebar-toggle{display:flex}.chat-header{height:62px;min-height:62px;padding:env(safe-area-inset-top) 16px 0;gap:12px}.chat-header-left{gap:8px;max-width:53%}.task-title{font-size:16px}.model-control select{font-size:15px;max-width:170px;padding-left:4px}.chat-messages{width:calc(100% - 36px);padding:15px 0 15px}.composer-area{width:calc(100% - 24px);padding-bottom:max(10px,env(safe-area-inset-bottom))}.composer{border-radius:22px;padding:13px 11px 9px}.composer textarea{font-size:18px;padding-left:5px;max-height:160px}.task-empty{min-height:calc(100dvh - 260px);padding:24px 16px}.welcome-guide h2{font-size:24px;margin-bottom:24px}.feature-list{gap:12px;margin-bottom:24px}.feature-list li{padding:14px 18px;gap:14px}.feature-icon{font-size:26px}.feature-list strong{font-size:16px;margin-bottom:3px}.feature-list p{font-size:14px}.welcome-hint{font-size:15px}.user-bubble{max-width:91%;padding:10px 15px}.chat-message{font-size:17px;margin-bottom:25px}.markdown{font-size:17px}.markdown h2{font-size:22px}.user-menu{width:calc(100vw - 34px);max-width:320px;left:3px;bottom:calc(100% + 5px)}.workspace .modal{width:calc(100% - 24px);max-height:calc(100dvh - 40px)}.workspace .modal-content{padding:0 20px 22px}.workspace .modal-header{padding:21px 20px 18px}.workspace .modal .field input,.workspace .modal .field select,.workspace .modal .field textarea{font-size:18px}.composer-hint{font-size:13px}.tool-content{max-height:240px}.model-control{max-width:48%}}
@media(prefers-reduced-motion:reduce){.task-sidebar{transition:none}}
.workspace .user-menu{max-height:calc(100dvh - 110px);overflow-y:auto}
.artifact-note{display:flex;align-items:center;gap:8px;font-size:15px;color:#999;padding:10px 13px;border:1px solid #eee;border-radius:9px}
.settings-credentials{display:block;width:100%;margin-top:24px;padding:18px 0 2px;border:0;border-top:1px solid #eee;background:none;color:#555;text-align:left;font-size:16px}.settings-credentials:after{content:'›';float:right;font-size:20px;color:#999}.settings-credentials:hover{color:#111}

/* Shared controls inherit readable workspace sizing without changing admin pages. */
.workspace .modal .field label{font-size:16px}.workspace .modal input,.workspace .modal select,.workspace .modal textarea{font-size:17px;line-height:1.5}.workspace .modal .button{font-size:16px;min-height:44px}.workspace .modal .icon-button{min-width:40px;min-height:40px;font-size:24px}.workspace .field-hint,.workspace .modal-header p{font-size:14px}.workspace .notice,.workspace .empty,.workspace .loading,.workspace .toast{font-size:16px}.workspace .modal table{font-size:15px}.workspace .modal th{font-size:14px}.workspace .modal .badge{font-size:13px}.workspace .price-title strong,.workspace .price-item>strong,.workspace .price-values b{font-size:17px}.workspace .price-values span,.workspace .discount-badge{font-size:14px}.workspace .price-values .original-price{font-size:13px}.workspace .price-values{gap:12px}.workspace .bill-row>div{min-width:0;overflow-wrap:anywhere}.workspace .balance-links .button{min-height:38px}.workspace .user-menu-row{min-height:43px}.workspace .settings-credentials{min-height:48px}.workspace .user-avatar{width:35px;height:35px}
/* One compact row grows with the textarea; notices live above, never below it. */
.workspace .composer-area{padding-bottom:calc(12px + env(safe-area-inset-bottom))}.workspace .composer{padding:6px;border-radius:28px}.workspace .composer-row{display:flex;align-items:flex-end;gap:7px;min-width:0}.workspace .composer-row>.plain-icon,.workspace .composer-row>.send-button{width:44px;height:44px;min-width:44px;flex-shrink:0}.workspace .composer-row>.plain-icon{border-radius:50%}.workspace .composer textarea{display:block;flex:1;width:0;min-width:0;height:44px;min-height:44px;max-height:220px;padding:8px 2px;line-height:28px;font-size:17px;border-radius:0;overflow-y:auto}.workspace .send-button.resume{width:auto;min-width:60px;padding:0 12px;font-size:15px}.workspace .composer-hint{min-height:0;padding:0;margin:0 0 8px;font-size:14px;line-height:1.6}.workspace .composer-hint:empty,.workspace .upload-status:empty{display:none}.workspace .upload-status{padding:2px 8px 6px;font-size:14px}.workspace .composer .attachment-tray{padding:4px 7px 10px}.workspace .composer-error{font-size:15px}.workspace .connection-note{font-size:14px}
@media(max-width:760px){.workspace .composer-area{width:calc(100% - 16px);padding-bottom:calc(12px + env(safe-area-inset-bottom))}.workspace .composer{padding:5px;border-radius:27px}.workspace .composer-row{gap:4px}.workspace .composer textarea{max-height:184px;font-size:17px;padding:8px 1px}.workspace .chat-message,.workspace .markdown,.workspace .user-bubble{font-size:17px}.workspace .task-title,.workspace .model-control select{font-size:15px}.workspace .modal .field input,.workspace .modal .field select,.workspace .modal .field textarea{font-size:17px}.workspace .chat-header-left{max-width:47%}.workspace .model-control{max-width:49%}.workspace .user-menu{max-width:340px}.workspace .modal-content{padding-bottom:24px}}
/* Process rows share the same compact header in detailed and grouped modes. */
.workspace .process-entry,.workspace .process-segment{font-size:16px;color:#747474}.workspace .process-segment{margin:10px 0 18px}.workspace .process-entry>summary,.workspace .process-segment>summary{display:flex;align-items:center;gap:8px;min-width:0;min-height:36px;padding:4px 0;list-style:none;cursor:pointer;line-height:1.5}.workspace .process-entry>summary::-webkit-details-marker,.workspace .process-segment>summary::-webkit-details-marker{display:none}.workspace .process-entry>summary>.process-label,.workspace .process-segment>summary>.process-label{flex:0 1 auto;min-width:0;max-width:46%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#666}.workspace .process-preview{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#888}.workspace .process-state,.workspace .process-count{flex:none;white-space:nowrap;font-size:14px;color:#909090}.workspace .process-entry>summary>svg,.workspace .process-segment>summary>svg{flex:none;width:16px;height:16px;opacity:.65;transition:transform .15s}.workspace .process-segment:not([open])>summary>svg{transform:rotate(-90deg)}.workspace .process-dot{width:6px;height:6px;flex:none}.workspace .process-detail{padding-top:6px;max-height:340px;overflow:auto;scrollbar-width:thin;scrollbar-color:#ddd transparent}.workspace .thinking-content{font-size:16px;line-height:1.8;color:#737373}.workspace .tool-content{font-size:16px;line-height:1.7;color:#686868}.workspace .process-detail .tool-content{max-height:none}.workspace .tool-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;font-size:14px;color:#8a8a8a}.workspace .tool-section-head>span{min-width:0;overflow-wrap:anywhere}.workspace .process-copy{flex:none;border:0;background:transparent;padding:5px 6px;border-radius:5px;font-size:14px;line-height:1.5;color:#777;cursor:pointer}.workspace .process-copy:hover{background:#efefef;color:#333}.workspace .process-segment-body{max-height:340px;overflow:auto;padding:2px 0 0 10px;scrollbar-width:thin;scrollbar-color:#ddd transparent}.workspace .process-segment-body>.process-entry{margin:6px 0 14px;padding-left:12px}.workspace .process-entry.process-error{color:#a76451}.workspace .process-entry.process-error>summary>.process-label{color:#a76451}@media(max-width:760px){.workspace .process-entry>summary,.workspace .process-segment>summary{gap:7px;min-height:40px}.workspace .process-detail,.workspace .process-segment-body{max-height:240px}.workspace .process-segment-body{padding-left:4px}}
.workspace .process-failures{margin:6px 0 14px;padding-left:14px;color:#a15f4e;font-size:14px;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere}
/* Model selection uses a small desktop panel and a phone sheet, with a clear active row. */
.workspace .task-title,.workspace .model-picker-trigger{font-size:17px;line-height:1.5}.workspace .task-title{color:#4c4c4c}.workspace .model-picker-trigger{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:0;max-width:100%;min-height:40px;border:0;border-radius:10px;padding:6px 9px;background:transparent;color:#505050;text-align:left}.workspace .model-picker-trigger:hover{background:#f5f5f5}.workspace .model-picker-trigger:disabled{cursor:default;opacity:.65}.workspace .model-picker-trigger>svg{flex:none;color:#999}.workspace .model-picker-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workspace .model-sheet{position:fixed;top:66px;right:26px;bottom:auto;left:auto;margin:0;width:min(360px,calc(100vw - 32px));max-height:min(70dvh,540px);padding:8px;border:1px solid #e5e5e5;border-radius:17px;box-shadow:0 14px 60px #0000001a;background:white;color:#333;overflow:auto}.workspace .model-sheet::backdrop{background:#0000000a}.workspace .model-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 9px 9px}.workspace .model-sheet-heading h2{font-size:18px;font-weight:550}.workspace .model-sheet-heading>.plain-icon{width:36px;height:36px}.workspace .model-picker-list{display:flex;flex-direction:column;gap:3px}.workspace .model-picker-option{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-height:49px;padding:11px 13px;border:0;border-radius:10px;background:none;color:#555;text-align:left;font-size:17px;line-height:1.5}.workspace .model-picker-option>span{min-width:0;overflow-wrap:anywhere}.workspace .model-picker-option>svg{flex:none;color:#555}.workspace .model-picker-option:hover{background:#f6f6f6}.workspace .model-picker-option.selected{background:#f0f0f0;color:#252525}.workspace .model-picker-option:disabled{opacity:.45;cursor:default}.workspace .model-picker-empty{padding:25px 13px;font-size:16px;color:#888}
/* Keep the native photo picker unrestricted to the album; files use a separate input. */
.workspace .attachment-control{position:relative;flex:none;width:44px;height:44px}.workspace .attachment-control>.plain-icon{width:44px;height:44px;border-radius:50%}.workspace .image-chip{position:relative;display:flex;align-items:center;justify-content:center;width:78px;height:78px;max-width:none;padding:0;border:1px solid #e5e5e5;border-radius:12px;background:#f5f5f5;overflow:visible}.workspace .image-chip img{display:block;width:76px;height:76px;object-fit:cover;border-radius:11px}.workspace .image-chip .attachment-link{display:block;width:100%;height:100%;border-radius:11px;overflow:hidden}.workspace .image-chip .chip-remove{position:absolute;right:-6px;top:-6px;display:grid;place-items:center;width:24px;height:24px;padding:0;border:2px solid #fff;border-radius:50%;background:#666;color:#fff;box-shadow:0 1px 4px #0000001a}.workspace .image-chip .attachment-label{display:none}.workspace .message-attachments .image-chip{width:100px;height:100px}.workspace .message-attachments .image-chip img{width:98px;height:98px}.workspace .thinking-content{font-family:inherit;font-size:14px;line-height:1.5;letter-spacing:0;margin:4px 0 0;padding:4px 0 2px;overflow-wrap:anywhere}
@media(max-width:760px){.workspace .task-title,.workspace .model-picker-trigger{font-size:17px}.workspace .chat-header{gap:9px;padding-left:12px;padding-right:12px}.workspace .chat-header-left{max-width:47%}.workspace .model-control{max-width:50%}.workspace .model-picker-trigger{padding:6px 3px;gap:4px}.workspace .model-sheet{top:auto;right:0;bottom:0;left:0;width:100%;max-width:none;box-sizing:border-box;max-height:75dvh;padding:10px 12px max(16px,env(safe-area-inset-bottom));border:0;border-radius:20px 20px 0 0;box-shadow:0 -10px 50px #00000016}.workspace .model-sheet::backdrop{background:#00000030}.workspace .model-sheet-heading{padding:8px 8px 14px}.workspace .model-picker-option{min-height:54px;padding:13px 15px}.workspace .image-chip{width:72px;height:72px}.workspace .image-chip img{width:70px;height:70px}}
.workspace .artifact-image-link{display:block}.workspace .artifact-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:8px}.workspace .artifact-actions>button,.workspace .artifact-actions>a{display:inline-flex;align-items:center;gap:5px;padding:4px 0;border:0;background:none;color:#777;font-size:14px;line-height:1.6;text-decoration:none}.workspace .artifact-actions>button:hover,.workspace .artifact-actions>a:hover{color:#333}.workspace .artifact-actions>button:disabled{opacity:.5;cursor:wait}


/* A visible delete action works equally with touch and a mouse. */
.workspace .task-row{display:flex;align-items:center;min-width:0;margin-bottom:3px;border-radius:9px}.workspace .task-row:hover{background:#efefef}.workspace .task-row.active{background:#eaeaea}.workspace .task-row>.task-item{flex:1;min-width:0;width:0;margin:0;padding-right:5px;background:transparent}.workspace .task-row>.task-item:disabled{opacity:.55}.workspace .task-delete{display:grid;place-items:center;flex:none;min-width:44px;min-height:40px;padding:5px 7px;margin-right:3px;border:0;border-radius:7px;background:transparent;color:#929292;font-size:14px;line-height:1.4;white-space:nowrap}.workspace .task-delete:hover{background:#f5e8e5;color:#a45e4b}.workspace .task-delete:disabled{opacity:.45;cursor:default}.workspace .delete-task-name{font-size:17px;font-weight:550;line-height:1.6;overflow-wrap:anywhere;margin-bottom:12px}

.workspace .artifact-image-link{padding:0;border:0;background:none;cursor:zoom-in;width:100%}.workspace .artifact-actions>span{font-size:12px;color:#999}
.image-preview{position:fixed;inset:0;margin:auto;width:min(90vw,1100px);max-width:90vw;max-height:88dvh;padding:44px 12px 12px;border:0;border-radius:16px;background:#fff;box-shadow:0 20px 80px #0004;overflow:auto;text-align:center;box-sizing:border-box}.image-preview::backdrop{background:#0009}.image-preview img{display:block;max-width:100%;max-height:calc(88dvh - 95px);width:auto;height:auto;object-fit:contain;margin:auto}.image-preview p{font-size:13px;color:#888;margin:12px 0 0}.image-preview-close{position:absolute;top:6px;right:6px;width:36px;height:36px;border:0;background:#f4f4f4;border-radius:50%;display:grid;place-items:center;color:#444;cursor:pointer}

.workspace button.attachment-link{padding:0;border:0;background:none;cursor:zoom-in}

.attachment-sheet{width:min(340px,calc(100vw - 32px));padding:12px;border:0;border-radius:18px;background:#fff;color:#333;box-shadow:0 12px 60px #0002}.attachment-sheet::backdrop{background:#0005}.attachment-sheet-heading{display:flex;align-items:center;justify-content:space-between;padding:2px 10px 8px}.attachment-native-input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.attachment-choice{position:relative;box-sizing:border-box;display:block;width:100%;min-height:54px;padding:14px 16px;border:0;border-radius:10px;background:none;text-align:left;font-size:17px;color:inherit}.attachment-choice:hover{background:#f3f3f3}.attachment-choice:focus-within{outline:2px solid #527f6b;outline-offset:-2px}@media(max-width:760px){.attachment-sheet{position:fixed;inset:auto 0 0;width:100%;max-width:none;box-sizing:border-box;margin:0;padding:12px 14px max(18px,env(safe-area-inset-bottom));border-radius:20px 20px 0 0}}

.file-preview{width:min(1100px,94vw);height:86dvh;max-width:94vw;padding:0;border:0;border-radius:16px;overflow:hidden;background:white;box-shadow:0 20px 80px #0004}.file-preview::backdrop{background:#0008}.file-preview-heading{height:52px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 14px}.file-preview-heading strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.file-preview iframe{display:block;width:100%;height:calc(100% - 52px);border:0;background:white}.workspace button.attachment-link{color:inherit;font:inherit;text-align:left}

/* Height must reset synchronously before scrollHeight is measured. */
.workspace .composer textarea{transition:none}

.recharge-payment{text-align:center;overflow-wrap:anywhere}.recharge-qr{display:block;width:256px;max-width:100%;height:auto;margin:16px auto;background:#fff}.recharge-payment small{display:block;overflow-wrap:anywhere}

.recharge-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}.recharge-controls button{flex:0 0 auto;margin:0}

.recharge-layout{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:24px;align-items:start}.recharge-main{min-width:0}.recharge-support{text-align:center;border-left:1px solid var(--line);padding-left:20px}.recharge-support h3{font-size:15px;margin:0 0 14px}.recharge-contact-qr{width:156px;max-width:100%;height:auto;background:white;display:block;margin:12px auto}.recharge-wechat-label{color:#07a45c;font-weight:600}.recharge-alipay-label{color:#1677ff;font-size:21px;margin:12px 0 6px}.recharge-settlement-note{text-align:center;font-size:12px}.recharge-payment{border:1px solid #1677ff40;border-radius:12px;padding:12px}.recharge-payment:empty{display:none}@media(max-width:640px){.recharge-layout{grid-template-columns:1fr}.recharge-support{border-left:0;border-top:1px solid var(--line);padding:20px 0 0}}

.recharge-main>p{margin:0 0 10px}.recharge-payment{margin:10px 0;display:flex;flex-direction:column;align-items:center;gap:8px}.recharge-payment p,.recharge-payment h3{margin:0;line-height:1.55}.recharge-payment .recharge-qr{width:208px;height:208px;max-width:100%;object-fit:contain;margin:6px auto}.recharge-main .recharge-settlement-note{margin-top:8px}

.modal:has(.recharge-layout){width:min(800px,calc(100vw - 32px));max-width:800px}

.recharge-layout{grid-template-columns:minmax(0,1fr) 210px;gap:20px;align-items:center}.recharge-main>p[role=status]{margin:0 0 10px;font-size:13px}.recharge-payment{padding:16px;gap:6px;margin:0}.recharge-support{padding:18px;border:1px solid var(--line);border-radius:12px}.recharge-payment .recharge-qr{width:192px;height:192px;margin:8px auto}.recharge-payment .help-text,.recharge-payment .muted{font-size:12px}.recharge-result-dialog{width:min(420px,calc(100vw - 40px));padding:28px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--text)}.recharge-result-dialog::backdrop{background:#0009}.recharge-result-dialog h2{margin:0 0 14px}.recharge-result-dialog p{line-height:1.7;margin:0 0 22px}.recharge-result-dialog button{display:block;margin-left:auto;min-width:100px}@media(max-width:640px){.recharge-layout{grid-template-columns:1fr}.recharge-support{margin-top:4px}}

.recharge-controls:has(button[hidden]){display:none}
.recharge-receipt-guide { margin: 18px 0; }
.recharge-receipt-guide summary { cursor: pointer; }
.recharge-receipt-guide img { display: block; width: 100%; height: auto; }
.recharge-upload-qr { display: block; width: 180px; max-width: 100%; height: auto; margin: 12px auto; border-radius: 12px; }

.receipt-guide-steps{display:grid;gap:20px;width:100%}.receipt-guide-steps figure{margin:0;min-width:0}.receipt-guide-steps figcaption{font-size:14px;line-height:1.6;font-weight:600;text-align:left;margin:0 0 8px}.receipt-guide-steps img{display:block;width:100%;height:auto;margin:0;border-radius:8px}

/* Amount-based recharge: the exact payable and credited values stay together. */
.recharge-amount-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}
.recharge-amount-choices button{padding:10px 6px;border:1px solid var(--border,#8885);border-radius:8px;background:transparent;color:inherit;cursor:pointer}
.recharge-amount-choices button[aria-pressed="true"]{border-color:#3583e8;background:#3583e81c;color:#3583e8}
.recharge-amount-label{display:flex;align-items:center;gap:12px;margin:12px 0}
.recharge-amount-label input{min-width:0;width:160px;padding:10px;border:1px solid var(--border,#8885);border-radius:8px;background:transparent;color:inherit}
.recharge-amount-card .recharge-pay-amount{font-size:26px;font-weight:700;margin:12px 0 6px}
.recharge-amount-card .recharge-credit-amount{font-size:17px;margin:6px 0 16px}
.recharge-amount-card small{display:block;overflow-wrap:anywhere}
.recharge-countdown{font-size:13px;line-height:1.6}
.recharge-amount-form[hidden]{display:none}
@media(max-width:560px){.recharge-amount-choices{grid-template-columns:repeat(3,minmax(0,1fr))}}

.bill-pagination{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
