body.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, .2);
    z-index: 1000;
    opacity: 0;
    transform: scale(1.01);
    transition: opacity .15s ease, transform .15s ease;
}

.modal {
    position: relative;
    max-width: var(--container-width);
    width: -webkit-fill-available;
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    color: var(--text-color-black);
    border-radius: var(--border-outside);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    padding: var(--block-padding);
    outline: none;
}

.modal-header {
    margin: 0 0 12px;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    inline-size: 40px;
    block-size: 40px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
}

.modal-close:hover {
    background: rgba(255, 255, 255, .06);
}

.modal-figure {
    margin: 0;
    display: grid;
    gap: 8px;
}

.modal-figure img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.modal-caption {
    opacity: .85;
}

.video-aspect {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.video-aspect iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.modal-backdrop[data-state="opening"],
.modal-backdrop[data-state="open"] {
    opacity: 1;
    transform: scale(1);
}

.modal-backdrop[data-state="closing"] {
    opacity: 0;
    transform: scale(0.99);
}

