:root {
  --color-bg: #fbfaff;
  --color-surface: #ffffff;
  --color-surface-soft: #fff7ed;
  --color-text: #090a2a;
  --color-text-muted: #667085;
  --color-border: #e9eaf2;
  --color-primary: #7c3aed;
  --color-primary-dark: #5b21b6;
  --color-primary-soft: #f1e8ff;
  --color-orange: #ff8a00;
  --color-orange-dark: #f97316;
  --color-yellow: #fdba22;
  --color-blue: #1e90ff;
  --color-green: #22c55e;
  --color-danger: #f43f5e;
  --shadow-card: 0 18px 48px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  max-width: 100%;
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  color: var(--color-text);
  background:
    radial-gradient(circle at 10% 25%, rgba(255, 138, 0, 0.08), transparent 26%),
    radial-gradient(circle at 88% 16%, rgba(124, 58, 237, 0.12), transparent 28%),
    linear-gradient(180deg, #fffdfb 0%, var(--color-bg) 100%);
  font-family: "Inter", "SF Pro Display", "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-page {
  position: relative;
  isolation: isolate;
}

.auth-page::before,
.auth-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
}

.auth-page::before {
  width: 360px;
  height: 360px;
  left: -180px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.14), transparent 70%);
}

.auth-page::after {
  width: 420px;
  height: 420px;
  right: -200px;
  top: -160px;
  background: radial-gradient(circle, rgba(255, 138, 0, 0.09), transparent 70%);
}

.auth-topbar {
  width: min(100% - 64px, 1480px);
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.auth-logo {
  width: 188px;
  height: 56px;
  object-fit: contain;
  object-position: left center;
}

.auth-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.coin-pill {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  color: var(--color-text);
  font-weight: 800;
}

.coin-icon {
  width: 27px;
  height: 27px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: radial-gradient(circle at 32% 28%, #fff7b5, var(--color-yellow) 46%, #ff9f0a 100%);
  box-shadow: inset 0 -2px 4px rgba(147, 83, 0, 0.28), 0 4px 12px rgba(253, 186, 34, 0.32);
  color: #ffffff;
}

.coin-icon svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.coin-add,
.icon-circle {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--color-text);
  background: #f8f8fc;
  border: 1px solid var(--color-border);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.icon-circle {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.icon-circle svg,
.coin-add svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2.3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-dot,
.avatar-dot {
  position: absolute;
  border-radius: 999px;
  border: 2px solid #fff;
}

.notification-dot {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  top: -7px;
  right: -7px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.avatar-dot {
  width: 13px;
  height: 13px;
  right: 3px;
  top: 3px;
  background: var(--color-primary);
}

.auth-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 4px solid #ff7a69;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.auth-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 800;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 14px 26px rgba(109, 40, 217, 0.24);
}

.secondary-btn,
.ghost-btn {
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
}

.ghost-btn {
  color: var(--color-primary);
  background: #fff;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.coin-add:hover,
.icon-circle:hover {
  transform: translateY(-1px);
}

.gradient-text {
  background: linear-gradient(135deg, #ff6b21 0%, #f43f8f 54%, #2878ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-shell {
  width: min(100% - 64px, 1320px);
  margin: 0 auto;
}

.decor-shape {
  position: absolute;
  width: var(--size, 24px);
  height: var(--size, 24px);
  pointer-events: none;
  opacity: 0.95;
  filter: drop-shadow(0 8px 14px rgba(124, 58, 237, 0.14));
}

.decor-diamond {
  border-radius: 7px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  transform: rotate(18deg);
}

.decor-triangle {
  width: 0;
  height: 0;
  border-left: calc(var(--size, 24px) / 2) solid transparent;
  border-right: calc(var(--size, 24px) / 2) solid transparent;
  border-bottom: var(--size, 24px) solid #0ea5e9;
  filter: drop-shadow(0 8px 14px rgba(14, 165, 233, 0.18));
}

.decor-star {
  display: grid;
  place-items: center;
  color: var(--color-yellow);
}

.decor-star svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.auth-footer {
  width: min(100% - 64px, 1480px);
  margin: 56px auto 0;
  min-height: 86px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.auth-footer .auth-logo {
  width: 160px;
}

.auth-footer-links,
.auth-socials {
  display: flex;
  align-items: center;
  gap: 28px;
}

.auth-socials {
  gap: 10px;
}

.auth-socials span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-primary);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

/* Login */
.login-shell {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.92fr);
  align-items: stretch;
  overflow: hidden;
  min-height: min(720px, calc(100vh - 104px));
}

.login-hero-panel {
  position: relative;
  padding: 58px 60px 42px;
  background:
    linear-gradient(90deg, rgba(255, 250, 246, 0.9), rgba(245, 236, 255, 0.68)),
    url("hero-challenge.webp") center / cover no-repeat,
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.9), transparent 18%),
    linear-gradient(145deg, #fff8f1 0%, #f5ecff 48%, #fff8f2 100%);
  overflow: hidden;
}

.login-hero-panel h1 {
  max-width: 560px;
  margin: 28px 0 24px;
  font-size: clamp(48px, 4.4vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.login-hero-panel p {
  max-width: 510px;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 25px;
  line-height: 1.4;
  font-weight: 500;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--color-primary);
  letter-spacing: 0.18em;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow span {
  color: var(--color-orange);
}

.login-hero-art {
  display: none;
}

.login-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.login-dots span {
  width: 14px;
  height: 7px;
  border-radius: 999px;
  background: #ded9e8;
}

.login-dots span:first-child {
  width: 24px;
  background: var(--color-primary);
}

.login-card {
  padding: 26px 50px 30px;
  background: rgba(255, 255, 255, 0.96);
  border-left: 1px solid var(--color-border);
  box-shadow: -16px 0 42px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 48px;
}

.auth-tab {
  height: 62px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 19px;
  font-weight: 800;
  position: relative;
}

.auth-tab.active {
  color: var(--color-primary);
}

.auth-tab.active::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -1px;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.auth-intro {
  text-align: center;
  margin-bottom: 24px;
}

.auth-intro h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.auth-intro p {
  max-width: 480px;
  margin: 0 auto;
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1.48;
  font-weight: 500;
}

.login-actions {
  display: grid;
  gap: 14px;
}

.auth-provider {
  width: 100%;
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 14px;
  padding: 0 26px;
  border-radius: 18px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  font-size: 18px;
  font-weight: 800;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.auth-provider[hidden] {
  display: none !important;
}

.auth-provider > span,
.guest-card > span {
  min-width: 0;
}

.auth-provider > span:last-child {
  overflow-wrap: anywhere;
}

.auth-provider:hover,
.guest-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.auth-provider.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 14px 26px rgba(109, 40, 217, 0.2);
}

.phone-auth-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: var(--shadow-soft);
}

.phone-auth-panel[hidden] {
  display: none;
}

.phone-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.phone-mode-tabs button {
  min-height: 40px;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-muted);
  font-weight: 900;
}

.phone-mode-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.18);
}

.phone-panel-copy {
  text-align: left;
}

.phone-panel-copy strong {
  display: block;
  color: var(--color-text);
  font-size: 18px;
  font-weight: 900;
}

.phone-panel-copy p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.phone-field {
  grid-template-columns: 30px 1fr;
}

.phone-auth-panel .primary-btn {
  width: 100%;
  min-height: 54px;
  margin-top: 0;
}

.phone-forgot {
  justify-self: center;
  padding: 4px 10px;
  background: transparent;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 900;
}

.internal-test-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(14, 165, 233, .28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 12%, rgba(34, 211, 238, .18), transparent 32%),
    linear-gradient(145deg, rgba(14, 165, 233, .08), rgba(124, 58, 237, .08)),
    #fff;
  box-shadow: 0 16px 34px rgba(14, 165, 233, .12);
}

