/* 인증·문의 폼 공통 — 로그인·회원가입·문의하기 3개 페이지가 공유.
   입력창 스타일은 game-shell.css의 .ranking-entry__input과 동일한 톤(2px 보더, 포커스시 primary)으로 맞춤. */

.auth-shell { padding: 80px 20px 100px; display: flex; justify-content: center; }
.auth-card {
  width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 40px 32px;
}

/* 로그인 페이지 — 회원(로그인) 왼쪽, 비회원(이메일 조회) 오른쪽으로 나란히 배치해 세로 스크롤을 줄인다.
   align-items 기본값(stretch)이라 두 박스는 항상 더 긴 쪽 높이에 맞춰지고, 인라인 메시지로 한쪽
   폼이 늘어나도 grid가 다시 계산해 반응형으로 같이 늘어난다. */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%; max-width: 920px; }
.auth-split .auth-card { max-width: none; display: flex; flex-direction: column; }
@media (max-width: 860px) { .auth-split { grid-template-columns: 1fr; } }
.auth-card h1 { font-size: 24px; font-weight: 800; color: var(--primary-dark); margin-bottom: 8px; text-align: center; }
/* min-height로 1줄·2줄 안내문구 박스를 항상 2줄 자리만큼 맞춰, 두 박스의 폼 시작 위치를 나란히 맞춘다. */
.auth-card .auth-sub { font-size: 13.5px; color: var(--text-mute); text-align: center; margin-bottom: 28px; line-height: 1.6; min-height: 43px; }
/* 상담 답변 본문(문의 답변·미답변 안내) — 리셋(margin:0)으로 문단 간·버튼 위 여백이 사라지는 걸 막는다. */
.auth-card .auth-body { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 12px; }
.auth-card .auth-body:last-of-type { margin-bottom: 28px; }
/* 폼 아래 마무리 영역(링크·버튼) — margin-top:auto로 카드 바닥에 고정해, 인라인 메시지로 폼 높이가
   달라져도 두 카드의 마무리 줄은 항상 같은 높이에서 맞춰진다. */
.auth-bottom { margin-top: auto; }

.form-field { margin-bottom: 8px; text-align: left; }
.form-field label { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.form-field label .field-hint-inline { font-weight: 400; color: var(--text-mute); }
.form-field input:disabled + .btn { margin-top: 8px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; font-size: 14px; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius-md);
  color: var(--text); background: var(--surface); font-family: inherit; transition: border-color .15s ease;
}
.form-field textarea { resize: vertical; min-height: 96px; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: none; border-color: var(--primary); }
/* display 대신 visibility로 토글 — 필드 에러(아이디·이메일 등)가 뜨고 사라져도 자리는 항상
   확보돼 있어서 아래 필드·버튼이 밀리지 않는다. line-height를 body 기본값(1.6)보다 좁혀
   min-height를 텍스트 실제 높이에 맞춰뒀다 — 그래야 메시지가 뜰 때 reserved 자리보다 텍스트가
   더 커져서 아래를 미는 일이 없다. */
.field-error { margin-top: 3px; font-size: 12.5px; line-height: 1.3; color: var(--wrong); min-height: 16px; }
.form-field .field-error { visibility: hidden; }
.form-field.is-invalid input, .form-field.is-invalid textarea, .form-field.is-invalid select { border-color: var(--wrong); }
.form-field.is-invalid .field-error { visibility: visible; }
/* 폼 전체 에러(필드 하나가 아니라 제출 실패를 알리는 문구)는 is-invalid 토글과 무관하게
   JS가 직접 텍스트를 넣고 빼므로 항상 보이는 상태로 둔다(자리는 위 규칙으로 이미 확보됨). */
#mypage-lookup-error, #login-form-error { visibility: visible; }
/* field-error와 동일한 이유로 min-height 고정 — 빈 텍스트일 때도 자리를 차지해서 채워질 때 아래를 밀지 않는다. */
/* .form-field 안에서 쓸 때뿐 아니라(입력창 아래 보조설명) .form-field 밖에서 독립적으로도
   쓴다(예: 월간대회 게이트의 "응시자: ..."/"응시할 종목을 선택하세요" 안내) — 좁은 .form-field
   자손 선택자만 있으면 밖에서 쓸 땐 여백·글자스타일이 통째로 안 먹는 문제가 있었다(2026-08-06).
   기본값에 margin-bottom을 포함해 독립적으로도 바로 아래 요소와 붙지 않게 한다. */
