/* Stable, same-origin photographs with a phone-friendly, accessible viewer. */
.page-galleries .ah-photo-link { background: #e8e5db; }
.page-galleries .ah-photo-img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.ah-lightbox { box-sizing: border-box; width: min(1240px, 96vw); height: min(920px, 94dvh); max-width: 96vw; max-height: 94dvh; margin: auto; padding: 18px; border: 1px solid #59604e; background: #182013; color: #f7f4ec; }
.ah-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; }
.ah-lightbox::backdrop { background: #080c05ed; }
.ah-lightbox-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ah-lightbox-caption { font-size: 14px; line-height: 1.5; margin: 0; }
.ah-lightbox button { font: inherit; color: inherit; cursor: pointer; border: 1px solid #ffffff55; background: #ffffff12; min-width: 48px; min-height: 46px; padding: 8px 14px; }
.ah-lightbox button:focus-visible { outline: 2px solid #f7f4ec; outline-offset: 3px; }
.ah-lightbox-close { flex: none; }
.ah-lightbox-stage { min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ah-lightbox-stage img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; touch-action: pinch-zoom; }
.ah-lightbox-controls { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 12px; align-items: center; text-align: center; }
.ah-lightbox-count { font-size: 13px; margin: 0; }
.ah-lightbox-status { font-size: 11px; line-height: 1.4; opacity: .85; margin: 3px 0 0; min-height: 16px; }
@media(max-width:600px) { .ah-lightbox { padding: 10px; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: none; gap: 8px; } .ah-lightbox-caption { font-size: 12px; } .ah-lightbox-close { font-size: 12px !important; } }
