/* 로그인 · 회원가입 4화면 공용 — 시안 J1~J8 */
:root {
  --au-plum: #4d3f72;
  --au-plum-2: #6b5992;
  --au-lilac: #8c79b3;
  --au-line: #ebe6f1;
  --au-tint: #f3effa;
  --au-bg: #f7f4f9;
  --au-ink: #16181d;
  --au-sub: #5d6069;
  --au-hint: #767676;
  --au-red: #d92d20;
  --au-green: #2e9e44;
  --au-green-text: #1e7b34;
}

[hidden] { display: none !important; }

.au {
  min-height: 100vh;
  background: var(--au-bg);
  padding: 40px 20px 64px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  color: var(--au-ink);
  overflow-wrap: break-word;
}
.au:lang(ko), .au :lang(ko) { word-break: keep-all; }
.au a { color: inherit; text-decoration: none; }
.au *:focus-visible { outline: 2px solid var(--au-lilac); outline-offset: 2px; }
.au input::placeholder { color: var(--au-sub); }

.au-logo { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; }
.au-logo img { display: block; height: 36px; width: auto; }

.au-shell {
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  margin-top: 20px;
  padding: 40px 44px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 70px -45px rgba(60, 40, 110, .5), 0 0 0 1px var(--au-line);
}
.au-shell.is-terms, .au-shell.is-done { max-width: 560px; }
.au-shell.is-join { max-width: 600px; }

.au-eyebrow { margin: 0; font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 15px; color: var(--au-plum-2); }
.au-h1 { margin: 2px 0 0; font-size: 28px; font-weight: 900; line-height: 1.3; }
.au-lead { margin: 10px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--au-sub); }

/* 3단계 막대 */
.au-steps { display: flex; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; }
.au-steps li { flex: 1; padding-top: 12px; border-top: 4px solid var(--au-line); border-radius: 2px; font-size: 13.5px; font-weight: 700; color: var(--au-sub); }
.au-steps li.is-done, .au-steps li.is-now { border-top-color: var(--au-plum); }
.au-steps li.is-now { color: var(--au-ink); font-weight: 900; }

/* 칸 */
.au-group { margin: 22px 0 0; font-size: 13.5px; font-weight: 700; color: var(--au-plum); }
.au-row { margin-top: 18px; }
.au-group + .au-row { margin-top: 6px; }
.au-lbl { display: flex; align-items: baseline; gap: 6px; font-size: 15px; font-weight: 700; }
.au-req { font-size: 15px; font-weight: 700; color: var(--au-red); }
.au-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.au-opt { font-size: 13px; font-weight: 500; color: var(--au-sub); }
.au-field {
  display: flex;
  align-items: center;
  margin-top: 8px;
  border-radius: 16px;
  background: var(--au-bg);
  box-shadow: 0 0 0 1px var(--au-line);
  transition: box-shadow .2s;
}
.au-field:focus-within { box-shadow: 0 0 0 2px var(--au-lilac); }
.au-field.is-bad { box-shadow: 0 0 0 2px var(--au-red); }
.au-field.is-good { box-shadow: 0 0 0 2px var(--au-green); }
.au-field input {
  flex: 1;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  color: var(--au-ink);
  outline: none;
  box-shadow: none;
}
.au .au-field input:focus, .au .au-field input:focus-visible { outline: none; box-shadow: none; }
.au-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin-right: 6px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--au-plum);
  cursor: pointer;
}
.au-toggle:hover { background: var(--au-tint); }
.au-inbtn {
  flex: none;
  min-height: 40px;
  margin-right: 7px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: var(--au-plum);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
}
.au-inbtn:disabled { background: var(--au-line); color: var(--au-sub); cursor: wait; }
.au-toggle .material-symbols-outlined { font-size: 22px; line-height: 1; }
.au-help { margin: 6px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--au-hint); }
.au-msg { margin: 6px 0 0; font-size: 14px; font-weight: 700; line-height: 1.5; }
.au-msg.is-bad { color: var(--au-red); }
.au-msg.is-good { color: var(--au-green-text); }
.au-msg.is-bad::before { content: '✕ '; }
.au-msg.is-good::before { content: '✓ '; }

