/* landing-critical:start */
:root {
  --bg:           #f6f8fc;
  --surface:      #ffffff;
  --surface-soft: #f0f4fb;
  --ink:          #0a1f44;
  --ink-mid:      #2c3e60;
  --ink-soft:     #5a6b85;
  --line:         #e2e8f3;
  --line-soft:    #eef2fa;
  --accent:       #1e6cf7;
  --accent-deep:  #1554d4;
  --accent-soft:  #e9f0ff;
  --online:       #22c55e;
  --offline:      #c9d1e0;
  --danger:       #ef4444;

  --shadow-card: 0 1px 2px rgba(10, 31, 68, .04), 0 8px 24px rgba(10, 31, 68, .06);
  --shadow-soft: 0 1px 1px rgba(10, 31, 68, .04), 0 2px 6px rgba(10, 31, 68, .04);
  --shadow-lift: 0 10px 30px rgba(10, 31, 68, .12);

  --radius-card:  14px;
  --radius-input: 10px;
  --radius-pill:  999px;

  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 12% -10%, rgba(30, 108, 247, .14), transparent 60%),
    radial-gradient(ellipse 70% 60% at 110% 10%, rgba(120, 95, 255, .12), transparent 55%),
    radial-gradient(ellipse 70% 60% at 50% 110%, rgba(34, 197, 94, .07), transparent 60%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 28px 20px 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 720px;
  padding: 4px 4px 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.topbar-icon {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  color: var(--ink);
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  padding: 0;
  margin: 0;
  cursor: pointer;
  pointer-events: auto;
  font-family: inherit;
  box-shadow: var(--shadow-soft);
  transition: background .15s, border-color .15s, transform .15s;
}
.topbar-icon:hover { background: var(--surface); border-color: #c9d4ea; }
.topbar-icon:active { transform: translateY(1px); }
.topbar-icon:focus-visible {
  outline: none;
  box-shadow: var(--shadow-soft), 0 0 0 4px rgba(30, 108, 247, .15);
}
.topbar-icon svg { display: block; }
.topbar-burger { background: var(--surface); }

.stage {
  width: 100%;
  max-width: 560px;
  padding: 24px 8px 0;
}

.progress-bar {
  height: 3px;
  background: var(--line-soft);
  border-radius: 999px;
  margin: 0 0 28px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #7858ff);
  border-radius: 999px;
  transition: width .45s cubic-bezier(.2,.9,.3,1);
}

.screen { display: none; }
.screen.active {
  display: block;
  animation: stage-in .45s cubic-bezier(.2,.9,.3,1) both;
}

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

.screen.active > * {
  animation: child-in .55s cubic-bezier(.2,.9,.3,1) both;
}
.screen.active > *:nth-child(1) { animation-delay: .02s; }
.screen.active > *:nth-child(2) { animation-delay: .08s; }
.screen.active > *:nth-child(3) { animation-delay: .14s; }
.screen.active > *:nth-child(4) { animation-delay: .20s; }
.screen.active > *:nth-child(5) { animation-delay: .26s; }
.screen.active > *:nth-child(6) { animation-delay: .32s; }
.screen.active > *:nth-child(7) { animation-delay: .38s; }
.screen.active > *:nth-child(8) { animation-delay: .44s; }

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

@-webkit-keyframes jello-horizontal {
  0% { -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); }
  30% { -webkit-transform: scale3d(1.25, .75, 1); transform: scale3d(1.25, .75, 1); }
  40% { -webkit-transform: scale3d(.75, 1.25, 1); transform: scale3d(.75, 1.25, 1); }
  50% { -webkit-transform: scale3d(1.15, .85, 1); transform: scale3d(1.15, .85, 1); }
  65% { -webkit-transform: scale3d(.95, 1.05, 1); transform: scale3d(.95, 1.05, 1); }
  75% { -webkit-transform: scale3d(1.05, .95, 1); transform: scale3d(1.05, .95, 1); }
  100% { -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); }
}
@keyframes jello-horizontal {
  0% { -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); }
  30% { -webkit-transform: scale3d(1.25, .75, 1); transform: scale3d(1.25, .75, 1); }
  40% { -webkit-transform: scale3d(.75, 1.25, 1); transform: scale3d(.75, 1.25, 1); }
  50% { -webkit-transform: scale3d(1.15, .85, 1); transform: scale3d(1.15, .85, 1); }
  65% { -webkit-transform: scale3d(.95, 1.05, 1); transform: scale3d(.95, 1.05, 1); }
  75% { -webkit-transform: scale3d(1.05, .95, 1); transform: scale3d(1.05, .95, 1); }
  100% { -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); }
}

