* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

    *, *::before, *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

:root {
    --navy-dark: #0f2044;
    --navy: #1a2f5a;
    --gold: #c5a028;
    --kakao: #fee500;
    --kakao-text: #3c1e1e;
    --white: #fff;
    --bg: #f5f6fa;
    --border: #e2e6f0;
    --text: #1a2f5a;
    --text-muted: #5a6a8a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.header-wrapper {
    position: relative;
    width: 100%;
}

.topbar {
    background: var(--navy-dark);
    padding: 6px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-size: 12px;
}

    .topbar a {
        color: #fff !important;
        text-decoration: none;
    }

        .topbar a:hover {
            color: #fff;
        }

.header-wrapper > header {
    background: var(--white);
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #edf0f6;
    box-shadow: 0 1px 10px rgba(26,47,90,0.06);
    position: relative;
    z-index: 100;
}

.img-logo {
    display: flex;
    align-items: center;
    height: 44px;
    max-width: 220px;
    overflow: hidden;
}

    .img-logo a {
        display: flex;
        align-items: center;
        height: 44px;
        text-decoration: none;
    }

    .img-logo img {
        height: 34px !important;
        width: auto !important;
        max-width: 100% !important;
        display: block;
        object-fit: contain;
    }

.header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--kakao);
    color: var(--kakao-text) !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    padding: 11px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(254,229,0,0.25);
    white-space: nowrap;
}

.progress-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

    .progress-step.active {
        color: var(--navy);
    }

    .progress-step.done {
        color: var(--gold);
    }

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.progress-step.active .step-num {
    background: var(--navy);
    color: #fff;
    animation: stepPulse 1.1s ease-in-out infinite;
}

.progress-step.done .step-num {
    background: var(--gold);
    color: #fff;
}

@keyframes stepPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(26,47,90,0.55);
    }

    50% {
        box-shadow: 0 0 0 7px rgba(26,47,90,0);
    }
}

.progress-arrow {
    margin: 0 12px;
    color: #d7ddea;
    font-size: 14px;
    flex-shrink: 0;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px 40px;
}

.form-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(26,47,90,0.10);
    padding: 36px 40px;
    width: 100%;
    max-width: 520px;
}

.form-header {
    text-align: center;
    margin-bottom: 28px;
}

.form-badge {
    display: inline-block;
    background: rgba(197,160,40,0.12);
    border: 1px solid rgba(197,160,40,0.4);
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 100px;
    margin-bottom: 10px;
}

.form-header h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 6px;
}

.form-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.auth-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
    display: block;
}

.auth-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 28px;
}

.auth-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 12px 8px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: var(--white);
    position: relative;
}

    .auth-btn.selected {
        border-color: var(--navy);
        background: #f0f4ff;
    }

    .auth-btn .auth-icon {
        font-size: 24px;
        line-height: 1;
    }

    .auth-btn .auth-name {
        font-size: 12px;
        font-weight: 700;
        color: var(--navy);
        text-align: center;
    }

    .auth-btn .auth-sub {
        font-size: 10px;
        color: var(--text-muted);
        text-align: center;
    }

    .auth-btn input[type=radio] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0 24px;
}

.field-group {
    margin-bottom: 20px;
}

.field-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
    display: block;
}

.req {
    color: #e74c3c;
    margin-left: 3px;
}

.field-input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 13px 16px;
    font-size: 16px;
    color: var(--navy);
    outline: none;
    transition: border-color .2s;
}

    .field-input:focus {
        border-color: var(--navy);
    }

    .field-input::placeholder {
        color: #b0b8cc;
        font-weight: 400;
    }

.split-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .split-inputs input {
        flex: 1;
        min-width: 0;
        border: 1.5px solid var(--border);
        border-radius: 10px;
        padding: 13px 8px;
        font-size: 18px;
        font-weight: 700;
        color: var(--navy);
        text-align: center;
        letter-spacing: 3px;
        outline: none;
        transition: border-color .2s;
    }

        .split-inputs input:focus {
            border-color: var(--navy);
        }

        .split-inputs input::placeholder {
            font-size: 13px;
            letter-spacing: 0;
            font-weight: 400;
            color: #b0b8cc;
        }

