/* ===== 계정 화면(로그인·가입·이메일 인증·비밀번호 재설정) — 접두사 au- =====
   네 페이지가 이 파일 하나를 같이 쓴다. 공통 부품(tk.css: .input .field .check .btn .chip .link)을 먼저 쓰고 없는 것만 여기.
   ▣ 한 칸짜리 가운데 단(폭 400): 기준 사이트 단 폭 288~446(Linear·Vercel·GitHub·Stripe) 안. 2열 배치가 아니라 12열 격자 대상 아님.
   ▣ 머리는 공통 .page-top + .page-head--form(위 64/48/32 · 폭 400 · 제목 36/44, 폰 28/36 · 설명 16/26 · 대상 줄 14/22 · 머리→폼 32 = .page-body).
   ▣ 간격(같은 역할 = 같은 값): 입력 묶음 사이 24(사이트 공통, 라벨→입력 8·입력→도움말/오류 8) · 입력→동의·알림·버튼 잉크 24 · 알림→버튼 16 ·
     폼→보조 글줄 24 · 보조 글줄끼리 8 · 마지막 내용→바닥글 = 섹션 간격(--section).
   ▣ 단계(입력 → 코드 → 완료)는 같은 페이지 안 패널 전환. 바뀌면 그 단계 제목으로 포커스(화면낭독기가 새 단계를 읽음).
   ▣ 초록(--money)은 쓰지 않음 — 돈이 아님. 확인 표시는 글자색(--text), 오류는 --danger. */

.au { padding-bottom: var(--section); } /* 위 여백은 .page-top */
.au-shell { display: grid; grid-template-columns: minmax(0, 400px); justify-content: center; }
.au-col { min-width: 0; }

/* 머리(공통 .page-head--form)에 더하는 것만 */
.au .page-head__title:focus { outline: none; } /* 단계가 바뀔 때 스크립트가 옮기는 포커스 — 테두리 대신 낭독으로 알림 */
.au-email { margin-top: 8px; font-size: 16px; line-height: 26px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; } /* 코드를 보낸 주소: 한 줄로 따로. 긴 주소는 @ 뒤(wbr)·붙임표에서 먼저 끊김 */

/* 폼: 머리 → 폼 32(.page-body 공통) · 입력 묶음 사이 24 · 입력 → 동의·알림·버튼 잉크 24
   동의 줄(.check)은 누르는 칸 44 안에 위아래 12씩 빈 곳이 있어 그만큼 뺀 값. 알림(서버 오류·안내)은 버튼 바로 위 — 폰에서 키보드가 열려도 누른 자리 근처에 보이게 */
.au-fields > .field:first-child { margin-top: 0; }
.au-fields > .field + .field, .au-fields > .field + .au-invite-btn { margin-top: 24px; } /* 입력 묶음 사이 24(사이트 공통) */
.au-actions { margin-top: 24px; }
.au-fields + .au-agree { margin-top: 11px; } /* 입력 끝 잉크(도움말 −1) 1 + 첫 동의 줄 위 빈 곳 12 */
.au-agree ~ .au-actions { margin-top: 12px; }
.au-live.is-on { margin-top: 24px; }
.au-agree + .au-live.is-on { margin-top: 12px; }
.au-live.is-on + .au-actions { margin-top: 16px; } /* 알림은 버튼에 딸린 것 */
/* 칸 맨 끝의 오류 글줄은 도움말(.field-help)과 같이 아래 −4 → 오류가 떠도 다음 묶음까지 잉크 간격이 그대로 */
.au-fields .field > .field-err:last-child { margin-bottom: -4px; }
.au-col .field-err { text-wrap: pretty; }
.au-actions .btn { width: 100%; }
.au-alt { margin-top: 24px; font-size: 14px; line-height: 22px; color: var(--text-2); }
.au-alt + .au-alt { margin-top: 8px; } /* 보조 글줄끼리는 한 묶음 */
.au-alt .link { color: var(--text); }

/* 라벨 줄 오른쪽 보조 링크(비밀번호를 잊으셨나요?) — 계산기 '직접 입력'과 같은 방식 */
.au-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.au-label-row .field-label { margin-bottom: 0; }
.au-textbtn { position: relative; font-size: 14px; line-height: 22px; font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); white-space: nowrap; }
.au-textbtn:hover { text-decoration-color: currentColor; }
.au-textbtn::after { content: ""; position: absolute; inset: -11px -8px; } /* 누르는 칸 44 */
.au-label-row .au-textbtn::after { inset: -12px -8px -10px; } /* 아래 입력칸의 누르는 칸과 겹치지 않게 위로 1px(계산기 직접 입력과 같은 값) */
.au-textbtn:disabled, .au-textbtn[aria-disabled="true"] { color: var(--text-3); text-decoration: none; cursor: default; }

/* 비밀번호 + 보기 버튼(입력칸 안 오른쪽, 모서리 동심원 12 − 4 = 8) */
.au-pw { position: relative; }
.au-pw .input { padding-inline-end: 52px; }
.au-eye { position: absolute; top: 4px; inset-inline-end: 4px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; color: var(--text-2); }
.au-eye:hover { color: var(--text); background: var(--ghost-hover); }
.au-eye:focus-visible { outline-offset: -2px; border-radius: 8px; }
.au-eye svg { width: 20px; height: 20px; }
.au-eye .ico-eye-off { display: none; }
.au-eye.is-shown .ico-eye { display: none; }
.au-eye.is-shown .ico-eye-off { display: block; }
.au-eye::after { content: ""; position: absolute; inset: -2px; } /* 보이는 칸 40, 누르는 칸 44(입력칸 안이라 이웃과 안 겹침) */