.attention-jello {
  transform-origin: center;
  will-change: transform;
}
.screen.active .attention-jello,
.topbar-icon.attention-jello {
  -webkit-animation: jello-horizontal .9s both;
  animation: jello-horizontal .9s both;
}

h1, h2 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.hero-title {
  font-size: clamp(28px, 4.4vw, 38px);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 12px;
  text-wrap: balance;
}

.hero-sub {
  font-size: 16px;
  color: var(--ink-soft);
  margin-bottom: 24px;
  text-wrap: balance;
}

.hero-from-city {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: -6px 0 12px;
  text-wrap: balance;
}
.hero-from-city:empty { display: none; }

/* Inviter banner — shown on screenLanding when utm_source is present */
.inviter-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}
.inviter-banner[hidden] { display: none; }
.inviter-banner img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.inviter-banner .inviter-avatar-fallback {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.inviter-banner .inviter-text {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.3;
}
.inviter-banner .inviter-text strong {
  color: var(--ink);
  font-weight: 700;
}

@keyframes skeleton-shimmer {
  from { background-position: 0 0; }
  to   { background-position: -200% 0; }
}

body.is-loading .skeleton-text:empty {
  display: block;
  height: 1em;
  width: 60%;
  margin: 8px auto;
  border-radius: 8px;
  background: linear-gradient(90deg, #e5e7eb 0%, #f0f3f8 50%, #e5e7eb 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s linear infinite;
}
body.is-loading .skeleton-text:empty.skeleton-hero   { height: 1.5em; width: 80%; margin: 12px auto; }
body.is-loading .skeleton-text:empty.skeleton-narrow { width: 40%; height: .9em; }

body.is-loading #landingBtn {
  visibility: hidden;
  animation: reveal-loading-cta 0s linear 4s forwards;
}

@keyframes reveal-loading-cta {
  to { visibility: visible; }
}

h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.caption {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 16px;
}
.caption-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.caption-stack span { display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-input);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
  margin-bottom: 4px;
  box-shadow: var(--shadow-soft);
}
input::placeholder { color: var(--ink-soft); opacity: .75; }
input:hover { border-color: #c9d4ea; }
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(30, 108, 247, .15);
}
input.error,
input:focus.error { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(239, 68, 68, .15); }

input + input { margin-top: 10px; }

