/* Welcome Popup Overlay */
.welcome-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(50, 50, 50, 0.8);
    z-index: 9998;
    /* Above site content, but behind the loading screen overlay (9999) */
    display: flex;
    justify-content: center;
    align-items: center;

    /* Visible by default */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.welcome-popup-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.welcome-popup-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 90vw;
    max-height: 90vh;
}

.welcome-popup-content picture {
    display: block;
    max-width: 100%;
}

.welcome-popup-content img {
    max-width: 100%;
    /* Leaves room for the close button */
    max-height: calc(90vh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    border: 2px solid #ffffff;
}

/* Close Button Styles */
.welcome-popup-close {
    background: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-family: var(--font-en, "Outfit", sans-serif);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
    padding: 12px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    /* Space between text and icon */
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.welcome-popup-close:hover {
    background-color: #ffffff;
    color: #000000;
}

/* Icon svg to match user's mockup */
.welcome-popup-close svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 1.5;
    transition: stroke 0.3s ease;
}

@media (min-width: 768px) {
    .welcome-popup-content {
        gap: 2vw; /* Proportionally scaled gap between image and button */
    }

    .welcome-popup-close {
        width: 15vw;
        padding-left: 0 !important;
        padding-right: 0 !important;
        font-size: 1.432vw;
        padding-top: 1vw !important;
        padding-bottom: 1vw !important;
        border-radius: 9999px !important; /* 常に完全なカプセル型を維持 */
        position: relative;
        justify-content: center; /* テキストを中央寄せ */
    }

    .welcome-popup-close svg {
        width: 1vw;
        height: 1vw;
        position: absolute;
        right: 1.5vw; /* ボタンの右端から適度な距離 */
        top: 50%;
        transform: translateY(-50%);
    }
}