.photo-gallery { margin-top:clamp(1.4rem,3vw,3rem); }
.gallery-head { display:flex; align-items:flex-end; flex-wrap:wrap; justify-content:space-between; gap:.6rem 1.5rem; margin-bottom:clamp(1.1rem,2vw,2rem); padding-bottom:1rem; border-bottom:1px solid var(--line); }
.gallery-head::before { content:""; width:100%; height:4px; background:linear-gradient(to right,var(--coral) 2.75rem,transparent 2.75rem); margin-bottom:.25rem; }
.gallery-head h1 { margin:0; font:590 clamp(2.45rem,4.8vw,5rem)/1.08 var(--display); }
.gallery-head p { margin:0; color:var(--muted); font-size:.9rem; font-variant-numeric:tabular-nums; }
.gallery-albums { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:clamp(1.15rem,2.8vw,2.8rem) clamp(.8rem,1.6vw,1.6rem); }
.gallery-albums article { grid-column:span 4; min-width:0; }
.gallery-albums article:nth-child(-n+2),.gallery-albums article:nth-last-child(-n+2) { grid-column:span 6; }
.gallery-thumb { position:relative; display:block; overflow:hidden; background:var(--wash); cursor:zoom-in; }
.gallery-thumb img { display:block; width:100%; height:100%; object-fit:cover; }
.gallery-albums .gallery-thumb { aspect-ratio:2.05; }
.gallery-album-link { display:block; padding:.65rem .1rem .15rem; color:var(--ink); text-decoration:none; }
.gallery-album-link > svg[aria-hidden="true"] { display:none; }
.gallery-album-link h2 { margin:0; font:540 clamp(1.3rem,2vw,2.2rem)/1.16 var(--display); }
.gallery-album-link small { color:var(--muted); }
.gallery-album-link:is(:hover,:focus-visible) h2 { color:var(--teal); }
.gallery-expand { position:absolute; bottom:.55rem; right:.55rem; display:grid; place-items:center; width:2rem; height:2rem; border-radius:3px; background:#06252bd9; color:white; pointer-events:none; }
.gallery-expand .icon { width:1.1rem; height:1.1rem; }
@media(hover:hover) { .gallery-expand { opacity:0; } .gallery-thumb:is(:hover,:focus-visible) .gallery-expand { opacity:1; } }
@media(prefers-reduced-motion:no-preference) {
  .gallery-thumb img,.gallery-expand { transition:transform .22s ease-out,opacity .16s ease; }
  .gallery-thumb:is(:hover,:focus-visible) img { transform:scale(1.025); }
}
.gallery-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:clamp(.4rem,1vw,1rem); }
.gallery-grid .gallery-thumb { aspect-ratio:1.5; }
.gallery-detail { text-align:center; margin:1rem auto 2rem; }
.gallery-detail img { max-height:70vh; }
.gallery-detail nav { display:flex; flex-wrap:wrap; gap:1rem; justify-content:center; }
.gallery-viewer { position:fixed; inset:0; margin:0; border:0; width:100%; height:100%; height:100dvh; max-width:none; max-height:none; padding: max(.8rem,env(safe-area-inset-top)) max(1rem,env(safe-area-inset-right)) max(.8rem,env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left)); background:#0a1c20; color:#fff; overflow:hidden; }
.gallery-viewer[open] { display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:.7rem; }
.gallery-viewer::backdrop { background:#0a1c20; }
.page-scroll:has(.gallery-viewer[open]) { overflow:hidden; }
.gallery-viewer header { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.gallery-viewer header > div { display:flex; align-items:baseline; gap:.45rem 1rem; flex-wrap:wrap; }
.gallery-viewer header h2 { color:white; font:550 clamp(1.35rem,2.5vw,2.2rem)/1.15 var(--display); margin:0; }
.viewer-count { font-size:.85rem; color:#cbdbd7; font-variant-numeric:tabular-nums; }
.gallery-viewer button { display:grid; place-items:center; padding:0; width:2.9rem; height:2.9rem; min-width:44px; min-height:44px; background:transparent; color:white; border:1px solid #64807d; border-radius:.25rem; cursor:pointer; }
.gallery-viewer button:hover { background:#224146; }
.gallery-viewer button:focus-visible { outline:2px solid var(--coral); outline-offset:2px; }
.gallery-viewer button .icon { width:1.3rem; height:1.3rem; }
.viewer-stage { display:grid; place-items:center; min-width:0; min-height:0; touch-action:pan-y pinch-zoom; user-select:none; }
.viewer-image { display:block; width:100%; height:100%; min-height:0; min-width:0; object-fit:contain; }
.viewer-tools,.viewer-film { display:flex; align-items:center; justify-content:center; }
.viewer-tools { gap:clamp(.45rem,1.5vw,1.4rem); }
.viewer-tools [data-step="-1"] .icon { transform:rotate(180deg); }
.viewer-film { gap:.3rem; min-width:0; }
.viewer-film button { position:relative; border:0; border-radius:0; height:clamp(44px,4.6vw,4rem); width:clamp(44px,6vw,6.5rem); min-width:0; }
.viewer-film img { display:block; width:100%; height:100%; object-fit:cover; opacity:.6; }
.viewer-film button[aria-current]::after { content:""; position:absolute; inset:0; border:3px solid var(--coral); }
.viewer-film button:is(:hover,[aria-current]) img { opacity:1; }
@media(max-width:900px) { .gallery-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:650px) {
  .gallery-albums { grid-template-columns:1fr; }
  .gallery-albums article:nth-child(n) { grid-column:auto; }
  .gallery-albums .gallery-thumb { aspect-ratio:1.9; }
  .gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gallery-viewer { padding-inline:max(.5rem,env(safe-area-inset-left)); }
  .gallery-viewer header > div { display:grid; gap:.2rem; }
  .viewer-film { flex:0 1 auto; }
}
