@keyframes leo-popup-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes leo-popup-backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.popup-window[open] {
    animation: leo-popup-in 0.65s ease-out forwards;
}

.popup-window[open]::backdrop {
    animation: leo-popup-backdrop-in 0.65s ease-out forwards;
}

.popup-window {
    width: 420px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 48px);
    margin: auto;
    padding: 0;
    border: 0;
    background: #fff;
    color: #222;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    overflow: auto;
    font-family: "Noto Sans", "Hiragino Sans", sans-serif;
}

.popup-window::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.popup-window-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}

.popup-window-close::before,
.popup-window-close::after {
    content: "";
    position: absolute;
    top: 17px;
    left: 10px;
    width: 16px;
    height: 1.5px;
    background: #222;
}

.popup-window-close::before {
    transform: rotate(45deg);
}

.popup-window-close::after {
    transform: rotate(-45deg);
}

.popup-window-img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    height: auto;
    object-fit: cover;
}

.popup-window-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 24px 28px 30px;
}

.popup-window-cat,
.popup-window-title,
.popup-window-period {
    width: 100%;
    margin: 0;
    line-height: 1.6;
    text-align: center;
}

.popup-window-cat {
    color: #222;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.12em;
}

.popup-window-title {
    color: #555;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.1em;
}

.popup-window-period {
    color: #888;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.08em;
}

.popup-window-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 46px;
    margin-top: 10px;
    border-radius: 23px;
    background: #918a7a;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.14em;
    line-height: 1;
    text-decoration: none;
}

.popup-window-btn:hover,
.popup-window-btn:focus {
    color: #fff;
    background: #7f786a;
}

@media (max-width: 767px) {
    .popup-window {
        width: 320px;
    }

    .popup-window-body {
        gap: 12px;
        padding: 20px 20px 24px;
    }

    .popup-window-cat {
        font-size: 15px;
    }

    .popup-window-title {
        font-size: 14px;
    }

    .popup-window-period {
        font-size: 13px;
    }

    .popup-window-btn {
        width: 180px;
        height: 44px;
        border-radius: 22px;
    }
}
