/* Start, login, terms and interests frames from final Figma section 4091:13913. */
.container.auth-container {
  width: 100%;
  max-width: 393px;
  min-height: 100svh;
  margin: 0 auto;
  padding: 0;
  overflow-x: hidden;
}

.auth-screen {
  display: flex;
  width: 100%;
  min-height: 100svh;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  background: var(--prism-color-surface);
  color: var(--prism-color-text-primary);
}

.start-logo {
  display: flex;
  height: 48px;
  flex: none;
  align-items: center;
  padding: 8px 20px;
}

.start-logo img { width: 102px; height: 31px; object-fit: contain; }
.start-copy { display: grid; flex: 1; align-content: center; justify-items: center; gap: 16px; padding: 0 32px; text-align: center; }
.start-copy h1, .login-heading h1, .terms-body h1, .interests-body h1 { margin: 0; font-size: var(--prism-font-display-24); font-weight: var(--prism-font-weight-bold); line-height: var(--prism-line-display-24); letter-spacing: 0; }
.start-copy h1, .start-copy p, .login-heading p, .terms-body h1, .interests-body h1 { white-space: pre-line; }
.start-copy p { margin: 0; color: var(--prism-color-text-secondary); font-size: var(--prism-font-body-15); line-height: var(--prism-line-body-15-regular); }
.start-actions { display: grid; gap: 8px; padding: 12px 20px calc(env(safe-area-inset-bottom) + 8px); }

