:root {
  --entry-ink: var(--fg, var(--pk-ink));
  --entry-muted: var(--fgSubtle, var(--pk-ink-muted));
  --entry-line: var(--line);
  --entry-surface: var(--bg, var(--pk-bg));
  --entry-card: var(--bgCard, var(--pk-card));
  --entry-button-ink: var(--bg, var(--pk-card));
  --entry-brand: var(--accent, #6b45d8);
  --entry-brand-soft: var(--accentSoft, #eee9ff);
  --entry-danger: var(--danger, #bd3151);
  --entry-danger-soft: color-mix(in srgb, var(--danger, #bd3151) 16%, var(--entry-surface));
  --entry-success: var(--success, #23754c);
  --entry-success-soft: color-mix(in srgb, var(--success, #23754c) 16%, var(--entry-surface));
  --entry-font: Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html:has(.alz-entry-page), body.alz-entry-page { min-height: 100%; background: var(--entry-surface); }
body.alz-entry-page { margin: 0; color: var(--entry-ink); font-family: var(--entry-font); }
button, input, select { font: inherit; }

.alz-entry {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 20px 22px max(18px, env(safe-area-inset-bottom));
  background: var(--entry-surface);
}
.alz-entry__top { display: flex; align-items: center; justify-content: space-between; min-height: 34px; }
.alz-entry__brand { display: inline-flex; align-items: center; gap: 8px; color: var(--entry-ink); font-size: 18px; font-weight: 800; letter-spacing: -.07em; text-decoration: none; }
.alz-entry__brand img { border-radius: 8px; }
.alz-entry__quiet-link, .alz-entry__back-link { color: var(--entry-muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.alz-entry__back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 28px; }
.alz-entry__content { display: flex; flex: 1; align-items: center; justify-content: center; padding: 34px 0 28px; }
.alz-entry__surface { width: min(100%, 408px); }
.alz-entry__intro { margin-bottom: 30px; }
.alz-entry__intro--compact { margin-bottom: 26px; }
.alz-entry__intro h1 { max-width: 360px; margin: 0; color: var(--entry-ink); font-size: clamp(31px, 9vw, 42px); font-weight: 800; letter-spacing: -.075em; line-height: .98; }
.alz-entry__intro p { max-width: 350px; margin: 12px 0 0; color: var(--entry-muted); font-size: 14px; letter-spacing: -.015em; line-height: 1.45; }
.alz-entry__form { display: grid; gap: 16px; }
.alz-entry__list { margin: 0 0 24px; padding-left: 20px; color: var(--entry-ink); font-size: 14px; line-height: 1.5; }
.alz-entry__field { display: grid; gap: 8px; color: var(--entry-ink); font-size: 13px; font-weight: 700; letter-spacing: -.02em; }
.alz-entry__field > span { display: flex; align-items: baseline; justify-content: space-between; }
.alz-entry__field em { color: var(--entry-muted); font-size: 11px; font-style: normal; font-weight: 600; }
.alz-entry__field input, .alz-entry__phone-row { box-sizing: border-box; width: 100%; min-height: 54px; border: 1px solid var(--entry-line); border-radius: 12px; outline: 0; background: var(--entry-card); color: var(--entry-ink); font-size: 16px; font-weight: 500; transition: border-color .18s ease, box-shadow .18s ease; }
.alz-entry__field input { padding: 0 16px; }
.alz-entry__field input::placeholder { color: var(--alz-c-gray-67, #aca7b0); font-weight: 400; }
.alz-entry__field input:focus, .alz-entry__phone-row:focus-within { border-color: var(--entry-brand); box-shadow: 0 0 0 4px rgba(107,69,216,.11); }
.alz-entry__phone-row { display: flex; align-items: center; overflow: hidden; }
.alz-entry__phone-row select { height: 52px; width: 76px; border: 0; border-right: 1px solid var(--entry-line); outline: 0; background: var(--entry-card); color: var(--entry-ink); padding: 0 8px; font-size: 14px; font-weight: 700; }
.alz-entry__phone-row input { min-width: 0; border: 0; border-radius: 0; box-shadow: none !important; }
.alz-entry__form-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -2px; color: var(--entry-muted); font-size: 12px; font-weight: 600; }
.alz-entry__form-meta a, .alz-entry__switch a, .alz-entry__terms a { color: var(--entry-ink); font-weight: 750; text-decoration: none; }
.alz-entry__check, .alz-entry__terms { display: inline-flex; align-items: flex-start; gap: 8px; }
.alz-entry__check input, .alz-entry__terms input { width: 16px; height: 16px; margin: 0; accent-color: var(--entry-brand); }
.alz-entry__primary { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 999px; background: var(--entry-ink); color: var(--entry-button-ink); cursor: pointer; font-size: 14px; font-weight: 750; letter-spacing: -.015em; text-decoration: none; transition: transform .18s ease, opacity .18s ease; }
.alz-entry__primary:hover { transform: translateY(-1px); }
.alz-entry__primary:disabled { cursor: wait; opacity: .6; transform: none; }
.alz-entry__divider { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 24px 0 16px; color: var(--alz-c-gray-60-2, #99939e); font-size: 11px; font-weight: 650; }
.alz-entry__divider::before, .alz-entry__divider::after { height: 1px; background: var(--entry-line); content: ""; }
.alz-entry__socials { display: grid; gap: 10px; }
.alz-entry__social { min-height: 51px; display: flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box; border: 1px solid var(--entry-line); border-radius: 999px; color: var(--entry-ink); background: var(--entry-card); font-size: 13px; font-weight: 700; text-decoration: none; }
.alz-entry__secondary-link { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; color: var(--entry-muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.alz-entry__switch { margin: 28px 0 0; color: var(--entry-muted); text-align: center; font-size: 13px; line-height: 1.4; }
.alz-entry__footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; text-align: center; color: var(--entry-muted); font-size: 11px; font-weight: 600; }
.alz-entry__footer a { color: inherit; text-decoration: none; }
.alz-entry__alert { margin: 0 0 16px; border: 1px solid rgba(189,49,81,.2); border-radius: 12px; background: var(--entry-danger-soft); color: var(--entry-danger); padding: 12px 12px; font-size: 12px; font-weight: 650; line-height: 1.35; }
.alz-entry__alert--success { border-color: rgba(42,133,89,.2); background: var(--entry-success-soft); color: var(--entry-success); }
.alz-entry__caption { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; color: var(--entry-muted); text-align: center; font-size: 12px; line-height: 1.4; }
.alz-entry__progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: -8px 0 30px; }
.alz-entry__progress span { height: 4px; border-radius: 999px; background: var(--line); transition: background .2s ease; }
.alz-entry__progress span.is-active { background: var(--entry-brand); }
.alz-entry__step { margin: 0 0 16px; color: var(--entry-brand); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.alz-entry__actions { display: grid; grid-template-columns: 100px 1fr; gap: 8px; }
.alz-entry__back { min-height: 54px; border: 0; background: transparent; color: var(--entry-muted); cursor: pointer; font-size: 13px; font-weight: 750; }
.alz-entry__terms { color: var(--entry-muted); font-size: 11px; font-weight: 550; line-height: 1.45; }
.alz-entry__terms a { text-decoration: underline; }

/* First access: same surface and tokens as the rest of the app (design system). */
.alz-onboarding-page { margin: 0; min-height: 100%; background: var(--entry-surface); color: var(--entry-ink); font-family: var(--entry-font); }
.alz-onboarding { box-sizing: border-box; display: flex; flex-direction: column; min-height: 100dvh; margin: 0 auto; padding: 20px 22px max(18px, env(safe-area-inset-bottom)); background: var(--entry-surface); }
.alz-onboarding__top { display: flex; align-items: center; justify-content: space-between; min-height: 34px; }
.alz-onboarding__brand { display: inline-flex; align-items: center; gap: 8px; color: var(--entry-ink); font-size: 18px; font-weight: 800; letter-spacing: -.07em; text-decoration: none; }
.alz-onboarding__brand img { border-radius: 8px; }
.alz-onboarding__skip { border: 0; background: transparent; color: var(--entry-muted); cursor: pointer; font-size: 13px; font-weight: 700; }
.alz-onboarding__progress { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 22px; }
.alz-onboarding__progress span { height: 4px; border-radius: 999px; background: var(--line); transition: background .2s ease; }
.alz-onboarding__progress span.is-active { background: var(--entry-brand); }
.alz-onboarding__form { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.alz-onboarding__step { flex: 1; min-height: 0; padding: 32px 0 18px; animation: alz-entry-in .26s ease both; }
.alz-onboarding__step[hidden] { display: none; }
.alz-onboarding__visual { position: relative; display: grid; width: min(58vw,210px); aspect-ratio: 1; place-items: center; margin: 0 auto 28px; overflow: hidden; border-radius: 34% 66% 58% 42% / 43% 40% 60% 57%; background: linear-gradient(145deg, var(--alz-c-indigo-86, #c7b6ff), var(--alz-c-indigo-56-2, #6b45d8) 56%, var(--alz-c-indigo-41, #4d2aa9)); box-shadow: 0 23px 42px rgba(91,55,194,.28); }
.alz-onboarding__visual::before, .alz-onboarding__visual::after { position: absolute; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; content: ""; }
.alz-onboarding__visual::before { width: 68%; height: 68%; }
.alz-onboarding__visual::after { width: 42%; height: 42%; }
.alz-onboarding__visual img { position: relative; z-index: 1; width: 68px; height: 68px; border-radius: 20px; box-shadow: 0 16px 28px rgba(42,22,95,.28); }
.alz-onboarding__eyebrow { margin-bottom: 12px; color: var(--entry-brand); text-align: center; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.alz-onboarding__title { max-width: 390px; margin: 0 auto; color: var(--entry-ink); text-align: center; font-size: clamp(29px, 8vw, 39px); font-weight: 800; letter-spacing: -.07em; line-height: 1.01; }
.alz-onboarding__text { max-width: 390px; margin: 12px auto 0; color: var(--entry-muted); text-align: center; font-size: 14px; line-height: 1.45; }
.alz-onboarding__field { display: grid; gap: 8px; max-width: 408px; margin: 30px auto 0; color: var(--entry-ink); font-size: 12px; font-weight: 750; }
.alz-onboarding__field input { min-height: 54px; border: 1px solid var(--entry-line); border-radius: 12px; outline: 0; padding: 0 16px; color: var(--entry-ink); font-size: 16px; }
.alz-onboarding__field input:focus { border-color: var(--entry-brand); box-shadow: 0 0 0 4px rgba(107,69,216,.11); }
.alz-onboarding__choices { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; max-width: 408px; margin: 28px auto 0; }
.alz-onboarding__choices--five { grid-template-columns: repeat(3, minmax(0,1fr)); }
.alz-onboarding__choice, .alz-onboarding__preference { position: relative; display: flex; align-items: center; justify-content: center; min-height: 50px; box-sizing: border-box; border: 1px solid var(--entry-line); border-radius: 12px; background: var(--entry-card); color: var(--entry-muted); cursor: pointer; font-size: 13px; font-weight: 700; text-align: center; }
.alz-onboarding__choice input, .alz-onboarding__preference input { position: absolute; opacity: 0; pointer-events: none; }
.alz-onboarding__choice:has(input:checked), .alz-onboarding__preference:has(input:checked) { border-color: var(--entry-brand); background: var(--entry-brand-soft); color: var(--alz-c-indigo-41, #4e2aae); box-shadow: 0 0 0 3px rgba(107,69,216,.08); }
.alz-onboarding__preferences { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; max-width: 408px; margin: 28px auto 0; }
.alz-onboarding__avatars { display: grid; grid-template-columns: repeat(3, 64px); justify-content: center; gap: 12px; margin: 24px auto 0; }
.alz-onboarding__avatar { position: relative; display: block; width: 64px; height: 64px; cursor: pointer; }
.alz-onboarding__avatar input { position: absolute; opacity: 0; }
.alz-onboarding__avatar img { box-sizing: border-box; display: block; width: 64px; height: 64px; border: 3px solid transparent; border-radius: 50%; object-fit: cover; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.alz-onboarding__avatar:has(input:checked) img { border-color: var(--entry-brand); box-shadow: 0 0 0 4px var(--entry-brand-soft); transform: scale(1.05); }
.alz-onboarding__hint, .alz-onboarding__error { max-width: 408px; margin: 12px auto 0; color: var(--entry-muted); text-align: center; font-size: 12px; line-height: 1.4; }
.alz-onboarding__error { color: var(--entry-danger); }
.alz-onboarding__footer { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding-top: 16px; }
.alz-onboarding__back { min-height: 54px; border: 0; background: transparent; color: var(--entry-muted); cursor: pointer; font-size: 13px; font-weight: 750; }
.alz-onboarding__back:disabled { visibility: hidden; }
.alz-onboarding__next { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; background: var(--entry-ink); color: var(--entry-button-ink); cursor: pointer; font-size: 14px; font-weight: 750; }
.alz-onboarding__server-error { margin: 0 0 10px; color: var(--entry-danger); text-align: center; font-size: 12px; font-weight: 650; }

/* Phone-code entry: same visual language, no duplicated splash/identity. */
.alz-phone-entry { box-sizing: border-box; display: flex; flex-direction: column; min-height: 100dvh; margin: 0 auto; padding: 20px 22px max(18px, env(safe-area-inset-bottom)); background: var(--entry-surface); color: var(--entry-ink); font-family: var(--entry-font); }
.alz-phone-entry__top { display: flex; align-items: center; justify-content: space-between; }
.alz-phone-entry__brand { display: inline-flex; align-items: center; gap: 8px; color: var(--entry-ink); font-size: 18px; font-weight: 800; letter-spacing: -.07em; text-decoration: none; }
.alz-phone-entry__brand img { border-radius: 8px; }
.alz-phone-entry__lang { border: 0; background: transparent; color: var(--entry-muted); cursor: pointer; font-size: 12px; font-weight: 750; }
.alz-phone-entry__content { width: min(100%,408px); margin: auto; }
.alz-phone-entry__title { margin: 0; font-size: clamp(31px,9vw,42px); font-weight: 800; letter-spacing: -.075em; line-height: .98; }
.alz-phone-entry__sub { margin: 12px 0 28px; color: var(--entry-muted); font-size: 14px; line-height: 1.45; }
.alz-phone-entry__phone { display: flex; min-height: 54px; overflow: hidden; border: 1px solid var(--entry-line); border-radius: 12px; }
.alz-phone-entry__ddi { display: flex; align-items: center; gap: 8px; border: 0; border-right: 1px solid var(--entry-line); background: var(--entry-card); padding: 0 12px; color: var(--entry-ink); cursor: pointer; font-size: 13px; font-weight: 750; }
.alz-phone-entry__ddi img, .alz-phone-entry__ddi .alz-phone-entry__flag, .alz-amb-ddilist__flag { display: inline-block; width: 20px; border-radius: 50%; font-size: 18px; line-height: 1; font-style: normal; }
.alz-phone-entry__phone input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 14px; color: var(--entry-ink); font-size: 16px; }
.alz-phone-entry__primary { margin-top: 16px; min-height: 54px; display: flex; align-items: center; justify-content: center; width: 100%; border: 0; border-radius: 999px; background: var(--entry-ink); color: var(--entry-button-ink); cursor: pointer; font-size: 14px; font-weight: 750; }
.alz-phone-entry__error { margin: 8px 0 0; color: var(--entry-danger); font-size: 12px; font-weight: 650; }
.alz-phone-entry__divider { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 24px 0 16px; color: var(--alz-c-gray-60-2, #99939e); font-size: 11px; font-weight: 650; }
.alz-phone-entry__divider::before, .alz-phone-entry__divider::after { height: 1px; background: var(--entry-line); content: ""; }
.alz-phone-entry__socials { display: grid; gap: 10px; }
.alz-phone-entry__social { min-height: 51px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; border: 1px solid var(--entry-line); border-radius: 999px; color: var(--entry-ink); font-size: 13px; font-weight: 700; text-decoration: none; }
.alz-phone-entry__back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 28px; color: var(--entry-muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.alz-phone-entry__code { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 26px 0 16px; }
.alz-phone-entry__code input { min-width: 0; height: 58px; border: 1px solid var(--entry-line); border-radius: 12px; outline: 0; color: var(--entry-ink); text-align: center; font-size: 24px; font-weight: 700; }
.alz-phone-entry__code input:focus { border-color: var(--entry-brand); box-shadow: 0 0 0 4px rgba(107,69,216,.11); }
.alz-phone-entry__minor { margin-top: 20px; color: var(--entry-muted); text-align: center; font-size: 13px; }
.alz-phone-entry__minor a, .alz-phone-entry__minor button { border: 0; background: transparent; color: var(--entry-ink); cursor: pointer; font: inherit; font-weight: 750; text-decoration: none; }

/* Public welcome carousel. */
.alz-welcome-page { margin: 0; min-height: 100%; background: var(--entry-surface); color: var(--entry-ink); font-family: var(--entry-font); }
.alz-welcome { box-sizing: border-box; display: flex; flex-direction: column; min-height: 100dvh; margin: 0 auto; padding: 20px 22px max(18px, env(safe-area-inset-bottom)); background: var(--entry-surface); }
.alz-welcome__top { display: flex; align-items: center; justify-content: space-between; }
.alz-welcome__brand { display: inline-flex; align-items: center; gap: 8px; color: var(--entry-ink); font-size: 18px; font-weight: 800; letter-spacing: -.07em; text-decoration: none; }
.alz-welcome__brand img { border-radius: 8px; }
.alz-welcome__skip { color: var(--entry-muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.alz-welcome__progress { display: grid; grid-template-columns: repeat(var(--welcome-count),1fr); gap: 4px; margin-top: 22px; }
.alz-welcome__progress button { height: 4px; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; padding: 0; }
.alz-welcome__progress button.is-active { background: var(--entry-brand); }
.alz-welcome__track { display: grid; flex: 1; min-height: 0; padding: 32px 0 18px; }
.alz-welcome__slide { display: none; min-height: 0; grid-template-rows: minmax(230px, 1fr) auto; align-items: center; animation: alz-entry-in .26s ease both; }
.alz-welcome__slide.is-active { display: grid; }
.alz-welcome__art { display: grid; place-items: center; min-height: 0; padding-bottom: 20px; }
.alz-welcome__art img { display: block; width: min(72vw,270px); height: min(45vh,360px); border-radius: 28px; object-fit: cover; box-shadow: 0 22px 45px rgba(42,31,71,.16); }
.alz-welcome__art-placeholder { position: relative; display: grid; width: min(62vw,235px); aspect-ratio: 1; place-items: center; overflow: hidden; border-radius: 35% 65% 59% 41% / 44% 42% 58% 56%; background: linear-gradient(145deg, var(--alz-c-indigo-88, #cdbfff), var(--welcome-accent, var(--alz-c-indigo-56-2, #6b45d8)) 58%, var(--alz-c-indigo-36, #482494)); box-shadow: 0 23px 42px rgba(91,55,194,.28); color: var(--alz-c-gray-100, #fff); }
.alz-welcome__art-placeholder::before, .alz-welcome__art-placeholder::after { position: absolute; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; content: ""; }
.alz-welcome__art-placeholder::before { width: 68%; height: 68%; }
.alz-welcome__art-placeholder::after { width: 39%; height: 39%; }
.alz-welcome__art-placeholder svg { position: relative; z-index: 1; }
.alz-welcome__body { text-align: center; }
.alz-welcome__eyebrow { margin-bottom: 12px; color: var(--entry-brand); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.alz-welcome__title { max-width: 390px; margin: 0 auto; font-size: clamp(30px,8.5vw,42px); font-weight: 800; letter-spacing: -.075em; line-height: .99; }
.alz-welcome__text { max-width: 375px; margin: 12px auto 0; color: var(--entry-muted); font-size: 14px; line-height: 1.45; }
.alz-welcome__bottom { padding-top: 16px; }
.alz-welcome__actions { display: grid; grid-template-columns: 92px 1fr; gap: 8px; }
.alz-welcome__back { min-height: 54px; border: 0; background: transparent; color: var(--entry-muted); cursor: pointer; font-size: 13px; font-weight: 750; }
.alz-welcome__back:disabled { visibility: hidden; }
.alz-welcome__next, .alz-welcome__final-primary { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; background: var(--entry-ink); color: var(--entry-button-ink); cursor: pointer; font-size: 14px; font-weight: 750; text-decoration: none; }
.alz-welcome__final { display: grid; gap: 10px; }
.alz-welcome__final-secondary { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--entry-line); border-radius: 999px; color: var(--entry-muted); font-size: 13px; font-weight: 750; text-decoration: none; }
.alz-welcome__done { display: none; }

@keyframes alz-entry-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@media (min-width: 720px) {
  .alz-entry, .alz-onboarding, .alz-phone-entry, .alz-welcome { width: min(100%, 560px); min-height: 760px; margin: 20px auto; border: 1px solid var(--entry-line); border-radius: 28px; box-shadow: 0 22px 60px rgba(0,0,0,.35); }
}
@media (max-width: 360px) { .alz-onboarding__choices--five { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (prefers-reduced-motion: reduce) { .alz-onboarding__step { animation: none; } }
