/* The photograph keeps its full frame; controls never sit on top of it. */
html.gallery-open{overflow:hidden}
.lightbox.gallery-lightbox{box-sizing:border-box;width:min(1120px,calc(100vw - 48px));max-width:none;height:min(900px,90svh);max-height:calc(100svh - 32px);padding:0;border:1px solid #faf8f333;border-radius:12px;background:var(--night);color:var(--white);overflow:hidden}
.gallery-lightbox[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.gallery-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 16px}
.gallery-count{font-size:13px;font-variant-numeric:tabular-nums;letter-spacing:.08em}
.gallery-lightbox .lightbox-close{position:static;float:none;margin-left:auto;min-width:88px;min-height:44px;padding:10px 16px;border-radius:6px;background:var(--white);color:var(--night);font-size:13px}
.gallery-stage{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;align-items:center;gap:12px;min-height:0;padding:0 16px}
.gallery-stage.is-single{grid-template-columns:minmax(0,1fr)}
.gallery-image-wrap{display:grid;place-items:center;min-width:0;height:100%;min-height:0;overflow:hidden}
.gallery-lightbox [data-gallery-image]{width:100%;height:100%;min-height:0;max-width:100%;max-height:100%;object-fit:contain;margin:0}
.gallery-arrow{display:grid;place-items:center;width:52px;height:52px;padding:0;border:1px solid #faf8f380;border-radius:6px;background:transparent;color:var(--white);font-size:27px;line-height:1;transition:background-color .15s,color .15s}
.gallery-arrow:hover:not(:disabled){background:var(--white);color:var(--night)}
.gallery-arrow:disabled{opacity:.32;cursor:default}
.gallery-lightbox button:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.gallery-lightbox .gallery-caption{max-height:20svh;overflow:auto;overflow-wrap:anywhere;margin:0;padding:16px 80px 20px;font-size:13px;line-height:1.6;color:var(--white)}
.gallery-lightbox .gallery-error{margin:0;padding:20px;text-align:center;font-size:14px;line-height:1.6;color:var(--white)}
.gallery-lightbox .gallery-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:600px){
 .lightbox.gallery-lightbox{width:calc(100vw - 16px);height:90svh;max-height:calc(100svh - 16px);border-radius:10px}
 .gallery-toolbar{padding:10px 12px}
 .gallery-stage{grid-template-columns:48px minmax(0,1fr) 48px;grid-template-rows:minmax(0,1fr) 48px;gap:10px 8px;padding:0 12px}
 .gallery-stage .gallery-image-wrap{grid-column:1/-1;grid-row:1}
 .gallery-stage [data-gallery-prev]{grid-column:1;grid-row:2}
 .gallery-stage [data-gallery-next]{grid-column:3;grid-row:2}
 .gallery-stage.is-single{grid-template-rows:minmax(0,1fr)}
 .gallery-arrow{width:48px;height:48px;font-size:25px}
 .gallery-lightbox .gallery-caption{padding:14px 16px 18px;font-size:12px}
}
@media(prefers-reduced-motion:reduce){.gallery-arrow{transition:none}}
