.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
}

.auth-overlay[hidden] { display: none; }

.auth-modal {
  width: 100%;
  max-width: 560px;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  position: relative;
  animation: authIn 0.25s ease;
}

@keyframes authIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,0.04);
  color: var(--color-text-secondary);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  font-family: inherit;
}

.auth-close:hover {
  background: rgba(0,0,0,0.08);
  color: var(--color-text-primary);
}

.auth-section {
  padding: 36px 32px 32px;
}

.auth-login-section {
  background: var(--color-surface);
}

.auth-signup-section {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
}

.auth-section-title {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.auth-section-sub {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0 0 22px;
}

.auth-section-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--brand-50);
  color: var(--color-brand);
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 32px 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--color-text-tertiary);
  letter-spacing: 0.12em;
  background: var(--color-surface);
  position: relative;
  z-index: 1;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ── 공용 폼 요소 ── */
.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.auth-form-row.single { grid-template-columns: 1fr; }
.auth-form-group { display: flex; flex-direction: column; }

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}
.auth-label .req { color: var(--color-danger); margin-left: 2px; }

.auth-input,
.auth-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  background: white;
  font-family: inherit;
  color: var(--color-text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus,
.auth-select:focus {
  outline: 0;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(160,82,45,0.12);
}

.auth-input.err,
.auth-select.err {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
}

.auth-pw-wrap { position: relative; }
.auth-pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  color: var(--color-text-tertiary);
  font-family: inherit;
  padding: 4px 6px;
}

.auth-form-err {
  font-size: 12px;
  color: var(--color-danger);
  margin-top: 4px;
  display: none;
}
.auth-form-err.on { display: block; }

.auth-err-box {
  display: none;
  background: var(--color-danger-bg);
  border: 1px solid #FCA5A5;
  color: var(--color-danger);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.5;
}
.auth-err-box.on { display: block; }

.auth-btn {
  width: 100%;
  padding: 13px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--color-brand);
  color: white;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  position: relative;
  letter-spacing: -0.01em;
}
.auth-btn:hover:not([disabled]) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(160,82,45,0.22);
}
.auth-btn[disabled] { opacity: 0.6; cursor: default; }

/* Google 로그인 — 2026-05-18 Phase 1 활성 (옛 "준비중" CSS 잔존 정리) */
.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius);
  background: white;
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  opacity: 1;
  transition: all 0.2s ease;
  margin-bottom: 14px;
}
.auth-google-btn:hover {
  background: var(--color-surface-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}
.auth-or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--color-text-tertiary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.auth-or-divider::before,
.auth-or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.32);
  border-top-color: white;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}
@keyframes authSpin { to { transform: translateY(-50%) rotate(360deg); } }

.auth-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-text-secondary);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: 0;
  font-family: inherit;
  padding: 0;
}
.auth-link:hover { color: var(--color-brand); text-decoration: underline; }
.auth-link-strong { font-weight: 600; color: var(--color-brand); }
.auth-cross-link {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--color-border, #e0e0e0);
  text-align: center; font-size: 0.9em;
  color: var(--color-text-secondary, #666);
}
.auth-cross-link .auth-link-strong { padding: 4px 8px; }

.auth-success {
  text-align: center;
  padding: 24px 12px;
}
.auth-success-icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 12px;
}
.auth-success-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 8px;
}
.auth-success-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ── 가입 폼 (하단 그레이) 전용 ── */
.site-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.site-card {
  background: white;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}
.site-card:hover {
  border-color: var(--color-border-2);
  transform: translateY(-2px);
}
.site-card.is-active {
  border-color: var(--color-brand);
  background: var(--brand-50);
}
.site-card-icon { font-size: 24px; margin-bottom: 6px; }
.site-card-title { font-size: 13px; font-weight: 800; color: var(--color-text-primary); }
.site-card-desc  { font-size: 11px; color: var(--color-text-secondary); margin-top: 4px; line-height: 1.4; }

.signup-form-body { display: none; }
.signup-form-body.is-open { display: block; }

.insurer-fields,
.ga-fields { display: none; }
.insurer-fields.is-open,
.ga-fields.is-open { display: block; }

.form-divider {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--color-text-tertiary);
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.signup-info-box {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 12px;
  color: var(--color-text-secondary);
}
.signup-info-box p { margin: 0; }
.signup-info-box .signup-info-sub { margin-top: 4px; font-size: 11px; }