.internal-test-panel[hidden] {
  display: none;
}

.internal-test-head {
  display: grid;
  gap: 6px;
  text-align: left;
}

.internal-test-head strong {
  color: var(--color-text);
  font-size: 18px;
  font-weight: 900;
}

.internal-test-head p,
.internal-test-balance {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650;
}

.internal-test-badge {
  width: max-content;
  padding: 6px 9px;
  border: 1px solid rgba(14, 165, 233, .25);
  border-radius: 999px;
  color: #075985;
  background: rgba(224, 242, 254, .88);
  font-size: 10px;
  letter-spacing: .12em;
  font-weight: 950;
}

.internal-test-field {
  grid-template-columns: 30px 1fr;
}

.internal-test-balance {
  padding: 9px 11px;
  border-radius: 12px;
  color: #075985;
  background: rgba(224, 242, 254, .72);
  text-align: center;
  font-weight: 850;
}

.internal-test-submit {
  width: 100%;
  min-height: 54px;
  background: linear-gradient(135deg, #0284c7, #7c3aed);
  box-shadow: 0 14px 26px rgba(2, 132, 199, .2);
}

.internal-test-submit:disabled {
  cursor: wait;
  opacity: .68;
}

.provider-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  justify-self: end;
}

.provider-icon svg {
  width: 30px;
  height: 30px;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 24px 0;
  color: var(--color-text-muted);
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--color-border);
}

.guest-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 56px 1fr 26px;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
  border-radius: 20px;
  background: var(--color-primary-soft);
  color: var(--color-text);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.guest-card h3,
.guest-card p {
  margin: 0;
}

.guest-card h3 {
  color: var(--color-primary);
  font-size: 20px;
  font-weight: 850;
}

.guest-card p {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
}

.guest-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--color-primary);
  background: rgba(124, 58, 237, 0.12);
}

