/* 가입 마법사 (회원선택→약관동의→정보입력→완료) — 흰 배경 + 네이비 포인트.
   tokens.css 변수 사용(--navy 등). onsaede 브랜드 고정(§2-5). */

.wiz-page {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(30, 58, 95, .06), transparent 60%),
    var(--bg, #fff);
  padding: 32px 16px 64px;
  box-sizing: border-box;
}
.wiz {
  max-width: 900px;
  margin: 0 auto;
}

/* 브랜드 헤더 — 좌상단 고정(§2-5 onsaede 로고 항상 노출) */
.wiz-brand {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 10px; margin-bottom: 26px; text-decoration: none;
}
.wiz-brand-logo {
  height: 32px; width: auto; display: block;
}
.wiz-brand .brand-name {
  font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--navy, #1E3A5F);
}
.wiz-brand .brand-domain { font-size: 13px; color: var(--gray-500, #6B7280); }

/* 진행 단계 바 */
.wiz-steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px; margin: 0 0 28px; padding: 0; list-style: none;
}
.wiz-step {
  position: relative; text-align: center; padding: 14px 6px 12px;
  border-radius: 12px; background: var(--gray-50, #F9FAFB);
  border: 1px solid var(--gray-200, #E5E7EB);
  color: var(--gray-400, #9CA3AF); font-weight: 600; font-size: 14px;
  transition: background .2s, color .2s, border-color .2s;
}
.wiz-step .wiz-step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; margin-right: 8px;
  background: var(--gray-200, #E5E7EB); color: var(--gray-500, #6B7280);
  font-size: 13px; font-weight: 700;
}
.wiz-step.is-active {
  background: var(--navy, #1E3A5F); color: #fff; border-color: var(--navy, #1E3A5F);
  box-shadow: 0 6px 18px rgba(30, 58, 95, .22);
}
.wiz-step.is-active .wiz-step-no { background: rgba(255, 255, 255, .22); color: #fff; }
.wiz-step.is-done { color: var(--navy, #1E3A5F); border-color: var(--navy-300, #8FA5C3); background: #fff; }
.wiz-step.is-done .wiz-step-no { background: var(--navy, #1E3A5F); color: #fff; }
@media (max-width: 560px) {
  .wiz-step { font-size: 12px; padding: 10px 4px; }
  .wiz-step .wiz-step-no { display: none; }
}

/* 카드(패널) */
.wiz-card-box {
  background: #fff; border: 1px solid var(--gray-200, #E5E7EB);
  border-radius: 18px; padding: 32px; box-shadow: 0 10px 30px rgba(17, 24, 39, .05);
}
.wiz-panel { display: none; }
.wiz-panel.is-active { display: block; animation: wizfade .25s ease; }
@keyframes wizfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wiz-panel h2 { margin: 0 0 4px; font-size: 20px; color: var(--gray-800, #1F2937); }
.wiz-panel .wiz-sub { margin: 0 0 24px; color: var(--gray-500, #6B7280); font-size: 14px; }

/* 1단계: 회원선택 카드 */
/* 회원 구분 카드 — 2026-07-21 3종으로 줄면서 4칸 고정 그리드가 문제가 됐다.
   4칸에 3개를 넣으면 카드가 좌측으로 몰리고 오른쪽 한 칸이 비어 '왼쪽 정렬'로 보인다.
   → 개수에 맞춰 늘어나되 컨테이너 안에서 가운데 오도록 flex + 중앙정렬.
   카드 폭에 상한(220px)을 둬 3개일 때 지나치게 넓어지지 않게 한다. */
.wiz-cards {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px;
}
.wiz-cards > .wiz-typecard { flex: 1 1 180px; max-width: 220px; }
@media (max-width: 720px) { .wiz-cards > .wiz-typecard { flex-basis: 140px; } }
.wiz-typecard {
  cursor: pointer; text-align: center; padding: 24px 12px;
  border: 2px solid var(--gray-200, #E5E7EB); border-radius: 16px; background: #fff;
  transition: border-color .18s, box-shadow .18s, transform .12s;
}
.wiz-typecard:hover { border-color: var(--navy-300, #8FA5C3); transform: translateY(-2px); }
.wiz-typecard.is-selected {
  border-color: var(--navy, #1E3A5F);
  box-shadow: 0 8px 24px rgba(30, 58, 95, .18);
}
.wiz-typecard .wiz-illust { width: 64px; height: 64px; margin: 0 auto 12px; display: block; }
.wiz-typecard .wiz-illust svg { width: 100%; height: 100%; }
.wiz-typecard .wiz-type-name { font-weight: 700; color: var(--gray-800, #1F2937); font-size: 15px; }
.wiz-typecard .wiz-type-desc { display: block; margin-top: 4px; font-size: 12px; color: var(--gray-500, #6B7280); }
.wiz-typecard input { position: absolute; opacity: 0; pointer-events: none; }

/* 2단계: 약관동의 */
.wiz-consent-all {
  display: flex; align-items: center; gap: 10px; padding: 16px 18px; margin-bottom: 16px;
  border: 1px solid var(--navy-300, #8FA5C3); border-radius: 12px; background: rgba(30, 58, 95, .04);
  font-weight: 700; color: var(--navy, #1E3A5F); cursor: pointer;
}
.wiz-consent { border: 1px solid var(--gray-200, #E5E7EB); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.wiz-consent-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer;
  background: var(--gray-50, #F9FAFB); font-size: 14px; color: var(--gray-800, #1F2937);
}
/* ★2026-07-29: 줄 아무 곳이나 한 번 클릭 = 펼침(오른쪽 끝 화살표만 눌러야 했던 문제 해결).
   클릭 가능한 줄임을 손 모양·hover 배경·펼침 상태 색으로 알린다. 제목(.wiz-consent-name)은
   label이 아니라 span이라 클릭해도 체크가 되지 않는다(동의는 왼쪽 체크박스로만). */
.wiz-consent-head.is-clickable { user-select: none; }
.wiz-consent-head.is-clickable:hover { background: rgba(30, 58, 95, .05); }
.wiz-consent-head.is-open { background: rgba(30, 58, 95, .06); }
.wiz-consent-name { cursor: pointer; }
.wiz-consent-head .wiz-req { color: var(--danger, #DC2626); font-size: 12px; font-weight: 700; margin-left: 4px; }
.wiz-consent-head .wiz-opt { color: var(--gray-400, #9CA3AF); font-size: 12px; margin-left: 4px; }
.wiz-consent-head .wiz-toggle { margin-left: auto; color: var(--navy-500, #4A6A95); font-size: 12px; background: none; border: 0; cursor: pointer; }
.wiz-term-box {
  max-height: 180px; overflow-y: auto; padding: 16px 18px; font-size: 12.5px; line-height: 1.7;
  color: var(--gray-700, #374151); white-space: pre-wrap; border-top: 1px solid var(--gray-200, #E5E7EB);
  background: #fff;
}
.wiz-term-box.is-collapsed { display: none; }
.wiz-check { width: 18px; height: 18px; accent-color: var(--navy, #1E3A5F); cursor: pointer; flex: none; }

/* 3단계: 정보입력 */
.wiz-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
@media (max-width: 620px) { .wiz-form-grid { grid-template-columns: 1fr; } }
.wiz-field { display: flex; flex-direction: column; gap: 6px; }
.wiz-field.wiz-col-2 { grid-column: 1 / -1; }
.wiz-label { font-size: 13px; font-weight: 600; color: var(--gray-700, #374151); }
.wiz-label .wiz-hint { font-weight: 400; color: var(--gray-400, #9CA3AF); font-size: 12px; margin-left: 6px; }
.wiz-input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; font-size: 15px;
  border: 1px solid var(--gray-300, #D1D5DB); border-radius: 10px; background: #fff;
  color: var(--gray-800, #1F2937); transition: border-color .15s, box-shadow .15s;
}
.wiz-input:focus { outline: none; border-color: var(--navy, #1E3A5F); box-shadow: 0 0 0 3px rgba(30, 58, 95, .12); }
.wiz-err { color: var(--danger, #DC2626); font-size: 12px; }
.wiz-note {
  grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px; background: rgba(37, 99, 235, .06);
  border: 1px solid rgba(37, 99, 235, .18); color: var(--gray-700, #374151); font-size: 13px; line-height: 1.6;
}
.wiz-note svg { width: 18px; height: 18px; color: var(--info, #2563EB); flex: none; margin-top: 1px; }

/* 회원가입 화면2 UX — 입력+버튼 한 줄 / 실시간 상태 메시지 */
.wiz-inrow { display: flex; gap: 8px; align-items: stretch; }
.wiz-inrow .wiz-input { flex: 1 1 auto; min-width: 0; }
.wiz-inbtn {
  flex: 0 0 auto; white-space: nowrap; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--navy, #1E3A5F); background: #fff; color: var(--navy, #1E3A5F);
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .15s, color .15s, opacity .15s;
}
.wiz-inbtn:hover:not(:disabled) { background: var(--navy, #1E3A5F); color: #fff; }
.wiz-inbtn:disabled { opacity: .5; cursor: not-allowed; }
.wiz-check-msg { font-size: 12.5px; min-height: 1em; color: var(--gray-500, #6B7280); }
.wiz-check-msg.is-ok { color: #16A34A; }
.wiz-check-msg.is-ok::before { content: '✓ '; }
.wiz-check-msg.is-err { color: var(--danger, #DC2626); }
.wiz-input[readonly] { background: var(--gray-50, #F9FAFB); color: var(--gray-500, #6B7280); }
.is-hidden { display: none !important; }

/* ── 본인 인증(2026-07-29) — 국내 대형 사이트 표준 패턴(EXAM4YOU 캡처 기준).
   원형 아이콘 2개를 나란히 두고 각자 [인증하기] → 인증 모달. 둘 중 하나만 완료하면 가입. */
.wiz-auth-box {
  border: 1px solid var(--gray-300, #D1D5DB);
  border-radius: 14px;
  padding: 28px 20px 24px;
  margin-bottom: 28px;
  background: #fff;
}
.wiz-auth-opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  justify-items: center;
}
.wiz-auth-opt { display: flex; flex-direction: column; align-items: center; text-align: center; }
.wiz-auth-circle {
  display: grid; place-items: center;
  width: 92px; height: 92px; margin-bottom: 14px;
  border-radius: 50%;
  background: var(--gray-100, #F3F4F6);
  color: var(--gray-500, #6B7280);
  transition: background .18s, color .18s, box-shadow .18s;
}
.wiz-auth-circle svg { width: 40px; height: 40px; }
.wiz-auth-opt:hover .wiz-auth-circle { background: rgba(30, 58, 95, .08); color: var(--navy, #1E3A5F); }
.wiz-auth-name { font-size: 15.5px; font-weight: 700; color: var(--gray-800, #1F2937); }
.wiz-auth-sub { font-size: 12.5px; color: #6B7684; margin-top: 4px; }
.wiz-auth-btn {
  margin-top: 14px;
  min-width: 148px; padding: 11px 18px;
  border: 0; border-radius: 8px;
  background: var(--navy, #1E3A5F); color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: filter .15s, background .15s;
}
.wiz-auth-btn:hover { filter: brightness(1.14); }
.wiz-auth-btn.is-alt { background: var(--navy-500, #4A6A95); }
.wiz-auth-btn:focus-visible { outline: 3px solid rgba(30, 58, 95, .3); outline-offset: 2px; }
/* 인증 완료된 쪽 — 초록 체크 톤으로 확실히 구분(캡처의 '인증 완료' 상태 대응) */
.wiz-auth-opt.is-done .wiz-auth-circle { background: rgba(22, 163, 74, .12); color: #16A34A; }
.wiz-auth-opt.is-done .wiz-auth-btn { background: #16A34A; cursor: default; }
.wiz-auth-opt.is-done .wiz-auth-btn:hover { filter: none; }
.wiz-auth-note { margin: 16px 0 0; font-size: 12.5px; color: #6B7684; text-align: center; }
.wiz-h2-sub { margin: 0 0 12px; font-size: 17px; font-weight: 700; color: var(--gray-800, #1F2937); }

/* 본인 인증 상태 행 — 캡처의 '인증 대기 / 본인 인증을 해주세요.' */
.wiz-authstate { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wiz-authchip {
  display: inline-block; padding: 7px 14px; border-radius: 6px;
  background: var(--gray-100, #F3F4F6); color: var(--gray-500, #6B7280);
  font-size: 13px; font-weight: 700;
}
.wiz-authchip.is-done { background: rgba(22, 163, 74, .12); color: #16A34A; }
.wiz-authmsg { font-size: 13px; }
.wiz-authmsg.is-err { color: var(--danger, #DC2626); }
.wiz-authmsg.is-ok { color: #16A34A; }
.wiz-authredo {
  padding: 6px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--gray-300, #D1D5DB); background: #fff; color: var(--gray-700, #374151);
}
.wiz-authredo:hover { border-color: var(--navy, #1E3A5F); color: var(--navy, #1E3A5F); }

/* ── 인증 모달 — 국내 사이트가 팝업으로 띄우는 인증창을 인앱 모달로. */
body.wiz-modal-open { overflow: hidden; }
.wiz-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; }
.wiz-modal.is-hidden { display: none !important; }
.wiz-modal-dim { position: absolute; inset: 0; background: rgba(17, 24, 39, .45); }
.wiz-modal-card {
  position: relative; width: 100%; max-width: 460px;
  background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  overflow: hidden;
}
.wiz-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--gray-100, #F3F4F6);
}
.wiz-modal-title { margin: 0; font-size: 16.5px; font-weight: 700; color: var(--navy, #1E3A5F); }
.wiz-modal-x {
  display: grid; place-items: center; width: 32px; height: 32px;
  border: 0; background: transparent; color: var(--gray-500, #6B7280);
  border-radius: 8px; cursor: pointer;
}
.wiz-modal-x:hover { background: var(--gray-100, #F3F4F6); }
.wiz-modal-x svg { width: 18px; height: 18px; }
.wiz-modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.wiz-modal-foot {
  padding: 14px 20px 18px; display: flex; justify-content: flex-end;
  border-top: 1px solid var(--gray-100, #F3F4F6);
}
@media (max-width: 520px) {
  .wiz-auth-circle { width: 76px; height: 76px; }
  .wiz-auth-circle svg { width: 34px; height: 34px; }
}

/* 약관 펼침 화살표 */
.wiz-toggle .wiz-chev { width: 18px; height: 18px; display: block; transition: transform .18s; }
.wiz-toggle.is-open .wiz-chev { transform: rotate(90deg); }

/* 액션 버튼 */
.wiz-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.wiz-btn {
  padding: 13px 26px; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, box-shadow .15s, opacity .15s;
}
.wiz-btn-primary { background: var(--navy, #1E3A5F); color: #fff; }
.wiz-btn-primary:hover { background: var(--navy-700, #2D4D7A); box-shadow: 0 6px 18px rgba(30, 58, 95, .25); }
.wiz-btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.wiz-btn-ghost { background: #fff; color: var(--navy, #1E3A5F); border-color: var(--gray-300, #D1D5DB); }
.wiz-btn-ghost:hover { border-color: var(--navy-300, #8FA5C3); }
.wiz-meta { text-align: center; margin-top: 20px; font-size: 13px; }
.wiz-meta a { color: var(--navy-500, #4A6A95); text-decoration: none; font-weight: 600; }
.wiz-meta a:hover { text-decoration: underline; }

/* 알림 */
.wiz-alert { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }
.wiz-alert svg { width: 18px; height: 18px; flex: none; }
.wiz-alert.is-error { background: #FEF2F2; color: #991B1B; }
.wiz-alert.is-info { background: #EFF6FF; color: #1E40AF; }
.wiz-alert.is-success { background: #F0FDF4; color: #166534; }

/* ── 아이디·비밀번호 찾기 (2026-07-21) ────────────────────────────── */
.find-tabs { display:flex; gap:8px; margin-bottom:18px; }
.find-tab {
  flex:1; height:44px; border-radius:10px; cursor:pointer;
  border:1.5px solid var(--line, #E3E7EA); background:#fff;
  font-family:inherit; font-size:15px; font-weight:600; color:#5B6670;
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.find-tab.is-on { background:#1E3A5F; border-color:#1E3A5F; color:#fff; }
.find-tab:hover:not(.is-on) { border-color:#1E3A5F; color:#1E3A5F; }
.wiz-result { text-align:center; padding:18px 0 6px; }
.find-result-id {
  font-size:26px; font-weight:800; letter-spacing:.04em;
  color:#1E3A5F; margin:10px 0 18px;
}
.wiz-check-msg.is-ok { color:#2E7D5B; }
.wiz-check-msg.is-bad { color:#C0392B; }

/* ── 학원 세부 역할(학원장/강사) — 2026-07-21 ─────────────────────── */
.wiz-subrole {
  margin-top: 22px; padding-top: 20px;
  border-top: 1px dashed var(--gray-200, #E5E7EB);
}
.wiz-subrole-q {
  text-align: center; font-size: 15px; font-weight: 700;
  color: var(--navy, #1E3A5F); margin: 0 0 14px;
}
.wiz-subrole-cards { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.wiz-subcard {
  cursor: pointer; text-align: center; padding: 14px 22px; min-width: 150px;
  border: 2px solid var(--gray-200, #E5E7EB); border-radius: 12px; background: #fff;
  transition: border-color .18s, box-shadow .18s, transform .12s;
}
.wiz-subcard:hover { border-color: var(--navy-300, #8FA5C3); transform: translateY(-2px); }
.wiz-subcard.is-selected {
  border-color: var(--navy, #1E3A5F);
  box-shadow: 0 4px 14px rgba(30, 58, 95, .16);
}
.wiz-subcard-name { display: block; font-size: 15.5px; font-weight: 700; color: var(--navy, #1E3A5F); }
.wiz-subcard-desc { display: block; font-size: 12.5px; color: #6B7684; margin-top: 4px; }
