* { box-sizing: border-box; }

/* 좌상단 테마 토글 */
#btn-theme {
  position: fixed;
  top: 16px; left: 16px;
}

body {
  margin: 0; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-base);
  background: var(--color-bg);
  padding: 24px 16px;   /* 모바일 여백 */
}

.card {
  width: 100%; max-width: 400px;
  padding: 52px 40px 44px;   /* 상단 여백 충분히, 좌우 넉넉하게 */
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.logo-wrap {
  display: flex; justify-content: center; align-items: center;
  margin-bottom: 32px;   /* 로고 아래 여백 */
}

h1 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--color-text);
}

.sub {
  color: var(--color-text-sub);
  font-size: 13px;
  margin-bottom: 28px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-text-label);
}

input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-input);
  font-size: 14px;
  font-family: var(--font-base);
  margin-bottom: 16px;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  outline: none;
}
input:focus {
  border-color: var(--color-focus-ring);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

button {
  width: 100%; padding: 12px;
  background: var(--color-brand);
  color: var(--color-text-inverse);
  border: 0; border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-base);
  cursor: pointer;
  transition: background var(--transition-base);
}
button:hover:not(:disabled) { background: var(--color-brand-hover); }
button:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}
button:disabled { opacity: .5; cursor: not-allowed; }

.msg { font-size: 13px; margin-top: 14px; min-height: 18px; }
.msg.err { color: var(--color-error); }
.msg.ok  { color: var(--color-success); }

/* Step 2 — 발송된 메일 주소 표시 */
.sent-to {
  font-size: 13px;
  color: var(--color-text-sub);
  text-align: center;
  margin-bottom: 20px;
  overflow-wrap: break-word;
}
.sent-to strong { color: var(--color-text); font-weight: 600; }

/* Ghost 버튼 — 재시도 링크 */
.btn-ghost {
  width: auto;
  background: transparent;
  color: var(--color-text-sub);
  font-size: 12px;
  font-weight: 400;
  padding: 10px 0;   /* 터치 영역 확보 */
  margin-top: 4px;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  display: block;
  transition: color var(--transition-base);
}
.btn-ghost:hover:not(:disabled) {
  background: transparent;
  color: var(--color-text);
}

.hidden { display: none; }

/* Step 전환 fade-in 애니메이션 */
#step-email:not(.hidden),
#step-code:not(.hidden) {
  animation: stepFade var(--transition-base);
}
@keyframes stepFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile (≤480px) ────────────────────── */
@media (max-width: 480px) {
  body { padding: 16px 12px; }
  .card { padding: 40px 24px 32px; }
  .logo-wrap { margin-bottom: 24px; }
  .sub { margin-bottom: 24px; }
  #btn-theme { top: 12px; left: 12px; }
}