.sep {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.jumin-back {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0 12px;
    background: #fff;
    transition: border-color .2s;
}

    .jumin-back:focus-within {
        border-color: var(--navy);
    }

    .jumin-back input {
        flex: 0 0 28px;
        width: 28px;
        border: none;
        outline: none;
        font-size: 18px;
        font-weight: 700;
        color: var(--navy);
        text-align: center;
        padding: 13px 0;
        background: transparent;
    }

.jumin-dots {
    display: flex;
    gap: 7px;
}

    .jumin-dots span {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #b0b8cc;
        display: block;
    }

.terms-section {
    background: var(--bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.terms-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
}

.all-agree {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--border);
    cursor: pointer;
}

    .all-agree input[type=checkbox] {
        width: 20px;
        height: 20px;
        accent-color: var(--navy);
        cursor: pointer;
    }

    .all-agree label {
        font-size: 14px;
        font-weight: 700;
        color: var(--navy);
        cursor: pointer;
    }

.term-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

    .term-item:last-child {
        border-bottom: none;
    }

    .term-item input[type=checkbox] {
        width: 18px;
        height: 18px;
        accent-color: var(--navy);
        cursor: pointer;
        flex-shrink: 0;
    }

    .term-item label {
        font-size: 13px;
        color: var(--text-muted);
        cursor: pointer;
        flex: 1;
    }

        .term-item label strong {
            color: var(--navy);
        }

.term-link {
    font-size: 12px;
    color: var(--navy);
    text-decoration: underline;
    white-space: nowrap;
    cursor: pointer;
}

.return-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff8e1;
    border: 2px solid #f0c040;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.7;
    color: #5a4000;
}

.return-notice-icon {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 1px;
}

.return-notice strong {
    color: #b8860b;
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: var(--kakao);
    color: var(--kakao-text);
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(254,229,0,0.4);
    transition: transform .15s;
}

    .btn-submit:active {
        transform: scale(0.98);
    }

.form-notice {
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.7;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    -webkit-overflow-scrolling: touch;
}

    .modal-overlay.active {
        display: flex;
    }

.modal-box {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}

    .modal-header h2 {
        font-size: 17px;
        font-weight: 800;
        color: var(--navy);
    }

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.9;
    color: var(--text-muted);
}

    .modal-body h3 {
        font-size: 14px;
        font-weight: 700;
        color: var(--navy);
        margin: 16px 0 6px;
    }

    .modal-body p {
        margin-bottom: 8px;
    }

    .modal-body table {
        width: 100%;
        border-collapse: collapse;
        margin: 8px 0;
        font-size: 12px;
    }

    .modal-body th,
    .modal-body td {
        border: 1px solid var(--border);
        padding: 8px;
        text-align: left;
    }

    .modal-body th {
        background: var(--bg);
        font-weight: 700;
        color: var(--navy);
    }

footer {
    background: var(--navy-dark);
    padding: 20px 40px;
    text-align: center;
}

    footer p {
        font-size: 12px;
        color: rgba(255,255,255,0.35);
    }

@media (max-width: 768px) {
    .topbar {
        justify-content: center;
        padding: 6px 12px;
        gap: 12px;
        font-size: 11px;
        flex-wrap: wrap;
    }

    .header-wrapper > header {
        height: 54px;
        padding: 0 12px;
    }

    .img-logo img {
        height: 28px !important;
    }

    .header-cta {
        padding: 9px 12px;
        font-size: 12px;
        border-radius: 10px;
    }

    .progress-bar {
        padding: 8px 10px;
        justify-content: flex-start;
    }

    .progress-step {
        font-size: 11px;
        gap: 5px;
    }

    .step-num {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .progress-arrow {
        margin: 0 8px;
        font-size: 12px;
    }

    main {
        padding: 18px 12px 28px;
    }

    .form-card {
        padding: 22px 16px;
        border-radius: 16px;
    }

    .form-header h1 {
        font-size: 18px;
    }

    .auth-methods {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .auth-btn {
        padding: 10px 6px;
        border-radius: 10px;
    }

        .auth-btn .auth-icon {
            font-size: 20px;
        }

        .auth-btn .auth-name {
            font-size: 11px;
        }

        .auth-btn .auth-sub {
            font-size: 9px;
        }

    .split-inputs input {
        font-size: 16px;
        padding: 11px 6px;
        letter-spacing: 1px;
    }

    .jumin-back input {
        font-size: 16px;
        padding: 11px 0;
    }

    footer {
        padding: 14px 16px;
    }
}

.term-badge.req {
    background: #e8eeff;
    color: #1a3fa0;
}

.term-badge.opt {
    background: #f0f0f0;
    color: #777;
}

.term-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
}

.term-view-btn {
    flex-shrink: 0;
    background: none;
    border: 1px solid #c5cce8;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    color: #4a5fa0;
    cursor: pointer;
    white-space: nowrap;
}

.terms-req-notice {
    font-size: 12px;
    color: #888;
    margin: 10px 4px 4px;
    line-height: 1.6;
}

.all-agree-row {
    padding: 12px 0px;
}

.all-agree-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    color: #0d2246;
}

    .all-agree-label input[type=checkbox] {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        accent-color: #0d2246;
        cursor: pointer;
    }
