/* ── 리셋 & 기본 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.psc-reg-body {
    font-family: "Pretendard", -apple-system, "Apple SD Gothic Neo",
                 "Noto Sans KR", sans-serif;
    background: #fff;
    color: #191f28;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
.psc-reg-wrap {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 48px;
}

/* ── 탑바 ── */
.psc-reg-topbar {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.psc-reg-back {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 300;
    color: #191f28; text-decoration: none;
    background: none; border: none; cursor: pointer;
    flex-shrink: 0;
}
.psc-reg-topbar__title {
    font-size: .95rem;
    font-weight: 700;
    color: #191f28;
}

/* ── 프로그레스 바 ── */
.psc-reg-progress { padding: 0 24px 20px; }
.psc-reg-progress__track {
    height: 4px;
    background: #f2f4f6;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}
.psc-reg-progress__fill {
    height: 100%;
    background: #224471;
    border-radius: 2px;
    transition: width .4s ease;
}
.psc-reg-progress__labels {
    display: flex;
    justify-content: space-between;
}
.psc-reg-progress__labels span {
    font-size: .76rem;
    color: #b0b8c1;
    font-weight: 500;
}
.psc-reg-progress__labels span.active {
    color: #224471;
    font-weight: 700;
}
.psc-reg-progress__labels span.done { color: #224471; }

/* ── 히어로 ── */
.psc-reg-hero { padding: 8px 24px 24px; }
.psc-reg-hero__logo {
    height: 32px;
    display: block;
    margin-bottom: 16px;
    object-fit: contain;
}
.psc-reg-hero__title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #191f28;
    line-height: 1.35;
    margin-bottom: 6px;
}
.psc-reg-hero__sub {
    font-size: .88rem;
    color: #8b95a1;
    line-height: 1.5;
}

/* ── 에러 ── */
.psc-reg-error {
    margin: 0 24px 16px;
    background: #fff0f0;
    border: 1.5px solid #ffd6d6;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: .84rem;
    color: #ff4d4f;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* ── 폼 ── */
.psc-reg-form {
    padding: 0 24px;
    display: flex;
    flex-direction: column;
}

/* ══════════════════════════
   STEP 1 — 약관
══════════════════════════ */
.psc-terms-all {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 8px;
    cursor: pointer;
    user-select: none;
}
.psc-terms-all__label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}
.psc-terms-all__checkbox {
    width: 22px; height: 22px;
    border-radius: 6px;
    border: 2px solid #d1d5db;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all .15s;
    margin-top: 1px;
}
.psc-terms-all__checkbox.checked {
    background: #224471;
    border-color: #224471;
}
.psc-terms-all__text {
    font-size: .95rem;
    font-weight: 700;
    color: #191f28;
}
.psc-terms-all__desc {
    font-size: .78rem;
    color: #8b95a1;
    margin-top: 2px;
}

.psc-terms-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.psc-terms-item {
    padding: 14px 0;
    border-bottom: 1px solid #f2f4f6;
}
.psc-terms-item:first-child { border-top: 1px solid #f2f4f6; }
.psc-terms-item__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.psc-terms-item__left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.psc-terms-item__title {
    font-size: .88rem;
    font-weight: 600;
    color: #191f28;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.psc-terms-item__right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.psc-terms-badge {
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
}
.psc-terms-badge--req { background: #fee2e2; color: #dc2626; }
.psc-terms-badge--opt { background: #f2f4f6; color: #8b95a1; }

button.psc-terms-view {
    font-size: .75rem;
    color: #8b95a1;
    background: none;
    border: 1px solid #e5e8eb;
    border-radius: 6px;
    padding: 3px 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
    font-family: "Pretendard", sans-serif;
}
button.psc-terms-view:hover { color: #224471; border-color: #224471; }

.psc-terms-agree-wrap { display: flex; gap: 4px; }
.psc-terms-opt__btn {
    display: block;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1.5px solid #e5e8eb;
    background: #fff;
    font-size: .78rem;
    font-weight: 600;
    color: #8b95a1;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.psc-terms-opt__btn.active-yes {
    background: #224471;
    border-color: #224471;
    color: #fff;
}
.psc-terms-opt__btn.active-no {
    background: #f2f4f6;
    border-color: #e5e8eb;
    color: #4e5968;
}

.psc-terms-box {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: .82rem;
    color: #4e5968;
    line-height: 1.8;
}
.psc-terms-box.open {
    max-height: 200px;
    overflow-y: auto;
    padding: 12px 14px;
    margin-top: 10px;
}

/* ── 소셜 구분선 ── */
.psc-reg-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    color: #b0b8c1;
    font-size: .8rem;
    font-weight: 500;
}
.psc-reg-divider::before,
.psc-reg-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e8eb;
}

/* ── 소셜 버튼 ── */
.psc-reg-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.psc-reg-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 20px;
    border-radius: 12px;
    font-size: .94rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: filter .15s, transform .1s;
    font-family: "Pretendard", sans-serif;
}
.psc-reg-social-btn:active { transform: scale(.98); }
.psc-reg-social-btn--kakao { background: #FEE500; color: #000; }
.psc-reg-social-btn--kakao:hover { filter: brightness(.96); }
.psc-reg-social-btn--naver { background: #03C75A; color: #fff; }
.psc-reg-social-btn--naver:hover { filter: brightness(.96); }
.psc-reg-social-icon { flex-shrink: 0; width: 20px; height: 20px; }

/* ══════════════════════════
   STEP 2 — 회원정보 폼
══════════════════════════ */
.psc-reg-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}
.psc-reg-field:last-of-type { margin-bottom: 4px; }

.psc-reg-field__label {
    font-size: .86rem;
    font-weight: 700;
    color: #4e5968;
    display: flex;
    align-items: center;
    gap: 6px;
}
.psc-reg-field__req {
    font-size: .7rem;
    font-weight: 700;
    color: #fff;
    background: #224471;
    padding: 1px 6px;
    border-radius: 4px;
}

/* ── 인풋 (태그+클래스 조합으로 specificity 확보) ── */
.psc-reg-wrap input.psc-reg-input,
.psc-reg-wrap textarea.psc-reg-input,
.psc-reg-wrap select.psc-reg-input {
    width: 100%;
    padding: 15px 16px;
    background: #f4f6f9 !important;
    border: 1.5px solid transparent !important;
    border-radius: 12px;
    font-size: .94rem;
    color: #191f28 !important;
    outline: none;
    box-shadow: none !important;
    transition: border-color .2s, background .2s, box-shadow .2s;
    font-family: "Pretendard", sans-serif;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.psc-reg-wrap input.psc-reg-input:focus,
.psc-reg-wrap textarea.psc-reg-input:focus,
.psc-reg-wrap select.psc-reg-input:focus {
    border-color: #224471 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(34,68,113,.08) !important;
}
.psc-reg-wrap input.psc-reg-input::placeholder,
.psc-reg-wrap textarea.psc-reg-input::placeholder { color: #b0b8c1; }
.psc-reg-wrap textarea.psc-reg-input { resize: vertical; min-height: 100px; }
.psc-reg-wrap select.psc-reg-input { cursor: pointer; }

/* 비밀번호 인풋 패딩 (토글 버튼 공간) */
.psc-reg-wrap input.psc-reg-input[type="password"],
.psc-reg-wrap input.psc-reg-input[type="text"] {
    padding-right: 48px;
}

/* ── 인풋 + 중복확인 행 ── */
.psc-reg-field__row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.psc-reg-field__row input.psc-reg-input {
    flex: 1;
    min-width: 0;
}

/* ── 중복확인 버튼 ── */
button.psc-reg-check-btn {
    white-space: nowrap;
    padding: 0 16px;
    background: #f2f4f6;
    color: #4e5968;
    border: 1.5px solid #e5e8eb;
    border-radius: 12px;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    align-self: stretch;
    transition: all .15s;
    font-family: "Pretendard", sans-serif;
    outline: none !important;
    box-shadow: none !important;
}
button.psc-reg-check-btn:hover,
button.psc-reg-check-btn:focus {
    background: #e5e8eb;
    border-color: #224471;
    color: #224471 !important;   /* 테마 hover 색상 override */
    outline: none;
}
button.psc-reg-check-btn:active {
    background: #d4dce8;
    color: #224471 !important;
    transform: scale(.98);
}


/* ── 비밀번호 래퍼 ── */
.psc-reg-input-wrap {
    position: relative;
    display: block;
}
button.psc-reg-pwd-toggle {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: .9rem;
    padding: 4px;
    color: #b0b8c1;
    line-height: 1;
    outline: none !important;
    box-shadow: none !important;
}

/* ── 힌트 텍스트 ── */
.psc-reg-hint {
    font-size: .78rem;
    min-height: 18px;
    font-weight: 500;
}
.psc-reg-hint.success { color: #16a34a; }
.psc-reg-hint.error   { color: #dc2626; }

/* ── 비밀번호 강도 ── */
.psc-pass-strength-wrap { margin-top: 2px; }

/* ── 라디오 ── */
.psc-reg-radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.psc-reg-radio span {
    display: block;
    padding: 8px 16px;
    border: 1.5px solid #e5e8eb;
    border-radius: 8px;
    font-size: .86rem;
    color: #4e5968;
    cursor: pointer;
    transition: all .15s;
    font-family: "Pretendard", sans-serif;
}
.psc-reg-radio:has(input:checked) span {
    background: #224471;
    border-color: #224471;
    color: #fff;
    font-weight: 700;
}

/* ── 체크박스 ── */
.psc-reg-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    color: #4e5968;
    cursor: pointer;
}
.psc-reg-checkbox input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: #224471;
    cursor: pointer;
}

/* ── 공통 버튼 ── */
button.psc-reg-btn,
a.psc-reg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 17px;
    background: #224471 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, transform .1s;
    font-family: "Pretendard", sans-serif;
    letter-spacing: -.01em;
    margin-top: 8px;
    outline: none !important;
    box-shadow: none !important;
}
.psc-reg-btn:hover  { background: #1a3459 !important; }
.psc-reg-btn:active { transform: scale(.98); }
.psc-reg-btn--outline {
    background: #f2f4f6 !important;
    color: #4e5968 !important;
    margin-top: 10px;
}
.psc-reg-btn--outline:hover { background: #e5e8eb !important; }

/* ── 하단 링크 ── */
.psc-reg-footer-link {
    text-align: center;
    font-size: .84rem;
    color: #8b95a1;
    padding: 20px 24px 0;
}
.psc-reg-footer-link a {
    color: #224471;
    font-weight: 700;
    text-decoration: none;
}
.psc-reg-footer-link a:hover { text-decoration: underline; }

/* ══════════════════════════
   가입 완료
══════════════════════════ */
.psc-reg-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 24px 40px;
    text-align: center;
}
.psc-reg-done__circle {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: #224471;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(34,68,113,.25);
}
.psc-reg-done__title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #191f28;
    margin-bottom: 12px;
}
.psc-reg-done__name {
    font-size: .95rem;
    color: #4e5968;
    line-height: 1.8;
    margin-bottom: 8px;
}
.psc-reg-done__sub {
    font-size: .86rem;
    color: #8b95a1;
    line-height: 1.7;
    margin-bottom: 32px;
}
.psc-reg-done .psc-reg-btn { max-width: 320px; }

/* ── 반응형 ── */
@media (max-width: 480px) {
    .psc-reg-hero    { padding: 8px 20px 20px; }
    .psc-reg-form    { padding: 0 20px; }
    .psc-reg-error   { margin: 0 20px 16px; }
    .psc-reg-progress { padding: 0 20px 16px; }
}
