/* ─────────────────────────────────────────────────
   1. 추가 토큰 (main.css에 없는 것만)
───────────────────────────────────────────────── */
:root {
  --c-red:         #EF4444;
  --c-dark:        #0F172A;
  --shadow-sm:     0 2px 8px rgba(26,110,255,.08);
  --shadow-card:   0 8px 32px rgba(26,110,255,.10);
}

/* ─────────────────────────────────────────────────
   2. 가입페이지 body 배경 (랜딩페이지와 다르게)
───────────────────────────────────────────────── */
body {
  background: var(--c-bg2);
  min-height: 100vh;
}

/* ─────────────────────────────────────────────────
   3. 헤더 — 가입페이지는 항상 흰 배경 고정
      (랜딩의 fixed+투명 헤더를 sticky+불투명으로 override)
───────────────────────────────────────────────── */
.header {
  position: sticky;
  background: rgba(255,255,255,.97) !important;
  border-bottom-color: var(--c-border) !important;
  box-shadow: 0 2px 16px rgba(0,0,0,.05) !important;
}
/* 가입페이지 헤더 우측: 로그인 링크 영역 */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--c-muted);
}
.header-right a {
  color: var(--c-primary);
  font-weight: 600;
  transition: var(--trans);
}
.header-right a:hover { color: var(--c-primary2); }

/* ─────────────────────────────────────────────────
   4. Page Wrapper
───────────────────────────────────────────────── */
.page-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 52px 24px 80px;
}

/* ─────────────────────────────────────────────────
   5. Page Head (타이틀 영역)
───────────────────────────────────────────────── */
.page-head {
  text-align: center;
  margin-bottom: 48px;
}
.page-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(26,110,255,.07);
  border: 1px solid rgba(26,110,255,.18);
  border-radius: 50px;
  padding: 5px 16px;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 16px;
}
.page-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--c-primary);
  border-radius: 50%;
}
.page-title {
  font-family: var(--font-en);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  color: var(--c-dark);
  letter-spacing: -.025em;
  line-height: 1.15;
  margin-bottom: 10px;
}
.page-title span { color: var(--c-primary); }
.page-sub {
  font-size: 15px;
  color: var(--c-muted);
  line-height: 1.7;
}

/* ─────────────────────────────────────────────────
   6. 가입 순서 플로우차트
───────────────────────────────────────────────── */
.flow-wrap {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 36px 32px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
/* 상단 컬러 라인 */
.flow-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
}

.flow-label {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.flow-label::before {
  content: '';
  width: 18px; height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
}

/* 스텝 컨테이너 */
.flow-steps {
  display: flex;
  align-items: flex-start;
  position: relative;
}
.flow-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* 연결선 */
.flow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(50% + 28px);
  width: calc(100% - 56px);
  height: 2px;
  background: linear-gradient(90deg, var(--c-primary), rgba(26,110,255,.2));
  z-index: 0;
}
/* 화살표 머리 */
.flow-step:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 22px; right: 0;
  width: 0; height: 0;
  border-left: 7px solid rgba(26,110,255,.5);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  z-index: 2;
}

/* 원형 번호 */
.flow-num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary2));
  color: #fff;
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(26,110,255,.30);
  position: relative;
  z-index: 3;
  transition: var(--trans);
}
.flow-step:hover .flow-num {
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(26,110,255,.42);
}

/* 텍스트 */
.flow-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 6px;
  line-height: 1.35;
  padding: 0 4px;
}
.flow-desc {
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.6;
  padding: 0 6px;
}

/* 강조 칩 */
.flow-chip {
  display: inline-block;
  background: rgba(26,110,255,.07);
  border: 1px solid rgba(26,110,255,.18);
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-primary);
  margin-top: 7px;
}
.flow-chip.green {
  background: rgba(0,169,110,.07);
  border-color: rgba(0,169,110,.2);
  color: var(--c-green);
}
.flow-chip.orange {
  background: rgba(255,107,53,.07);
  border-color: rgba(255,107,53,.2);
  color: var(--c-accent);
}

