/* Scoped Photos layout; originals remain accessible on demand. */
.photos-section .gallery,#anatomy-aperture[data-section="photos"] .gallery{width:min(100%,780px);margin-inline:auto;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.photos-section .gallery .photo,#anatomy-aperture[data-section="photos"] .gallery .photo{width:100%;min-width:0;aspect-ratio:3/4}
.photos-section .gallery .photo>img,#anatomy-aperture[data-section="photos"] .gallery .photo>img{display:block;width:100%;height:100%;object-fit:cover}
.photos-section .mounted-photo-viewer,#anatomy-aperture[data-section="photos"] .mounted-photo-viewer{width:min(100%,780px);margin-inline:auto}
.photos-section .mounted-photo-viewer>img,#anatomy-aperture[data-section="photos"] .mounted-photo-viewer>img{height:auto;width:auto;max-width:100%;min-height:0;max-height:clamp(104px,calc(100svh - var(--anatomy-height,222px) - 235px - var(--player-space,0px)),390px);object-fit:contain;margin-inline:auto}
.mounted-photo-viewer .mounted-photo-original{display:inline-flex;justify-content:center;align-items:center;min-height:44px;padding:4px 12px;text-decoration:underline;text-underline-offset:.16em}
#lightbox{width:min(820px,92vw)}
#lightbox-image{width:auto;height:auto;max-height:min(55svh,390px);max-width:100%;object-fit:contain}
@media(max-width:700px){
 .photos-section .gallery,#anatomy-aperture[data-section="photos"] .gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
 .photos-section .mounted-photo-viewer>img,#anatomy-aperture[data-section="photos"] .mounted-photo-viewer>img{max-height:clamp(104px,calc(100svh - var(--anatomy-height,160px) - 230px - var(--player-space,0px)),310px)}
 #lightbox-image{max-height:min(48svh,310px)}
}
