.cs-lightbox{position:fixed;inset:0;z-index:9000;display:flex;align-items:center;justify-content:center;overflow:hidden;overscroll-behavior:contain;touch-action:none}
/* hidden is only a UA-stylesheet display:none and the rule above is an AUTHOR rule, which beats it
   at any specificity. Without this, a "hidden" viewer renders over the page it belongs to. */
.cs-lightbox[hidden]{display:none!important}
.cs-lightbox__bd{position:absolute;inset:0;background:#08080a;opacity:.97}
/* The stage fills the viewport and the empty space around the content IS the backdrop, where a click
   closes — so the pointer affordance belongs on the content, never on the stage behind it. */
.cs-lightbox__stage{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;touch-action:none}
.cs-lightbox__stage .cs-lightbox__img{cursor:zoom-in}
.cs-lightbox__stage[data-cs-lb-zoomed] .cs-lightbox__img{cursor:grab}
.cs-lightbox__stage[data-cs-lb-panning] .cs-lightbox__img{cursor:grabbing}
.cs-lightbox__img{max-width:100%;max-height:100%;object-fit:contain;display:block;transform-origin:0 0;will-change:transform;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}
/* VIDEO MODE's holder. The width is chosen so the 16/9 box it wraps cannot grow taller than the
   viewport — that is what the third term does — which is why no max-height clamp is needed on a
   child whose height comes from its own aspect ratio. */
.cs-lightbox__media{width:min(1600px,94vw,calc(88vh * 16 / 9));max-width:94vw}
.cs-lightbox__media>*{display:block;width:100%}
.cs-lightbox__tools{position:absolute;top:.75rem;right:.75rem;display:flex;gap:.4rem;z-index:1}
.cs-lightbox__b{display:inline-flex;align-items:center;justify-content:center;width:2.4rem;height:2.4rem;padding:0;border:1px solid rgba(255,255,255,.16);border-radius:10px;background:rgba(24,24,28,.82);color:#fff;cursor:pointer;text-decoration:none}
.cs-lightbox__b:hover{background:rgba(48,48,56,.92);border-color:rgba(255,255,255,.3)}
.cs-lightbox__b:focus-visible{outline:2px solid #F97316;outline-offset:2px}
.cs-lightbox__b[disabled]{opacity:.4;cursor:default}
/* The full-screen button is display:inline-flex like every toolbar button, an AUTHOR rule that beats
   [hidden] — the same trap as the box itself, so it gets the same undefeatable rule. */
.cs-lightbox__b[hidden]{display:none!important}
/* GALLERY MODE (docs/MULTI-IMAGE-POSTS.md §6 step 3): prev/next at the stage's edges, a position
   counter, and the opener a post page wraps each gallery image in. The opener is a real link to the
   file, so without script it still opens the image; block + no underline so the wrap is invisible. */
.cs-lightbox__nav{position:absolute;top:50%;transform:translateY(-50%);z-index:1}
.cs-lightbox__nav--prev{left:.75rem}
.cs-lightbox__nav--next{right:.75rem}
.cs-lightbox__count{position:absolute;bottom:.9rem;left:50%;transform:translateX(-50%);z-index:1;padding:.2rem .65rem;border-radius:999px;background:rgba(24,24,28,.82);color:#fff;font:500 .8rem/1.4 system-ui,sans-serif}
.cs-lightbox-item{display:block;cursor:zoom-in;text-decoration:none}
/* Scroll lock, set on the document element while the viewer is open. */
.cs-lightbox-open{overflow:hidden}
@media(max-width:560px){.cs-lightbox__b{width:2.75rem;height:2.75rem}}