.field-hint { margin-top: 3px; margin-bottom: 8px; font-size: 12.5px; line-height: 1.3; color: var(--text-mute); min-height: 16px; }
.field-hint.is-ok { color: var(--correct); }
.field-hint.is-info { color: var(--primary); }
.field-hint.is-error { color: var(--wrong); }
/* .form-field 안에서는 그 .form-field 자체가 다음 필드와의 간격(margin-bottom)을 이미
   책임지므로, 안쪽 hint까지 margin-bottom을 더하면 간격이 이중으로 벌어진다 — 0으로 되돌림. */
.form-field .field-hint { margin-bottom: 0; }

.field-with-btn { display: flex; gap: 8px; }
.field-with-btn input { flex: 1; min-width: 0; }
.field-with-btn .btn { flex-shrink: 0; padding: 0 16px; font-size: 13px; }

.form-check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; font-size: 13px; color: var(--text-dim); }
.form-check input { width: auto; margin-top: 3px; }

/* Cloudflare Turnstile 위젯 자리 — 위젯 자체가 iframe이라 크기는 Cloudflare가 결정, 여기선 앞뒤
   여백만 다른 폼 요소와 맞춘다. */
.turnstile-field { margin-bottom: 16px; }

/* 이용약관/개인정보처리방침 인라인 토글 — 네이티브 details/summary라 별도 JS 없이 열고 닫힘.
   agree-group: 입력 필드 묶음과 동의 항목 묶음을 시각적으로 분리하기 위해 위쪽에 여유를 더 준다.
   agree-item: 동의 체크박스 1개 + 토글 1개를 한 쌍으로 묶음(약관·개인정보는 별개 동의라 체크박스 분리). */
.agree-group { margin-top: 12px; }
.agree-item { margin-bottom: 14px; }
.agree-item .form-check { margin-bottom: 8px; }
.policy-toggle { border: 1px solid var(--line); border-radius: var(--radius-md); }
.policy-toggle summary { list-style: none; cursor: pointer; padding: 10px 14px; font-size: 12.5px; font-weight: 700; color: var(--text-mute); }
.policy-toggle summary::-webkit-details-marker { display: none; }
.policy-toggle summary::before { content: '▸ '; }
.policy-toggle[open] summary::before { content: '▾ '; }
.policy-toggle .policy-body { max-height: 220px; overflow-y: auto; padding: 0 14px 14px; font-size: 12px; line-height: 1.7; color: var(--text-mute); }
.policy-toggle .policy-body p { margin-bottom: 10px; }
.policy-toggle .policy-body strong { color: var(--text); }

.auth-foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-mute); }
.auth-foot a { color: var(--primary); font-weight: 700; }
.auth-foot a:hover { text-decoration: underline; }
.auth-foot a.auth-foot__muted { color: var(--text-mute); font-weight: 400; }

.auth-divider { display: flex; align-items: center; gap: 10px; margin: 22px 0; color: var(--text-mute); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 상담 방식·희망일시 선택 — 라디오는 설명줄이 함께 붙어야 무엇을 고르는지 알 수 있어
   input 옆에 제목(b)+설명(em) 2줄 구조로 놓는다. */
.form-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
/* `.form-field label`(특이도 0,2,0)이 display:block·margin-bottom을 걸어두고 있어, 클래스 하나짜리
   `.radio-row`(0,1,0)로는 밀린다. 라디오는 input이 텍스트 왼쪽에 와야 하므로 선택자를 같은 층으로 올린다. */
.form-field label.radio-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 400; }
.radio-row:has(input:checked) { border-color: var(--primary); background: var(--bg); }
/* `.form-field input`이 width:100%·padding·border를 걸어 텍스트 입력용으로 만들어져 있어, 그대로
   두면 라디오가 행 전체 폭을 차지하고 옆의 설명 묶음이 0px로 밀린다. 라디오만 되돌린다. */
.radio-row input { flex: none; width: auto; margin-top: 3px; padding: 0; border: none; }
/* 텍스트 묶음이 남는 폭을 다 쓰게 한다(기본 flex:0 1 auto면 내용 크기로 줄어들어 일찍 줄바꿈된다). */
.radio-row > span { flex: 1; min-width: 0; }
.radio-row b { display: block; font-size: 14px; font-weight: 600; }
.radio-row em { display: block; margin-top: 2px; font-size: 12px; font-style: normal; color: var(--text-mute); }
.field-row { display: flex; gap: 8px; }
.field-row > * { flex: 1; min-width: 0; }

/* 컨설팅 — page-head가 이미 위쪽 여백(52/44px)을 갖고 있어, 그 아래 오는 폼 카드까지 auth-shell
   기본값(80px)을 쓰면 헤더와 카드 사이가 지나치게 벌어진다. 이 페이지에서만 좁힌다. */
.consulting-shell { padding-top: 44px; }
