/**
 * LIVZO — "Complete your profile" onboarding.
 *
 * The post-login personalisation step: a two-step wizard in a white card beside the
 * community illustration, with a live completion ring on top. Everything is built from
 * the base tokens and reuses the shared primitives — in particular the search module's
 * .lz-popover / .lz-option for the location comboboxes.
 *
 * Motion index
 *   reveal-on-scroll → [data-lz-inview] + .is-in (assets/js/societies.js)
 *   ring + step bar  → width/stroke transitions driven by JS-updated classes
 *   ambient          → glow drift, floating insight cards
 *   hover            → button lift, card select, chip select, control focus ring
 *
 * State classes are toggle-only (never inline styles except the ring's dash offset,
 * which is a single measured value): is-invalid, is-selected, is-done, is-open,
 * is-step-2, is-busy, is-ready, is-tone-danger/warning/success.
 */

/* ==========================================================================
   1. Section shell
   ========================================================================== */

.lz-profile {
    position: relative;
    isolation: isolate;
    padding-top: calc(var(--lz-header-h) + clamp(22px, 4vw, 56px));
    padding-bottom: clamp(56px, 7vw, 104px);
}

.lz-profile__wash {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(880px 520px at 10% -12%, rgba(109, 74, 255, 0.10), transparent 62%),
        radial-gradient(720px 480px at 96% 4%, rgba(109, 74, 255, 0.06), transparent 60%),
        linear-gradient(180deg, #FDFCFF 0%, var(--lz-bg) 46%);
}

.lz-profile__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(26px, 4vw, 58px);
    align-items: start;
}

.lz-profile [hidden] { display: none !important; }

/* ==========================================================================
   2. Map column
   ========================================================================== */

/* The map is functional, not decorative, so the column is never hidden — on a phone it
   sits above the wizard, the way a photo/map step reads in a native app. */
.lz-profile__aside { display: block; }

.lz-profile__visual { position: relative; }

/* The bleed stays inside the page gutter: the column is full-width on a phone, so a
   wider glow would sit past the viewport edge. */
.lz-profile__glow {
    position: absolute;
    inset: -8% -2% -6% -2%;
    z-index: 0;
    border-radius: 44%;
    background-image: radial-gradient(closest-side, rgba(109, 74, 255, 0.22), rgba(109, 74, 255, 0) 72%);
    filter: blur(4px);
    animation: lzDrift 18s var(--lz-ease) infinite;
}

/* --- The map panel -------------------------------------------------------- */

.lz-map {
    position: relative;
    z-index: 1;
    height: 262px;
    overflow: hidden;
    border: 1px solid var(--lz-line);
    border-radius: var(--lz-r-xl);
    background-color: var(--lz-accent-soft);
    box-shadow: var(--lz-sh-3);
    isolation: isolate;
}

.lz-map__canvas { position: absolute; inset: 0; }

/* The styled stand-in: shown until the map is ready, and instead of it with no API key.
   A faint map grid over the brand's lavender, so the panel never looks broken or empty. */
