/* finesse · register=product · shell=PIKA-image-workbench · A=existing-yellow-neutral · B=PIKA-UI · C=result-stream-composer · D=CSS-state-feedback · E=photographic-workspace · SOUL=6 SPECTACLE=2 DENSITY=6 */
.iw-workbench,.iw-dialog{--iw-bg:var(--paper,#f7f7f4);--iw-surface:var(--surface,#fff);--iw-ink:var(--text,#1c211c);--iw-muted:#60675f;--iw-line:rgba(43,49,37,.14);--iw-soft:#f1f2ed;--iw-gold:var(--gold,#f4c91f);--iw-selected:#fff8dc;--iw-error:#b33226;--iw-shadow:0 14px 50px -20px rgba(36,42,29,.3);color:var(--iw-ink)}
.plain-main:has(.iw-workbench){padding:0;height:100dvh;min-height:0;overflow:hidden}
.iw-workbench{height:100%;position:relative;display:flex;flex-direction:column;background:var(--iw-bg);isolation:isolate}
.iw-workbench button:not(:where(.generation-result *)),.iw-dialog button,.iw-dialog a{font:inherit;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border:1px solid transparent;border-radius:10px;background:transparent;color:inherit;white-space:nowrap;transition:transform 180ms cubic-bezier(.2,.7,.3,1),background-color 180ms,opacity 180ms}
.iw-workbench button:not(:where(.generation-result *)):active:not(:disabled),.iw-dialog button:active{transform:scale(.95);transition-duration:90ms}.iw-workbench button:not(:where(.generation-result *)):disabled{opacity:.45;cursor:not-allowed}
.iw-workbench :is(button,a,input,textarea):focus-visible,.iw-dialog :is(button,a):focus-visible{outline:2px solid var(--iw-ink);outline-offset:3px}
.iw-header{min-height:76px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 36px}.iw-save{font-size:12px;color:var(--iw-muted);white-space:nowrap}.iw-save-error{font-size:12px;color:var(--iw-error)}.iw-loading{padding:28px}
.iw-history{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;--composer-space:280px}.iw-history-inner{width:100%;margin:auto;padding:8px 36px var(--composer-space)}
.iw-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:calc(100dvh - 440px);padding:40px 0;text-align:center;color:var(--iw-muted)}.iw-empty h1{font-size:24px;font-weight:500;color:var(--iw-ink);margin:20px 0 8px;overflow-wrap:anywhere}.iw-empty p{font-size:14px;line-height:1.8;max-width:360px}.iw-empty button{margin-top:16px;padding:0 18px;border-color:var(--iw-line)}
.iw-results{display:flex;flex-direction:column;gap:2px;width:100%;min-width:0}
.iw-result-row{display:grid;gap:2px;align-items:start}
.iw-result-row.is-single{width:calc((100% - 2px)/2)}
/* Results can be portaled into the shared conversation outside .iw-workbench. */
.iw-results .iw-result{display:grid;place-items:center;position:relative;width:100%;min-width:0;min-height:0;padding:0;border:0;border-radius:0;background:transparent;overflow:hidden}
.iw-result img{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain;border-radius:0;transition:opacity .18s}

.iw-run-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:12px}.iw-run-actions button{padding:0 14px;background:transparent;font-size:13px}.iw-workbench .iw-run-actions button:hover:not(:disabled){background:transparent}.iw-run-actions small{font-size:12px;color:var(--iw-muted);margin-left:6px}.iw-bottom{height:1px}
.iw-composer-wrap{position:absolute;bottom:24px;left:32px;right:32px;max-width:1120px;margin-inline:auto;z-index:10}.iw-composer{border:1px solid var(--iw-line);border-radius:24px;box-shadow:var(--iw-shadow);background:var(--iw-surface);padding:20px}.iw-back-bottom{position:absolute;right:16px;bottom:calc(100% + 14px);padding:0 16px;background:var(--iw-surface)!important;border-color:var(--iw-line)!important;box-shadow:var(--iw-shadow);font-size:13px!important;border-radius:24px!important}
.iw-prompt-row{display:flex;gap:20px;align-items:flex-start;min-height:95px}.iw-prompt-field{min-width:0;flex:1}.iw-prompt-field textarea{display:block;width:100%;height:78px;min-height:60px;max-height:180px;resize:vertical;border:0;border-radius:6px;background:transparent;box-shadow:none;padding:4px 0;font:inherit;font-size:16px;line-height:1.65;color:var(--iw-ink)}.iw-prompt-field textarea:focus{background:transparent;box-shadow:none}.iw-prompt-field textarea::placeholder{color:var(--iw-muted)}
/* Badge center meets the 8px card corner at 45 degrees, shared by all modes. */
.iw-workbench .iw-stack{flex-shrink:0;position:relative;width:66px;height:82px;margin:4px 6px 0 4px;background:transparent;border-radius:12px}.iw-stack img{position:absolute;width:45px;height:61px;object-fit:cover;border:2px solid var(--iw-surface);border-radius:5px;transform:rotate(calc((var(--i) - 1)*9deg));transition:transform 240ms cubic-bezier(.22,.61,.36,1)}.iw-stack-count{position:absolute;right:calc(var(--material-upload-corner,2.343px) - 12px);bottom:calc(var(--material-upload-corner,2.343px) - 12px);width:24px;height:24px;display:grid;place-items:center;background:var(--iw-gold);color:#000;font-size:11px;border-radius:50%;z-index:2}
.iw-toolbar{display:flex;align-items:center;gap:10px;margin-top:8px}.iw-setting-buttons{display:flex;flex:1;gap:8px;min-width:0;flex-wrap:nowrap}.iw-setting-buttons button{font-size:13px;border-color:var(--iw-line);padding:0 10px;gap:6px}.iw-setting-label{display:none}.iw-workbench .is-selected{background:var(--iw-selected);border-color:var(--iw-gold)}.iw-workbench .iw-generate,.iw-dialog .iw-generate{background:var(--iw-gold);color:var(--iw-ink);font-size:14px;font-weight:600;padding:0 18px;flex-shrink:0}
.iw-error{font-size:12px;line-height:1.6;margin:10px 0 0;color:var(--iw-muted)}.iw-error{color:var(--iw-error)}
.iw-material-panel{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--iw-line);animation:iw-panel-in .22s ease-out}.iw-material-scroll{max-height:min(300px,35dvh);overflow-y:auto;overscroll-behavior:contain;padding:4px}
.iw-product-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.iw-tile{position:relative;min-width:0;border:1px solid var(--iw-line);border-radius:12px;background:var(--iw-soft)}.iw-workbench .iw-tile-main,.iw-dialog .iw-tile-main{position:relative;display:flex;flex-direction:column;width:100%;height:132px;padding:0;overflow:hidden;white-space:normal}.iw-tile-main img{width:100%;height:100%;object-fit:cover;transition:transform .22s ease}.iw-tile-main>span{position:absolute;bottom:0;left:0;right:0;font-size:12px;display:flex;justify-content:center;gap:4px;padding:6px;background:var(--iw-surface);line-height:1.3}.iw-tile-main small{font-size:10px;color:var(--iw-muted)}.iw-workbench .iw-remove,.iw-dialog .iw-remove{position:absolute;right:-4px;top:-4px;width:30px;min-height:30px;padding:0;border-radius:50%;background:var(--iw-surface);border-color:var(--iw-line);z-index:2}.iw-tile-check{position:absolute;left:6px;top:6px;display:grid;place-items:center;width:22px;height:22px;background:var(--iw-gold);border-radius:50%;pointer-events:none}.iw-library{min-width:0;display:flex;align-items:center}.iw-library>p{font-size:13px;color:var(--iw-muted);line-height:1.8;margin:auto;text-align:center;padding:16px}.iw-workbench .iw-compact-open{display:flex;width:100%;min-width:0;gap:20px;justify-content:flex-start;text-align:left;min-height:70px;padding:0}.iw-compact-open>span:nth-child(2){flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;color:var(--iw-muted)}.iw-mini-stack{width:46px;height:58px;flex-shrink:0;display:grid;place-items:center}.iw-mini-stack img{width:100%;height:100%;object-fit:cover;transform:rotate(-6deg);border:2px solid var(--iw-surface);border-radius:5px}.iw-composer-wrap.is-compact{max-width:960px}.iw-composer-wrap.is-compact .iw-composer{animation:iw-compact-in .22s ease-out}
.iw-popover{position:absolute;bottom:82px;left:20px;width:min(520px,calc(100% - 40px));padding:24px;background:var(--iw-surface);border:1px solid var(--iw-line);border-radius:18px;box-shadow:var(--iw-shadow);max-height:calc(100dvh - 220px);overflow-y:auto;animation:iw-panel-in .16s ease-out;z-index:12}.iw-popover-generation{left:min(150px,10%)}.iw-popover-output{left:auto;right:20px}.iw-workbench .iw-popover-close{position:absolute;right:8px;top:5px;min-height:32px;width:32px}
.iw-choices{border:0;margin:0 0 20px;padding:0;min-width:0}.iw-choices:last-child{margin-bottom:0}.iw-choices legend{font-size:13px;font-weight:500;margin-bottom:10px;display:block}.iw-options{display:flex;flex-wrap:wrap;gap:7px}.iw-options button{border-color:var(--iw-line);padding:0 12px;font-size:13px}.iw-ratios{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px}.iw-ratios button{flex-direction:column;font-size:11px;padding:8px 2px;gap:7px;background:var(--iw-soft);border-radius:8px}.iw-ratios i{display:block;border:1px solid currentColor;border-radius:3px}.iw-dialog{position:fixed;inset:0;margin:auto;border:1px solid var(--iw-line);padding:0;border-radius:20px;background:var(--iw-surface);max-width:calc(100vw - 40px);max-height:90dvh;box-shadow:var(--iw-shadow)}.iw-dialog::backdrop{background:rgba(25,30,23,.58)}.iw-dialog-inner{position:relative;padding:20px}.iw-dialog .iw-dialog-close{position:absolute;top:8px;right:8px;width:44px;background:var(--iw-surface);border:1px solid var(--iw-line);z-index:2}.iw-confirm{width:min(420px,calc(100vw - 80px));padding:20px 12px;text-align:center}.iw-confirm h2{font-size:17px;font-weight:500;line-height:1.7}.iw-confirm>div{display:flex;justify-content:center;gap:12px;margin-top:24px}.iw-confirm button{padding:0 18px}
@media(hover:hover) and (pointer:fine){.iw-workbench button:not(:where(.generation-result *)):hover:not(:disabled),.iw-dialog button:hover{background:var(--iw-soft)}.iw-workbench .iw-generate:hover:not(:disabled),.iw-dialog .iw-generate:hover:not(:disabled){background:var(--iw-gold);color:var(--iw-ink);transform:scale(1.04)}.iw-tile:hover .iw-tile-main img{transform:scale(1.045)}.iw-result:hover img{opacity:.92}.iw-workbench .iw-result:hover{background:var(--iw-soft)}}
@keyframes iw-panel-in{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}@keyframes iw-compact-in{from{opacity:.75;transform:scale(.98)}to{opacity:1;transform:none}}@keyframes iw-appear{from{opacity:0}to{opacity:1}}@keyframes iw-pulse{50%{opacity:.3}}
@media(min-width:1450px){.iw-setting-label{display:inline;color:var(--iw-muted)}}
@media(max-width:1100px){.iw-header{padding:18px 24px}.iw-history-inner{padding-inline:24px}.iw-composer-wrap{left:20px;right:20px}.iw-composer{padding:16px}}
@media(max-width:700px){.plain-main:has(.iw-workbench){height:calc(100dvh - 64px)}.iw-header{padding:10px 14px;min-height:62px}.iw-save{display:none}.iw-history-inner{padding-inline:14px}.iw-composer-wrap{left:10px;right:10px;bottom:max(12px,env(safe-area-inset-bottom))}.iw-composer{border-radius:18px;padding:12px}.iw-prompt-row{gap:12px;min-height:80px}.iw-prompt-field textarea{height:64px}.iw-prompt-field textarea,.iw-compact-open>span:nth-child(2){font-size:14px}.iw-setting-buttons{gap:6px}.iw-setting-buttons button{font-size:12px;padding:0 7px}.iw-material-scroll{max-height:26dvh}.iw-results{gap:2px}.iw-result img{height:100%;width:100%}.iw-popover{left:0;right:auto;width:100%;padding:22px 16px;bottom:82px;max-height:48dvh}.iw-ratios{grid-template-columns:repeat(4,minmax(0,1fr))}.iw-run-actions small{flex-basis:100%}.iw-empty h1{font-size:20px}.iw-compact-open{gap:10px!important}}
@media(prefers-reduced-motion:reduce){.iw-workbench *, .iw-workbench *::before,.iw-dialog *{animation:none!important;transition:none!important;scroll-behavior:auto!important}.iw-workbench button:not(:where(.generation-result *)):active,.iw-workbench button:not(:where(.generation-result *)):hover,.iw-tile:hover img,.iw-result:hover img{transform:none!important}}
/* Workbench refinements: one material row and one action row. */
.iw-prompt-field textarea{--iw-prompt-base-height:78px;box-sizing:border-box;height:var(--iw-prompt-base-height);min-height:var(--iw-prompt-base-height);max-height:calc(var(--iw-prompt-base-height)*2);resize:none;overflow-y:hidden}
.iw-setting-buttons .iw-template-trigger.has-reference{font-weight:600}
@media(max-width:700px){.iw-prompt-field textarea{--iw-prompt-base-height:64px}}
.iw-material-scroll{max-height:none;overflow:visible;padding:5px}
.iw-product-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.iw-product-grid .iw-tile-main{height:clamp(90px,12vw,148px)}
.iw-product-grid .iw-tile:has(>.iw-tile-main>img){--iw-product-tile-bg:transparent;background:transparent}
.iw-product-grid .iw-tile-main:has(>img){display:grid;grid-template-rows:minmax(0,1fr);gap:0}
.iw-product-grid .iw-tile-main img{display:block;width:auto;height:auto;max-width:100%;max-height:100%;min-width:0;min-height:0;justify-self:center;align-self:center;object-fit:contain;padding:0}
.iw-toolbar{flex-wrap:nowrap;gap:8px}
.iw-setting-buttons button{flex-shrink:0}
.iw-setting-label{display:none}
.iw-template-trigger{max-width:none}
.iw-dialog button:disabled{opacity:.35;cursor:not-allowed}
.iw-template-dialog{width:min(920px,calc(100vw - 48px));max-height:85dvh}
.iw-template-dialog h2{font-size:18px;font-weight:500;margin:8px 48px 24px 0}
.iw-template-content{max-height:55dvh;overflow:auto;padding:5px}
.iw-dialog.iw-template-dialog.ds-sketch-case-popover[popover]{position:fixed;inset:auto;margin:0;box-sizing:border-box;max-width:calc(100vw - 24px);height:auto;border-radius:20px;overflow:hidden}
.ds-sketch-case-popover:popover-open{display:flex}
.ds-sketch-case-popover::backdrop{background:transparent;pointer-events:none}
.ds-sketch-case-popover>.iw-dialog-inner{box-sizing:border-box;width:100%;min-height:0;max-height:inherit;display:flex;flex-direction:column;overflow:hidden;padding-bottom:16px}
.iw-dialog.ds-sketch-case-popover>.iw-dialog-inner>h2{margin-bottom:8px}
.ds-sketch-case-popover .iw-template-content{min-height:0;flex:1 1 auto;overflow:auto}
.iw-case-gallery{position:relative;flex:0 1 auto;min-height:0;margin-right:-12px;overflow:hidden}
.ds-sketch-case-popover .iw-case-gallery>.iw-template-content{height:auto;max-height:max(0px,calc(var(--case-panel-limit,620px) - 88px));box-sizing:border-box;padding:0 12px 0 0;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable;overscroll-behavior:contain}
.iw-case-wall{overflow:hidden;border-radius:20px 20px 0 0}
.ds-sketch-case-popover .iw-dialog-inner:has(.ds-case-filters[open]){min-height:min(380px,var(--case-panel-limit,620px))}
.ds-sketch-case-popover :is(.va-panel,.vp-picker){min-height:0;display:flex;flex-direction:column}
.ds-sketch-case-popover .vp-case-actions{position:absolute;inset:0;pointer-events:none;opacity:0}
.ds-sketch-case-popover .iw-case-tile:is(:hover,:has(:focus-visible)) .vp-case-actions{opacity:1}
.ds-sketch-case-popover .vp-case-actions button{pointer-events:auto}
.ds-sketch-case-popover .vp-case-actions .vp-favorite{top:0;bottom:auto;right:0}
.ds-sketch-case-popover .vp-case-actions .vp-view{bottom:4px;left:4px}
@media(hover:none){.ds-sketch-case-popover .vp-case-actions{opacity:1}}
.iw-dialog .iw-case-back-top{position:absolute;z-index:1;right:10px;bottom:12px;display:grid;place-items:center;width:36px;height:36px;min-height:36px;padding:0;border:1px solid #d4d8d1;border-radius:50%;background:#fff;color:#62695f;box-shadow:none}
.iw-case-back-top::before{content:"";position:absolute;inset:-4px;border-radius:50%}
/* Fade only the native thumb and floating control; keep the gutter and wall stable. */
.iw-dialog .iw-case-back-top{opacity:0;pointer-events:none;transition:opacity 280ms ease,transform 160ms ease}
.iw-dialog .iw-case-gallery[data-scrolling=true] .iw-case-back-top,.iw-dialog .iw-case-back-top:is(:hover,:focus-visible){opacity:1;pointer-events:auto;transition-duration:160ms}
@media(prefers-reduced-motion:reduce){.iw-case-gallery,.iw-dialog .iw-case-back-top{transition:none}}
.iw-dialog.ds-sketch-case-popover[aria-label="设计稿案例"]>.iw-dialog-inner{padding-top:16px}
.iw-dialog.ds-sketch-case-popover[aria-label="设计稿案例"]>.iw-dialog-inner>h2{margin-top:0}
.iw-dialog.ds-sketch-case-popover[aria-label="设计稿案例"] .ds-sketch-case-empty{font-size:10px;font-weight:400;color:var(--iw-muted)}
.iw-dialog.ds-sketch-case-popover[aria-label="设计稿案例"] .resource-filter-options button{font-size:10px;font-weight:400}
.ds-sketch-case-popover>.iw-dialog-inner:has(.ds-case-filters){position:relative}
.ds-case-filters{flex:none;margin-bottom:12px}
.ds-case-filters>summary{display:flex;align-items:center;gap:8px;width:fit-content;max-width:100%;min-height:42px;box-sizing:border-box;padding:0 8px;border:0;border-bottom:2px solid #f6cb19;border-radius:0;background:transparent;color:#000;font-size:12px;line-height:1.5;cursor:pointer;list-style:none}
.ds-case-filters>summary::-webkit-details-marker{display:none}
.ds-case-filters>summary:focus-visible{outline:2px solid #62695f;outline-offset:3px}
.ds-case-filters>summary>svg{width:18px;height:18px;flex:none}
.ds-case-filter-menu{position:absolute;z-index:2;top:66px;left:16px;right:16px;box-sizing:border-box;max-height:calc(100% - 82px);overflow:auto;padding:18px;border:1px solid #e0e3dd;border-radius:16px;background:#fff;box-shadow:0 14px 40px #1c221b20}
.ds-case-filter-menu .resource-filter-bar{margin-bottom:0}
.iw-dialog.iw-resource-popover :is(.iw-dialog-inner>h2,.iw-library>p:not([role])){font-size:10px;font-weight:400;color:var(--iw-muted)}
.iw-dialog.iw-resource-popover .resource-filter-options button{font-size:10px;font-weight:400}
.iw-dialog.iw-resource-popover>.iw-dialog-inner{padding-top:16px}
.iw-dialog.iw-resource-popover>.iw-dialog-inner>h2{margin-top:0}
.iw-dialog .is-selected{border-color:var(--iw-gold);background:var(--iw-selected)}
.iw-viewer.iw-dialog{inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0;background:var(--sidebar-bg);padding:0}
.iw-viewer-layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(290px,30vw,420px);width:100%;height:100%;min-height:0}
.iw-viewer-stage{position:relative;min-width:0;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) 60px;padding:70px 32px 20px}
.iw-viewer-image{display:grid;place-items:center;min-width:0;min-height:0}
.iw-viewer-image img{display:block;width:100%;height:100%;min-height:0;object-fit:contain}
.iw-viewer .iw-viewer-close{position:absolute;top:18px;right:18px;width:44px;height:44px;background:var(--iw-surface)}
.iw-viewer-details{min-width:0;overflow-y:auto;background:var(--sidebar-bg);border-left:1px solid var(--iw-line);padding:24px}
.iw-viewer-tools{display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:8px;padding-bottom:22px;border-bottom:1px solid var(--iw-line);margin-bottom:24px}
.iw-viewer-tools a{background:#fff;padding:0 16px;text-decoration:none}
.iw-viewer .iw-viewer-tools .iw-viewer-action{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;gap:6px;height:33px;min-height:33px;max-height:33px;padding:0 14px;border:1px solid transparent;border-radius:999px;background:#fff;color:var(--iw-muted);white-space:nowrap;line-height:1}
.iw-viewer .iw-viewer-tools .iw-viewer-annotate:is(:hover,:active){border-color:transparent;background:#fff;color:var(--iw-muted)}
.iw-viewer .iw-viewer-tools .iw-viewer-annotate[aria-pressed=true]{color:#000}
.iw-viewer-video-tools{display:contents}
.vw-viewer .iw-viewer-tools .iw-viewer-action{padding-inline:8px}
.iw-viewer .iw-viewer-tools .iw-viewer-action:focus-visible{outline:2px solid #a28100;outline-offset:2px}
.iw-viewer-action>svg{width:18px;height:18px;flex:none}
.iw-viewer-thumbs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:28px}
.iw-viewer-thumbs button{min-width:0;min-height:0;padding:3px;border:2px solid transparent;aspect-ratio:1;border-radius:10px}
.iw-viewer-thumbs img{display:block;width:100%;height:100%;object-fit:contain;border-radius:6px}
.iw-viewer h2{font-size:14px;font-weight:500;color:var(--iw-muted);margin:0 0 14px}
.iw-viewer-prompt{font-size:16px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 28px}
.iw-viewer dl{font-size:13px;line-height:1.8;margin:0}.iw-viewer dl>div{display:flex;justify-content:space-between;gap:16px;margin-bottom:12px}
.iw-viewer dt{color:var(--iw-muted);flex-shrink:0}.iw-viewer dd{margin:0;text-align:right}@media(max-width:1100px){.iw-toolbar{gap:6px}.iw-setting-buttons{gap:6px}.iw-setting-buttons button{padding:0 8px;font-size:12px}.iw-toolbar .iw-generate{padding:0 12px}.iw-product-grid{gap:8px}}
@media(max-width:800px){.iw-setting-buttons{overflow-x:auto;flex:1;min-width:0}.iw-setting-buttons button{min-height:44px}.iw-toolbar .iw-generate{font-size:12px;gap:4px}.iw-toolbar .iw-generate svg{display:none}}
@media(max-width:600px){.iw-material-scroll{overflow-x:auto}.iw-product-grid{min-width:570px}.iw-product-grid .iw-tile-main{height:105px}.iw-viewer-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(160px,30dvh)}.iw-viewer-stage{padding:64px 16px 8px;grid-template-rows:minmax(0,1fr) 48px}.iw-viewer-details{border-left:0;border-top:1px solid var(--iw-line);padding:16px}.iw-viewer-tools{padding:0 0 12px;margin:0 0 12px}.iw-viewer-thumbs{max-width:320px;margin-bottom:16px}.iw-template-dialog{width:calc(100vw - 24px)}.iw-result-row{gap:2px}.iw-result-row.is-single{width:calc((100% - 2px)/2)}}

/* Material stack uses the project-folder lift and paper spread. */
/* Run summary: all product references, followed by the optional benchmark. */
@media(hover:hover) and (pointer:fine){.iw-workbench .iw-stack:hover:not(:disabled){background:transparent;transform:translateY(-3px)}.iw-stack:hover img{transform:translate(calc((var(--i) - 1)*7px),-5px) rotate(calc((var(--i) - 1)*15deg))}}
.iw-workbench .iw-stack:active:not(:disabled){background:transparent;transform:translateY(1px) scale(.93)}
.iw-stack:active img{transform:rotate(calc((var(--i) - 1)*5deg))}
@media(prefers-reduced-motion:reduce){.iw-stack:hover img,.iw-stack:active img{transform:rotate(calc((var(--i) - 1)*9deg))}}
/* Output settings: three unified segmented selection rows. */
.iw-popover-output{width:min(640px,calc(100% - 40px));padding:26px 22px 22px}
.iw-popover-output .iw-choices{margin-bottom:24px}
.iw-popover-output .iw-choices:last-child{margin-bottom:0}
.iw-popover-output legend{font-size:14px;font-weight:400;color:var(--iw-muted);margin-bottom:14px}
.iw-popover-output .iw-ratios,.iw-segments{display:grid;gap:3px;padding:3px;background:var(--iw-soft);border-radius:14px}
.iw-popover-output .iw-ratios{grid-template-columns:repeat(8,minmax(0,1fr))}
.iw-quality{grid-template-columns:repeat(2,minmax(0,1fr))}
.iw-count-options{grid-template-columns:repeat(6,minmax(0,1fr))}
.iw-popover-output .iw-ratios button,.iw-segments button{min-width:0;border:1px solid transparent;border-radius:11px;font-size:14px;background:transparent;padding:10px 2px}
.iw-popover-output .iw-ratios button{height:80px;gap:12px}
.iw-popover-output .iw-ratios i{border-width:2px;flex-shrink:0}
.iw-segments button{min-height:50px}
.iw-popover-output button.is-selected,.iw-popover-output button.is-selected:hover{background:var(--iw-surface);border-color:transparent}
@media(max-width:600px){.iw-popover-output{width:100%;left:0;right:0;padding:24px 12px 16px}.iw-popover-output .iw-ratios{grid-template-columns:repeat(4,minmax(0,1fr))}.iw-popover-output .iw-ratios button{height:64px}.iw-count-options{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* Compact parameter panels share the page paper and lightweight idle state. */
.iw-workbench .iw-popover{width:min(440px,calc(100% - 40px));padding:16px;border-radius:14px;font-size:10px}
.iw-popover .iw-choices{margin-bottom:16px}
.iw-popover .iw-choices:last-child{margin-bottom:0}
.iw-popover .iw-choices legend{font-size:10px;font-weight:400;color:var(--iw-muted);margin-bottom:8px}
.iw-popover .iw-ratios,.iw-popover .iw-segments,.iw-popover .iw-options{background:var(--iw-bg);padding:3px;gap:3px;border-radius:10px}
.iw-popover .iw-options{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(max-content,1fr);overflow-x:auto}
/* Use the wider generation panel for one row; narrow screens wrap without hiding choices. */
.iw-popover-generation .iw-options{display:flex;flex-wrap:wrap;overflow:visible}
.iw-popover-generation .iw-options button{flex:1 0 auto}
.iw-workbench .iw-popover button{font-size:10px;font-weight:400;color:var(--iw-muted);background:transparent;border:1px solid transparent;border-radius:8px;min-width:0;min-height:34px;padding:7px 3px;gap:4px;transition:transform 160ms ease,background-color 160ms ease,box-shadow 160ms ease,color 160ms ease}
.iw-workbench .iw-popover .iw-ratios button{height:56px;gap:8px}
.iw-workbench .iw-popover-person .resource-filter-options button{font-size:12px;font-weight:400}
.iw-workbench :is(.iw-popover-generation,.iw-popover-output) .iw-choices button{font-size:12px;font-weight:400}
.iw-popover .iw-ratios i{border-width:1px}
.iw-workbench .iw-popover button.is-selected{color:#000;font-weight:400;background:var(--iw-surface);border-color:transparent;box-shadow:0 1px 4px rgba(30,35,30,.06)}
.iw-workbench .iw-popover .iw-choices:disabled button{color:var(--iw-muted);opacity:.45;cursor:not-allowed;background:transparent;box-shadow:none;transform:none}
.iw-popover .iw-ratios .is-selected i{border-width:1px}
@media(hover:hover) and (pointer:fine){.iw-workbench .iw-popover button:hover:not(:disabled){background:var(--iw-surface);transform:translateY(-1px);box-shadow:0 2px 5px rgba(30,35,30,.08)}.iw-workbench .iw-popover button.is-selected:hover:not(:disabled){background:var(--iw-surface)}}
@media(hover:hover) and (pointer:fine){.iw-workbench .iw-popover .iw-choices button:hover:not(:disabled):not([aria-disabled=true]):not([aria-pressed=true]):not(.is-selected){background:var(--ui-option-hover-bg)}}
.iw-workbench .iw-popover button:active:not(:disabled){transform:scale(.94);box-shadow:none;transition-duration:80ms}
.iw-workbench .iw-setting-buttons button.is-selected{background:var(--iw-bg);border-color:var(--iw-line)}
.iw-workbench .iw-popover{transform-origin:bottom left;animation:iw-settings-open 180ms ease-out}
/* Top-layer settings escape the split panel while retaining inherited workbench styles. */
.iw-workbench .iw-popover[popover]{position:fixed;inset:auto;margin:0;box-sizing:border-box;max-width:calc(100vw - 24px);overscroll-behavior:contain}
.iw-popover[popover]::backdrop{background:transparent;pointer-events:none}
@keyframes iw-settings-open{from{opacity:0;transform:translateY(8px) scaleY(.94)}to{opacity:1;transform:none}}
@media(max-width:600px){.iw-workbench .iw-popover{left:0;right:0;width:100%;padding:14px}}

.iw-workbench .iw-generate:active:not(:disabled),.iw-dialog .iw-generate:active:not(:disabled){background:var(--iw-gold);color:var(--iw-ink);transform:scale(.96)}
@media(prefers-reduced-motion:reduce){.iw-workbench .iw-generate:is(:hover,:active),.iw-dialog .iw-generate:is(:hover,:active){transform:none!important;transition:none!important}}

.iw-toolbar>.iw-composer-submit{margin-left:auto}
.iw-viewer::backdrop{background:transparent}
.iw-viewer-stage{grid-template-rows:minmax(0,1fr);padding:70px 70px 24px 24px}
.iw-viewer-run-nav{position:absolute;right:14px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:16px}
.iw-viewer-run-nav button{width:44px;height:44px}
.iw-viewer-details{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.iw-viewer-tools, .iw-viewer-thumbs, .iw-viewer-details h2, .iw-viewer-details dl{flex-shrink:0}
.iw-viewer-thumbs{max-height:25dvh;overflow-y:auto}
/* Thumbnail states use outlines only, without the shared button zoom. */
.iw-viewer .iw-viewer-thumbs button{transform:none;transition:border-color 180ms;background:transparent}
@media(hover:hover) and (pointer:fine){.iw-viewer .iw-viewer-thumbs button:hover{border-color:#9ca29a;background:transparent}}
.iw-viewer .iw-viewer-thumbs button.is-selected,.iw-viewer .iw-viewer-thumbs button.is-selected:hover{border-color:#000;background:transparent}
.iw-viewer .iw-viewer-thumbs button:focus-visible{box-shadow:inset 0 0 0 1px #000}
.iw-viewer-prompt{font-size:13px;line-height:1.8;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;margin:0 0 20px}
@media(max-width:600px){.iw-viewer-stage{grid-template-rows:minmax(0,1fr);padding:64px 60px 16px 16px}.iw-viewer-details{overflow-y:auto}.iw-viewer-prompt{flex:none;max-height:20dvh;min-height:48px}}
.iw-toolbar .iw-setting-buttons{flex:0 1 auto}
.iw-workbench .iw-stack.is-empty,.iw-workbench .iw-stack.is-empty:hover:not(:disabled),.iw-workbench .iw-stack.is-empty:active:not(:disabled){background:var(--iw-soft)}
.iw-stack-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;font-size:12px;line-height:1.4;white-space:nowrap;color:var(--iw-muted)}
.iw-stack-empty>span:first-child{font-size:24px;line-height:1;font-weight:400}
.iw-mini-stack.is-empty{width:66px;height:82px;background:var(--iw-soft);border-radius:12px}
.iw-prompt-field textarea::placeholder{color:var(--iw-soft);opacity:1}
.iw-compact-open>span.is-placeholder{color:var(--iw-soft)}
.iw-workbench .iw-compact-open{cursor:text}
.iw-workbench .iw-compact-open:hover:not(:disabled){background:transparent;transform:none}
/* Expanded submit and collapsed expand use the same circular arrow treatment. */
.iw-workbench .iw-compact-arrow,.iw-workbench .iw-composer-submit{box-sizing:border-box;display:grid;place-items:center;flex:0 0 33px;width:33px;min-width:33px;height:33px;min-height:33px;padding:0;border:0;border-radius:50%;background:var(--iw-gold);color:var(--iw-ink);transition:transform 180ms cubic-bezier(.2,.7,.3,1),background-color 180ms,opacity 180ms}
.iw-workbench{--iw-submit-disabled-bg:#fbe7a3;--iw-submit-disabled-ink:#9c9e98}
.iw-workbench .iw-composer-submit:disabled,.iw-workbench .iw-compact-arrow[data-disabled=true]{background:var(--iw-submit-disabled-bg);color:var(--iw-submit-disabled-ink);opacity:1;transform:none;cursor:not-allowed}
.iw-compact-arrow svg,.iw-composer-submit svg{display:block;width:18px;height:18px}
.iw-workbench .iw-compact-open:active:not(:disabled){background:transparent;transform:none}
@media(hover:hover) and (pointer:fine){
 .iw-workbench .iw-compact-open:hover:not(:disabled) .iw-compact-arrow:not([data-disabled=true]),.iw-workbench .iw-composer-submit:hover:not(:disabled){background:var(--iw-gold);transform:scale(1.04)}
}
.iw-workbench .iw-compact-open:active:not(:disabled) .iw-compact-arrow:not([data-disabled=true]),.iw-workbench .iw-composer-submit:active:not(:disabled){background:var(--iw-gold);transform:scale(.96);transition-duration:90ms}
.iw-composer-spinner{animation:iw-composer-spin 800ms linear infinite}
@keyframes iw-composer-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){
 .iw-workbench .iw-compact-arrow,.iw-workbench .iw-composer-submit,.iw-composer-spinner{animation:none!important;transition:none!important;transform:none!important}
}
.iw-viewer-image,.iw-viewer-image img{-webkit-user-select:none;user-select:none}
.iw-viewer-image::selection,.iw-viewer-image img::selection{background:transparent}
.iw-viewer-prompt.is-empty{flex:0 0 auto;min-height:0}
.iw-viewer-video{container-type:size}
.iw-viewer-video>.result-video-player{width:min(100cqw,calc(100cqh * var(--video-aspect,1)));aspect-ratio:var(--video-aspect,1);max-width:100%;max-height:100%}
.iw-viewer-video>.result-video-player>video{width:100%;height:100%;object-fit:contain}
.iw-viewer-thumbs video{display:block;width:100%;height:100%;object-fit:contain;border-radius:6px;pointer-events:none}
/* The toolbar stays in view; the remaining sidebar height belongs to its
   contents. Minimum reading sizes may overflow on short screens, never clip. */
.iw-viewer-content{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;gap:16px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scroll-padding:4px}
.iw-viewer-content>.iw-viewer-thumbs{flex:0 0 auto;max-height:min(20dvh,144px);margin:0}
.iw-viewer-content>.professional-statement{flex:0 0 auto;margin:0}
.iw-viewer-information{display:flex;flex-direction:column;flex:1 0 160px;min-width:0;min-height:160px;overflow-y:auto;overscroll-behavior:contain}
.iw-viewer-information>.iw-viewer-prompt{flex:1 1 auto;min-height:40px;margin-bottom:16px}
.iw-viewer-information>.iw-viewer-prompt.is-empty{flex:0 0 auto;min-height:0}
.iw-viewer-information>h2,.iw-viewer-information>dl{flex:0 0 auto}
.iw-viewer-information>dl dd{min-width:0;overflow-wrap:anywhere}
.iw-viewer-content:has(>.professional-statement>details[open])>.iw-viewer-information{flex:0 0 clamp(160px,30dvh,260px)}
.iw-viewer-content:focus-visible,.iw-viewer-information:focus-visible{outline:2px solid var(--iw-muted);outline-offset:-2px}
@supports selector(details::details-content){
 .iw-viewer-content>.professional-statement.is-scrollable:has(>details[open]){flex:1 0 136px;min-height:136px}
}
@media(max-width:600px),(max-height:560px){
 .iw-viewer-details:has(>.iw-viewer-content){overflow:hidden}
 .iw-viewer-content{flex:1 1 auto;overflow-y:auto;gap:12px}
 .iw-viewer-content>.iw-viewer-thumbs{max-height:112px}
 .iw-viewer-content>.professional-statement.is-scrollable:has(>details[open]){flex:0 0 220px;min-height:220px}
 .iw-viewer-content:has(>.professional-statement>details[open])>.iw-viewer-information,.iw-viewer-information{flex:0 0 auto;min-height:160px}
 .iw-viewer-information>.iw-viewer-prompt{flex:0 0 auto;max-height:160px;min-height:40px}
}
/* Image and video product uploads share a compact header and outside captions. */
.iw-workbench,.iw-dialog{--material-upload-radius:var(--upload-radius,8px);--material-upload-corner:2.343px;--material-composer-top:10px;--material-header-height:40px}
.iw-workbench .iw-stack.is-empty,.iw-workbench .iw-mini-stack.is-empty{border-radius:var(--material-upload-radius)}
/* All four modes use the inspiration panel's top inset and header alignment. */
.iw-workbench :is(.iw-composer-wrap,.ds-modular-composer) .iw-composer{padding-top:var(--material-composer-top)}
.iw-product-slot{min-width:0;display:flex;flex-direction:column;align-items:center;gap:8px}
/* Badge follows the shared 45-degree corner point; retain the 30px hit target. */
.iw-workbench .iw-product-slot .iw-remove{width:30px;height:30px;min-height:30px;top:calc(var(--material-upload-corner) - 15px);right:calc(var(--material-upload-corner) - 15px);border:0;background:transparent;box-shadow:none;opacity:0;pointer-events:none}
.iw-workbench .iw-product-slot .iw-remove:hover:not(:disabled){background:transparent;box-shadow:none}
.iw-workbench .iw-product-slot .iw-remove::before{content:"";position:absolute;width:20px;height:20px;box-sizing:border-box;border:1px solid var(--iw-line);border-radius:50%;background:var(--iw-surface);pointer-events:none}
.iw-workbench .iw-product-slot .iw-remove svg{position:relative;width:calc(34px / 3);height:calc(34px / 3);pointer-events:none}
.iw-workbench .iw-product-slot .iw-tile:is(:hover,:focus-within) .iw-remove{opacity:1;pointer-events:auto}
.iw-product-grid .iw-product-slot>.iw-tile{width:100%;max-width:136px;aspect-ratio:4/5;border:0;border-radius:var(--material-upload-radius);background:var(--iw-product-tile-bg,var(--iw-soft));box-shadow:none;transition:transform 180ms ease}
.iw-workbench .iw-product-grid .iw-product-slot .iw-tile-main{display:grid;place-items:center;grid-template-rows:minmax(0,1fr);height:100%;min-height:0;aspect-ratio:4/5;border:0;border-radius:inherit;padding:0;color:#757b72;background:transparent}
.iw-product-grid .iw-product-slot .iw-tile-main img{border-radius:var(--material-upload-radius)}
.iw-product-label{display:flex;justify-content:center;align-items:baseline;flex-wrap:wrap;gap:4px;font-size:12px;font-weight:400;line-height:1.5;text-align:center;color:var(--iw-muted)}
.iw-product-label small{font-size:10px;font-weight:400;color:var(--iw-muted)}
.iw-product-label [role="status"]{flex-basis:100%}
.iw-workbench .iw-material-panel>:is(.icm-scroll,.iw-material-scroll){box-sizing:border-box;max-height:var(--material-two-row-height,none);overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable;overscroll-behavior:contain;padding:16px;scroll-padding:16px}
.iw-product-grid.iw-image-material-grid{min-width:0;grid-template-columns:repeat(7,minmax(0,1fr));align-items:start}
.iw-material-card{min-width:0;display:grid;gap:6px}
.iw-material-card .iw-product-label{overflow-wrap:anywhere;max-width:100%;font-size:10px}
@media(max-width:600px){.iw-product-grid.iw-image-material-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.iw-workbench .iw-product-grid .iw-tile-main:hover:not(:disabled),.iw-workbench .iw-product-grid .iw-tile-main:active:not(:disabled){background:transparent;transform:none}
.iw-product-grid .iw-tile:hover .iw-tile-main img{transform:none}
@media(hover:hover) and (pointer:fine){.iw-product-grid .iw-tile:has(>.iw-tile-main:hover:not(:disabled)){transform:translateY(-2px)}}
.iw-product-grid .iw-tile:has(>.iw-tile-main:active:not(:disabled)){transform:scale(.96)}
@media(prefers-reduced-motion:reduce){.iw-product-grid .iw-tile:has(>.iw-tile-main:hover),.iw-product-grid .iw-tile:has(>.iw-tile-main:active){transform:none}}
/* Case uploads share the composer's quiet, icon-only upload surface. */

/* Resource-library thumbnails retain natural image proportions at the grid width. */
.iw-case-tile{position:relative;min-width:0;width:100%;align-self:start;background:transparent;border:0;border-radius:0}
.iw-case-masonry{--case-columns:1;position:relative;display:grid;grid-template-columns:repeat(var(--case-columns),minmax(0,1fr));gap:2px;width:100%;min-width:0;flex:1}
.iw-case-masonry>.iw-case-tile{width:calc((100% - (var(--case-columns) - 1)*2px)/var(--case-columns))}
.iw-case-masonry:not([data-ready])>.iw-case-tile{width:100%}
.iw-case-masonry[data-ready]>.iw-case-tile{position:absolute}
.iw-dialog .iw-case-image{position:relative;display:block;width:100%;height:auto;min-height:0;padding:0;border:0;border-radius:0;overflow:hidden;background:transparent;transform:none}
.iw-case-image img,.iw-case-image video{display:block;width:100%;height:auto;max-height:none;object-fit:contain}
.iw-dialog .iw-case-image:hover,.iw-dialog .iw-case-image:active{background:transparent;transform:none}
.iw-dialog .iw-case-select{position:absolute;bottom:0;right:0;display:grid;place-items:center;width:40px;min-height:40px;padding:0;border:0;background:transparent;transform:none}
.iw-dialog .iw-case-tile .iw-case-select{background:transparent;box-shadow:none;transform:none;border-radius:0}
.iw-dialog .iw-case-tile .iw-case-select:is(:hover,:active,:focus-visible,:disabled){background:transparent;box-shadow:none;transform:none}
.iw-case-select>span{display:grid;place-items:center;box-sizing:border-box;width:22px;height:22px;border:1.5px solid #858a82;border-radius:50%;background:transparent;box-shadow:none;color:#161b15;transition:background-color .15s,border-color .15s}
.iw-case-select[aria-pressed=true]>span{background:#f6cb19;border-color:#f6cb19;box-shadow:none}
.iw-case-preview-overlay{position:absolute;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.38);color:#fff;opacity:0;pointer-events:none}
.iw-dialog .iw-case-select{opacity:0;pointer-events:none}
/* Restored mouse focus after preview is not a hover; keep keyboard controls visible. */
.iw-case-tile:is(:hover,:has(:focus-visible)) .iw-case-preview-overlay{opacity:1}
.iw-dialog .iw-case-tile:is(:hover,:has(:focus-visible)) .iw-case-select,.iw-dialog .iw-case-select[aria-pressed=true]{opacity:1;pointer-events:auto}
.iw-case-tile:is(:hover,:has(:focus-visible)) .iw-case-select[aria-pressed=false]>span{border-color:#fff}
@media(hover:none){.iw-dialog .iw-case-select{opacity:1;pointer-events:auto}.iw-case-select[aria-pressed=false]>span{background:#fff9}}
.iw-case-pending{position:absolute;left:6px;bottom:8px;font-size:12px;background:#fff;color:var(--iw-ink);padding:2px 4px;border-radius:4px}
.iw-case-tile button:focus-visible{outline:2px solid var(--iw-ink);outline-offset:2px}
@media(prefers-reduced-motion:reduce){.iw-case-select>span{transition:none}}
/* Shared floating controls follow their bottom-anchored composer in every mode. */
:is(.iw-composer-wrap,.ds-modular-composer).is-compact>.iw-floating-tools{display:none}
.iw-setting-buttons>.gr-trigger{display:inline-flex;align-items:center;justify-content:center;align-self:center}
.iw-setting-buttons>.gr-trigger .ds-hint-icon{display:flex;align-items:center;justify-content:center;line-height:0}
.iw-setting-buttons>.gr-trigger svg{display:block;width:16px;height:16px}
.iw-floating-tools{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:8px;max-width:100%;margin:0 0 12px}
.ds-modules .iw-workbench{--iw-floating-height:36px}
.iw-workbench .iw-floating-tools>button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;gap:8px;box-sizing:border-box;height:var(--iw-floating-height,44px);min-height:var(--iw-floating-height,44px);width:auto;padding:0 12px;border:1px solid var(--iw-line);border-radius:12px;background:var(--iw-surface);color:var(--iw-ink);font-size:12px;font-weight:400;line-height:1.5;white-space:nowrap;box-shadow:var(--iw-shadow);transition:transform 160ms ease}
.iw-floating-tools>button :is(svg,img,video){display:block;height:16px;width:auto;flex-shrink:0}
.iw-floating-tools>.ds-sketch-case>svg{height:1em;width:auto}
.iw-floating-tools[aria-label="图片资源设置"]>button>svg{height:1em;width:auto}
.iw-floating-tools.vw-floating-tools>button>svg{height:1em;width:auto}
.iw-floating-tools>button :is(img,video){max-width:none;object-fit:contain;border-radius:3px}
.iw-workbench .iw-floating-tools>button:is(:hover,:active,[aria-expanded=true]){background:var(--iw-surface);color:var(--iw-ink);box-shadow:var(--iw-shadow)}
@media(hover:hover) and (pointer:fine){.iw-workbench .iw-floating-tools>button:hover:not(:disabled){transform:scale(1.08)}}
.iw-workbench .iw-floating-tools>button:active:not(:disabled){transform:scale(.94)}
@media(prefers-reduced-motion:reduce){.iw-workbench .iw-floating-tools>button{transition:none}.iw-workbench .iw-floating-tools>button:is(:hover,:active){transform:none}}
