@charset "UTF-8";

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100%;
    height: 100%;
    font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #222;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

input, button, select, textarea {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
}
input::placeholder {
    color: #bbb;
}

button {
    cursor: pointer;
}

/* ===== Layout ===== */
.page-wrap {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
}

/* ===== Header ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 67px;
    padding: 0 16px;
    position: relative;
    border-bottom: 1px solid #e2e2e2;
}

.header .btn-back {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header .btn-back svg,
.header .btn-back img {
    height: 100%;
    object-fit: contain;
}

.header .logo {
    width: 120px;
    height: 32px;
    cursor: pointer;
}

.header .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header .btn-user {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header .btn-user svg {
    width: 22px;
    height: 23px;
    stroke: #222;
    stroke-width: 1.5;
    fill: none;
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid #e2e2e2;
    padding: 22px 0;
    text-align: center;
    background: #fff;
}

.footer p {
    font-size: 14px;
    color: #999;
    line-height: 1;
}

/* ===== Page Title ===== */
.page-title {
    font-size: 30px;
    font-weight: 700;
    color: #222;
    text-align: center;
    line-height: 1.2;
    padding: 45px 0 30px;
}

/* ===== Section Title ===== */
.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
    margin-bottom: 6px;
}

.section-desc {
    font-size: 14px;
    color: #999;
    line-height: 1.3;
}

/* ===== Buttons ===== */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    transition: opacity 0.2s;
}

.btn:active {
    opacity: 0.8;
}

.btn-primary {
    background: #222;
    color: #fff;
}

.btn-kakao {
    background: #FEE500;
    color: #222;
    gap: 8px;
}

.btn-kakao .kakao-icon {
    width: 20px;
    height: 20px;
}

.btn-naver {
    background: #03C75A;
    color: #fff;
    gap: 8px;
}

.btn-naver .naver-icon {
    width: 20px;
    height: 20px;
}

.btn-outline {
    background: #fff;
    color: #222;
    border: 1px solid #e2e2e2;
}

.btn-red {
    background: #d91c1c;
    color: #fff;
}

.btn-gray {
    background: #f5f5f5;
    color: #999;
}

.btn + .btn {
    margin-top: 12px;
}

.btn-sm {
    height: 48px;
    border-radius: 4px;
    font-size: 14px;
}

/* ===== Form Elements ===== */
form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 10px;
    text-align: left;
}

.form-label .required {
    color: #d91c1c;
    margin-left: 2px;
}

.form-input {
    width: 100%;
    height: 48px;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    padding: 0 16px;
    font-size: 14px;
    color: #222;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: #d91c1c;
}

.form-input-with-btn {
    display: flex;
    gap: 8px;
}

/* 주소 selectbox 3단계(시/도·시/군/구·읍/면/동) 한 줄 배치 */
.region-select-row {
    display: flex;
    gap: 8px;
}

.region-select-row .form-input {
    flex: 1;
    min-width: 0;
}

.form-input-with-btn .form-input {
    flex: 1;
}

.form-input-with-btn .btn-inline {
    flex-shrink: 0;
    width: 96px;
    height: 48px;
    border: 1px solid #222;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
}
.form-input-with-btn .btn-inline:disabled {
    background: #E2E2E2;
    border-color: #D4D4D4;
    color: #999;
    cursor: default;
}

/* Radio Button Style */
.form-radio-group {
    display: flex;
    gap: 8px;
}

.form-radio-group .radio-item {
    flex: 1;
}

.form-radio-group .radio-item input[type="radio"] {
    display: none;
}

.form-radio-group .radio-item label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    color: #bbb;
    cursor: pointer;
    transition: all 0.2s;
}

.form-radio-group .radio-item input[type="radio"]:checked + label {
    border-color: #d91c1c;
    color: #d91c1c;
    font-weight: 500;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    display: none;
}

.form-check .check-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    background: url(/assets/img/checkbox-unchecked.svg) no-repeat center / contain;
    transition: all 0.2s;
}

.form-check input[type="checkbox"]:checked + .check-icon {
    background-image: url(/assets/img/checkbox-checked.svg);
}

.form-check .check-text {
    font-size: 14px;
    color: #222;
}

.form-check.agree-error .check-text {
    color: #d91c1c !important;
}

/* ===== Step Indicator ===== */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0 30px;
    gap: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    width: 96px;
}

