.emmegi-video-popup {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: flex;
    width: 100vw;
    height: 100dvh;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.emmegi-video-popup[hidden] {
    display: none !important;
}

.emmegi-popup-video {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    background: #000;
}

.emmegi-video-close {
    position: fixed;
    top: max(18px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    z-index: 2147483647;
    display: flex;
    width: 50px;
    height: 50px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 999px;
    background: rgba(0,0,0,.68);
    color: #fff;
    font: 300 38px/1 Arial, sans-serif;
    cursor: pointer;
    appearance: none;
}

.emmegi-video-close:hover,
.emmegi-video-close:focus-visible {
    background: rgba(0,0,0,.95);
    outline: 2px solid #fff;
    outline-offset: 3px;
}

html.emmegi-video-open,
body.emmegi-video-open {
    overflow: hidden !important;
}

@media (max-width: 767px) {
    .emmegi-video-close {
        top: max(12px, env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
        width: 44px;
        height: 44px;
        font-size: 34px;
    }
}
