.jm-member-stage {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    padding: 56px 20px 64px;
    width: 100%;
    background: #f5f7fb;
    font-family: Pretendard, "Malgun Gothic", sans-serif;
    color: #20344f;
}

.jm-member-stage *,
.jm-member-stage *::before,
.jm-member-stage *::after {
    box-sizing: border-box;
}

.jm-member-card {
    width: min(440px, 100%);
    margin: 0 auto;
    padding: 40px;
    border: 1px solid #e1e8f2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(36, 57, 88, 0.05);
    min-width: 0;
}

.jm-member-register,
.jm-member-register {
    width: min(640px, 100%);
}

.jm-member-profile,
.jm-member-home {
    width: min(620px, 100%);
}

.jm-member-edit {
    width: min(620px, 100%);
}

.jm-member-find {
    width: min(560px, 100%);
}

.jm-member-complete {
    width: min(480px, 100%);
}

.jm-member-withdraw {
    width: min(540px, 100%);
}

.jm-member-heading {
    margin: 0 0 28px;
    text-align: center;
}

.jm-member-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: 0 auto 20px;
    border-radius: 12px;
    background: #edf3ff;
    color: #2760e8;
    font-size: 23px;
    font-weight: 800;
}

.jm-member-heading h1 {
    margin: 0 0 10px;
    color: #20344f;
    font-size: 26px;
    letter-spacing: -0.04em;
    line-height: 1.35;
}

.jm-member-heading p,
.jm-member-intro,
.jm-member-card > p {
    margin: 0 0 18px;
    color: #8393a9;
    font-size: 13px;
    line-height: 1.75;
}

.jm-member-notice,
.jm-member-error,
.jm-member-callout {
    margin: 18px 0;
    padding: 13px 15px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.jm-member-notice {
    background: #eaf8f1;
    color: #177448;
}

.jm-member-error {
    background: #fff0f0;
    color: #ac2634;
}

.jm-member-callout {
    background: #f4f7fc;
    color: #526a88;
}

.jm-member-form {
    display: grid;
    gap: 18px;
    margin: 26px 0 20px;
    min-width: 0;
}

.jm-field {
    display: grid;
    gap: 8px;
    min-width: 0;
    color: #455e7e;
    font-size: 13px;
    font-weight: 600;
}

.jm-field small,
.jm-check small {
    color: #8495ac;
    font-size: 11px;
    font-weight: 400;
}

.jm-field input,
.jm-field select,
.jm-field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    background: #fff;
    color: #20344f;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
}

.jm-field textarea {
    height: auto;
    min-height: 100px;
    padding: 12px 14px;
    resize: vertical;
}

.jm-field input::placeholder {
    color: #a1aec0;
    font-size: 13px;
}

.jm-field input:focus,
.jm-field select:focus,
.jm-field textarea:focus {
    outline: 0;
    border-color: #6b98f5;
    box-shadow: 0 0 0 3px #edf3ff;
}

.jm-field input[readonly] {
    background: #f6f8fb;
    color: #667b97;
}

.jm-password-field {
    position: relative;
    display: block;
}

.jm-password-field input {
    padding-right: 64px;
}

.jm-password-field button {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 7px;
    border: 0;
    background: transparent;
    color: #7289a7;
    font-size: 12px;
    cursor: pointer;
}

.jm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #d8e1ed;
    border-radius: 8px;
    background: #fff;
    color: #4e6380;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.jm-button:hover {
    background: #f7f9fc;
}

.jm-button.jm-primary {
    border-color: #2860eb;
    background: #2860eb;
    color: #fff;
}

.jm-button.jm-primary:hover {
    background: #1e52d5;
}

.jm-button.jm-danger {
    border-color: #c93748;
    background: #c93748;
    color: #fff;
}

.jm-member-form > .jm-button {
    width: 100%;
    min-height: 48px;
    margin-top: 2px;
    font-size: 14px;
}

.jm-member-links,
.jm-member-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #7c8ea7;
    font-size: 12px;
}

.jm-member-links a,
.jm-member-foot a {
    color: #557092;
    text-decoration: none;
}

.jm-member-links a:hover,
.jm-member-foot a:hover {
    color: #2860eb;
    text-decoration: underline;
}

.jm-member-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #e7edf5;
    color: #8a99ae;
    font-size: 12px;
}

.jm-member-foot a {
    color: #2860eb;
    font-weight: 600;
}

.jm-member-section {
    display: grid;
    gap: 15px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.jm-member-section legend {
    position: static;
    width: auto;
    margin-bottom: 2px;
    padding: 0 0 10px;
    overflow: visible;
    line-height: 1.5;
    text-indent: 0;
    border-bottom: 1px solid #e7edf5;
    color: #344a68;
    font-size: 15px;
    font-weight: 700;
}

.jm-register-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.jm-register-channels {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid #e7edf5;
}

.jm-register-channels p {
    margin: 0;
}
.jm-register-channels > strong,
.jm-register-channels > p {
    flex-basis: 100%;
}
.jm-register-channels > .jm-check {
    margin: 0;
}

.jm-member-channel-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.jm-member-channel-options > .jm-check {
    margin: 0;
    white-space: nowrap;
}

.jm-term-item[hidden] {
    display: none;
}

.jm-field-hint {
    color: #8393a9;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.65;
}

.jm-term-item {
    padding: 13px 15px;
    border: 1px solid #e1e8f2;
    border-radius: 8px;
    background: #f8fafd;
}

.jm-term-item summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 28px;
    list-style: none;
    color: #435c7c;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.jm-term-item summary::-webkit-details-marker {
    display: none;
}
.jm-term-item summary::before {
    content: '';
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin: 0 3px 0 1px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
}
.jm-term-item summary::after {
    content: '내용 보기';
    flex-shrink: 0;
    margin-left: auto;
    padding: 3px 8px;
    border: 1px solid #dce5f0;
    border-radius: 5px;
    background: #fff;
    color: #71839b;
    font-size: 11px;
    font-weight: 400;
}
.jm-term-item summary:hover,
.jm-term-item details[open] summary {
    color: #2457a6;
}
.jm-term-item details[open] summary::before {
    transform: rotate(45deg);
}
.jm-term-item details[open] summary::after {
    content: '접기';
    border-color: #cbdcf4;
    background: #edf3fc;
    color: #2457a6;
}
.jm-term-item summary:focus-visible {
    outline: 2px solid #8bb8fa;
    outline-offset: 4px;
    border-radius: 4px;
}

