/* App-scoped Image Atlas workbench styles. Do not add shared workspace overrides here. */
body[data-workspace-app=image] #image-workbench{box-sizing:border-box;max-width:none;min-width:0;margin:0;padding:0 28px 32px;color:var(--workspace-ink);font-family:var(--workspace-sans)}
body[data-workspace-app=image]>.media-app-header{display:none!important}
body[data-workspace-app=image] #image-work-heading{margin:18px 0 10px;font:650 26px/1.3 var(--workspace-sans);letter-spacing:-.03em}
body[data-workspace-app=image] #image-workbench :is(#image-operations-nav,#image-operations-config-nav){display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
body[data-workspace-app=image] #image-workbench :is(#image-operations-nav,#image-operations-config-nav)[hidden]{display:none!important}
body[data-workspace-app=image] #image-workbench :is(#image-operations-nav,#image-operations-config-nav) a{display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;border:1px solid var(--workspace-line);border-radius:8px;background:var(--workspace-panel);color:var(--workspace-ink);text-decoration:none}
body[data-workspace-app=image] #image-workbench :is(#image-operations-nav,#image-operations-config-nav) a[aria-current=page]{background:var(--workspace-accent);border-color:var(--workspace-accent);color:var(--workspace-accent-ink);font-weight:650}
@media(max-width:900px){html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) #workspace-rail .image-work-areas{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) #workspace-rail .image-work-areas a{font-size:13px;min-height:44px}body[data-workspace-app=image] #image-workbench :is(#image-operations-nav,#image-operations-config-nav){display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}body[data-workspace-app=image] #image-workbench :is(#image-operations-nav,#image-operations-config-nav) a{justify-content:center;text-align:center}}



