/* This workspace has no mobile top bar. Do not inherit the legacy 64px deduction. */
.plain-main:has(.ds-shell.conversation-shell){height:100dvh;min-height:0;padding:0}
.ds-shell.conversation-shell.ds-modules{height:100%;min-height:0}
.conversation-shell.ds-modules{grid-template-rows:var(--app-header-height,66px) minmax(0,1fr);padding:0 28px 20px;background:#f5f5f2}
.conversation-shell [hidden]{display:none!important}
.conversation-shell .ds-body{display:block;position:relative;min-height:0}
.conversation-shell .ds-chat{display:block;position:relative;height:100%;border:0;border-radius:0;box-shadow:none;background:transparent;overflow:visible}
.conversation-shell{--conversation-column-width:960px;--conversation-column-inset:16px}
.conversation-history{height:100%;overflow-y:auto;overscroll-behavior:contain;padding:32px var(--conversation-column-inset) var(--conversation-composer-space,300px);scroll-padding-bottom:var(--conversation-composer-space,300px)}
.conversation-entry{max-width:var(--conversation-column-width);margin:0 auto 30px;min-width:0}
/* Text and composer share both edges at every viewport size.
   Own the turn spacing here so article margins cannot collapse across slots. */
.conversation-entry:has(>.ds-conversation-message){max-width:var(--conversation-column-width);margin-bottom:32px;display:flow-root}
.conversation-entry>.ds-message.ds-conversation-message{margin-block:0}
/* Center within the actual space above the active composer and resource tools.
   The shared observer updates this space when any of the four modes resizes. */
.conversation-history.is-empty{position:relative;padding:0;overflow:hidden}
.conversation-empty{position:absolute;left:16px;right:16px;top:0;height:var(--conversation-empty-height,max(0px,calc(100% - var(--conversation-composer-space,300px))));overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;color:#62695f}
.conversation-empty h1{margin:0;color:#202620}.conversation-empty p{margin:0;max-width:100%;text-wrap:balance;line-height:1.5}
.conversation-shell .ds-mode-panel{position:absolute;inset:0;right:var(--conversation-history-gutter,0px);pointer-events:none;background:transparent;overflow:visible}
.conversation-shell .ds-mode-panel>.iw-workbench{height:100%;background:transparent}
.conversation-shell .ds-chat-scroll,.conversation-shell .iw-history{display:none!important}
.conversation-shell.ds-modules .ds-mode-panel :is(.iw-composer-wrap,.ds-modular-composer){position:absolute;left:var(--conversation-column-inset);right:var(--conversation-column-inset);bottom:0;max-width:var(--conversation-column-width);width:auto;margin-inline:auto;pointer-events:auto;z-index:10}
/* Shared history dock: keep full editor geometry and state intact while its
   painted surface folds down. CSS transitions reverse from their current frame. */
.conversation-shell.ds-modules .ds-mode-panel :is(.iw-composer-wrap,.ds-modular-composer){opacity:1;visibility:visible;transition:opacity 180ms ease,visibility 0s}
.conversation-shell .ds-mode-panel :is(.iw-composer-wrap,.ds-modular-composer) .iw-composer{transform-origin:center bottom;transition:transform 260ms cubic-bezier(.2,.8,.2,1)}
.conversation-shell.ds-modules .ds-mode-panel [data-history-collapsed]{opacity:0;visibility:hidden;pointer-events:none;transition:opacity 180ms ease,visibility 0s 260ms}
.conversation-shell .ds-mode-panel [data-history-collapsed] .iw-composer{transform:scale(.86,.36)}
.conversation-shell :is(.iw-back-bottom,.ds-text-bottom){display:none}
.conversation-composer-dock{position:absolute;inset:auto var(--conversation-column-inset) 0;right:calc(var(--conversation-column-inset) + var(--conversation-history-gutter,0px));max-width:var(--conversation-column-width);height:0;margin-inline:auto;pointer-events:none;z-index:11}
.conversation-shell .conversation-compact-composer{position:absolute;bottom:0;left:0;right:0;display:flex;align-items:center;gap:16px;box-sizing:border-box;width:min(100%,680px);height:64px;margin-inline:auto;padding:8px 16px;background:#fff;color:#62695f;border:1px solid #dfe1da;border-radius:22px;box-shadow:0 12px 30px #2630201a;text-align:left;opacity:0;visibility:hidden;transform:translateY(12px) scale(.96);transform-origin:center bottom;pointer-events:none;transition:opacity 180ms ease,transform 260ms cubic-bezier(.2,.8,.2,1),visibility 0s 260ms}
.conversation-composer-dock[data-compact=true] .conversation-compact-composer{opacity:1;visibility:visible;transform:none;pointer-events:auto;transition:opacity 180ms ease 60ms,transform 260ms cubic-bezier(.2,.8,.2,1),visibility 0s}
.conversation-shell .conversation-compact-composer:hover{background:#fff;color:#62695f;box-shadow:0 12px 30px #2630201a}
.conversation-shell .conversation-compact-open{position:absolute;inset:0;width:100%;height:100%;min-height:0;padding:0;border:0;border-radius:inherit;background:transparent;cursor:pointer}
.conversation-shell .conversation-compact-open:is(:hover,:active){background:transparent;box-shadow:none;transform:none}
.conversation-shell .conversation-compact-open:focus-visible{outline:2px solid #62695f;outline-offset:4px}
.conversation-compact-composer>:is(.conversation-compact-material,.conversation-compact-text,.conversation-compact-expand){position:relative;pointer-events:none}
.conversation-compact-text .result-inline-reference{pointer-events:auto}
.conversation-shell .conversation-compact-material{position:relative;display:flex;align-items:center;justify-content:center;flex:0 0 34px;width:34px;height:44px;min-height:0;padding:0;border:0;background:#f1f2ee;color:#62695f;border-radius:8px;transform:rotate(-8deg)}
.conversation-shell .conversation-compact-material[data-has-materials=true]{background:transparent;transform:none}
.conversation-compact-material-cards{position:relative;display:block;width:34px;height:44px}
.conversation-compact-material-card{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#f1f2ee;border-radius:8px;transform:translate(calc(var(--i)*3px),0) rotate(calc(-8deg + var(--i)*8deg));transform-origin:center bottom}
.conversation-compact-material-card:has(img){background:transparent}
.conversation-compact-material-card img{width:100%;height:100%;object-fit:contain;border-radius:8px}
.conversation-compact-material-count{position:absolute;right:-9px;bottom:-2px;display:flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 3px;box-sizing:border-box;border-radius:999px;background:#f5cc18;color:#000;font-size:10px;font-weight:400;line-height:1}
.conversation-compact-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.65;font-size:12px;font-weight:400}
.conversation-shell .conversation-compact-expand{display:flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;min-height:0;padding:0;border:0;border-radius:50%;background:#f5cc18;color:#000;transition:transform 160ms ease}
.conversation-shell .conversation-compact-open:hover~.conversation-compact-expand{transform:scale(1.055)}
.conversation-shell .conversation-compact-open:active~.conversation-compact-expand{transform:scale(.95)}
.conversation-shell :is(.conversation-compact-material,.conversation-compact-expand) svg{width:18px;height:18px}
.conversation-shell .conversation-dock-bottom{position:absolute;right:0;bottom:calc(var(--history-dock-height,180px) + 12px);display:flex;align-items:center;gap:8px;height:38px;padding:0 14px;background:#fff;color:#202620;border:1px solid #dfe1da;border-radius:12px;white-space:nowrap;pointer-events:auto}
.conversation-composer-dock[data-compact=true] .conversation-dock-bottom{bottom:76px;right:max(0px,calc((100% - 680px)/2))}
@media(prefers-reduced-motion:reduce){
 .conversation-shell.ds-modules .ds-mode-panel :is(.iw-composer-wrap,.ds-modular-composer),.conversation-shell .ds-mode-panel :is(.iw-composer-wrap,.ds-modular-composer) .iw-composer,.conversation-composer-dock[data-compact] .conversation-compact-composer,.conversation-shell .conversation-dock-bottom,.conversation-shell .conversation-compact-expand{transition:none}
}
@media(max-width:760px){.conversation-composer-dock{inset-inline:0;right:var(--conversation-history-gutter,0px);bottom:0}.conversation-shell .conversation-compact-composer{gap:12px;padding-inline:12px}}
.conversation-shell{--iw-composer-padding:14px;--conversation-material-width:115px;--conversation-material-height:144px}
.conversation-shell .iw-composer{display:flex;flex-direction:column;min-height:0;padding:var(--iw-composer-padding);border-radius:24px;max-height:none;overflow:visible}
/* Content-sized drawer; its shared header stays outside the two-row scroller. */
.conversation-shell .iw-composer>.iw-material-panel{display:flex;flex-direction:column;box-sizing:border-box;height:auto;min-height:0;max-height:none;min-width:0;max-width:100%;margin:0;padding:0 0 8px;overflow:hidden}
.conversation-shell .iw-material-panel>:is(.icm-header,.iw-material-header,.material-panel-header){flex-shrink:0}
.conversation-shell .iw-material-panel>:is(.icm-scroll,.iw-material-scroll){flex:0 1 auto;min-height:0;height:auto;box-sizing:border-box;max-height:var(--material-two-row-height,none);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:12px 16px;scroll-padding:12px}
/* Fit all base image-upload slots before introducing a scroll boundary.
   Keep this independent of the text body and the other modes' fixed drawers. */
.conversation-shell .iw-composer>.iw-material-panel:has(.iw-image-material-grid){height:auto;min-height:0;max-height:none}
.conversation-shell .iw-material-panel>.iw-material-scroll:has(.iw-image-material-grid){flex:0 1 auto;max-height:var(--material-two-row-height,none)}
.conversation-shell .icm-grid{display:flex;flex-wrap:wrap;align-items:flex-start;gap:14px}
.conversation-shell .icm-grid>:is(.icm-material,.icm-add){flex:0 0 var(--conversation-material-width);width:var(--conversation-material-width);min-width:0}
.conversation-shell .icm-scroll :is(.icm-tile,.icm-add){width:var(--conversation-material-width);max-width:var(--conversation-material-width);height:var(--conversation-material-height);aspect-ratio:auto}
.conversation-shell .icm-scroll .icm-preview{width:100%;height:100%;aspect-ratio:auto}
.conversation-shell .iw-prompt-row{min-height:64px;gap:12px}
.conversation-shell.ds-modules .iw-prompt-row .rp-editor{--iw-prompt-base-height:64px;min-height:64px;max-height:96px}
.conversation-shell .iw-prompt-row .iw-stack{width:61px;height:75px;min-height:75px;margin:12px 14px 5px 10px;transform-origin:50% 65%}
/* Filled layers occupy the same footprint as the empty upload card in every mode. */
.conversation-shell .iw-prompt-row .iw-stack>:is(img,.iw-stack-media-placeholder){top:0;left:0;width:100%;height:100%;box-sizing:border-box;transform-origin:50% 65%}
.conversation-shell.ds-modules .composer-body>.iw-prompt-row .iw-stack.is-empty{rotate:-8deg;transform-origin:50% 65%}
.conversation-shell .composer-body>.vw-first-last-prompt>.vw-inline-frames{padding:12px 10px 5px}
.conversation-shell .iw-prompt-field textarea{height:64px;min-height:64px;max-height:96px;resize:none}

.conversation-shell .iw-composer>:is(.iw-prompt-row,.iw-toolbar){flex-shrink:0}

/* Independent two-row drawer + 92–184px text body + fixed toolbar. */
.composer-body{display:contents}
.conversation-shell{--composer-input-base-height:92px;--composer-toolbar-height:44px}
.conversation-shell.ds-modules .iw-composer:has(>.composer-body){display:grid;grid-template-rows:auto var(--composer-toolbar-height);gap:8px;box-sizing:border-box;height:auto;min-height:0;max-height:none;overflow:visible;padding:10px var(--iw-composer-padding) var(--iw-composer-padding)}
.conversation-shell.ds-modules .iw-composer:has(>.iw-material-panel):has(>.composer-body){grid-template-rows:auto auto var(--composer-toolbar-height)}
/* Expand the paint/scroll boundary, not the grid footprint: rotated stack cards
   and the lower-right count badge must not trigger scrolling or be clipped.
   Content-box keeps the shared 92–184px text budget independent of this gutter. */
.conversation-shell.ds-modules .composer-body{display:block;box-sizing:content-box;padding:16px;margin:-16px;min-width:0;min-height:var(--composer-input-base-height);height:var(--composer-input-base-height);max-height:calc(var(--composer-input-base-height)*2);overflow:visible;overscroll-behavior:contain;}
.conversation-shell.ds-modules .composer-body.is-overflowing{overflow:auto;scroll-padding-block:12px}
.conversation-shell.ds-modules .composer-body>.iw-prompt-row{min-height:var(--composer-input-base-height)}
.conversation-shell.ds-modules .composer-body .rp-editor{--iw-prompt-base-height:var(--composer-input-base-height);height:auto;min-height:var(--composer-input-base-height);max-height:calc(var(--composer-input-base-height)*2);overflow-y:auto;line-height:1.65}
.conversation-shell.ds-modules .composer-body .rp-editor:focus-visible{outline-offset:-2px}
.conversation-shell.ds-modules .iw-composer:has(>.composer-body)>.iw-toolbar{height:var(--composer-toolbar-height);min-height:0;margin-top:0;min-width:0}

/* All four floating tool rows align with the composer's outer left edge. */
.conversation-shell .iw-floating-tools{box-sizing:border-box;padding-inline:0}
.conversation-shell .iw-workbench .iw-stack{margin-left:10px}
.conversation-shell .iw-tools-scroll{min-width:0;flex:1}.conversation-shell .iw-toolbar{min-width:0}
.conversation-shell .iw-setting-buttons>.ds-jewelry-control{flex:0 0 auto;white-space:nowrap;width:auto;min-width:0}
.conversation-shell .ds-child-loading{pointer-events:auto}
.conversation-shell .ds-child-loading .iw-composer-wrap{height:auto;background:transparent}
.conversation-shell .ds-mode-control{flex-shrink:0;min-width:112px}
.conversation-shell .iw-setting-buttons>.ui-select:has(.ds-mode-control){width:auto;min-width:0;flex:0 0 auto}
.conversation-shell .iw-setting-buttons>.ui-select:has(.ds-design-path){width:auto;min-width:0;flex:0 0 auto}
.conversation-shell .ui-select>.ui-select-trigger.ds-design-path{width:auto;min-width:0;white-space:nowrap;gap:8px;padding-inline:10px;background:transparent;border:0;box-shadow:none}
.conversation-shell .ui-select>.ui-select-trigger.ds-design-path:is(:hover,:active,[aria-expanded=true]):not(:disabled){background:#f5f5f5}
.conversation-shell .ui-select>.ui-select-trigger.ds-mode-control{width:auto;min-width:0;justify-content:center;gap:0;background:#f5cc18;border:0;box-shadow:none;color:#000;font-size:12px;padding:0 12px;transition:transform 160ms ease;animation:none;filter:none}
.conversation-shell .ui-select-trigger.ds-mode-control>svg{display:none}
.conversation-shell .ui-select>.ui-select-trigger.ds-mode-control:is(:hover,:active,[aria-expanded=true]){background:#f5cc18;border:0;box-shadow:none;filter:none}
.conversation-shell .iw-setting-buttons>:is(.ds-progress-trigger,.gr-trigger){display:inline-flex;align-items:center;justify-content:center;width:38px;min-width:38px;padding:0;background:transparent;border:0;box-shadow:none;transition:transform 160ms ease;animation:none;filter:none}
.conversation-shell .iw-setting-buttons>:is(.ds-progress-trigger,.gr-trigger) svg{width:16px;height:16px;flex-shrink:0}
/* Keep the popover anchor and selected option still; use color, not geometry, for feedback. */
.conversation-shell .iw-setting-buttons>.ds-jewelry-control:is(:hover,:active),.conversation-shell .ds-jewelry-options button:is(:hover,:active){transform:none}
/* A brief category save locks mode changes without flashing the neighboring gold button. */
.conversation-shell[data-jewelry-saving=true] .iw-setting-buttons .ui-select-trigger.ds-mode-control:disabled{opacity:1}
/* Composer options, including the nested video-mode picker, share one feedback surface. */
.conversation-shell .iw-toolbar .iw-setting-buttons>.ui-select>.vw-mode-trigger,
.conversation-shell .iw-setting-buttons>button:not(.ds-mode-control):not(.iw-composer-submit):not(.iw-stack){border:0;box-shadow:none;background:transparent;transition:background-color 160ms ease,transform 160ms ease}
.conversation-shell .iw-toolbar .iw-setting-buttons>.ui-select>.vw-mode-trigger:is(:active,[aria-expanded=true]):not(:disabled),
.conversation-shell .iw-setting-buttons>button:not(.ds-mode-control):not(.iw-composer-submit):not(.iw-stack):is(:active,[aria-expanded=true]):not(:disabled){background:#f5f5f5!important;box-shadow:none;filter:none}
@media(hover:hover) and (pointer:fine){.conversation-shell .iw-toolbar .iw-setting-buttons>.ui-select>.vw-mode-trigger:hover:not(:disabled),.conversation-shell .iw-setting-buttons>button:not(.ds-mode-control):not(.iw-composer-submit):not(.iw-stack):hover:not(:disabled){background:#f5f5f5!important;box-shadow:none;filter:none}.conversation-shell .iw-toolbar .ui-select>.vw-mode-trigger:hover:not(:disabled){transform:none}}
.conversation-shell .iw-toolbar .ui-select>.vw-mode-trigger:active:not(:disabled){transform:scale(.95)}
@media(prefers-reduced-motion:reduce){.conversation-shell .iw-toolbar .iw-setting-buttons>.ui-select>.vw-mode-trigger,.conversation-shell .iw-setting-buttons>button:not(.ds-mode-control):not(.iw-composer-submit):not(.iw-stack){transition:none}}
/* Match visible gaps: the 38px icon buttons contain a 19px Phosphor glyph
   whose painted bounds span 208/256 of its SVG. Add the reference's inset. */
@media(hover:hover) and (pointer:fine){
 .conversation-shell .ui-select>.ui-select-trigger.ds-mode-control:hover:not(:disabled){transform:scale(1.035)}
 .conversation-shell .iw-setting-buttons>:is(.ds-progress-trigger,.gr-trigger):hover:not(:disabled){transform:scale(1.08)}
}
.conversation-shell .ui-select>.ui-select-trigger.ds-mode-control:active:not(:disabled){transform:scale(.96)}
.conversation-shell .iw-setting-buttons>:is(.ds-progress-trigger,.gr-trigger):active:not(:disabled){transform:scale(.94)}
.conversation-shell .ds-mode-panel dialog,.conversation-shell .ds-mode-panel [popover]{pointer-events:auto}
.conversation-shell .ds-header .mp-breadcrumb button{border:0;background:transparent;max-width:45vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.conversation-rename-dialog.iw-dialog{width:440px;max-width:calc(100vw - 32px);border-radius:20px}
.conversation-rename-dialog>.iw-dialog-inner{padding:28px}
.conversation-rename-dialog .iw-dialog-close{top:16px;right:16px;height:36px;width:36px;min-height:36px;padding:0;border:0;background:transparent;box-shadow:none}
.conversation-rename-dialog .iw-dialog-close:is(:hover,:active){background:transparent;box-shadow:none}
.conversation-rename-dialog form{display:grid;gap:24px;margin:0}
.conversation-rename-dialog header{padding-right:28px}
.conversation-rename-dialog h2{margin:0;font-size:18px;font-weight:600;line-height:1.5}
.conversation-name-field{display:grid;gap:8px;min-width:0}
.conversation-name-field>input{box-sizing:border-box;display:block;width:100%;min-width:0;height:46px;padding:0 14px;border:1px solid var(--iw-line);border-radius:10px;background:#f7f7f5;color:var(--iw-ink);font:inherit;font-size:14px;outline-offset:2px}
.conversation-name-field>input:focus-visible{outline:2px solid var(--iw-gold);border-color:var(--iw-gold);background:#fff}
.conversation-name-field>input[aria-invalid=true]{border-color:var(--iw-error)}
.conversation-name-meta{display:flex;justify-content:space-between;gap:12px;min-height:18px;color:var(--iw-muted);font-size:12px;line-height:1.5}
.conversation-name-meta>span:last-child{flex-shrink:0;font-variant-numeric:tabular-nums}
.conversation-name-error{color:var(--iw-error);overflow-wrap:anywhere}
.conversation-rename-dialog footer{display:flex;justify-content:flex-end;gap:10px}
.conversation-rename-dialog footer button{width:96px;min-height:42px;padding:0 16px;border:1px solid var(--iw-line);border-radius:10px;background:#fff;color:var(--iw-ink);font-size:14px;font-weight:500;box-shadow:none}
.conversation-rename-dialog footer .conversation-name-confirm{background:var(--iw-gold);border-color:var(--iw-gold);color:#000}
.conversation-rename-dialog footer button:not(:disabled):hover{background:#fff}
.conversation-rename-dialog footer .conversation-name-confirm:not(:disabled):hover{background:var(--iw-gold)}
.conversation-rename-dialog footer button:disabled{opacity:.45;cursor:not-allowed;transform:none}
@media(max-width:480px){.conversation-rename-dialog>.iw-dialog-inner{padding:24px 20px}.conversation-rename-dialog header{padding-right:24px}.conversation-rename-dialog .iw-dialog-close{right:10px;top:16px}.conversation-name-field>input{font-size:16px}}
@media(max-width:760px){.conversation-shell.ds-modules{grid-template-rows:58px minmax(0,1fr);padding:0 8px 12px}.conversation-shell .ds-body>.ds-chat{display:block}.conversation-shell .ds-header{gap:5px}.conversation-shell .ds-header .mp-breadcrumb{flex:1;min-width:0}.conversation-history{padding:16px 4px var(--conversation-composer-space,280px)}.conversation-shell.ds-modules .ds-mode-panel :is(.iw-composer-wrap,.ds-modular-composer){left:0;right:0}.conversation-shell{--iw-composer-padding:12px}.conversation-shell .iw-composer{padding:var(--iw-composer-padding);border-radius:18px}}
@media(max-width:760px){.conversation-shell{--conversation-column-inset:0px}.conversation-history{padding-inline:var(--conversation-column-inset)}}
@media(prefers-reduced-motion:reduce){.conversation-shell .ui-select>.ui-select-trigger.ds-mode-control,.conversation-shell .iw-setting-buttons>:is(.ds-progress-trigger,.gr-trigger){transition:none}.conversation-shell .ui-select>.ui-select-trigger.ds-mode-control:is(:hover,:active),.conversation-shell .iw-setting-buttons>:is(.ds-progress-trigger,.gr-trigger):is(:hover,:active){transform:none}}