.identifier-field {
  width: 100%;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-input);
  box-shadow: var(--shadow-soft);
  margin-bottom: 4px;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.identifier-field:hover { border-color: #c9d4ea; }
.identifier-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(30, 108, 247, .15);
}
.identifier-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 68px;
  padding: 0 16px 0 12px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  background: var(--surface-soft);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background .12s;
}
.identifier-prefix:hover, .identifier-prefix:focus { background: #eef3fb; outline: none; }
.identifier-prefix .caret { font-size: 12px; font-weight: 700; opacity: .75; margin-left: 4px; }
.identifier-field[data-mode="email"] .identifier-prefix { display: none; }

/* Country picker modal (mobile-first) */
.country-picker { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.country-picker[hidden] { display: none; }
.country-picker-backdrop { position: absolute; inset: 0; background: rgba(15, 22, 40, .55); }
.country-picker-panel {
  position: relative; width: 100%; max-width: 480px; max-height: 80vh;
  background: var(--surface); border-radius: 16px;
  box-shadow: 0 8px 32px rgba(15, 22, 40, .25); display: flex; flex-direction: column;
}
.country-picker-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; border-bottom: 1px solid var(--line-soft); }
.country-picker-head input {
  flex: 1; border: 1px solid var(--line); border-radius: var(--radius-input);
  padding: 10px 12px; font-size: 15px; background: var(--surface-soft); margin: 0;
}
.country-picker-close { background: transparent; border: 0; font-size: 26px; color: var(--ink); padding: 0 6px; cursor: pointer; line-height: 1; }
.country-picker-list { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; }
.country-picker-item { display: flex; align-items: center; gap: 10px; padding: 12px 20px 12px 16px; cursor: pointer; }
.country-picker-item:hover, .country-picker-item[aria-selected="true"] { background: var(--surface-soft); }
.country-picker-item .flag { font-size: 20px; }
.country-picker-item .name { flex: 1; font-size: 15px; color: var(--ink); }
.country-picker-item .dial { color: var(--mute); font-weight: 600; font-variant-numeric: tabular-nums; }
.typo-suggestion { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.typo-suggestion[hidden] { display: none; }
.typo-suggestion-backdrop { position: absolute; inset: 0; background: rgba(15, 22, 40, .55); }
.typo-suggestion-panel { position: relative; background: var(--surface); color: var(--ink); border-radius: 12px; padding: 20px; max-width: 460px; width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,.2); }
.typo-suggestion-question { margin: 0 0 16px; font-size: 16px; line-height: 1.4; word-break: break-word; overflow-wrap: anywhere; }
.typo-suggestion-question strong { word-break: break-all; }
.typo-suggestion-panel button { display: block; width: 100%; margin-top: 8px; padding: 10px; font-size: 15px; border-radius: 8px; cursor: pointer; }
.login-password-decision { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-password-decision[hidden] { display: none; }
.login-password-decision-backdrop { position: absolute; inset: 0; background: rgba(15, 22, 40, .55); }
.login-password-decision-panel { position: relative; background: var(--surface); color: var(--ink); border-radius: 12px; padding: 20px; max-width: 460px; width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,.2); text-align: center; }
.login-password-decision-panel h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; }
.login-password-decision-panel p { margin: 0 0 16px; color: var(--mute); line-height: 1.4; }
.login-password-decision-panel button { display: block; width: 100%; margin-top: 8px; padding: 10px; font-size: 15px; border-radius: 8px; cursor: pointer; }
.identifier-field input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  background: transparent;
  min-width: 0;
}
.identifier-field input:hover,
.identifier-field input:focus {
  border-color: transparent;
  box-shadow: none;
}
.identifier-mode-switch {
  border: 0;
  background: transparent;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.35;
}

.password-field {
  position: relative;
}
.password-field input {
  padding-right: 48px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 8px;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  transition: background .15s, color .15s;
}
.password-toggle:hover { background: var(--surface-soft); color: var(--ink); }
.password-toggle .eye-off { display: none; }
.password-toggle.is-showing .eye-on  { display: none; }
.password-toggle.is-showing .eye-off { display: block; }

button.primary,
button.secondary,
button.ghost {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .005em;
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  cursor: pointer;
  margin-top: 14px;
  transition: transform .15s, background .18s, border-color .18s, box-shadow .18s, color .18s;
}

button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 1px rgba(30,108,247,.3), 0 6px 18px rgba(30,108,247,.28);
}
button.primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
button.primary:active { transform: translateY(0); }
button.primary:disabled { background: #b6c8ee; box-shadow: none; cursor: not-allowed; transform: none; }

button.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}
button.secondary:hover { background: var(--surface-soft); border-color: #c9d4ea; }

button.ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
button.ghost:hover { background: var(--surface); color: var(--ink); }

.error-msg {
  font-size: 13px;
  color: var(--danger);
  min-height: 18px;
  margin: 6px 0 2px;
  text-align: left;
}

.link-muted {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: none;
  transition: color .15s;
}
.link-muted:hover { color: var(--accent); }
.link-muted.is-hidden { display: none; }

.teaser {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 6px 6px 0;
  overflow: hidden;
  margin-bottom: 22px;
}

.teaser-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 348px;
  overflow: hidden;
  position: relative;
}

