.mstep-message-box-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(0, 0, 0, .35);
    z-index: 9999;
    padding: 60px 20px;
    box-sizing: border-box;
}

.mstep-message-box {
    position: relative;
    max-width: 640px;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
    padding: 24px 28px 28px;
    font-size: 15px;
    line-height: 1.6;
    font-family: inherit;
    animation: mstepMessageFadeIn .25s ease;
}

.mstep-message-box.success {
    border: 3px solid #2d8a36;
    background: #f2fbf3;
}

.mstep-message-box.warning {
    border: 3px solid #d9a300;
    background: #fff9e6;
}

.mstep-message-box.error {
    border: 3px solid #d93025;
    background: #fff4f2;
}

.mstep-message-box-header {
    font-weight: 600;
    margin: 0 0 12px;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mstep-message-box-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    color: #444;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.mstep-message-box-close:hover {
    color: #000;
}

.mstep-message-box-body {
    word-break: break-word;
}

@keyframes mstepMessageFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width:600px) {
    .mstep-message-box {
        padding: 20px 22px 24px;
    }
}

/* ボタンコンテナ */
.mstep-message-box-buttons {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    text-align: center;
}

/* 共通ボタン */
.mstep-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
    position: relative;
    top: 0;
}

.mstep-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}

.mstep-btn:hover {
    text-decoration: none;
}

/* 会員登録ボタン */
.mstep-btn-register {
    background: #0d6efd !important;
    color: #fff !important;
}

.mstep-btn-register:hover {
    background: #0b5ed7 !important;
}

/* ログインボタン（視認性向上：オレンジ系） */
.mstep-btn-login {
    background: #b54700 !important; /* AAコントラスト確保 */
    color: #fff !important;
}

.mstep-btn-login:hover {
    background: #993c00 !important;
}

/* プロフィールボタン */
.mstep-btn-profile {
    background: #198754 !important;
    color: #fff !important;
}
.mstep-btn-profile:hover {
    background:#157347 !important;
}
/* 警告ボックス内のボタン差し色調整（文字コントラスト確保） */
.mstep-message-box.warning .mstep-btn-register {
    box-shadow: 0 2px 4px rgba(217, 163, 0, .4);
}
.mstep-message-box.warning .mstep-btn-login {
    box-shadow: 0 2px 4px rgba(181, 71, 0, .4);
}
