/* 以下、モーダルのカスタマイズ */
/* モーダル背景 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.6s ease,
        visibility 0.6s ease;
}

/* 表示状態 */
.overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 非表示中も中身に影響しないように */
.modal {
    width: 100%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    text-align: center;
    pointer-events: auto;
}

.modal-button-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media screen and (min-width: 1024px) {
    .modal-button-wrapper {
        display: flex;
        flex-direction: row;
        justify-content: center;
    }
}

/* ボタンデザインはそのまま */
.modal-button {
    border-radius: 9999px;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    width: 70%;
    max-width: 400px;
    height: 60px;
    padding: 6px 30px;
    margin: 0 10px;
    text-decoration: none;
    transition: opacity 0.3s;
    position: relative;
}

.modal-button:hover .arrow {
    transform: translateX(5px) translateY(-50%) rotate(45deg); /* 右に5px動かす */
}

.modal-button .arrow {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    position: absolute;
    right: 40px;
    top: 50%;
    width: 9px;
    height: 9px;
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.3s;
}

.modal-button .derma .arrow {
    color: #fff;
}

.modal-button .arrow::before,
.modal-button .arrow::after {
    content: "";
    position: absolute;
    background: currentColor;
    border-radius: 0.1em;
}

.modal-button .arrow::before {
    top: 0;
    left: 0;
    right: 0;
    height: 0.1em;
}

.modal-button .arrow::after {
    top: 0;
    right: 0;
    bottom: 0;
    width: 0.1em;
}
@media screen and (min-width: 1024px) {
    .modal-button {
        font-size: 18px;
    }
}

.modal-button.internal {
    color: #333;
    background: #c4e0af;
}

/* @media screen and (max-width: 1023px) {
    .modal-button.internal {
        margin-top: 14px;
    }
} */
.modal-button.internal:hover {
    color: #333 !important;
}

.modal-button.derma {
    background: #008c22;
    color: #fff;
    line-height: 1.4em;
}

.modal-button.internal:hover {
    color: #333 !important;
}

.close-button {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: fit-content;
    margin-top: 20px;
    margin-inline: auto;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    position: relative;
    overflow: hidden; /* ::afterのはみ出しを隠す */
}

.close-button::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px; /* 下線の太さ */
    background: #fff;
    transform: scaleX(0); /* 初期状態：非表示 */
    transform-origin: left;
    transition: transform 0.3s ease;
}

@media screen and (max-width: 1023px) {
    .close-button::after {
        transform: scaleX(1); /* 初期状態：非表示 */
    }
}

@media screen and (min-width: 1024px) {
    .close-button:hover::after {
        transform: scaleX(1); /* ホバー時に左から右へ伸びる */
    }
}

.batsu {
    display: inline-block;
    position: relative;
    width: 20px;
    height: 20px;
}

.batsu::before,
.batsu::after {
    /* 共通設定 */
    content: "";
    border-radius: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px; /* 棒の幅（太さ） */
    height: 16px; /* 棒の高さ */
    background: #fff;
}

.batsu::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.batsu::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
