.m1-signup-overlay,
.m1-verification-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 18, 20, 0.65);
    backdrop-filter: blur(5px);
}

.m1-signup-overlay.open,
.m1-verification-overlay.open {
    display: flex;
}

.m1-signup-no-scroll {
    overflow: hidden;
}


/* ========================================
   회원가입 메인 팝업
======================================== */

.m1-signup-popup {
    width: min(1150px, 100%);
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 30px 100px rgba(0,0,0,.28);
}


.m1-signup-header {
    height: 72px;
    flex: 0 0 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid #e7e2dc;
}


.m1-signup-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.04em;
}


.m1-signup-close {
    border: 0;
    background: transparent;
    font-size: 35px;
    line-height: 1;
    cursor: pointer;
    color: #222;
}


.m1-signup-content {
    overflow-y: auto;
    padding: 35px 40px 40px;
}


.signup-main-title {
    margin: 0 0 35px;
    text-align: center;
    font-size: 31px;
    font-weight: 700;
    letter-spacing: -0.06em;
}


/* ========================================
   STEP
======================================== */

.m1-signup-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}


.signup-step-indicator {
    min-width: 150px;
    text-align: center;
    color: #bcb8b3;
    transition: .2s;
}


.signup-step-indicator.active {
    color: #a57b50;
}


.step-image {
    width: 62px;
    height: 62px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8d2ca;
    border-radius: 50%;
    background: #fff;
}


.signup-step-indicator.active .step-image {
    color: #fff;
    background: #b38b5f;
    border-color: #b38b5f;
}


.step-image span {
    font-size: 21px;
    font-weight: 700;
}


.step-title {
    font-size: 13px;
}


.step-title strong {
    font-weight: 700;
}


.step-arrow {
    color: #bcb8b3;
    font-size: 28px;
}


/* ========================================
   STEP PAGE
======================================== */

.signup-page {
    display: none;
}


.signup-page.active {
    display: block;
}


.section-title {
    margin: 0 0 25px;
    text-align: center;
    font-size: 23px;
    letter-spacing: -0.05em;
}


.section-title span {
    color: #b38b5f;
    font-weight: 500;
}


.user-type-title {
    margin-top: 45px;
}


.signup-introduction {
    margin: 0 0 30px;
    text-align: center;
    color: #6f6b67;
    font-size: 14px;
    line-height: 1.8;
}


/* ========================================
   회원 유형
======================================== */

.member-type-grid {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
    gap: 13px;
}


.member-type-card {
    min-height: 205px;
    padding: 22px 14px;
    border: 1px solid #ded8d0;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: .2s;
}


.member-type-card:hover {
    border-color: #b38b5f;
}


.member-type-card.selected {
    border: 2px solid #b38b5f;
    background: #fffaf5;
}


.card-title {
    font-size: 17px;
    font-weight: 700;
    color: #242424;
}


.card-description {
    min-height: 54px;
    margin-top: 11px;
    color: #777;
    font-size: 12px;
    line-height: 1.65;
}


.card-image {
    width: 65px;
    height: 48px;
    margin: 17px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d6c4af;
    color: #a37b50;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
}


/* ========================================
   사용자 유형
======================================== */

.user-type-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 13px;
}


.select-guide {
    padding: 20px;
    color: #999;
    font-size: 13px;
}


.user-type-card {
    width: 220px;
    min-height: 135px;
    padding: 20px;
    border: 1px solid #ded8d0;
    background: #fff;
    cursor: pointer;
    text-align: center;
}


.user-type-card:hover {
    border-color: #b38b5f;
}


.user-type-card.selected {
    border: 2px solid #b38b5f;
    background: #fffaf5;
}


.user-type-card strong {
    display: block;
    font-size: 16px;
}


.user-type-card p {
    margin: 12px 0 0;
    color: #777;
    font-size: 12px;
    line-height: 1.65;
}


/* ========================================
   약관
======================================== */

.agreement-all {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ddd6ce;
    background: #faf8f5;
    cursor: pointer;
}


.agreement-all input,
.agreement-header input {
    width: 18px;
    height: 18px;
    accent-color: #b38b5f;
}


.agreement-all span {
    font-size: 15px;
    font-weight: 700;
}


.agreement-item {
    border-bottom: 1px solid #e5e0da;
}


.agreement-header {
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.agreement-header label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}


.agreement-header b {
    color: #b38b5f;
}


.agreement-view {
    border: 0;
    background: transparent;
    color: #777;
    cursor: pointer;
}


.agreement-view span {
    margin-left: 5px;
}


.agreement-content {
    display: none;
    padding: 0 15px 20px 30px;
}


.agreement-content.open {
    display: block;
}


.placeholder-terms {
    padding: 20px;
    background: #faf9f7;
    color: #777;
    font-size: 13px;
    line-height: 1.8;
}


.placeholder-terms strong {
    display: block;
    color: #333;
    margin-bottom: 8px;
}


/* ========================================
   인증
======================================== */

.verification-grid {
    max-width: 850px;
    margin: 35px auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}


.verification-card {
    padding: 30px;
    border: 1px solid #ded8d0;
    text-align: center;
}


.verification-card.verified {
    border: 2px solid #b38b5f;
    background: #fffaf5;
}