body[data-workspace-app=image] #image-workbench [hidden]{display:none!important}
body[data-workspace-app=image] #image-workbench .image-work-screen{min-width:0;padding-top:14px}
body[data-workspace-app=image] #image-work-screen-prompt #prompt-public-unavailable{display:block!important;margin:0;padding:14px 16px;border:1px solid var(--workspace-line);border-radius:10px;background:var(--workspace-panel);color:var(--workspace-ink);font:500 14px/1.6 var(--workspace-sans)}
body[data-workspace-app=image] #image-work-screen-search .browse-layout{grid-template-columns:minmax(220px,280px) minmax(0,1fr);gap:18px}
body[data-workspace-app=image] #image-work-screen-search #explore-panel{align-self:start;min-width:0;background:var(--workspace-panel);color:var(--workspace-ink);border:1px solid var(--workspace-line);border-radius:12px;padding:18px}
body[data-workspace-app=image] #image-work-screen-search #explore-panel .explore-body{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
body[data-workspace-app=image] #image-work-screen-search #semantic-tree{max-height:70dvh;overflow:auto;background:var(--workspace-bg);border:1px solid var(--workspace-line);border-radius:10px}
body[data-workspace-app=image] #image-work-screen-search .results-workspace{min-width:0}
body[data-workspace-app=image] #image-work-screen-search .image-explore-modes{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
body[data-workspace-app=image] #image-work-screen-search .image-explore-modes button{min-height:40px;padding:8px 12px;border:1px solid var(--workspace-line);border-radius:8px;background:var(--workspace-panel);color:var(--workspace-ink)}
body[data-workspace-app=image] #image-work-screen-search .image-explore-modes button[aria-pressed=true]{background:var(--workspace-accent);color:var(--workspace-accent-ink);border-color:var(--workspace-accent)}
body[data-workspace-app=image] #image-workbench #app-status{margin:0 0 12px;padding:8px 12px;color:var(--workspace-ink);background:var(--workspace-panel);border-radius:8px}
body[data-workspace-app=image] #image-workbench #atlas-gallery{box-sizing:border-box;width:100%;max-width:none;margin:0;padding:0;grid-template-columns:minmax(0,1fr);background:transparent;color:var(--workspace-ink)}
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-controls{position:relative;top:auto;background:transparent;backdrop-filter:none}
body[data-workspace-app=image] #image-workbench #atlas-gallery #ag-filters{position:relative;top:auto;grid-row:auto;grid-column:auto;max-width:none;max-height:none;overflow:visible;margin:12px 0;padding:18px;background:var(--workspace-panel);color:var(--workspace-ink);border:1px solid var(--workspace-line);border-radius:12px}
body[data-workspace-app=image] #image-workbench #atlas-gallery #ag-filters :is(input,select){max-width:100%;background:var(--workspace-bg);color:var(--workspace-ink);border-color:var(--workspace-line)}
body[data-workspace-app=image] #image-workbench #atlas-gallery #ag-display .ag-display-body>button.ag-primary{color:var(--workspace-accent-ink);background:var(--workspace-accent);border:1px solid var(--workspace-accent)}
body[data-workspace-app=image] #image-workbench :is(#atlas-benchmark,#atlas-collection,#unified-panel,#benchmark-guide,#prompt-view-panel,#history-panel,#explore-panel){box-sizing:border-box;max-width:none;width:auto;margin:0;padding:18px;background:var(--workspace-panel);color:var(--workspace-ink);border:1px solid var(--workspace-line);border-radius:12px}
body[data-workspace-app=image] #image-workbench :is(#atlas-benchmark,#atlas-collection,#unified-panel,#benchmark-guide,#prompt-view-panel,#history-panel,#explore-panel) :is(h1,h2,h3){font-family:var(--workspace-sans);color:var(--workspace-ink)}
body[data-workspace-app=image] #image-workbench :is(#atlas-benchmark,#atlas-collection,#unified-panel,#benchmark-guide,#prompt-view-panel,#history-panel,#explore-panel) :is(p,small,label){color:var(--workspace-muted)}
body[data-workspace-app=image] #image-workbench :is(#atlas-benchmark,#atlas-collection) :is(input,select,textarea,button){max-width:100%;color:var(--workspace-ink);background:var(--workspace-bg);border-color:var(--workspace-line);font-family:var(--workspace-sans)}
body[data-workspace-app=image] #image-workbench :is(#atlas-benchmark,#atlas-collection) :is(button.primary,.primary){color:var(--workspace-accent-ink);background:var(--workspace-accent);border-color:var(--workspace-accent)}
body[data-workspace-app=image] #image-workbench #atlas-benchmark .atlas-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
body[data-workspace-app=image] #image-workbench #atlas-benchmark .atlas-tabs button[aria-pressed=true]{background:var(--workspace-accent);color:var(--workspace-accent-ink)}
body[data-workspace-app=image] #image-workbench #unified-panel{margin:0;background:var(--workspace-panel);border-color:var(--workspace-line)}
body[data-workspace-app=image] #image-workbench #unified-panel .unified-case{background:var(--workspace-bg);color:var(--workspace-ink)}
body[data-workspace-app=image] #image-workbench :is(#explore-panel,#benchmark-guide,#prompt-view-panel,#history-panel) :is(input,select,button){max-width:100%;color:var(--workspace-ink);background-color:var(--workspace-bg);border-color:var(--workspace-line)}
body[data-workspace-app=image] #image-workbench :is(input,select,textarea,button){box-sizing:border-box;font-family:var(--workspace-sans)}
body[data-workspace-app=image] #image-workbench :is(input,select,textarea){max-width:100%;color:var(--workspace-ink);background:var(--workspace-bg);border:1px solid var(--workspace-line);border-radius:7px;padding:8px 10px}
body[data-workspace-app=image] #image-workbench button{min-height:36px;border:1px solid var(--workspace-line);border-radius:7px;padding:7px 10px;color:var(--workspace-ink);background:var(--workspace-panel);cursor:pointer}
body[data-workspace-app=image] #image-workbench button:disabled{opacity:.55;cursor:not-allowed}
body[data-workspace-app=image] #image-workbench :is(button,input,select,textarea,summary,a):focus-visible{outline:3px solid var(--workspace-accent);outline-offset:2px}
body[data-workspace-app=image] #image-workbench #semantic-tree :is(button,[role=treeitem]){color:var(--workspace-ink);font-family:var(--workspace-sans)}
body[data-workspace-app=image] #image-workbench #semantic-tree :is(button,[role=treeitem])[aria-selected=true]{background:var(--workspace-accent);color:var(--workspace-accent-ink)}
body[data-workspace-app=image] #image-workbench #ag-display .ag-display-body>button.ag-primary{color:var(--workspace-accent-ink);background:var(--workspace-accent);border:1px solid var(--workspace-accent)}
body[data-workspace-app=image] #image-workbench #image-work-screen-search .results-workspace{font-family:var(--workspace-sans);color:var(--workspace-ink)}
body[data-workspace-app=image] #image-workbench :is(#atlas-benchmark,#atlas-collection,#unified-panel,#benchmark-guide,#prompt-view-panel,#history-panel) :is(.empty,.error,[role=status]){color:var(--workspace-muted)}
@media(max-width:900px){body[data-workspace-app=image] #image-workbench{padding:0 14px 24px}body[data-workspace-app=image] #image-work-screen-search .browse-layout{display:block}body[data-workspace-app=image] #image-work-screen-search #explore-panel{position:static;margin:0 0 12px}body[data-workspace-app=image] #image-work-screen-search #explore-panel .explore-body{grid-template-columns:minmax(0,1fr)}body[data-workspace-app=image] #image-work-screen-search .results-workspace{width:100%;min-width:0}body[data-workspace-app=image] #image-workbench #atlas-gallery #ag-display .ag-display-body{position:static;inset:auto;width:100%;max-width:100%;box-sizing:border-box;margin-top:8px;background:var(--workspace-panel);color:var(--workspace-ink);border:1px solid var(--workspace-line);border-radius:10px;box-shadow:none}body[data-workspace-app=image] #image-workbench #atlas-gallery #ag-display .ag-display-body>button.ag-primary{color:var(--workspace-accent-ink);background:var(--workspace-accent)}}
@media(max-width:560px){body[data-workspace-app=image] #image-workbench{padding-inline:12px}body[data-workspace-app=image] #image-work-heading{font-size:22px}}

/* Adapter owns this existing common rail nav; avoid legacy shell route rewrite selectors. */
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) #workspace-rail .image-work-areas{display:grid;gap:3px;margin-top:8px}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) #workspace-rail .image-work-areas a{display:flex;align-items:center;min-height:40px;padding:8px 12px;color:var(--workspace-muted);font-size:12px;text-decoration:none}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) #workspace-rail .image-work-areas a[aria-current]{background:var(--workspace-accent);color:var(--workspace-accent-ink);border:1px solid var(--workspace-accent);font-weight:650}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) #workspace-rail .image-work-areas a[data-work-area=benchmark-explore]{margin-inline-start:12px;padding-inline-start:18px;border-inline-start:2px solid var(--workspace-line)}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) #workspace-rail .image-work-areas a[data-work-area=benchmark-explore]::before{content:'↳';margin-inline-end:6px;opacity:.7}

html[data-image-workspace-ready=true] :is(#page-title,#page-description,.intro:has(#page-title)){display:none!important}
@media(max-width:900px){html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) #workspace-rail .image-work-areas{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px;margin:0;padding:4px 0 8px}html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) #workspace-rail .image-work-areas a{min-height:36px;padding:6px 10px;font-size:11px}}

html[data-image-workspace-ready=true] #image-workbench #benchmark-tabs,html[data-image-workspace-ready=true] #image-workbench #atlas-benchmark>.atlas-tabs{display:none!important}

/* JOB-5083: one compact heading, named tools, one content-kind picker. */
body[data-workspace-app=image] #image-workbench .image-task-header{position:relative;display:block;height:auto;min-height:0;min-width:0;padding:18px 0 8px;border-bottom:1px solid var(--workspace-line)}
body[data-workspace-app=image] #image-workbench .image-task-heading-row{display:flex;align-items:flex-start;justify-content:space-between;gap:8px 16px;min-width:0}
body[data-workspace-app=image] #image-workbench .image-task-heading-row{flex-wrap:wrap}
body[data-workspace-app=image] #image-workbench .image-task-heading-row #image-work-heading{margin:6px 0;font-size:26px;flex:0 1 auto;min-width:0}
body[data-workspace-app=image] #image-workbench .image-task-heading-row #image-work-heading{flex:1 1 100%;overflow-wrap:anywhere}
body[data-workspace-app=image] #image-workbench #image-work-nav{display:flex;justify-content:flex-end;align-items:flex-start;flex-wrap:wrap;gap:6px;min-width:0;margin:0;padding:0;border:0}
body[data-workspace-app=image] #image-workbench #image-work-nav{justify-content:flex-start;width:100%}
body[data-workspace-app=image] #image-workbench .image-task-return{flex:0 0 auto;white-space:nowrap}
body[data-workspace-app=image] #image-workbench .image-task-return{display:inline-flex;align-items:center;min-height:44px;margin-bottom:2px;color:var(--workspace-muted);font-size:14px;text-decoration:none}
body[data-workspace-app=image] #image-workbench .image-task-mode{display:flex;align-items:flex-start;gap:8px;min-width:0;margin-top:4px}
body[data-workspace-app=image] #image-workbench .image-tool-launcher{position:relative;min-width:0;max-width:100%;margin:0;padding:0;border:0;background:transparent;color:var(--workspace-ink)}
body[data-workspace-app=image] #image-workbench .image-tool-launcher>summary{box-sizing:border-box;min-height:44px;display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--workspace-line);border-radius:8px;font:500 14px/1.4 var(--workspace-sans);list-style:none;cursor:pointer;background:var(--workspace-panel);color:var(--workspace-ink)}
body[data-workspace-app=image] #image-workbench .image-tool-launcher>summary::-webkit-details-marker{display:none}
body[data-workspace-app=image] #image-workbench .image-tool-launcher>summary::after{content:'▾';font-size:12px;margin-inline-start:auto}
body[data-workspace-app=image] #image-workbench .image-tool-launcher[open]>summary::after{content:'▴'}
body[data-workspace-app=image] #image-workbench .image-task-mode .image-tool-launcher>summary{border-color:transparent;background:transparent;color:var(--workspace-muted);padding-inline:0}
body[data-workspace-app=image] #image-workbench .image-tool-body{position:absolute;z-index:50;inset-inline-end:0;top:calc(100% + 4px);width:300px;max-width:calc(100vw - 24px);box-sizing:border-box;padding:8px;background:var(--workspace-panel);color:var(--workspace-ink);border:1px solid var(--workspace-line);border-radius:10px;box-shadow:0 10px 28px #0002}
body[data-workspace-app=image] #image-workbench .image-task-mode .image-tool-body{inset-inline-start:0;inset-inline-end:auto}
body[data-workspace-app=image] #image-workbench .image-tool-body :is(a,button){box-sizing:border-box;display:flex;align-items:center;min-height:44px;width:100%;max-width:100%;padding:9px 10px;border:0;border-radius:6px;white-space:normal;overflow-wrap:anywhere;background:transparent;color:var(--workspace-ink);font:500 14px/1.4 var(--workspace-sans);text-align:start;text-decoration:none}
body[data-workspace-app=image] #image-workbench .image-tool-body a[aria-current=page]{background:var(--workspace-accent);color:var(--workspace-accent-ink);font-weight:650}
body[data-workspace-app=image] #image-workbench .image-tool-note{margin:0 10px 8px;font-size:12px;line-height:1.55;color:var(--workspace-muted);overflow-wrap:anywhere}
body[data-workspace-app=image] #image-workbench #image-work-nav>:is(a,button){display:inline-flex;align-items:center;min-height:44px;box-sizing:border-box;padding:8px 10px;border:1px solid var(--workspace-line);border-radius:8px;color:var(--workspace-ink);background:var(--workspace-panel);font:500 14px/1.4 var(--workspace-sans);text-decoration:none}
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-toolbar>#ag-display{flex:0 1 auto;width:auto;min-width:0;margin:0}
body[data-workspace-app=image] #image-workbench .image-work-screen{padding-top:10px}
@media(max-width:900px){
  body[data-workspace-app=image] #image-workbench{padding-inline:20px}
  body[data-workspace-app=image] #image-workbench .image-task-heading-row #image-work-heading{font-size:24px}
}
@media(max-width:560px){
  body[data-workspace-app=image] #image-workbench{padding-inline:12px}
  body[data-workspace-app=image] #image-workbench .image-task-header{padding-top:12px}
  body[data-workspace-app=image] #image-workbench .image-task-heading-row{flex-wrap:wrap;gap:4px 8px}
  body[data-workspace-app=image] #image-workbench .image-task-heading-row #image-work-heading{font-size:22px;margin:8px 0}
  body[data-workspace-app=image] #image-workbench #image-work-nav{margin-inline-start:auto;gap:4px}
  body[data-workspace-app=image] #image-workbench .image-task-mode{margin-top:0}
  body[data-workspace-app=image] #image-workbench .image-tool-launcher{position:static}
  body[data-workspace-app=image] #image-workbench .image-tool-body,
  body[data-workspace-app=image] #image-workbench .image-task-mode .image-tool-body{top:100%;inset-inline:0;width:auto;max-width:100%;max-height:65dvh;overflow:auto;overscroll-behavior:contain}
  body[data-workspace-app=image] #image-workbench #image-work-nav>:is(a,button),
  body[data-workspace-app=image] #image-workbench .image-tool-launcher>summary{font-size:13px;padding-inline:8px}
}

/* JOB-5090: remove proven aliases, preserve context-specific actions. */
html[data-image-workspace-ready=true] #image-work-screen-search #to-all,
html[data-image-workspace-ready=true] #image-work-screen-tasks #legacy-bench-link{display:none!important}
/* Scene #batch is already native-hidden: keep its real compare-scene/blind-scene controls. */
body[data-workspace-app=image] #image-collection-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 18px;align-items:start;min-width:0}
body[data-workspace-app=image] #image-collection-tools>.atlas-collection-detail{min-width:0;margin:0;padding:0;border:1px solid var(--workspace-line);border-radius:9px;background:var(--workspace-panel);color:var(--workspace-ink)}
body[data-workspace-app=image] #image-collection-tools>.atlas-collection-detail>summary{min-height:44px;box-sizing:border-box;padding:12px;cursor:pointer;font-size:14px;overflow-wrap:anywhere}
body[data-workspace-app=image] #image-collection-tools>.atlas-collection-detail[open]{grid-column:1/-1}
body[data-workspace-app=image] #image-collection-tools>.atlas-collection-detail>:not(summary){margin:0;padding:12px;min-width:0;box-sizing:border-box}
body[data-workspace-app=image] #image-workbench :is(button,summary,select,input:not([type=checkbox]):not([type=radio])){min-height:44px}
body[data-workspace-app=image] :is(#viewer,#compare-view,#ag-comparison,.ag-album-pages,.ag-album-editor,#unified-detail) :is(button,summary,select,input:not([type=checkbox]):not([type=radio])){min-height:44px}
body[data-workspace-app=image] :is(.select-wrap,.ag-image-select){display:inline-flex;align-items:center;min-height:44px;min-width:44px;cursor:pointer}
body[data-workspace-app=image] #image-work-screen-history #batch{z-index:85}
body[data-workspace-app=image] #image-workbench .image-tool-body{max-height:65dvh;overflow:auto;overscroll-behavior:contain}
/* Album page thumbnails must not inherit the legacy portrait ratio/fixed-height mix. */
body[data-workspace-app=image] #atlas-gallery .ag-album-page-grid .ag-photo{position:relative;display:block;width:100%;height:auto;min-height:0;aspect-ratio:4/3;overflow:hidden}
body[data-workspace-app=image] #atlas-gallery .ag-album-page-grid .ag-photo img{position:absolute;inset:0;display:block;width:100%;height:100%;min-height:0;aspect-ratio:auto;object-fit:contain}
/* Content-kind popup is anchored into the content region, never left under the rail. */
body[data-workspace-app=image] #image-workbench .image-task-mode .image-tool-body{inset-inline-start:0;inset-inline-end:auto;max-width:min(300px,calc(100vw - 248px))}
@media(max-width:900px){body[data-workspace-app=image] #image-workbench .image-task-mode .image-tool-body{max-width:calc(100vw - 40px)}}
@media(max-width:560px){
 body[data-workspace-app=image] #image-collection-tools{grid-template-columns:minmax(0,1fr)}
 body[data-workspace-app=image] #image-workbench .image-task-mode .image-tool-body{max-width:100%}
 body[data-workspace-app=image] #image-workbench :is(input:not([type=checkbox]):not([type=radio]),select),body[data-workspace-app=image] dialog :is(input:not([type=checkbox]):not([type=radio]),select){font-size:16px}
}

/* JOB-5090 popup bounds: use the content header, not a narrow trigger, as containing block. */
@media(min-width:561px){
  body[data-workspace-app=image] #image-workbench .image-task-header .image-tool-launcher{position:static}
  body[data-workspace-app=image] #image-workbench .image-task-header .image-tool-body{top:calc(100% + 4px);inset-inline-start:0;inset-inline-end:auto;width:300px;max-width:100%}
  body[data-workspace-app=image] #image-workbench .image-task-mode .image-tool-body{inset-inline-start:auto;inset-inline-end:0}
}

/* JOB-5099 Astra: bounded comparison workspace; only the active table scrolls. */
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench{padding:0 12px 8px;min-width:0;min-height:0}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .image-task-header{display:block;position:relative;flex:none;padding:6px 0;margin:0;min-height:0;border:0;z-index:45}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .image-task-heading-row{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;min-width:0}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .image-task-heading-row #image-work-heading{flex:0 0 auto;width:auto;margin:0;font-size:20px;line-height:1.3}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .image-task-mode{flex:0 1 auto;min-width:0;margin:0;align-items:center}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .image-task-mode .image-tool-launcher>summary{padding:8px;border:0;font-size:13px}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench #image-work-nav{flex:1 1 auto;width:auto;justify-content:flex-end;flex-wrap:nowrap;align-items:center;min-width:0;margin:0}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench #image-benchmark-focus{flex:none;white-space:nowrap;background:var(--workspace-tint);color:var(--workspace-accent)}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .image-work-screen{padding:0;min-width:0;min-height:0}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench :is(#unified-panel,#benchmark-guide){position:relative;display:flex;flex-direction:column;gap:6px;padding:8px;margin:0;min-width:0;min-height:0}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench :is(.unified-heading,#benchmark-guide>.benchmark-controls){display:none}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-toolbar{position:relative;display:flex;align-items:center;gap:6px;flex:none;min-width:0;z-index:35}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-toolbar>label{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;margin:0;font-size:12px;white-space:nowrap}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-toolbar>label>select{flex:1 1 auto;width:0;min-width:0;max-width:480px;margin:0}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-toolbar>.benchmark-disclosure,body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-aux-open{flex:none}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-disclosure{position:static;margin:0;padding:0;border:0;background:transparent;min-width:0}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-disclosure>summary{display:flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:7px 10px;border:1px solid var(--workspace-line);border-radius:7px;background:var(--workspace-panel);color:var(--workspace-ink);list-style:none;font-size:13px;white-space:nowrap;cursor:pointer}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-disclosure>summary::-webkit-details-marker{display:none}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-disclosure>summary:after{content:'▾';font-size:11px}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-disclosure[open]>summary{color:var(--workspace-accent);border-color:var(--workspace-accent)}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-popup-body{position:absolute;top:calc(100% + 6px);right:0;z-index:50;width:min(520px,100%);max-width:100%;max-height:min(60dvh,480px);overflow:auto;overscroll-behavior:contain;box-shadow:0 12px 35px #0002}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-disclosure:not([open])>.benchmark-popup-body{display:none!important}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-popup-body .unified-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0;padding:0}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-popup-body :is(label,select,input){min-width:0;max-width:100%}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-popup-body>label,body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-popup-body .unified-filters>label{display:grid;gap:5px;font-size:13px;margin-bottom:8px}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-popup-body :is(p,small){font-size:13px;line-height:1.6;overflow-wrap:anywhere}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-popup-body details{max-width:100%}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-popup-body .unified-filters>label:last-child{grid-column:1/-1}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench #unified-release-status{display:none;margin:0;font-size:12px;flex:none}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench #unified-release-status.benchmark-warning{display:block;padding:8px;border:1px solid #b96d31;border-radius:6px}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench #unified-results{order:10;min-width:0;min-height:0}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench #unified-page-nav{order:20}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-footer{position:relative!important;top:auto!important;flex:none;display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:7px;margin:0;padding:4px 0 0;border:0;border-top:1px solid var(--workspace-line);border-radius:0;background:var(--workspace-panel);z-index:25;min-width:0}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-footer>.benchmark-pager-title{display:none}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-footer>span{font-size:12px;white-space:nowrap}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-footer .benchmark-popup-body{top:auto;bottom:calc(100% + 8px);width:min(420px,100%);display:flex;flex-wrap:wrap;align-items:end;gap:10px;text-align:start}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-footer .benchmark-popup-body>label{display:flex;align-items:center;gap:6px;margin:0}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench #bench-matrix{display:flex;flex-direction:column;gap:6px;min-width:0;min-height:0;margin:0;padding:0;max-height:none;overflow:visible;border:0;background:transparent}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench #bench-matrix>.bench-matrix-nav{order:2}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-aux{display:flex;flex-direction:column;min-width:0;min-height:0}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-aux-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding-bottom:8px;flex:none}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-aux-bar>:first-child{margin-right:auto}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-aux-scroll{min-height:0;min-width:0;padding:4px;overscroll-behavior:contain}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-aux-scroll .results-workspace{min-width:0;margin-top:16px}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-aux-scroll #bench-selection{overflow:visible;max-height:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-aux-scroll .benchmark-heading h2{font-size:18px}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench #app-status:empty{display:none}
/* Only this mode locks the document. Flow mode has an unbounded table and document scrolling. */
html:has(body[data-workspace-app=image][data-benchmark-layout=viewport]){height:100%;overflow:hidden}
body[data-workspace-app=image][data-benchmark-layout=viewport]{height:100dvh;min-height:0;overflow:hidden}
body[data-workspace-app=image][data-benchmark-layout=viewport]>footer{display:none}
body[data-workspace-app=image][data-benchmark-layout=viewport] #image-workbench{height:var(--image-work-height,100dvh);display:flex;flex-direction:column;padding-bottom:max(8px,env(safe-area-inset-bottom))}
body[data-workspace-app=image][data-benchmark-layout=viewport] #image-workbench .image-work-screen:not([hidden]),body[data-workspace-app=image][data-benchmark-layout=viewport] #image-workbench :is(#unified-panel,#benchmark-guide){flex:1 1 0;min-height:0;display:flex;flex-direction:column}
body[data-workspace-app=image][data-benchmark-layout=viewport] #image-workbench :is(#bench-matrix,.benchmark-aux){flex:1 1 0;min-height:0}
body[data-workspace-app=image][data-benchmark-layout=viewport] #image-workbench :is(#unified-results.atlas-matrix-scrollport,#bench-matrix>.atlas-matrix-scrollport,.benchmark-aux-scroll){flex:1 1 0;min-height:0;height:auto;max-height:none;overflow:auto;scrollbar-gutter:stable}
body[data-workspace-app=image][data-benchmark-layout=flow] #image-workbench{height:auto;display:block}
body[data-workspace-app=image][data-benchmark-layout=flow] #image-workbench :is(#unified-results.atlas-matrix-scrollport,#bench-matrix>.atlas-matrix-scrollport){flex:none;height:auto;max-height:none;overflow-x:auto;overflow-y:visible}
body[data-workspace-app=image].image-benchmark-focus #workspace-rail{display:none!important}
body[data-workspace-app=image].image-benchmark-focus{padding-left:0}
body[data-workspace-app=image].image-benchmark-focus #image-workbench #image-tool-benchmark{display:none!important}
@media(max-width:600px){
 body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench{padding-inline:8px}
 body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .image-task-heading-row{flex-wrap:wrap;gap:4px 6px}
 body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .image-task-heading-row #image-work-heading{font-size:18px}
 body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .image-task-mode{order:4;flex-basis:100%}
 body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .image-task-mode .image-tool-launcher>summary{min-height:36px;padding:4px 0}
 body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-toolbar{flex-wrap:wrap}
 body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-toolbar>label{flex-basis:100%}
 body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-toolbar .benchmark-aux-open{margin-left:auto}
 body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-footer{gap:4px;justify-content:space-between}
 body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-footer>span{font-size:11px}
 body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-footer>button,body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-footer summary{padding-inline:7px;font-size:12px}
 body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-popup-body .unified-filters{grid-template-columns:minmax(0,1fr)}
}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-popup-body #unified-release-status{display:block}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-aux-scroll .bench-how{background:var(--workspace-soft);color:var(--workspace-muted);border-left-color:var(--workspace-accent)}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-aux-scroll .bench-how strong{color:var(--workspace-ink)}
body[data-workspace-app=image][data-image-benchmark-screen] #image-workbench .benchmark-aux-scroll :is(.bench-method,.bench-prompt){margin-top:8px;padding-top:8px}
/* JOB-5104: one benchmark shell across all test sources. */
body[data-workspace-app=image][data-image-benchmark-screen=benchmark] #image-workbench .image-task-mode{display:none}
body[data-workspace-app=image] #image-workbench #benchmark-panel{position:relative;display:flex;flex-direction:column;gap:6px;min-height:0;min-width:0;margin:0;padding:8px;border:1px solid var(--workspace-line);border-radius:12px;background:var(--workspace-panel);color:var(--workspace-ink)}
body[data-workspace-app=image] #image-workbench #benchmark-panel [hidden]{display:none!important}
body[data-workspace-app=image] #image-workbench #benchmark-panel .benchmark-version-label{flex:0 1 160px}
body[data-workspace-app=image] #image-workbench #benchmark-panel .benchmark-version-text{font-size:12px;white-space:nowrap;color:var(--workspace-muted)}
body[data-workspace-app=image] #image-workbench #benchmark-set{max-width:none}
body[data-workspace-app=image] #image-workbench #benchmark-port{min-width:0;min-height:0;touch-action:pan-x pan-y}
body[data-workspace-app=image] #image-workbench #benchmark-port[hidden]{display:none!important}
body[data-workspace-app=image] #image-workbench .benchmark-state{flex:none;margin:0;padding:8px 4px;font-size:13px;line-height:1.5}
body[data-workspace-app=image] #image-workbench .benchmark-state button{margin-left:8px}
body[data-workspace-app=image] #image-workbench #benchmark-footer{order:2}
body[data-workspace-app=image] #image-workbench #benchmark-aux{order:1}
body[data-workspace-app=image] #image-workbench #benchmark-detail-item{min-width:0;flex:1 1 200px;max-width:500px}
body[data-workspace-app=image] #image-workbench .benchmark-image{display:block;width:100%;padding:0;border:0;background:transparent;min-width:0}
body[data-workspace-app=image] #image-workbench .benchmark-image img{display:block;width:100%;object-fit:contain;height:240px;background:var(--workspace-soft)}
body[data-workspace-app=image] #image-workbench .benchmark-item-link{padding:0;min-height:36px;width:100%;border:0;background:transparent;text-align:left;font-size:12px;line-height:1.4;color:var(--workspace-accent)}
body[data-workspace-app=image] #image-workbench .benchmark-item-cards,body[data-workspace-app=image] #image-workbench .benchmark-result-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(230px,100%),1fr));gap:12px;min-width:0}
body[data-workspace-app=image] #image-workbench .benchmark-item-card,body[data-workspace-app=image] #image-workbench .benchmark-result-card{padding:10px;border:1px solid var(--workspace-line);border-radius:8px;min-width:0;overflow-wrap:anywhere}
body[data-workspace-app=image] #image-workbench .benchmark-select{display:flex;align-items:center;gap:8px;min-height:44px;font-size:13px;line-height:1.4}
body[data-workspace-app=image] #image-workbench .benchmark-selection-actions{display:flex;gap:8px;margin-bottom:12px}
body[data-workspace-app=image] #image-workbench .benchmark-context{margin:4px 0 10px;font-size:14px;font-weight:600}
body[data-workspace-app=image] #image-workbench .benchmark-item-info{margin-top:16px;border-top:1px solid var(--workspace-line);padding-top:10px}
body[data-workspace-app=image] #image-workbench .benchmark-item-info>summary{cursor:pointer;min-height:44px;padding:10px 0}
body[data-workspace-app=image] #image-workbench #benchmark-panel pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;font-size:12px;line-height:1.6}
body[data-workspace-app=image] #image-workbench .benchmark-result-card small{display:block;font-size:12px;line-height:1.5;margin-top:6px}
body[data-workspace-app=image][data-benchmark-layout=viewport] #image-workbench #benchmark-panel{flex:1 1 0;min-height:0}
body[data-workspace-app=image][data-benchmark-layout=viewport] #image-workbench #benchmark-port{flex:1 1 0;height:auto;min-height:0;max-height:none;overflow:auto}
body[data-workspace-app=image][data-benchmark-layout=flow] #image-workbench #benchmark-port{flex:none;height:auto;max-height:none;overflow-x:auto;overflow-y:visible}
body[data-workspace-app=image] #image-workbench #benchmark-panel .benchmark-toolbar .benchmark-popup-body{width:min(480px,100%)}
@media(max-width:600px){
 body[data-workspace-app=image] #image-workbench #benchmark-panel .benchmark-version-label{flex-basis:auto}
 body[data-workspace-app=image] #image-workbench #benchmark-panel .benchmark-version-text{margin-right:auto}
 body[data-workspace-app=image] #image-workbench #benchmark-detail-open{font-size:11px;padding-inline:6px}
 body[data-workspace-app=image] #image-workbench #benchmark-footer{gap:3px;flex-wrap:wrap}
 body[data-workspace-app=image] #image-workbench #benchmark-footer>span{font-size:10px}
 body[data-workspace-app=image] #image-workbench #benchmark-detail-item{flex-basis:100%;order:3}
 body[data-workspace-app=image] #image-workbench #benchmark-aux .benchmark-aux-bar{gap:4px}
}

/* Gallery's only bounded collection owns its toolbar, result port, and one real footer. */
body[data-workspace-app=image] #atlas-gallery.media-collection[data-media-layout=viewport]{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto minmax(0,1fr) auto!important;align-items:stretch!important;height:var(--media-collection-height)!important;min-height:0!important;overflow:hidden!important}
body[data-workspace-app=image] #atlas-gallery.media-collection[data-media-layout=flow]{display:flex!important;flex-direction:column!important;height:auto!important;min-height:0!important;overflow:visible!important}
body[data-workspace-app=image] #atlas-gallery.media-collection[data-media-layout=flow] .ag-explorer-layout{height:auto!important;overflow:visible!important}

/* Prompt comparison inherits the active workspace palette in every theme. */
body[data-workspace-app=image] #prompt-view-panel .prompt-card,
body[data-workspace-app=image] #prompt-view-panel .prompt-reference{background:var(--workspace-panel);color:var(--workspace-ink);border-color:var(--workspace-line)}
body[data-workspace-app=image] #prompt-view-panel .prompt-how,
body[data-workspace-app=image] #prompt-view-panel .prompt-text{background:var(--workspace-soft);color:var(--workspace-ink)}
body[data-workspace-app=image] #prompt-view-panel .prompt-meta{color:var(--workspace-muted)}
body[data-workspace-app=image] #prompt-view-panel .image-open{background:var(--workspace-soft)}
body[data-workspace-app=image] .image-open:has(.media-load-status),
body[data-workspace-app=image] .benchmark-image:has(.media-load-status),
body[data-workspace-app=image] .ag-photo:has(.media-load-status){position:relative}
body[data-workspace-app=image] .media-load-status{position:absolute;left:6px;right:6px;bottom:6px;padding:7px;border:1px solid var(--workspace-line);border-radius:6px;background:var(--workspace-panel);color:var(--workspace-ink);font-size:12px;line-height:1.5;text-align:center;white-space:normal}

/* The header and tool groups share a row wherever their contents fit. */
body[data-workspace-app=image][data-image-work-screen] #image-workbench .image-task-heading-row {
  align-items:center; flex-wrap:wrap; justify-content:flex-start; gap:4px 8px;
}
body[data-workspace-app=image][data-image-work-screen] #image-workbench .image-task-heading-row #image-work-heading {
  flex:1 1 auto; min-width:0; width:auto; margin:0; line-height:1.25;
}
body[data-workspace-app=image][data-image-work-screen] #image-workbench #image-work-nav {
  width:auto; flex:0 1 auto; flex-wrap:wrap; justify-content:flex-start; gap:4px; margin:0;
}
body[data-workspace-app=image] #image-benchmark-focus {
  flex:none; min-height:44px; padding:6px 10px; white-space:nowrap;
  color:var(--workspace-accent); background:var(--workspace-tint);
}
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-controls {
  display:flex; flex-wrap:wrap; align-items:center; gap:0 10px;
}
body[data-workspace-app=image] #atlas-gallery .ag-simple-search { flex:2 1 280px; min-width:0; }
body[data-workspace-app=image] #atlas-gallery .ag-toolbar { flex:1 1 auto; flex-wrap:wrap; gap:4px; min-height:44px; }
body[data-workspace-app=image] #atlas-gallery .ag-toolbar #ag-count { flex:0 0 auto; margin-inline-start:auto; }
body[data-workspace-app=image] #atlas-gallery .ag-controls > :not(.ag-simple-search,.ag-toolbar) { flex-basis:100%; }
body[data-workspace-app=image] #image-workbench #benchmark-panel .benchmark-toolbar { flex-wrap:wrap; }
body[data-workspace-app=image] #image-workbench #benchmark-panel .benchmark-toolbar > label:first-child { flex:2 1 210px; }
body[data-workspace-app=image] #image-workbench #benchmark-panel .benchmark-toolbar .benchmark-version-label { flex:1 1 100px; }

