/* ─────────────────────────────────────────────────────────────
   인증 화면 (로그인 · 인증코드 입력 · 가입 안내)

   레이아웃은 세 화면이 공유합니다.
     전체폭 상단바  →  가운데 460px 본문  →  전체폭 푸터 밴드

   수치는 디자인 원본(튜브워커 로그인 페이지.dc.html) 기준입니다.
   색은 전부 토큰이며, 투명도만 다른 파생색은 color-mix 로 만듭니다.
   ───────────────────────────────────────────────────────────── */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}

/* ── 상단바 ── */
.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px clamp(20px, 5vw, 48px);
  border-bottom: 1px solid var(--border);
  background: var(--surface-bar);
}

/* 브랜드는 홈(랜딩)으로 가는 링크입니다. */
.auth-brand {
  font: 700 19px var(--font-serif);
  letter-spacing: .5px;
  color: var(--text);
  text-decoration: none;
}

.auth-topbar-actions {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 14px);
}

.auth-topbar-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}

.auth-topbar-link:hover { color: var(--text); }

/* 로그아웃은 POST 폼이라 button 인데 링크처럼 보여야 합니다. */
.auth-topbar-form { margin: 0; display: inline-flex; }

button.auth-topbar-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

/* 테마 토글(.theme-toggle)은 랜딩과 공유하므로 tokens.css 의 공용 컴포넌트에 있습니다. */

/* ── 본문 ── */
.auth-main {
  flex: 1;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  /* 위 여백이 아래보다 큽니다 — 내용을 화면 중앙보다 살짝 아래에 앉힙니다. */
  padding: clamp(72px, 10vw, 120px) clamp(24px, 5vw, 40px) clamp(48px, 7vw, 84px);
  text-align: center;
}

.auth-eyebrow {
  font: 700 14px var(--font-serif);
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 30px;
}

/* 인증코드 화면은 아래 여백이 조금 좁습니다. */
.auth-eyebrow--code { margin-bottom: 26px; }

.auth-title {
  margin: 0 0 12px;
  font: 600 clamp(25px, 4vw, 30px) var(--font-serif);
  color: var(--text);
}

/* "환영합니다" — 인증코드 입력 화면 */
.auth-title--code {
  margin: 0 0 16px;
  font-size: clamp(23px, 4vw, 27px);
}

/* "이제 한 가지 절차만 남았습니다" — 가입 안내 화면 */
.auth-title--pending {
  margin: 0 0 18px;
  font-size: clamp(22px, 4vw, 25px);
  line-height: 1.4;
}

/* "거의 다 왔어요" — 닉네임 입력 화면 */
.auth-title--nickname {
  margin: 0 0 12px;
  font-size: clamp(23px, 4vw, 27px);
}

.auth-lead {
  margin: 0 0 36px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* 인증코드 화면 첫 문단 — 두 번째 문단이 바로 뒤에 붙습니다. */
.auth-lead--tight {
  margin: 0 0 8px;
  line-height: 1.75;
}

/* 인증코드 화면 두 번째 문단 */
.auth-lead--sub {
  margin: 18px 0 26px;
  font-size: 14px;
  line-height: 1.75;
}

/* 가입 안내 화면 첫 문단 */
.auth-lead--pending {
  margin: 0 0 14px;
  line-height: 1.8;
}

.auth-highlight {
  margin: 0 0 30px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--accent);
  font-weight: 700;
}

.auth-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-faint);
}

/* ── 버튼 ── */
.btn-kakao {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: var(--kakao);
  color: var(--kakao-on);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s ease;
}

.btn-kakao:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--kakao-shadow);
}

.btn-kakao:active { transform: translateY(0); }

.btn-primary {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: var(--accent-on-solid);
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all .25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 42%, transparent);
}

.btn-primary:active { transform: translateY(0); }

/* 닉네임 화면 "다음" — 2자 미만이면 JS 가 잠급니다(원본의 회색 비활성 버튼). */
.btn-primary:disabled {
  background: var(--border-strong);
  color: var(--text-faint);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ── 닉네임 입력 (거의 다 왔어요) ──
   위 헤더는 가운데 정렬(auth-*)이고, 입력칸부터는 왼쪽 정렬입니다. */
.nick-form { text-align: left; }

.nick-label {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.nick-input {
  width: 100%;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  font-family: inherit;
  font-size: 15.5px;
  color: var(--text);
  outline: none;
  transition: border-color .2s ease;
}

.nick-input:focus { border-color: var(--accent); }

.nick-help {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 2px 0;
  font-size: 12px;
  color: var(--text-faint);
}

.nick-help-text { font-weight: 500; }

.nick-count { flex: none; }

.nick-next { margin-top: 30px; }

/* ── 혜택 배지 ── */
.auth-badge {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: center;
  padding: 13px 16px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: var(--radius-md);
}

.auth-badge-emoji { font-size: 15px; }

.auth-badge-text {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
}

/* ── 완료 체크 ── */
.auth-check {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 26px;
  font-size: 30px;
  color: var(--accent);
  line-height: 1;
}

/* ─────────────────────────────────────────────────────────────
   인증코드 입력
   시각적으로는 6칸 박스지만 실제 입력은 그 위에 겹친 단일 input 하나입니다.
   (붙여넣기·자동완성·스크린리더가 정상 동작합니다.)
   ───────────────────────────────────────────────────────────── */
.code-field {
  position: relative;
  margin: 0 0 28px;
}

.code-slots {
  display: flex;
  gap: 8px;
  justify-content: center;
  pointer-events: none;
}

.code-slot {
  width: clamp(38px, 10vw, 46px);
  height: 56px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 22px var(--font-serif);
  color: var(--text-faint);
  transition: border-color .2s ease, color .2s ease;
}

.code-slot[data-filled='true'] { color: var(--text); }

.code-field:focus-within .code-slot[data-active='true'] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}

/* 실제 입력 필드 — 박스 위에 투명하게 겹칩니다. */
.code-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: none;
  background: none;
  font-size: 22px;
  letter-spacing: 1em;
  text-align: center;
  cursor: pointer;
}

.code-input:focus { outline: none; }

/* JS 가 꺼져 있으면 박스를 감추고 평범한 입력창을 보여줍니다. */
.no-js .code-slots { display: none; }

.no-js .code-input {
  position: static;
  opacity: 1;
  width: 100%;
  height: 56px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  letter-spacing: .4em;
}

/* ── 오류 메시지 (원본에 없는 우리 추가분 — 디자인 톤에 맞춤) ── */
.auth-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid var(--accent);
  color: var(--accent-quiet);
  font-size: 13.5px;
  line-height: 1.6;
  text-align: left;
}

/* ── 문의 · 안내 문구 ── */
.auth-contact {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--text-faint);
}

.auth-contact a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.auth-contact a:hover { color: var(--accent-hover); }

.auth-fineprint {
  margin: 24px 0 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 4px;
}

.auth-fineprint p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-faint);
}

.auth-fineprint a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.auth-fineprint a:hover { color: var(--accent-hover); }

/* ── 푸터 밴드 ── */