.verification-icon {
    width: 65px;
    height: 50px;
    margin: 0 auto 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d6c4af;
    color: #a37b50;
    font-size: 11px;
    font-weight: 700;
}


.verification-card h3 {
    margin: 0;
    font-size: 17px;
}


.verification-card p {
    min-height: 40px;
    color: #777;
    font-size: 12px;
    line-height: 1.7;
}


.verification-button,
.verification-complete-area button {
    min-height: 42px;
    padding: 0 22px;
    border: 1px solid #b38b5f;
    background: #b38b5f;
    color: #fff;
    cursor: pointer;
}


.verification-status {
    margin-top: 12px;
    color: #999;
    font-size: 12px;
}


.verification-card.verified
.verification-status {
    color: #a37b50;
    font-weight: 700;
}


.verification-complete-area {
    text-align: center;
}


/* ========================================
   Step 4
======================================== */

.selected-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 25px;
    border: 1px solid #ded8d0;
}


.selected-info div {
    padding: 18px;
    text-align: center;
}


.selected-info div + div {
    border-left: 1px solid #ded8d0;
}


.selected-info span {
    display: block;
    margin-bottom: 7px;
    color: #999;
    font-size: 12px;
}


.selected-info strong {
    color: #a37b50;
}


.form-section {
    margin-bottom: 28px;
}


.form-section h3 {
    margin: 0 0 14px;
    font-size: 16px;
}


.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}


.form-grid label {
    color: #666;
    font-size: 12px;
}


.form-grid input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 7px;
    padding: 13px;
    border: 1px solid #ddd7d0;
    outline: none;
}


.form-grid input:focus {
    border-color: #b38b5f;
}


.signup-complete-message {
    padding: 55px 20px;
    border: 1px solid #ded8d0;
    background: #faf8f5;
    text-align: center;
}


.complete-icon {
    width: 65px;
    height: 65px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #b38b5f;
    color: #fff;
    font-size: 30px;
}


.signup-complete-message h3 {
    margin: 0 0 15px;
    font-size: 23px;
}


.signup-complete-message p {
    margin: 7px;
    color: #777;
    font-size: 13px;
}


/* ========================================
   FOOTER
======================================== */

.m1-signup-footer {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 30px;
    border-top: 1px solid #e7e2dc;
}


.footer-button {
    min-width: 105px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #d3ccc4;
    background: #fff;
    cursor: pointer;
}


.footer-button.primary {
    border-color: #b38b5f;
    background: #b38b5f;
    color: #fff;
}


.footer-button:disabled {
    opacity: .35;
    cursor: not-allowed;
}


/* ========================================
   인증 팝업
======================================== */

.m1-verification-popup {
    width: min(480px, calc(100% - 30px));
    background: #fff;
    box-shadow: 0 25px 70px rgba(0,0,0,.3);
}


.verification-popup-header {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #e5e0da;
}


.verification-popup-header button {
    border: 0;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
}


.verification-popup-content {
    padding: 25px;
}


.verify-inner h3 {
    margin: 0 0 10px;
    text-align: center;
}


.verify-inner > p {
    text-align: center;
    color: #777;
    font-size: 13px;
}


.verify-inner input {
    width: 100%;
    box-sizing: border-box;
    margin: 6px 0;
    padding: 13px;
    border: 1px solid #ddd7d0;
}


.verify-inner button {
    width: 100%;
    margin: 6px 0;
    min-height: 43px;
    border: 1px solid #b38b5f;
    background: #b38b5f;
    color: #fff;
    cursor: pointer;
}


.verify-message {
    margin-top: 10px;
    color: #a37b50;
    font-size: 12px;
    line-height: 1.6;
}


/* ========================================
   MOBILE
======================================== */

@media(max-width: 850px){

    .m1-signup-overlay {
        padding: 10px;
        align-items: flex-end;
    }


    .m1-signup-popup {
        max-height: 96vh;
        border-radius: 8px 8px 0 0;
    }


    .m1-signup-header {
        height: 62px;
        flex-basis: 62px;
        padding: 0 18px;
    }


    .m1-signup-content {
        padding: 25px 18px 30px;
    }


    .signup-main-title {
        font-size: 24px;
    }


    .m1-signup-steps {
        gap: 3px;
    }


    .signup-step-indicator {
        min-width: 0;
        flex: 1;
    }


    .step-image {
        width: 45px;
        height: 45px;
    }


    .step-title {
        font-size: 10px;
    }


    .step-arrow {
        font-size: 16px;
    }


    .member-type-grid {
        grid-template-columns: 1fr 1fr;
    }


    .verification-grid {
        grid-template-columns: 1fr;
    }


    .form-grid {
        grid-template-columns: 1fr;
    }


    .selected-info {
        grid-template-columns: 1fr;
    }


    .selected-info div + div {
        border-left: 0;
        border-top: 1px solid #ded8d0;
    }


    .m1-signup-footer {
        padding: 12px;
    }


    .footer-button {
        min-width: 0;
        flex: 1;
    }

}


@media(max-width: 480px){

    .member-type-grid {
        grid-template-columns: 1fr;
    }


    .member-type-card {
        min-height: 170px;
    }


    .m1-signup-footer {
        gap: 5px;
    }


    .footer-button {
        font-size: 12px;
    }

}