@layer components {
.gallery{display:grid;gap:var(--s-3)}
.gallery__stage{position:relative;background:var(--sand)}
.gallery__track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain}
.gallery__track::-webkit-scrollbar{display:none}
.gallery__track:focus-visible{outline:2px solid var(--gold-ink);outline-offset:-4px}
.gallery__slide{flex:none;width:100%;scroll-snap-align:center;aspect-ratio:4/5}
.gallery__slide img{width:100%;height:100%;object-fit:cover}
.gallery__zoom{position:absolute;right:var(--s-3);bottom:var(--s-3);display:grid;place-items:center;background:var(--paper);border-radius:var(--pill);font-size:1.25rem}
.gallery__count{position:absolute;left:var(--s-3);bottom:var(--s-3);padding:2px var(--s-3);background:var(--paper);font-size:var(--small)}
.gallery__count:empty{display:none}
.gallery__thumbs{display:flex;gap:var(--s-2);overflow-x:auto;scrollbar-width:none}
.gallery__thumb{flex:none;width:64px;height:80px;min-height:0;min-width:0;padding:0;border:1px solid var(--hairline);background:var(--sand);opacity:.7}
.gallery__thumb[aria-current=true]{opacity:1;border-color:var(--ink)}
.gallery__thumb img{width:100%;height:100%;object-fit:cover}
.gallery__viewer{width:min(96vw,900px);max-height:96dvh;padding:var(--s-3);background:var(--paper)}
.gallery__viewer img{width:100%;max-height:84dvh;object-fit:contain}
.gallery__viewer-nav{display:flex;justify-content:space-between;font-size:var(--h3)}
@media(min-width:1024px){.gallery__thumb{width:80px;height:100px}}
}