@media (max-width: 768px) {
    .progress-bar {
        padding: 8px 10px;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
    }

    .progress-step {
        font-size: 11px;
        gap: 5px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .progress-arrow {
        margin: 0 8px;
        font-size: 12px;
        flex-shrink: 0;
    }
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.9;
    color: var(--text-muted);
    min-height: 700px; /* ³»¿ëÀÌ ¾ø¾îµµ ÃÖ¼Ò ³ôÀÌ È®º¸ */
    height: auto !important;
}

/* ±âº» »óÅÂ´Â ¾È º¸ÀÓ */
.term-content-box {
    display: none;
}

    /* show Å¬·¡½º°¡ ºÙÀ¸¸é º¸ÀÓ */
    .term-content-box.show {
        display: block;
    }
/* ¸ð´Þ ¹è°æ */
.consent-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

    /* ¸ð´ÞÀÌ ¿­·ÈÀ» ¶§ (JS°¡ 'open' Å¬·¡½º¸¦ ºÙÀÓ) */
    .consent-modal-overlay.open {
        display: flex !important;
    }

/* ¸ð´Þ ¹Ú½º */
.consent-modal-box {
    display: flex;
    flex-direction: column;
    width: 90%; /* ¸ð¹ÙÀÏ/µ¥½ºÅ©Å¾ ´ëÀÀ */
    max-width: 480px;
    max-height: 80vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden; /* ³»ºÎ ³ÑÄ§ ¹æÁö */
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* 2. Çì´õ Á¤¸®: ÅØ½ºÆ® ¹× ´Ý±â ¹öÆ° ¹èÄ¡ */
.consent-modal-head {
    background: #0d2246;
    padding: 14px 20px;
    color: #fff;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Çì´õ Å©±â °íÁ¤ */
}

/* 3. º»¹® ½ºÅ©·Ñ ¹× Å×ÀÌºí ±úÁü ¹æÁö */
.consent-modal-body {
    padding: 20px;
    overflow-y: auto; /* ³»¿ë ±æ¾îÁö¸é ½ºÅ©·Ñ */
    flex: 1; /* ³²Àº °ø°£ Â÷Áö */
    font-size: 13px;
    line-height: 1.6;
}

    /* Å×ÀÌºí: th Å©±â Á¶Àý ¹× °¡µ¶¼º Çâ»ó */
    .consent-modal-body table {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
        margin: 12px 0;
        font-size: 11px; /* ±ÛÀÚ Å©±â Ãà¼Ò */
    }

    .consent-modal-body th {
        width: 25%;
        background: #f8f9fa;
        color: #0d2246;
        padding: 8px 6px; /* ÆÐµùÀ» »ìÂ¦ ÁÙ¿© °ø°£ È®º¸ */
        text-align: center;
        border: 1px solid #e2e6f0;
        font-size: 10.5px; /* ±ÛÀÚ Å©±â Á¶±Ý ´õ Ãà¼Ò */
        font-weight: 800; /* Bold »ìÂ¦ Ãß°¡ */
    }

    .consent-modal-head h3 {
        font-weight: 800 !important;
        margin: 10px 0 5px !important; /* À§¾Æ·¡ °£°Ýµµ »ìÂ¦ Á¶Á¤ */
        font-size: calc(0.8rem + .6vw);
    }

    .consent-modal-body td {
        padding: 10px 8px;
        border: 1px solid #e2e6f0;
        line-height: 1.5;
        word-break: break-all;
    }

/* ÇÏ´Ü ¹öÆ° ¿µ¿ª: ¿©¹é ¹× °£°Ý ¼öÁ¤ */
.consent-modal-foot {
    display: flex;
    gap: 8px;
    padding: 16px 20px; /* »óÇÏÁÂ¿ì ¿©¹é È®º¸ */
    border-top: 1px solid #eee;
    background: #fff;
}

.cm-btn-agree, .cm-btn-close {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.cm-btn-agree {
    background: #0d2246;
    color: #fff;
}

.cm-btn-close {
    background: #f0f0f0;
    color: #555;
}

/* ³»ºÎ ³»¿ë¹° ÀüÈ¯ */
.term-content-box {
    display: none;
}

    .term-content-box.show {
        display: block;
    }
