/* A saved admin frame always has the same square geometry in public views. */
.saved-frame{display:block;aspect-ratio:1;overflow:hidden;background:#171715;border-radius:6px;flex-shrink:0}
.saved-frame>img{display:block;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;aspect-ratio:1;border-radius:0!important}
.lightbox .lightbox-content>.saved-frame{width:min(80vw,60svh,640px);margin-inline:auto}
#photo-open.saved-frame{width:min(100%,72svh);margin-inline:auto}
#photo-viewer>.saved-frame{width:min(100%,calc(100svh - 110px));margin:auto}
.admin-saved-frame{width:min(100%,280px);margin-bottom:20px}

/* Opened photographs keep their source proportions, independently of collection crops. */
.lightbox,#photo-viewer{background:#000!important}
.lightbox .lightbox-content{max-height:calc(100svh - 40px)!important;gap:10px;padding:4px 0 12px!important}
.lightbox .lightbox-content>img.original-photo{aspect-ratio:auto!important;object-fit:contain!important;object-position:50% 50%!important;width:auto!important;height:auto!important;max-width:90vw!important;max-height:min(70svh,max(100px,calc(100svh - 240px)))!important;background:#000;flex-shrink:0}
.lightbox .product-details{max-height:16svh;overflow-y:auto;flex-shrink:0}
.lightbox .lightbox-inquiry,.lightbox .lightbox-product-link{flex-shrink:0}
#photo-open:not(.saved-frame) .product-image{aspect-ratio:auto!important;width:auto!important;height:auto!important;max-width:100%;max-height:72svh;object-fit:contain!important;background:#000}
#photo-viewer>img{aspect-ratio:auto!important;object-fit:contain!important;object-position:50% 50%!important;width:auto!important;height:auto!important;background:#000}
