/* One composer and the same versioned parts in every workspace section. */
.chat-shell .chat-main .chat-composer.unified-composer{display:flex;flex-direction:column;gap:2px;padding:8px 10px 6px;border:1px solid var(--chat-line);border-radius:28px;background:var(--chat-field);box-shadow:var(--chat-shadow-soft);min-width:0}
.chat-shell .chat-main .unified-composer textarea{display:block;width:100%;min-height:34px;max-height:144px;padding:3px 6px;resize:none;grid-column:auto;margin:0;font:inherit;font-size:16px;line-height:22px;background:transparent}
.unified-composer-toolbar{display:flex;align-items:center;gap:4px;min-width:0;width:100%}.composer-toolbar-spacer{flex:1;min-width:0}
.chat-shell .chat-main .unified-composer .gpt-icon,.chat-shell .chat-main .unified-composer .chat-send{width:44px;height:44px;min-width:44px;min-height:44px;display:grid;place-items:center;margin:0;padding:11px;border-radius:50%;flex:none}
.unified-composer .chat-send svg,.unified-composer .gpt-icon svg{width:22px;height:22px}.unified-composer .chat-send{background:var(--chat-ink);color:var(--chat-bg);border:0}.unified-composer .chat-send:disabled{opacity:.3}
.unified-composer .composer-model{font-size:12px;color:var(--chat-muted);white-space:nowrap;padding:0 5px}.chat-shell .unified-composer .composer-mode{position:static;min-height:44px;padding:0 9px;border:0;background:transparent;border-radius:22px;font-size:12px;white-space:nowrap;margin:0;color:var(--chat-muted)}.chat-shell .unified-composer .composer-mode[aria-pressed=true]{background:var(--chat-bubble);color:var(--chat-ink)}
.composer-parts{display:flex;flex-wrap:wrap;gap:4px;padding:0 4px}.composer-part{display:inline-flex;align-items:center;max-width:100%;min-height:36px;background:var(--chat-bubble);border-radius:20px;padding-left:9px;font-size:12px}.composer-part>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:190px}.composer-part button{display:grid;place-items:center;border:0;border-radius:50%;width:44px;height:44px;color:inherit;background:transparent}.composer-part svg{width:14px;height:14px}
.workspace-with-composer{display:flex;flex:1;min-height:0;min-width:0;overflow:hidden}.workspace-assistant{display:flex;flex-direction:column;justify-content:space-between;width:350px;min-width:320px;flex:none;border-right:1px solid var(--chat-line);padding:28px 16px 12px;background:var(--chat-bg);overflow:auto}.workspace-assistant-intro{padding:12px}.workspace-assistant-kicker{font-size:12px;color:var(--chat-muted)}.workspace-assistant h2{font-size:25px;font-weight:500;letter-spacing:-.7px;margin:20px 0 12px}.workspace-assistant p{font-size:14px;line-height:22px;color:var(--chat-muted)}.workspace-assistant .chat-composer-wrap{padding:0;width:100%;margin:0;flex:none}.workspace-assistant .chat-disclaimer{padding:0 8px;font-size:11px;line-height:17px}.workspace-catalogue-pane{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:auto}.workspace-continue-chat{padding:10px 0;min-height:44px;border:0;background:none;color:inherit;font-size:13px}
.chat-shell .gpt-tools.unified-picker{position:fixed;z-index:150;left:max(16px,calc((100vw - 640px)/2));right:auto;top:max(20px,calc((var(--chat-visible-height,100dvh) - 640px)/2));bottom:auto;width:min(640px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:min(640px,calc(var(--chat-visible-height,100dvh) - 40px));padding:12px;background:var(--chat-field);border:1px solid var(--chat-line);border-radius:26px;box-shadow:var(--chat-shadow-float);overflow:auto;overscroll-behavior:contain;color:var(--chat-ink)}
.unified-picker header{display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;top:-12px;background:var(--chat-field);z-index:2;padding:4px 0}.unified-picker header strong{font-size:16px;font-weight:500}.unified-picker .gpt-icon{width:44px;height:44px;min-width:44px;min-height:44px;border-radius:50%;border:0;background:var(--chat-bubble);display:grid;place-items:center;padding:11px}.unified-picker svg{width:22px;height:22px}.parts-file{display:flex;align-items:center;gap:12px;min-height:44px;padding:8px 12px;border:0;background:transparent;border-radius:22px;color:inherit;font-size:14px}
.parts-search{display:flex;align-items:center;gap:8px;background:var(--chat-side);border-radius:16px;padding:4px 10px;margin-top:6px}.parts-search input{min-width:0;flex:1;border:0;background:transparent;color:inherit;font:inherit;font-size:16px;min-height:36px}.parts-tabs{display:flex;gap:6px;overflow:auto;white-space:nowrap;padding:6px 0;scrollbar-width:none}.parts-tabs button{min-height:44px;border:0;border-radius:22px;padding:0 13px;background:transparent;color:var(--chat-muted);font-size:13px}.parts-tabs button[aria-pressed=true]{background:var(--chat-bubble);color:var(--chat-ink)}
.parts-clear-search,.catalogue-clear-search{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:10px;border:0;border-radius:12px;background:transparent;color:inherit}.parts-clear-search svg{width:18px;height:18px}.parts-category-purpose,.parts-version-note{margin:4px 4px 12px;color:var(--chat-muted);font-size:12px;line-height:18px}.parts-version-note{overflow-wrap:anywhere}.parts-empty{grid-column:1/-1;padding:12px 4px;color:var(--chat-muted);font-size:14px;line-height:21px}.parts-empty p{margin:0 0 10px}.parts-empty>button,.parts-search-examples button,.catalogue-search-reset,.catalogue-search-examples button{min-height:44px;border:1px solid var(--chat-line);border-radius:14px;padding:8px 13px;background:var(--chat-side);color:var(--chat-ink);font:inherit;font-size:13px;cursor:pointer}.parts-empty>button{margin-bottom:14px}.parts-search-examples,.catalogue-search-examples{display:flex;flex-wrap:wrap;gap:7px}.catalogue-clear-search{font-size:22px;line-height:1}.catalogue-empty .catalogue-search-examples{margin-top:10px}
.parts-search-examples button,.catalogue-search-examples button{max-width:100%;overflow-wrap:anywhere}
.parts-search input::-webkit-search-cancel-button,.catalogue-search input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.parts-directions{font-size:13px;margin:0 4px 8px}.parts-directions summary{cursor:pointer;min-height:44px;align-content:center}.parts-directions button{min-height:44px;display:block;border:0;background:transparent;color:inherit;text-align:left;width:100%;padding:8px 12px}.parts-more{width:100%;min-height:44px;background:var(--chat-side);border:0;border-radius:22px;color:inherit;margin:8px 0}.parts-description{font-size:13px;line-height:20px;color:var(--chat-muted)}.parts-preview-actions{display:flex;flex-wrap:wrap;gap:8px}.parts-preview-actions button,.parts-preview-actions a{min-height:44px;border:1px solid var(--chat-line);border-radius:22px;background:transparent;color:inherit;font:inherit;font-size:13px;padding:10px 14px;text-decoration:none}.parts-live-preview{width:100%;height:330px;border:1px solid var(--chat-line);border-radius:16px;background:#fff;margin:10px 0}.unified-composer button:focus-visible,.unified-picker button:focus-visible,.parts-preview-actions a:focus-visible{outline:2px solid var(--chat-ink);outline-offset:3px}
@media(max-width:1199px) and (min-width:768px){.workspace-assistant{width:320px;min-width:290px;padding-left:10px;padding-right:10px}.workspace-assistant .composer-model{font-size:11px}.workspace-assistant .composer-mode{padding:0 4px}.workspace-assistant .unified-composer-toolbar{gap:0}}
@media(max-width:767px){.workspace-with-composer{flex-direction:column;overflow:visible;min-height:calc(var(--chat-visible-height,100dvh) - 60px)}.workspace-catalogue-pane{order:0;overflow:visible;min-height:240px}.workspace-assistant{order:1;position:sticky;bottom:0;width:100%;min-width:0;border-right:0;border-top:1px solid var(--chat-line);padding:8px 12px max(8px,env(safe-area-inset-bottom));overflow:visible;z-index:30}.workspace-assistant-intro{display:none}.workspace-assistant .chat-disclaimer{margin:5px 0 0}.chat-shell .chat-main .chat-composer.unified-composer{padding:6px 8px 4px;border-radius:22px;gap:0}.chat-shell .chat-main .unified-composer textarea{font-size:16px;min-height:32px;padding:3px 6px}.unified-composer-toolbar{gap:2px}.unified-composer .composer-model{padding:0 3px;font-size:11px}.chat-shell .unified-composer .composer-mode{font-size:11px;padding:0 6px}.chat-shell .gpt-tools.unified-picker{left:8px;top:12px;bottom:12px;width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(var(--chat-visible-height,100dvh) - 24px);border-radius:22px;padding:12px}.parts-live-preview{height:300px}.composer-part>span{max-width:210px}.chat-main.is-composing .workspace-assistant{min-height:120px}}
@media(prefers-reduced-motion:reduce){.unified-picker *{scroll-behavior:auto}}
/* Existing chat dock stays in chat; section assistants are contained in their column. */
.chat-shell .workspace-assistant .chat-composer-wrap{position:relative;inset:auto;left:auto;right:auto;top:auto;bottom:auto;transform:none;width:100%;max-width:100%;padding:0;margin:0;z-index:40}
.chat-shell .workspace-assistant .composer-parts{align-self:stretch;justify-content:flex-start;margin:0}
@media(max-width:767px){.chat-shell .chat-main.is-composing .workspace-assistant .chat-composer-wrap{position:fixed;left:0;right:0;top:var(--chat-composer-top,0px);bottom:auto;transform:none;width:100%;max-width:100%;padding:12px;z-index:90}}
@media(max-width:360px){.unified-composer .composer-model{font-size:10px;padding:0 2px}.chat-shell .unified-composer .composer-mode{font-size:10px;padding:0 4px}.unified-composer-toolbar{gap:0}}
.workspace-with-composer .catalogue-search{position:relative;inset:auto;left:auto;right:auto;top:auto;bottom:auto;transform:none;width:100%;height:48px;max-width:100%;margin:0 0 20px;box-shadow:none;background:var(--chat-side)}
body.chat-shell-page .chat-main .workspace-with-composer .catalogue-search{position:relative;inset:auto;transform:none;width:100%;margin:0 0 20px}
.composer-adapter-note{font-size:12px;line-height:18px;padding:8px;color:var(--chat-muted)}.composer-adapter-note button{display:block;min-height:44px;border:0;border-radius:22px;background:var(--chat-bubble);color:var(--chat-ink);padding:8px 14px;margin-top:6px}
/* Search belongs to its catalogue; it must never cover the shared tool dialog. */
body.chat-shell-page .chat-main .workspace-with-composer .catalogue-search{z-index:1}
.workspace-assistant:has(.unified-picker){z-index:160}
/* The section uses the exact composer library, without opening a second dialog. */
body.chat-shell-page .chat-main .gpt-tools.unified-picker.is-embedded{position:relative;inset:auto;width:100%;max-width:none;max-height:none;overflow:visible;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;z-index:auto}
.unified-picker.is-embedded>header{position:static;background:transparent;padding:0 0 8px}.unified-picker.is-embedded>header strong{font-size:20px}.unified-picker.is-embedded .parts-results{grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:10px}
.parts-detail{position:relative;min-width:0}.parts-preview-bar{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:12px;background:var(--chat-field);padding:8px 0 12px;min-width:0}.parts-preview-bar>div{flex:1;min-width:0;display:grid;gap:4px}.parts-preview-bar strong{font-size:17px;line-height:22px;font-weight:500;overflow:hidden;text-overflow:ellipsis}.parts-preview-bar small{font-size:11px;color:var(--chat-muted)}.parts-preview-bar .gpt-icon{display:grid;place-items:center;width:44px;height:44px;min-width:44px;border-radius:50%;padding:10px;border:0;background:var(--chat-bubble);color:var(--chat-ink)}.parts-preview-bar svg{width:22px;height:22px}
.parts-preview-bar .parts-use{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:24px;padding:10px 15px;min-height:44px;background:var(--chat-ink);color:var(--chat-bg);font:inherit;font-size:13px;white-space:nowrap}.parts-preview-bar .parts-use:disabled{opacity:.5}.parts-preview-bar .parts-use svg{width:17px;height:17px}.parts-view-tabs{display:flex;gap:6px;margin:4px 0 8px}.parts-view-tabs button{border:0;border-radius:20px;padding:9px 13px;min-height:44px;color:var(--chat-muted);background:transparent;font:inherit;font-size:12px}.parts-view-tabs button[aria-pressed=true]{background:var(--chat-bubble);color:var(--chat-ink)}
.parts-detail .parts-live-preview{height:clamp(300px,55dvh,600px);display:block;margin:4px 0 10px;border:1px solid var(--chat-line);background:#fff}.parts-preview-note{font-size:13px;color:var(--chat-muted);line-height:20px}.parts-detail .parts-info{margin-top:8px}.parts-close-preview{position:relative;margin-left:auto;margin-bottom:4px}.product-library-preview{padding:0!important}.product-library-preview .parts-preview-bar{padding-left:4px;padding-right:4px}.product-library-preview .parts-live-preview{width:100%;box-sizing:border-box}
@media(max-width:767px){.unified-picker.is-embedded .parts-results{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.parts-preview-bar{gap:8px}.parts-preview-bar strong{font-size:15px}.parts-preview-bar .parts-use{padding:10px 12px;font-size:12px}.parts-detail .parts-live-preview{height:clamp(290px,48dvh,500px)}.parts-view-tabs button{font-size:11px;padding:8px 10px}}

/* Image-first reusable-part cards; content and controls stay on one surface. */
.unified-picker .parts-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:start}.unified-picker .parts-results>p,.unified-picker .parts-more{grid-column:1/-1}.unified-picker .parts-item{display:block;position:relative;padding:0;border:0;border-radius:16px;overflow:hidden;isolation:isolate;background:#0d1219;min-width:0}.unified-picker .parts-item-preview{display:block;position:relative;width:100%;height:164px;padding:0;min-width:0;border:0;border-radius:16px;text-align:left;overflow:hidden;color:#fff}.unified-picker .parts-item-preview>.visual-preview{position:absolute;inset:0;min-height:0;height:100%;border-radius:inherit}.unified-picker .parts-item-copy{position:absolute;inset:auto 0 0;z-index:2;display:block;padding:12px;min-height:0;color:#fff}.unified-picker .parts-item-copy strong{font-size:13px;line-height:18px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:550;text-shadow:0 1px 10px #0006}.unified-picker .parts-item>.parts-add{position:absolute;top:5px;right:5px;z-index:3;width:44px;height:44px;min-width:44px;border-radius:50%;border:1px solid #ffffff38;background:#ffffffdb;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:none;color:#202020}.unified-picker .parts-item>.parts-add:disabled{opacity:1;background:#ffffffb0;color:#333}.unified-picker .parts-item-preview:focus-visible{outline:2px solid #fff;outline-offset:-4px}
@media(max-width:767px){.unified-picker .parts-results{grid-template-columns:repeat(2,minmax(0,1fr))}.unified-picker .parts-item-preview{height:158px}.unified-picker .parts-item-copy{padding:10px 12px}.unified-picker .parts-item-copy strong{font-size:13px;line-height:18px}}
.unified-picker .parts-item:has(>.parts-add.has-label) .parts-item-preview{height:204px}.unified-picker .parts-item:has(>.parts-add.has-label) .parts-item-copy{padding-bottom:62px}.unified-picker .parts-item>.parts-add.has-label{display:flex;align-items:center;justify-content:center;gap:5px;top:auto;right:6px;bottom:6px;width:calc(100% - 12px);min-width:0;height:auto;min-height:44px;padding:6px 8px;border-radius:12px;font:500 12px/16px var(--leai-font,system-ui);text-align:center}.unified-picker .parts-item>.parts-add.has-label svg{width:16px;height:16px;flex:none}.unified-picker .parts-item>.parts-add.has-label span{min-width:0}.unified-picker .parts-item>.parts-add.has-label:focus-visible{outline-color:#fff;outline-offset:-3px}
@media(max-width:360px){.unified-picker .parts-item>.parts-add.has-label{font-size:11px;padding-inline:5px;gap:3px}.parts-preview-bar .parts-use{white-space:normal;text-align:center;line-height:16px;max-width:132px}}

/* One mounted editor changes shape; its compact bar never leaves the workspace. */
.chat-shell .chat-main .chat-composer.unified-composer{align-items:stretch;box-sizing:border-box;box-shadow:none;border-radius:18px}
.chat-shell .chat-main .unified-composer [hidden]{display:none!important}
.unified-composer.is-compact .unified-composer-toolbar{display:contents}
.composer-parts-count{grid-column:3;grid-row:1;display:flex;align-items:center;justify-content:center;gap:3px;width:44px;min-width:44px;height:44px;padding:4px;border:0;border-radius:12px;background:var(--chat-side);color:var(--chat-ink);font:500 12px/20px var(--leai-font,system-ui)}
.composer-parts-count svg{width:16px;height:16px}
.composer-parts.has-target{flex-wrap:nowrap;max-height:44px;overflow-x:auto;flex:none;scrollbar-width:none}
.composer-parts.has-target::-webkit-scrollbar{display:none}
.composer-parts.has-target .composer-part{flex:none}
.composer-target{display:inline-flex;align-items:center;gap:6px;flex:none;min-width:0;max-width:100%;height:44px;box-sizing:border-box;padding-left:9px;border:1px solid var(--chat-line);border-radius:20px;background:var(--chat-bubble);font-size:12px}
.composer-target>span{min-width:0;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.composer-target>svg{width:14px;height:14px;flex:none}
.composer-target button{display:grid;place-items:center;flex:none;width:44px;height:44px;min-width:44px;padding:0;border:0;border-radius:50%;background:transparent;color:inherit}
.composer-target button svg{width:14px;height:14px}
.chat-shell .chat-main .unified-composer.is-compact .chat-send{border-radius:12px}
.composer-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;flex:none;width:100%;min-width:0}
.composer-shortcuts button{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:44px;padding:7px 4px;border:0;border-radius:12px;background:var(--chat-side);color:var(--chat-ink);font:400 12px/18px var(--leai-font,system-ui);cursor:pointer}
.composer-shortcuts svg{width:16px;height:16px;flex:none}
.composer-shortcuts span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.composer-shortcuts.has-build{display:flex;height:44px;min-height:44px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.composer-shortcuts.has-build::-webkit-scrollbar{display:none}
.composer-shortcuts.has-build button{flex:0 0 auto;min-width:84px;padding-inline:10px}
.composer-shortcuts.has-build .composer-build{background:var(--chat-ink);color:var(--chat-bg);min-width:116px}
.composer-shortcuts .composer-build:disabled{opacity:.4;cursor:default}
.chat-composer-wrap:has(>.unified-composer.is-compact)>.composer-service-hint{display:none}
@media(min-width:768px){.workspace-assistant .composer-shortcuts button{flex-direction:column;gap:2px;font-size:11px;padding:5px 2px}.workspace-assistant .composer-shortcuts svg{width:15px;height:15px}}
@media(min-width:768px){.chat-shell .gpt-tools.unified-picker:not(.is-embedded){top:auto;bottom:calc(var(--chat-compose-height,76px) + 16px);max-height:min(640px,calc(var(--chat-visible-height,100dvh) - var(--chat-compose-height,76px) - 32px))}}
@media(max-width:767px){.chat-shell .workspace-assistant .chat-composer-wrap{position:fixed;left:0;right:0;top:auto;bottom:max(8px,env(safe-area-inset-bottom));width:100%;padding:4px 12px 0;z-index:45}.chat-shell .chat-main .chat-composer.unified-composer.is-expanded{gap:5px;padding:8px;border-radius:18px}.composer-shortcuts button{font-size:11px;gap:4px}.chat-main.is-composing .workspace-assistant{min-height:0}}
@media(max-width:767px) and (max-height:550px){.chat-main.has-scene.is-composing .chat-transcript{padding-top:0;padding-bottom:0}.chat-main.has-scene.is-composing .chat-conversation>.chat-composer-wrap{padding:2px 10px max(2px,env(safe-area-inset-bottom))}.chat-shell .chat-main.has-scene .unified-composer.is-expanded textarea{max-height:64px}.chat-shell .chat-main.has-scene .unified-composer.is-expanded .composer-parts{flex-wrap:nowrap;overflow-x:auto;max-height:44px;flex:none}.chat-main.has-scene .unified-composer.is-expanded .composer-part{flex:none}.chat-shell .chat-main.has-scene .unified-composer.is-expanded .composer-mode{padding-inline:4px}}
/* An explicitly opened status disclosure remains readable while typing. */
.chat-main.is-composing .composer-service-hint details[open] .chat-disclaimer{display:block}
/* Photo/video attachments waiting for the next agent instruction (media-attach.js) */
.composer-media{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:0 4px}
.composer-media-busy{font-size:12px;color:var(--chat-muted);padding:0 8px}
/* An explicitly opened action menu may extend above the flat input; keep the
   textarea/chip scrolling rules while allowing its native buttons to be hit. */
.chat-shell .chat-main .chat-composer.unified-composer.is-expanded:has(.composer-advanced[open]){overflow:visible}

/* One catalogue workspace and one shared composer; active task remains in composerView. */
.chat-shell .workspace-with-composer{display:block;position:relative;flex:1;min-height:0;min-width:0;overflow:hidden}
.chat-shell .workspace-with-composer>.workspace-assistant{display:contents}
.chat-shell .workspace-with-composer>.workspace-catalogue-pane{height:100%;min-width:0;overflow:auto;padding-bottom:calc(var(--chat-compose-height,var(--composer-reserve,76px)) + 20px);box-sizing:border-box}
.chat-shell .workspace-with-composer .workspace-assistant>.chat-composer-wrap{position:absolute;inset:auto 0 0;width:min(900px,100%);margin-inline:auto;transform:none;box-sizing:border-box}
.catalogue-return-chat{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:8px 10px;border:0;border-radius:12px;background:transparent;color:inherit;white-space:nowrap}.catalogue-return-chat svg{width:18px;height:18px}
.chat-shell .unified-picker .parts-results{grid-template-columns:repeat(auto-fill,minmax(152px,1fr));gap:12px}
.chat-shell .unified-picker .parts-item-preview{height:auto;aspect-ratio:1;width:100%;min-height:0}
.chat-shell .unified-picker .parts-item-copy{padding:10px 12px;display:flex;flex-direction:column;gap:3px}
.parts-card-open-label{display:block;font-size:12px;line-height:20px;opacity:.9}.chat-shell .unified-picker .parts-item-copy small{font-size:11px;line-height:16px}
@media(max-width:767px){.chat-shell .unified-picker .parts-results{grid-template-columns:repeat(2,minmax(0,1fr))}.chat-shell .workspace-with-composer .workspace-assistant>.chat-composer-wrap{padding-inline:8px}.catalogue-return-chat>span{display:none}}
/* Keyboard-height workspace: keep typing and its actions together, never below the visible screen. */
@media(max-height:560px){
 .chat-shell .chat-main .unified-composer.is-expanded textarea{min-height:44px;max-height:84px;overflow-y:auto;font-size:16px;line-height:22px}
 .chat-shell .chat-main .unified-composer .composer-shortcuts{display:none}
 .chat-shell .chat-main .chat-composer-wrap>.composer-service-hint{max-height:52px;overflow:auto;margin-block:3px}
 .chat-shell .chat-main .chat-composer-wrap .unified-composer-toolbar{position:sticky;bottom:0;flex:none;background:var(--chat-field,#fff);z-index:1}
}
@media(max-width:767px){

 .chat-shell .chat-main.is-composing .workspace-with-composer .workspace-assistant>.chat-composer-wrap{position:fixed;top:var(--chat-composer-top,8px);bottom:auto;max-height:calc(var(--chat-visible-height,100dvh) - 16px)}
}
.composer-upload-retry{display:block;min-height:44px;max-width:100%;border:1px solid var(--chat-line);border-radius:10px;background:var(--chat-bg,#fff);color:inherit;text-align:left;padding:8px 10px;font-size:12px;overflow-wrap:anywhere}

.chat-shell .chat-main.has-catalogue-workspace{height:var(--chat-visible-height,100dvh);min-height:0;overflow:hidden}
.placement-open-chat{min-height:44px;padding:6px 10px;margin-left:8px;border:1px solid var(--chat-line);border-radius:10px;background:var(--chat-bg,#fff);color:var(--chat-ink,#111);font:inherit}
/* Internal-scroll mobile workspaces must not acquire a layout-viewport scroll
   when the browser focuses an input after the visual viewport shrinks. Native
   transcript pages keep their existing document scrolling. */
@media(max-width:767px){body.chat-shell-page[data-page-scroll="false"]{position:fixed;inset:0;width:100%;height:100%}}

/* First-screen artwork pilot: RING and WAVE only; keep the grid inert and the title crisp. */
.chat-shell .unified-picker .parts-item.has-source-cover .image-card-glass,.chat-shell .product-card.has-source-cover .image-card-glass{background:linear-gradient(180deg,transparent 58%,#0002 72%,#000b 100%)}
.chat-shell .unified-picker .parts-item.has-source-cover .image-card-glass-layer,.chat-shell .product-card.has-source-cover .image-card-glass-layer{display:none}
.chat-shell .unified-picker .parts-item.has-source-cover .visual-preview>img{object-position:center 35%}
.chat-shell .unified-picker .parts-item.has-source-cover .parts-item-copy{padding:14px}
.chat-shell .unified-picker .parts-item.has-source-cover .parts-item-copy strong{font-size:16px;line-height:22px;font-weight:650;text-shadow:0 1px 5px #000a}

/* One workplace: context is optional, typing and its two actions stay together. */
.chat-shell .chat-main .chat-composer.unified-composer.is-workplace{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:end;grid-template-rows:auto auto auto;height:auto;min-height:60px;max-height:none;gap:2px;padding:5px;border-radius:24px;overflow:visible}
.chat-shell .chat-main .unified-composer.is-workplace>.unified-composer-toolbar{display:contents}
.chat-shell .chat-main .unified-composer.is-workplace>textarea{grid-column:2;grid-row:3;min-height:44px;max-height:144px;min-width:0;width:100%;padding:10px 4px;box-sizing:border-box;overflow-y:auto}
.chat-shell .unified-composer.is-workplace .composer-tools-trigger{grid-column:1;grid-row:3}
.chat-shell .unified-composer.is-workplace .chat-send{grid-column:3;grid-row:3}
.chat-shell .chat-main .unified-composer.is-workplace.is-large>textarea{min-height:min(240px,35dvh);max-height:min(360px,45dvh)}
.chat-shell .unified-composer.is-workplace.is-dictating{grid-template-columns:44px minmax(0,1fr) 44px 44px}
.chat-shell .unified-composer.is-workplace.is-dictating .composer-dictation{grid-column:3;grid-row:3}
.chat-shell .unified-composer.is-workplace.is-dictating .chat-send{grid-column:4}
.composer-context-row{grid-column:1/-1;grid-row:1;display:flex;align-items:flex-start;gap:4px;min-width:0}
.composer-context-row>.constructor-panel,.composer-context-row>.composer-context{flex:1;min-width:0;margin:0}
.chat-shell .composer-context-row .constructor-toolbar{margin:0;padding:0;min-height:44px}
.chat-shell .composer-context-row .constructor-structure-toggle{display:flex;flex-wrap:wrap;min-height:44px;max-width:100%;gap:6px;padding:6px 8px;overflow-wrap:anywhere}
.chat-shell .composer-context-row .constructor-structure-toggle small{font-size:12px;color:var(--chat-muted);white-space:normal}
.chat-shell .composer-context-row #constructor-structure{max-height:min(260px,30dvh);overflow:auto;overscroll-behavior:contain;padding:6px 4px}
.composer-context>summary{display:flex;align-items:center;gap:6px;min-height:44px;padding:4px 8px;box-sizing:border-box;font-size:13px;cursor:pointer;list-style:none}
.composer-context>summary::-webkit-details-marker{display:none}.composer-context>summary svg{width:18px;height:18px}
.composer-context[open]{max-height:min(260px,30dvh);overflow:auto;overscroll-behavior:contain}
.composer-context-row .composer-parts,.composer-context-row .composer-media{display:flex;gap:4px;padding:4px;max-height:none;flex-wrap:wrap}
.composer-context-row .composer-target{display:inline-flex;align-items:center;max-width:100%;gap:6px;font-size:12px}.composer-context-row .composer-target>span{overflow-wrap:anywhere}.composer-context-row .composer-target svg{width:18px;height:18px}
.composer-context-row button{min-height:44px;min-width:44px}.composer-context-row .composer-target button{width:44px;height:44px;border:0;background:transparent;color:inherit}
.unified-composer.is-workplace>.composer-media-busy{grid-column:1/-1;grid-row:2}
.picker-chat-actions{margin:4px 0;font-size:13px}.picker-chat-actions>summary{min-height:44px;align-content:center;cursor:pointer;padding-inline:12px}.picker-chat-action-list{display:flex;flex-direction:column;gap:2px;padding:4px;background:var(--chat-side,#f8f8f8);border-radius:14px}
.picker-chat-action-list>button{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 12px;border:0;border-radius:10px;background:transparent;color:inherit;text-align:left;font:inherit;font-size:13px}.picker-chat-action-list>button:focus-visible,.picker-chat-actions>summary:focus-visible,.composer-context>summary:focus-visible{outline:2px solid currentColor;outline-offset:-2px}.picker-chat-action-list svg{width:20px;height:20px}
.chat-sidebar>header{gap:2px}.chat-sidebar>header .chat-brand{flex:1}.chat-sidebar>header>.gpt-icon{min-height:44px;min-width:44px}
.chat-secondary-nav{font-size:14px}.chat-secondary-nav>summary{padding:8px 12px;min-height:44px;box-sizing:border-box;cursor:pointer;align-content:center}.chat-sidebar nav .chat-secondary-nav>button{width:100%;min-height:44px;display:flex;align-items:center;gap:10px}.chat-sidebar nav>button{min-height:44px}
.chat-welcome:has(>h1:only-child){min-height:clamp(160px,40dvh,360px);display:grid;place-items:center;padding:24px}.chat-welcome:has(>h1:only-child)>h1{margin:0;font-size:clamp(25px,4vw,34px);font-weight:500}
@media(max-height:560px){.chat-shell .chat-main .unified-composer.is-workplace>textarea,.chat-shell .chat-main .unified-composer.is-workplace.is-large>textarea{min-height:44px;max-height:84px}.chat-shell .composer-context-row #constructor-structure,.composer-context[open]{max-height:100px}.chat-welcome:has(>h1:only-child){min-height:90px;padding:12px}}
.chat-shell .composer-context-row>.constructor-panel.is-inline{display:block;border:0;background:transparent;box-shadow:none;padding:0;margin:0}
.chat-shell .composer-context-row>.constructor-panel.is-inline>.constructor-toolbar{display:flex}
.context-chevron{margin-left:auto;flex:none;font-size:18px;line-height:20px;color:var(--chat-muted)}
@media(max-height:560px){.chat-welcome:has(>h1:only-child){display:none}}
/* Unfocused drafts stay flat; focusing restores wrapping in the same textarea. */
.chat-shell .chat-main .unified-composer.is-workplace.is-compact>textarea{max-height:44px;white-space:pre}
.chat-shell .chat-main .unified-composer.is-workplace.is-expanded>textarea{white-space:pre-wrap}
