.gallery-image-link { cursor: zoom-in; touch-action: pan-y pinch-zoom; }
.gallery-navigation { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.gallery-navigation .viewer-button { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: auto; }
.gallery-stage-previous { left: max(16px, env(safe-area-inset-left)); }
.gallery-stage-next { right: max(16px, env(safe-area-inset-right)); }
.gallery-lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: #fff; background: #101822f5; overflow: hidden; }
.gallery-lightbox:not([open]) { display: none; }
.gallery-lightbox::backdrop { background: #101822e6; }
.gallery-lightbox-shell { position: relative; width: 100%; height: 100%; padding: max(64px, env(safe-area-inset-top)) max(72px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(72px, env(safe-area-inset-left)); }
.gallery-lightbox-figure { display: flex; flex-direction: column; width: 100%; height: 100%; margin: 0; gap: 14px; }
.gallery-lightbox-image { display: block; width: 100%; min-height: 0; flex: 1; object-fit: contain; touch-action: pan-y pinch-zoom; user-select: none; }
.gallery-lightbox-caption { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 20px; min-height: 24px; flex: none; font-size: 12px; line-height: 1.5; color: #d5dde8; text-align: center; overflow-wrap: anywhere; }
.gallery-lightbox-caption > :first-child { max-width: min(720px, 100%); }
.gallery-lightbox-caption > :last-child { white-space: nowrap; color: #b1bfd2; }
.gallery-lightbox-button { display: inline-flex; justify-content: center; align-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid #ffffff30; border-radius: 8px; background: #ffffff14; color: #fff; cursor: pointer; line-height: 1; }
.gallery-lightbox-button:hover { background: #ffffff25; border-color: #ffffff60; }
.gallery-lightbox-button:focus-visible { outline: 3px solid #a1b9e7; outline-offset: 3px; }
.gallery-lightbox-close { position: absolute; z-index: 2; top: max(14px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); font-size: 30px; }
.gallery-lightbox-previous, .gallery-lightbox-next { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); }
.gallery-lightbox-previous { left: max(16px, env(safe-area-inset-left)); }
.gallery-lightbox-next { right: max(16px, env(safe-area-inset-right)); }
.gallery-lightbox-error { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 16px; width: min(420px, calc(100% - 120px)); padding: 22px; border: 1px solid #ffffff30; border-radius: 10px; background: #182235ed; font-size: 13px; line-height: 1.6; text-align: center; }
.gallery-lightbox-retry { width: auto; padding-inline: 16px; font-size: 13px; }
@media (max-width: 560px) {
    .gallery-stage-previous { left: max(12px, env(safe-area-inset-left)); }
    .gallery-stage-next { right: max(12px, env(safe-area-inset-right)); }
    .gallery-lightbox-shell { padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); padding-bottom: max(76px, env(safe-area-inset-bottom)); }
    .gallery-lightbox-previous, .gallery-lightbox-next { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); transform: none; }
    .gallery-lightbox-previous { left: calc(50% - 51px); }
    .gallery-lightbox-next { right: calc(50% - 51px); }
    .gallery-lightbox-error { width: calc(100% - 32px); }
    .gallery-lightbox-caption { font-size: 11px; gap: 6px 12px; }
}
