/* Asset dialogs use the Studio theme at every depth. Older asset components
   still consume --bg/--text/--accent; bridge them here rather than hard-coding
   a second light/dark palette. Explicit surfaces below replace legacy rgba
   black backgrounds that cannot be corrected by token inheritance alone. */
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) {
  --bg:var(--studio-bg); --bg-2:var(--studio-soft); --panel:var(--studio-surface);
  --surface:var(--studio-surface); --text:var(--studio-text); --sub:var(--studio-sub);
  --muted:var(--studio-muted); --line:var(--studio-line); --line-2:var(--studio-strong-line);
  --accent:var(--studio-accent); --green:var(--studio-success); --amber:var(--studio-warning);
  position:fixed; inset:auto!important; left:50%!important; top:50%!important;
  width:min(1160px,calc(100vw - 64px))!important; max-width:calc(100vw - 64px)!important;
  height:min(900px,calc(100dvh - 64px))!important; max-height:calc(100dvh - 64px)!important;
  border:1px solid var(--studio-line)!important; border-radius:20px!important;
  background:var(--studio-surface)!important; color:var(--studio-text)!important;
  box-shadow:var(--studio-shadow)!important; backdrop-filter:none!important;
  overflow:hidden!important; transform:translate(-50%,-48%) scale(.985)!important; opacity:0;
  transition:opacity .16s ease,transform .16s ease!important;
}
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer).open { transform:translate(-50%,-50%) scale(1)!important; opacity:1; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer)>.drawer-head { flex:0 0 72px; min-height:72px!important; padding:16px 24px!important; gap:16px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer)>.drawer-head #drawerTitle { margin-right:auto; font-size:20px!important; min-width:0; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer)>.drawer-head .asset-dialog-back { padding:7px 10px!important; background:var(--studio-soft)!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer .asset-dialog-back[hidden] { display:none!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer)>.drawer-body { min-height:0; padding:24px!important; background:var(--studio-surface)!important; color:var(--studio-text)!important; overscroll-behavior:contain; scrollbar-gutter:stable; animation:none; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) [hidden] { display:none!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(.detail-block,.asset-detail-unified-editor,.asset-detail-advanced) { background:var(--studio-surface)!important; border-color:var(--studio-line)!important; margin-bottom:0!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(.detail-media,.asset-prompt-text,.asset-bound-person-row,.asset-editor-image-row>img,.asset-detail-primary-preview,.asset-detail-angle-thumb,.asset-source-grid>button,.asset-save-result,.asset-multi-person-list label) { background:var(--studio-soft)!important; border-color:var(--studio-line)!important; color:var(--studio-text)!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-prompt-text { font-size:13px; padding:16px; line-height:1.9; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail { gap:18px; padding-bottom:0; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-overview { gap:20px; grid-template-columns:minmax(0,1.35fr) minmax(280px,.8fr); }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-summary { align-self:start; gap:16px; padding:22px!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-summary :is(dt,dd) { font-size:13px; line-height:1.6; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-summary h3 { font-size:22px!important; line-height:1.5; margin:0!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(.asset-detail-kicker,.asset-detail-block-head>div>span,.asset-detail-unified-editor>summary small,.asset-detail-advanced>summary small) { font-size:12px; line-height:1.6; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-images { border:0!important; padding:0!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-primary-preview { height:clamp(240px,36vh,380px)!important; padding:0!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-angle-thumb { padding:0!important; flex:0 0 88px!important; width:88px!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-overview>.detail-media { display:flex; align-items:center; justify-content:center; min-height:180px; border:1px solid var(--studio-line); border-radius:14px; margin:0; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .detail-media :is(img,video) { display:block; max-height:380px; object-fit:contain; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .detail-media audio { width:calc(100% - 32px); }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(.asset-detail-unified-editor>summary,.asset-detail-advanced>summary,.asset-detail-unified-editor-body) { background:var(--studio-surface)!important; color:var(--studio-text); }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(.asset-detail-unified-editor>summary span,.asset-detail-advanced>summary span) { font-size:14px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(.asset-editor-group,.asset-editor-more) { min-width:0; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(.asset-detail-footer-actions,.asset-editor-sticky-actions,.asset-editor-action-dock) { margin:0!important; padding:16px 0!important; border-color:var(--studio-line)!important; background:var(--studio-surface)!important; box-shadow:none!important; backdrop-filter:none!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-footer-actions { bottom:-24px; margin:0 -24px -24px!important; padding:16px 24px!important; gap:8px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer)>.asset-editor-action-dock { padding:14px 24px!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-footer-actions button { min-height:40px!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-block-head { flex-wrap:wrap; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(button,input,select,textarea,summary):focus-visible { outline:2px solid var(--studio-accent)!important; outline-offset:3px; }
/* Relationship view: the selected item, what it uses, then dependent tasks. */
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-shell { gap:24px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-toolbar { padding:0 0 20px; background:transparent; border:0; border-bottom:1px solid var(--studio-line); border-radius:0; gap:24px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-toolbar label { font-size:12px; width:min(480px,60%); min-width:0; gap:8px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-toolbar>span { font-size:12px;line-height:1.6;font-family:inherit; color:var(--studio-muted); }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) #assetRelationshipBody { display:grid; gap:24px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-summary { grid-template-columns:minmax(0,1.6fr) repeat(3,minmax(0,1fr)); gap:0; border:1px solid var(--studio-line); border-radius:12px; overflow:hidden; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-summary>div { padding:16px 20px; background:var(--studio-soft); border:0; border-right:1px solid var(--studio-line); border-radius:0; min-width:0; gap:6px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-summary>div:last-child { border:0; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-summary span { font-size:12px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-summary strong { font-size:18px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-map { grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr); gap:24px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(.asset-relationship-map h3,.asset-relationship-checks h3,.asset-relationship-tasks h3) { color:var(--studio-text); font-size:14px; font-weight:600; margin:0; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-map>section { gap:12px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-node { border:1px solid var(--studio-line); background:var(--studio-surface); border-radius:12px; box-shadow:none; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-node.root { border-color:var(--studio-accent); }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-open { padding:16px!important; border:0!important; background:transparent!important; gap:7px; border-radius:0!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-open:hover { background:var(--studio-soft)!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(.asset-relation-open span,.asset-relation-open small,.asset-relation-node.project span) { font-size:12px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(.asset-relation-open strong,.asset-relation-node.project strong) { font-size:15px; color:var(--studio-text); }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-images { padding:0 16px 16px; gap:8px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-image { border-color:var(--studio-line); background:var(--studio-soft); padding:7px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-image :is(small,b) { font-size:11px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-image.primary b { background:var(--studio-tint); color:var(--studio-accent); }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-voice { margin:0 16px 16px; padding:12px; background:var(--studio-soft); font-size:12px; line-height:1.6; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-voice:is(.mismatch,.unavailable) { color:var(--studio-danger); background:color-mix(in srgb,var(--studio-danger) 8%,var(--studio-surface)); }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-linked { grid-template-columns:76px minmax(0,1fr); gap:12px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-linked>em { font-size:12px; padding:15px 0; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-empty { padding:22px; font-size:13px; background:var(--studio-soft); border-color:var(--studio-line); }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-checks { gap:12px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-checks li { grid-template-columns:76px minmax(0,1fr); padding:12px 14px; background:color-mix(in srgb,var(--studio-success) 7%,var(--studio-surface)); font-size:12px; line-height:1.7; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-checks li.warn { background:color-mix(in srgb,var(--studio-warning) 8%,var(--studio-surface)); }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-tasks { padding:20px; background:var(--studio-soft); border-color:var(--studio-line); border-radius:12px; gap:14px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-tasks-head { align-items:flex-start; flex-wrap:wrap; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-tasks-head span { font-size:12px;line-height:1.6;font-family:inherit; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-task-list { gap:12px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-task { padding:16px 16px 16px 84px!important; background:var(--studio-surface)!important; border-color:var(--studio-line)!important; gap:5px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-task strong { font-size:13px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-task :is(small,em) { font-size:12px; line-height:1.6; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-task-state { font-size:11px; left:12px; top:16px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(.asset-relationship-deletion-note,.asset-relationship-privacy,.asset-relationship-truncated) { padding:0; background:transparent; border:0; font-size:12px; line-height:1.8; color:var(--studio-muted); }
@media(max-width:760px) {
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) { width:calc(100vw - 24px)!important; max-width:calc(100vw - 24px)!important; height:calc(100dvh - 24px)!important; max-height:calc(100dvh - 24px)!important; border-radius:16px!important; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer)>.drawer-head { min-height:62px!important; flex-basis:62px!important; padding:12px 16px!important; gap:10px; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer)>.drawer-head #drawerTitle { font-size:18px!important; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer)>.drawer-body { padding:16px!important; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-overview { grid-template-columns:1fr; gap:16px; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-primary-preview { height:280px!important; aspect-ratio:auto!important; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-summary { padding:16px!important; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-detail-footer-actions { bottom:-16px; margin:0 -16px -16px!important; padding:12px 16px!important; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer)>.asset-editor-action-dock { padding:12px 16px!important; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-toolbar { align-items:flex-start; gap:10px; padding-bottom:16px; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-toolbar label { width:100%; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(.asset-relationship-summary,.asset-relationship-map,.asset-relationship-task-list) { grid-template-columns:1fr; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-summary>div { padding:12px; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-summary>div:first-child { grid-column:1/-1; border:0; border-bottom:1px solid var(--studio-line); }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-summary strong { font-size:16px; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-linked { grid-template-columns:1fr; gap:6px; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relation-linked>em { text-align:left; padding:0; }
 html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) .asset-relationship-tasks { padding:14px; }
}
@media(prefers-reduced-motion:reduce) { html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) { transition:none!important; } }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) :is(.asset-consent,input[type=file]) { background:var(--studio-soft)!important; color:var(--studio-text)!important; border-color:var(--studio-line)!important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog:not(.asset-picker-drawer) input:is([type=checkbox],[type=radio]) { accent-color:var(--studio-primary); background:var(--studio-surface); }
html[data-zq-theme=light] body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog { color-scheme:light; }
html[data-zq-theme=dark] body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog { color-scheme:dark; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer[data-kind=asset-task-detail]>.drawer-body { display:grid; align-content:start; gap:18px; }
/* Audio details need a compact player rather than an empty image-sized stage. */
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog .asset-detail-overview:has(>.detail-media>audio) { grid-template-columns:1fr; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog .asset-detail-overview:has(>.detail-media>audio)>.detail-media { order:2; min-height:100px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog .asset-detail-overview:has(>.detail-media>audio)>.asset-detail-summary { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 16px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog .asset-detail-overview:has(>.detail-media>audio) .asset-detail-summary :is(h3,.asset-detail-kicker) { grid-column:1; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog .asset-detail-overview:has(>.detail-media>audio) .asset-summary-edit { grid-column:2; grid-row:1/3; align-self:center; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog .asset-detail-overview:has(>.detail-media>audio) dl { grid-column:1/-1; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 24px; margin-top:8px; }
@media(max-width:760px) { html body.reference-ui-shell[data-studio-ui] #detailDrawer.studio-asset-dialog .asset-detail-overview:has(>.detail-media>audio) dl { grid-template-columns:1fr; } }

/* A generation can return several images. Detail previews use the original
   preview URLs and retain each image's full frame, without thumbnail hydration. */
html body.reference-ui-shell[data-studio-ui] #detailDrawer .detail-media:has(>.image-output-stack) { background:transparent!important; overflow:visible; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-stack { display:grid; gap:14px; color:var(--studio-text); }
html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-heading strong { font-size:14px; font-weight:600; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-heading>span { color:var(--studio-sub); font-size:12px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-item { min-width:0; overflow:hidden; border:1px solid var(--studio-line); border-radius:12px; background:var(--studio-surface); }
html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-preview { display:flex; width:100%; height:clamp(180px,26vh,280px); align-items:center; justify-content:center; padding:10px!important; margin:0; border:0!important; border-radius:0!important; background:var(--studio-soft)!important; cursor:zoom-in; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-preview img { display:block; width:100%; height:100%; max-height:100%; object-fit:contain; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-preview:focus-visible { outline:2px solid var(--studio-accent)!important; outline-offset:-3px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:6px 12px; border-top:1px solid var(--studio-line); color:var(--studio-sub); font-size:12px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-download { padding:6px 10px!important; min-height:32px; border:0!important; background:transparent!important; color:var(--studio-accent)!important; font-size:12px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-download:hover { background:var(--studio-soft)!important; }
@media(max-width:520px) {
  html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-grid { grid-template-columns:1fr; gap:12px; }
  html body.reference-ui-shell[data-studio-ui] #detailDrawer .image-output-preview { height:260px; }
}