.auth-topbar { display: flex; height: 52px; flex: none; align-items: center; justify-content: space-between; padding: 0 4px; }
.auth-back { display: grid; width: 44px; min-width: 44px; height: 44px; min-height: 44px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.auth-back img { width: 24px; height: 24px; filter: none; }
.login-body { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 12px; padding: 16px 20px 8px; }
.password-body { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 12px; padding: 16px 20px 8px; }
.login-heading { display: grid; width: 100%; justify-items: center; gap: 12px; text-align: center; }
.login-heading p { margin: 0; color: var(--prism-color-text-secondary); font-size: var(--prism-font-body-15); line-height: var(--prism-line-body-15-regular); white-space: pre-line; }
.password-email { margin: 0; color: var(--prism-color-text-secondary); font-size: var(--prism-font-body-14); line-height: var(--prism-line-body-14); }
.auth-form { display: grid; width: 100%; align-content: start; gap: 12px; padding-top: 24px; }
.auth-form.is-error { gap: 24px; }
.auth-email-group { display: grid; gap: 0; }
.auth-form input[type="email"], .auth-form input[type="password"] { width: 100%; height: 52px; min-height: 52px; margin: 0; padding: 0 16px; border: 1px solid var(--prism-color-border-default); border-radius: var(--prism-radius-lg); background: var(--prism-color-surface); color: var(--prism-color-text-primary); font-family: "Pretendard", sans-serif; font-size: var(--prism-font-body-15); line-height: var(--prism-line-body-15-regular); }
.auth-form input::placeholder { color: var(--prism-color-text-tertiary); }
.auth-form input:focus { border: 1.5px solid var(--prism-color-brand); box-shadow: none; }
.auth-form input[aria-invalid="true"] { border: 1.5px solid var(--prism-color-danger); }
.auth-form.is-error .auth-email-group { gap: 6px; }
.auth-form.is-submitting .auth-email-input { opacity: .4; }
.auth-error { min-height: 0; margin: 0; color: var(--prism-color-danger); font-size: var(--prism-font-caption-12); line-height: var(--prism-line-caption-12); }
.auth-session-notice { margin: 0; color: var(--prism-color-text-secondary); font-size: var(--prism-font-caption-12); line-height: var(--prism-line-caption-12); }
.auth-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.auth-submit:disabled { opacity: 1; background: var(--prism-color-brand); color: var(--prism-color-text-on-brand); }
.auth-spinner { width: 20px; height: 20px; filter: brightness(0) invert(1); animation: prism-spin 1s linear infinite; }
.account-switch { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0; padding: 4px 0; color: var(--prism-color-text-secondary); font-size: var(--prism-font-body-14); line-height: var(--prism-line-body-14); }
.account-switch-link { width: auto; min-height: 44px; padding: 4px; background: transparent; color: var(--prism-color-brand); font-size: var(--prism-font-body-14); font-weight: var(--prism-font-weight-medium); }
.account-switch-link:disabled { opacity: 1; }

.terms-body { display: grid; flex: 1; align-content: start; gap: 8px; padding: 8px 20px 0; }
.terms-body h1 { color: var(--prism-color-text-primary); }
.terms-description { margin: 0; color: var(--prism-color-text-secondary); font-size: var(--prism-font-body-15); line-height: var(--prism-line-body-15-regular); }
.agreement-all { position: relative; display: flex; min-height: 60px; align-items: center; gap: 12px; margin-top: 16px; padding: 16px; border-radius: var(--prism-radius-lg); background: var(--prism-color-surface-subtle); color: var(--prism-color-text-primary); font-size: var(--prism-font-body-15); font-weight: var(--prism-font-weight-medium); }
.agreement-all.is-checked { background: var(--prism-color-brand-subtle); }
.agreement-list { display: grid; align-content: start; gap: 0; margin: 0; padding: 8px 16px 0; list-style: none; }
/* Figma 8010:114: 상세 보기 chevron은 행 오른쪽에 같은 줄로 붙는다. */
.agreement-list li { display: flex; align-items: center; gap: 4px; }
.agreement-row { position: relative; display: flex; min-width: 0; flex: 1; min-height: 48px; align-items: center; gap: 12px; color: var(--prism-color-text-primary); font-size: var(--prism-font-body-15); line-height: var(--prism-line-body-15-regular); }
.agreement-all input, .agreement-row input { position: absolute; width: 24px; height: 24px; min-height: 24px; margin: 0; opacity: 0; }
.agreement-check { position: relative; display: grid; width: 24px; height: 24px; flex: none; place-items: center; }
.agreement-check::before { position: absolute; inset: 1px; border: 1.5px solid var(--prism-color-border-default); border-radius: 50%; background: var(--prism-color-surface); content: ""; }
.agreement-check img { position: relative; z-index: 1; width: 16px; height: 16px; opacity: 0; filter: brightness(0) invert(1); }
.agreement-all input:checked + .agreement-check::before, .agreement-row input:checked + .agreement-check::before { border-color: var(--prism-color-brand); background: var(--prism-color-brand); }
.agreement-all input:checked + .agreement-check img, .agreement-row input:checked + .agreement-check img { opacity: 1; }
.agreement-label { min-width: 0; flex: 1; }
.agreement-detail { display: grid; width: 32px; min-width: 32px; height: 32px; place-items: center; padding: 0; border: 0; background: transparent; }
.agreement-detail img { width: 20px; height: 20px; object-fit: contain; filter: none; }
.terms-pending { margin: 12px 0 0; color: var(--prism-color-text-tertiary); font-size: var(--prism-font-caption-12); line-height: var(--prism-line-caption-12); }
.terms-actions { display: grid; padding: 12px 20px calc(env(safe-area-inset-bottom) + 8px); }

/* MVP 닉네임 입력 (Figma 8010:101): 로고 헤더 48px, 중앙 정렬 본문,
   160px 캐릭터, 채워진 입력 필드, 하단 고정 CTA. */
.nickname-topbar { display: flex; height: 48px; flex: none; align-items: center; padding: 8px 20px; }
.nickname-topbar img { width: 102px; height: 31px; object-fit: contain; }
.nickname-body { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 0 24px; text-align: center; }
.nickname-character { width: 160px; height: 160px; flex: none; object-fit: contain; }
.nickname-body h1 { margin: 0; color: var(--prism-color-text-primary); font-size: var(--prism-font-display-24); font-weight: var(--prism-font-weight-bold); line-height: 32px; letter-spacing: 0; }
.nickname-description { margin: 0; color: var(--prism-color-text-secondary); font-size: var(--prism-font-body-15); font-weight: var(--prism-font-weight-regular); line-height: 24px; }
.nickname-field { display: grid; width: 100%; gap: 8px; text-align: left; }
.nickname-field label { display: block; }
.nickname-field input { width: 100%; height: 52px; min-height: 52px; margin: 0; padding: 0 16px; border: 1px solid transparent; border-radius: var(--prism-radius-lg); background: #f6f6f8; color: #454342; font-family: "Pretendard", sans-serif; font-size: var(--prism-font-body-16); font-weight: var(--prism-font-weight-medium); }
.nickname-field input::placeholder { color: var(--prism-color-text-tertiary); }
.nickname-field input:focus { border: 1.5px solid var(--prism-color-brand); background: var(--prism-color-surface); box-shadow: none; }
.nickname-count { margin: 0; padding-left: 2px; text-align: left; color: var(--prism-color-text-tertiary); font-size: var(--prism-font-body-13); line-height: var(--prism-line-body-13-regular); }
.nickname-actions { display: grid; flex: none; padding: 12px 20px calc(env(safe-area-inset-bottom) + 8px); }

.interests-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 8px 20px 0; }
.interests-body h1 { color: var(--prism-color-text-primary); }
.interests-description { margin: 0; color: var(--prism-color-text-secondary); font-size: var(--prism-font-body-15); line-height: var(--prism-line-body-15-regular); }
.interest-selection-row { display: flex; min-height: 36px; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 24px 0 4px; }
.selection-count { margin: 0; color: var(--prism-color-brand); font-size: var(--prism-font-caption-12); font-weight: var(--prism-font-weight-medium); }
.selection-count.is-empty { color: var(--prism-color-text-tertiary); }
.select-all { width: auto; min-height: 36px; padding: 8px 0 8px 8px; background: transparent; color: var(--prism-color-brand); font-size: var(--prism-font-body-14); font-weight: var(--prism-font-weight-medium); }
.interest-grid { display: flex; flex-wrap: wrap; gap: 14px; align-content: start; margin: 0; padding: 0; }
.interest-actions { display: grid; gap: 8px; margin-top: auto; padding: 12px 0 calc(env(safe-area-inset-bottom) + 8px); }
.interest-hint { margin: 0; color: var(--prism-color-text-tertiary); font-size: var(--prism-font-caption-12); line-height: var(--prism-line-caption-12); }

@media (prefers-reduced-motion: reduce) { .auth-spinner { animation-duration: 3s; } }
