/* Quiet photo grid, using the wedding site's existing colors and type. */
.gallery-section{padding-top:clamp(2rem,5vw,4rem);padding-bottom:clamp(4rem,7vw,7rem)}
.gallery-heading{text-align:center;max-width:42rem;margin:0 auto 2.5rem}
.gallery-heading h2{margin-bottom:1rem}
.gallery-heading>p:last-child{color:var(--muted);margin-bottom:0}
.gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(.8rem,2vw,1.5rem);list-style:none;padding:0;margin:0}
.gallery-item{min-width:0;margin:0}
.gallery-item[hidden],.gallery-more[hidden]{display:none}
.gallery-photo{display:block;padding:.45rem;background:var(--white);border:1px solid #cbd9c580;border-radius:.3rem;box-shadow:0 4px 14px #123f350a;transition:box-shadow .2s,border-color .2s}
.gallery-photo:hover{border-color:#8baa83;box-shadow:0 7px 20px #123f3518}
.gallery-photo img{width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;border-radius:.1rem}
.gallery-photo:focus-visible{outline-offset:4px}
.gallery-more{display:flex;margin:2rem auto 0;background:transparent;color:var(--ink)}
.gallery-more:hover{background:#e7efdc}
.gallery-status{color:var(--muted);font-size:.875rem;text-align:center;margin:1.25rem 0 0}
html.gallery-open{overflow:hidden}
.photo-viewer{width:calc(100% - 2rem);max-width:75rem;height:min(56rem,calc(100vh - 2rem));height:min(56rem,calc(100dvh - 2rem));max-height:calc(100dvh - 2rem);margin:auto;padding:1rem 1.5rem;border:1px solid var(--line);border-radius:.5rem;background:var(--paper);color:var(--ink);overflow-y:auto;box-shadow:0 20px 80px #001c1959}
.photo-viewer[open]{display:flex;flex-direction:column;gap:.75rem}
.photo-viewer::backdrop{background:#071f1be6}
.photo-viewer-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0;padding:0;border:0}
.photo-viewer-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex:0 0 auto}
.photo-viewer-count{font-size:.875rem;margin:0;color:var(--muted)}
.photo-viewer-close{min-width:5rem;min-height:44px;padding:.5rem .75rem;border:1px solid var(--line);border-radius:.25rem;background:var(--paper);color:var(--ink);cursor:pointer}
.photo-viewer-close:hover{background:#e7efdc}
.photo-viewer-stage{position:relative;display:flex;align-items:center;justify-content:center;flex:1 1 auto;min-height:0;min-width:0}
.photo-viewer-image{width:100%;height:100%;object-fit:contain}
.photo-viewer-loading{position:absolute;inset:auto 1rem;max-width:30rem;margin:auto;padding:.5rem .75rem;background:var(--paper);text-align:center;font-size:.875rem;border-radius:.25rem;pointer-events:none}
.photo-viewer-loading:empty{display:none}
.photo-viewer-caption{flex:0 0 auto;margin:0;font-size:.875rem;line-height:1.5;text-align:center;overflow-wrap:anywhere}
.photo-viewer-caption:empty{display:none}
.photo-viewer-controls{display:flex;flex:0 0 auto;align-items:center;justify-content:center;gap:1rem}
.photo-viewer-controls button{min-width:7rem;min-height:48px;padding:.6rem 1rem;border:1px solid var(--green);border-radius:2rem;background:transparent;color:var(--ink);cursor:pointer;font:500 .875rem/1.5 var(--sans)}
.photo-viewer-controls button:hover:not(:disabled){background:#e7efdc}
.photo-viewer-controls button:disabled{opacity:.4;cursor:default}
.photo-viewer-fallback{font-size:.875rem;text-align:center;text-decoration:underline;text-underline-offset:4px;min-height:44px;align-content:center}
.photo-viewer-fallback[hidden]{display:none}
@media(max-width:42rem){
 .gallery-heading{margin-bottom:1.75rem}
 .gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
 .gallery-photo{padding:.3rem}
 .gallery-more{width:100%;max-width:20rem;margin-top:1.5rem}
 .photo-viewer{width:100%;max-width:none;height:100vh;height:100dvh;max-height:100dvh;border:0;border-radius:0;padding:max(.75rem,env(safe-area-inset-top)) max(.75rem,env(safe-area-inset-right)) max(.75rem,env(safe-area-inset-bottom)) max(.75rem,env(safe-area-inset-left))}
 .photo-viewer-caption{font-size:.8125rem}
 .photo-viewer-controls{gap:.75rem}
 .photo-viewer-controls button{flex:1;max-width:12rem}
}
@media(prefers-reduced-motion:reduce){.gallery-photo{transition:none}}
