.gallery-page { --gallery-gap: 6px; }
.gallery-nav { display:flex; gap:clamp(.8rem,3vw,2rem); align-items:center; font-size:.85rem; }
.gallery-nav [aria-current] { color:var(--color-accent); }
.gallery-intro { max-width:1600px; margin:auto; padding:clamp(2rem,5vw,4.5rem) clamp(1rem,3vw,3rem) 2rem; display:flex; align-items:end; justify-content:space-between; gap:2rem; }
.gallery-intro h1 { font-family:var(--font-display); font-size:clamp(2.6rem,6vw,5.5rem); font-weight:500; line-height:1.1; margin:0 0 1rem; }
.gallery-intro p { color:var(--color-text-muted); max-width:48ch; }
.gallery-total { color:var(--color-accent); white-space:nowrap; font-size:.85rem; padding-bottom:.2rem; }
.gallery-toolbar { display:flex; justify-content:space-between; gap:1rem; margin:0 clamp(1rem,3vw,3rem) 1rem; border-top:1px solid var(--color-border); padding-top:1rem; font-size:.8rem; }
.gallery-toolbar span { color:var(--color-text-muted); }
.photo-wall { margin:0 var(--gallery-gap); }
.photo-row { display:flex; gap:var(--gallery-gap); margin-bottom:var(--gallery-gap); }
.photo-link { display:block; position:relative; overflow:hidden; background:var(--color-surface); min-width:0; }
.photo-link img { display:block; width:100%; height:100%; object-fit:cover; transition:filter .2s; }
.photo-link:hover img { filter:brightness(1.12); }
.gallery-page a:focus-visible,.gallery-page button:focus-visible { outline:3px solid var(--color-accent); outline-offset:3px; z-index:1; }
.gallery-more { text-align:center; padding:2rem 1rem 3rem; }
.gallery-more p { color:var(--color-text-muted); font-size:.85rem; margin-bottom:1rem; }
.gallery-footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:1rem; padding:2rem clamp(1rem,3vw,3rem); border-top:1px solid var(--color-border); font-size:.8rem; }
.gallery-skip { position:fixed; top:-100px; left:1rem; z-index:200; background:var(--color-bg); padding:1rem; }
.gallery-skip:focus { top:1rem; }
#photo-viewer { position:fixed; inset:0; width:100%; height:100%; max-width:none; max-height:none; border:0; padding:0; margin:0; background:#09090c; color:var(--color-text); }
#photo-viewer::backdrop { background:#09090c; }
#photo-viewer button { color:inherit; background:#22222bd9; border:1px solid #555562; border-radius:5px; cursor:pointer; min-height:44px; padding:.5rem 1rem; font:inherit; }
.viewer-bar { position:absolute; top:0; left:0; right:0; z-index:2; display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1rem; background:linear-gradient(#09090c,transparent); font-size:.85rem; }
.viewer-bar>div { display:flex; gap:.5rem; }
#photo-stage { position:absolute; inset:76px 64px 48px; display:flex; align-items:center; justify-content:center; overflow:auto; touch-action:pan-y pinch-zoom; }
#viewer-image { display:block; max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; }
#photo-stage.zoomed { display:block; touch-action:pan-x pan-y pinch-zoom; }
#photo-stage.zoomed img { max-width:none; max-height:none; width:auto; height:auto; margin:auto; }
.viewer-arrow { position:absolute; top:50%; transform:translateY(-50%); font-size:2rem!important; padding:0!important; width:44px; }
.viewer-prev { left:10px; }.viewer-next { right:10px; }
.viewer-hint { position:absolute; bottom:12px; width:100%; text-align:center; color:#b7b7c7; font-size:.75rem; pointer-events:none; }
#viewer-error { position:absolute; top:45%; left:20%; right:20%; text-align:center; }
@media(max-width:600px) { .gallery-intro { display:block; }.gallery-total { display:block; margin-top:1.25rem; }.gallery-nav a:first-child { display:none; }.gallery-toolbar { font-size:.7rem; }#photo-stage { inset:76px 8px 70px; }.viewer-arrow { top:auto; bottom:8px; transform:none; z-index:3; }.viewer-hint { bottom:24px; font-size:.65rem; }.viewer-bar { padding:.6rem; } }
@media(prefers-reduced-motion:reduce) { .photo-link img { transition:none; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