body[data-workspace-app=image].image-work-focus { padding-inline-start:0; }
body[data-workspace-app=image].image-work-focus #workspace-rail { display:none!important; }
body[data-workspace-app=image].image-work-focus #image-workbench .image-task-header {
  position:sticky; top:0; z-index:45; flex:none; padding:2px 0; margin:0;
  background:var(--workspace-bg);
}
body[data-workspace-app=image].image-work-focus #image-workbench :is(.image-task-mode,.image-task-return),
body[data-workspace-app=image].image-work-focus #image-workbench #image-work-nav > :not(#image-benchmark-focus) { display:none; }
html:has(body.image-work-focus[data-image-work-screen=gallery] #atlas-gallery[data-media-layout=viewport]),
body.image-work-focus[data-image-work-screen=gallery]:has(#atlas-gallery[data-media-layout=viewport]) { overflow:hidden; }
body.image-work-focus[data-image-work-screen=gallery]:has(#atlas-gallery[data-media-layout=viewport]) > #workspace-theme-footer { display:none!important; }
body.image-work-focus[data-image-work-screen=gallery]:has(#atlas-gallery[data-media-layout=viewport]) #image-workbench {
  display:flex; flex-direction:column; height:100dvh; padding-bottom:max(8px,env(safe-area-inset-bottom));
}
body.image-work-focus[data-image-work-screen=gallery]:has(#atlas-gallery[data-media-layout=viewport]) #image-work-screen-gallery {
  display:flex; flex-direction:column; flex:1 1 0; min-height:0; padding-top:4px;
}
body.image-work-focus[data-image-work-screen=gallery] #image-workbench #atlas-gallery.media-collection[data-media-layout=viewport] {
  height:auto!important; flex:1 1 0;
}

.image-ondisk-prefix { margin-inline-end:4px; }
@media(max-width:480px) {
  .image-ondisk-prefix { display:none; }
  body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-simple-search { flex-basis:100%; }
  body[data-workspace-app=image][data-image-work-screen] #image-workbench .image-task-heading-row { gap:4px; }
  body[data-workspace-app=image][data-image-work-screen] #image-workbench #image-work-heading { font-size:20px; }
  body[data-workspace-app=image] #image-workbench #image-benchmark-focus,
  body[data-workspace-app=image] #image-workbench #image-work-nav > a { padding-inline:7px; font-size:12px; }
  body[data-workspace-app=image] #image-workbench #image-work-nav .image-tool-launcher > summary { padding-inline:7px; gap:4px; font-size:12px; }
  body[data-workspace-app=image] #image-workbench #benchmark-panel .benchmark-toolbar { gap:4px; }
}
@media(max-width:360px) {
  body[data-workspace-app=image] #image-workbench #benchmark-panel .benchmark-toolbar > .benchmark-disclosure { flex:1 1 auto; }
  body[data-workspace-app=image] #image-workbench #benchmark-footer {
    display:grid; grid-template-columns:44px minmax(0,1fr) minmax(0,1fr) 44px;
    gap:4px; text-align:center;
  }
  #image-workbench #benchmark-page-status { grid-column:2 / 4; }
  #image-workbench #benchmark-footer > .benchmark-page-settings { grid-column:1 / 3; }
  #image-workbench #benchmark-detail-open { grid-column:3 / 5; }
}

/* JOB-5140: compact, direct library tools with one shared inline panel. */
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-controls { display:flex; flex-direction:column; flex-wrap:nowrap; align-items:stretch; gap:8px; min-width:0; }

/* JOB-5158: one document scroll for the active private Image Atlas screen. */
body[data-workspace-app=image][data-workspace-audience=private] #workspace-rail>.image-theme-menu{position:relative;flex:none;margin-inline-start:auto}
body[data-workspace-app=image][data-workspace-audience=private] #workspace-rail>.image-theme-menu>summary{display:flex;align-items:center;min-height:40px;padding:6px 12px;border:1px solid var(--workspace-line);border-radius:10px;background:var(--workspace-panel);color:var(--workspace-ink);white-space:nowrap;list-style:none;cursor:pointer}
body[data-workspace-app=image][data-workspace-audience=private] #workspace-rail>.image-theme-menu>summary::-webkit-details-marker{display:none}
body[data-workspace-app=image][data-workspace-audience=private] #workspace-rail>.image-theme-menu>#workspace-theme-footer{display:none!important;position:absolute!important;inset:calc(100% + 6px) 0 auto auto!important;z-index:1200;width:min(320px,calc(100vw - 16px));margin:0!important;padding:12px!important;border:1px solid var(--workspace-line);border-radius:12px;background:var(--workspace-panel);box-shadow:0 12px 32px #0004}
body[data-workspace-app=image][data-workspace-audience=private] #workspace-rail>.image-theme-menu[open]>#workspace-theme-footer{display:grid!important}
body[data-workspace-app=image][data-workspace-audience=private] #workspace-rail>.image-theme-menu>#workspace-theme-footer .workspace-theme-caption{display:block}
html:has(body[data-workspace-audience=private][data-image-work-screen=gallery] #atlas-gallery[data-media-layout=viewport]),html:has(body[data-workspace-app=image][data-workspace-audience=private][data-benchmark-layout=viewport]){height:100%;overflow:hidden}
html:has(body[data-workspace-audience=private][data-image-work-screen=gallery] #atlas-gallery[data-media-layout=viewport]) body,html:has(body[data-workspace-app=image][data-workspace-audience=private][data-benchmark-layout=viewport]) body{margin:0!important}
body[data-workspace-app=image][data-workspace-audience=private][data-image-work-screen=gallery]:has(#atlas-gallery[data-media-layout=viewport]),body[data-workspace-app=image][data-workspace-audience=private][data-benchmark-layout=viewport]{height:100dvh;min-height:0;overflow:hidden}
body[data-workspace-app=image][data-workspace-audience=private][data-image-work-screen=gallery]:has(#atlas-gallery[data-media-layout=viewport])>footer{display:none!important}
body[data-workspace-app=image][data-workspace-audience=private][data-image-work-screen=gallery]:has(#atlas-gallery[data-media-layout=flow]) #atlas-gallery.media-collection[data-media-layout=flow] .ag-explorer-layout{flex:none;height:auto!important;min-height:0;overflow:visible!important}
body[data-workspace-app=image][data-workspace-audience=private][data-benchmark-layout=flow] #image-workbench #benchmark-port{flex:none;height:auto;min-height:0;max-height:none;overflow-x:auto;overflow-y:visible}
@media(max-height:639px){html:has(body[data-workspace-app=image][data-workspace-audience=private]){height:auto!important;overflow-y:auto!important;overflow-x:hidden!important}body[data-workspace-app=image][data-workspace-audience=private]{height:auto!important;min-height:100vh!important;overflow-y:auto!important;overflow-x:hidden!important}body[data-workspace-app=image][data-workspace-audience=private] #image-workbench{height:auto!important;min-height:0!important;display:block!important}body[data-workspace-app=image][data-workspace-audience=private] #image-workbench .image-work-screen:not([hidden]),body[data-workspace-app=image][data-workspace-audience=private] #image-workbench :is(#unified-panel,#benchmark-guide){display:block!important;flex:none!important;height:auto!important;min-height:0!important}body[data-workspace-app=image][data-workspace-audience=private] #image-workbench :is(#unified-results,#benchmark-port,#bench-matrix>.atlas-matrix-scrollport){display:block!important;flex:none!important;height:auto!important;max-height:none!important;overflow-x:auto!important;overflow-y:visible!important}}
@media(max-width:600px){body[data-workspace-app=image][data-workspace-audience=private]:not(.image-work-focus) #workspace-rail{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:0 8px}body[data-workspace-app=image][data-workspace-audience=private] #workspace-rail>.workspace-home{grid-area:1/1}body[data-workspace-app=image][data-workspace-audience=private] #workspace-rail>.image-theme-menu{grid-area:1/2}body[data-workspace-app=image][data-workspace-audience=private] #workspace-rail>.image-work-areas{grid-area:2/1/3/-1;display:flex;flex-wrap:nowrap;max-width:100%;margin:0;overflow-x:auto;scrollbar-width:none}body[data-workspace-app=image][data-workspace-audience=private] #workspace-rail>.image-work-areas>a{flex:none;white-space:nowrap}}
body[data-workspace-app=image][data-workspace-audience=private][data-image-work-screen=gallery]:has(#atlas-gallery[data-media-layout=viewport]) #image-workbench{padding-bottom:8px}
body[data-workspace-app=image] #image-workbench .image-desktop-tools-folded{max-height:0;min-height:0;overflow:clip;opacity:0}
body[data-workspace-app=image] #image-workbench #image-desktop-tools-toggle{flex:none;white-space:nowrap}
body[data-workspace-app=image][data-workspace-audience=private][data-image-work-screen=gallery]:has(#ag-inline-panel:not([hidden])){overflow-y:hidden}
body[data-workspace-app=image][data-workspace-audience=private][data-image-work-screen=gallery]:has(#ag-inline-panel:not([hidden])) #atlas-gallery .ag-explorer-layout{overflow-y:hidden!important}
body[data-workspace-app=image][data-workspace-audience=private] #atlas-gallery #ag-inline-panel:not([hidden]){position:absolute!important;inset:100% 0 auto 0!important;z-index:900;max-height:calc(100dvh - 220px);overflow:auto!important;overscroll-behavior:contain;box-shadow:0 12px 30px #0004}
body[data-workspace-app=image][data-workspace-audience=private][data-image-work-screen=gallery]:has(#ag-explorer:not([hidden])) #atlas-gallery .ag-explorer-layout{overflow-y:hidden!important}
@media(max-width:600px){body[data-workspace-app=image][data-workspace-audience=private] #workspace-rail>.image-theme-menu{margin:0}body[data-workspace-app=image][data-workspace-audience=private] #atlas-gallery #ag-inline-panel:not([hidden]){position:fixed!important;inset:min(24dvh,120px) 12px auto!important;max-height:min(65dvh,440px)} }
body[data-workspace-app=image][data-workspace-audience=private][data-benchmark-layout=flow] #image-workbench .atlas-matrix-scrollport{overscroll-behavior-y:auto!important}

/* Private desktop navigation preserves the result port's width while tools fold. */
@media (min-width:901px) {
  html[data-image-workspace-ready=true] body[data-workspace-app=image][data-workspace-audience=private] {
    padding-inline-start:0;
  }
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=private] #workspace-rail {
    position:sticky;
    inset:0 0 auto;
    width:100%;
    flex-direction:row;
    align-items:center;
    gap:20px;
    padding:4px 28px;
    border-right:0;
    border-bottom:1px solid var(--workspace-line);
    overflow:visible;
  }
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=private] #workspace-rail .workspace-home {
    min-height:40px;
    margin:0;
    white-space:nowrap;
  }
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=private] #workspace-rail .workspace-home small {
    display:none;
  }
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=private] #workspace-rail .image-work-areas {
    display:flex;
    gap:4px;
    margin:0;
  }
  body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #image-desktop-tools-toggle {
    flex:none;
    min-height:44px;
    white-space:nowrap;
  }
  body[data-workspace-app=image][data-workspace-audience=private] #image-workbench .image-desktop-tools-folded {
    max-height:0;
    min-height:0;
    overflow:clip;
    opacity:0;
  }
  body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery .ag-controls:has(> .ag-library-tools) > .ag-toolbar:not(:has(> :not([hidden],#ag-view-images,#ag-view-albums,#ag-filter-toggle,#ag-display))) {
    display:none;
  }
}
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-library-tools { display:flex; flex:0 0 auto; flex-wrap:wrap; align-items:center; gap:6px; min-width:0; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-library-tools > :is(button,a) { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; min-height:44px; padding:8px 12px; border:1px solid var(--workspace-line); border-radius:8px; background:var(--workspace-panel); color:var(--workspace-ink); font:500 14px/1.35 var(--workspace-sans); text-decoration:none; white-space:normal; overflow-wrap:anywhere; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-inline-panel { box-sizing:border-box; width:100%; max-width:100%; min-width:0; flex:0 0 auto; align-self:stretch; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-inline-panel[hidden],
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-inline-panel [hidden] { display:none!important; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-inline-panel .ag-simple-search { display:flex; align-items:end; flex-wrap:wrap; gap:8px; min-width:0; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-inline-panel .ag-simple-search label { display:grid; flex:1 1 220px; gap:5px; min-width:0; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-inline-panel .ag-simple-search input { width:100%; min-width:0; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-inline-panel .ag-sort-panel #ag-sort { display:flex; flex-wrap:wrap; gap:6px; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-inline-panel .ag-display-panel { display:flex; flex-wrap:wrap; gap:10px; min-width:0; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-inline-panel .ag-display-body { display:flex; flex-wrap:wrap; align-items:end; gap:10px; min-width:0; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-inline-panel .ag-display-body label { display:grid; gap:4px; min-width:0; }
body[data-workspace-app=image] #image-workbench #atlas-gallery[data-gallery-tools=inline-v1] .ag-toolbar > :is(#ag-view-images,#ag-view-albums,#ag-filter-toggle,#ag-display) { display:none!important; }
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #atlas-gallery[data-gallery-tools=inline-v1] #ag-inline-panel:is([data-tool=filter],[data-tool=display]) {
  order:2;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #atlas-gallery[data-gallery-tools=inline-v1] #ag-inline-panel[data-tool=filter] #ag-filters {
  box-sizing:border-box;
  max-height:min(55dvh, 540px);
  overflow:auto;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #atlas-gallery[data-gallery-tools=inline-v1] #ag-inline-panel[data-tool=display] .ag-display-body {
  position:static;
  width:100%;
  max-width:100%;
}
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-result-bar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; min-width:0; }
body[data-workspace-app=image] #image-workbench #atlas-gallery #ag-count { margin:0 auto 0 0; min-width:0; overflow-wrap:anywhere; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-result-bar .ag-pages { margin-inline-start:auto; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-condition-summary { min-width:0; }
body[data-workspace-app=image] #image-workbench #atlas-gallery #ag-applied { display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
@media(max-width:600px) {
 body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-library-tools { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
 body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-library-tools > :is(button,a) { min-width:0; padding-inline:5px; font-size:13px; }
 body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-result-bar { align-items:stretch; }
 body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-result-bar .ag-pages { margin-inline:auto; }
}

/* Image Atlas owns panel geometry and gallery-specific options. */
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench .atlas-tool-panel { --at-field:var(--media-tool-field); padding:20px; }
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery .ag-library-tools>button[aria-expanded=true] {
  background:var(--workspace-tint); border-color:color-mix(in srgb,var(--workspace-accent) 38%,var(--workspace-line)); color:var(--workspace-accent); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--workspace-accent) 9%,transparent);
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel.atlas-tool-panel {
  width:100%; max-width:820px; min-width:0; padding:20px; margin:0; align-self:start; justify-self:start;
  box-shadow:0 3px 12px rgb(25 30 25 / 4%);
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel[data-tool=search] {max-width:720px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel[data-tool=sort] {max-width:400px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel[data-tool=display] {max-width:460px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-simple-search {margin:0;gap:10px;align-items:end;flex-wrap:nowrap}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-simple-search label {gap:7px;flex:1 1 0}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-search-submit {
  min-height:44px; min-width:78px; padding:9px 18px; border:1px solid var(--workspace-accent); border-radius:9px;
  background:var(--workspace-accent); color:var(--workspace-accent-ink,#fff); font-size:14px; font-weight:600;
}
/* Strip the previous inspector and its double card. */
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-filters {
  position:static; inset:auto; display:block; width:100%; max-width:none; max-height:none; margin:0; padding:0;
  border:0; border-radius:0; background:transparent; box-shadow:none; overflow:visible;
}

body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-facet-grid {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; align-items:start;
  max-height:min(44dvh,440px); padding:2px 5px 4px 2px; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-width:thin;
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-field-options {display:contents}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-facet-grid details {
  min-width:0; margin:0; padding:0; border:1px solid var(--workspace-line); border-radius:10px; background:var(--at-field,var(--workspace-bg));
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-facet-grid summary {
  display:flex; align-items:center; gap:9px; min-height:44px; padding:11px 12px;
  border:0; color:var(--workspace-ink); font:600 13px/1.4 var(--workspace-sans); list-style:none; cursor:pointer;
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-facet-grid summary::-webkit-details-marker {display:none}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-facet-grid summary::before {
  content:''; display:block; width:6px; height:6px; flex:0 0 6px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); opacity:.65;
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-facet-grid details[open]>summary::before {transform:rotate(45deg)}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-facet-grid details[open]>summary {border-bottom:1px solid var(--workspace-line)}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-choices {display:flex;flex-wrap:wrap;gap:7px;padding:12px;max-height:180px;overflow:auto}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-chip {
  min-height:34px; padding:6px 9px; border:1px solid var(--workspace-line); border-radius:7px;
  background:var(--workspace-panel); color:var(--workspace-ink); font:400 13px/1.4 var(--workspace-sans); text-decoration:none;
}
/* Existing gallery.css has !important selection colors; override only here. */
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-chip[aria-pressed=true] {
  background:var(--workspace-tint)!important; color:var(--workspace-accent)!important; border-color:var(--workspace-accent)!important; font-weight:600; text-decoration:none;
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-facet-grid :is(.ag-tag-filter,#ag-date-filter,.ag-album-options) {grid-column:1/-1}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel :is(#ag-facet-status,.ag-note) {font:400 12px/1.55 var(--workspace-sans);color:var(--workspace-muted);margin:0 0 12px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-tag-search {width:calc(100% - 24px);margin:12px 12px 0}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-date-filter[open] {display:block;padding:0 12px 12px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-date-filter[open]>summary {margin:0 -12px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-date-filter>label {margin-top:8px;display:flex;align-items:center;gap:9px;min-height:36px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-panel-actions {
  display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:16px -20px -20px; padding:14px 20px;
  border-top:1px solid var(--workspace-line); background:color-mix(in srgb,var(--workspace-bg) 45%,var(--workspace-panel)); border-radius:0 0 14px 14px;
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-panel-actions #ag-pending {flex:1 1 100%;margin:0;padding:0;border:0;background:transparent}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-panel-actions #ag-pending strong {color:var(--workspace-ink)}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-draft-chips .ag-chip {
  color:var(--workspace-accent)!important;
  background:var(--workspace-panel)!important;
  border:1px dashed color-mix(in srgb,var(--workspace-accent) 60%,var(--workspace-line))!important;
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-display-body > #ag-select-mode {
  order:1;
}
@media (max-width:900px) {
  body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery .ag-controls:has(> .ag-inline-panel:not([hidden])) > .ag-toolbar:not(:has(> :not([hidden],#ag-view-images,#ag-view-albums,#ag-filter-toggle,#ag-display))) {
    display:none;
  }
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-panel-actions :is(#ag-apply,.ag-primary) {background:var(--workspace-accent);color:var(--workspace-accent-ink,#fff);border-color:var(--workspace-accent)}
/* Sorting is a short list of equal rows, not metadata chips. */
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-sort-panel #ag-sort {display:grid;grid-template-columns:1fr;gap:6px;margin:0;padding:0}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-sort>span {display:none}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-sort button[data-sort] {
  display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;padding:10px 12px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--workspace-ink);text-align:start;font:500 14px/1.4 var(--workspace-sans);text-decoration:none;
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-sort button[data-sort]:hover {background:var(--at-field,var(--workspace-bg))}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-sort button[data-sort][aria-pressed=true] {background:var(--workspace-tint);color:var(--workspace-accent);border-color:color-mix(in srgb,var(--workspace-accent) 28%,var(--workspace-line));font-weight:600}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-sort button[data-sort][aria-pressed=true]::after {content:'✓';font-size:16px}
/* Critical: the moved body must stop being its own absolute popover. */
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-display-panel {display:block;width:100%}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-display-body {
  position:static;inset:auto;z-index:auto;display:grid;grid-template-columns:1fr;align-items:stretch;gap:14px;width:100%;max-width:100%;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-display-body>label {display:grid;grid-template-columns:118px minmax(0,1fr);align-items:center;gap:12px;min-height:44px;font-size:13px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-display-body>label:has(input[type=checkbox]) {display:flex;gap:10px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-display-body select {width:100%}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-display-body>button {min-height:44px;padding:10px 12px;border:1px solid var(--workspace-line);border-radius:9px;background:var(--at-field,var(--workspace-bg));color:var(--workspace-ink);font-size:13px;text-align:start}
/* Benchmark keeps its existing anchors; only panel geometry/interior changes. */
body[data-workspace-app=image][data-workspace-audience=private][data-image-benchmark-screen] #image-workbench .benchmark-popup-body.atlas-tool-panel {
  width:520px;max-width:100%;max-height:min(72dvh,640px);box-shadow:0 16px 40px rgb(20 25 20 / 12%),0 3px 8px rgb(20 25 20 / 5%);scrollbar-width:thin;
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-panel .benchmark-toolbar .benchmark-popup-body.atlas-tool-panel {width:520px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-filter-body>label {display:grid;gap:6px;margin:0;min-width:0}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-filter-body>label> :is(input,select) {width:100%}
body[data-workspace-app=image][data-workspace-audience=private][data-image-benchmark-screen] #image-workbench .benchmark-footer .benchmark-popup-body.atlas-tool-panel {width:360px;max-width:100%}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-settings-body>label {display:grid;gap:6px;margin:0}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-settings-body>button {grid-column:1/-1;min-height:44px;border:1px solid var(--workspace-line);border-radius:9px;background:var(--at-field,var(--workspace-bg));color:var(--workspace-ink);text-align:start}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-settings-body>button[aria-pressed=true] {background:var(--workspace-tint);color:var(--workspace-accent);border-color:var(--workspace-accent)}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-info-body.atlas-tool-panel {width:420px}
@media(max-width:600px) {
  body[data-workspace-app=image][data-workspace-audience=private][data-image-benchmark-screen] #image-workbench .benchmark-toolbar .benchmark-popup-body.atlas-tool-panel {
    max-height:min(62dvh,max(160px,calc(100dvh - 282px)));
  }
}
/* Collection disclosures share the surface language while remaining inline. */
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #image-collection-tools {padding:0;border:0;box-shadow:none;background:transparent;gap:12px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #image-collection-tools>.atlas-collection-detail {border-radius:12px;overflow:hidden}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #image-collection-tools>.atlas-collection-detail>summary {padding:14px 16px;font:600 14px/1.45 var(--workspace-sans)}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #image-collection-tools>.atlas-collection-detail[open]>summary {border-bottom:1px solid var(--workspace-line);background:color-mix(in srgb,var(--workspace-tint) 45%,var(--workspace-panel))}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #image-collection-tools .atlas-feedback {margin:0;padding:20px;border:0;border-radius:0;box-shadow:none;background:transparent}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #image-collection-tools .atlas-feedback form {grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #image-collection-tools .atlas-feedback form>label:nth-of-type(5) {grid-column:1/-1}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #image-collection-tools .atlas-feedback form>button {grid-column:2;justify-self:end;min-width:140px}
@media(max-width:700px) {
 body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel.atlas-tool-panel,body[data-workspace-app=image][data-workspace-audience=private][data-image-benchmark-screen] #image-workbench .benchmark-popup-body.atlas-tool-panel {padding:16px}
 body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-facet-grid {grid-template-columns:1fr;max-height:52dvh}
 body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-panel-actions {margin:16px -16px -16px;padding:12px 16px}
 body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #image-collection-tools .atlas-feedback form {grid-template-columns:1fr}
 body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #image-collection-tools .atlas-feedback form>button {grid-column:1}
}
@media(max-width:420px) {
 body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-display-body>label {grid-template-columns:1fr;gap:6px}
 body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-simple-search {flex-wrap:wrap}
 body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-simple-search label {flex-basis:100%}
 body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-search-submit {width:100%}
}

/* Exact current DOM and legacy specificity corrections. */
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery:not([hidden]):has(#ag-filters:not([hidden])) {grid-template-columns:minmax(0,1fr);gap:0}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-filter-close.atlas-tool-panel-close {width:var(--media-tool-close-size);border:0}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-filter-close.atlas-tool-panel-close:not(:hover) {background:transparent}
/* Preserve the shared close-target dimensions against #atlas-gallery button's legacy 44px floor. */
body[data-workspace-app=image] #image-workbench #atlas-gallery .media-tool-panel .media-tool-panel__close {box-sizing:border-box;width:var(--media-tool-close-size);min-width:var(--media-tool-close-size);height:var(--media-tool-close-size);min-height:var(--media-tool-close-size);padding:0}
body[data-workspace-app=image] #image-workbench .benchmark-popup-body.media-tool-panel .media-tool-panel__close {box-sizing:border-box;width:var(--media-tool-close-size);min-width:var(--media-tool-close-size);height:var(--media-tool-close-size);min-height:var(--media-tool-close-size);padding:0}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel #ag-sort>.ag-choices {display:grid;grid-template-columns:1fr;gap:6px;padding:0;max-height:none;overflow:visible}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-facet-grid details>input[type=search] {width:calc(100% - 24px);margin:12px 12px 0}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-filter-body.atlas-tool-panel {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-filter-body>.atlas-tool-panel-head {grid-column:1/-1;margin-bottom:4px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-filter-body>label:first-of-type {grid-column:1/-1}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-settings-body.atlas-tool-panel {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-settings-body>.atlas-tool-panel-head {grid-column:1/-1;margin-bottom:4px}
@media(max-width:700px){
 body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-filter-body.atlas-tool-panel {grid-template-columns:1fr}
}

/* Final integration refinements after inspecting the real DOM at 1440px. */
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery .ag-controls {width:100%;min-width:0;align-self:stretch}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-panel-actions:not(:has(> :not([hidden]))) {display:none}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-date-fields {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);gap:10px;margin-top:12px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-date-fields>label {display:grid;min-width:0;gap:6px}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-date-fields>label> :is(select,input) {width:100%;min-width:0}
@media(max-width:700px){body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery #ag-inline-panel .ag-date-fields {grid-template-columns:1fr}}

/* JOB-5184 Astra pass: compact archive controls and keep active conditions beside results. */
body[data-workspace-app=image] #image-workbench #image-work-heading { margin:0; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-controls { gap:6px 12px; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-simple-search { order:0; flex:1 1 100%; min-width:0; padding:0; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-simple-search label { font-size:13px; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-simple-search input { min-width:0; width:100%; min-height:44px; font-size:16px; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-simple-search #ag-search-submit { min-width:64px; min-height:44px; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-library-tools { order:1; flex:1 1 auto; align-items:center; gap:4px; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-library-tools>button { min-height:44px; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-result-bar { order:2; flex:0 1 auto; min-height:44px; margin:0; padding:0; border:0; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-condition-summary { order:3; flex-basis:100%; display:flex; align-items:center; gap:8px; padding:3px 0 0; border:0; }
body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-condition-summary h2 { flex:none; font-size:12px; }
body[data-workspace-app=image] #image-workbench #atlas-gallery #ag-applied { max-height:42px; overflow:auto; }
body[data-workspace-app=image] #image-workbench #atlas-gallery #ag-grid { padding-top:12px; }
body[data-workspace-app=image] #image-workbench #benchmark-panel .benchmark-condition-summary { flex:none; margin:0; padding:3px 6px; border-left:2px solid var(--workspace-accent); color:var(--workspace-muted); font-size:12px; line-height:1.45; overflow-wrap:anywhere; }
body[data-workspace-app=image] #image-workbench #benchmark-port { overscroll-behavior:contain; }
body[data-workspace-app=image] #image-workbench #benchmark-port table { min-width:100%; }
@media(max-width:600px) {
 body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-simple-search { flex-basis:100%; }
 body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-library-tools { display:flex; flex-wrap:wrap; }
 body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-library-tools>button { flex:1 1 auto; padding-inline:8px; }
 body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-result-bar { flex-basis:100%; }
 body[data-workspace-app=image] #image-workbench #atlas-gallery #ag-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 body[data-workspace-app=image] #image-workbench #atlas-gallery[data-density=spacious] #ag-grid { grid-template-columns:minmax(0,1fr); }
 body[data-workspace-app=image] #image-workbench #benchmark-panel .benchmark-condition-summary { font-size:11px; }
}
@media(max-height:560px) {
 body[data-workspace-app=image][data-workspace-audience=private] #image-workbench { display:block!important; height:auto!important; }
 body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-panel { min-height:0; }
 body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #benchmark-port { flex:none!important; height:auto!important; max-height:none!important; overflow-x:auto!important; overflow-y:visible!important; }
}

body[data-workspace-app=image] #image-workbench :is(#ag-search-submit,#ag-filter-toggle,#ag-direct-filter,#ag-direct-sort,#ag-direct-display,#ag-view-toggle,#benchmark-prev,#benchmark-next,#benchmark-back,#image-benchmark-focus),
body[data-workspace-app=image] #image-workbench :is(#ag-display,.benchmark-disclosure)>summary,
body[data-workspace-app=image] #image-workbench .media-tool-panel .media-tool-panel__close {
  box-sizing:border-box; min-width:44px; min-height:44px;
}
body[data-workspace-app=image] #image-workbench :is(#ag-filter-toggle,#ag-direct-filter,#ag-direct-sort,#ag-direct-display,#image-benchmark-focus),
body[data-workspace-app=image] #image-workbench :is(#ag-display,#benchmark-filter)>summary {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
}
body[data-workspace-app=image] #image-workbench :is(#ag-filter-toggle,#ag-direct-filter,#ag-direct-sort,#ag-direct-display,#image-benchmark-focus)::before,
body[data-workspace-app=image] #image-workbench :is(#ag-display,#benchmark-filter)>summary::before {
  content:""; width:18px; height:18px; flex:none; background:currentColor;
  mask:var(--atlas-tool-icon) center / contain no-repeat;
}
body[data-workspace-app=image] #image-workbench :is(#ag-filter-toggle,#ag-direct-filter,#benchmark-filter>summary) {
  --atlas-tool-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 5h16l-6 7v5l-4 2v-7z'/%3E%3C/svg%3E");
}
body[data-workspace-app=image] #image-workbench :is(#ag-direct-display,#ag-display>summary) {
  --atlas-tool-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='5' width='16' height='14' rx='2'/%3E%3Cpath d='M4 10h16m-8 0v9'/%3E%3C/svg%3E");
}
body[data-workspace-app=image] #image-workbench #ag-direct-sort {
  --atlas-tool-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 5v14m-3-3 3 3 3-3M13 5h7m-7 5h5m-5 5h3'/%3E%3C/svg%3E");
}
body[data-workspace-app=image] #image-workbench #image-benchmark-focus {
  --atlas-tool-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 4H4v5m11-5h5v5M4 15v5h5m11-5v5h-5'/%3E%3C/svg%3E");
}
body[data-workspace-app=image] #image-workbench #image-benchmark-focus::before {width:20px;height:20px}

body[data-workspace-app=image] #image-workbench #atlas-gallery #ag-applied {
  display:flex; flex-wrap:wrap; overflow:visible; max-height:none;
}
body[data-workspace-app=image][data-benchmark-layout=flow] #image-workbench #benchmark-port {
  overscroll-behavior-y:auto; touch-action:pan-x pan-y;
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery .ag-simple-search {
  padding:0; margin:0; gap:6px;
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery .ag-controls>.ag-toolbar:not(:has(>:not([hidden],#ag-view-images,#ag-view-albums,#ag-filter-toggle,#ag-display,#ag-compare))) {
  display:none;
}
body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery .ag-library-tools #ag-count {
  padding:0; margin:0; flex:none;
}
body[data-workspace-app=image] #image-workbench #benchmark-panel .benchmark-condition-summary {
  flex:1 1 126px; min-width:0; margin:0; overflow-wrap:anywhere;
}
@media(max-width:600px) {
  body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #image-desktop-tools-toggle {display:none}
  body[data-workspace-app=image][data-workspace-audience=private] #image-workbench #atlas-gallery .ag-library-tools>button {flex:none}
}

/* The benchmark explorer uses the same workspace as the comparison table. */
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) #workspace-rail .image-work-areas [data-benchmark-explore] {
  padding-inline-start: 24px;
  min-height: 44px;
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) #workspace-rail [data-benchmark-explore]::before {
  content: '↳';
  margin-inline-end: 6px;
}
#image-workbench .benchmark-toolbar[hidden], #benchmark-explore[hidden] { display: none !important; }
#benchmark-explore {
  min-width: 0;
  min-height: 0;
  padding: clamp(12px, 2vw, 24px);
  color: var(--workspace-ink);
  overflow-wrap: anywhere;
}
body[data-benchmark-layout=viewport] #benchmark-explore { flex: 1 1 auto; overflow: auto; }
#benchmark-explore :is(h2,h3,p) { margin: 0 0 8px; }
#benchmark-explore h2 { font-size: clamp(22px, 3vw, 26px); }
#benchmark-explore h3 { font-size: 17px; }
#benchmark-explore p, #benchmark-explore small { color: var(--workspace-muted); }
#benchmark-explore .benchmark-explore-section { margin-block: 18px; }
#benchmark-explore :is(ul,li) { padding: 0; margin: 0; list-style: none; min-width: 0; }
#benchmark-explore .benchmark-explore-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
#benchmark-explore :is(a,button,input), #benchmark-return-explore {
  min-height: 44px;
}
#benchmark-explore a, #benchmark-return-explore { color: var(--workspace-accent); }
#benchmark-explore :is(a,button,input,summary):focus-visible, #benchmark-return-explore:focus-visible {
  outline: 2px solid var(--workspace-accent);
  outline-offset: 2px;
}
#benchmark-explore .benchmark-explore-card, #benchmark-explore .benchmark-explore-list a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  color: var(--workspace-ink);
  text-decoration: none;
  font-weight: 650;
}
#benchmark-explore .benchmark-explore-card {
  border: 1px solid var(--workspace-line);
  border-radius: 10px;
  background: var(--workspace-panel);
  padding: 16px;
  min-height: 112px;
}
#benchmark-explore :is(.benchmark-explore-card,.benchmark-explore-list a):hover {
  background: var(--workspace-tint);
  text-decoration: underline;
}
#benchmark-explore :is(.benchmark-explore-scopes,.benchmark-explore-search,.benchmark-explore-range,.benchmark-explore-pager) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
#benchmark-explore .benchmark-explore-scopes { margin-block: 8px; }
#benchmark-explore .benchmark-explore-scopes [aria-pressed=true] {
  background: var(--workspace-tint);
  border-color: var(--workspace-accent);
  color: var(--workspace-accent);
  font-weight: 700;
}
#benchmark-explore .benchmark-explore-scopes [aria-pressed=true]::before { content: '✓ '; }
#benchmark-explore .benchmark-explore-range { justify-content: space-between; margin-block: 12px; }
#benchmark-explore .benchmark-explore-range h3 { margin: 0; }
#benchmark-explore .benchmark-explore-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 12px;
  border-radius: 8px;
  background: var(--workspace-accent);
  color: var(--workspace-accent-ink);
}
#benchmark-explore .benchmark-explore-search { margin-block: 12px; }
#benchmark-explore .benchmark-explore-matrix { min-width:0; }
#benchmark-explore .benchmark-explore-matrix summary,
#benchmark-explore .benchmark-explore-matrix a { min-height:44px; padding:10px; }
#benchmark-explore .benchmark-explore-matrix summary { cursor:pointer; }
#benchmark-explore .benchmark-explore-matrix a { display:inline-flex; align-items:center; }
#benchmark-explore .benchmark-explore-matrix ul { margin:0; padding-inline-start:24px; }
#benchmark-explore .benchmark-explore-search label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#benchmark-explore .benchmark-explore-search input { max-width: 100%; margin: 0; }
#benchmark-explore .benchmark-explore-list li { border-block-start: 1px solid var(--workspace-line); }
#benchmark-explore .benchmark-explore-list a { padding: 8px 4px; }
#benchmark-explore .benchmark-explore-list small { font-weight: 400; }
#benchmark-explore .benchmark-explore-pager { justify-content: center; margin-block: 12px; }
#benchmark-explore > a, #benchmark-return-explore { display: inline-flex; align-items: center; }
#benchmark-return-explore { flex: none; max-width: 100%; padding-inline: 4px; font-size: 12px; }
#benchmark-explore summary { display: flex; min-height: 44px; align-items: center; cursor: pointer; }
@media (max-width: 1199px) {
  #benchmark-explore .benchmark-explore-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  #benchmark-explore .benchmark-explore-cards { grid-template-columns: minmax(0, 1fr); }
  #benchmark-explore .benchmark-explore-card { min-height: 84px; }
  #benchmark-explore .benchmark-explore-cta { width: 100%; }
  #benchmark-explore .benchmark-explore-search label { width: 100%; }
  #benchmark-explore .benchmark-explore-search input { width: 100%; }
  #benchmark-return-explore { flex-basis: 100%; }
}
#benchmark-explore .benchmark-explore-item-title { display: flex; justify-content: space-between; gap: 8px; }
#benchmark-explore .benchmark-explore-item-title small { color: var(--workspace-accent); white-space: nowrap; }
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) #workspace-rail .image-work-areas a[data-work-area=benchmark][aria-current=true] {
  background: var(--workspace-tint);
  color: var(--workspace-accent);
  border-color: transparent;
}

/* Library search uses the existing tool treatment without consuming list height. */
body[data-workspace-app=image] #image-workbench #atlas-gallery #ag-search-toggle {
  min-width:44px; min-height:44px;
}
body[data-workspace-app=image][data-workspace-audience] #image-workbench #atlas-gallery :is(#ag-search-panel,#ag-inline-panel[data-tool=search]):not([hidden]) {
  position:fixed!important; inset:var(--ag-search-top,120px) 12px var(--ag-search-bottom,auto)!important; z-index:900;
  box-sizing:border-box; width:auto; max-width:720px; margin-inline:auto;
  max-height:min(var(--ag-search-height,65dvh),440px)!important; overflow:auto; overscroll-behavior:contain;
  padding:20px; color:var(--workspace-ink); background:var(--workspace-panel);
  border:1px solid var(--workspace-line); border-radius:12px; box-shadow:0 12px 30px #0004;
}
body[data-workspace-app=image][data-workspace-audience=public] #atlas-gallery :is(#ag-search-panel,#ag-inline-panel[data-tool=search]) .ag-simple-search {
  display:flex; flex-wrap:wrap; align-items:end; gap:8px;
}
body[data-workspace-app=image][data-workspace-audience=public] #atlas-gallery :is(#ag-search-panel,#ag-inline-panel[data-tool=search]) .ag-simple-search label {
  display:grid; flex:1 1 220px; min-width:0; gap:5px; font-size:13px;
}
body[data-workspace-app=image][data-workspace-audience=public] #atlas-gallery :is(#ag-search-panel,#ag-inline-panel[data-tool=search]) .ag-simple-search input {
  box-sizing:border-box; width:100%; min-width:0; min-height:44px; font-size:16px;
}
@media(max-width:600px) {
  body[data-workspace-app=image][data-workspace-audience] #image-workbench #atlas-gallery :is(#ag-search-panel,#ag-inline-panel[data-tool=search]):not([hidden]) { padding:16px; }
  body[data-workspace-app=image][data-workspace-audience=public] #atlas-gallery :is(#ag-search-panel,#ag-inline-panel[data-tool=search]) .ag-simple-search label,
  body[data-workspace-app=image][data-workspace-audience=public] #atlas-gallery :is(#ag-search-panel,#ag-inline-panel[data-tool=search]) .ag-simple-search button { flex-basis:100%; }
}

/* JOB-5252 shared Image Atlas shell and library actions. */
html[data-image-workspace-ready=true] body[data-workspace-app=image] { padding-left:0!important; }
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail {
  position:sticky; inset:auto; z-index:100; width:auto; height:56px; min-height:56px; box-sizing:border-box;
  display:flex; flex-direction:row; align-items:center; gap:20px; overflow:visible;
  padding:0 24px; border:0; border-bottom:1px solid var(--workspace-line); background:var(--workspace-soft);
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail .workspace-home { flex:none; min-height:44px; margin:0; padding:0; }
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail .workspace-home small,
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail .workspace-rail-label { display:none; }
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail .image-work-areas { display:flex; align-items:center; gap:8px; margin:0; padding:0; }
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail .image-work-areas a { min-height:44px; padding:8px 10px; font-size:13px; color:var(--workspace-ink); }
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail .image-work-areas a[aria-current] { background:var(--workspace-tint); color:var(--workspace-accent); border-radius:8px; }
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail #image-theme-menu { margin-left:auto; position:relative; overflow:visible; }
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail #image-theme-menu>summary { display:flex; align-items:center; min-height:44px; padding:8px 10px; border:1px solid var(--workspace-line); border-radius:8px; background:var(--workspace-panel); list-style:none; cursor:pointer; }
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail #image-theme-menu>summary::-webkit-details-marker { display:none; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #workspace-theme-footer { position:absolute; z-index:120; top:calc(100% + 6px); right:0; width:min(300px,calc(100vw - 24px)); box-sizing:border-box; padding:16px; border:1px solid var(--workspace-line); border-radius:12px; background:var(--workspace-panel); box-shadow:0 12px 30px #0003; }
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image][data-workspace-audience=public] #workspace-rail > #workspace-theme-menu {
  margin-inline-start:auto;
  justify-self:end;
  position:relative;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-workspace-audience=public] #workspace-theme-menu > #workspace-theme-footer {
  position:absolute;
  inset:calc(100% + 6px) 0 auto auto;
  margin:0;
  max-width:calc(100vw - 24px);
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench { padding-inline:24px; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench .image-task-header { min-height:52px; padding:0 0 16px; border:0; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench .image-task-heading-row { flex-wrap:nowrap; align-items:center; gap:16px; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench .image-task-heading-row #image-work-heading { flex:1 1 auto; margin:0; font-size:22px; line-height:1.25; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav { width:auto; flex:0 1 auto; align-items:center; justify-content:flex-end; gap:6px; margin-left:auto; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav>:is(a,button),
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav .image-tool-launcher>summary { min-height:44px; padding:8px 10px; border:1px solid var(--workspace-line); border-radius:8px; background:var(--workspace-panel); color:var(--workspace-ink); font:500 13px/1.35 var(--workspace-sans); white-space:nowrap; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav [aria-current] { background:var(--workspace-tint); color:var(--workspace-accent); }
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #image-workbench #image-personal-tools .image-tool-body { top:calc(100% + 6px); inset-inline-start:auto; inset-inline-end:0; max-height:min(70dvh,560px); overflow:auto; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-benchmark-focus { flex:none; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench .image-work-screen { padding-top:8px; }
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-workspace-audience] #atlas-gallery .ag-library-tools { display:flex; flex-wrap:nowrap; gap:6px; align-items:center; margin:0 0 8px; }
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-workspace-audience] #atlas-gallery .ag-library-tools>:is(button,a),
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-workspace-audience] #atlas-gallery .ag-toolbar>button,
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-workspace-audience] #atlas-gallery #ag-display>summary { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 10px; border:1px solid var(--workspace-line); border-radius:8px; background:var(--workspace-panel); color:var(--workspace-ink); font:500 13px/1.2 var(--workspace-sans); white-space:nowrap; text-decoration:none; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery #ag-direct-filter[aria-expanded=true],
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery #ag-search-toggle[aria-expanded=true] { border-color:var(--workspace-accent); background:var(--workspace-tint); color:var(--workspace-accent); }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery .ag-result-bar { min-height:24px; margin:0; padding:4px 0 8px; border:0; color:var(--workspace-muted); font-size:12px; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery .ag-result-bar #ag-count { margin:0 auto 0 0; padding:0; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery .ag-controls { padding:0; border:0; background:transparent; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery .ag-toolbar { min-height:44px; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery #ag-filters { box-sizing:border-box; width:min(680px,100%); max-height:min(70dvh,620px); overflow:auto; margin:8px 0; padding:20px; border-radius:12px; box-shadow:0 12px 30px #0003; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery #ag-sort-panel { margin:0 0 14px; padding:0 0 12px; border:0; border-bottom:1px solid var(--workspace-line); }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery #ag-sort-panel::before { content:'정렬'; display:block; margin-bottom:8px; color:var(--workspace-muted); font-size:12px; font-weight:650; }
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery :is(button,summary,a):focus-visible { outline:2px solid var(--workspace-accent); outline-offset:2px; }
@media (min-width:601px) and (max-width:900px) {
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail { gap:10px; padding-inline:16px; }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench { padding-inline:16px; }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav { gap:4px; }
}
@media (max-width:600px) {
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail { height:auto; min-height:104px; display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:44px 44px; gap:4px 8px; padding:8px 12px; }
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail .workspace-home { grid-column:1; grid-row:1; }
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail #image-theme-menu { grid-column:2; grid-row:1; }
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail .image-work-areas { grid-column:1/-1; grid-row:2; gap:4px; overflow:auto; }
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail .image-work-areas a { min-height:44px; padding:7px 9px; font-size:12px; }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench { padding-inline:12px; }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench .image-task-header { padding:0 0 12px; }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench .image-task-heading-row { flex-wrap:wrap; gap:8px; }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench .image-task-heading-row #image-work-heading { flex:1 1 100%; font-size:20px; }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav { width:100%; flex:1 1 100%; justify-content:flex-start; flex-wrap:nowrap; gap:4px; overflow:visible; }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav>:is(a,button),
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav .image-tool-launcher>summary { padding-inline:8px; font-size:12px; }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-benchmark-focus { font-size:0; width:44px; padding:8px; }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-benchmark-focus::before { content:'⛶'; font-size:18px; }
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #image-workbench #image-personal-tools .image-tool-body { position:fixed; top:auto; left:12px; right:12px; width:auto; max-width:none; max-height:60dvh; }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery .ag-library-tools { gap:4px; }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery .ag-library-tools>:is(button,a) { padding-inline:8px; font-size:12px; }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery #ag-filters { width:100%; max-height:60dvh; padding:16px; }
}

/* Shared navigation and geometry for the paired Image Atlas shells. */
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail {
  position:sticky; top:0; inset-inline:0;
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image].image-work-focus #workspace-rail {
  display:none!important;
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail .image-work-areas {
  overflow:visible;
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #image-personal-tools {
  position:relative; flex:none;
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #image-personal-tools > summary {
  display:flex; align-items:center; min-width:44px; min-height:44px; padding:0 10px;
  box-sizing:border-box; border:1px solid var(--workspace-line); border-radius:8px;
  background:var(--workspace-panel); color:var(--workspace-ink); font-size:13px;
  cursor:pointer; white-space:nowrap; list-style:none;
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #image-personal-tools > summary::-webkit-details-marker {display:none}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #image-personal-tools > summary.is-current {
  color:var(--workspace-accent); background:var(--workspace-tint);
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #image-personal-tools > .image-tool-body {
  position:absolute; z-index:125; top:calc(100% + 6px); inset-inline-start:0; width:172px;
  display:grid; padding:6px; box-sizing:border-box; border:1px solid var(--workspace-line);
  border-radius:12px; color:var(--workspace-ink); background:var(--workspace-panel);
  box-shadow:0 12px 30px #0003;
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #image-personal-tools:not([open]) > .image-tool-body {display:none}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench .image-task-heading-row {
  min-height:52px;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav > :is(a,button),
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav > details > summary {
  box-sizing:border-box; min-width:44px; display:inline-flex; align-items:center; justify-content:center;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav > [hidden] {display:none}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav #image-benchmark-focus {min-width:44px}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery .ag-result-context {
  display:flex; align-items:center; min-height:24px; margin:0; padding:0;
  color:var(--workspace-muted); font-size:12px; flex:none;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery .ag-result-context #ag-count {
  min-height:0; margin:0; padding:0; font-size:12px;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-workspace-audience] #atlas-gallery .ag-controls :is(.ag-library-tools,.ag-toolbar) {
  align-items:center; gap:6px; min-height:44px; margin:0;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-workspace-audience] #atlas-gallery .ag-controls :is(#ag-search-toggle,#ag-direct-filter,#ag-filter-toggle,#ag-direct-display,#ag-display > summary,#ag-view-toggle) {
  display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box;
  flex:none; min-width:44px; min-height:44px; padding:0 8px; gap:5px;
  border:1px solid var(--workspace-line); border-radius:8px; background:var(--workspace-panel);
  color:var(--workspace-ink); font-size:13px; font-weight:550; white-space:nowrap;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery #ag-search-toggle {width:48px}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery :is(#ag-direct-filter,#ag-filter-toggle) {min-width:104px}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery :is(#ag-direct-display,#ag-display > summary) {width:64px}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery #ag-view-toggle {
  margin-inline-start:3px; background:var(--workspace-soft);
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery #ag-display > summary::-webkit-details-marker {display:none}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery #ag-display > summary::marker {content:''}
@media (max-width:600px) {
  html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench .image-task-heading-row {
    flex-wrap:nowrap; gap:8px;
  }
  html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench .image-task-heading-row #image-work-heading {flex:1 1 auto}
  html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench #image-work-nav {
    width:auto; flex:0 0 auto; justify-content:flex-end;
  }
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #image-personal-tools > .image-tool-body {
    inset-inline-start:auto; inset-inline-end:0;
  }
  html[data-image-workspace-ready=true] body[data-workspace-app=image][data-workspace-audience] #atlas-gallery .ag-controls :is(.ag-library-tools,.ag-toolbar) {gap:4px}
}

