.home-popup-overlay {
    position: fixed;
    z-index: 2147483000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 24px;
    overflow: auto;
    background: rgba(4, 9, 24, .82);
}

body.home-popup-open {
    overflow: hidden !important;
}

.home-popup-dialog {
    position: relative;
    display: inline-block;
    flex: 0 1 auto;
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    overflow: visible;
    line-height: 0;
}

.home-popup-background {
    position: relative;
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.home-popup-close {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5%;
    min-width: 28px;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 50%;
    color: #fff;
    background: rgba(22, 13, 66, .42);
    font: 300 clamp(22px, 2.2vw, 34px)/1 Arial, sans-serif;
    cursor: pointer;
    line-height: 1;
}

.home-popup-close:hover {
    background: rgba(22, 13, 66, .72);
}

.home-popup-close-custom {
    width: clamp(30px, 6%, 64px);
    min-width: 0;
    height: auto;
    aspect-ratio: auto;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.home-popup-close-custom:hover {
    background: transparent;
}

.home-popup-close-custom img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.home-popup-overlay-pc .home-popup-dialog {
    max-width: min(76vw, 1150px);
}

.home-popup-overlay-mobile {
    padding: 18px;
}

.home-popup-overlay-mobile .home-popup-dialog {
    max-width: min(88vw, 480px);
}

.home-popup-overlay-mobile .home-popup-background {
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
}

.home-popup-overlay-mobile .home-popup-close {
    top: 0;
    right: 0;
    width: 10%;
    min-width: 30px;
    font-size: clamp(22px, 7vw, 30px);
}

.home-popup-overlay-mobile .home-popup-close-custom {
    width: clamp(30px, 12%, 56px);
    min-width: 0;
}

@media (max-width: 640px) {
    .home-popup-overlay-pc {
        padding: 12px;
    }

    .home-popup-overlay-pc .home-popup-dialog {
        max-width: 96vw;
    }
}