.teaser-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface);
  transition: transform .55s cubic-bezier(.2,.9,.3,1), opacity .35s;
  will-change: transform, opacity;
}
.teaser-row:not(:last-child) { border-bottom: 1px solid var(--line-soft); border-radius: 10px 10px 0 0; }

.teaser-row.is-stalker {
  background: linear-gradient(180deg, rgba(239, 68, 68, .07), rgba(239, 68, 68, .03));
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .42);
  border-bottom-color: rgba(239, 68, 68, .22);
}
.teaser-row.is-entering {
  animation: teaser-enter .55s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes teaser-enter {
  from { opacity: 0; transform: translateY(-14px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.teaser-row.is-leaving {
  animation: teaser-leave .35s ease forwards;
}
@keyframes teaser-leave {
  to { opacity: 0; transform: translateY(8px); }
}

.teaser-avatar {
  position: relative;
  width: 42px; height: 42px;
  flex-shrink: 0;
}
.teaser-avatar-photo {
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-soft);
}
.teaser-avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(4.05px) saturate(.85);
  transform: scale(1.15);
}
.teaser-avatar-photo img.v {
  filter: none;
  transform: none;
}

.teaser-status-dot {
  position: absolute;
  right: 0; bottom: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2.5px solid var(--surface);
  background: var(--offline);
}
.teaser-status-dot.online {
  background: var(--online);
  animation: dot-pulse 2s ease-out infinite;
}
@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.teaser-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.teaser-name-bar {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #d8e0ee 0%, #e9eef8 60%, #d8e0ee 100%);
  background-size: 200% 100%;
  filter: blur(2.4px);
  animation: name-shimmer 6s linear infinite;
}
.teaser-name-bar.on {
  height: auto;
  background: none;
  filter: none;
  animation: none;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.teaser-name-bar.w-50 { width: 38%; }
.teaser-name-bar.w-65 { width: 48%; }
.teaser-name-bar.w-80 { width: 58%; }
.teaser-name-bar.w-40 { width: 30%; }

@keyframes name-shimmer {
  from { background-position: 0 0; }
  to   { background-position: -200% 0; }
}

.teaser-time {
  font-size: 12.5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.teaser-stalker {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #b91c1c;
  letter-spacing: -0.005em;
  line-height: 1.35;
}

.teaser-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 64px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--surface) 80%);
  pointer-events: none;
}

.teaser-lock {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(246, 248, 252, .5), var(--surface-soft));
}
.teaser-lock svg { color: var(--accent); }

.account-search-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--line-soft);
}
.account-search-photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-soft);
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}
.account-search-fb-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #1877F2;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}
.account-search-label { display: block; margin: 0 0 8px; }
.account-search-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
}

/* Kept for preview/screen1.html mockup — production uses .familiar-faces */
.users-tracking-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 39px;
  font-size: 13px;
  color: var(--ink-soft);
}
.users-tracking-icon {
  width: 96px;
  height: 36px;
  flex-shrink: 0;
}
.users-tracking-text { line-height: 1.3; }

.familiar-faces {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
  padding: 16px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
}
.familiar-faces[hidden] { display: none; }
/* Reveal transition when the pool finishes resolving. Container fades and
   lifts slightly; avatars pop in one by one via --stagger-i. */
@keyframes familiar-faces-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes familiar-faces-avatar-pop {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}
.familiar-faces.is-revealing {
  animation: familiar-faces-reveal 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.familiar-faces.is-revealing .familiar-faces-avatar,
.familiar-faces.is-revealing .familiar-faces-more {
  animation: familiar-faces-avatar-pop 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(120ms + var(--stagger-i, 0) * 55ms);
}
@media (prefers-reduced-motion: reduce) {
  .familiar-faces.is-revealing,
  .familiar-faces.is-revealing .familiar-faces-avatar,
  .familiar-faces.is-revealing .familiar-faces-more {
    animation: none;
  }
}

.familiar-faces-avatars {
  display: flex;
  align-items: center;
  min-height: 64px;
}
/* Landing teaser rows paint with the tentative pool blurred while
   /api/teaser-profiles is still resolving, so real faces don't pop in
   mid-view. Familiar-faces stays hidden until pending flips to false, so
   it doesn't need the blur variant. */
.teaser-avatar-photo.is-loading-photo img {
  filter: blur(6px);
}
.familiar-faces-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  border: 3px solid var(--surface);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
  flex-shrink: 0;
}
.familiar-faces-avatar + .familiar-faces-avatar { margin-left: -14px; }
.familiar-faces-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.familiar-faces-more {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
  border: 3px solid var(--surface);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -14px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.familiar-faces-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.familiar-faces-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}