/* Keep theme and result status in the same rows for both audiences. */
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail:has(> #image-theme-menu) > #workspace-theme-menu {
  display:none!important;
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail > #image-theme-menu:not([open]) > #workspace-theme-footer {display:none!important}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail > #image-theme-menu[open] > #workspace-theme-footer {display:grid!important}
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench .image-task-header {
  display:block; padding:0 0 8px; margin:0; min-height:52px;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench .image-task-heading-row {
  width:100%; min-height:52px; margin:0; padding:0; gap:8px;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench #image-work-screen-gallery {
  padding-top:8px; margin-top:0;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench #atlas-gallery .ag-controls {
  display:flex; flex-direction:column; align-items:stretch; padding:0; border:0; gap:0;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench #atlas-gallery .ag-controls > :is(.ag-library-tools,.ag-toolbar) {
  gap:6px; margin:0; padding:0; min-height:44px;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench #atlas-gallery .ag-controls :is(#ag-direct-filter,#ag-filter-toggle) {
  min-width:104px;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #atlas-gallery #ag-filter-count:empty {display:none}
html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench #atlas-gallery .ag-result-context {
  order:3; flex-basis:auto; align-self:stretch;
}
@media (max-width:600px) {
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image] #workspace-rail {
    gap:4px 8px!important;
  }
  html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench #atlas-gallery .ag-controls > :is(.ag-library-tools,.ag-toolbar) {
    gap:4px;
  }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav #image-desktop-tools-toggle {display:none}
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav #image-benchmark-focus {
    width:auto; min-width:80px; padding:0 8px; font-size:12px; white-space:nowrap;
  }
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav #image-benchmark-focus::before {
    content:''; width:14px; height:14px;
  }
}