/* 비밀번호 규칙 */
.au-rules { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--au-sub); }
.au-rules li::before { content: '○ '; }
.au-rules li.is-met { color: var(--au-green-text); font-weight: 700; }
.au-rules li.is-met::before { content: '✓ '; }
.au-rules li.is-fail { color: var(--au-red); font-weight: 700; }
.au-rules li.is-fail::before { content: '✕ '; }

/* 이메일 도메인 추천 */
.au-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.au-chips button {
  min-height: 36px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: var(--au-tint);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--au-plum);
  cursor: pointer;
}

/* 단추 */
.au-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.au-btn.is-main { background: var(--au-plum); color: #fff; }
.au-btn.is-sub { background: var(--au-tint); color: var(--au-plum); }
.au-btn:disabled, .au-btn.is-off { background: var(--au-line); color: var(--au-sub); cursor: not-allowed; }
.au-btn.is-wide { width: 100%; }
.au-btns { display: flex; gap: 8px; margin-top: 26px; }
.au-btns .au-btn.is-sub { flex: 1; }
.au-btns .au-btn.is-main { flex: 2; }
.au-btn-note { margin: 10px 0 0; text-align: right; font-size: 14px; font-weight: 700; }

.au-links { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 18px 0 0; }
.au-link {
  min-height: 44px;
  padding: 0 6px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--au-plum);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.au-links .au-bar { color: #b4a3d3; }
.au-note { margin: 10px 0 0; text-align: center; font-size: 13.5px; line-height: 1.6; color: var(--au-sub); }

.au-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; font-size: 13.5px; color: var(--au-sub); }
.au-or::before, .au-or::after { content: ''; flex: 1; height: 1px; background: var(--au-line); }

/* 간편 로그인 · 가입 */
.au-social { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.au-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
}
.au-social img { width: 22px; height: 22px; border-radius: 50%; }
.au-social .is-kakao { background: #fee500; color: #191919; }
.au-social .is-naver { background: #fff; color: var(--au-ink); box-shadow: inset 0 0 0 1px var(--au-line); }
.au-quick { padding: 18px; border-radius: 20px; background: var(--au-bg); }
.au-quick-title { margin: 0 0 12px; font-size: 15px; font-weight: 700; }

.au-foot { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--au-line); text-align: center; font-size: 15px; }
.au-foot a { font-weight: 700; color: var(--au-plum); text-decoration: underline; text-underline-offset: 3px; }

.au-alert { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--au-tint); font-size: 14px; font-weight: 700; line-height: 1.5; }
.au-alert.is-info { margin: 0 0 18px; font-weight: 500; }
.au-alert.is-info strong { font-weight: 700; color: var(--au-plum); }
.au-alert.is-bad { background: #fdecea; color: #b42318; }
.au-caps { color: var(--au-red); font-weight: 700; }

/* 약관 동의 */
.au-all {
  display: block;
  margin: 0;
  padding: 18px;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1.5px var(--au-plum);
  cursor: pointer;
}
.au-all-row, .au-term-row { display: flex; align-items: center; gap: 12px; }
.au-all-row { font-size: 17px; font-weight: 900; }
.au-all-help { margin: 8px 0 0 36px; font-size: 14px; line-height: 1.6; color: var(--au-sub); }
.au-check { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--au-plum); cursor: pointer; }
.au-terms { margin: 12px 0 0; padding: 0; list-style: none; }
.au-terms > li { padding: 8px 0; border-bottom: 1px solid var(--au-line); }
.au-term-row label { display: flex; flex: 1; align-items: center; gap: 12px; min-height: 44px; font-size: 15.5px; font-weight: 700; cursor: pointer; }
.au-term-text { flex: 1; min-width: 0; }
.au-term-text .au-req { margin-left: 2px; }
.au-term-open { min-height: 44px; padding: 0 8px; border: none; background: none; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--au-plum); cursor: pointer; }
.au-term-body { margin: 4px 0 10px; padding: 16px; border-radius: 16px; background: var(--au-bg); max-height: 240px; overflow: auto; font-size: 13.5px; line-height: 1.7; color: var(--au-sub); }
.au-term-body table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.au-term-body th, .au-term-body td { padding: 8px; border-bottom: 1px solid var(--au-line); text-align: left; vertical-align: top; }
.au-term-body th { color: var(--au-ink); }

