html,body.workbench-page { margin:0; padding:0; width:100%; min-height:100%; background:#fff; }
.workbench-page main { margin:0; padding:0; }
.workbench-page #cases { margin:0; padding:0; max-width:none; }
.workbench-page .workbench { width:100%; height:100dvh; border:0; border-radius:0; box-shadow:none; }
@media(min-width:641px) {
 .workbench-page .workbench { height:100dvh; min-height:0; }
 .workbench-page .sidebar { width:clamp(180px,18vw,230px); padding:20px 10px; overflow-x:hidden; }
 .workbench-page .product-brand { padding-inline:4px; gap:8px; font-size:24px; }
 .workbench-page .panes { flex-direction:row; }
 .workbench-page .conversation { width:var(--chat-width); min-width:0; height:auto; flex:none; }
 .workbench-page .artifact { width:auto; min-width:0; height:auto; flex:1; }
 .workbench-page .divider { display:block; }
 .workbench-page .chat-scroll { padding:24px 20px; }
 .workbench-page .file-heading { padding:14px; }
}
/* v2: "做同类任务" entry in the composer, and the state for cases delivered in the conversation only */
.composer-bottom #similar-status { flex:1; min-width:0; font-size:12px; color:#6b6760; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.composer-bottom .similar-task { flex:none; display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 14px; border-radius:6px; background:#1c1b19; color:#fff; font-size:13px; font-weight:600; text-decoration:none; }
.composer-bottom .similar-task:hover { background:#2f2c29; }
.composer-bottom .similar-task:focus-visible { outline:2px solid #1c1b19; outline-offset:2px; }
.empty-deliverable { margin:48px auto; max-width:360px; padding:28px; border:1px dashed #d8d3cb; border-radius:8px; color:#46423d; line-height:1.8; text-align:center; }
.empty-deliverable strong { display:block; font-size:16px; color:#1c1b19; }
.empty-deliverable p { margin:8px 0 0; font-size:13px; }
#preview-pane.no-file #expand, #preview-pane.no-file #download { visibility:hidden; }
/* 641-760px: styles.css still carries the old stacked phone rules; keep the three columns instead. */
@media(min-width:641px) and (max-width:760px) {
 .workbench-page .workbench { display:flex; }
 .workbench-page .sidebar { border-right:1px solid #e5e5e5; }
 .workbench-page .sidebar .side-label { display:block; }
 .workbench-page #case-list { display:block; }
 .workbench-page .case-button { display:block; width:100%; text-align:left; padding:8px 10px; }
 .workbench-page .artifact { border-top:0; }
}
/* 641-999px: two of the three columns at a time, order kept. Left panel open: left | chat.
   Left panel closed (default here): chat | files. Picking a case closes the left panel again. */
@media(min-width:641px) and (max-width:999px) {
 .workbench-page .workbench[data-sidebar=open] .artifact,.workbench-page .workbench[data-sidebar=open] .divider { display:none; }
 .workbench-page .workbench[data-sidebar=open] .conversation { width:auto; flex:1; }
}
/* Left panel: collapsible at every width. Collapsed, it leaves only the panel button in the top bar. */
.workbench-page .icon-button { width:34px; height:34px; display:inline-flex; flex:none; align-items:center; justify-content:center; border:1px solid #e5e5e5; border-radius:8px; background:#fff; color:#44403c; }
.workbench-page .icon-button:hover { color:#0c0a09; border-color:#d6d3d1; }
.workbench-page .sidebar-collapse { margin-left:auto; }
.workbench-page #toggle-sidebar { margin-right:2px; }
.workbench-page .workbench[data-sidebar=open] #toggle-sidebar { display:none; }
.workbench-page .workbench[data-sidebar=closed] .sidebar { display:none; }
.workbench-page .sidebar-backdrop { display:none; }
.workbench-page .workspace-top > #case-heading { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workbench-page .mobile-only,.workbench-page .prompt-toggle { display:none; }

/* Phones (<=640px): still left | middle | right, one screen wide. The left panel pushes the chat to the
   right; 文件 slides the chat out to the left and the files in from the right. Nothing is stacked. */
@media(max-width:640px) {
 .workbench-page .workbench { display:flex; flex-direction:row; position:relative; height:100dvh; min-height:0; overflow:hidden; }
 .workbench-page .mobile-only { display:inline-flex; }
 .workbench-page .workbench[data-sidebar=open] #toggle-sidebar,.workbench-page .workbench[data-sidebar=closed] #toggle-sidebar { display:inline-flex; }
 .workbench-page .sidebar,.workbench-page .workbench[data-sidebar=closed] .sidebar { display:flex; flex-direction:column; flex:0 0 min(84%,300px); width:min(84%,300px); padding:16px 12px; border-right:1px solid #e5e5e5; background:#fafafa; overflow:auto; }
 .workbench-page .workbench[data-sidebar=closed] .sidebar { margin-left:calc(-1 * min(84%,300px)); }
 .workbench-page .sidebar .side-label { display:block; }
 .workbench-page .product-brand { padding:0 4px 14px; }
 .workbench-page #case-list { display:block; }
 .workbench-page .case-button { display:block; width:100%; text-align:left; font-size:14px; line-height:22px; padding:9px 10px; }
 .workbench-page .work-area { flex:0 0 100%; width:100%; min-width:0; min-height:0; display:flex; flex-direction:column; position:relative; }
 .workbench-page .workbench[data-sidebar=open] .sidebar-backdrop:not([hidden]) { display:block; position:absolute; top:0; bottom:0; right:0; left:min(84%,300px); z-index:20; background:rgba(12,10,9,.22); }
 .workbench-page .workspace-top { flex-wrap:nowrap; gap:8px; min-height:52px; padding:8px 10px; }
 .workbench-page #case-heading { font-size:14px; font-weight:600; }
 .workbench-page .workspace-heading-actions { display:flex; align-items:center; gap:6px; flex:none; }
 .workbench-page .mobile-view-switch { gap:2px; padding:3px; background:#f1f1f1; border-radius:8px; }
 .workbench-page .mobile-view-switch button { padding:6px 10px; border-radius:6px; color:#57534e; font-size:13px; white-space:nowrap; }
 .workbench-page .mobile-view-switch button[aria-pressed=true] { background:#0c0a09; color:#fff; }
 .workbench-page #mobile-file-count { margin-left:2px; font-size:11px; opacity:.75; }
 .workbench-page #fullscreen-workbench { padding:6px 4px; font-size:12px; white-space:nowrap; }
 .workbench-page .panes { flex:1; min-height:0; display:flex; flex-direction:row; overflow:hidden; }
 .workbench-page .conversation,.workbench-page .artifact { flex:0 0 100%; width:100%; height:100%; min-width:0; border-top:0; }
 .workbench-page .workbench[data-ready] .sidebar { transition:margin-left .28s cubic-bezier(.22,.75,.2,1); }
 .workbench-page .workbench[data-ready] .conversation,.workbench-page .workbench[data-ready] .artifact { transition:transform .3s cubic-bezier(.22,.75,.2,1); }
 .workbench-page .workbench[data-mobile-view=files] .conversation,.workbench-page .workbench[data-mobile-view=files] .artifact { transform:translateX(-100%); }
 .workbench-page .divider { display:none; }
 .workbench-page .chat-scroll { padding:18px 14px; }
 .workbench-page .user-message.long:not(.expanded) { max-height:13em; overflow:hidden; -webkit-mask-image:linear-gradient(180deg,#000 70%,transparent); mask-image:linear-gradient(180deg,#000 70%,transparent); }
 .workbench-page .prompt-toggle:not([hidden]) { display:block; margin:6px 0 0 auto; padding:2px 0; color:#57534e; font-size:12px; text-decoration:underline; text-underline-offset:3px; }
 .workbench-page .composer { margin:0 10px 8px; padding:10px 12px 8px; }
 .workbench-page .composer-placeholder { padding-bottom:8px; font-size:12px; line-height:1.6; }
 .workbench-page .composer-bottom > span { display:none; }
 .workbench-page .playback { padding:6px 14px 10px; }
 .workbench-page .playback small { display:none; }
 .workbench-page .file-tabs { min-height:48px; padding:7px 10px; }
 .workbench-page .artifact-body { padding:12px 8px; }
}
@media(max-width:640px) and (prefers-reduced-motion:reduce) { .workbench-page .workbench[data-ready] .sidebar,.workbench-page .workbench[data-ready] .conversation,.workbench-page .workbench[data-ready] .artifact { transition:none; } }