/* 강조 박스 (소속 정보 정확히 입력 강조) */
.signup-info-box.is-emphasis {
  background: linear-gradient(135deg, var(--brand-50) 0%, #FFF8F0 100%);
  border: 2px solid var(--color-brand);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--color-text-primary);
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(160,82,45,0.08);
}
.signup-info-box.is-emphasis p { margin: 0 0 6px; line-height: 1.5; }
.signup-info-box.is-emphasis p:last-child { margin-bottom: 0; }
.signup-info-box.is-emphasis .signup-info-sub {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 8px;
}
.signup-info-box.is-emphasis .emphasis-icon {
  font-size: 18px; margin-right: 4px;
  vertical-align: -1px;
}
.signup-info-box.is-emphasis .emphasis-key {
  display: inline-block;
  background: var(--color-brand);
  color: #fff;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 700;
  margin: 0 2px;
}

.domain-guide {
  font-size: 12px;
  color: var(--color-text-secondary);
  background: white;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.role-hint {
  display: none;
  font-size: 12px;
  color: var(--color-text-secondary);
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.role-hint.on { display: block; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 8px 0;
  line-height: 1.5;
}
.form-check input { margin-top: 3px; flex-shrink: 0; }
.form-check a { color: var(--color-brand); text-decoration: underline; }

.pending-notice {
  display: none;
  background: var(--brand-50);
  border: 1px solid rgba(160,82,45,0.25);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--color-text-primary);
  margin-top: 12px;
  line-height: 1.6;
}

/* ── 모달 모바일 분기 ── */
@media (max-width: 600px) {
  .auth-overlay {
    padding: 0;
    align-items: stretch;
  }
  .auth-modal {
    max-width: none;
    border-radius: 0;
    min-height: 100vh;
  }
  .auth-section { padding: 28px 20px; }
  .auth-form-row { grid-template-columns: 1fr; }
  .site-picker { grid-template-columns: 1fr; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   카카오 톤 인증 페이지 v2 (2026-05-15)
   - 모바일 풀스크린 + PC 모달 480px
   - sticky 하단 CTA + 큰 입력 (52px) + 친근 톤
   - multi-step 가입 박음 박힌 자리
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* v2 모달 컨테이너 — 옛 .auth-modal 위 override */
.auth-modal.is-v2 {
  max-width: 100%;
  width: 100%;
  height: 100vh; max-height: 100vh;
  border-radius: 0;
  display: flex; flex-direction: column;
  padding: 0; overflow: hidden;
}
@media (min-width: 768px) {
  .auth-modal.is-v2 {
    max-width: 480px;
    height: auto; max-height: 92vh;
    border-radius: 16px;
  }
}

/* v2 헤더 — 좌상단 ← + 진행 본진 + 우상단 ✕ */
.auth-page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  height: 52px;
  position: relative;
}
.auth-page-back, .auth-page-close {
  width: 40px; height: 40px;
  background: transparent;
  border: 0; border-radius: 50%;
  font-size: 22px; cursor: pointer;
  color: var(--color-text-primary);
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
  transition: background 0.15s ease;
}
/* 2026-05-27 정정: .auth-page-back[hidden] 시 ✕가 좌측에 배치되던 격차 정정.
   margin-left: auto = back 유무와 무관하게 ✕는 항상 우측 상단 고정. */
.auth-page-close { margin-left: auto; }
.auth-page-back:hover, .auth-page-close:hover { background: rgba(0,0,0,0.05); }
.auth-page-back[hidden], .auth-page-close[hidden] { display: none; }

.auth-step-progress {
  display: flex; gap: 6px; align-items: center;
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
.auth-step-progress span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-border);
  transition: all 0.2s ease;
}
.auth-step-progress span.is-active {
  width: 20px; border-radius: 3px;
  background: var(--color-brand);
}
.auth-step-progress[hidden] { display: none; }

/* v2 본문 — 스크롤 + sticky CTA 자리 */
.auth-page-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px 20px;
  -webkit-overflow-scrolling: touch;
  background: var(--color-surface);
}
@media (min-width: 768px) {
  .auth-page-body { padding: 32px 32px 24px; }
}

.auth-page-title {
  font-size: 24px; font-weight: 800;
  margin: 4px 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--color-text-primary);
}
.auth-page-sub {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0 0 28px;
  line-height: 1.55;
}

/* 큰 입력 (iOS Safari zoom 회피 본진 — font-size 16px+) */
.auth-page-body .auth-input {
  height: 52px;
  padding: 14px 16px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  width: 100%;
  -webkit-text-fill-color: var(--color-text-primary);
  box-sizing: border-box;
}
.auth-page-body .auth-input:focus {
  border-color: var(--color-brand);
  outline: 3px solid var(--brand-50);
  outline-offset: 0;
}
.auth-page-body .auth-select {
  height: 52px;
  padding: 0 40px 0 14px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  width: 100%;
  box-sizing: border-box;
}
.auth-page-body .auth-pw-wrap .auth-input { padding-right: 64px; }
.auth-page-body .auth-pw-toggle {
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  height: 36px; padding: 0 10px;
  background: rgba(0,0,0,0.05); border: 0;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.auth-page-body .auth-form-group { position: relative; margin-bottom: 16px; }
.auth-page-body .auth-label {
  display: block;
  font-size: 13px; font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text-secondary);
}

