/* Material workbench: scoped layout upgrade, preserve the platform shell and generated artwork. */
html body .materials-workbench.mx-experience{--mx-ink:#082338;--mx-muted:#536779;--mx-line:#dce3e7;--mx-blue:#006bff;--mx-surface:#fff;--mx-soft:#f3f6fa;border-radius:6px!important;background:#f7f9fc!important;overflow-x:clip;overflow-y:auto}
html body .materials-workbench.mx-experience #posterTabs{margin:16px 20px 14px!important;background:#e5ebf3!important;max-width:calc(100% - 40px)!important}
html body .materials-workbench.mx-experience #posterTabs .ai-tab{min-height:44px!important;padding:9px 18px!important;font-size:14px!important}
html body .materials-workbench.mx-experience #posterLibrary>.toolbar.pl-search-toolbar{display:grid!important;grid-template-columns:max-content minmax(160px,1fr) 144px max-content;gap:12px!important;padding:16px 20px 12px!important;background:#fff;border-top:1px solid var(--mx-line);border-bottom:1px solid var(--mx-line)}
html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar #posterCollections{grid-column:1;grid-row:1;background:#edf1f6!important}
html body .materials-workbench.mx-experience #posterCollections button{min-width:90px!important;font-size:13px!important;min-height:38px!important;padding:6px 10px!important}
html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar .poster-search-field{grid-column:2;grid-row:1}
html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar .poster-search-field #posterSearch{height:40px!important;min-height:40px!important;font-size:13px!important;background:#f8fafc!important}
html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar .poster-sort-control{grid-column:3;grid-row:1;height:40px!important}
html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar #posterToolbarActions{display:contents!important}
html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar .toolbar-btns{grid-column:4;grid-row:1;display:flex!important;width:auto!important}
html body .materials-workbench.mx-experience #btnUploadMine{min-height:40px!important;font-size:13px!important;padding:8px 12px!important;white-space:nowrap}
html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar #catBar{grid-column:1/-1;grid-row:2;display:flex!important;flex-wrap:wrap!important;gap:6px!important;padding:0!important;border:0!important;margin:0!important;overflow:visible!important}
html body .materials-workbench.mx-experience #posterLibrary #catBar .cat-chip,html body .materials-workbench.mx-experience #posterLibrary #catBar .mx-category-more{border:1px solid transparent!important;border-radius:4px!important;background:transparent!important;box-shadow:none!important;color:var(--mx-muted)!important;padding:6px 10px!important;min-height:34px;font-size:13px!important;font-weight:400!important;line-height:20px;white-space:nowrap;cursor:pointer}
html body .materials-workbench.mx-experience #posterLibrary #catBar .cat-chip.active{color:var(--mx-blue)!important;background:#edf4ff!important;border-color:#d4e4ff!important;font-weight:500!important}
html body .materials-workbench.mx-experience #posterLibrary #catBar button::after{display:none!important}
html body .materials-workbench.mx-experience #posterLibrary #catBar .mx-category-more{display:inline-flex;gap:5px;align-items:center;color:var(--mx-blue)!important;margin-left:auto}
html body .materials-workbench.mx-experience #posterLibrary #catBar .mx-category-more svg{width:13px;height:13px;transition:transform .18s}
html body .materials-workbench.mx-experience #posterLibrary #catBar .mx-category-more[aria-expanded=true] svg{transform:rotate(180deg)}
html body .materials-workbench.mx-experience #posterLibrary #catBar button[hidden]{display:none!important}
.mx-library-results{padding:14px 20px 12px;background:transparent;color:var(--mx-muted);font-size:12px}
.mx-result-top{display:flex;align-items:center;gap:18px;flex-wrap:wrap;min-height:34px}
#mxResultCount{font-variant-numeric:tabular-nums;color:var(--mx-ink);font-weight:500;white-space:nowrap}
.mx-library-actions{margin-left:auto;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
html body .materials-workbench.mx-experience #posterCollectionScope{display:flex;align-items:center;gap:12px!important;margin:0!important;font-size:12px!important}
html body .materials-workbench.mx-experience #posterCollectionScope label{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;cursor:pointer}
html body .materials-workbench.mx-experience #btnDlHistory{font-size:12px!important;min-height:32px!important;padding:5px 8px!important;background:transparent!important;border-color:var(--mx-line)!important}
html body .materials-workbench.mx-experience .poster-brand-link{font-size:12px!important;white-space:nowrap}
.mx-density{display:flex;border:1px solid var(--mx-line);border-radius:4px;padding:2px;background:#edf1f6;gap:2px}
.mx-density button{border:0;border-radius:3px;background:transparent;color:var(--mx-muted);width:30px;height:28px;padding:5px;cursor:pointer}
.mx-density button[aria-pressed=true]{background:white;color:var(--mx-blue);box-shadow:0 1px 3px #08233815}
.mx-density svg{width:17px;height:17px;display:block}
.mx-active-filters{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:9px}
.mx-active-filters[hidden]{display:none}
.mx-filter-token{display:inline-flex;align-items:center;gap:7px;max-width:100%;min-height:30px;padding:4px 8px;border:1px solid #d6e2f0;border-radius:4px;background:#fff;color:#37516a;font:inherit;font-size:12px;cursor:pointer}
.mx-filter-token span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:240px}
.mx-filter-token svg{width:12px;height:12px;flex:none;color:#738599}
.mx-clear-filters{border:0;background:transparent;color:var(--mx-blue);font:inherit;font-size:12px;padding:5px 8px;cursor:pointer}
html body .materials-workbench.mx-experience #posterLibrary #pgrid{grid-template-columns:repeat(auto-fill,minmax(205px,1fr))!important;gap:16px!important;padding:0 20px 24px!important}
html body .materials-workbench.mx-experience #posterLibrary[data-material-density=compact] #pgrid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))!important;gap:12px!important}
html body .materials-workbench.mx-experience #posterLibrary #pgrid .pcard{border:1px solid var(--mx-line)!important;border-radius:6px!important;background:#fff;box-shadow:0 2px 6px #08233804!important;transition:border-color .18s,box-shadow .18s}
html body .materials-workbench.mx-experience #posterLibrary #pgrid .pcard:hover{border-color:#9cbbeb!important;box-shadow:0 4px 14px #0823380c!important;transform:none!important}
html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-body{padding:12px!important}
html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-title{font-size:13px!important;line-height:1.65!important;font-weight:600!important;letter-spacing:.1px}
html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-copy{font-size:12px!important;line-height:1.65!important;color:var(--mx-muted)!important;margin-top:7px!important;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:0!important}
html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-copy:empty{display:none}
html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-meta{gap:8px!important;padding-top:7px;border-top:1px solid #edf1f6;font-variant-numeric:tabular-nums}
html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-fav-btn{min-height:30px!important;min-width:32px!important}
html body .materials-workbench.mx-experience #posterLibrary #pgrid .mx-card-open{display:flex;align-items:center;gap:7px;width:100%;min-height:36px;margin:12px 0 0;padding:7px 9px;border:1px solid #d3e2f7;border-radius:4px;color:#006bff;background:#f5f9ff;font:inherit;font-size:12px;font-weight:500;cursor:pointer}
.mx-card-open svg{width:14px;height:14px;flex:none}.mx-card-open svg:last-child{margin-left:auto}
html body .materials-workbench.mx-experience #posterLibrary #pgrid .pct-empty{grid-column:1/-1;background:#fff;border:1px dashed var(--mx-line);border-radius:6px;padding:44px 20px;text-align:center;font-size:14px;color:var(--mx-muted)}
/* Make the workbench itself one coherent surface; editing and results are the two columns. */
html body .materials-workbench.mx-experience #aiStudio:not([style*="display: none"]):not([style*="display:none"]){display:block!important}
html body .materials-workbench.mx-experience :is(#aiStudio,#portraitStudio){padding:6px 20px 24px!important}
html body .materials-workbench.mx-experience .ai-page-header{padding:14px 0 18px!important;margin:0!important;background:none!important;border:0!important;border-radius:0!important;gap:16px!important}
html body .materials-workbench.mx-experience .ai-page-header-icon{display:none!important}
html body .materials-workbench.mx-experience .ms-studio-title{font-size:21px!important;font-weight:600!important;line-height:1.5;color:var(--mx-ink)!important;letter-spacing:.2px}
html body .materials-workbench.mx-experience .ms-studio-desc{font-size:13px!important;line-height:1.7;color:var(--mx-muted)!important;margin-top:4px!important}
html body .materials-workbench.mx-experience .ai-quota{font-size:12px!important;background:#fff!important;padding:8px 10px!important;border-color:#d8e3f2!important}
html body .materials-workbench.mx-experience :is(#aiStudio,#portraitStudio)>.ms-studio-layout{display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr)!important;gap:20px!important;align-items:start!important}
html body .materials-workbench.mx-experience .ms-image-config{grid-column:auto!important;grid-row:auto!important;min-width:0;background:#fff;border:1px solid var(--mx-line);border-radius:6px;overflow:visible}
html body .materials-workbench.mx-experience #aiStudio .ai-scenes{border:0!important;border-bottom:1px solid var(--mx-line)!important;border-radius:6px 6px 0 0!important;padding:18px 20px!important}
html body .materials-workbench.mx-experience #aiStudio .ai-center{border:0!important;padding:18px 20px!important;border-radius:0 0 6px 6px!important}
html body .materials-workbench.mx-experience .ai-col-h{font-size:14px!important;font-weight:600!important;line-height:1.6}
html body .materials-workbench.mx-experience .ai-col-sub{font-size:12px!important;line-height:1.7!important;margin:5px 0 12px!important;color:var(--mx-muted)!important}
html body .materials-workbench.mx-experience #aiSceneList{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
html body .materials-workbench.mx-experience #aiSceneList .ai-scene{display:flex!important;align-items:center;gap:7px!important;min-height:44px!important;padding:9px 10px!important;text-align:left!important;border:1px solid #e1e7ef!important;background:#fff!important;border-radius:4px!important;box-shadow:none!important}
html body .materials-workbench.mx-experience #aiSceneList .ai-scene.active{border-color:#93bcff!important;background:#edf4ff!important;color:#006bff!important}
html body .materials-workbench.mx-experience #aiSceneList .s-name{font-size:13px!important;font-weight:500!important;line-height:1.5!important}
html body .materials-workbench.mx-experience #aiSceneList .s-desc{display:none!important}
.mx-scene-icon{display:inline-flex;color:#71859a;flex:none}.mx-scene-icon svg{width:17px!important;height:17px!important}.ai-scene.active .mx-scene-icon{color:#006bff}
html body .materials-workbench.mx-experience #aiPrompt{min-height:190px!important;font-size:14px!important;line-height:1.85!important;padding:12px!important;border:1px solid #cbd7e5!important;border-radius:4px!important;background:#fff!important}
.mx-brief-helper{border-bottom:1px solid #e8edf3;margin:8px 0 14px;padding-bottom:9px;font-size:12px;color:var(--mx-muted)}
.mx-brief-helper summary{cursor:pointer;padding:6px 0;color:#375c87;line-height:1.6}.mx-brief-helper[open] summary{color:#006bff}
html body .materials-workbench.mx-experience .ms-brief{gap:10px;margin:10px 0}
html body .materials-workbench.mx-experience .aid-style-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:16px 0!important}
html body .materials-workbench.mx-experience .aid-style-row label{font-size:13px!important;flex:none}
html body .materials-workbench.mx-experience .aid-style-row select{height:36px!important;font-size:13px!important;min-width:136px;border:1px solid var(--mx-line)!important;border-radius:4px!important;background:#fff!important}
html body .materials-workbench.mx-experience #aiDesignStyleHint{font-size:12px!important;line-height:1.6;color:var(--mx-muted)!important}
html body .materials-workbench.mx-experience .aid-design-note{margin:10px 0!important;font-size:12px!important;line-height:1.7}
html body .materials-workbench.mx-experience .ai-params{gap:14px!important;margin-top:16px!important}
html body .materials-workbench.mx-experience .ai-param>label{font-size:13px!important;margin-bottom:8px!important}
html body .materials-workbench.mx-experience #aiRatioRow{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important}
html body .materials-workbench.mx-experience #aiRatioRow .ai-ratio{display:flex!important;align-items:center;justify-content:center;gap:5px;min-width:0!important;min-height:40px!important;padding:8px 5px!important;font-size:12px!important;border-radius:4px!important}
html body .materials-workbench.mx-experience .ai-ratio-icon{width:12px!important;height:16px!important;min-width:0!important;flex:none}
html body .materials-workbench.mx-experience #aiSizeRow{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important}
html body .materials-workbench.mx-experience #aiSizeRow .ai-size{display:flex!important;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;min-height:46px!important;padding:8px!important;border-radius:4px!important;min-width:0!important}
html body .materials-workbench.mx-experience .ai-size b{font-size:13px!important}.mx-experience .ai-size span{font-size:11px!important}
html body .materials-workbench.mx-experience .ai-neg-prompt{margin:12px 0!important;background:#f8fafc!important;border:1px solid #e3e9f0!important;border-radius:4px!important}
html body .materials-workbench.mx-experience .ai-neg-toggle{font-size:12px!important;padding:9px!important}
.mx-generate-footer{display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:8px 14px;align-items:center;padding:16px 0 0;margin-top:16px;border-top:1px solid var(--mx-line);background:#fff}
html body .materials-workbench.mx-experience .mx-generate-footer .ms-generation-summary{grid-column:1;grid-row:1;font-size:12px!important;line-height:1.7!important;margin:0!important;padding:0!important;border:0!important;background:none!important;color:var(--mx-muted)!important;min-width:0}
html body .materials-workbench.mx-experience .mx-generate-footer .ai-autosave{grid-column:1;grid-row:2;margin:0!important;font-size:12px!important;line-height:1.6;display:flex;gap:5px;align-items:center}
html body .materials-workbench.mx-experience .mx-generate-footer .ai-gen-btn{grid-column:2;grid-row:1/span 2;min-height:46px!important;min-width:125px!important;width:auto!important;margin:0!important;padding:11px 16px!important;font-size:14px!important;border-radius:4px!important;white-space:nowrap}
html body .materials-workbench.mx-experience .mx-generate-footer .ai-gen-hint{grid-column:1/-1;font-size:11px!important;line-height:1.7;margin:0!important;text-align:left!important;color:#65798d!important}
html body .materials-workbench.mx-experience .ms-studio-layout>.ai-history{grid-column:auto!important;grid-row:auto!important;position:sticky!important;top:0;align-self:start;border:1px solid var(--mx-line)!important;background:#fff!important;border-radius:6px!important;overflow:hidden!important}
html body .materials-workbench.mx-experience .ai-history-head{padding:14px 16px!important;background:#fff!important;border-bottom:1px solid var(--mx-line)!important;font-size:14px!important}
html body .materials-workbench.mx-experience .ai-history-title{font-size:14px!important;font-weight:600!important}.mx-experience .ai-history-count{font-size:12px!important;background:#edf2f8!important;color:#536779!important;border:0!important}
html body .materials-workbench.mx-experience .ms-history-tools{padding:12px 14px!important;border-bottom:1px solid #edf1f6;background:#fafbfd}
html body .materials-workbench.mx-experience .ai-history-body{padding:14px!important;max-height:calc(100dvh - 290px)!important;min-height:0!important;overflow:auto!important;scrollbar-gutter:stable}
html body .materials-workbench.mx-experience :is(#aiStudio,#portraitStudio) .ai-hist-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))!important;gap:14px!important}
html body .materials-workbench.mx-experience .ai-hist-card{box-shadow:none!important;border:1px solid var(--mx-line)!important;border-radius:4px!important;background:#fff}
html body .materials-workbench.mx-experience .ai-hist-thumb{height:clamp(160px,30dvh,260px)!important;aspect-ratio:auto!important;background:#f1f4f8!important}
html body .materials-workbench.mx-experience .ai-hist-thumb img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important}
html body .materials-workbench.mx-experience .ai-hist-title{font-size:13px!important;line-height:1.6!important;margin-top:9px!important}
html body .materials-workbench.mx-experience .ai-hist-meta{font-size:11px!important;color:var(--mx-muted)!important}
html body .materials-workbench.mx-experience .ai-queue-img{max-height:min(42dvh,var(--ai-preview-fit-height,42dvh))!important;object-fit:contain!important}
html body .materials-workbench.mx-experience .pt-config{padding:20px!important;border:1px solid var(--mx-line)!important;border-radius:6px!important}
html body .materials-workbench.mx-experience #ptDrop{min-height:118px!important;padding:18px 12px!important;background:#f7faff!important;border:1px dashed #b4cae6!important}
html body .materials-workbench.mx-experience .pt-drop-tip{font-size:13px!important;line-height:1.8!important}.mx-experience .pt-drop-sub{font-size:12px!important}
html body .materials-workbench.mx-experience #ptPreviewImg{max-height:180px!important}
html body .materials-workbench.mx-experience .ms-preset-heading{margin:18px 0 10px!important}
html body .materials-workbench.mx-experience .ms-presets{margin-bottom:16px!important;gap:8px!important}
html body .materials-workbench.mx-experience .ms-presets button{padding:12px 10px!important;background:#f8fafc!important;border-color:var(--mx-line)!important}
html body .materials-workbench.mx-experience .ms-presets button[aria-pressed=true]{border-color:#93bcff!important;background:#edf4ff!important}
html body .materials-workbench.mx-experience .ms-presets strong{font-size:13px!important}.mx-experience .ms-presets span{font-size:11px!important;line-height:1.6}
.mx-portrait-adjust{border-block:1px solid var(--mx-line);padding:12px 0;margin:14px 0;color:var(--mx-ink)}
.mx-portrait-adjust summary{font-size:13px;line-height:1.7;cursor:pointer;font-weight:500}.mx-portrait-adjust summary small{display:block;font-size:12px;line-height:1.6;font-weight:400;color:var(--mx-muted);margin:5px 0 0 16px}
html body .materials-workbench.mx-experience .pt-group{margin:14px 0!important}
html body .materials-workbench.mx-experience .pt-chip{min-height:42px!important;padding:8px 10px!important;border-radius:4px!important}
html body .materials-workbench.mx-experience .pt-chip-name{font-size:13px!important}.mx-experience .pt-chip-desc{font-size:11px!important}
html body .materials-workbench.mx-experience #ptExtra{min-height:76px!important;font-size:13px!important;line-height:1.75!important}
html body .materials-workbench.mx-experience button:focus-visible,html body .materials-workbench.mx-experience summary:focus-visible{outline:2px solid #006bff!important;outline-offset:2px}
@container poster-library (max-width:780px){html body .materials-workbench.mx-experience #posterLibrary>.toolbar.pl-search-toolbar{grid-template-columns:minmax(0,1fr) 144px!important}html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar #posterCollections{grid-column:1;grid-row:1;justify-self:start}html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar .toolbar-btns{grid-column:2;grid-row:1;justify-self:end}html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar .poster-search-field{grid-column:1;grid-row:2}html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar .poster-sort-control{grid-column:2;grid-row:2}html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar #catBar{grid-row:3}}
@media(max-width:1050px){html body .materials-workbench.mx-experience :is(#aiStudio,#portraitStudio)>.ms-studio-layout{grid-template-columns:minmax(0,1fr)!important}html body .materials-workbench.mx-experience .ms-studio-layout>.ai-history{position:static!important}html body .materials-workbench.mx-experience .ai-history-body{max-height:none!important}}
@media(max-width:700px){
 html body .materials-workbench.mx-experience #posterTabs{margin:12px 12px!important;max-width:calc(100% - 24px)!important;display:grid!important;width:auto!important}
 html body .materials-workbench.mx-experience #posterTabs .ai-tab{font-size:12px!important;min-width:0!important;padding:8px 5px!important;gap:4px!important}
 html body .materials-workbench.mx-experience #posterLibrary>.toolbar.pl-search-toolbar{padding:12px!important;gap:10px!important;grid-template-columns:minmax(0,1fr) 125px!important}
 html body .materials-workbench.mx-experience #posterCollections button{min-width:0!important;padding:6px 7px!important;font-size:12px!important;gap:4px!important}
 html body .materials-workbench.mx-experience #posterCollections small{display:none!important}
 html body .materials-workbench.mx-experience #btnUploadMine{font-size:12px!important;padding:7px 9px!important}
 html body .materials-workbench.mx-experience #posterLibrary #catBar .cat-chip,html body .materials-workbench.mx-experience #posterLibrary #catBar .mx-category-more{min-height:40px!important;font-size:12px!important;padding:7px 8px!important}
 .mx-library-results{padding:10px 12px}.mx-result-top{gap:8px 14px}.mx-library-actions{margin-left:0;width:100%;gap:12px}.mx-density{display:none}.mx-library-switches{margin-left:auto}.mx-active-filters{margin-top:8px}
 .mx-filter-token,.mx-clear-filters{min-height:36px}.mx-filter-token span{max-width:185px}
 html body .materials-workbench.mx-experience #posterLibrary #pgrid,html body .materials-workbench.mx-experience #posterLibrary[data-material-density=compact] #pgrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;padding:0 12px 18px!important}
 html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-body{padding:9px!important}.mx-experience #posterLibrary #pgrid .pc-title{font-size:12px!important}
 html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-meta{gap:5px!important;flex-wrap:wrap!important}.mx-experience #posterLibrary #pgrid .pc-time{font-size:10px!important}
 html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-fav-btn{min-height:36px!important}.mx-experience #posterLibrary #pgrid .mx-card-open{min-height:40px!important}
 html body .materials-workbench.mx-experience :is(#aiStudio,#portraitStudio){padding:4px 12px 18px!important}
 html body .materials-workbench.mx-experience .ms-studio-title{font-size:19px!important}.mx-experience .ms-studio-desc{font-size:12px!important}
 html body .materials-workbench.mx-experience #aiStudio :is(.ai-scenes,.ai-center),html body .materials-workbench.mx-experience .pt-config{padding:16px!important}
 html body .materials-workbench.mx-experience #aiSceneList{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
 html body .materials-workbench.mx-experience #aiSceneList .ai-scene{padding:8px 5px!important;justify-content:center!important;gap:5px!important}.mx-scene-icon svg{width:15px!important;height:15px!important}
 html body .materials-workbench.mx-experience #aiSceneList .s-name{font-size:12px!important}
 html body .materials-workbench.mx-experience #aiPrompt{font-size:13px!important;min-height:185px!important}
 html body .materials-workbench.mx-experience #aiRatioRow{grid-template-columns:repeat(2,minmax(0,1fr))!important}.mx-experience #aiRatioRow .ai-ratio{min-height:44px!important}
 .mx-generate-footer{grid-template-columns:minmax(0,1fr)!important}.mx-generate-footer .ai-gen-btn{grid-column:1!important;grid-row:auto!important;width:100%!important}.mx-generate-footer .ai-gen-hint{grid-column:1!important}
 html body .materials-workbench.mx-experience .mx-generate-footer .ai-gen-btn{grid-column:1;grid-row:3;width:100%!important;min-height:46px!important}
 html body .materials-workbench.mx-experience .mx-generate-footer .ms-generation-summary{grid-row:1}.mx-generate-footer .ai-gen-hint{grid-row:4}
 .mx-portrait-adjust summary{min-height:44px}.mx-experience .ms-presets button{min-height:70px}.mx-experience .ms-presets strong{font-size:12px!important}
 html body .materials-workbench.mx-experience .ai-history-body{padding:12px!important}.mx-experience .ai-history-head{padding:12px!important}
}
@media(max-width:360px){html body .materials-workbench.mx-experience #posterLibrary #pgrid{grid-template-columns:minmax(0,1fr)!important}html body .materials-workbench.mx-experience #aiSceneList{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(prefers-reduced-motion:reduce){html body .materials-workbench.mx-experience *,html body .materials-workbench.mx-experience *::before{transition:none!important;animation:none!important}}

/* Start with the chosen direction; all nine directions remain one click away. */
html body .materials-workbench.mx-experience #aiStudio .ai-scenes>.ai-col-h{display:none!important}
html body .materials-workbench.mx-experience #aiStudio .ai-scenes{padding:14px 20px!important}
html body .materials-workbench.mx-experience #aiStudio .ai-scenes>.ai-col-sub{margin:7px 0 0!important}
.mx-scene-picker{min-width:0}.mx-scene-picker>summary{display:flex;align-items:center;gap:12px;min-height:38px;font-size:13px;cursor:pointer;list-style:none}.mx-scene-picker>summary::-webkit-details-marker{display:none}.mx-scene-picker summary>span{color:#536779}.mx-scene-picker strong{font-size:14px;font-weight:600;color:#082338}.mx-scene-picker small{margin-left:auto;font-size:12px;color:#006bff}.mx-scene-picker summary svg{width:14px;height:14px;color:#536779}.mx-scene-picker[open] summary svg{transform:rotate(180deg)}.mx-scene-picker[open]>summary{margin-bottom:10px}
@media(max-width:700px){html body .materials-workbench.mx-experience #aiStudio .ai-scenes{padding:12px 16px!important}.mx-scene-picker>summary{min-height:44px}.mx-scene-picker>summary{gap:8px}.mx-scene-picker small{font-size:11px}}
html body .materials-workbench.mx-experience :is(#btnUploadMine,#btnAiGen,#btnPtGen){background:#006bff!important;background-image:none!important;color:#fff!important;border-color:#006bff!important}

@media(max-width:700px){
 html body .materials-workbench.mx-experience #posterLibrary #pgrid .mx-card-open{min-height:44px!important}
 html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-meta{flex-wrap:nowrap!important;gap:3px!important}
 html body .materials-workbench.mx-experience #posterLibrary #pgrid :is(.pc-fav-btn,.pc-dls){min-width:0!important;font-size:10px!important;gap:3px!important}
 html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-meta svg{width:11px;height:11px}
 html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-time{font-size:9.5px!important}
 html body .materials-workbench.mx-experience #posterLibrary #catBar :is(.cat-chip,.mx-category-more){min-height:44px!important;max-width:100%;overflow:hidden;text-overflow:ellipsis}
 html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar .poster-search-field #posterSearch,html body .materials-workbench.mx-experience #posterLibrary .pl-search-toolbar .poster-sort-control{height:44px!important;min-height:44px!important}
 html body .materials-workbench.mx-experience #posterCollectionScope label{min-height:36px}
 html body .materials-workbench.mx-experience #btnDlHistory,html body .materials-workbench.mx-experience .poster-brand-link{min-height:40px!important;display:inline-flex;align-items:center}
}

/* Reserve a portrait frame before the intrinsic dimensions arrive; loaded images keep their own ratio. */
html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-img-wrap img{aspect-ratio:auto 9 / 16!important;background:#eef2f7!important}
html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-img-wrap{position:relative}
.mx-preview-error{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:14px;text-align:center;background:#f0f4f8;color:#536779;font-size:13px;line-height:1.7}
.mx-preview-error button{padding:8px 12px;background:#fff;border:1px solid #cbd7e5;border-radius:4px;font:inherit;color:#006bff;cursor:pointer;min-height:36px}.mx-preview-error button:disabled{color:#536779;cursor:wait}
@media(max-width:700px){.mx-preview-error button{min-height:44px}}
/* Old mobile flex-basis treated a preferred width as a fixed 230px height. */
html body .materials-workbench.mx-experience .ai-params{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
html body .materials-workbench.mx-experience .ai-params .ai-param{flex:none!important;min-width:0!important}
html body .materials-workbench.mx-experience #aiRatioRow .ai-ratio{flex-direction:row!important;height:44px!important;min-height:44px!important;box-sizing:border-box}
html body .materials-workbench.mx-experience #aiSizeRow .ai-size{display:grid!important;grid-template-columns:max-content minmax(0,1fr);gap:4px 7px!important;align-items:center;min-height:54px!important;line-height:1.4!important;box-sizing:border-box}
html body .materials-workbench.mx-experience #aiSizeRow .ai-size b{grid-column:1;grid-row:1;line-height:1.4!important}
html body .materials-workbench.mx-experience #aiSizeRow .ai-size>span{margin:0!important;line-height:1.4!important;white-space:nowrap}
html body .materials-workbench.mx-experience #aiSizeRow .ai-size>span:not(.ai-size-cost){grid-column:2;grid-row:1}
html body .materials-workbench.mx-experience #aiSizeRow .ai-size>.ai-size-cost{grid-column:1/-1;grid-row:2;justify-self:center;padding:1px 5px!important}
@media(max-width:360px){html body .materials-workbench.mx-experience #posterLibrary[data-material-density=compact] #pgrid{grid-template-columns:minmax(0,1fr)!important}}
html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-title{min-height:3.3em}
html body .materials-workbench.mx-experience #posterLibrary #pgrid .pc-copy:not(:empty){min-height:3.3em!important}