/* ─────────────────────────────────────────────────
   7. 폼 카드
───────────────────────────────────────────────── */
.form-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 40px 40px 48px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
}

/* 섹션 소제목 */
.form-section-title {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin: 28px 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-section-title::before {
  content: '';
  width: 16px; height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
}
.form-section-title:first-child { margin-top: 0; }

/* 구분선 */
.form-divider {
  height: 1px;
  background: var(--c-border);
  margin: 28px 0;
}

/* 그리드 */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}
.form-grid .col-full { grid-column: 1 / -1; }

/* ─────────────────────────────────────────────────
   8. 폼 필드
───────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text);
}
.field label.req::after {
  content: ' *';
  color: var(--c-primary);
}

/* 입력 공통 — checkbox·radio 제외 */
.field input:not([type="checkbox"]):not([type="radio"]),
.field select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: var(--c-bg2);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-family: var(--font-ko);
  color: var(--c-text);
  outline: none;
  transition: var(--trans);
  appearance: none;
}
.field input:not([type="checkbox"]):not([type="radio"])::placeholder { color: #B5BFCF; }
.field input:not([type="checkbox"]):not([type="radio"]):focus,
.field select:focus {
  background: var(--c-white);
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(26,110,255,.10);
}
/* 검증 상태 */
.field input:not([type="checkbox"]).is-error {
  border-color: var(--c-red);
  background: #FFF5F5;
  box-shadow: 0 0 0 3px rgba(239,68,68,.09);
}
.field input:not([type="checkbox"]).is-ok {
  border-color: var(--c-green);
  background: #F0FDF8;
}

/* select 화살표 */
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* 패스워드 래퍼 */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--c-muted);
  font-size: 20px;
  cursor: pointer;
  transition: var(--trans);
  display: flex;
  align-items: center;
}
.pw-toggle:hover { color: var(--c-primary); }

/* 주소 행 */
.addr-row { display: flex; gap: 10px; }
.addr-row input { flex: 1; }
.btn-postcode {
  height: 46px;
  padding: 0 16px;
  background: var(--c-bg2);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-primary);
  white-space: nowrap;
  transition: var(--trans);
  flex-shrink: 0;
  cursor: pointer;
}
.btn-postcode:hover {
  background: rgba(26,110,255,.07);
  border-color: var(--c-primary);
}

/* 패스워드 강도 바 */
.pw-strength {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.pw-bar {
  flex: 1; height: 3px;
  background: var(--c-border);
  border-radius: 2px;
  transition: background .3s;
}
.pw-bar.active-1 { background: var(--c-red); }
.pw-bar.active-2 { background: var(--c-accent); }
.pw-bar.active-3 { background: #EAB308; }
.pw-bar.active-4 { background: var(--c-green); }
.pw-strength-text {
  font-size: 11px;
  color: var(--c-muted);
  margin-top: 4px;
}

/* 오류 메시지 */
.field-error {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-red);
  margin-top: 2px;
  animation: reg-fadeUp .2s ease;
}
.field-error::before {
  content: '!';
  width: 15px; height: 15px;
  background: var(--c-red);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
@keyframes reg-fadeUp {
  from { opacity:0; transform:translateY(4px); }
  to   { opacity:1; transform:translateY(0); }
}

/* 힌트 */
.field-hint {
  font-size: 12px;
  color: var(--c-muted);
  margin-top: 2px;
}

/* ─────────────────────────────────────────────────
   9. 약관 동의 박스
───────────────────────────────────────────────── */
.agree-box {
  background: var(--c-bg2);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-top: 4px;
}
.agree-box textarea {
  width: 100%;
  height: 100px;
  padding: 14px 16px;
  font-size: 12px;
  font-family: var(--font-ko);
  color: var(--c-muted);
  line-height: 1.75;
  background: transparent;
  border: none;
  resize: none;
  outline: none;
  display: block;
  border-bottom: 1.5px solid var(--c-border);
}
.agree-box label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  background: var(--c-white);
  transition: var(--trans);
}
.agree-box label:hover { background: rgba(26,110,255,.03); }
.agree-box input[type="checkbox"] {
  /* 브라우저 기본 체크박스 완전 복원 */
  appearance: checkbox !important;
  -webkit-appearance: checkbox !important;
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  min-height: 17px !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  border-radius: 3px !important;
  accent-color: var(--c-primary);
  cursor: pointer;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
/* ─────────────────────────────────────────────────
   10. 제출 버튼
───────────────────────────────────────────────── */
.submit-area {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.btn-submit {
  width: 100%;
  height: 54px;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary2) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-ko);
  border-radius: 50px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 28px rgba(26,110,255,.35);
  transition: var(--trans);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
}
.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c-primary2), var(--c-primary));
  opacity: 0;
  transition: var(--trans);
}
.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(26,110,255,.45);
}
.btn-submit:hover:not(:disabled)::before { opacity: 1; }
.btn-submit:disabled { opacity: .65; pointer-events: none; }
.btn-submit > * { position: relative; z-index: 1; }