/* 하단 sticky CTA */
.auth-cta-area {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  position: sticky; bottom: 0;
}
@media (min-width: 768px) {
  .auth-cta-area { padding: 16px 32px 24px; }
}
.auth-cta-area .auth-btn {
  width: 100%;
  height: 56px;
  font-size: 16px; font-weight: 700;
  border-radius: 12px;
  margin: 0;
}
.auth-cta-area .auth-cross-link {
  margin: 14px 0 0;
  padding: 0;
  border-top: 0;
  font-size: 13px;
  text-align: center;
}

/* Step 1 — 큰 site 카드 (한 손 박음) */
/* 소속 선택 = 좌우 2 카드 grid + 색 구분 (2026-05-26 단계 3) */
.auth-site-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.auth-site-card-v2 {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 24px 16px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.auth-site-card-v2:focus { outline: 3px solid rgba(99, 102, 241, 0.2); outline-offset: 0; }
.auth-site-card-v2 .icon {
  font-size: 32px; flex-shrink: 0;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
}
.auth-site-card-v2 .info { flex: 1; min-width: 0; }
.auth-site-card-v2 .title {
  font-size: 16px; font-weight: 700;
  margin-bottom: 4px;
  color: var(--color-text-primary);
}
.auth-site-card-v2 .desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.auth-site-card-v2 .arrow { display: none; }

/* GA = 인디고 (좌측 strip 색 구분) */
.auth-site-card-v2[data-site="ga"] {
  border-left: 4px solid #6366F1;
}
.auth-site-card-v2[data-site="ga"] .icon {
  background: rgba(99, 102, 241, 0.12);
  color: #6366F1;
}
.auth-site-card-v2[data-site="ga"]:hover,
.auth-site-card-v2[data-site="ga"].is-active {
  border-color: #6366F1;
  background: rgba(99, 102, 241, 0.06);
}

/* 보험사 = 초록 (좌측 strip 색 구분, 시각 격차로 두 갈래 명확) */
.auth-site-card-v2[data-site="insurer"] {
  border-left: 4px solid #10B981;
}
.auth-site-card-v2[data-site="insurer"] .icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
}
.auth-site-card-v2[data-site="insurer"]:hover,
.auth-site-card-v2[data-site="insurer"].is-active {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.06);
}

/* 모바일 = 세로 (반응형) */
@media (max-width: 600px) {
  .auth-site-grid { grid-template-columns: 1fr; }
}

/* Step별 화면 — 한 화면 한 본진 */
.auth-step-page { display: none; }
.auth-step-page.is-active { display: block; }

/* 로그인 방식 2영역 분리 (2026-05-26 단계 4) + 좌측 strip 색 구분 */
.auth-login-method {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px 14px;
  margin-bottom: 12px;
}
.auth-login-method--google { border-left: 4px solid #6366F1; }
.auth-login-method--email  { border-left: 4px solid #10B981; }
.auth-login-method-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-text-tertiary);
  margin-bottom: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-login-method--google .auth-login-method-label {
  color: #6366F1;
}
.auth-login-method--email .auth-login-method-label {
  color: #10B981;
}
.auth-login-method-hint {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 10px;
  text-align: center;
  line-height: 1.5;
}
.auth-login-method .auth-google-btn,
.auth-login-method .auth-form-group { margin-bottom: 0; }

/* 구분선 강화 (영역 사이 명확) */
.auth-page-body .auth-or-divider {
  margin: 6px 0;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--color-text-tertiary);
  letter-spacing: 0.16em;
  position: relative;
}

/* 친근 카피 영역 (이모지 + 큰 톤) */
.auth-friendly-emoji {
  font-size: 36px;
  margin-bottom: 8px;
  display: block;
}

/* Google 로그인 버튼 v2 */
.auth-page-body .auth-google-btn {
  width: 100%;
  height: 52px;
  border-radius: 10px;
  font-size: 15px; font-weight: 600;
  margin-bottom: 16px;
}
.auth-page-body .auth-or-divider {
  margin: 16px 0;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-tertiary);
  position: relative;
}
.auth-page-body .auth-or-divider::before,
.auth-page-body .auth-or-divider::after {
  content: ''; position: absolute; top: 50%;
  width: calc(50% - 28px); height: 1px;
  background: var(--color-border);
}
.auth-page-body .auth-or-divider::before { left: 0; }
.auth-page-body .auth-or-divider::after { right: 0; }

/* ═════════════════════════════════════════════════════════
