#msnr-home-popup:not([open]) { display: none; }
#msnr-home-popup {
    position: fixed; inset: 0; margin: auto; padding: 0;
    border: 3px solid #fff; border-radius: 8px; box-sizing: border-box;
    width: max-content; max-width: 75vw; height: max-content;
    max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
    background: #151515; color: #fff; overflow: hidden;
    box-shadow: 0 16px 56px rgba(0,0,0,.4);
}
#msnr-home-popup::backdrop { background: rgba(0,0,0,.72); }
#msnr-home-popup .msnr-popup-panel { position: relative; margin: 0; padding: 0; }
#msnr-home-popup .msnr-popup-controls {
    position: absolute; top: 12px; right: 12px; z-index: 1;
    display: flex; align-items: center; justify-content: flex-end;
    pointer-events: none;
}
#msnr-home-popup .msnr-popup-close {
    appearance: none; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; min-width: 44px; min-height: 44px;
    padding: 0; margin: 0; box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.9); border-radius: 50%;
    color: #fff; background: rgba(21,21,21,.9);
    font: 600 16px/1.2 Arial, sans-serif; cursor: pointer; pointer-events: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
#msnr-home-popup .msnr-popup-close:hover { background: #000; }
#msnr-home-popup .msnr-popup-close:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
#msnr-home-popup .msnr-popup-close span:first-child { display: none; }
#msnr-home-popup .msnr-popup-close span[aria-hidden] { font-size: 30px; font-weight: 400; line-height: 1; }
#msnr-home-popup [hidden] { display: none !important; }
#msnr-home-popup .msnr-popup-image {
    display: block; width: auto; height: auto; margin: 0; border: 0;
    max-width: calc(75vw - 6px);
    max-height: calc(100vh - 38px); max-height: calc(100dvh - 38px);
    object-fit: contain;
}
@media (max-width: 767px), (pointer: coarse) {
    #msnr-home-popup { max-width: 90vw; }
    #msnr-home-popup .msnr-popup-image {
        max-width: calc(90vw - 6px);
        max-height: calc(100vh - 112px); max-height: calc(100dvh - 112px);
    }
    #msnr-home-popup .msnr-popup-controls {
        position: static; min-height: 64px; padding: 4px 8px;
        box-sizing: border-box; background: #151515; pointer-events: auto;
    }
    #msnr-home-popup .msnr-popup-close {
        width: auto; height: 56px; min-width: 56px; min-height: 56px;
        padding: 8px 12px; gap: 10px; border-radius: 4px; box-shadow: none;
    }
    #msnr-home-popup .msnr-popup-close span:first-child { display: inline; }
}
