.auth__scroll {
  padding: 12px 18px calc(28px + var(--safe-bottom));
}

.auth-step {
  animation: auth-in 0.22s ease both;
}

@keyframes auth-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-head {
  margin: 4px 0 18px;
  text-align: center;
}

.auth-kicker {
  color: var(--olive-2);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-head h2 {
  margin: 7px 0 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.auth-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form .field {
  gap: 5px;
}

.auth-form .field input,
.auth-form .field select {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: var(--cream-3);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form .field input:focus,
.auth-form .field select:focus {
  border-color: var(--olive-2);
  box-shadow: 0 0 0 3px rgba(94, 97, 53, 0.12);
}

.auth-form .field input::placeholder {
  color: var(--muted-2);
}

.auth-form .field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(0% + 16px) 20px, calc(0% + 21px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-left: 32px;
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.7;
}

.auth-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--olive);
}

.auth-check a,
.auth-note a {
  color: var(--olive);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-note {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.auth-error {
  min-height: 0;
  margin: 0;
  color: #a33b2e;
  font-size: 11px;
  line-height: 1.6;
}

.auth-error:not(:empty) {
  padding: 8px 10px;
  border-radius: 9px;
  background: #f8e9e4;
}

.auth-switch {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}

.auth-switch button,
.auth-captcha-retry {
  padding: 0;
  border: 0;
  background: none;
  color: var(--olive);
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.auth-captcha-retry {
  align-self: flex-start;
  font-size: 10.5px;
}

.auth-captcha-retry[hidden] {
  display: none;
}

.auth-otp-input {
  height: 56px !important;
  text-align: center;
  font-size: 24px !important;
  font-weight: 700;
  letter-spacing: 9px;
  direction: ltr;
}

.auth-resend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
}

.auth-resend button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--olive);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.auth-resend button:disabled {
  color: var(--muted-2);
  cursor: default;
}

.auth-resend span {
  color: var(--muted);
  font-size: 10.5px;
}

.auth-captcha {
  min-height: 0;
}

.strength__bars {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.strength__bars span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.2s ease;
}

.strength__bars span.is-on:nth-child(1) { background: #b34a3d; }
.strength__bars span.is-on:nth-child(2) { background: #c18a35; }
.strength__bars span.is-on:nth-child(3) { background: #9b9a45; }
.strength__bars span.is-on:nth-child(4) { background: #5e6135; }

.strength__label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.btn--outline {
  border: 1px solid var(--olive);
  background: transparent;
  color: var(--olive);
  box-shadow: none;
}

.account__authcard {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--cream-3);
  text-align: center;
}

.account__authcard h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.account__authcard p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.account__authcard .btn {
  height: 44px;
  border-radius: 13px;
  font-size: 12.5px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: var(--olive);
  color: var(--cream-3);
  box-shadow: 0 12px 26px rgba(74, 76, 39, 0.18);
}

.profile-card__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cream-3);
  color: var(--olive);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

.profile-card__body {
  min-width: 0;
  flex: 1;
}

.profile-card__body h3 {
  margin: 0 0 3px;
  color: #fffdf8;
  font-size: 15px;
}

.profile-card__body p {
  margin: 0;
  color: rgba(255, 253, 248, 0.72);
  font-size: 10.5px;
  direction: ltr;
  text-align: right;
}

.profile-card__badge {
  padding: 4px 8px;
  border: 1px solid rgba(255, 253, 248, 0.24);
  border-radius: 999px;
  color: rgba(255, 253, 248, 0.78);
  font-size: 9px;
}

.profile-block {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--cream-3);
}

.profile-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile-block h4 {
  margin: 0;
  color: var(--ink);
  font-size: 12.5px;
}

.profile-block__edit {
  padding: 0;
  border: 0;
  background: none;
  color: var(--olive);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.profile-block p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.profile-incomplete {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6ecd8;
  color: #7a5a22;
  font-size: 10.5px;
  line-height: 1.7;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.profile-action {
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream-3);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}

.profile-action--danger {
  color: #9b3a2e;
  border-color: #e4c7c0;
}

.profile-action--logout {
  grid-column: 1 / -1;
  color: var(--olive);
}

[data-guest-only][hidden] {
  display: none !important;
}

#otp-captcha-slot:not(:empty) {
  margin-top: 14px;
}

.delete-dialog {
  width: min(350px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--cream-3);
  color: var(--ink);
  font-family: inherit;
  box-shadow: 0 20px 60px rgba(35, 33, 23, 0.25);
}

.delete-dialog::backdrop {
  background: rgba(35, 33, 23, 0.5);
}

.delete-dialog h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 23px;
}

.delete-dialog > .auth-note {
  margin-bottom: 16px;
}

.delete-dialog__actions {
  display: flex;
  gap: 8px;
}

.delete-dialog__actions .btn {
  flex: 1;
  min-height: 44px;
  font-size: 11px;
}

.btn--danger {
  background: #9b3a2e;
  color: #fffdf8;
}
