@charset "UTF-8";

.service-end-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.service-end-modal.is-open {
    display: flex;
    padding: 24px;
}

.service-end-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.service-end-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
    /* flex の align-items: center ではなく margin: auto で中央寄せする。
       本文が画面より高い場合でも上下が切れずにスクロールできるため。 */
    margin: auto;
    padding: 36px 40px 32px;
    background: #ffffff;
    border: 2px solid #e60012;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    animation: serviceEndModalIn 0.25s ease-out;
}

@keyframes serviceEndModalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.service-end-modal__close {
    position: absolute;
    top: -16px;
    right: -16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #e60012;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.service-end-modal__close:hover {
    opacity: 0.8;
}

/* ロゴ */
.service-end-modal__logo {
    margin-bottom: 18px;
}

.service-end-modal__logo img {
    width: auto;
    height: 34px;
    max-width: 85%;
    -o-object-fit: contain;
    object-fit: contain;
}

/* タイトル */
.service-end-modal__title {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    color: #262626;
}

/* 本文 */
.service-end-modal__text {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.85;
    color: #333333;
    text-align: left;
}

.service-end-modal__text:last-child {
    margin-bottom: 0;
}

/* モーダル表示中は背面スクロールを固定 */
body.is-modal-open {
    overflow: hidden;
}

/* ---------- SP（max-width: 750px） ----------
   TOPページは width=device-width のため、ここでの px は実デバイスの px。
   レイアウトは 375px 前後のスマートフォンを基準に調整している。 */
@media only screen and (max-width: 750px) {
    .service-end-modal.is-open {
        padding: 16px;
    }

    .service-end-modal__dialog {
        max-width: 480px;
        padding: 24px 18px 22px;
        border-width: 2px;
        border-radius: 6px;
    }

    .service-end-modal__close {
        top: -14px;
        right: -14px;
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .service-end-modal__logo {
        margin-bottom: 14px;
    }

    .service-end-modal__logo img {
        height: 30px;
    }

    .service-end-modal__title {
        margin-bottom: 16px;
        font-size: 17px;
    }

    .service-end-modal__text {
        margin-bottom: 14px;
        font-size: 13.5px;
        line-height: 1.85;
    }
}