.familiar-faces-title strong { font-weight: 700; color: var(--ink); }
.familiar-faces-sub {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.35;
}
.familiar-faces-sub:empty,
.familiar-faces-sub[hidden] { display: none; }

/* Narrow phones (≤ ~390px): 7 avatars at 60px + badge overflow the row.
   Shrink circles so the whole stack + badge fits without clipping. */
@media (max-width: 399px) {
  .familiar-faces-avatar,
  .familiar-faces-more { width: 52px; height: 52px; }
  .familiar-faces-avatars { min-height: 56px; }
  .familiar-faces-more { font-size: 13px; }
}

/* landing-critical:end */
.method-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 6px 0 4px;
}

.method-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color .18s, background .18s, box-shadow .18s;
  user-select: none;
  box-shadow: var(--shadow-soft);
}
.method-option:hover { border-color: #c9d4ea; }
.method-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(30, 108, 247, .12);
}
.method-option .radio {
  width: 20px; height: 20px;
  border: 2px solid #b6c2d8;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s;
}
.method-option.selected .radio { border-color: var(--accent); }
.method-option.selected .radio::after {
  content: '';
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
}
.method-option .icon { font-size: 18px; }

.account-pic,
.account-pic-fallback {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.account-pic-fallback {
  background: var(--surface-soft);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.status-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 18px;
  box-shadow: var(--shadow-soft);
}
.status-icon[data-tone="lock"]   { background: var(--accent-soft); color: var(--accent); }
.status-icon[data-tone="search"] { background: var(--surface-soft); color: var(--ink-mid); }
.status-icon[data-tone="warn"]   { background: #fff1d6; color: #b76d00; }

.captcha-img {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 12px;
  background: var(--surface-soft);
}

.account-header {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 6px 12px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.account-header img,
.account-header-fallback {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.account-header-fallback {
  background: var(--surface-soft);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
.account-header-name { color: var(--ink); }

.success-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.success-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .18);
  flex-shrink: 0;
}

.visitor-feed {
  margin: 18px 0 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.visitor-feed::-webkit-scrollbar { width: 8px; }
.visitor-feed::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.visitor-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  transition: background .18s;
}
.visitor-row:last-child { border-bottom: none; }
.visitor-row:hover { background: var(--surface-soft); }

.visitor-avatar-wrap {
  position: relative;
  width: 48px; height: 48px;
  flex-shrink: 0;
}
.visitor-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-soft);
}
.visitor-status-dot {
  position: absolute;
  right: -1px; bottom: -1px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2.5px solid var(--surface);
  background: var(--offline);
}
.visitor-status-dot.online {
  background: var(--online);
  animation: dot-pulse 2s ease-out infinite;
}

.visitor-meta { min-width: 0; }
.visitor-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.visitor-sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 3px;
}
.visitor-sub .dot-sep { margin: 0 6px; opacity: .6; }