html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #image-work-nav :is(#image-work-record,#image-tool-library-toggle) {
  min-width:54px; box-sizing:border-box;
}
@media (max-width:360px) {
  html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench #atlas-gallery .ag-controls #ag-search-toggle {width:44px}
  html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench #atlas-gallery .ag-controls :is(#ag-direct-filter,#ag-filter-toggle) {min-width:96px}
  html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench #atlas-gallery .ag-controls :is(#ag-direct-display,#ag-display > summary) {width:56px}
  html[data-image-workspace-ready=true] body[data-workspace-app=image][data-image-work-screen=gallery] #image-workbench #atlas-gallery .ag-controls #ag-view-toggle {
    margin-inline-start:0; padding-inline:6px;
  }
}

body[data-workspace-app=image].image-work-focus #image-workbench #image-work-nav #image-benchmark-focus:not([hidden]) {
  width:auto; min-width:44px; padding-inline:10px; font-size:12px; white-space:nowrap;
}

/* One selected case compares models at a single generation condition. */
#benchmark-port .benchmark-case-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 12px;
  border-bottom: 1px solid var(--workspace-line);
}
#benchmark-port .benchmark-case-controls h3 {
  flex-basis: 100%;
  margin: 0;
}
#benchmark-port .benchmark-case-controls p,
#benchmark-port .benchmark-case-card h4 { margin: 0; }
#benchmark-port .benchmark-case-controls label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
#benchmark-port .benchmark-case-controls select { max-width: 100%; }
#benchmark-port .benchmark-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr));
  gap: 12px;
  max-width: 1120px;
  padding: 12px;
}
#benchmark-port .benchmark-case-card {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
#benchmark-port .benchmark-case-card .benchmark-image { width: 100%; }
#benchmark-port .benchmark-case-card .benchmark-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}
#benchmark-explore .benchmark-explore-list > li { padding-bottom: 6px; }
#benchmark-explore .benchmark-explore-list details li { border: 0; }
#benchmark-explore .benchmark-explore-list details {
  padding-inline: 4px;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  #benchmark-port .benchmark-case-grid {
    grid-template-columns: repeat(auto-fit,minmax(min(100%,148px),1fr));
    gap: 8px;
    padding: 8px;
  }
}

