/* Fixed media frames: image dimensions never determine the page layout. */
.cover-link{aspect-ratio:16/9;isolation:isolate}
.cover-link>img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center}
.main-photo-button{aspect-ratio:16/9;isolation:isolate}
.main-photo-button>.main-photo{position:absolute;inset:0;width:100%;height:100%;max-width:none;aspect-ratio:auto;object-fit:cover;object-position:center}
.photo-thumbs{display:flex;align-items:flex-start;gap:8px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scrollbar-width:thin;padding:3px 2px 8px;margin:8px -2px 0}
.photo-thumbs>button{position:relative;flex:0 0 calc((100% - 40px)/6);aspect-ratio:16/9;min-width:0;min-height:0;padding:0;overflow:hidden;background:#e8eeea;border-radius:3px;scroll-snap-align:start}
.photo-thumbs>button>img{position:absolute;inset:0;width:100%;height:100%;max-width:none;aspect-ratio:auto;object-fit:cover;object-position:center}
.photo-thumbs>button:focus-visible{outline-offset:0}
.photo-thumbs .photo-kind{position:absolute;inset:auto 0 0;background:rgba(0,0,0,.7);color:#fff;padding:4px;font-size:10px;line-height:1.2;pointer-events:none}
.purchase-visual>img,.compare-cover{height:auto;aspect-ratio:16/9;object-fit:cover}
.media-unavailable{position:absolute;inset:0;display:grid;place-content:center;gap:8px;padding:20px;background:#e8eeea;color:#52646a;text-align:center;font-size:13px;line-height:1.6}
.media-unavailable[hidden]{display:none}
.main-photo-button .media-unavailable{left:0;bottom:0;background:#e8eeea;color:#52646a;padding:30px;font-size:14px;border-radius:0}
#gallery{height:100dvh;max-height:100dvh;overflow:hidden;background:#172127}
#gallery[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.gallery-head{min-height:64px;padding:10px 20px;gap:15px;padding-top:max(10px,env(safe-area-inset-top))}
.gallery-head>span{min-width:0;line-height:1.45;font-size:15px}
.gallery-head>button{flex-shrink:0}
.gallery-stage{position:relative;display:block;width:100%;height:100%;min-height:0;overflow:hidden;background:#172127}
.gallery-stage>img{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;object-position:center;transition:opacity .15s}
.gallery-stage[data-loading=true]>img{opacity:0}
.gallery-stage>button{position:absolute;top:50%;transform:translateY(-50%);left:14px;right:auto;width:46px;height:54px;min-height:54px;z-index:2;background:#17212799;color:#fff;border:1px solid #ffffff66;border-radius:4px;font-size:36px;line-height:1}
.gallery-stage>button:last-of-type{left:auto;right:14px}
.gallery-status{position:absolute;inset:0;display:grid;place-content:center;text-align:center;padding:45px 60px;color:#d0dcdf;font-size:14px;line-height:1.7}
.gallery-status[hidden]{display:none}
.gallery-status button{position:static;transform:none;width:auto;height:auto;min-height:44px;background:transparent;border:1px solid #ffffff80;border-radius:3px;padding:8px 15px;color:#fff;font-size:14px;margin:15px auto 0}
.gallery-caption{min-height:46px;padding:12px 20px max(12px,env(safe-area-inset-bottom));font-size:12px;line-height:1.5;color:#c7d3d6}
.gallery-stage[data-loading=true] .gallery-status{pointer-events:none}
@media(max-width:760px){
 .photo-thumbs{gap:8px;padding-bottom:7px}
 .photo-thumbs>button{flex-basis:calc((100% - 24px)/4)}
 .gallery-head{padding-left:14px;padding-right:14px;min-height:60px}
 .gallery-head>span{font-size:13px}
 .gallery-head>button{font-size:13px;min-height:44px}
 .gallery-stage>button{left:8px;width:44px;min-height:48px;height:48px;font-size:30px}
 .gallery-stage>button:last-of-type{right:8px}
 .gallery-caption{font-size:11px}
}
@media(prefers-reduced-motion:reduce){.gallery-stage>img{transition:none}}

/* The same full-bleed frame on cards, detail previews and comparison views.
   The fullscreen viewer above retains the complete uncropped source photograph. */
[data-cover-id]{object-fit:cover;object-position:center}
