html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
#gallery-viewer { border: 0; padding: 0; background: #141414; color: white; max-width: 100vw; }
#gallery-viewer::backdrop { background: rgba(0, 0, 0, .9); }
#gallery-viewer img { display: block; max-width: 94vw; max-height: 88vh; object-fit: contain; }
#gallery-viewer button, #gallery-viewer output { position: absolute; background: #222c; color: white; border: 0; }
#gallery-viewer button { width: 44px; height: 44px; font-size: 28px; line-height: 1; cursor: pointer; }
#gallery-viewer [data-action=close] { right: 0; top: 0; z-index: 1; }
#gallery-viewer [data-action=previous] { left: 0; top: 50%; transform: translateY(-50%); }
#gallery-viewer [data-action=next] { right: 0; top: 50%; transform: translateY(-50%); }
#gallery-viewer output { bottom: 0; left: 0; padding: .2rem .5rem; }
