.hs-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.hs-modal.is-open {
    display: block;
}

.hs-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(0px);
    opacity: 0;
    transition:
            opacity .45s ease,
            backdrop-filter .65s cubic-bezier(.22,1,.36,1);
}

.hs-modal.is-visible .hs-modal__backdrop {
    opacity: 1;
    backdrop-filter: blur(14px);
}

.hs-modal.is-closing .hs-modal__backdrop {
    opacity: 0;
    backdrop-filter: blur(0px);
}

.hs-modal__stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow: hidden;
}

.hs-modal__content {
    display: none;
    opacity: 0;
    transform: translateY(80px) scale(.94);
    filter: blur(8px);
    transition:
            opacity .55s ease,
            transform .75s cubic-bezier(.22,1,.36,1),
            filter .75s cubic-bezier(.22,1,.36,1);
}

.hs-modal__content.is-ready {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.hs-modal__content.is-closing {
    opacity: 0;
    transform: translateY(40px) scale(.96);
    filter: blur(6px);
}

.hs-modal__content img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(92vw, 1100px);
    max-height: 82vh;
    object-fit: contain;
}

.hs-modal__close {
    position: absolute;
    top: 1em;
    right: 2em;
    z-index: 20;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 999px;
    border: 1px solid var(--soft);
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(14px);
    color: #fff;
    font-size: 30px;
    font-weight: 100;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-10px) scale(.92);
    transition:
            opacity .35s ease,
            transform .45s cubic-bezier(.22,1,.36,1),
            background .25s ease;
}

.hs-modal.is-visible .hs-modal__close {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hs-modal.is-closing .hs-modal__close {
    opacity: 0;
    transform: translateY(-10px) scale(.9);
}

.hs-modal__close:hover {
    transform: scale(1.08) rotate(90deg);
}

.hs-modal__loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: #fff;
    animation: hsSpin .8s linear infinite;
}

.hs-modal__stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow: hidden;
}

.hs-modal__content {
    max-height: calc(100dvh - 80px);
    overflow: hidden;
}

@keyframes hsSpin {
    to {
        transform: rotate(360deg);
    }
}