.guest-icon svg,
.guest-card > svg {
  width: 27px;
  height: 27px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-legal,
.auth-switch {
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.5;
}

.auth-legal {
  margin: 28px auto 0;
  max-width: 470px;
  font-size: 14px;
  font-weight: 500;
}

.auth-legal a,
.auth-switch a {
  color: var(--color-primary);
  font-weight: 800;
}

.auth-switch {
  display: none;
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
  font-size: 17px;
  font-weight: 600;
}

.mobile-login-head {
  display: none;
}

/* OTP and password shared */
.auth-simple-shell {
  width: min(100% - 64px, 1280px);
  margin: 18px auto 0;
}

.auth-minimal-head {
  width: min(100% - 64px, 1480px);
  min-height: 90px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.login-link {
  color: var(--color-text-muted);
  font-size: 15px;
  font-weight: 600;
}

.login-link a {
  color: var(--color-primary);
  font-weight: 850;
}

.verify-stage {
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(0, 1fr);
  overflow: hidden;
}

.verify-info {
  position: relative;
  padding: 58px 48px;
  background:
    radial-gradient(circle at 60% 20%, rgba(255, 255, 255, 0.95), transparent 21%),
    linear-gradient(150deg, #fff9f1, #f4ecff 72%);
}

.verify-art,
.password-art {
  width: min(66%, 360px);
  aspect-ratio: 1;
  margin: 0 auto 32px;
  position: relative;
  display: grid;
  place-items: center;
}

.phone-illustration,
.lock-illustration,
.chat-illustration {
  width: 70%;
  height: 80%;
  border-radius: 34px;
  background: linear-gradient(145deg, #a78bfa, #ffffff);
  border: 12px solid #7c3aed;
  box-shadow: 0 24px 46px rgba(124, 58, 237, 0.18);
  position: relative;
}

.phone-illustration::before,
.phone-illustration::after {
  content: "";
  position: absolute;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.phone-illustration::before {
  width: 118px;
  height: 64px;
  right: -56px;
  top: 72px;
}

.phone-illustration::after {
  width: 92px;
  height: 108px;
  left: 50%;
  bottom: 52px;
  transform: translateX(-50%);
  background: linear-gradient(145deg, #8b5cf6, #fff);
  clip-path: polygon(50% 0%, 92% 18%, 84% 78%, 50% 100%, 16% 78%, 8% 18%);
}

.gold-lock {
  position: absolute;
  width: 98px;
  height: 84px;
  right: 42px;
  bottom: 26px;
  border-radius: 22px;
  background: linear-gradient(145deg, #ffd057, #ff8a00);
  box-shadow: 0 18px 34px rgba(255, 138, 0, 0.2);
}

.gold-lock::before {
  content: "";
  position: absolute;
  width: 54px;
  height: 44px;
  left: 22px;
  top: -32px;
  border: 12px solid #ffac10;
  border-bottom: 0;
  border-radius: 34px 34px 0 0;
}

.secure-badge,
.success-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 8px 13px;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 850;
}

.verify-info h1 {
  margin: 18px 0 14px;
  max-width: 470px;
  font-size: clamp(34px, 3vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.verify-info p {
  max-width: 455px;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
}

.benefit-list {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.benefit-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(233, 234, 242, 0.78);
}

.benefit-icon,
.step-dot,
.info-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.benefit-icon.orange {
  color: var(--color-orange);
  background: #fff1d6;
}

.benefit-icon.green {
  color: var(--color-green);
  background: #e8fff1;
}

.benefit-icon svg,
.step-dot svg,
.info-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.benefit-item h3,
.benefit-item p {
  margin: 0;
}

.benefit-item h3 {
  font-size: 15px;
  font-weight: 850;
}

.benefit-item p {
  margin-top: 4px;
  font-size: 13px;
}

.verify-form {
  padding: 60px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.progress-line {
  width: min(100%, 560px);
  margin: 0 auto 82px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 18px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 700;
}

.step-item strong {
  display: block;
  color: var(--color-primary);
}

.step-dot {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  flex: 0 0 auto;
  font-weight: 900;
}

.step-line {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
}

.verify-form h2,
.password-card h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.verify-form > p,
.password-card > p {
  margin: 0 auto;
  color: var(--color-text-muted);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 500;
}

.verify-number {
  display: block;
  margin-top: 8px;
  color: var(--color-text);
  font-size: 20px;
  font-weight: 850;
}

.otp-row {
  margin: 42px auto 20px;
  display: grid;
  grid-template-columns: repeat(6, minmax(46px, 66px));
  gap: 16px;
  justify-content: center;
}

.otp-input {
  height: 66px;
  border-radius: 16px;
  border: 2px solid var(--color-border);
  background: #fff;
  text-align: center;
  color: var(--color-text);
  font-size: 30px;
  font-weight: 850;
  outline: none;
  box-shadow: var(--shadow-soft);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  user-select: text;
  -webkit-user-select: text;
}

.otp-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 5px rgba(124, 58, 237, 0.1), var(--shadow-soft);
}

.otp-row.shake {
  animation: shake 260ms ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.resend-copy {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
}

.resend-copy button {
  background: transparent;
  color: var(--color-primary);
  font-weight: 850;
}

.edit-phone {
  margin: 22px auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  color: var(--color-primary);
  font-weight: 850;
}

.security-note {
  width: min(100%, 500px);
  margin: 46px auto 0;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--color-primary-soft);
  text-align: left;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
}

.mobile-auth-head,
.mobile-stepper,
.mobile-only {
  display: none !important;
}

.auth-secure-strip {
  width: min(100% - 64px, 1280px);
  margin: 38px auto 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  background: var(--color-primary-soft);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
}

/* Create password */
.password-shell {
  width: min(100% - 64px, 620px);
  margin: 6px auto 0;
}

.password-card {
  padding: 48px;
  text-align: center;
}

.password-card .password-art {
  width: 120px;
  height: 94px;
  margin-bottom: 22px;
}

.lock-illustration {
  width: 74px;
  height: 74px;
  border: 0;
  border-radius: 50%;
  background: var(--color-primary-soft);
  box-shadow: none;
}

.lock-illustration::before {
  content: "";
  position: absolute;
  width: 30px;
  height: 26px;
  left: 22px;
  top: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.lock-illustration::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 20px;
  left: 25px;
  top: 16px;
  border: 6px solid #7c3aed;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.verified-row {
  margin: 28px 0;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #b9f4ce;
  border-radius: 16px;
  background: #effdf4;
  text-align: left;
}

.verified-row strong,
.verified-row span {
  display: block;
}

.verified-row span {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
}

.verified-check,
.verified-badge {
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--color-green);
  border-radius: 999px;
}

.verified-check {
  width: 36px;
  height: 36px;
  align-self: center;
  justify-self: center;
  color: #fff;
}

.verified-check svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.verified-badge {
  color: #16a34a;
  background: #dffbea;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 850;
}

.verified-icon-only {
  width: 32px;
  height: 32px;
  padding: 0;
  color: #16a34a;
}

.form-stack {
  display: grid;
  gap: 18px;
  text-align: left;
}

.field-label {
  display: grid;
  gap: 8px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 800;
}

.password-field {
  min-height: 56px;
  display: grid;
  grid-template-columns: 30px 1fr 34px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
}

.password-field svg {
  width: 21px;
  height: 21px;
  stroke: var(--color-text-muted);
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-field input {
  border: 0;
  outline: 0;
  min-width: 0;
  color: var(--color-text);
  background: transparent;
  font-weight: 650;
  user-select: text;
  -webkit-user-select: text;
}

.toggle-password {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: transparent;
}

.strength-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 700;
}

.strength-word {
  color: var(--color-danger);
  font-weight: 850;
}

.strength-word.strong {
  color: #16a34a;
}

.strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.strength-bars span {
  height: 6px;
  border-radius: 999px;
  background: #e8e8f1;
}

.strength-bars span.active {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.strength-bars.strong span.active {
  background: #22c55e;
}

.requirements {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin: 16px 0 4px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
}

.requirements p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.requirements i,
.terms-check i {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  flex: 0 0 auto;
}

.requirements p.met i,
.terms-check input:checked + i {
  border-color: var(--color-primary);
  background: var(--color-primary);
  box-shadow: inset 0 0 0 4px #fff;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 4px;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
}

.terms-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.terms-check a {
  color: var(--color-primary);
  font-weight: 850;
}

.password-card .primary-btn {
  width: 100%;
  margin-top: 4px;
}

.back-login {
  margin: 16px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  background: transparent;
  font-weight: 850;
}

.form-error {
  min-height: 20px;
  color: var(--color-danger);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

@media (max-width: 1100px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 720px;
  }

  .login-hero-panel {
    display: none;
  }

  .login-card {
    border-left: 0;
  }

  .verify-stage {
    grid-template-columns: 1fr;
  }

  .verify-info {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at -10% 10%, rgba(124, 58, 237, 0.11), transparent 30%),
      radial-gradient(circle at 112% 94%, rgba(124, 58, 237, 0.09), transparent 28%),
      linear-gradient(180deg, #ffffff 0%, #fffefe 62%, var(--color-bg) 100%);
  }

  .auth-topbar,
  .auth-minimal-head,
  .auth-footer,
  .auth-secure-strip {
    display: none;
  }

  .auth-shell,
  .auth-simple-shell,
  .password-shell {
    width: 100%;
    margin: 0;
  }

  .login-shell {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at -18% 14%, rgba(124, 58, 237, 0.12), transparent 24%),
      radial-gradient(circle at 108% 90%, rgba(124, 58, 237, 0.12), transparent 28%),
      #fff;
    border-radius: 0;
    box-shadow: none;
  }

  .mobile-login-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 150px;
    padding: 28px 26px 8px;
  }

  .mobile-login-head .auth-logo {
    width: min(58vw, 260px);
    height: 64px;
  }

  .mobile-login-head .auth-avatar {
    width: 92px;
    height: 92px;
    border-width: 5px;
  }

  .login-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px 14px 0;
    background: transparent;
    box-shadow: none;
    border: 0;
    display: block;
  }

  .auth-tabs {
    display: none;
  }

  .auth-intro {
    margin: 46px 0 42px;
  }

  .auth-intro h2 {
    font-size: clamp(36px, 9vw, 48px);
  }

  .auth-intro p {
    max-width: 480px;
    font-size: 21px;
    line-height: 1.45;
  }

  .auth-provider {
    min-height: 104px;
    grid-template-columns: 64px minmax(0, 1fr);
    border-radius: 20px;
    padding: 0 24px;
    font-size: clamp(18px, 5vw, 22px);
    box-shadow: var(--shadow-soft);
  }

  .provider-icon {
    width: 48px;
    height: 48px;
  }

  .provider-icon svg {
    width: 43px;
    height: 43px;
  }

  .auth-provider.primary {
    min-height: 106px;
  }

  .phone-auth-panel {
    margin-top: 24px;
    padding: 18px;
    border-radius: 22px;
  }

  .internal-test-panel {
    margin-top: 24px;
    padding: 18px;
    border-radius: 22px;
  }

  .phone-mode-tabs button {
    min-height: 46px;
    font-size: 16px;
  }

  .phone-panel-copy strong {
    font-size: 20px;
  }

  .phone-panel-copy p {
    font-size: 15px;
  }

  .phone-auth-panel .field-label {
    font-size: 15px;
  }

  .phone-auth-panel .password-field {
    min-height: 58px;
  }

  .auth-divider {
    margin: 48px 0 42px;
    font-size: 22px;
  }

  .guest-card {
    min-height: 110px;
    grid-template-columns: 62px minmax(0, 1fr) 24px;
    padding: 22px 26px;
    border-radius: 20px;
  }

  .guest-icon {
    width: 60px;
    height: 60px;
  }

  .guest-card h3 {
    font-size: 23px;
  }

  .guest-card p {
    font-size: 16px;
  }

  .auth-legal {
    margin-top: 52px;
    font-size: 17px;
  }

  .auth-switch {
    margin-top: 46px;
    padding-top: 36px;
    font-size: 19px;
  }

  .mobile-auth-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: max(22px, env(safe-area-inset-top)) 20px 12px;
  }

  .mobile-auth-head.centered {
    justify-content: center;
    position: relative;
  }

  .mobile-auth-head .sub-back {
    position: absolute;
    left: 20px;
  }

  .sub-back {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    color: var(--color-text);
  }

  .sub-back svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-title {
    margin: 0;
    font-size: 21px;
    font-weight: 850;
  }

  .verify-stage,
  .password-card {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: calc(100vh - 88px);
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .verify-form {
    padding: 28px 20px max(28px, env(safe-area-inset-bottom));
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .progress-line {
    display: none;
  }

  .mobile-stepper {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 8px;
    margin: 22px 0 50px;
    color: var(--color-text-muted);
    font-size: 15px;
    font-weight: 700;
  }

  .mobile-step {
    display: grid;
    justify-items: center;
    gap: 10px;
    white-space: nowrap;
    min-width: 0;
  }

  .mobile-step .step-dot {
    width: 68px;
    height: 68px;
  }

  .mobile-step.active,
  .mobile-step.done {
    color: var(--color-primary);
  }

  .mobile-step.disabled .step-dot {
    color: #a2a8b8;
    background: #fff;
    border: 2px solid var(--color-border);
  }

  .mobile-step-line {
    display: none;
  }

  .mobile-only {
    display: block !important;
  }

  .verify-form .mobile-only.chat-graphic {
    width: 230px;
    height: 170px;
    margin: 0 auto 22px;
    position: relative;
  }

  .chat-illustration {
    width: 170px;
    height: 108px;
    margin: 24px auto 0;
    border: 0;
    border-radius: 30px;
    background: linear-gradient(135deg, #8b5cf6, #ffffff);
    box-shadow: 0 20px 42px rgba(124, 58, 237, 0.16);
  }

  .chat-illustration::before {
    content: "";
    position: absolute;
    width: 88px;
    height: 62px;
    right: -46px;
    bottom: 2px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
  }

  .chat-illustration::after {
    content: "";
    position: absolute;
    left: 42px;
    top: 44px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 34px 0 0 #fff, 68px 0 0 #fff;
  }

  .verify-form h2 {
    font-size: clamp(38px, 9vw, 52px);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  .verify-form > p {
    font-size: 20px;
    max-width: 520px;
  }

  .verify-number {
    color: var(--color-primary);
    font-size: 22px;
  }

  .otp-row {
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    width: min(100%, 580px);
    max-width: 100%;
    margin-top: 48px;
  }

  .otp-input {
    height: clamp(62px, 12vw, 96px);
    border-radius: 17px;
    font-size: clamp(25px, 6vw, 34px);
  }

  .phone-edit-row {
    width: min(100%, 560px);
    max-width: 100%;
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #fff;
    color: var(--color-text);
    font-size: 18px;
    font-weight: 700;
  }

  .phone-edit-row span:first-child {
    padding-right: 14px;
    border-right: 1px solid var(--color-border);
  }

  .phone-edit-row button {
    color: var(--color-primary);
    background: transparent;
    font-weight: 850;
  }

  .resend-copy {
    margin-top: 34px;
    text-align: left;
    width: min(100%, 560px);
    font-size: 18px;
  }

  .security-note {
    width: min(100%, 560px);
    margin-top: 34px;
    font-size: 16px;
  }

  .verify-form .primary-btn {
    width: min(100%, 560px);
    min-height: 72px;
    margin: 34px auto 0;
    border-radius: 18px;
    font-size: 22px;
  }

  .desktop-only {
    display: none !important;
  }

  .password-page .mobile-auth-head {
    min-height: 104px;
  }

  .password-page .auth-logo {
    width: min(64vw, 300px);
    margin: 18px auto 52px;
    height: 70px;
    object-fit: contain;
  }

  .password-card {
    padding: 0 20px max(28px, env(safe-area-inset-bottom));
    text-align: center;
  }

  .password-card .password-art,
  .password-card > .password-art + h1 + p,
  .password-card > .verified-row.desktop-success {
    display: none;
  }

  .password-card h1 {
    font-size: clamp(38px, 9vw, 54px);
  }

  .password-card > p {
    font-size: 20px;
    max-width: 540px;
  }

  .password-card .form-stack {
    width: min(100%, 590px);
    max-width: 100%;
    margin: 44px auto 0;
    gap: 22px;
  }

  .field-label {
    font-size: 16px;
  }

  .password-field {
    width: 100%;
    min-width: 0;
    min-height: 78px;
    border-radius: 17px;
    padding: 0 18px;
    grid-template-columns: 34px 1fr 42px;
  }

  .password-field input {
    font-size: 18px;
  }

  .strength-head {
    font-size: 18px;
  }

  .strength-bars span {
    height: 7px;
  }

  .requirements {
    grid-template-columns: 1fr;
    gap: 17px;
    padding: 22px;
    border-radius: 18px;
    background: var(--color-primary-soft);
    font-size: 17px;
  }

  .mobile-verified-row {
    margin: 12px 0 6px;
  }

  .terms-check {
    min-width: 0;
    margin: 14px 0;
    font-size: 16px;
  }

  .password-card .primary-btn {
    min-height: 76px;
    border-radius: 20px;
    font-size: 22px;
  }

  .password-card .secondary-btn {
    min-height: 62px;
    border-radius: 16px;
    color: var(--color-primary);
    font-weight: 850;
  }

  .password-card .back-login {
    display: none;
  }
}

@media (max-width: 470px) {
  .login-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .mobile-login-head {
    min-height: 118px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .mobile-login-head .auth-logo {
    width: 190px;
  }

  .mobile-login-head .auth-avatar {
    width: 72px;
    height: 72px;
  }

  .auth-intro {
    margin: 32px 0 30px;
  }

  .auth-intro h2 {
    font-size: 36px;
  }

  .auth-intro p {
    font-size: 17px;
  }

  .auth-provider {
    min-height: 74px;
    grid-template-columns: 58px 1fr;
    padding: 0 22px;
    font-size: 18px;
  }

  .provider-icon svg {
    width: 32px;
    height: 32px;
  }

  .auth-provider.primary {
    min-height: 78px;
  }

  .guest-card {
    min-height: 92px;
    grid-template-columns: 58px 1fr 22px;
    padding: 18px;
  }

  .guest-icon {
    width: 52px;
    height: 52px;
  }

  .guest-card h3 {
    font-size: 19px;
  }

  .guest-card p {
    font-size: 14px;
  }

  .auth-legal,
  .auth-switch {
    font-size: 15px;
  }

  .verify-form {
    padding-left: 16px;
    padding-right: 16px;
  }

  .mobile-stepper {
    grid-template-columns: 1fr 28px 1fr 28px 1fr;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 36px;
  }

  .mobile-step .step-dot {
    width: 54px;
    height: 54px;
  }

  .verify-form .mobile-only.chat-graphic {
    width: 180px;
    height: 130px;
  }

  .chat-illustration {
    width: 136px;
    height: 88px;
  }

  .verify-form h2 {
    font-size: 36px;
  }

  .verify-form > p {
    font-size: 17px;
  }

  .otp-row {
    gap: 8px;
  }

  .otp-input {
    min-width: 0;
    height: 58px;
    font-size: 24px;
  }

  .phone-edit-row,
  .resend-copy,
  .security-note {
    font-size: 14px;
  }

  .verify-form .primary-btn,
  .password-card .primary-btn {
    min-height: 62px;
    font-size: 18px;
  }

  .password-page .auth-logo {
    width: 222px;
    margin-bottom: 34px;
  }

  .password-card h1 {
    font-size: 36px;
  }

  .password-card > p {
    font-size: 17px;
  }

  .password-card .form-stack {
    margin-top: 32px;
  }

  .password-field {
    min-height: 62px;
  }

  .requirements,
  .terms-check {
    font-size: 14px;
  }
}

/* Latest mobile auth polish */
.mobile-login-back {
  display: none;
}

@media (max-width: 760px) {
  .login-shell {
    margin-top: 0;
    min-height: 100dvh;
    padding: max(8px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  }

  .mobile-login-head {
    justify-content: flex-start;
    min-height: 58px;
    gap: 12px;
    padding: 4px 0 8px;
  }

  .mobile-login-head .auth-logo {
    width: min(42vw, 168px);
    height: 46px;
    object-fit: contain;
  }

  .mobile-login-back {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: rgba(255, 255, 255, .94);
    color: var(--color-text);
    box-shadow: var(--shadow-soft);
    flex: 0 0 auto;
  }

  .mobile-login-back svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .login-card {
    padding: 0 4px;
  }

  .auth-intro {
    margin: 18px 0 26px;
  }

  .auth-provider {
    min-height: 72px;
  }

  .auth-divider {
    margin: 34px 0 26px;
  }

  .verify-form {
    padding-top: 8px;
  }

  .mobile-stepper {
    position: relative;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0;
    width: min(100%, 420px);
    margin: 8px auto 34px;
    font-size: 13px;
    text-align: center;
  }

  .mobile-stepper::before,
  .mobile-stepper::after {
    content: "";
    position: absolute;
    top: 22px;
    height: 3px;
    border-radius: 999px;
    pointer-events: none;
  }

  .mobile-stepper::before {
    left: 16%;
    right: 16%;
    background: #e9ecf5;
  }

  .mobile-stepper::after {
    left: 16%;
    width: 34%;
    background: linear-gradient(90deg, #8b5cf6, #6d28d9);
  }

  .mobile-step {
    position: relative;
    z-index: 1;
    gap: 8px;
  }

  .mobile-step .step-dot {
    width: 46px;
    height: 46px;
    margin: 0 auto;
    color: #9aa1b4;
    background: #fff;
    border: 2px solid #e3e7f2;
    box-shadow: 0 10px 20px rgba(31, 38, 82, .07);
  }

  .mobile-step.done .step-dot,
  .mobile-step.active .step-dot {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 14px 26px rgba(124, 58, 237, .22);
  }

  .mobile-step .step-dot svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-step-line {
    display: none !important;
  }

  .verify-form .mobile-only.chat-graphic {
    width: 184px;
    height: 126px;
    margin: 0 auto 18px;
  }

  .verify-form h2 {
    font-size: clamp(31px, 8vw, 42px);
    line-height: 1.08;
  }

  .verify-form > p {
    font-size: 17px;
  }

  .otp-row {
    margin-top: 28px;
  }

  .phone-edit-row,
  .resend-copy,
  .security-note {
    margin-top: 22px;
  }

  .password-page .mobile-auth-head {
    min-height: 62px;
    padding-top: max(8px, env(safe-area-inset-top));
  }

  .password-page .auth-logo {
    width: min(42vw, 172px);
    height: 48px;
    margin: 0 auto 18px;
  }

  .password-card .form-stack {
    margin-top: 26px;
    gap: 18px;
  }

  .password-card .secondary-btn {
    width: auto;
    min-width: 170px;
    max-width: 260px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    margin: 0 auto;
    padding: 0 28px;
    border-radius: 999px;
    background: #fff;
    box-shadow: none;
  }
}

@media (max-width: 470px) {
  .login-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .mobile-login-head {
    min-height: 52px;
    padding-left: 0;
    padding-right: 0;
  }

  .mobile-login-head .auth-logo {
    width: 150px;
  }

  .mobile-login-back {
    width: 42px;
    height: 42px;
  }

  .auth-intro {
    margin: 12px 0 22px;
  }

  .auth-provider {
    min-height: 66px;
  }

  .auth-divider {
    margin: 28px 0 22px;
  }

  .mobile-stepper {
    margin-bottom: 28px;
  }

  .verify-form .mobile-only.chat-graphic {
    width: 158px;
    height: 110px;
  }

  .password-card .secondary-btn {
    min-height: 48px;
  }
}
.sandbox-otp-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin: 14px 0 2px;
  padding: 13px 14px;
  border: 1px solid rgba(14, 165, 233, .28);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, .1), rgba(124, 58, 237, .08));
  color: #172554;
}
.sandbox-otp-note[hidden] { display: none !important; }
.sandbox-otp-note > span { display: grid; gap: 3px; text-align: left; }
.sandbox-otp-note small { color: #64748b; font-size: 11px; font-weight: 700; }
.sandbox-otp-note button {
  display: grid;
  gap: 1px;
  min-width: 112px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  cursor: pointer;
}
.sandbox-otp-note b { font-size: 18px; letter-spacing: .16em; }
.sandbox-otp-note em { color: #7dd3fc; font-size: 10px; font-style: normal; font-weight: 800; text-transform: uppercase; }

/* UX Phase 6: focused, recoverable account onboarding */
.auth-return-cue {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 16px auto 0;
  padding: 10px 14px;
  border: 1px solid rgba(124, 58, 237, .18);
  border-radius: 16px;
  background: rgba(245, 243, 255, .82);
  color: #312e81;
  text-align: left;
}

.auth-return-cue[hidden] {
  display: none !important;
}

.auth-return-cue > span:last-child,
.phone-stage-row > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.auth-return-cue small,
.phone-stage-row small {
  color: #7c3aed;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .13em;
}

.auth-return-cue strong,
.phone-stage-row strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 900;
}

.auth-return-icon,
.phone-stage-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 9px 18px rgba(109, 40, 217, .18);
}

.auth-return-icon svg,
.phone-stage-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone-stage-row {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
}

.phone-stage-row strong {
  color: var(--color-text);
  font-size: 14px;
}

.verify-form .progress-line {
  grid-template-columns: max-content 1fr max-content 1fr max-content;
  gap: 12px;
}

.step-line.pending {
  background: #e5e7eb;
}

.step-item.disabled .step-dot {
  color: #9ca3af;
  background: #eef0f5;
}

.step-item.disabled strong {
  color: #9ca3af;
}

.password-stage-row {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 auto 22px;
  padding: 8px 12px;
  border: 1px solid rgba(124, 58, 237, .16);
  border-radius: 999px;
  background: rgba(245, 243, 255, .84);
}

.password-stage-row span {
  color: #7c3aed;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .11em;
}

.password-stage-row strong {
  color: var(--color-text);
  font-size: 12px;
  font-weight: 850;
}

.phone-auth-panel {
  animation: auth-panel-enter 240ms cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes auth-panel-enter {
  from { opacity: 0; transform: translateY(8px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.phone-auth-open .login-actions {
  display: none;
}

.phone-auth-open .login-card {
  justify-content: flex-start;
  padding-top: 34px;
}

.phone-auth-open .auth-intro {
  margin-bottom: 14px;
}

.phone-auth-open .auth-intro h2 {
  font-size: clamp(28px, 2.5vw, 36px);
  margin-bottom: 9px;
}

.phone-auth-open .auth-intro p {
  font-size: 15px;
}

.phone-auth-open .phone-auth-panel {
  margin-top: 0;
}

.phone-auth-open .rodeo-version-wrap {
  display: none !important;
}

.verify-page .rodeo-version-wrap,
.password-page .rodeo-version-wrap {
  display: none !important;
}

[data-busy-scope].is-busy,
.verify-form.is-busy,
.internal-test-panel.is-busy {
  cursor: progress;
}

[data-busy-scope].is-busy input,
.verify-form.is-busy input,
.internal-test-panel.is-busy input {
  opacity: .72;
}

.password-field:has(input[aria-invalid="true"]),
.otp-input[aria-invalid="true"] {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

.form-error {
  margin: 0;
  transition: color 160ms ease, background-color 160ms ease, padding 160ms ease;
}

.form-error:empty:not(.has-message) {
  min-height: 0;
}

.form-error.has-message {
  min-height: 0;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(254, 226, 226, .76);
  line-height: 1.35;
}

@media (max-width: 760px) {
  .phone-auth-open .login-shell {
    min-height: 100dvh;
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .phone-auth-open .mobile-login-head {
    min-height: 50px;
  }

  .phone-auth-open .login-card {
    padding-top: 0;
  }

  .phone-auth-open .auth-intro {
    margin: 6px 0 14px;
    text-align: left;
  }

  .phone-auth-open .auth-intro h2 {
    margin-bottom: 6px;
    font-size: clamp(27px, 7vw, 34px);
  }

  .phone-auth-open .auth-intro p {
    font-size: 14px;
    line-height: 1.4;
  }

  .phone-auth-open .auth-return-cue {
    margin: 11px 0 0;
    padding: 8px 11px;
  }

  .phone-auth-open .phone-auth-panel {
    gap: 12px;
    padding: 15px;
    border-radius: 20px;
  }

  .phone-auth-open .auth-divider {
    margin: 22px 0 18px;
    font-size: 14px;
  }

  .phone-auth-open .guest-card {
    min-height: 78px;
    grid-template-columns: 46px minmax(0, 1fr) 20px;
    padding: 13px 16px;
  }

  .phone-auth-open .guest-icon {
    width: 44px;
    height: 44px;
  }

  .phone-auth-open .guest-card h3 {
    font-size: 17px;
  }

  .phone-auth-open .guest-card p {
    font-size: 12px;
  }

  .phone-auth-open .auth-legal {
    margin-top: 22px;
    font-size: 12px;
  }

  .phone-auth-open .auth-switch {
    margin-top: 18px;
    padding-top: 16px;
    font-size: 13px;
  }

  .verify-form,
  .password-card {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-auth-panel {
    animation: none;
  }
}