.jm-term-body {
    max-height: 200px;
    margin: 12px 0;
    overflow: auto;
    color: #60738e;
    font-size: 12px;
    line-height: 1.8;
    white-space: normal;
}

.jm-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #526783;
    font-size: 13px;
    line-height: 1.6;
}

.jm-check input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: #2860eb;
}

.jm-member-tabs {
    display: flex;
    gap: 4px;
    margin: 0 0 22px;
    padding: 4px;
    border-radius: 9px;
    background: #f1f4f9;
}

.jm-member-tabs a {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 6px;
    border-radius: 7px;
    color: #71839b;
    font-size: 12px;
    text-align: center;
    text-decoration: none;
}

.jm-member-tabs a[aria-current="page"] {
    background: #fff;
    color: #2860eb;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(32, 52, 79, 0.08);
}

.jm-find-panel > p,
.jm-member-policy,
.jm-member-card > p {
    color: #60738e;
    font-size: 13px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.jm-member-complete,
.jm-member-withdraw {
    text-align: center;
}

.jm-complete-symbol {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #eaf8f1;
    color: #16855b;
    font-size: 24px;
    font-weight: 700;
}

.jm-member-complete h2 {
    margin: 0 0 12px;
    color: #20344f;
    font-size: 20px;
}

.jm-status-list {
    display: grid;
    gap: 0;
    margin: 20px 0;
    padding: 0;
    border: 1px solid #e2e9f2;
    border-radius: 9px;
    list-style: none;
    text-align: left;
}

.jm-status-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    color: #667b97;
    font-size: 13px;
}

.jm-status-list li + li {
    border-top: 1px solid #edf1f6;
}

.jm-status-list strong {
    color: #354c6a;
}

.jm-member-profile,
.jm-member-home {
    text-align: left;
}

.jm-profile-summary {
    display: grid;
    gap: 5px;
    margin-bottom: 22px;
    color: #8495ac;
    font-size: 13px;
}

.jm-profile-summary strong {
    color: #20344f;
    font-size: 18px;
}

.jm-profile-grid {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    margin: 0;
    border-top: 1px solid #e7edf5;
}

.jm-profile-grid dt,
.jm-profile-grid dd {
    min-width: 0;
    margin: 0;
    padding: 13px 12px;
    border-bottom: 1px solid #e7edf5;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.55;
}

.jm-profile-grid dt {
    color: #71839b;
}

.jm-profile-grid dd {
    color: #354c6a;
    font-weight: 600;
}

.jm-member-actions {
    justify-content: flex-end;
    margin-top: 22px;
}

.jm-member-logout {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.jm-text-button {
    border: 0;
    background: transparent;
    color: #7c8ea7;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.jm-member-welcome {
    margin: 0 0 20px !important;
    color: #354c6a !important;
    font-size: 19px !important;
    font-weight: 700;
}

.jm-member-menu {
    display: grid;
    gap: 9px;
    margin-top: 20px;
}

.jm-member-menu a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 15px;
    border: 1px solid #e1e8f2;
    border-radius: 8px;
    color: #526783;
    font-size: 13px;
    text-decoration: none;
}

.jm-member-menu a:hover {
    border-color: #b9ccf1;
    background: #f7f9ff;
}

.jm-member-policy {
    margin: 18px 0;
    padding: 16px;
    border-radius: 8px;
    background: #f6f8fc;
    text-align: left;
    white-space: pre-wrap;
}

.jm-member-withdraw .jm-member-actions {
    justify-content: center;
}

@media (max-width: 600px) {
    .jm-member-stage {
        padding: 28px 14px 36px;
    }

    .jm-member-card {
        padding: 28px 20px;
        border-radius: 13px;
    }

    .jm-member-heading h1 {
        font-size: 23px;
    }

    .jm-register-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .jm-member-channel-options {
        column-gap: 16px;
    }

    .jm-member-channel-options > .jm-check {
        gap: 6px;
        font-size: 12px;
    }

    .jm-member-tabs {
        gap: 2px;
    }

    .jm-member-tabs a {
        padding: 9px 4px;
        font-size: 11px;
    }

    .jm-profile-grid {
        grid-template-columns: 105px minmax(0, 1fr);
    }

    .jm-profile-grid dt,
    .jm-profile-grid dd {
        padding: 11px 8px;
        font-size: 12px;
    }

    .jm-member-actions {
        justify-content: stretch;
    }

    .jm-member-actions > .jm-button {
        flex: 1 1 auto;
    }
}

/* Registration validation keeps the correction target visible after the dialog. */
.jm-member-register input[aria-invalid="true"] {
    border-color: #c4493a;
    outline: 1px solid #c4493a;
    outline-offset: 1px;
}