.visitor-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background .15s, transform .15s;
  white-space: nowrap;
  margin: 0;
}
.visitor-cta:hover { background: #d8e6ff; transform: translateY(-1px); }
.visitor-cta:active { transform: translateY(0); }

.back-bar {
  display: flex;
  align-items: center;
  margin: -8px -8px 14px;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  margin: 0;
  transition: background .15s, transform .15s;
}
.back-btn:hover { background: var(--surface-soft); transform: translateX(-2px); }
.back-btn svg { color: var(--accent); }

.visit-history-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.visit-history-head .visit-avatar-wrap {
  position: relative;
  width: 56px; height: 56px;
  flex-shrink: 0;
}
.visit-history-head .visit-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-soft);
}
.visit-history-head .visit-status-dot {
  position: absolute;
  right: -1px; bottom: -1px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2.5px solid var(--surface);
  background: var(--offline);
}
.visit-history-head .visit-status-dot.online {
  background: var(--online);
  animation: dot-pulse 2s ease-out infinite;
}
.visit-history-head .visit-account-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.visit-history-head .visit-account-summary {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.visit-history {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.visit-history::-webkit-scrollbar { width: 8px; }
.visit-history::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.visit-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.visit-row:last-child { border-bottom: none; }
.visit-row .visit-marker {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .65;
}
.visit-row .visit-date {
  color: var(--ink);
  font-weight: 500;
}
.visit-row .visit-time {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

button.share-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #7858ff 100%);
  border: none;
  box-shadow: 0 1px 1px rgba(30,108,247,.3), 0 8px 22px rgba(120, 88, 255, .35);
}
button.share-cta:hover {
  background: linear-gradient(135deg, var(--accent-deep) 0%, #6243e5 100%);
}
button.share-cta svg { flex-shrink: 0; }

.visitor-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .005em;
}
.visitor-feed-head .count-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 800;
}

/* ---------- Referral raffle (screen4) ---------- */

.raffle-block {
  margin-top: 22px;
  padding: 20px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.raffle-block[hidden] { display: none; }

.raffle-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.raffle-progress {
  height: 8px;
  margin: 16px 0 8px;
  background: var(--line-soft);
}
.raffle-progress .progress-fill {
  background: linear-gradient(90deg, var(--accent) 0%, #7858ff 100%);
}

.raffle-progress-label {
  margin: 0 0 14px;
  font-weight: 600;
  color: var(--ink-mid);
}

.raffle-invites {
  margin: 14px 0 16px;
  max-height: 260px;
}
.raffle-invites .visitor-feed-head { padding: 10px 14px; }

.raffle-invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
}
.raffle-invite-row:first-child { border-top: none; }
.raffle-invite-row .where { color: var(--ink); font-weight: 600; }
.raffle-invite-row .when {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.raffle-invite-empty {
  padding: 18px 14px;
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
}

.raffle-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.raffle-share-row > button { flex: 1 1 200px; }

.raffle-entry-form {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.raffle-entry-form[hidden] { display: none; }
.raffle-entry-form h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}
.raffle-entry-form .caption { margin: 0; }
.raffle-entry-form input { margin: 0; }

.raffle-entered-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(34, 197, 94, .10);
  border: 1px solid rgba(34, 197, 94, .35);
  border-radius: var(--radius-card);
  color: var(--ink);
  font-weight: 600;
}
.raffle-entered-msg[hidden] { display: none; }

/* landing-critical:start */
@media (max-width: 540px) {
  .page { padding: 20px 14px 36px; }
  .stage { padding-top: 12px; }
  .hero-title { font-size: 26px; }
  .account-search-head { gap: 14px; }
  .account-search-photo { width: 56px; height: 56px; }
  .account-search-title { font-size: 19px; }
  .visitor-row { grid-template-columns: 44px 1fr auto; padding: 12px 14px; gap: 12px; }
  .visitor-avatar-wrap, .visitor-avatar { width: 44px; height: 44px; }
  .raffle-block { padding: 16px; }
  .raffle-share-row > button { flex: 1 1 100%; }
}

/* ---------- Compact layout when an inviter banner is present ----------
 * ?utm_source=… surfaces an inviter banner above the headline. The default
 * landing sizing pushes the primary CTA below the fold on small viewports;
 * shrink the hero + cap the teaser height + tighten every vertical gap
 * so the CTA stays visible. The teaser also becomes a click target (wired
 * in src/client/app.js). */
body.has-inviter .page { padding-top: 12px; padding-bottom: 24px; }
body.has-inviter .stage { padding-top: 8px; }
body.has-inviter .topbar { padding-bottom: 6px; margin-bottom: 2px; }
body.has-inviter .progress-bar { margin-bottom: 12px; }
body.has-inviter .inviter-banner { margin-bottom: 10px; padding: 8px 12px; }
body.has-inviter .inviter-banner img,
body.has-inviter .inviter-banner .inviter-avatar-fallback { width: 44px; height: 44px; font-size: 18px; }
body.has-inviter .hero-title,
body.has-inviter .hero-from-city,
body.has-inviter .hero-sub { display: none; }
body.has-inviter .stalker-card { margin: 8px 0 8px; padding: 8px 14px; }
body.has-inviter .stalker-eyebrow { font-size: 12.5px; }
body.has-inviter .stalker-line { font-size: 11.5px; }
body.has-inviter .teaser { margin-bottom: 10px; cursor: pointer; }
body.has-inviter .teaser-list { max-height: 300px; }
body.has-inviter .trust-strip { margin: 8px 0 0; }
body.has-inviter button.primary { margin-top: 12px; padding: 12px 18px; }

.spinner {
  width: 56px;
  height: 56px;
  margin: 22px auto;
  border-radius: 50%;
  border: 5px solid rgba(0, 0, 0, .12);
  border-top-color: var(--brand, #1877f2);
  animation: spinner-rotate 0.85s linear infinite;
}
@keyframes spinner-rotate { to { transform: rotate(360deg); } }
#s3dWaiting { text-align: center; margin-left: auto; margin-right: auto; max-width: 320px; }

/* ---------- Landing: stalker card ----------
 * Subtle accent-tinted card, not an alarm. Eye glyph + bold eyebrow + soft
 * line + chevron — matches the existing accent-soft / accent palette so it
 * reads as a callout inside the same visual family as the teaser lock and
 * the primary CTA, not as a competing ad banner. The whole card is a button
 * (visitors who don't see the primary CTA still have an entry point). */
.stalker-card {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 16px 0 14px;
  padding: 12px 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(30, 108, 247, .18);
  border-radius: var(--radius-card);
  font-family: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform .15s, box-shadow .18s, background .18s;
}
.stalker-card[hidden] { display: none; }
.stalker-card:hover {
  transform: translateY(-1px);
  background: #dfe9ff;
  box-shadow: var(--shadow-soft);
}
.stalker-card:active { transform: translateY(0); }
.stalker-glyph {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(30, 108, 247, .25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.stalker-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.stalker-eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.3;
  word-break: break-word;
}
.stalker-line {
  font-size: 12px;
  color: var(--ink-mid);
  line-height: 1.35;
  word-break: break-word;
}
.stalker-line:empty { display: none; }
.stalker-chevron {
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform .15s;
}
.stalker-card:hover .stalker-chevron { transform: translateX(2px); }

/* ---------- Landing: trust strip ----------
 * Single horizontal row of three icon+label items, dot-separated, ink-soft.
 * Replaces three pill chips that fought each other for attention.
 * Wraps cleanly on narrow widths. */
.trust-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  margin: 18px 0 6px;
  padding: 0;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: .005em;
}
.trust-strip .trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.trust-strip .trust-item + .trust-item::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--line);
  transform: translateY(-50%);
}
.trust-icon {
  color: var(--accent);
  flex-shrink: 0;
}

/* ---------- Account search: free reassurance ----------
 * Tiny single-line caption under the CTA. Carries the "Free" promise without
 * a coloured pill that competes with the primary button. */
.reassure-line {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}

/* ---------- Account search: step eyebrow ----------
 * Compact uppercase label above the screen title — signals "1 of 2" without
 * borrowing a heavy progress-bar component. */
.step-indicator {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.identifier-mode-btn { margin-top: 10px; }

/* landing-critical:end */
.s1e-help {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ---------- AFAD help screen ----------
 * Numbered steps as flat ribbon strips on the surface — coloured numeral
 * + plain label. No card chrome per step (would feel heavy stacked 3x). */
.afad-steps {
  list-style: none;
  counter-reset: afad-step;
  margin: 8px 0 18px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.afad-steps[hidden] { display: none; }
.afad-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 14px;
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.35;
}
.afad-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.afad-step-icon img {
  display: block;
  width: 28px;
  height: 28px;
}
.afad-step-text { min-width: 0; word-break: break-word; }
.afad-sub {
  margin-top: -6px;
  margin-bottom: 18px;
  font-size: 13px;
  text-align: center;
}
.afad-num-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 28px 0 32px;
}
.afad-num-box[hidden] { display: none; }
.afad-num {
  font-size: 64px;
  line-height: 1;
  font-weight: 400;
  color: var(--ink);
  text-align: center;
}
.afad-deeplink-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0;
}
.afad-deeplink-row button { margin-top: 0; }
.afad-back {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
}

/* landing-critical:start */
/* Keep the landing CTA above the viewport edge and every teaser/banner
 * layer. Later funnel buttons retain their normal document-flow layout.
 * Wrap owns positioning so the reassure line rides with the button as
 * one visual unit, no gap the eye reads as separation.
 *
 * `.screen.active` runs a stage-in animation whose terminal state is
 * `transform: translateY(0)` — an identity transform that (per CSS spec)
 * becomes a containing block for descendant `position: fixed`. That trap
 * anchors the CTA to the container's bottom instead of the viewport,
 * pushing it off-screen when landing content is tall. Kill the animation
 * on landing only — nothing to fade from on the first paint anyway — so
 * the wrap stays truly viewport-fixed. */
#screenLanding.active { padding-bottom: 128px; animation: none; }
#screenLanding.active > * { animation: none; }
#screenLanding.active > .landing-cta-wrap {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 1000;
  width: 100vw;
  max-width: none;
  padding: 22px 14px max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(246, 248, 252, 0), var(--bg) 40%);
}
#screenLanding.active > .landing-cta-wrap > * { pointer-events: auto; }
#screenLanding.active > .landing-cta-wrap > #landingBtn {
  position: static;
  left: auto;
  width: min(544px, 100%);
  margin: 0;
  transform: none;
  box-shadow: 0 2px 4px rgba(30,108,247,.28), 0 14px 34px rgba(30,108,247,.34);
}
#screenLanding.active > .landing-cta-wrap > #landingBtn:hover,
#screenLanding.active > .landing-cta-wrap > #landingBtn:active { transform: none; }
#screenLanding.active > .landing-cta-wrap > .reassure-line {
  margin: 0;
  padding: 0 4px;
  text-align: center;
}
/* landing-critical:end */