/* 체크 상자 묶음(광고 수신) */
.au-box { display: flex; align-items: flex-start; gap: 12px; margin-top: 22px; padding: 16px 18px; border-radius: 18px; background: var(--au-bg); cursor: pointer; }
.au-box .au-check { width: 22px; height: 22px; margin-top: 1px; }
.au-box strong { font-size: 15px; }
.au-box p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--au-sub); }

/* 가입 완료 */
.au-done { text-align: center; }
.au-done-mark { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; background: var(--au-tint); color: var(--au-plum); font-size: 26px; font-weight: 900; }
.au-done p { margin: 10px 0 0; font-size: 16px; line-height: 1.7; }
.au-done .au-btns { flex-wrap: wrap; }
.au-done .au-btns .au-btn { flex: 1 1 40%; }
.au-done .au-btns .au-btn.is-main { flex-basis: 100%; }
.au-facts { margin: 22px 0 0; padding: 16px 18px; border-radius: 16px; background: var(--au-bg); text-align: left; font-size: 14.5px; }
.au-facts div { display: flex; gap: 14px; padding: 4px 0; }
.au-facts dt { flex: none; min-width: 110px; font-weight: 700; color: var(--au-plum); }
.au-facts dd { margin: 0; }
.au-done-note { margin: 12px 0 0; text-align: left; font-size: 14px; color: var(--au-sub); }
.au-done-note a { font-weight: 700; color: var(--au-plum); text-decoration: underline; }

/* 찾기 창 */
.au-dialog { width: 440px; max-width: calc(100% - 32px); padding: 28px; border: none; border-radius: 24px; box-shadow: 0 40px 80px -40px rgba(22, 24, 29, .6); font-family: inherit; color: var(--au-ink); }
.au-dialog::backdrop { background: rgba(22, 24, 29, .45); }
.au-dialog-head { display: flex; align-items: center; justify-content: space-between; }
.au-dialog-head h2 { margin: 0; font-size: 20px; font-weight: 900; }
.au-dialog-close { width: 44px; height: 44px; border: none; border-radius: 50%; background: var(--au-tint); font-size: 20px; color: var(--au-plum); cursor: pointer; }
.au-result { margin: 18px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--au-bg); font-size: 14.5px; font-weight: 700; line-height: 1.6; }
.au-result .copy-btn { margin-left: 6px; border: none; background: none; color: var(--au-plum); cursor: pointer; vertical-align: middle; }

/* 휴대폰 — 카드 테두리 없이 화면 전체, 주 단추는 하단 고정 바 */
@media (max-width: 767px) {
  .au { padding: 16px 16px 160px; align-items: stretch; background: #fff; }
  .au-sticky .au-btns, .au-btns.au-sticky { margin-top: 0; }
  .au-logo { align-self: flex-start; padding: 6px 0; }
  .au-shell, .au-shell.is-terms, .au-shell.is-join, .au-shell.is-done { max-width: none; margin-top: 12px; padding: 0; border-radius: 0; box-shadow: none; }
  .au-h1 { font-size: 26px; }
  .au-quick { padding: 14px; }
  .au-social a { padding: 0 14px; }
  .au-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    margin: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -1px 0 var(--au-line);
  }
  .au-btn-note { margin-bottom: 0; }
  .au-facts div { flex-direction: column; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .au * { transition: none !important; animation: none !important; }
}
