/* v0.2: conversation-first layout. Existing modal/task primitives stay in styles.css. */
.brand-row .brand img{width:32px;height:32px;object-fit:contain;border-radius:0}.message-avatar img{object-fit:contain;border-radius:0}.welcome-mark img{display:block;width:43px;height:43px}
.sidebar-scrim{display:none}
.sidebar nav{margin:5px 0 8px;gap:2px}.sidebar .history-heading{margin-top:26px}.sidebar .nav-item{min-height:40px}
:root{--bg:#fcfbf8;--side:#f3f2ef;--ink:#30362e;--muted:#7a8273;--border:#e4e6dd;--green:#526947}
body{background:var(--bg);color:var(--ink);font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif}
.sidebar{width:236px;flex:0 0 236px;background:var(--side);padding:24px 14px 12px;border-right:1px solid #eeeee6}.sidebar.is-collapsed{display:none}.brand-row{display:flex;align-items:center;justify-content:space-between;padding:0 8px 25px}.brand{display:flex;align-items:center;gap:10px;padding:0;margin:0}.brand img{width:27px;height:27px}.brand strong{font-family:inherit;font-size:21px;font-weight:600;letter-spacing:2px}.collapse-btn{color:#949c8a}.collapse-btn .icon{width:17px}.new-chat{display:flex;gap:11px;width:100%;padding:12px;margin-bottom:13px;border:1px solid #dcdfd3;border-radius:9px;background:#fdfdf9;color:#5f6f53;font-size:13px;box-shadow:none}.new-chat:hover{background:#fff;border-color:#bec8b2}.new-chat>.icon:first-child{width:17px}.new-chat>.icon:last-child{width:15px;margin-left:auto;color:#9aa48e}.nav-item{font-size:13px;color:#77856a;border-radius:7px;padding:11px 13px;gap:11px;margin:2px 0}.nav-item .icon{width:17px}.nav-item:hover,.nav-item.active{background:#e9ede1;color:#536847}.history-heading{font-size:11px;color:#9aa38f;margin:33px 13px 11px;padding:0}.history-item{padding:10px 13px;font-size:12px;color:#7f8c72;border-radius:7px}.history-item:hover,.history-item.selected{background:#e9ede1;color:#526947}.history-empty{font-size:12px;padding:10px 13px;color:#9aa68e}.sidebar-bottom{margin-top:auto;padding-top:24px}.profile{margin:0;border-top:1px solid var(--border);padding:14px 7px 0;display:flex;align-items:center;gap:10px;font-size:12px;color:#7d8a6f}.avatar{width:30px;height:30px;background:#e2e8d9;color:#758662;font-size:12px}.profile .icon-btn{margin-left:auto}.profile .icon{width:17px}.icon-btn{border-radius:8px}.topbar{height:68px;padding:0 32px;border:0;background:var(--bg);position:sticky;top:0;z-index:10}.header-left{display:flex;gap:12px;align-items:center}.workspace-title{font-size:15px;padding:7px 0;color:#66795a}.workspace-title span{font-size:13px;color:#99a48b;margin-left:8px}.preview-label{display:flex;align-items:center;gap:8px;font-size:11px;color:#99a28e}.preview-label .icon{width:15px;height:15px}.reveal-sidebar{display:none}.reveal-sidebar.visible{display:inline-flex}
.studio-page{width:min(790px,100%);max-width:790px;margin:0 auto;padding:36px 35px 24px}.is-welcome{min-height:calc(100dvh - 68px);padding-top:clamp(65px,16vh,180px);display:flex;flex-direction:column}.welcome{text-align:center;margin-bottom:31px}.welcome-mark{color:#778e64;font-size:36px;display:inline-block;font-family:Georgia,serif;line-height:1;margin-bottom:19px}.welcome h1{font-size:31px;letter-spacing:1px;font-weight:500;line-height:1.6;color:#34452b}.welcome p{font-size:13px;color:#99a58d;margin-top:8px}.composer-wrap{width:100%}.composer{border:1px solid #dde3d3;border-radius:16px;box-shadow:0 3px 12px #30352905;background:#fff}.composer:focus-within{border-color:#b9c8a8;box-shadow:0 3px 14px #30352908}.input-body{padding:20px 21px 0}#prompt{display:block;min-height:67px;max-height:220px;font-size:15px;line-height:1.8;color:#405534;padding:0}#prompt::placeholder{font-size:14px;color:#a4b098}.composer-bottom{padding:10px 12px 12px;gap:8px}.input-tools{gap:5px;min-width:0}.attach-btn{border:0;padding:0;min-width:36px;width:36px;height:36px;box-shadow:none;background:none}.mode-choice{height:35px;display:flex;align-items:center;gap:7px;padding:0 10px;color:#7e906e;border-radius:7px;font-size:12px}.mode-choice:hover{background:#f0f4ea}.mode-choice>.icon:first-child{width:15px}.mode-choice>.icon:last-child{width:12px;color:#a0ad92}.param-btn{gap:5px;padding:8px;font-size:12px;color:#8d9f7d}.param-btn .icon{width:15px}.send-btn{height:35px;width:35px;min-width:35px;padding:0;border-radius:50%;background:#607c4c;color:white;display:grid;place-items:center;box-shadow:none}.send-btn:hover{background:#496435}.send-btn .icon{width:18px;height:18px}.input-caption{display:block;text-align:center;font-size:10px;color:#9eac91;margin:12px 0 0;padding:0;line-height:1.7}.sample-hint{text-align:left;font-size:11px;color:#97a687;padding:11px 4px 0}.sample-hint button{color:#749757;padding:3px 7px;text-decoration:underline;text-underline-offset:3px}.quick-actions{display:flex;justify-content:center;gap:10px;margin-top:22px}.quick-actions button{display:flex;align-items:center;gap:8px;padding:10px 15px;border:1px solid #e4e9da;border-radius:9px;font-size:12px;color:#8ba077;background:#fdfefa;min-height:40px}.quick-actions .icon{width:16px;height:16px}.quick-actions button:hover{border-color:#bbcdaa;background:#f0f5e9;color:#627f47}.attachment{max-width:100%;margin-bottom:15px}.attachment strong{max-width:230px}
.has-conversation{min-height:calc(100dvh - 68px);padding-top:18px}.conversation-heading{margin-bottom:38px;gap:15px}.conversation-heading h1{font-size:15px;line-height:1.7;color:#798e67}.conversation-heading .subtle-btn{font-size:11px;white-space:nowrap}.message{gap:14px;margin:26px 0}.message-text{font-size:14px;line-height:1.95;color:#536d40}.message-avatar{width:28px;height:28px}.message-avatar img{width:25px;height:25px}.message-name{font-size:12px;margin-bottom:10px}.message-name span{font-size:10px}.user .message-avatar,.user .message-name{display:none}.message.user{justify-content:flex-end}.user .message-content{flex:0 1 auto;max-width:86%;background:#edf2e5;border:0;border-radius:15px 15px 3px 15px;padding:12px 18px}.user .message-text{background:none;padding:0;border:0}.has-conversation .composer-wrap{margin:30px 0 0;bottom:0;padding:20px 0 10px;background:var(--bg)}.task-card{box-shadow:none;border-radius:12px}.task-title strong{font-size:13px}.task-content>p{font-size:12px}.task-note{font-size:10px}.task-meta{font-size:10px}.task-status{font-size:10px}.collection-page{max-width:1000px;padding:48px 48px 70px}.page-heading h1{font-size:25px;font-weight:500}.page-heading p{font-size:13px}.knowledge-notice{font-size:12px;line-height:1.8;color:#93a580;border-bottom:1px solid var(--border);padding-bottom:23px}.knowledge-row{padding:17px 5px}.mode-options{display:flex;flex-direction:column;gap:6px}.mode-options button{width:100%;display:flex;align-items:center;gap:13px;text-align:left;padding:16px;border-radius:10px;font-size:14px}.mode-options button[aria-pressed=true],.mode-options button:hover{background:#edf3e4;color:#779853}.mode-options button>.icon:last-child:not(:first-child){margin-left:auto}.modal-head .eyebrow{display:none}.modal-head h2{margin-top:0;font-weight:500}.primary-btn{background:#607c4c}.primary-btn:hover{background:#496435}.empty-state h2{font-size:19px}.empty-state p{font-size:12px}
@media(min-width:1600px){.studio-page{width:850px;max-width:850px}.welcome h1{font-size:34px}}
@media(max-width:960px){.sidebar{width:205px;flex-basis:205px}.studio-page{padding-left:28px;padding-right:28px}.topbar{padding:0 26px}.collection-page{padding:35px 28px}.welcome h1{font-size:28px}.collection-toolbar{align-items:stretch;flex-wrap:wrap}.search-field{flex:1}.search-field input{width:100%}}
@media(max-width:700px){.sidebar,.sidebar.is-collapsed{display:flex;position:fixed;inset:0 auto 0 0;width:252px;z-index:30;visibility:hidden;transform:translateX(-100%);padding:20px 14px 12px}.sidebar.is-open{visibility:visible;transform:none}.reveal-sidebar{display:inline-flex}.topbar{height:60px;padding:0 17px}.header-left{gap:10px}.workspace-title{font-size:14px}.workspace-title span{font-size:11px}.preview-label{font-size:10px}.preview-label .icon{display:none}.studio-page{padding-left:20px;padding-right:20px}.is-welcome{min-height:calc(100dvh - 60px);padding-top:clamp(60px,15dvh,125px)}.welcome{margin-bottom:27px}.welcome h1{font-size:26px;letter-spacing:.5px}.welcome-mark{font-size:32px;margin-bottom:17px}.welcome p{font-size:12px;margin-top:8px}.input-body{padding:18px 17px 0}#prompt{font-size:16px;min-height:77px;line-height:1.8}#prompt::placeholder{font-size:13px}.composer-bottom{padding:7px 10px 10px;gap:4px}.send-btn{width:40px;height:40px;min-width:40px;min-height:40px}.mode-choice{font-size:11px;height:40px;gap:5px;padding:0 7px}.mode-choice .icon:first-child{width:14px}.param-btn{font-size:11px;padding:7px;min-height:40px;gap:4px}.param-btn>.icon:first-child{display:block;width:14px}.quick-actions{gap:7px;margin-top:18px}.quick-actions button{font-size:11px;padding:9px 10px;gap:6px}.quick-actions .icon{width:14px}.input-caption{font-size:9px;margin-top:11px}.sample-hint{font-size:11px}.sample-hint button{min-height:40px}.attachment strong{max-width:150px;font-size:11px}.attachment small{font-size:9px}.attachment .icon-btn{min-width:30px;width:30px;min-height:36px}.has-conversation{min-height:calc(100dvh - 60px);padding-top:15px}.conversation-heading h1{font-size:13px}.conversation-heading{margin-bottom:24px}.conversation-heading .subtle-btn{font-size:10px;padding:8px}.message{gap:9px}.message-text{font-size:14px}.user .message-content{max-width:92%;padding:10px 14px}.has-conversation .composer-wrap{padding:14px 0 5px;margin:20px 0 0}.task-card{gap:9px;padding:13px}.task-icon{width:28px;height:28px}.task-icon .icon{width:16px}.task-title strong{font-size:12px}.task-detail.icon-btn{min-width:24px;width:24px}.task-status{font-size:9px}.task-content>p{font-size:11px}.task-meta{font-size:9px;gap:5px}.task-note{font-size:9px}.collection-page{padding:32px 20px}.page-heading{gap:15px;flex-direction:row;align-items:flex-start}.page-heading h1{font-size:22px}.page-heading p{font-size:12px;max-width:190px}.page-heading>.primary-btn{white-space:nowrap;min-height:40px;font-size:11px;padding:9px 10px}.page-heading .primary-btn .icon{width:14px}.collection-toolbar{flex-direction:column;gap:15px}.search-field{min-height:42px}.filter-tabs button{min-height:40px}.empty-state{padding:65px 5px}.empty-state h2{font-size:17px}.knowledge-notice{font-size:11px}.knowledge-row{gap:10px}.knowledge-row strong{font-size:11px}.knowledge-row>.icon{display:none}.knowledge-row .draft-label{font-size:9px}.text-btn{font-size:10px;min-height:40px}.section-heading h2{font-size:12px}.section-heading h2 span{font-size:10px}.new-chat,.nav-item,.history-item{min-height:40px}.brand{padding:0}.brand strong{font-size:21px}.brand img{width:27px;height:27px}.profile{padding:14px 7px 0;margin:0}.modal-head h2{font-size:18px}}
.welcome p{color:#858f7c}.history-item{color:#75836a}.nav-item{color:#6f7d64}.input-caption{color:#8d9b80}.mode-choice{color:#718562}.quick-actions button{color:#7b9168}@media(max-width:700px){.sidebar-scrim{display:block}}

.request-notice{padding:12px 16px;margin-top:10px;border:1px solid #d7daca;border-radius:10px;font-size:12px;color:#556249;background:#f5f4eb}.request-notice p{margin:0 0 8px}.request-notice>div{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.request-notice small{display:block;flex-basis:100%;color:#786e59}.message-content{min-width:0}.message-text{overflow-wrap:anywhere;white-space:normal}.composer textarea{overflow-wrap:anywhere}

.message-image{display:block;max-width:min(100%,360px);max-height:300px;object-fit:contain;border-radius:12px;margin:0 0 12px;background:#f5f4ef}

/* Keep inherited grid justification from pushing the send icon to the left. */
.send-btn{justify-content:center;align-content:center;gap:0;line-height:1;flex-shrink:0}
.send-btn .icon{display:block;margin:0;transform:none;flex-shrink:0}
.mode-choice .icon{display:block;flex-shrink:0}.mode-choice>.icon:last-child{width:12px;height:12px}
.send-btn:disabled{opacity:.45;cursor:default}.send-btn:focus-visible,.mode-choice:focus-visible{outline:2px solid #607c4c;outline-offset:3px}
#prompt{resize:none}.composer{position:relative;transition:border-color .15s,box-shadow .15s}
.composer.is-dragover{border-color:#607c4c;box-shadow:0 0 0 3px #607c4c20}
.composer.is-dragover:after{content:"松开，添加这张图片";position:absolute;inset:0;border-radius:inherit;display:grid;place-items:center;background:#f5f8eff5;color:#496435;font-size:15px;pointer-events:none;z-index:5}
.reasoning-block{margin:8px 0 16px;padding:12px 16px;border-left:2px solid #b8c5aa;background:#f1f3ed;border-radius:0 8px 8px 0;color:#68765d;font-size:12px;line-height:1.85;overflow-wrap:anywhere}
.reasoning-block summary{cursor:pointer;font-weight:500}.reasoning-block>div{margin-top:8px;white-space:normal}.live-thinking strong{font-size:12px;font-weight:500}
@media(prefers-reduced-motion:reduce){.composer{transition:none}}

.message-text p{margin:0 0 12px}.message-text p:last-child{margin-bottom:0}.message-text ul,.message-text ol{padding-left:22px;margin:8px 0 14px}.message-text li{padding-left:2px;margin:3px 0}.message-text strong{font-weight:600}.message-text code{font:12px ui-monospace,monospace;background:#eef0e9;border-radius:4px;padding:2px 4px;overflow-wrap:anywhere}

.live-reply{min-height:max(220px,calc(100dvh - 310px));scroll-margin-top:86px}.live-reply .message-text,.message.assistant{scroll-margin-top:86px}@media(max-width:700px){.live-reply,.live-reply .message-text,.message.assistant{scroll-margin-top:74px}}

/* Quiet reasoning treatment: content-led, no status badges or colored cards. */
.reasoning-block{margin:8px 0 22px;padding:0;border:0;border-radius:0;background:transparent;color:#7c8378;font-size:13px;line-height:1.9}
.reasoning-toggle,.reasoning-block summary{display:flex;align-items:center;gap:8px;width:fit-content;min-height:36px;padding:2px 0;color:#747b70;font-size:12px;font-weight:500;line-height:1.5;cursor:pointer;list-style:none;background:none;border:0}
.reasoning-block summary::-webkit-details-marker{display:none}
.reasoning-block summary:before{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);margin:0 5px 0 3px}
.reasoning-block[open]>summary:before{transform:rotate(45deg);margin-top:-3px}
.reasoning-toggle .icon{width:14px;height:14px;transform:rotate(-90deg);color:#90968b}
.reasoning-toggle[aria-expanded=true] .icon{transform:none}
.reasoning-toggle:hover,.reasoning-block summary:hover{color:#34432b}
.reasoning-toggle:focus-visible,.reasoning-block summary:focus-visible{outline:2px solid #aab9a0;outline-offset:4px;border-radius:3px}
.reasoning-block>.reasoning-content,.reasoning-block>div{margin:8px 0 0 6px;padding:0 0 0 17px;border-left:1px solid #e0e4dc;color:#7c8378;line-height:1.9}
.activity-line{display:flex;align-items:center;gap:9px;padding:8px 0;color:#858c7e;font-size:12px}
.thinking-dot{display:inline-block;width:5px;height:5px;flex:none;border-radius:50%;background:#8b9b7e;animation:thinking-breathe 1.6s ease-in-out infinite}
@keyframes thinking-breathe{0%,100%{opacity:.35}50%{opacity:1}}
.live-reply .message-name{margin-bottom:4px;color:#34432b}.input-caption{color:#a0a69a}
@media(max-width:700px){.reasoning-block{font-size:12px;line-height:1.9}.reasoning-toggle,.reasoning-block summary{min-height:40px}.reasoning-block>.reasoning-content,.reasoning-block>div{padding-left:13px;margin-left:6px}}
@media(prefers-reduced-motion:reduce){.thinking-dot{animation:none;opacity:.65}}