/* 버튼 내부 아이콘 */
.btn-ico {
  font-size: 20px;
  font-family: 'Material Symbols Rounded';
  display: inline-flex;
}

/* 로딩 스피너 */
.btn-spinner {
  display: none;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: reg-spin .7s linear infinite;
  position: relative; z-index: 1;
}
@keyframes reg-spin { to { transform: rotate(360deg); } }

.btn-submit.is-loading .btn-ico     { display: none; }
.btn-submit.is-loading .btn-text    { display: none; }
.btn-submit.is-loading .btn-spinner { display: block; }

.login-link {
  font-size: 14px;
  color: var(--c-muted);
}
.login-link a {
  color: var(--c-primary);
  font-weight: 700;
  transition: var(--trans);
}
.login-link a:hover { color: var(--c-primary2); }

/* ─────────────────────────────────────────────────
   11. Toast 알림
───────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-ko);
  white-space: nowrap;
  max-width: calc(100vw - 48px);
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.toast.error   { background: #1E293B; color: #fff; }
.toast.success { background: var(--c-green); color: #fff; }
.toast .t-icon {
  font-family: 'Material Symbols Rounded';
  font-size: 20px;
}
.toast.error   .t-icon { color: var(--c-red); }
.toast.success .t-icon { color: #fff; }

/* ─────────────────────────────────────────────────
   12. 가입 완료 화면
───────────────────────────────────────────────── */
.success-screen {
  display: none;
  text-align: center;
  padding: 64px 32px;
}
.success-screen.show { display: block; }

.success-icon-wrap {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: rgba(0,169,110,.1);
  border: 2px solid rgba(0,169,110,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 44px;
  color: var(--c-green);
  animation: reg-popIn .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes reg-popIn {
  from { opacity:0; transform:scale(.5); }
  to   { opacity:1; transform:scale(1); }
}

.success-title {
  font-family: var(--font-en);
  font-size: 26px;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 12px;
  letter-spacing: -.02em;
}
.success-desc {
  font-size: 15px;
  color: var(--c-muted);
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.success-desc strong { color: var(--c-primary); font-weight: 700; }

/* ─────────────────────────────────────────────────
   13. 반응형
───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .page-wrap  { padding: 32px 16px 60px; }
  .form-card  { padding: 28px 20px 36px; }
  .form-grid  { grid-template-columns: 1fr; }
  .form-grid .col-full { grid-column: 1; }

  .flow-wrap  { padding: 28px 16px; }
  .flow-title { font-size: 12px; }
  .flow-desc  { display: none; }
  .flow-num   { width: 46px; height: 46px; font-size: 15px; }
  .flow-step:not(:last-child)::after {
    left: calc(50% + 23px);
    width: calc(100% - 46px);
    top: 23px;
  }
  .flow-step:not(:last-child)::before { top: 18px; }

  .toast { white-space: normal; text-align: left; border-radius: 16px; }
}