[data-public-image],
.feature-page:not(.template-gallery-page) img:not([alt=""]),
.template-gallery-page .template-gallery-hero-art img:not([alt=""]),
.home-redesign img:not(.home-hero-overlay-image):not([alt=""]) {
    cursor: zoom-in;
}

[data-public-image]:focus-visible,
.feature-page:not(.template-gallery-page) img:not([alt=""]):focus-visible,
.template-gallery-page .template-gallery-hero-art img:not([alt=""]):focus-visible,
.home-redesign img:not(.home-hero-overlay-image):not([alt=""]):focus-visible {
    outline: 3px solid #197d78;
    outline-offset: 3px;
}

.public-image-viewer {
    width: min(98vw, 1800px);
    max-width: none;
    max-height: 98dvh;
    padding: clamp(12px, 2vw, 24px);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px;
    color: #fff;
    background: #102a3b;
    box-shadow: 0 24px 80px rgba(0,0,0,.4);
}

.public-image-viewer::backdrop {
    background: rgba(4,16,24,.82);
    backdrop-filter: blur(5px);
}

.public-image-viewer__content {
    display: grid;
    max-height: calc(98dvh - 40px);
    grid-template-rows: auto minmax(0,1fr) auto;
    gap: 12px;
}

.public-image-viewer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.public-image-viewer__header h2 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    line-height: 1.7;
}

.public-image-viewer__close,
.public-image-viewer__nav {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255,255,255,.28);
    color: #fff;
    background: rgba(255,255,255,.1);
    cursor: pointer;
}

.public-image-viewer__nav:disabled {
    opacity: .45;
    cursor: default;
}

.public-image-viewer__close {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1rem;
}

.public-image-viewer__stage {
    display: grid;
    min-height: 0;
    grid-template-columns: 48px minmax(0,1fr) 48px;
    align-items: center;
    gap: 12px;
}

.public-image-viewer__stage img {
    display: block;
    width: 100%;
    max-height: calc(98dvh - 132px);
    object-fit: contain;
}

.public-image-viewer__nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.15rem;
}

.public-image-viewer__count {
    margin: 0;
    color: rgba(255,255,255,.86);
    font-size: .86rem;
    text-align: center;
}

.public-image-viewer button:focus-visible {
    outline: 3px solid #8ce2d5;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .public-image-viewer {
        width: 100vw;
        max-width: 100vw;
        max-height: 100dvh;
        margin: 0;
        border-radius: 0;
    }

    .public-image-viewer__content {
        max-height: calc(100dvh - 32px);
        gap: 8px;
    }

    .public-image-viewer__stage {
        grid-template-columns: 38px minmax(0,1fr) 38px;
        gap: 4px;
    }

    .public-image-viewer__nav {
        width: 36px;
        height: 36px;
    }

    .public-image-viewer__stage img {
        max-height: calc(100dvh - 140px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .public-image-viewer::backdrop {
        backdrop-filter: none;
    }
}
