#act-market-1111-overlay,
#act-market-1111-overlay * {
    box-sizing: border-box;
}

#act-market-1111-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(5, 7, 20, .72);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
}

#act-market-1111-overlay.actm-is-visible {
    opacity: 1;
    visibility: visible;
}

#act-market-1111-overlay .actm-popup-dialog {
    position: relative;
    width: min(100%, 460px);
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
    display: flex;
    justify-content: center;
    transform: translateY(14px) scale(.985);
    transition: transform .22s ease;
}

#act-market-1111-overlay.actm-is-visible .actm-popup-dialog {
    transform: translateY(0) scale(1);
}

#act-market-1111-overlay .actm-popup-link {
    display: block;
    width: 100%;
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
    border-radius: 22px;
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 0 28px rgba(211, 35, 255, .42), 0 18px 65px rgba(0, 0, 0, .5);
    outline-offset: 4px;
}

#act-market-1111-overlay .actm-popup-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
    object-fit: contain;
    object-position: center;
}

#act-market-1111-overlay .actm-popup-close {
    position: absolute;
    z-index: 3;
    top: -11px;
    right: -11px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #23003e;
    color: #fff;
    font: 700 30px/36px Arial, sans-serif;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(207, 34, 255, .55), 0 0 20px rgba(207, 34, 255, .8);
}

#act-market-1111-overlay .actm-popup-close:hover,
#act-market-1111-overlay .actm-popup-close:focus-visible {
    background: #6500a8;
    outline: 2px solid #fff;
    outline-offset: 3px;
}

body.actm-popup-open {
    overflow: hidden;
}

@media (max-width: 520px) {
    #act-market-1111-overlay {
        padding: 14px;
    }
    #act-market-1111-overlay .actm-popup-dialog {
        width: min(100%, 430px);
        max-height: calc(100vh - 28px);
        max-height: calc(100dvh - 28px);
    }
    #act-market-1111-overlay .actm-popup-link,
    #act-market-1111-overlay .actm-popup-image {
        max-height: calc(100vh - 28px);
        max-height: calc(100dvh - 28px);
    }
    #act-market-1111-overlay .actm-popup-close {
        top: -8px;
        right: -8px;
        width: 38px;
        height: 38px;
        font-size: 27px;
        line-height: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #act-market-1111-overlay,
    #act-market-1111-overlay .actm-popup-dialog {
        transition: none;
    }
}