.step-item .step-num {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    background: #f0f0f0;
    color: #999;
    border: 1.5px solid #ddd;
}

.step-item.active .step-num {
    background: #d91c1c;
    color: #fff;
    border-color: #d91c1c;
}

.step-item.completed .step-num {
    background: #f0f0f0;
    color: #999;
}

.step-item .step-text {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.step-item + .step-item::before {
    content: '';
    position: absolute;
    top: 18px;
    right: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 2px;
    background: #eee;
}

/* connector line between steps */
.step-connector {
    flex: 1;
    height: 0;
    border-top: 1px solid #E2E2E2;
    margin-top: -28px;
    margin-left: -23px;
    margin-right: -23px;
}

/* ===== Info Box ===== */
.info-box {
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 0 40px;
}
.info-row {
    border-bottom: 1px solid #e2e2e2;
}
.info-row:last-child {
    border-bottom: none;
}
.info-box .info-cell {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #e2e2e2;
}
.info-box .info-cell:last-child {
    border-bottom: none;
}

.info-box .info-icon {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-box .info-icon.green {
    background: rgba(118, 188, 33, 0.1);
}

.info-box .info-icon.blue {
    background: rgba(86, 135, 180, 0.1);
}

.info-box .info-icon.brown {
    background: rgba(166, 125, 79, 0.15);
}

.info-box .info-icon.gray {
    background: rgba(119, 119, 119, 0.1);
}

.info-box .info-icon img,
.info-box .info-icon svg {
    width: 14px;
    height: 16px;
}

.info-box .info-text .label {
    font-size: 13px;
    color: #999;
    line-height: 1.5;
}

.info-box .info-text .value {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    line-height: 1.5;
}

/* ===== Agreement Section ===== */
.agree-section {
    margin-top: 30px;
    margin-bottom: 30px;
}

.agree-all {
    width: 100%;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e2e2;
    margin-bottom: 16px;
}

.agree-all.form-check {
    display: inline-flex;
}

.agree-all .check-text {
    font-weight: 500;
}

.agree-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.agree-item .left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.agree-item .btn-arrow {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agree-item .btn-arrow svg,
.agree-item .btn-arrow img {
    width: 8px;
    height: 14px;
    object-fit: contain;
}

.agree-item .btn-arrow svg {
    stroke: #999;
    stroke-width: 2;
    fill: none;
}

.agree-sub {
    display: flex;
    gap: 20px;
    padding: 8px 0 0 32px;
}

/* ===== Tab Navigation ===== */
.tab-nav {
    display: flex;
    border-bottom: 2px solid #e2e2e2;
}

.tab-nav .tab-item {
    flex: 1;
    text-align: center;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 500;
    color: #999;
    position: relative;
}

.tab-nav .tab-item.active {
    color: #222;
    font-weight: 700;
}

.tab-nav .tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #222;
}

/* ===== Card ===== */
.card {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 12px;
}

/* ===== Popup/Modal ===== */
.popup-overlay.layer {
    display: none;
}
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.popup-overlay.layer .popup-box {
    position: relative;
    height: 530px;
    max-width: 460px;
    padding: 30px 10px;
}
.popup-box {
    background: #fff;
    border-radius: 4px;
    width: calc(100% - 60px);
    max-width: 420px;
    padding: 30px;
    text-align: center;
}

.popup-box .popup-title {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin-bottom: 12px;
}

.popup-box .popup-desc {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 24px;
}

.popup-box .popup-btns {
    display: flex;
    gap: 8px;
}

.popup-box .popup-btns .btn {
    flex: 1;
    height: 48px;
}

/* ===== Responsive Split Layout (Login/Signup) ===== */
.responsive-layout {
    min-height: 100vh;
}

.responsive-layout .desktop-header {
    display: none;
}

.responsive-layout .side-visual {
    display: none;
}

.responsive-layout .btn-back-content {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    cursor: pointer;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    max-width: none;
    padding: 0;
    z-index: 10;
}

.responsive-layout .page-wrap {
    flex: 1;
}

@media (min-width: 960px) {
    .responsive-layout {
        display: flex;
        flex-direction: column;
        height: 100vh;
    }

    /* Desktop Header - full width */
    .responsive-layout .desktop-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 68px;
        padding: 0 40px;
        background: #fff;
        border-bottom: 1px solid #e2e2e2;
        flex-shrink: 0;
        width: 100%;
    }

    .responsive-layout .desktop-header .logo {
        width: 120px;
        height: 32px;
        cursor: pointer;
    }

    /* PC: 헤더의 뒤로가기 숨기고, 콘텐츠 영역에 표시 */
    .responsive-layout .desktop-header .btn-back-desktop {
        display: none;
    }

    .responsive-layout .desktop-header .header-left {
        display: flex;
        align-items: center;
    }

    /* PC: 뒤로가기 - 타이틀 왼쪽 시작점, 세로 중앙 */
    .responsive-layout .page-wrap .page-title,
    .responsive-layout .page-wrap .pw-title,
    .responsive-layout .page-wrap .reauth-title,
    .responsive-layout .page-wrap .doc-title,
    .responsive-layout .page-wrap .hero-title,
    .responsive-layout .page-wrap .complete-title,
    .responsive-layout .page-wrap .result-title {
        position: relative;
        /*padding-left: 36px;*/
        /*text-align: left;*/
    }

    .responsive-layout .page-wrap .btn-back-content {
        display: inline-flex;
        align-items: center;
        margin-right: 8px;
        cursor: pointer;
    }

    .responsive-layout .page-wrap .btn-back-content img {
        width: 10px;
        height: 18px;
        object-fit: contain;
    }

    /* 가운데 정렬 타이틀: 뒤로가기를 왼쪽에 절대 배치 */
    .responsive-layout .page-wrap .doc-title,
    .responsive-layout .page-wrap .complete-title,
    .responsive-layout .page-wrap .result-title {
        position: relative;
        width: 100%;
        text-align: center;
    }
    .responsive-layout .page-wrap .doc-title .btn-back-content,
    .responsive-layout .page-wrap .complete-title .btn-back-content,
    .responsive-layout .page-wrap .result-title .btn-back-content {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        margin-right: 0;
    }

    /* hero-title: 로고 아래 위치, padding 다름 */
    .responsive-layout .page-wrap .hero-title .btn-back-content {
        top: 50%;
    }

    /* page-title: padding 비대칭(45px 0 30px) 보정하여 텍스트 세로 중앙 정렬 */
    .responsive-layout .page-wrap .page-title .btn-back-content {
        top: calc(50% + 7.5px);
    }

    .responsive-layout .desktop-header .btn-user {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .responsive-layout .desktop-header .btn-user svg {
        width: 22px;
        height: 23px;
        stroke: #222;
        stroke-width: 1.5;
        fill: none;
    }

    /* Split content area */
    .responsive-layout .split-body {
        display: flex;
        flex: 1;
        min-height: 0;
    }

    .responsive-layout .side-visual {
        display: block;
        flex: 0 0 50%;
        position: relative;
        overflow: hidden;
    }

    .responsive-layout .side-visual img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .responsive-layout .page-wrap {
        flex: 0 0 50%;
        max-width: none;
        margin: 0;
        min-height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow-y: auto;
    }

    .responsive-layout .page-wrap > * {
        width: 100%;
        max-width: 480px;
    }

    .responsive-layout .page-wrap .user-banner {
        padding-left: 30px;
        padding-right: 30px;
        min-height: 174px;
        height: 174px !important;
        flex-shrink: 0;
    }

    .responsive-layout .page-wrap .footer {
        max-width: 100%;
    }

    /* Hide mobile header on desktop */
    .responsive-layout .page-wrap .header {
        display: none;
    }

    /* ===== Info Box ===== */
    .info-row {
        display: flex;
        align-items: center;
    }
    .info-box .info-cell {
        border-bottom: none;
    }
    .info-box .info-cell + .info-cell {
        border-left: 1px solid #e2e2e2;
    }
}

/* ===== Utility ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-8 {
    margin-top: 8px;
}

.mt-12 {
    margin-top: 12px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-24 {
    margin-top: 24px;
}

.mt-30 {
    margin-top: 30px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-12 {
    margin-bottom: 12px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.pt-20 {
    padding-top: 20px;
}

.pb-30 {
    padding-bottom: 30px;
}

.gap-8 {
    gap: 8px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

/* ===== Display ===== */
.d-none {
    display: none !important;
}

/* ===== Icon Sizes ===== */
.icon-80 {
    width: 80px;
    height: 80px;
}

.icon-60 {
    width: 60px;
    height: 60px;
}

.icon-40 {
    width: 40px;
    height: 40px;
}

.icon-24 {
    width: 24px;
    height: 24px;
}

.icon-16 {
    width: 16px;
    height: 16px;
}

/* ===== Form Utility ===== */
.form-input-pw {
    padding-right: 44px;
}

.form-input-timer {
    padding-right: 70px;
}

.mb-0 {
    margin-bottom: 0;
}

/* ===== Absolute Position Utility ===== */
.header-action-right {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

/* ===== Timer Span ===== */
.input-timer {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #d91c1c;
    font-weight: 600;
}

/* ===== Step Number Color States ===== */
.step-num-done {
    background: #666 !important;
    border-color: #666 !important;
}

.step-num-active {
    background: #D7282F !important;
    border-color: #D7282F !important;
}


/* Step icon sizes (from Figma spec) */
.step-num .step-icon-user {
    width: 18px;
    height: 18px;
    max-width: none;
}

.step-num .step-icon-info {
    width: 17px;
    height: 17px;
    max-width: none;
    margin-left: 4px;
}

.step-num .step-icon-check {
    width: 18px;
    height: 15px;
    max-width: none;
}

/* Channel value display */
.channel-value-flex {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Email edit input */
.email-edit-input {
    flex: 1;
    height: 36px;
    font-size: 14px;
}

.step-num-pending {
    background: #E5E5E5 !important;
    border-color: #E5E5E5 !important;
}

.step-icon-white {
    filter: brightness(0) invert(1);
}

/* ===== Logo Sizes ===== */
.logo-sm img {
    height: 32px;
    width: auto;
}

.logo-lg img {
    width: 150px;
    height: 40px;
}

/* ===== Popup Confirm ===== */
.popup-box-confirm {
    padding: 40px 24px 24px;
    max-width: 360px;
}

.popup-box-confirm .popup-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.popup-box-confirm .popup-desc {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.popup-box-confirm .popup-btns {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.popup-box-confirm .popup-btns .btn {
    flex: 1;
    height: 56px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.popup-box-confirm .popup-btns .btn-cancel {
    background: #fff;
    color: #222;
    border: 1px solid #e2e2e2;
}

.popup-box-confirm .popup-btns .btn-confirm {
    background: #222;
    color: #fff;
}

/* ========== notice-popup =============*/
.notice-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.45);
}

.notice-popup.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-popup-box {
    width: 90%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

.notice-popup-content {
    min-height: 220px;
    padding: 32px 24px;
    text-align: center;
}

.notice-popup-bottom {
    display: flex;
    border-top: 1px solid #eee;
}

.notice-popup-bottom button {
    flex: 1;
    height: 48px;
    border: 0;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}

.notice-popup-bottom button + button {
    border-left: 1px solid #eee;
}

.notice-popup-box {
    position: relative;
}

.notice-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    font-size: 24px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}.notice-popup {
     display: none;
 }

.notice-popup.show {
    display: block;
}

.notice-popup-close:hover {
    color: #222;
}

/* ===== Reauth Section ===== */
.reauth-btn-full {
    width: 100%;
}

.alt-auth-link {
    text-align: center;
    margin-top: 30px;
}

.alt-auth-link a {
    font-size: 14px;
    color: #999;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ===== Agree Locked (필수 약관) ===== */
.agree-locked {
    opacity: 0.6;
    pointer-events: none;
}

.agree-locked .check-icon-locked {
    opacity: 0.5;
}

.agree-lock-badge {
    font-size: 11px;
    color: #999;
    background: #f0f0f0;
    border-radius: 4px;
    padding: 2px 8px;
    flex-shrink: 0;
}

/* ===== Result Icon Relative ===== */
.result-icon-relative {
    position: relative;
}

/* ===== Find ID Result Description ===== */
.find-result-desc {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* ===== Page Subtitle (terms/privacy header) ===== */
.page-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

/* ===== Page Content Top Padding ===== */
.page-content-pt {
    padding-top: 30px;
}

/* ===== Footer Links ===== */
/* 한글은 어절 단위로 끊는다 — 기본값은 글자 단위라
   "이미 웰크론 멤버스 회원입니 / 다!" 처럼 낱자가 다음 줄로 넘어간다.
   긴 영문·URL 은 overflow-wrap 이 필요할 때만 끊는다
   (anywhere 를 쓰면 최소 너비가 바뀌어 좁은 칸의 짧은 숫자까지 쪼개진다). */
.responsive-layout {
    word-break: keep-all;
    overflow-wrap: break-word;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
    /* 링크가 4개(멤버십 등급 안내 추가)라 좁은 폭에서는 다음 줄로 넘긴다 */
    flex-wrap: wrap;
    row-gap: 8px;
}

.footer-links a {
    font-size: 14px;
    color: #999;
}

/* 구분자는 링크에 붙여 그린다 — 독립 요소로 두면 줄바꿈 시 구분자만 줄 끝에 남는다.
   마지막 항목 뒤에는 붙지 않는다. */
.footer-links a:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 1px;
    height: 12px;
    background: #E6E6E6;
    vertical-align: middle;
    /* 좌우 여백을 같게 준다 — column-gap 과 겹치면 한쪽으로 쏠린다.
       그래서 .footer-links 의 column-gap 은 0 이고 간격은 여기서만 만든다. */
    margin: 0 10px;
}

/* 간격은 구분자의 좌우 margin 이 만든다 (위 ::after) — 여기서 또 주면 겹쳐 쏠린다 */
.footer-links {
    column-gap: 0;
}

/* 좁은 화면: 링크 4개 + 구분자가 14px/20px 이면 367px 이 필요해 375px 를 넘는다.
   13px/16px 로 줄이면 333px 라 360px 기기에서도 한 줄에 들어간다.
   줄을 나누면 마지막 항목만 떨어져 보여 어색하므로 크기를 줄이는 쪽을 택했다. */
@media (max-width: 480px) {
    .footer-links {
        column-gap: 0;
        flex-wrap: nowrap;
    }

    .footer-links a {
        font-size: 13px;
        white-space: nowrap;
    }

    .footer-links a:not(:last-child)::after {
        margin: 0 8px;
    }
}

/* ===== Welcome Section ===== */
.welcome-icon-wrap {
    margin-bottom: 16px;
}

/* ===== Address Wrap ===== */
.addr-wrap {
    width: 100%;
    height: 460px;
}

/* ===== Payment Row No Top Border ===== */
.payment-row-first {
    border-top: none;
    padding-top: 0;
}

/* ===== Agree Content Expandable ===== */
.agree-content-box {
    display: none;
    background: #f9f9f9;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    padding: 16px;
    margin: 8px 0 12px 32px;
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    max-height: 200px;
    overflow-y: auto;
}

/* ===== Anniversary Input ===== */
.anniversary-input-hidden {
    display: none;
    flex: 1 1 0;
    min-width: 0;
    width: 0;
    box-sizing: border-box;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    font-size: 16px;
    color: #222;
    height: 40px;
    padding: 0 12px;
    background: #fff;
}

/* ===== Reason Error ===== */
.reason-error {
    font-size: 13px;
    color: #d91c1c;
    margin-top: 12px;
    display: none;
}

/* ===== Section Header Margin Top ===== */
.section-header-mt {
    margin-top: 20px;
}

/* ===== Sitemap Logo Center ===== */
.logo-center {
    margin: 0 auto;
}

/* ===== 약관/동의 문서 번호 매기기 (terms.css 통합) ===== */
/* 문서 전체의 번호를 추적할 카운터 초기화 */
.terms-container {
    counter-reset: main-nav;
}

/* ol 내부의 기본 번호 매기기 기능을 끄고 카운터 적용 */
.terms-container ol {
    list-style: none;
    padding-left: 20px;
}

.terms-container ol li {
    counter-increment: main-nav; /* li를 만날 때마다 카운터 1씩 증가 */
    position: relative;
    margin-bottom: 10px;
}

.terms-container ol li::before {
    content: counter(main-nav) ". "; /* 숫자를 표시 */
    font-weight: bold;
    position: absolute;
    left: -20px;
}

/* ============================================================
   Dark Mode (자동 인식: prefers-color-scheme)
   - OS/브라우저가 다크모드일 때 사용자 페이지에 적용
   - 팔레트: bg #121212, surface #1e1e1e, elevated #242424,
            border #3a3a3a, text #ececec/#a8a8a8/#767676,
            accent red #ff5e5e, blue #7eb3ff
   ============================================================ */
@media (prefers-color-scheme: dark) {
    :root { color-scheme: dark; }

    body {
        color: #ececec;
        background: #121212;
    }

    .page-wrap,
    .split-body,
    .responsive-layout {
        background: #121212;
    }

    /* 헤더/푸터 */
    .header,
    .desktop-header,
    .mobile-header,
    .footer,
    .responsive-layout .desktop-header {
        background: #1e1e1e;
        border-color: #3a3a3a;
        border-bottom-color: #3a3a3a;
    }
    .footer p,
    .footer a { color: #a8a8a8; }
    .header .btn-back svg,
    .header .btn-back img,
    .header .btn-user img,
    .desktop-header .btn-back-desktop img,
    .desktop-header .btn-user img { filter: invert(1) hue-rotate(180deg); }
    .header .logo img,
    .desktop-header .logo img,
    .responsive-layout .desktop-header .logo img {
        filter: brightness(0) invert(1);
    }
    .header .btn-user svg,
    .responsive-layout .desktop-header .btn-user svg { stroke: #ececec; color: #ececec; }

    /* 페이지 타이틀 / 섹션 */
    .page-title,
    .page-content h1,
    .section-title { color: #ececec; }
    .btn-back-content img { filter: invert(1) hue-rotate(180deg); }

    /* 버튼 */
    .btn-primary {
        background: #ececec;
        color: #121212;
    }
    .btn-outline {
        background: transparent;
        color: #ececec;
        border-color: #3a3a3a;
    }
    .btn-red {
        background: #ff5e5e;
        color: #121212;
    }
    .btn-gray {
        background: #2d2d2d;
        color: #a8a8a8;
    }
    /* 카카오/네이버는 브랜드 컬러 유지 */

    /* 폼 */
    .form-label { color: #ececec; }
    .form-label .required { color: #ff5e5e; }

    .form-input,
    .anniversary-input-hidden,
    textarea,
    select {
        background: #242424;
        color: #ececec;
        border-color: #3a3a3a;
    }
    .form-input::placeholder,
    textarea::placeholder { color: #6a6a6a; }
    .form-input:focus { border-color: #ff5e5e; }

    .form-input-with-btn .btn-inline { color: #ececec; }
    .form-input-with-btn .btn-inline:disabled { color: #6a6a6a; }

    /* 라디오/체크 */
    .form-radio-group .radio-item label {
        background: #242424;
        color: #a8a8a8;
        border-color: #3a3a3a;
    }
    .form-radio-group .radio-item input[type="radio"]:checked + label {
        color: #ff5e5e;
        border-color: #ff5e5e;
    }
    /* 체크박스 — SVG 배경 이미지 유지하면서 다크 톤 보정
       (unchecked: 회색 테두리 → invert 로 밝은 테두리,
        checked: 빨강 배경 + 흰 체크 → 그대로 유지) */
    .form-check .check-icon { filter: invert(1) hue-rotate(180deg); }
    .form-check input[type="checkbox"]:checked + .check-icon { filter: none; }
    .form-check .check-text { color: #ececec; }
    .form-check.agree-error .check-text { color: #ff5e5e; }

    /* 카드/박스 */
    .info-box,
    .card {
        background: #1e1e1e;
        border-color: #3a3a3a;
    }
    .info-box .info-text .label { color: #a8a8a8; }
    .info-box .info-text .value { color: #ececec; }

    /* 탭 */
    .tab-nav .tab-item { color: #a8a8a8; }
    .tab-nav .tab-item.active { color: #ececec; }
    .tab-nav .tab-item.active::after { background: #ececec; }

    /* 모달/팝업 */
    .popup-overlay { background: rgba(0, 0, 0, 0.7); }
    .popup-box {
        background: #2a2a2a;
        color: #ececec;
        border-color: #3a3a3a;
    }
    .popup-box .popup-title { color: #ececec; }
    .popup-box .popup-desc { color: #a8a8a8; }

    /* autofill */
    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus,
    textarea:-webkit-autofill,
    select:-webkit-autofill {
        -webkit-text-fill-color: #ececec !important;
        -webkit-box-shadow: 0 0 0 1000px #242424 inset !important;
        caret-color: #ececec;
        transition: background-color 9999s ease-in-out 0s;
    }
}
