* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.modal-2__wrap input {
    display: none;
}

.modal-2__open-label,
.modal-2__close-label {
    cursor: pointer;
}

.modal-2__open-label {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    border: none;
    background-color: #3daff6;
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    margin: 0.5rem;
    font-size: 1em;
    color: white;

    p {
        font-size: 0.8rem;

        @media screen and (max-width: 768px) {
            text-align: center;
            font-weight: bold;
        }
    }
}

.modal-2__open-label:hover {
    background-color: #fff;
    color: #2589d0;
    outline: 1px solid #2589d0;
}

.modal-2 {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.modal-2__open-input:checked+label+input+.modal-2 {
    display: block;
    animation: modal-2-animation .6s;
}

.modal-2__content-wrap {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    max-width: 50svw;
    background-color: #fefefe;
    z-index: 2;
    border-radius: 5px;

    @media screen and (max-width: 768px) {
        max-width: 90svw;
    }
}

.modal-2__close-label {
    background-color: #029de4fe;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 20px;
    width: 36px;
    height: 36px;
    line-height: 1.6;
    text-align: center;
    display: table-cell;
    position: fixed;
    top: -15px;
    right: -2%;
    z-index: 99999;
    font-size: 1.3em;
}

/* モーダルコンテンツ表示部分 */
.modal-2__content {
    max-height: 60vh;
    overflow-y: auto;
    /* padding: 2rem; */

    @media screen and (max-width: 768px) {
        max-height: 90svh;
    }

    img {
        width: 50%;
        height: auto;
        margin-top: 1rem;

        @media screen and (max-width: 768px) {
            width: 90%;
        }
    }

    .modal_p_text-title {
        margin: 1rem;
        font-size: 0.9rem;
        background-color: rgb(231, 232, 232);
        color: rgb(2, 73, 134);
        width: auto;
        padding: 0.5rem 0.5rem;
        font-weight: bold;
    }

    p {
        font-size: 0.8rem;
        font-weight: bold;
    }

}

.modal-2__background {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .45);
    z-index: 1;
}

@keyframes modal-2-animation {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@media only screen and (max-width: 520px) {
    .modal-2__open-label {
        max-width: 90%;
        padding: .94em 2.1em .94em 2.6em;
    }

    .modal-2__close-label {
        top: -17px;
        right: -4%;
    }

    .modal-2__content-wrap {
        width: 90vw;
    }

    .modal-2__content {
        padding: 33px 21px 35px;
        max-width: 100%;
    }
}