/* 비밀번호 규칙 한 줄: 확인 표시 = '길이 충족'만(색 대신 모양 + 글) */
.au-rule { display: flex; align-items: flex-start; gap: 8px; }
.au-rule-ico { flex: none; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; border: 1.5px solid var(--text-3); display: grid; place-items: center; }
.au-rule-ico svg { width: 9px; height: 9px; display: none; } /* 14 동그라미 = 14px 글자 잉크 높이(4.6~17)와 같은 줄 안 */
.au-rule.is-ok { color: var(--text-2); }
.au-rule.is-ok .au-rule-ico { border-color: var(--text); background: var(--text); color: var(--bg); }
.au-rule.is-ok .au-rule-ico svg { display: block; }

/* 6자리 코드: 공통 입력칸 + 고정폭 숫자·자간(같은 크기 16/26·500) */
.au-code { font-variant-numeric: tabular-nums; letter-spacing: 0.16em; }
.au-code::placeholder { letter-spacing: 0; }

/* 초대 코드(선택): 평소엔 접힘, ?ref= 로 들어오면 펼쳐 채움 */
.au-invite-btn { margin-bottom: -4px; font-size: 14px; line-height: 22px; } /* 글줄 아래 여백 상쇄(.field-help와 같은 −4) → 접혔을 때·펼쳤을 때 다음 묶음까지 잉크 간격 같게 */
.au-invite-btn + .field { margin-top: 16px; }
.au-fields > .au-invite-btn[hidden] + .field { margin-top: 24px; } /* 초대 링크로 미리 채워 버튼을 숨기면 칸 사이 = 입력 묶음 사이 24 */

/* 동의 묶음: 필수 항목 모두 동의 → 선 → 필수 3 → (오류) → 선택 1(한 칸 띄워 따로) */
.au-agree { border: 0; margin: 0; padding: 0; min-width: 0; }
.au-agree legend { padding: 0; }
.au-all { border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.au-all .check { color: var(--text); font-weight: 600; }
.au-agree-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.au-agree-row .check { flex: 1; min-width: 0; }
.au-agree-row .chip { margin-inline-end: 8px; vertical-align: 1px; }
.au-opt { margin-top: 12px; } /* 선택 동의는 필수 묶음과 한 칸 떨어뜨림(계정 만들기 ≠ 광고 수신) */
.au-view { position: relative; flex: none; padding-block: 11px; font-size: 14px; line-height: 22px; color: var(--text-2); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.au-view:hover { color: var(--text); text-decoration-color: currentColor; }
.au-view::after { content: ""; position: absolute; inset: 0 -10px; } /* 줄 높이 44 + 좌우 10 → 폭 44 */
:root:not(:lang(ko)) .au-view::after { inset-inline: min(-10px, calc(50% - 23px)); } /* 번역 언어: '보기' 낱말이 짧으면(태 'ดู' 8px·스 'Ver') 누르는 칸을 가운데 기준 폭 46으로(44 딱 맞춤은 소수점 반올림으로 43.9가 됨) — 긴 낱말은 좌우 10 그대로 */
/* 체크 상자: 오류(빨간 2px 테) ≠ 키보드 포커스(글자색 테, 4px 띄움) — 셋 다 오류여도 지금 어느 칸인지 보이게 */
.check input { border-radius: 4px; }
.check input[aria-invalid="true"] { box-shadow: 0 0 0 2px var(--danger); }
.check input:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.au-agree .field-err { margin-top: 4px; }

/* 알림 상자(버튼 바로 위): 오류 = 빨간 테, 안내 = 회색 테 */
.au-note { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); font-size: 14px; line-height: 22px; color: var(--text); }
.au-note svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--text-2); }
.au-note.is-err { border-color: var(--danger); }
.au-note.is-err svg { color: var(--danger); }
.au-note p { min-width: 0; text-wrap: pretty; }

/* 다시 보내기 줄: 보조 글줄(.au-alt)과 같은 꼴, 대기 초는 버튼 옆 괄호 */
.au-resend-wait { color: var(--text-3); font-variant-numeric: tabular-nums; }

/* 진행 중(버튼 글자만 바뀜 — 폭이 흔들리지 않게 버튼은 전체 폭) */
.btn[aria-busy="true"], .au-textbtn[aria-busy="true"] { cursor: progress; }
.btn[aria-disabled="true"] { pointer-events: none; }

/* 완료·확인 화면 */
.au-done-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); margin-bottom: 24px; }
.au-done-ico svg { width: 24px; height: 24px; }
.au-done-ico.is-wait svg { animation: au-spin 1s linear infinite; }
@keyframes au-spin { to { transform: rotate(360deg); } }

/* 인증 뒤 남은 일(마이페이지에서) */
.au-next { border-top: 1px solid var(--line); } /* 머리 → 목록 32는 .page-body */
.au-next li { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.au-next-n { font-size: 16px; line-height: 26px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.au-next h2 { font-size: 16px; line-height: 26px; font-weight: 600; }
.au-next p { grid-column: 2; margin-top: 4px; font-size: 14px; line-height: 22px; color: var(--text-2); text-wrap: pretty; }
.au-next-note { margin-top: 16px; font-size: 14px; line-height: 22px; color: var(--text-2); text-wrap: pretty; }
.au-next-note + .au-actions { margin-top: 28px; } /* 글줄 아래 여백 4 보정 → 목록 묶음 → 버튼 잉크 32 */

/* 미리보기 고지(예시 응답일 때만): 단 맨 아래, 성공·안내와 같은 회색 */
.au-preview { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; line-height: 22px; color: var(--text-2); text-wrap: pretty; }