.method-hero[hidden] { display: none; }
.method-hero {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 12px auto 16px;
  border-radius: var(--radius-card);
  object-fit: cover;
  aspect-ratio: 2 / 1;
}

.method-hint[hidden] { display: none; }
.method-hint {
  display: block;
  margin: 4px 0 16px;
  padding: 12px 16px;
  background: var(--accent-soft);
  border-radius: var(--radius-input);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent-deep);
  text-align: left;
}

.code-unlock-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 14px 0 16px;
  padding: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(30, 108, 247, .18);
  border-radius: var(--radius-card);
  color: var(--ink);
  text-align: start;
}

.code-unlock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-soft);
}
.code-unlock-icon svg { width: 20px; height: 20px; }

.code-unlock-title {
  margin: 0 0 3px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.code-unlock-copy {
  margin: 0;
  color: var(--ink-mid);
  font-size: 14px;
  line-height: 1.5;
}

.code-help-panel {
  margin-top: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  text-align: start;
}
.code-help-panel[hidden] { display: none; }
#screen3.active > .code-help-panel { animation: none; }

.code-help-title {
  margin: 0 0 2px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.code-help-copy {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 13.5px;
}
.code-help-panel button.secondary { margin-top: 0; }

.code-help-status {
  min-height: 20px;
  margin-top: 8px;
  color: var(--accent-deep);
  font-size: 13px;
  text-align: center;
}
.code-help-status:empty { display: none; }

.code-help-password {
  display: block;
  margin: 10px auto 0;
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: 500 13.5px/1.4 var(--font-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.code-help-password:hover { color: var(--accent); }

@media (max-width: 420px) {
  .code-unlock-card {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .code-unlock-icon { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
