/* Scoped to image pages; never changes video output selectors. */
#output-area:has(.image-results:not([hidden])) { display:block; padding:12px; min-height:0; overflow:hidden; }
.image-results { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; width:100%; min-width:0; max-height:min(65vh,720px); overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; align-content:start; box-sizing:border-box; }
.image-results:not([data-count="1"]) { grid-template-columns:repeat(2,minmax(0,1fr)); }
.image-results[hidden], .image-results [hidden] { display:none!important; }
.image-results__item { margin:0; min-width:0; padding:0; border:1px solid #b9aaa0; background:#fffaf5; color:#38281f; overflow:hidden; }
.image-results__view, .image-preview__media { background-color:#fff; background-image:conic-gradient(#ddd 25%,transparent 0 50%,#ddd 0 75%,transparent 0); background-size:20px 20px; }
.image-results__view { display:grid; place-items:center; width:100%; height:auto; aspect-ratio:1; padding:0; border:0; cursor:zoom-in; overflow:hidden; color:#38281f; }
.image-results__view:disabled { cursor:default; }
.image-results .image-results__view img { display:block; width:100%; height:100%; max-height:100%; object-fit:contain; }
.image-results__caption { padding:6px 8px; font-size:12px; overflow-wrap:anywhere; min-height:3em; }
.image-results__actions { display:flex; gap:6px; padding:0 8px 8px; }
.image-results__button { border:1px solid #967d6e; padding:7px 12px; background:#fffaf5; color:#38281f; font:inherit; font-size:14px; cursor:pointer; border-radius:4px; }
.image-results__button:disabled { opacity:.5; cursor:default; }
.image-results button:focus-visible, .image-preview button:focus-visible { outline:3px solid #bc4826; outline-offset:-3px; }
.image-preview { max-width:none; max-height:none; width:100vw; height:100dvh; margin:0; padding:clamp(12px,3vw,36px); border:0; box-sizing:border-box; background:transparent; color:#fff; }
.image-preview::backdrop { background:rgba(0,0,0,.85); }
.image-preview[open] { display:flex; align-items:center; justify-content:center; }
.image-preview__panel { display:flex; flex-direction:column; width:min(1200px,100%); max-height:100%; min-height:0; gap:12px; }
.image-preview__media { display:grid; place-items:center; height:calc(100dvh - 160px); min-height:100px; overflow:hidden; color:#38281f; }
.image-preview__media img { width:100%; height:100%; object-fit:contain; min-height:0; }
.image-preview__bar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:center; }
.image-preview__count { min-width:60px; text-align:center; }
@media(max-width:640px) { #output-area:has(.image-results:not([hidden])) { padding:6px; } .image-results { gap:6px; max-height:60vh; } .image-results__caption { padding:4px; } .image-results__actions { padding:0 4px 4px; } .image-results__button { padding:7px 9px; } }
