body.has-image-lightbox { overflow: hidden; }
.s3s-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(64px, calc(env(safe-area-inset-top) + 52px)) 24px max(24px, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: pan-x pinch-zoom;
}
.s3s-lightbox[open] {
  display: grid;
  place-items: center;
  background: transparent;
}
.s3s-lightbox:focus { outline: none; }
.s3s-lightbox::backdrop {
  background: rgba(8, 15, 22, var(--lightbox-dim, .9));
  backdrop-filter: blur(14px);
}
.s3s-lightbox .s3s-lightbox__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: fit-content;
  max-width: min(100%, 1800px);
  margin: 0;
  transition: transform 180ms ease-out, opacity 180ms ease-out;
}
.s3s-lightbox .s3s-lightbox__stage.is-dragging { transition: none; }
.s3s-lightbox .s3s-lightbox__stage > img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(78vh, calc(100dvh - 180px));
  min-height: 0;
  margin: 0;
  object-fit: contain;
  border: 1px solid #ffffff1f;
  border-radius: 12px;
  box-shadow: 0 18px 64px #0005;
  user-select: none;
  -webkit-user-drag: none;
}
.s3s-lightbox .s3s-lightbox__caption {
  max-width: min(920px, 100%);
  margin: 0;
  padding: 0 6px;
  color: #dce5ed;
  background: transparent;
  border: 0;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}
.s3s-lightbox .s3s-lightbox__close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  color: #fff;
  background: #26343ee6;
  border: 1px solid #ffffff30;
  border-radius: 50%;
  box-shadow: 0 4px 18px #0002;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 160ms ease, transform 160ms ease;
}
.s3s-lightbox .s3s-lightbox__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.s3s-lightbox .s3s-lightbox__close:hover { background: #3a4a58; transform: scale(1.06); }
.s3s-lightbox .s3s-lightbox__close:focus:not(:focus-visible) { outline: none; }
.s3s-lightbox .s3s-lightbox__close:focus-visible { outline: 2px solid #a6d9e9; outline-offset: 4px; }
.s3s-lightbox__handle { display: none; }
.s3s-lightbox.is-zoomed { touch-action: auto; }
@media (max-width: 700px) {
  .s3s-lightbox { padding-right: 16px; padding-left: 16px; }
  .s3s-lightbox__handle { display: block; width: 34px; height: 4px; border-radius: 3px; background: #ffffff66; }
  .s3s-lightbox .s3s-lightbox__stage { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .s3s-lightbox .s3s-lightbox__stage, .s3s-lightbox .s3s-lightbox__close { transition: none; }
}
