body.lightbox-open { overflow: hidden; padding-right: var(--lightbox-scrollbar, 0px); }
.image-lightbox {
  width: min(1600px, calc(100vw - 48px));
  height: fit-content; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  max-width: none; margin: auto; padding: 16px 20px;
  border: 1px solid #ffffff35; border-radius: 18px;
  background: #0f233f; color: #fff; box-shadow: 0 24px 100px #0008;
  overflow: hidden;
}
.image-lightbox[open] { display: flex; flex-direction: column; gap: 12px; }
.image-lightbox::backdrop { background: #09182cb8; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
.lightbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lightbox-toolbar h2 { min-width: 0; font-size: 14px; letter-spacing: 0; line-height: 1.4; font-weight: 600; }
.lightbox-close {
  display: grid; place-items: center; min-height: 44px; border: 1px solid #ffffff60;
  border-radius: 9px; background: transparent; color: #fff;
}
.lightbox-close { width: 44px; font-size: 30px; line-height: 1; flex-shrink: 0; }
.lightbox-close:hover { background: #ffffff15; }
.image-lightbox [hidden] { display: none !important; }
.image-lightbox :focus-visible { outline: 3px solid var(--sky); outline-offset: -3px; }
.lightbox-figure { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; margin: 0; }
.lightbox-viewport { min-width: 0; min-height: 0; width: 100%; overflow: hidden; overscroll-behavior: contain; background: #09182c; border-radius: 6px; }
.lightbox-viewport img:not([hidden]) { display: block; width: 100%; height: auto; max-height: calc(100dvh - 154px); object-fit: contain; }
.lightbox-status { padding: 30px 16px; text-align: center; font-size: 14px; }
.lightbox-figure figcaption { text-align: center; font-size: 12px; color: #d5e3f5; line-height: 1.5; }
[data-lightbox] { cursor: zoom-in; }
.gallery-fallback { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 20px; font-size: 13px; text-decoration: underline; }
@media (max-width: 760px) {
  .image-lightbox { width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); padding: 10px; border-radius: 12px; }
  .lightbox-toolbar { gap: 8px; flex-wrap: wrap; }
  .lightbox-toolbar h2 { font-size: 12px; }
  .lightbox-figure figcaption { font-size: 11px; }
}
@media (max-height: 450px) {
  .image-lightbox { padding: 8px 12px; max-height: calc(100dvh - 16px); }
  .image-lightbox[open] { gap: 6px; }
  .lightbox-figure { gap: 6px; }
}
@keyframes lightbox-enter {
  from { opacity: 0; transform: translateY(6px) scale(.99); }
  to { opacity: 1; transform: none; }
}
@keyframes lightbox-backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .image-lightbox[open] { animation: lightbox-enter 160ms ease-out; }
  .image-lightbox[open]::backdrop { animation: lightbox-backdrop-enter 160ms ease-out; }
}