/* Public library display settings sit in the document flow below the toolbar. */
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #atlas-gallery #ag-public-display-settings {
  position:static; inset:auto; width:100%; max-width:100%; box-sizing:border-box;
  margin:8px 0 12px; box-shadow:none; z-index:auto;
  grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #atlas-gallery #ag-public-display-settings[hidden] {display:none}

body[data-workspace-app=image][data-workspace-audience=public] #atlas-gallery .ag-case-description {
  margin:0; font-size:.875rem; color:var(--workspace-muted,var(--workspace-ink));
  line-height:1.45; overflow-wrap:anywhere;
}

/* Public comparison selection uses the page for vertical movement. */
body[data-workspace-audience=public][data-image-work-screen=benchmark]:has(#benchmark-explore:not([hidden],.benchmark-explore-comparison) .benchmark-public-selection) #image-workbench {
  height:auto; min-height:0; display:block;
}
body[data-workspace-audience=public][data-image-work-screen=benchmark]:has(#benchmark-explore:not([hidden],.benchmark-explore-comparison) .benchmark-public-selection) #benchmark-explore {
  height:auto; max-height:none; overflow:visible; min-width:0;
}
.benchmark-public-selection {display:grid;grid-template-columns:minmax(240px, 320px) minmax(0,1fr);gap:20px;align-items:start}
.benchmark-public-selection.benchmark-selection-folded {grid-template-columns:minmax(0,1fr)}
.benchmark-selection-tree,.benchmark-selection-workspace {min-width:0}
.benchmark-selection-tree input[type=search] {width:100%; box-sizing:border-box}
.benchmark-tree-branch {display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px;align-items:start;margin-block:5px}
.benchmark-tree-branch>input,.benchmark-tree-leaves input {margin:8px 0 0;inline-size:18px;block-size:18px}
.benchmark-tree-branch summary {cursor:pointer;padding:5px 2px;overflow-wrap:anywhere}
.benchmark-tree-leaves {padding:0;margin:0}
.benchmark-tree-leaves>li {display:grid;grid-template-columns:auto minmax(0,1fr);gap:2px 8px;padding:5px 0;overflow-wrap:anywhere}
.benchmark-tree-description {grid-column:2;line-height:1.35}
.benchmark-selection-actions {display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.benchmark-selection-actions button,.benchmark-selection-tree button {min-height:44px}
body[data-benchmark-embed=true] #workspace-rail,
body[data-benchmark-embed=true] .image-task-header,
body[data-benchmark-embed=true] #benchmark-return-explore {display:none!important}
body[data-benchmark-embed=true] #image-workbench {display:block;height:auto;min-height:0;padding:8px}
body[data-benchmark-embed=true] #benchmark-port {height:auto;max-height:none;overflow-x:auto;overflow-y:visible}
@media(max-width:740px){.benchmark-public-selection{grid-template-columns:minmax(0,1fr)}}

@media(min-width:900px) {
  .benchmark-selection-tree {position:sticky; top:72px; max-height:calc(100dvh - 90px); overflow:auto; scrollbar-width:thin;}
}

body[data-workspace-app=image] #image-workbench:has(#benchmark-explore:not([hidden]).benchmark-explore-comparison) {
  padding-inline:clamp(4px, 1vw, 12px);
}
body[data-workspace-app=image] #image-workbench #benchmark-panel:has(> #benchmark-explore:not([hidden]).benchmark-explore-comparison) {
  padding-inline:4px;
}
body[data-workspace-app=image] #image-workbench #benchmark-explore.benchmark-explore-comparison {
  flex:0 0 auto;
  padding:0 4px;
  overflow:visible;
}
.benchmark-selection-summary {display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; margin-block-end:8px}
#benchmark-explore .benchmark-selection-summary p {margin:0}
#benchmark-selection-toggle {min-height:40px}
.benchmark-explore-comparison .benchmark-public-selection {display:flex; flex-direction:column; gap:0; align-items:stretch}
.benchmark-explore-comparison .benchmark-selection-summary {margin-block-end:0}
.benchmark-explore-comparison .benchmark-selection-actions {margin:6px 0}
.benchmark-explore-comparison .benchmark-selection-tree {position:static; max-height:min(33dvh, 18rem); overflow:auto}
#benchmark-port .benchmark-matrix-source {display:block; margin-block-start:2px; font-weight:400; color:var(--workspace-muted)}

