.gallery-grid img[data-full],.mosaic img[data-full]{cursor:zoom-in}.gallery-grid img[data-full]:focus-visible,.mosaic img[data-full]:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.photo-viewer{position:fixed;inset:0;margin:0;width:100%;height:100%;max-width:none;max-height:none;border:0;padding:64px 65px 28px;background:rgba(12,10,8,.97);color:#fff;box-sizing:border-box}.photo-viewer::backdrop{background:#0c0a08}.photo-viewer[open]{display:flex;align-items:center;justify-content:center}.viewer-stage{margin:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-width:0}.viewer-stage img{max-width:100%;max-height:calc(100% - 80px);width:auto;height:auto;object-fit:contain}.viewer-stage img[hidden]{display:none}.viewer-stage figcaption{font-size:calc(15px * var(--font-scale,1));line-height:1.4;text-align:center;max-width:900px;overflow:auto;max-height:65px}.viewer-status{font-size:calc(15px * var(--font-scale,1));text-align:center}.viewer-status:empty{display:none}.photo-viewer button{position:absolute;border:1px solid #ffffff60;background:#201b17d9;color:#fff;border-radius:50%;width:48px;height:48px;display:flex;align-items:center;justify-content:center;cursor:pointer;font:38px/1 Arial,sans-serif;padding:0}.photo-viewer button[hidden]{display:none}.photo-viewer button:focus-visible{outline:3px solid #fff;outline-offset:3px}.viewer-close{right:16px;top:12px}.viewer-prev{left:10px;top:calc(50% - 24px)}.viewer-next{right:10px;top:calc(50% - 24px)}@media(max-width:600px){.photo-viewer{padding:70px 12px 85px}.photo-viewer .viewer-prev{top:auto;bottom:14px;left:calc(50% - 62px)}.photo-viewer .viewer-next{top:auto;bottom:14px;right:calc(50% - 62px)}}

.photo-viewer .viewer-play{position:absolute;top:18px;left:18px;z-index:3;border:1px solid rgba(255,255,255,.55);border-radius:4px;background:rgba(0,0,0,.55);color:#fff;padding:12px 20px;min-height:48px;font:400 17px/1.2 Arial,sans-serif;cursor:pointer}
.photo-viewer .viewer-play:focus-visible{outline:3px solid #fff;outline-offset:4px}
.photo-viewer .viewer-play[hidden]{display:none}

.photo-viewer .viewer-play{width:auto;height:auto;min-width:120px;min-height:48px;font-size:16px;white-space:nowrap}
.photo-viewer .viewer-fullscreen{top:12px;right:78px;width:48px;height:48px;font-size:26px}
.photo-viewer:fullscreen{background:#0c0a08}
@media(min-width:1600px){.photo-viewer button{width:64px;height:64px}.photo-viewer .viewer-play{font-size:22px;min-height:64px}.photo-viewer .viewer-fullscreen{right:94px;min-width:64px;min-height:64px}.viewer-stage figcaption{font-size:22px;max-width:1400px}}

/* Background switch stays beside full screen and close, including on phones. */
.photo-viewer .viewer-background{top:12px;right:140px;width:48px;height:48px;font-size:27px}
.photo-viewer[data-background="dark"],.photo-viewer[data-background="dark"]:fullscreen{background:#0c0a08;color:#fff}
.photo-viewer[data-background="light"],.photo-viewer[data-background="light"]:fullscreen{background:#fff;color:#171717}
.photo-viewer[data-background="light"]::backdrop{background:#fff}
.photo-viewer[data-background="light"] button{background:#f4f4f4;color:#171717;border-color:#707070}
.photo-viewer[data-background="light"] button:focus-visible{outline-color:#171717}
.photo-viewer[data-background="light"] .viewer-stage figcaption,.photo-viewer[data-background="light"] .viewer-status{color:#171717}
@media(max-width:600px){
 .photo-viewer .viewer-background,.photo-viewer .viewer-fullscreen,.photo-viewer .viewer-close{top:12px;width:42px;height:42px}
 .photo-viewer .viewer-close{right:12px}.photo-viewer .viewer-fullscreen{right:64px}.photo-viewer .viewer-background{right:116px}
 .photo-viewer .viewer-play{top:12px;left:10px;min-width:84px;min-height:42px;padding:10px;font-size:14px}
}
@media(min-width:1600px){.photo-viewer .viewer-background{right:174px;width:64px;height:64px;font-size:32px}}

/* A separate filmstrip keeps the full photograph above the thumbnails. */
.photo-viewer{padding-bottom:118px}
.photo-viewer .viewer-thumbnails{position:absolute;left:65px;right:65px;bottom:12px;height:86px;display:flex;align-items:center;gap:2px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x;scrollbar-width:thin;scrollbar-color:#888 transparent;padding:4px;box-sizing:border-box}
.photo-viewer .viewer-thumbnails[hidden]{display:none}
.photo-viewer .viewer-thumbnails .viewer-thumbnail{position:relative;inset:auto;display:block;flex:0 0 auto;width:auto;height:auto;min-width:0;min-height:0;border:0;border-radius:0;background:transparent;padding:0;opacity:.55;overflow:hidden}
.photo-viewer .viewer-thumbnails .viewer-thumbnail img{display:block;width:auto;height:66px;max-width:none;max-height:none;object-fit:contain;pointer-events:none}
.photo-viewer .viewer-thumbnails .viewer-thumbnail:hover{opacity:1}
.photo-viewer .viewer-thumbnails .viewer-thumbnail.is-active{opacity:1;outline:2px solid #fff;outline-offset:-2px}
.photo-viewer[data-background="light"] .viewer-thumbnails .viewer-thumbnail.is-active{outline-color:#171717}
.photo-viewer .viewer-thumbnails .viewer-thumbnail:focus-visible{outline-offset:-4px}
@media(max-width:600px){
 .photo-viewer{padding-bottom:164px}
 .photo-viewer .viewer-thumbnails{left:10px;right:10px;bottom:74px;height:74px;gap:2px}
 .photo-viewer .viewer-thumbnails .viewer-thumbnail img{height:54px}
}
@media(min-width:1600px){
 .photo-viewer{padding-bottom:152px}
 .photo-viewer .viewer-thumbnails{height:118px;left:90px;right:90px}
 .photo-viewer .viewer-thumbnails .viewer-thumbnail img{height:94px}
}

/* Use the browser viewport even when the Fullscreen API is unavailable. */
.photo-viewer.viewer-large{padding:0;width:100%;height:100%;height:100dvh;overflow:hidden}
.photo-viewer.viewer-large .viewer-stage{position:relative;gap:0}
.photo-viewer.viewer-large .viewer-stage img{display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain}
.photo-viewer.viewer-large .viewer-stage img[hidden],
.photo-viewer.viewer-large .viewer-stage figcaption,
.photo-viewer.viewer-large .viewer-thumbnails{display:none}
.photo-viewer.viewer-large>button{z-index:4}

.photo-viewer .viewer-stage img{cursor:zoom-in}
.photo-viewer .viewer-stage img:focus-visible{outline:3px solid var(--accent,#fff);outline-offset:-4px}
.photo-viewer.viewer-zoomed .viewer-stage{
 display:block;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;
}
.photo-viewer.viewer-zoomed .viewer-stage img{
 width:var(--viewer-zoom-width);height:var(--viewer-zoom-height);max-width:none;max-height:none;
 margin-inline:auto;cursor:zoom-out;
}

.photo-viewer[data-background="dark"],.photo-viewer[data-background="dark"]:fullscreen{background:var(--viewer-custom-surface,#0c0a08);color:var(--viewer-custom-ink,#fff)}
.photo-viewer[data-background="light"],.photo-viewer[data-background="light"]:fullscreen{background:var(--viewer-custom-surface,#fff);color:var(--viewer-custom-ink,#171717)}
.photo-viewer[data-background="light"] .viewer-stage figcaption,.photo-viewer[data-background="light"] .viewer-status{color:var(--viewer-custom-ink,#171717)}


/* Photo position remains visible with the filmstrip hidden or the image enlarged. */
.photo-viewer>.viewer-counter{position:absolute;top:18px;left:50%;transform:translateX(-50%);z-index:5;display:block;padding:7px 14px;border-radius:5px;background:rgba(0,0,0,.7);color:#fff;font:500 16px/1.3 Arial,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap;pointer-events:none}
@media(max-width:600px){.photo-viewer>.viewer-counter{top:66px;font-size:14px;padding:5px 10px}}
@media(min-width:1600px){.photo-viewer>.viewer-counter{top:24px;font-size:20px}}
