/* Shared photo lightbox (sites/_tools/lightbox). Works in light and dark mode: the viewer is always a dark stage. */
.lb{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:rgba(8,10,12,.94);color:#fff;overscroll-behavior:contain}
.lb::backdrop{background:rgba(8,10,12,.94)}
.lb[open]{display:grid;grid-template-rows:auto 1fr auto}
.lb-top{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;font:500 15px/1.3 system-ui,sans-serif}
.lb-stage{position:relative;display:grid;place-items:center;min-height:0;padding:0 8px;touch-action:pan-y}
.lb-img{max-width:100%;max-height:calc(100vh - 140px);max-height:calc(100dvh - 140px);object-fit:contain;border-radius:6px;user-select:none;-webkit-user-drag:none}
.lb-cap{margin:0;padding:10px 16px 16px;text-align:center;font:15px/1.4 system-ui,sans-serif;color:#e6e6e6;min-height:1.4em}
.lb button{display:inline-grid;place-items:center;width:46px;height:46px;padding:0;border:1px solid rgba(255,255,255,.45);border-radius:999px;background:rgba(0,0,0,.45);color:#fff;cursor:pointer}
.lb button:hover{background:rgba(255,255,255,.18)}
.lb button:focus-visible{outline:3px solid #fff;outline-offset:2px}
.lb-prev,.lb-next{position:absolute;top:50%;transform:translateY(-50%)}
.lb-prev{left:10px}.lb-next{right:10px}
.lb[data-single] .lb-prev,.lb[data-single] .lb-next,.lb[data-single] .lb-count{display:none}
@media (max-width:600px){.lb-prev,.lb-next{top:auto;bottom:8px;transform:none}.lb-stage{padding-bottom:64px}.lb-img{max-height:calc(100vh - 200px);max-height:calc(100dvh - 200px)}}
@media (prefers-reduced-motion:no-preference){.lb-img{transition:opacity .2s}}
html.lb-lock{overflow:hidden}