html[data-image-initial-chrome] body[data-workspace-app=image] > header.media-app-header { display:none!important; }
html[data-image-initial-chrome] body[data-workspace-app=image] > main { visibility:hidden; }
#atlas-initial-status { margin:16px; color:var(--workspace-muted); }

/* JOB-5642: public comparison table image frame. Default is a 1:1 frame with the long side contained; data-image-fit=original keeps each image's own ratio. */
body[data-workspace-app=image] #image-workbench #benchmark-port table .benchmark-image img { width:100%; height:auto!important; aspect-ratio:1 / 1; object-fit:contain; }
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #benchmark-port[data-image-fit=original] table .benchmark-image img { aspect-ratio:auto; height:auto!important; }

/* Public Image Atlas: one global line and one persistent work toolbar. */
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=public] #workspace-rail {
  position:relative!important;inset:auto!important;
  display:flex!important;flex-wrap:nowrap;align-items:center;gap:clamp(4px,1vw,14px);
  padding:4px clamp(6px,1.6vw,24px);
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=public] #workspace-rail .image-work-areas {
  display:flex;flex-wrap:nowrap;gap:3px;padding:0;margin:0;
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=public] #workspace-rail .image-work-areas a {
  white-space:nowrap;padding-inline:clamp(6px,1vw,12px);
}
body[data-workspace-audience=public] #workspace-rail :is(#image-work-record,[data-atlas-public-record]) {
  margin-inline-start:auto;white-space:nowrap;font-size:12px;text-decoration:none;
  color:var(--workspace-muted);padding:10px 4px;
}
body[data-workspace-audience=public] #workspace-rail #workspace-theme-menu { margin-inline-start:0; }
body[data-workspace-audience=public][data-image-work-screen=benchmark][data-atlas-matrix-scrolled=true] #workspace-rail:not(:focus-within) {
  position:absolute!important;clip-path:inset(50%);pointer-events:none;
}
body[data-workspace-audience=public] #image-workbench :is(#image-benchmark-focus,[data-benchmark-explore]) {display:none!important}
body[data-workspace-audience=public]:is([data-image-work-screen=gallery],[data-image-work-screen=benchmark]) #image-workbench > .image-task-header {
  position:absolute!important;clip-path:inset(50%);height:1px!important;min-height:0!important;padding:0!important;overflow:hidden;
}
body[data-workspace-audience=public] #image-workbench #atlas-gallery > .ag-toolbar[data-public-compact] {
  position:sticky;top:0;z-index:15;display:flex;align-items:center;flex-wrap:wrap;
  gap:6px;padding:4px 0;margin:0;background:var(--workspace-bg,var(--workspace-panel));
}
body[data-workspace-audience=public] #image-workbench #atlas-gallery > .ag-toolbar .ag-pages {
  display:flex;align-items:center;gap:4px;margin-inline-start:auto;
}
body[data-workspace-audience=public] #image-workbench #atlas-gallery .ag-result-bar:empty {display:none}
body[data-workspace-audience=public] #image-workbench #atlas-gallery #ag-search-toggle {display:none!important}
body[data-workspace-audience=public] #atlas-gallery #ag-filters :is(.ag-album-options,#ag-date-filter) {display:none}
body[data-workspace-audience=public] #atlas-gallery #ag-field-options > details:has(> summary[data-filter-key]:is([data-filter-key=model],[data-filter-key=lora],[data-filter-key=source],[data-filter-key=release],[data-filter-key=author],[data-filter-key=job])) {display:none}
body[data-workspace-audience=public] #image-workbench #atlas-gallery #ag-filters #ag-pending {position:sticky;bottom:0;background:var(--workspace-panel);padding:8px 0}
body[data-workspace-audience=public] #image-workbench #benchmark-panel .atlas-public-bench-tools:not([hidden]) {
  position:sticky;top:0;display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;
  z-index:15;gap:5px;padding:4px 0;margin:0;background:var(--workspace-panel);
}
body[data-workspace-audience=public] #image-workbench .atlas-public-bench-tools .benchmark-condition-summary,
body[data-workspace-audience=public] #image-workbench .atlas-public-secondary-field {display:none!important}
body[data-workspace-audience=public] #image-workbench .atlas-public-bench-pages {
  margin-inline-start:auto;display:flex;align-items:center;flex-wrap:nowrap;gap:4px;
}
body[data-workspace-audience=public] #image-workbench .atlas-public-bench-pages #benchmark-page-status {white-space:nowrap;font-size:12px}
body[data-workspace-audience=public] #image-workbench .atlas-public-bench-pages #benchmark-page {width:3.5em}
body[data-workspace-audience=public] #image-workbench .atlas-public-bench-pages .atlas-public-page-jump {font-size:0}
body[data-workspace-audience=public] #image-workbench #benchmark-panel .benchmark-footer {display:none!important}
body[data-workspace-audience=public] #image-workbench .benchmark-explore-comparison .benchmark-selection-summary {display:none!important}
body[data-workspace-audience=public] #image-workbench .benchmark-explore-comparison .benchmark-selection-folded {display:none!important}
body[data-workspace-audience=public] #image-workbench :is(#ag-filters,#ag-public-display-settings,.benchmark-disclosure > .benchmark-popup-body,.benchmark-explore-comparison .benchmark-public-selection):not([hidden]) {
  position:fixed!important;inset:var(--atlas-panel-top,65px) 8px auto auto!important;
  width:min(460px,calc(100vw - 16px))!important;
  max-height:var(--atlas-panel-height,calc(100dvh - 74px))!important;
  overflow:auto;overscroll-behavior:contain;z-index:80;box-sizing:border-box;
  padding:14px;border:1px solid var(--workspace-line);border-radius:12px;
  color:var(--workspace-ink);background:var(--workspace-panel,#fff);
  box-shadow:0 8px 28px #0003;
}
body[data-workspace-audience=public] #image-workbench .benchmark-explore-comparison .benchmark-selection-tree {
  max-height:none;overflow:visible;
}
body[data-workspace-audience=public] #image-workbench .benchmark-explore-comparison .benchmark-selection-actions:not([hidden]) {
  position:sticky;bottom:-14px;background:var(--workspace-panel);padding:8px 0;margin:0;
}
body[data-workspace-audience=public] #image-workbench .history-group {
  color:var(--workspace-ink);background:var(--workspace-soft,var(--workspace-panel));
}
@media(max-width:600px){
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=public] #workspace-rail .workspace-home svg{display:none}
  html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=public] #workspace-rail .workspace-home {font-size:11px}
  body[data-workspace-audience=public] #image-workbench .atlas-public-bench-tools :is(button,summary,a),
  body[data-workspace-audience=public] #image-workbench #atlas-gallery > .ag-toolbar[data-public-compact] :is(button,summary) {padding-inline:7px}
  body[data-workspace-audience=public] #image-workbench .atlas-public-bench-pages #benchmark-page-status {font-size:10px}
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=public] #workspace-rail {
  justify-content:flex-start!important;min-height:0;height:auto!important;
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=public] #workspace-rail #workspace-theme-menu {
  margin-inline-start:0!important;
}
body[data-workspace-audience=public] #image-workbench .atlas-public-bench-pages #benchmark-page {
  font-size:14px;width:3.4em;padding-inline:6px;
}

body[data-workspace-audience=private] #workspace-rail [data-atlas-public-record] {display:none}
body[data-workspace-audience=public] #image-workbench #benchmark-port .atlas-topic-column {
  border-inline-start:2px solid var(--workspace-muted);
}
body[data-workspace-audience=public] #image-workbench #benchmark-port .atlas-topic-row {
  border-block-start:2px solid var(--workspace-muted);
}

/* Shared controls on the two public Image Atlas screens. */
body[data-workspace-app=image][data-workspace-audience=public] :is(
  #atlas-gallery > .ag-toolbar[data-public-compact],
  #benchmark-panel .atlas-public-bench-tools:not([hidden])
) { align-items:center; gap:6px; }

body[data-workspace-app=image][data-workspace-audience=public] :is(
  #atlas-gallery > .ag-toolbar[data-public-compact],
  #benchmark-panel .atlas-public-bench-tools:not([hidden])
) > details { margin:0; padding:0; border:0; align-self:center; }

body[data-workspace-app=image][data-workspace-audience=public] #image-workbench [data-atlas-public-tool] {
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:44px;
  margin:0;
  padding:0 9px;
  border:1px solid var(--workspace-line);
  border-radius:8px;
  background:var(--workspace-panel);
  color:var(--workspace-ink);
  line-height:1.2;
  white-space:nowrap;
  list-style:none;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench [data-atlas-public-tool][aria-expanded=true] {
  color:var(--workspace-accent);border-color:currentColor;background:var(--workspace-tint);
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench [data-atlas-public-tool]::-webkit-details-marker {display:none}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench [data-atlas-public-tool]::after {content:none}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench [data-atlas-public-tool] > svg {display:none}
body[data-workspace-app=image][data-workspace-audience=public] :is(
  #image-workbench [data-atlas-public-tool],
  #workspace-rail .image-work-areas a:is([data-work-area=library],[data-work-area=benchmark])
)::before {
  content:"";
  display:inline-block;
  width:16px;
  height:16px;
  flex:none;
  background:currentColor;
  mask:var(--atlas-public-icon) center / contain no-repeat;
}
body[data-workspace-audience=public] [data-atlas-public-tool=filter] {
  --atlas-public-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 5h18l-7 8v5l-4 2v-7z'/%3E%3C/svg%3E");
}
body[data-workspace-audience=public] [data-atlas-public-tool=sort] {
  --atlas-public-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 5v14m-3-3 3 3 3-3m3-10h10m-10 6h7m-7 6h4'/%3E%3C/svg%3E");
}
body[data-workspace-audience=public] :is([data-atlas-public-tool=display],[data-work-area=benchmark]) {
  --atlas-public-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18m-12 0v10'/%3E%3C/svg%3E");
}
body[data-workspace-audience=public] [data-atlas-public-tool=explore] {
  --atlas-public-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4v14h4M5 8h4m0-3h10v5H9zm0 10h10v5H9z'/%3E%3C/svg%3E");
}
body[data-workspace-audience=public] [data-work-area=library] {
  --atlas-public-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='m4 17 5-5 4 4 3-3 4 4M8 9h.1'/%3E%3C/svg%3E");
}

html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image][data-workspace-audience=public] #workspace-rail :is(
  .workspace-home, .image-work-areas a, #image-work-record, [data-atlas-public-record], #workspace-theme-menu > summary
) {
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:44px;
  line-height:1.2;
  padding-block:0;
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=public] #workspace-rail .image-work-areas a[hidden] {display:none}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=public] #workspace-theme-menu > summary {list-style:none;cursor:pointer}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=public] #workspace-theme-menu > summary::-webkit-details-marker {display:none}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench :is(
  #ag-filters,#ag-public-sort-settings,#ag-public-display-settings,#ag-public-explore-settings,
  .benchmark-disclosure > .benchmark-popup-body,.benchmark-explore-comparison .benchmark-public-selection
):not([hidden]) {
  position:fixed!important;
  inset:var(--atlas-panel-top,65px) auto auto var(--atlas-panel-left,8px)!important;
  width:min(460px,var(--atlas-panel-viewport-width,calc(100vw - 16px)))!important;
  max-height:var(--atlas-panel-height,calc(100dvh - 74px))!important;
  min-height:0!important;
  margin:0!important;
  box-sizing:border-box;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  z-index:80;
  padding:14px;
  color:var(--workspace-ink);
  background:var(--workspace-panel);
  border:1px solid var(--workspace-line);
  border-radius:12px;
  box-shadow:0 8px 28px #0003;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench :is(
  #ag-public-sort-settings,#ag-public-display-settings,#benchmark-sort-menu-body,#benchmark-settings-body
):not([hidden]) {width:min(320px,var(--atlas-panel-viewport-width,calc(100vw - 16px)))!important}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #ag-filters .ag-choices {max-height:none;overflow:visible}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #ag-sort > span {display:none}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #ag-sort .ag-choices {display:grid;gap:6px}