.lz-map__veil {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 26px;
    text-align: center;
    background-color: var(--lz-surface);
    background-image:
        linear-gradient(to right, rgba(109, 74, 255, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(109, 74, 255, 0.06) 1px, transparent 1px),
        radial-gradient(120% 85% at 50% 0%, rgba(109, 74, 255, 0.16), rgba(109, 74, 255, 0) 64%);
    background-size: 34px 34px, 34px 34px, auto;
}

.lz-map__veil-ico {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    flex: none;
    border-radius: 50%;
    background-color: var(--lz-surface);
    box-shadow: var(--lz-sh-2);
    color: var(--lz-accent);
}

.lz-map__veil-ico .lz-icon { width: 24px; height: 24px; }

.lz-map__veil-text {
    max-width: 27ch;
    color: var(--lz-navy-2);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.5;
}

.lz-map__note {
    max-width: 32ch;
    color: var(--lz-body);
    font-size: 0.72rem;
    line-height: 1.5;
}

/* A card shown in the placeholder once a society is chosen (no key / SDK not ready). */
.lz-map.is-static.has-pin .lz-map__veil { justify-content: flex-end; padding-bottom: 22px; }
.lz-map.is-static.has-pin .lz-map__veil-ico,
.lz-map.is-static.has-pin .lz-map__veil-text { display: none; }

/* Cleared of the label chip above it, so the two never collide. */
.lz-map.is-static .lz-map__tip {
    position: absolute;
    left: 50%;
    top: 68px;
    z-index: 4;
    transform: translateX(-50%);
}

/* --- The pin and its tooltip --------------------------------------------- */

/* One absolutely-positioned wrapper holds the card and the pin, so they cannot drift
   apart. Pointer events stay off it, so dragging the map is never blocked. */
.lz-map__pinwrap {
    position: absolute;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    transform: translate(-50%, -100%);
}

.lz-map__pin {
    display: block;
    width: 32px;
    height: 42px;
    filter: drop-shadow(0 14px 16px rgba(11, 27, 51, 0.26));
    animation: lzMapDrop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lz-map__pin svg { width: 100%; height: 100%; }

@keyframes lzMapDrop {
    from { opacity: 0; transform: translateY(-14px); }
    to { opacity: 1; transform: none; }
}

/* Deliberately small — a label, not a panel. */
.lz-map__tip { margin-bottom: 7px; }

.lz-map__tip-card {
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: 218px;
    padding: 7px 11px 7px 7px;
    border: 1px solid var(--lz-line);
    border-radius: 15px;
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: var(--lz-sh-3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lz-map__tip-photo {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    overflow: hidden;
    border-radius: 50%;
    background-image: linear-gradient(140deg, var(--lz-accent-soft-2), var(--lz-accent-soft));
    color: var(--lz-accent-700);
}

.lz-map__tip-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lz-map__tip-mono { font-size: 0.85rem; font-weight: 800; }

.lz-map__tip-body { display: grid; gap: 1px; min-width: 0; }

.lz-map__tip-name {
    overflow: hidden;
    max-width: 16ch;
    color: var(--lz-navy-2);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.012em;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lz-map__tip-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    color: var(--lz-body);
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* The star is decorative, so it only has to clear 3:1 — this amber does. */
.lz-map__tip-meta .lz-icon { width: 11px; height: 11px; color: #A96A00; }

.lz-map__tip-score { color: var(--lz-navy); font-weight: 800; }

.lz-map__tip-chip {
    justify-self: start;
    padding: 3px 8px;
    border-radius: var(--lz-r-pill);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.lz-map__tip-meta .lz-map__tip-chip { margin-left: 2px; }

/* A dark amber: the small chip text has to clear 4.5:1, so the light amber tokens
   (right for a gauge fill) are too pale to use as text here. */
.lz-map__tip-chip--approx {
    border: 1px solid rgba(217, 138, 0, 0.26);
    background-color: var(--lz-amber-soft);
    color: #8A5700;
}

.lz-map__tip-chip--chip {
    border: 1px solid rgba(109, 74, 255, 0.2);
    background-color: var(--lz-accent-soft);
    color: var(--lz-accent-700);
}

/* --- Panel chrome --------------------------------------------------------- */

.lz-map__label {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: calc(100% - 28px);
    padding: 7px 13px 7px 9px;
    border: 1px solid rgba(109, 74, 255, 0.18);
    border-radius: var(--lz-r-pill);
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: var(--lz-sh-2);
    color: var(--lz-navy);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lz-map__label-ico { display: grid; place-items: center; flex: none; color: var(--lz-accent); }
.lz-map__label-ico .lz-icon { width: 14px; height: 14px; }

.lz-map__zoomers {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lz-map__zoom {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--lz-line);
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.94);
    box-shadow: var(--lz-sh-1);
    color: var(--lz-navy);
    cursor: pointer;
    transition: border-color 0.22s var(--lz-ease), color 0.22s var(--lz-ease);
}

.lz-map__zoom:hover {
    border-color: rgba(109, 74, 255, 0.3);
    color: var(--lz-accent);
}

.lz-map__zoom .lz-icon { width: 15px; height: 15px; }

.lz-map__zoom:focus-visible {
    outline: 3px solid var(--lz-accent-ring);
    outline-offset: 2px;
}

/* ==========================================================================
   3. Wizard card
   ========================================================================== */

.lz-profile__card {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin-inline: auto;
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid var(--lz-line);
    border-radius: var(--lz-r-xl);
    background-color: var(--lz-surface);
    box-shadow: 0 3px 8px rgba(11, 27, 51, 0.04), var(--lz-sh-4);
}

.lz-profile__noscript {
    margin-bottom: 16px;
    padding: 12px 15px;
    border: 1px solid rgba(245, 165, 36, 0.3);
    border-radius: var(--lz-r-sm);
    background-color: var(--lz-amber-soft);
    color: var(--lz-navy-2);
    font-size: 0.85rem;
    line-height: 1.55;
}

/* --- Head ----------------------------------------------------------------- */

.lz-profile__eyebrow {
    color: var(--lz-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.lz-profile__title {
    margin-top: 8px;
    font-size: clamp(1.5rem, 1.3rem + 1.1vw, 1.95rem);
    letter-spacing: -0.035em;
    line-height: 1.14;
    text-wrap: balance;
}

.lz-profile__title-accent { color: var(--lz-accent); }

.lz-profile__lead {
    margin-top: 10px;
    color: var(--lz-body);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- "Finish your profile first" notice ---------------------------------- */

/* The inverse of the review prompt below: while the profile is incomplete this says why, since a
   review is tied to the society saved here. Visible as-is without JavaScript (the wizard needs it
   anyway); with JavaScript it starts hidden and profile.js adds `.is-shown` until the profile is
   ready — so a returning resident who is already complete never sees it flash, and the two
   prompts are never on screen together. */
.lz-profile__notice {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 20px;
    padding: 15px 18px;
    border: 1px solid rgba(245, 165, 36, 0.38);
    border-left: 4px solid var(--lz-band-warning);
    border-radius: var(--lz-r-lg);
    background-color: rgba(245, 165, 36, 0.10);
    box-shadow: 0 14px 30px -24px rgba(217, 138, 0, 0.9);
}

html.has-js .lz-profile__notice { display: none; }
html.has-js .lz-profile__notice.is-shown { display: flex; }

.lz-profile__notice-ico {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 14px;
    background-image: linear-gradient(150deg, #FFF6E6 0%, var(--lz-surface) 100%);
    box-shadow: 0 8px 16px -10px rgba(217, 138, 0, 0.75), var(--lz-sh-1);
    color: var(--lz-band-warning-text);
}

/* The eye-catchy cue: a soft amber ring breathing out of the icon, so the banner reads as
   "there is something to do here". Decorative only — the title and lead carry the message, and
   the pulse is switched off under prefers-reduced-motion. */
.lz-profile__notice-ico::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 17px;
    border: 2px solid rgba(245, 165, 36, 0.55);
    animation: lzProfileNoticeRing 2.8s var(--lz-ease-out) infinite;
    pointer-events: none;
}

.lz-profile__notice-ico .lz-icon { width: 19px; height: 19px; }

@keyframes lzProfileNoticeRing {
    0%   { transform: scale(0.88); opacity: 0.75; }
    70%  { transform: scale(1.16); opacity: 0; }
    100% { transform: scale(1.16); opacity: 0; }
}

.lz-profile__notice-body {
    display: grid;
    gap: 2px;
    flex: 1 1 190px;
    min-width: 0;
}

.lz-profile__notice-title {
    color: var(--lz-navy);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.lz-profile__notice-lead {
    color: var(--lz-body);
    font-size: 0.82rem;
    line-height: 1.5;
}

/* --- "Write a Review" prompt --------------------------------------------- */

/* The one action on this page that is not about completing the profile. Rendered hidden and
   revealed by profile.js once the profile is ready — a brand-new resident is never pointed at
   a review they cannot write yet. */
.lz-profile__review {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid rgba(109, 74, 255, 0.22);
    border-radius: var(--lz-r-lg);
    background-color: var(--lz-accent-soft);
}

/* The strip owns `display: flex`, which beats the UA `[hidden]` rule. */
.lz-profile__review[hidden] { display: none; }

.lz-profile__review-ico {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 13px;
    background-color: var(--lz-surface);
    box-shadow: var(--lz-sh-1);
    color: var(--lz-accent);
}

.lz-profile__review-ico .lz-icon { width: 18px; height: 18px; }

.lz-profile__review-body {
    display: grid;
    gap: 2px;
    flex: 1 1 190px;
    min-width: 0;
}

.lz-profile__review-title {
    color: var(--lz-navy);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.lz-profile__review-lead {
    color: var(--lz-body);
    font-size: 0.82rem;
    line-height: 1.5;
}

.lz-profile__review-btn { flex: none; }

/* ==========================================================================
   4. Completion ring + checklist
   ========================================================================== */

.lz-profile__progress {
    /* The ring + pulse colour. Defaults to the brand accent (the pre-JS / no-JS
       state); the band classes below recolour it from the computed completion. */
    --lz-tone: var(--lz-accent);
    --lz-tone-strong: var(--lz-accent-700);
    --lz-tone-soft: rgba(109, 74, 255, 0.16);
    --lz-tone-track: rgba(109, 74, 255, 0.13);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(16px, 3vw, 26px);
    margin-top: 22px;
    padding: clamp(16px, 3vw, 20px);
    border: 1px solid rgba(109, 74, 255, 0.14);
    border-radius: var(--lz-r-lg);
    background-image: linear-gradient(160deg, #FAF8FF 0%, #F5F2FF 100%);
}

.lz-profile__ring {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 138px;
    height: 138px;
    flex: none;
}

/* A slow halo pulse so the ring reads as live without pulling focus; it inherits
   the band colour and sits behind the ring, so the track, arc and value stay crisp. */
.lz-profile__ring::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background-color: var(--lz-tone-soft);
    opacity: 0;
    transform: scale(0.92);
    animation: lzProfilePulse 3.2s var(--lz-ease) infinite;
    pointer-events: none;
}

@keyframes lzProfilePulse {
    0%, 100% { opacity: 0; transform: scale(0.92); }
    45%      { opacity: 1; transform: scale(1.02); }
}

.lz-profile__ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.lz-profile__ring-track {
    fill: none;
    stroke: var(--lz-tone-track);
    stroke-width: 7;
}

.lz-profile__ring-arc {
    fill: none;
    stroke: var(--lz-tone);
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 0.9s var(--lz-ease-out), stroke 0.3s var(--lz-ease);
}

.lz-profile__ring-value {
    position: relative;
    display: flex;
    align-items: baseline;
    color: var(--lz-navy);
    font-weight: 800;
    letter-spacing: -0.035em;
}

.lz-profile__ring-num { color: var(--lz-tone-strong); font-size: 2rem; line-height: 1; }

.lz-profile__ring-sign {
    margin-left: 1px;
    color: var(--lz-body);
    font-size: 0.95rem;
    font-weight: 700;
}

.lz-profile__ring-caption {
    position: relative;
    max-width: 92px;
    margin-top: 4px;
    color: var(--lz-body);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
}

.lz-profile__progress.is-ready .lz-profile__ring-caption { color: var(--lz-green-600); }

/* Completion tone: the ring reads red below 40%, amber 40–80%, green above 80%
   (bands live in config → profile_onboarding.completion.tones). The percentage,
   the caption and the message all state the same thing, so the colour is never
   the only signal. */
.lz-profile__progress.is-tone-danger {
    --lz-tone: var(--lz-red);
    --lz-tone-strong: var(--lz-red-600);
    --lz-tone-soft: var(--lz-red-soft);
    --lz-tone-track: rgba(229, 72, 77, 0.18);
}

.lz-profile__progress.is-tone-warning {
    --lz-tone: var(--lz-amber);
    --lz-tone-strong: var(--lz-amber-700, #B2760E);
    --lz-tone-soft: var(--lz-amber-soft);
    --lz-tone-track: rgba(245, 165, 36, 0.22);
}

.lz-profile__progress.is-tone-success {
    --lz-tone: var(--lz-green);
    --lz-tone-strong: var(--lz-green-600);
    --lz-tone-soft: var(--lz-green-soft);
    --lz-tone-track: rgba(18, 161, 80, 0.18);
}

.lz-profile__progress-body {
    flex: 1 1 220px;
    min-width: 0;
}

.lz-profile__progress-message {
    color: var(--lz-navy);
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.4;
}

.lz-profile__progress-remaining {
    margin-top: 3px;
    color: var(--lz-body);
    font-size: 0.82rem;
}

.lz-profile__checklist-title {
    margin-top: 14px;
    color: var(--lz-body);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.lz-profile__checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 16px;
    margin-top: 7px;
}

.lz-profile__check { min-width: 0; }

.lz-profile__check-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 3px 0;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--lz-body);
    font-size: 0.83rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color 0.22s var(--lz-ease);
}

.lz-profile__check-btn:not([disabled]):hover { color: var(--lz-accent-700); }
.lz-profile__check-btn[disabled] { cursor: default; }

.lz-profile__check-ico {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    flex: none;
}

.lz-profile__check-empty {
    display: block;
    width: 13px;
    height: 13px;
    border: 1.5px solid var(--lz-line-2);
    border-radius: 50%;
    transition: border-color 0.22s var(--lz-ease);
}

.lz-profile__check-btn:not([disabled]):hover .lz-profile__check-empty { border-color: var(--lz-accent); }

.lz-profile__check-tick {
    display: none;
    color: var(--lz-green);
}

.lz-profile__check.is-done .lz-profile__check-empty { display: none; }
.lz-profile__check.is-done .lz-profile__check-tick { display: block; }
.lz-profile__check.is-done .lz-profile__check-label { color: var(--lz-navy); }

.lz-profile__check-label {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ==========================================================================
   5. Stepper
   ========================================================================== */

.lz-profile__steps { margin-top: 22px; }

.lz-profile__step-count {
    color: var(--lz-body);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.lz-profile__step-list {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.lz-profile__step {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1 1 0;
    min-width: 0;
    color: var(--lz-body);
    font-size: 0.85rem;
    font-weight: 600;
}

.lz-profile__step-dot {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: none;
    border: 1px solid var(--lz-line-2);
    border-radius: 50%;
    background-color: var(--lz-surface);
    color: var(--lz-body);
    font-size: 0.72rem;
    font-weight: 800;
    transition: background-color 0.3s var(--lz-ease), color 0.3s var(--lz-ease),
        border-color 0.3s var(--lz-ease), box-shadow 0.3s var(--lz-ease);
}

.lz-profile__step-label {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lz-profile__step.is-current { color: var(--lz-navy); font-weight: 700; }

/* The rail is the "where am I" signal and stays success-green once the wizard is
   underway; the dot number and the "Step n of m" line carry the meaning too. */
.lz-profile__step.is-current .lz-profile__step-dot,
.lz-profile__step.is-done .lz-profile__step-dot {
    border-color: transparent;
    background-color: var(--lz-green-600);
    color: #fff;
    box-shadow: 0 6px 14px -8px rgba(18, 161, 80, 0.9);
}

.lz-profile__step-bar {
    display: block;
    height: 5px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: var(--lz-r-pill);
    background-color: rgba(18, 161, 80, 0.16);
}

.lz-profile__step-fill {
    display: block;
    width: 50%;
    height: 100%;
    border-radius: inherit;
    background-image: linear-gradient(90deg, var(--lz-green), var(--lz-green-600));
    transition: width 0.5s var(--lz-ease-out);
}

.lz-profile__steps.is-step-2 .lz-profile__step-fill { width: 100%; }

/* ==========================================================================
   6. Form, groups and fields
   ========================================================================== */

.lz-profile__form { margin-top: 22px; }

.lz-profile__panel { animation: lzProfileStep 0.4s var(--lz-ease-out) both; }

@keyframes lzProfileStep {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.lz-profile__group-head { margin-top: 24px; }

.lz-profile__group-title {
    font-size: 1.04rem;
    letter-spacing: -0.025em;
}

.lz-profile__group-text {
    margin-top: 5px;
    color: var(--lz-body);
    font-size: 0.86rem;
    line-height: 1.55;
}

.lz-profile__field { margin-top: 16px; scroll-margin-top: calc(var(--lz-header-h) + 24px); }

.lz-profile__label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--lz-navy);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.005em;
}

.lz-profile__badge {
    padding: 2px 8px;
    border-radius: var(--lz-r-pill);
    background-color: var(--lz-accent-soft);
    color: var(--lz-accent-700);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.lz-profile__req {
    color: var(--lz-accent);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
}

.lz-profile__control,
.lz-profile__select {
    width: 100%;
}

.lz-profile__control {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    margin-top: 8px;
    padding: 0 14px;
    border: 1px solid var(--lz-line-2);
    border-radius: var(--lz-r-md);
    background-color: var(--lz-surface);
    transition: border-color 0.22s var(--lz-ease), box-shadow 0.22s var(--lz-ease),
        background-color 0.22s var(--lz-ease);
}

.lz-profile__control:focus-within {
    border-color: var(--lz-accent);
    box-shadow: 0 0 0 4px rgba(109, 74, 255, 0.14);
}

.lz-profile__control-ico {
    display: grid;
    place-items: center;
    flex: none;
    color: var(--lz-body);
    transition: color 0.22s var(--lz-ease);
}

.lz-profile__control:focus-within .lz-profile__control-ico { color: var(--lz-accent); }
.lz-profile__control-ico .lz-icon { width: 18px; height: 18px; }

.lz-profile__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 52px;
    padding: 0;
    border: 0;
    background-color: transparent;
    color: var(--lz-navy);
    font-size: 0.97rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.lz-profile__input:focus { outline: none; }
.lz-profile__input::placeholder { color: var(--lz-muted); font-weight: 500; }

.lz-profile__control--readonly { background-color: var(--lz-bg-2); }
.lz-profile__control--readonly .lz-profile__input { color: var(--lz-body); }

.lz-profile__control--select { padding-right: 10px; }

.lz-profile__select {
    flex: 1 1 auto;
    min-width: 0;
    height: 52px;
    border: 0;
    background-color: transparent;
    color: var(--lz-navy);
    font-size: 0.97rem;
    font-weight: 600;
    -webkit-appearance: none;
    appearance: none;
}

.lz-profile__select:focus { outline: none; }

.lz-profile__control-chev {
    display: grid;
    place-items: center;
    flex: none;
    color: var(--lz-body);
    pointer-events: none;
    transition: transform 0.24s var(--lz-ease-out), color 0.24s var(--lz-ease);
}

.lz-profile__control-chev .lz-icon { width: 16px; height: 16px; }

.lz-profile__field--combo.is-open .lz-profile__control-chev {
    color: var(--lz-accent);
    transform: rotate(180deg);
}

.lz-profile__field.is-invalid .lz-profile__control { border-color: var(--lz-red); }

.lz-profile__error {
    margin-top: 7px;
    color: var(--lz-red-600);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.45;
}

.lz-profile__hint {
    margin-top: 7px;
    color: var(--lz-body);
    font-size: 0.78rem;
    line-height: 1.5;
}

.lz-profile__verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: none;
    padding: 5px 10px;
    border-radius: var(--lz-r-pill);
    background-color: var(--lz-green-soft);
    color: var(--lz-green-600);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.lz-profile__verified .lz-icon { width: 14px; height: 14px; }

/* `display: inline-flex` beats the UA `[hidden]` rule, so the chip and the Verify button need
   their own guard — they are revealed and hidden by the verification state (§28's trap). */
.lz-profile__verified[hidden] { display: none; }

/* --- The email field's verification state -------------------------------- */

.lz-profile__control--email { padding-right: 8px; }

.lz-profile__verify {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    padding: 10px 18px;
    border: 0;
    border-radius: var(--lz-r-pill);
    /* Both gradient ends are dark enough that the white 0.78rem label clears 4.5:1. */
    background-image: linear-gradient(140deg, var(--lz-band-success-text), var(--lz-green-600));
    color: #fff;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 22px -14px rgba(5, 150, 105, 0.9);
    transition: transform 0.2s var(--lz-ease), box-shadow 0.2s var(--lz-ease), opacity 0.2s var(--lz-ease);
}

.lz-profile__verify[hidden] { display: none; }

.lz-profile__verify:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px -14px rgba(5, 150, 105, 0.95);
}

.lz-profile__verify:disabled {
    opacity: 0.72;
    cursor: progress;
    transform: none;
}

/* The "please verify" nudge — light red, so it reads as something to do without shouting. */
.lz-profile__email-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(192, 40, 45, 0.20);
    border-radius: var(--lz-r-sm);
    background-color: rgba(229, 72, 77, 0.08);
    color: var(--lz-red-600);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.45;
}

.lz-profile__email-note[hidden] { display: none; }
.lz-profile__email-note .lz-icon { width: 15px; height: 15px; flex: none; }

.lz-profile__email-status {
    margin-top: 8px;
    color: var(--lz-band-success-text);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.5;
}

.lz-profile__email-status[hidden] { display: none; }
.lz-profile__email-status.is-error { color: var(--lz-red-600); }

.lz-profile__email-status a {
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
}

/* --- Combobox: searchable dropdown --------------------------------------- */

/* The panel anchors to the field (not the card) and matches its width. */
.lz-profile__field--combo { position: relative; }

.lz-profile__control-clear {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: none;
    border: 0;
    border-radius: 50%;
    background-color: transparent;
    color: var(--lz-muted);
    cursor: pointer;
    transition: background-color 0.2s var(--lz-ease), color 0.2s var(--lz-ease);
}

.lz-profile__control-clear:hover {
    background-color: var(--lz-accent-soft);
    color: var(--lz-accent);
}

.lz-profile__control-clear .lz-icon { width: 14px; height: 14px; }

/* The panel and its rows are the shared hero-search primitive (.lz-popover / .lz-option).
   Every rule below is scoped to .lz-popover--profile so the hero dropdown is untouched. */
.lz-popover--profile {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    max-height: min(320px, 52vh);
    padding: 7px;
    border-color: rgba(11, 27, 51, 0.08);
    border-radius: var(--lz-r-lg);
    box-shadow: var(--lz-sh-4);
}

.lz-popover--profile .lz-option {
    gap: 11px;
    padding: 9px 11px;
    border-radius: var(--lz-r-sm);
}

.lz-popover--profile .lz-option:hover,
.lz-popover--profile .lz-option.is-active {
    background-color: var(--lz-accent-soft);
}

.lz-popover--profile .lz-option__ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

/* A society shows its cover image (or a monogram) in a circle — the wider radius here
   beats the shared square icon rule above, which is scoped at the same specificity. */
.lz-popover--profile .lz-option__ico--photo { border-radius: 50%; }

.lz-popover--profile .lz-option.is-chosen .lz-option__ico {
    border-color: rgba(109, 74, 255, 0.32);
    background-image: linear-gradient(150deg, var(--lz-accent-soft-2), var(--lz-accent-soft));
    color: var(--lz-accent-700);
}

/* The chosen value carries a tick. The keyboard highlight (aria-selected) is a different
   state, so it must NOT show the tick. */
.lz-popover--profile .lz-option__tick {
    opacity: 0;
    color: var(--lz-accent-700);
    transition: opacity 0.18s var(--lz-ease);
}

.lz-popover--profile .lz-option[aria-selected="true"] .lz-option__tick { opacity: 0; }
.lz-popover--profile .lz-option.is-chosen .lz-option__tick { opacity: 1; }
.lz-popover--profile .lz-option.is-chosen .lz-option__text { color: var(--lz-accent-700); }

/* The shared popover text colours are tuned for the hero's larger type; on these
   smaller rows they need the darker "quiet" tone to stay above 4.5:1. */
.lz-popover--profile .lz-popover__state { color: var(--lz-body); }

/* The row's second line (a sector · city for societies, a city for sectors) reads a step
   down from the name so the name stays the thing being scanned. */
.lz-popover--profile .lz-option__meta {
    color: var(--lz-body);
    font-size: 0.74rem;
    font-weight: 500;
}

.lz-profile__options { display: block; }

/* --- "Can't find your society?" escape hatch ------------------------------ */

/* A quiet inline action, deliberately smaller than the wizard's buttons so it
   never competes with "Continue". */
.lz-profile__notfound {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-top: 10px;
    color: var(--lz-body);
    font-size: 0.84rem;
    line-height: 1.5;
}

.lz-profile__notfound-text { color: var(--lz-body); }

.lz-profile__notfound-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 9px;
    border: 1px solid transparent;
    border-radius: var(--lz-r-pill);
    background-color: var(--lz-accent-soft);
    color: var(--lz-accent-600);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background-color 0.24s var(--lz-ease), border-color 0.24s var(--lz-ease),
        color 0.24s var(--lz-ease), box-shadow 0.24s var(--lz-ease),
        transform 0.24s var(--lz-ease-out);
}

.lz-profile__notfound-btn .lz-icon {
    width: 15px;
    height: 15px;
    transition: transform 0.24s var(--lz-ease-out);
}

.lz-profile__notfound-btn:hover {
    background-color: var(--lz-accent-soft-2);
    border-color: rgba(109, 74, 255, 0.28);
    box-shadow: 0 8px 18px -14px rgba(109, 74, 255, 0.9);
    transform: translateY(-1px);
}

.lz-profile__notfound-btn:hover .lz-icon { transform: rotate(90deg); }

.lz-profile__notfound-btn:active { transform: translateY(0) scale(0.97); }

/* ==========================================================================
   7. Avatar
   ========================================================================== */

.lz-profile__avatar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px dashed rgba(109, 74, 255, 0.24);
    border-radius: var(--lz-r-lg);
    background-color: #FBF9FF;
}

.lz-profile__avatar-preview {
    position: relative;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    flex: none;
    overflow: hidden;
    border-radius: 50%;
    background-image: linear-gradient(150deg, #8A6BFF, #5A37F0);
    color: #fff;
    box-shadow: 0 14px 26px -16px rgba(109, 74, 255, 0.95);
}

.lz-profile__avatar-initials {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.lz-profile__avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lz-profile__avatar-body { min-width: 0; }

.lz-profile__avatar-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--lz-navy);
    font-size: 0.88rem;
    font-weight: 700;
}

/* The crop's "Photo saved" confirmation — a quiet green chip, shown then hidden. */
.lz-profile__avatar-status {
    display: inline-flex;
    align-items: center;
    margin-top: 9px;
    padding: 5px 11px;
    border-radius: 999px;
    background-color: var(--lz-green-soft);
    color: var(--lz-green);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.45;
}

.lz-profile__avatar-hint {
    margin-top: 3px;
    color: var(--lz-body);
    font-size: 0.78rem;
    line-height: 1.5;
}

.lz-profile__avatar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.lz-profile__avatar-btn,
.lz-profile__avatar-remove {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border: 1px solid rgba(109, 74, 255, 0.24);
    border-radius: var(--lz-r-pill);
    background-color: var(--lz-surface);
    color: var(--lz-accent-700);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.24s var(--lz-ease), border-color 0.24s var(--lz-ease),
        transform 0.24s var(--lz-ease-out);
}

.lz-profile__avatar-btn { position: relative; }
.lz-profile__avatar-btn:hover,
.lz-profile__avatar-remove:hover { background-color: var(--lz-accent-soft); }
.lz-profile__avatar-btn:hover { transform: translateY(-1px); }

.lz-profile__avatar-btn .lz-icon,
.lz-profile__avatar-remove .lz-icon { width: 15px; height: 15px; }

.lz-profile__avatar-remove {
    border-color: var(--lz-line-2);
    color: var(--lz-body);
}

.lz-profile__avatar-remove .lz-icon { width: 13px; height: 13px; }

/* ==========================================================================
   8. Resident-type cards
   ========================================================================== */

.lz-profile__group { margin: 24px 0 0; padding: 0; border: 0; }

.lz-profile__typecards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.lz-profile__typecard {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 15px;
    border: 1px solid var(--lz-line-2);
    border-radius: var(--lz-r-md);
    background-color: var(--lz-surface);
    cursor: pointer;
    transition: border-color 0.24s var(--lz-ease), background-color 0.24s var(--lz-ease),
        box-shadow 0.24s var(--lz-ease), transform 0.24s var(--lz-ease-out);
}

.lz-profile__typecard:hover {
    border-color: rgba(109, 74, 255, 0.34);
    box-shadow: var(--lz-sh-2);
    transform: translateY(-2px);
}

.lz-profile__typecard:focus-within {
    outline: 3px solid var(--lz-accent-ring);
    outline-offset: 2px;
}

.lz-profile__typecard:has(.lz-profile__typecard-input:checked),
.lz-profile__typecard.is-selected {
    border-color: var(--lz-accent);
    background-image: linear-gradient(180deg, #FBFAFF 0%, #F5F1FF 100%);
    box-shadow: 0 16px 32px -22px rgba(109, 74, 255, 0.9);
}

.lz-profile__typecard-ico {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 11px;
    background-color: var(--lz-accent-soft);
    color: var(--lz-accent);
    transition: background-color 0.24s var(--lz-ease), color 0.24s var(--lz-ease);
}

.lz-profile__typecard-ico .lz-icon { width: 17px; height: 17px; }

.lz-profile__typecard:has(.lz-profile__typecard-input:checked) .lz-profile__typecard-ico,
.lz-profile__typecard.is-selected .lz-profile__typecard-ico {
    background-color: var(--lz-accent);
    color: #fff;
}

.lz-profile__typecard-body { display: grid; gap: 2px; }

.lz-profile__typecard-label {
    color: var(--lz-navy);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: -0.015em;
}

.lz-profile__typecard-text {
    color: var(--lz-body);
    font-size: 0.77rem;
    line-height: 1.45;
}

.lz-profile__typecard-tick {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--lz-accent);
    color: #fff;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.24s var(--lz-ease), transform 0.28s var(--lz-ease-out);
}

.lz-profile__typecard-tick .lz-icon { width: 12px; height: 12px; }

.lz-profile__typecard:has(.lz-profile__typecard-input:checked) .lz-profile__typecard-tick,
.lz-profile__typecard.is-selected .lz-profile__typecard-tick {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   9. Choice chips
   ========================================================================== */

.lz-profile__choice { margin-top: 22px; }

.lz-profile__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 10px;
}

.lz-profile__chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid var(--lz-line-2);
    border-radius: var(--lz-r-pill);
    background-color: var(--lz-surface);
    color: var(--lz-navy);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.22s var(--lz-ease), background-color 0.22s var(--lz-ease),
        color 0.22s var(--lz-ease), transform 0.22s var(--lz-ease-out);
}

.lz-profile__chip:hover {
    border-color: rgba(109, 74, 255, 0.34);
    transform: translateY(-1px);
}

.lz-profile__chip:focus-within {
    outline: 3px solid var(--lz-accent-ring);
    outline-offset: 2px;
}

.lz-profile__chip:has(input:checked),
.lz-profile__chip.is-selected {
    border-color: var(--lz-accent);
    background-color: var(--lz-accent-soft);
    color: var(--lz-accent-700);
}

.lz-profile__chip-ico { display: grid; place-items: center; }
.lz-profile__chip-ico .lz-icon { width: 15px; height: 15px; }

.lz-profile__chip-tick {
    display: grid;
    place-items: center;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.22s var(--lz-ease), transform 0.26s var(--lz-ease-out);
}

.lz-profile__chip-tick .lz-icon { width: 13px; height: 13px; }

.lz-profile__chip:has(input:checked) .lz-profile__chip-tick,
.lz-profile__chip.is-selected .lz-profile__chip-tick {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   10. Optional details (collapsible)
   ========================================================================== */

.lz-profile__optional {
    margin-top: 24px;
    overflow: hidden;
    border: 1px solid var(--lz-line);
    border-radius: var(--lz-r-lg);
    background-color: var(--lz-bg-2);
}

.lz-profile__optional-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 15px 16px;
    border: 0;
    background-color: transparent;
    cursor: pointer;
    text-align: left;
}

.lz-profile__optional-ico {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 10px;
    background-color: var(--lz-accent-soft);
    color: var(--lz-accent);
}

.lz-profile__optional-ico .lz-icon { width: 16px; height: 16px; }

.lz-profile__optional-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--lz-navy);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.lz-profile__optional-hint {
    color: var(--lz-accent-700);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.lz-profile__optional-chev {
    color: var(--lz-body);
    transition: transform 0.26s var(--lz-ease-out), color 0.26s var(--lz-ease);
}

.lz-profile__optional.is-open .lz-profile__optional-chev {
    color: var(--lz-accent);
    transform: rotate(180deg);
}

.lz-profile__optional.is-open .lz-profile__optional-hint { display: none; }

.lz-profile__optional-body {
    padding: 2px 16px 16px;
    animation: lzProfileStep 0.32s var(--lz-ease-out) both;
}

.lz-profile__optional-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.lz-profile__optional-span { grid-column: 1 / -1; }

.lz-profile__optional-body .lz-profile__field { margin-top: 12px; }

.lz-profile__skip {
    margin-top: 14px;
    padding: 8px 14px;
    border: 1px solid var(--lz-line-2);
    border-radius: var(--lz-r-pill);
    background-color: var(--lz-surface);
    color: var(--lz-body);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.22s var(--lz-ease), color 0.22s var(--lz-ease);
}

.lz-profile__skip:hover { border-color: rgba(109, 74, 255, 0.34); color: var(--lz-accent-700); }

/* ==========================================================================
   11. Actions
   ========================================================================== */

.lz-profile__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.lz-profile__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 54px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: var(--lz-r-md);
    font-size: 0.97rem;
    font-weight: 700;
    letter-spacing: -0.012em;
    text-align: center;
    cursor: pointer;
    transition: transform 0.26s var(--lz-ease-out), box-shadow 0.26s var(--lz-ease),
        background-color 0.26s var(--lz-ease), border-color 0.26s var(--lz-ease),
        color 0.26s var(--lz-ease), opacity 0.26s var(--lz-ease);
}

.lz-profile__btn--primary {
    background-image: linear-gradient(180deg, var(--lz-accent) 0%, var(--lz-accent-600) 100%);
    color: #fff;
    box-shadow: 0 14px 26px -18px rgba(109, 74, 255, 0.95);
}

.lz-profile__btn--primary:hover:not([disabled]) {
    transform: translateY(-2px);
    box-shadow: var(--lz-sh-accent);
}

.lz-profile__btn--primary[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.lz-profile__btn--ghost {
    background-color: var(--lz-surface);
    border-color: var(--lz-line-2);
    color: var(--lz-navy);
}

.lz-profile__btn--ghost:hover { border-color: rgba(109, 74, 255, 0.34); }

.lz-profile__btn--grow { flex: 1 1 auto; min-width: 0; }
.lz-profile__btn--lg { min-height: 56px; padding: 0 28px; margin-top: 22px; }

.lz-profile__btn-ico {
    width: 17px;
    height: 17px;
    transition: transform 0.26s var(--lz-ease-out);
}

.lz-profile__btn:hover:not([disabled]) .lz-profile__btn-ico { transform: translateX(3px); }

.lz-profile__btn-ico--back { transform: scaleX(-1); }
.lz-profile__btn:hover:not([disabled]) .lz-profile__btn-ico--back { transform: scaleX(-1) translateX(3px); }

.lz-profile__btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    flex: none;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lzSpin 0.7s linear infinite;
}

.lz-profile__btn.is-busy { cursor: progress; }
.lz-profile__btn.is-busy .lz-profile__btn-spinner { display: block; }
.lz-profile__btn.is-busy .lz-profile__btn-ico { display: none; }

/* ==========================================================================
   12. Privacy line
   ========================================================================== */

.lz-profile__privacy {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--lz-line);
    color: var(--lz-body);
    font-size: 0.79rem;
    line-height: 1.5;
}

.lz-profile__privacy-ico {
    display: grid;
    place-items: center;
    flex: none;
    color: var(--lz-green);
}

.lz-profile__privacy-ico .lz-icon { width: 16px; height: 16px; }

.lz-profile__privacy a {
    color: var(--lz-accent-700);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ==========================================================================
   13. Success state
   ========================================================================== */

.lz-profile__success {
    padding: clamp(24px, 4vw, 40px) 6px 8px;
    text-align: center;
    animation: lzProfileStep 0.45s var(--lz-ease-out) both;
}

.lz-profile__success-tick {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background-color: var(--lz-green-soft);
    color: var(--lz-green);
    animation: lzProfilePop 0.55s var(--lz-ease-out) both;
}

.lz-profile__success-tick .lz-icon { width: 40px; height: 40px; }

@keyframes lzProfilePop {
    0% { opacity: 0; transform: scale(0.6); }
    60% { transform: scale(1.06); }
    100% { opacity: 1; transform: scale(1); }
}

.lz-profile__success-title {
    font-size: clamp(1.35rem, 1.2rem + 0.8vw, 1.7rem);
    letter-spacing: -0.03em;
    line-height: 1.2;
    text-wrap: balance;
}

.lz-profile__success-text {
    max-width: 42ch;
    margin: 10px auto 0;
    color: var(--lz-body);
    font-size: 0.94rem;
    line-height: 1.6;
}

/* ==========================================================================
   14. Dialogs — Add a Society + photo crop
   ========================================================================== */

.lz-profile__dialog {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lz-profile__dialog-scrim {
    position: absolute;
    inset: 0;
    background-color: rgba(11, 27, 51, 0.42);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: lzProfileFade 0.28s var(--lz-ease) both;
}

@keyframes lzProfileFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lz-profile__dialog-card {
    position: relative;
    width: min(500px, 100%);
    max-height: min(92dvh, 780px);
    padding: clamp(20px, 4vw, 28px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--lz-line);
    border-radius: var(--lz-r-xl);
    background-color: var(--lz-surface);
    box-shadow: 0 44px 90px -40px rgba(11, 27, 51, 0.5);
    animation: lzProfileDialogIn 0.34s var(--lz-ease-out) both;
}

@keyframes lzProfileDialogIn {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to { opacity: 1; transform: none; }
}

.lz-profile__dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.lz-profile__dialog-title {
    font-size: 1.2rem;
    letter-spacing: -0.028em;
}

.lz-profile__dialog-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: none;
    border: 1px solid var(--lz-line);
    border-radius: var(--lz-r-sm);
    background-color: var(--lz-surface);
    color: var(--lz-navy);
    cursor: pointer;
    transition: border-color 0.22s var(--lz-ease), color 0.22s var(--lz-ease),
        background-color 0.22s var(--lz-ease);
}

.lz-profile__dialog-close:hover {
    border-color: rgba(109, 74, 255, 0.3);
    background-color: #FBFAFF;
    color: var(--lz-accent);
}

.lz-profile__dialog-close .lz-icon { width: 16px; height: 16px; }

.lz-profile__dialog-text {
    margin-top: 8px;
    color: var(--lz-body);
    font-size: 0.88rem;
    line-height: 1.55;
}

.lz-profile__dialog-form { margin-top: 4px; }

.lz-profile__dialog-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 13px;
    border: 1px solid rgba(109, 74, 255, 0.16);
    border-radius: var(--lz-r-sm);
    background-color: var(--lz-accent-soft);
    color: var(--lz-navy-2);
    font-size: 0.79rem;
    line-height: 1.5;
}

.lz-profile__dialog-note .lz-icon {
    width: 15px;
    height: 15px;
    flex: none;
    margin-top: 2px;
    color: var(--lz-accent);
}

.lz-profile__dialog-status {
    margin-top: 14px;
    padding: 11px 14px;
    border: 1px solid rgba(18, 161, 80, 0.24);
    border-radius: var(--lz-r-sm);
    background-color: var(--lz-green-soft);
    color: var(--lz-green);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.5;
}

.lz-profile__dialog-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.lz-profile__dialog-actions .lz-profile__btn--primary { flex: 1 1 auto; min-width: 0; }

/* --- Photo crop dialog — an immersive, app-style sheet -------------------- */

.lz-profile__crop .lz-profile__dialog-scrim {
    background-color: rgba(6, 10, 20, 0.74);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

.lz-profile__dialog-card.lz-profile__crop-card {
    width: min(420px, 100%);
    padding: clamp(18px, 4vw, 26px);
    border-color: rgba(255, 255, 255, 0.12);
    border-radius: 26px;
    background-color: var(--lz-navy);
    background-image: radial-gradient(130% 90% at 50% 0%, rgba(109, 74, 255, 0.34) 0%, rgba(109, 74, 255, 0) 62%);
    color: #FFFFFF;
    box-shadow: 0 50px 100px -42px rgba(0, 0, 0, 0.85);
    animation: lzCropIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes lzCropIn {
    from { opacity: 0; transform: translateY(26px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

.lz-crop__title {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.lz-crop__badge {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 13px;
    background-image: linear-gradient(140deg, var(--lz-accent), rgba(109, 74, 255, 0.55));
    color: #FFFFFF;
    box-shadow: 0 12px 24px -14px rgba(109, 74, 255, 0.95);
}

.lz-crop__badge .lz-icon { width: 19px; height: 19px; }

.lz-profile__crop-card .lz-profile__dialog-title { color: #FFFFFF; }

.lz-profile__crop-card .lz-profile__dialog-text { color: rgba(255, 255, 255, 0.82); }

.lz-profile__crop-card .lz-profile__dialog-close {
    border-color: rgba(255, 255, 255, 0.16);
    background-color: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
}

.lz-profile__crop-card .lz-profile__dialog-close:hover {
    border-color: rgba(255, 255, 255, 0.32);
    background-color: rgba(255, 255, 255, 0.14);
    color: #FFFFFF;
}

/* The frame is a 250×250 circular window onto the photo — exactly the crop the avatar
   displays and the square the JS paints. It shrinks only on a short viewport (a landscape
   phone), where the saved photo is still 250×250. The checkerboard reads behind a
   transparent PNG. */
.lz-crop__stage {
    position: relative;
    width: 100%;
    max-width: min(250px, 52dvh);
    margin: 18px auto 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.35);
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 18px 18px;
    background-position: 0 0, 9px 9px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 26px 54px -24px rgba(0, 0, 0, 0.95);
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.lz-crop__stage:active { cursor: grabbing; }

.lz-crop__stage:focus-visible {
    outline: 3px solid var(--lz-accent-ring);
    outline-offset: 4px;
}

/* base.css resets every `img` to `max-width: 100%` — that would cap the photo at the
   stage width and leave the circle half empty (and squash the bitmap), so opt out. */
.lz-crop__img {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    max-height: none;
    transform-origin: 0 0;
    pointer-events: none;
    -webkit-user-drag: none;
    will-change: transform;
}

/* Rule-of-thirds guide plus the bright rim, so the framing reads at a glance. */
.lz-crop__frame {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
    pointer-events: none;
}

.lz-crop__frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.5) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    background-size: 33.334% 33.334%;
    background-position: -1px -1px;
}

.lz-crop__zoom {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 7px 15px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.06);
}

.lz-crop__zoom-ico {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: none;
    color: rgba(255, 255, 255, 0.7);
}

.lz-crop__zoom-ico .lz-icon { width: 15px; height: 15px; }

.lz-crop__range {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    min-width: 0;
    height: 22px;
    margin: 0;
    background-color: transparent;
    cursor: pointer;
}

.lz-crop__range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.24);
}

.lz-crop__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -7px;
    border: 0;
    border-radius: 50%;
    background-color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.lz-crop__range::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.24);
}

.lz-crop__range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background-color: #FFFFFF;
}

.lz-crop__range:focus-visible {
    outline: 3px solid var(--lz-accent-ring);
    outline-offset: 4px;
}

.lz-profile__crop-card .lz-profile__dialog-actions { margin-top: 22px; }

.lz-profile__crop-card .lz-profile__btn--ghost {
    border-color: rgba(255, 255, 255, 0.18);
    background-color: transparent;
    color: #FFFFFF;
}

.lz-profile__crop-card .lz-profile__btn--ghost:hover {
    border-color: rgba(255, 255, 255, 0.36);
    background-color: rgba(255, 255, 255, 0.08);
}

/* A photo that could not be decoded: the frame and zoom are hidden, only the error shows. */
.lz-profile__crop-card.is-error .lz-crop__stage,
.lz-profile__crop-card.is-error .lz-crop__zoom { display: none; }

/* A light red on the dark sheet — the light-surface red tokens would be unreadable here. */
.lz-profile__crop-error {
    margin-top: 16px;
    padding: 11px 14px;
    border: 1px solid rgba(255, 138, 138, 0.34);
    border-radius: var(--lz-r-sm);
    background-color: rgba(214, 45, 45, 0.16);
    color: #FFD7D7;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.5;
}

/* ==========================================================================
   15. Sample note
   ========================================================================== */

.lz-profile__note {
    width: 100%;
    max-width: var(--lz-container);
    margin: clamp(28px, 4vw, 46px) auto 0;
    padding-inline: var(--lz-gutter);
    color: var(--lz-body);
    font-size: 0.78rem;
    line-height: 1.55;
    text-align: center;
}

/* ==========================================================================
   16. Reveal on scroll (scoped copy)
   ========================================================================== */

.has-js .lz-profile [data-lz-inview] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--lz-ease-out) var(--lz-delay, 0ms),
        transform 0.85s var(--lz-ease-out) var(--lz-delay, 0ms);
    will-change: opacity, transform;
}

.has-js .lz-profile [data-lz-inview].is-in {
    opacity: 1;
    transform: none;
    will-change: auto;
}

/* ==========================================================================
   17. Focus states
   ========================================================================== */

.lz-profile__btn:focus-visible,
.lz-profile__avatar-btn:focus-visible,
.lz-profile__avatar-remove:focus-visible,
.lz-profile__chip:focus-visible,
.lz-profile__check-btn:focus-visible,
.lz-profile__notfound-btn:focus-visible,
.lz-profile__optional-toggle:focus-visible,
.lz-profile__skip:focus-visible,
.lz-profile__dialog-close:focus-visible {
    outline: 3px solid var(--lz-accent-ring);
    outline-offset: 3px;
}

/* ==========================================================================
   18. Responsive
   ========================================================================== */

/* The crop dialog becomes a bottom sheet on a phone — the shape a photo editor takes
   there — so the frame and its controls sit within thumb reach. */
@media (max-width: 560px) {
    .lz-profile__crop {
        align-items: flex-end;
        padding: 0;
    }

    .lz-profile__dialog-card.lz-profile__crop-card {
        width: 100%;
        max-height: 92dvh;
        border-radius: 26px 26px 0 0;
    }
}

/* Tablet — the map becomes a banner above the card. */
@media (min-width: 768px) {
    /* `width: 100%` matters: with only `margin-inline: auto` the item stops stretching
       and shrink-to-fits — which collapses to nothing now that the column holds a map
       with no intrinsic width instead of an image. */
    .lz-profile__aside {
        width: 100%;
        max-width: 720px;
        margin-inline: auto;
    }

    .lz-map { height: 320px; }
}

/* Desktop — two columns, the map sticky beside the wizard. It stays the taller,
   heavier side rather than being squeezed to fit the form. */
@media (min-width: 1080px) {
    .lz-profile__inner {
        grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
    }

    .lz-profile__aside {
        max-width: none;
        margin-inline: 0;
        position: sticky;
        top: calc(var(--lz-header-h) + 28px);
    }

    .lz-map { height: min(58vh, 520px); }

    .lz-profile__card { margin-inline: 0; }
}

@media (max-width: 560px) {
    .lz-profile__card {
        padding: 20px 16px;
        border-radius: var(--lz-r-lg);
    }

    .lz-profile__progress {
        flex-direction: column;
        align-items: flex-start;
    }

    .lz-profile__ring { align-self: center; }

    /* The prompt's action takes the full width under its copy. */
    .lz-profile__review-btn {
        width: 100%;
        justify-content: center;
    }

    /* Two compact columns keep the completion band from pushing the form off the
       screen; labels wrap instead of truncating. */
    .lz-profile__checklist { gap: 1px 12px; }

    .lz-profile__check-btn { font-size: 0.78rem; }

    .lz-profile__check-label { white-space: normal; }

    .lz-profile__typecards { grid-template-columns: minmax(0, 1fr); }

    .lz-profile__optional-grid { grid-template-columns: minmax(0, 1fr); }

    .lz-profile__avatar {
        flex-direction: column;
        align-items: flex-start;
    }

    .lz-profile__actions { flex-wrap: wrap; }
    .lz-profile__btn { width: 100%; }
    .lz-profile__dialog-actions { flex-direction: column-reverse; }
    .lz-profile__dialog-actions .lz-profile__btn { width: 100%; }
}

/* ==========================================================================
   19. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .has-js .lz-profile [data-lz-inview] {
        opacity: 1;
        transform: none;
    }

    .lz-profile__glow,
    .lz-profile__insight,
    .lz-profile__panel,
    .lz-profile__optional-body,
    .lz-profile__success,
    .lz-profile__success-tick,
    .lz-profile__dialog-card,
    .lz-profile__dialog-scrim,
    .lz-profile__crop-card,
    .lz-profile__notice-ico::after,
    .lz-profile__ring::before,
    .lz-map__pin,
    .lz-profile__btn-spinner {
        animation: none;
    }

    .lz-profile__ring-arc,
    .lz-profile__step-fill,
    .lz-profile__btn,
    .lz-profile__btn-ico,
    .lz-profile__notfound-btn,
    .lz-profile__notfound-btn .lz-icon,
    .lz-profile__card,
    .lz-profile__chip,
    .lz-profile__control-clear,
    .lz-profile__verify,
    .lz-popover--profile .lz-option__tick { transition: none; }
}