body[data-workspace-app=image][data-workspace-audience=public] #atlas-gallery #ag-grid > .ag-card {
  padding:0;overflow:hidden;
}
body[data-workspace-app=image][data-workspace-audience=public] #atlas-gallery #ag-grid > .ag-card > .ag-photo {
  border:0;padding:0;border-radius:0;box-shadow:none;
}
body[data-workspace-app=image][data-workspace-audience=public] #atlas-gallery #ag-grid > .ag-card > .ag-photo:focus-visible {
  outline:2px solid var(--workspace-accent);outline-offset:-3px;
}
body[data-workspace-app=image][data-workspace-audience=public] #atlas-gallery #ag-grid > .ag-card > :not(.ag-photo) {
  margin-inline:9px;
}
body[data-workspace-app=image][data-workspace-audience=public] #atlas-gallery #ag-grid > .ag-card > :last-child:not(.ag-photo) {
  margin-block-end:9px;
}
body[data-workspace-app=image][data-workspace-audience=public] #atlas-gallery[data-card-information=images] #ag-grid > .ag-card > :not(.ag-photo) {
  display:none!important;
}
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-app=image][data-workspace-audience=public] #workspace-rail > #workspace-theme-menu {margin-block:0}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #benchmark-panel .atlas-public-bench-tools > details {
  flex:0 0 auto;
  width:auto;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench :is(
  #benchmark-panel .atlas-public-bench-tools,
  #atlas-gallery > .ag-toolbar[data-public-compact]
) [data-atlas-public-tool] {
  width:auto;
  min-width:44px;
  min-height:44px;
  padding:0 9px;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #benchmark-panel .atlas-public-bench-tools summary[data-atlas-public-tool]::after {content:none}
@media(max-width:360px){
  body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #benchmark-panel .atlas-public-bench-tools [data-atlas-public-tool] {padding-inline:7px}
}

body[data-workspace-app=image][data-workspace-audience=public] #image-workbench :is(
  #atlas-gallery > .ag-toolbar[data-public-compact] .ag-pages,
  #benchmark-panel .atlas-public-bench-tools .atlas-public-bench-pages
) {
  flex:0 0 auto;
  justify-content:flex-start;
  margin-inline:0;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #ag-public-explore-settings:not([hidden]) {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:0;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench :is(
  #ag-public-explore-settings,.benchmark-explore-comparison .benchmark-public-selection
) .benchmark-selection-tree {
  position:static;
  max-height:none;
  overflow:visible;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench :is(
  #ag-public-explore-settings,.benchmark-explore-comparison .benchmark-public-selection
) .benchmark-selection-actions:not([hidden]) {
  position:sticky;
  bottom:-14px;
  flex-wrap:wrap;
  padding:8px 0;
  margin:0;
  background:var(--workspace-panel);
  z-index:1;
}
body[data-workspace-app=image][data-workspace-audience=public] .benchmark-tree-leaves label {cursor:pointer}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #atlas-gallery #ag-filters .ag-public-taxonomy .ag-explorer {
  border:0;
  padding:0;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench #atlas-gallery #ag-filters .ag-explorer-nodes {
  max-height:none;
  overflow:visible;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench :is(
  #ag-public-sort-settings,#ag-public-display-settings,#benchmark-filter-body,#benchmark-sort-menu-body,#benchmark-settings-body
) label {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:5px;
  align-items:start;
  width:100%;
  margin-block:0 9px;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench :is(
  #ag-public-sort-settings,#ag-public-display-settings,#benchmark-filter-body,#benchmark-sort-menu-body,#benchmark-settings-body
) label :is(select,input[type=search]) {
  width:100%;
  min-width:0;
  min-height:44px;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench :is(#ag-filters,#benchmark-filter-body) details > summary {
  display:flex;
  align-items:center;
  min-height:44px;
  font-weight:600;
  gap:7px;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench :is(#ag-filters,#benchmark-filter-body) details > summary::before {
  content:'';
  width:7px;height:7px;
  border:solid currentColor;border-width:1px 1px 0 0;
  transform:rotate(45deg);
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench :is(#ag-filters,#benchmark-filter-body) details[open] > summary::before {transform:rotate(135deg)}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench :is(#ag-filters,#benchmark-filter-body) details > summary::-webkit-details-marker {display:none}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench .atlas-public-case-tree .benchmark-tree-branch > details > summary {
  display:flex;
  align-items:center;
  gap:8px;
  list-style:none;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench .atlas-public-case-tree .benchmark-tree-branch > details > summary::-webkit-details-marker {display:none}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench .atlas-public-case-tree .benchmark-tree-branch > details > summary::before {
  content:'';
  width:7px;height:7px;
  border:solid currentColor;border-width:1px 1px 0 0;
  transform:rotate(45deg);
  flex:none;
}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench .atlas-public-case-tree .benchmark-tree-branch > details[open] > summary::before {transform:rotate(135deg)}
body[data-workspace-app=image][data-workspace-audience=public] #image-workbench .atlas-public-case-tree input[type=checkbox] {
  inline-size:18px;
  block-size:18px;
}

html[data-image-workspace-ready=true] body[data-workspace-app=image]:not(.image-work-focus):not(.image-benchmark-focus) #workspace-rail {
  display:flex!important; align-items:center; flex-wrap:nowrap; gap:4px 6px!important; min-height:38px;
  padding:3px 8px!important;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #workspace-rail .workspace-home {
  flex:none; min-height:30px; margin:0; padding:0; font-size:12px; gap:4px;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #workspace-rail .workspace-home svg {width:1em;height:1em}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #workspace-rail .image-work-areas {
  flex:1 1 auto; display:flex; flex-wrap:nowrap; margin:0; padding:0; min-width:0; gap:2px;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #workspace-rail :is(.image-work-areas a,.image-work-areas summary,#image-work-record,#image-theme-menu>summary) {
  width:auto; min-width:0; min-height:32px; padding:3px 6px; font-size:12px; white-space:nowrap;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #workspace-rail :is(#image-work-record,[data-atlas-public-record]) {margin-inline-start:auto}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-toolbar[data-public-compact] {
  display:flex; flex-wrap:nowrap; align-items:center; gap:4px; min-height:0; width:100%; box-sizing:border-box;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-toolbar[data-public-compact] :is(button,summary) {
  min-height:32px; min-width:0; width:auto; padding:3px 7px; gap:4px; font-size:12px;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-toolbar[data-public-compact] .ag-pages {
  margin-inline-start:auto; min-width:0; flex-wrap:nowrap; justify-content:flex-end; gap:3px;
}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-toolbar[data-public-compact] :is(button,summary)::before {
  width:1em;height:1em;
}
body[data-workspace-audience=public] #atlas-gallery .atlas-public-display-sort {display:grid;gap:4px;margin-bottom:8px}
body[data-workspace-audience=public] #image-workbench .atlas-public-bench-tools :is(summary,button) {min-width:0;min-height:32px;width:auto;padding:3px 6px;font-size:12px}
body[data-workspace-audience=public] #image-workbench .atlas-public-bench-tools .atlas-public-bench-pages {margin-inline-start:auto;gap:3px}
@media(pointer:coarse){
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #image-workbench #atlas-gallery .ag-toolbar[data-public-compact] :is(button,summary),
  html[data-image-workspace-ready=true] body[data-workspace-app=image] #workspace-rail :is(.image-work-areas a,.image-work-areas summary,#image-work-record,#image-theme-menu>summary) {min-height:40px}
}

html[data-image-workspace-ready=true] body[data-workspace-app=image] #workspace-rail > :is(#image-work-record,[data-atlas-public-record]) {order:1}
html[data-image-workspace-ready=true] body[data-workspace-app=image] #workspace-rail > :is(#image-theme-menu,#workspace-theme-menu) {order:2}

/* Guide link in the public main bar: icon like the other work areas. */
body[data-workspace-app=image][data-workspace-audience=public] #workspace-rail .image-work-areas a.image-guide-link::before {
  content:"";display:inline-block;width:16px;height:16px;flex:none;background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3H20v15H6.5A2.5 2.5 0 0 0 4 20.5zM4 20.5A2.5 2.5 0 0 0 6.5 23H20v-5M9 8h7m-7 4h5'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Same item width whether selected or not, so items do not shift between pages. */
html:is([data-image-workspace-ready=true],[data-image-initial-chrome]) body[data-workspace-audience=public] #workspace-rail .image-work-areas a:not([aria-current]) {border:1px solid transparent}

/* JOB-5767: public benchmark multi-select facets (axis OR, cross-axis AND). */
#benchmark-panel .benchmark-axis-query{display:grid;gap:5px;margin:0 0 10px;font-size:13px;min-width:0}
#benchmark-panel .benchmark-axis-query>input{width:100%;min-height:44px;box-sizing:border-box}
#benchmark-panel .benchmark-facet-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 10px;padding:0 0 8px;border-bottom:1px solid var(--workspace-line,#e3ddd2);min-width:0}
#benchmark-panel .benchmark-facet-chips[hidden]{display:none}
#benchmark-panel .benchmark-facet-chips-label{font-size:12px;color:var(--workspace-muted,#6b6f76)}
#benchmark-panel .benchmark-facet-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;min-height:44px;padding:6px 12px;border:1px solid var(--workspace-line,#e3ddd2);border-radius:999px;background:var(--workspace-panel,#fffdf8);color:var(--workspace-ink,#202532);font:inherit;font-size:12px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
#benchmark-panel .benchmark-facet-chip:hover{border-color:var(--workspace-accent,#a2673a)}
#benchmark-panel .benchmark-facet-chip-x{opacity:.6;font-size:13px}
#benchmark-panel .benchmark-facet-group{min-width:0;max-width:100%;margin:0 0 8px;border:1px solid var(--workspace-line,#e3ddd2);border-radius:8px;background:var(--workspace-panel,#fffdf8)}
#benchmark-panel .benchmark-facet-group[hidden]{display:none}
#benchmark-panel .benchmark-facet-group-head{display:flex;align-items:center;gap:4px;min-width:0}
#benchmark-panel .benchmark-facet-toggle{flex:1 1 auto;display:flex;align-items:center;gap:6px;min-width:0;min-height:44px;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;font-size:13px;text-align:start;cursor:pointer}
#benchmark-panel .benchmark-facet-toggle:before{content:'▸';flex:none;font-size:11px;color:var(--workspace-muted,#6b6f76)}
#benchmark-panel .benchmark-facet-toggle[aria-expanded=true]:before{content:'▾'}
#benchmark-panel .benchmark-facet-toggle:focus-visible{outline:2px solid var(--workspace-accent,#a2673a);outline-offset:-2px}
#benchmark-panel .benchmark-facet-label{font-weight:600;overflow-wrap:anywhere;min-width:0}
#benchmark-panel .benchmark-facet-tally{flex:none;color:var(--workspace-accent,#a2673a);font-weight:600;font-variant-numeric:tabular-nums}
#benchmark-panel .benchmark-facet-clear{flex:none;min-height:44px;padding:0 10px;border:0;background:transparent;color:var(--workspace-muted,#6b6f76);font:inherit;font-size:12px;text-decoration:underline;cursor:pointer}
#benchmark-panel .benchmark-facet-clear[hidden]{display:none}
#benchmark-panel .benchmark-facet-clear:hover{color:var(--workspace-accent,#a2673a)}
#benchmark-panel .benchmark-facet-body{min-width:0;max-width:100%;padding:0 10px 10px}
#benchmark-panel .benchmark-facet-body[hidden]{display:none}
#benchmark-panel .benchmark-facet-search{width:100%;min-height:44px;box-sizing:border-box;margin:0 0 6px;font:inherit;font-size:13px}
#benchmark-panel .benchmark-facet-search[hidden]{display:none}
#benchmark-panel .benchmark-facet-options{display:grid;grid-template-columns:minmax(0,1fr);gap:2px;max-height:min(38vh,320px);overflow:auto;overscroll-behavior:contain;min-width:0}
#benchmark-panel .benchmark-facet-option{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;min-height:44px;min-width:0;padding:2px 4px;border-radius:6px;font-size:13px;line-height:1.35;cursor:pointer}
#benchmark-panel .benchmark-facet-option[hidden]{display:none}
#benchmark-panel .benchmark-facet-option:hover{background:#00000008}
#benchmark-panel .benchmark-facet-option.is-selected{background:#a2673a14}
#benchmark-panel .benchmark-facet-option.is-empty{opacity:.45}
#benchmark-panel .benchmark-facet-option>input{flex:none;width:18px;height:18px;margin:0;accent-color:var(--workspace-accent,#a2673a)}
#benchmark-panel .benchmark-facet-option-label{min-width:0;overflow-wrap:anywhere}
#benchmark-panel .benchmark-facet-option-count{flex:none;color:var(--workspace-muted,#6b6f76);font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
#benchmark-panel .benchmark-facet-hint{margin:8px 0 0;font-size:11px;line-height:1.5;color:var(--workspace-muted,#6b6f76)}
@media (pointer:coarse){#benchmark-panel .benchmark-facet-option>input{width:22px;height:22px}}
@media (max-width:520px){
  #benchmark-panel .benchmark-facet-option-label{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  #benchmark-panel .benchmark-facet-options{max-height:min(46vh,360px)}
}
