/* Full-screen stories wizard — «Для специалистов» */
.lg-join-wizard {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    flex-direction: column;
    background: #0a1628;
    color: #fff;
    overflow: hidden;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.lg-join-wizard.is-section-drag {
    transition: none !important;
    will-change: transform;
}

.lg-join-wizard.is-section-anim {
    transition: transform .34s cubic-bezier(.22, 1, .36, 1) !important;
    will-change: transform;
    pointer-events: none;
}

.lg-join-wizard.is-section-peek {
    z-index: 10059;
    pointer-events: none;
}

.lg-join-wizard.is-section-leaving {
    z-index: 10061;
    pointer-events: none;
}

.lg-join-wizard.is-section-drag:not(.is-section-peek) {
    z-index: 10061;
}

.lg-join-wizard ::selection {
    background: transparent;
    color: inherit;
}

.lg-join-wizard ::-moz-selection {
    background: transparent;
    color: inherit;
}

.lg-join-wizard[hidden] {
    display: none !important;
}

.lg-join-wizard__chrome {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4;
    padding: max(10px, env(safe-area-inset-top)) 14px 8px;
    pointer-events: none;
}

.lg-join-wizard__chrome .lg-join-wizard__share,
.lg-join-wizard__chrome .lg-join-wizard__close {
    pointer-events: auto;
}

.lg-join-wizard__progress {
    display: grid;
    grid-template-columns: repeat(var(--jw-steps, 5), 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.lg-join-wizard__seg {
    display: block;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    overflow: hidden;
}

.lg-join-wizard__seg-fill {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: #fff;
    transition: width .28s ease;
}

.lg-join-wizard__seg.is-done .lg-join-wizard__seg-fill {
    width: 100%;
}

.lg-join-wizard__seg.is-active .lg-join-wizard__seg-fill {
    width: 100%;
    animation: lgJwSegPulse 6s linear forwards;
}

@keyframes lgJwSegPulse {
    from { width: 0%; }
    to { width: 100%; }
}

.lg-join-wizard__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
}

.lg-join-wizard__publisher {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.lg-join-wizard__publisher-ring {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.lg-join-wizard__publisher-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(6, 16, 24, .92);
    border: 2px solid rgba(6, 16, 24, .92);
    font-size: 14px;
    color: #fff;
}

.lg-join-wizard__publisher-name {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.lg-join-wizard__toolbar-end {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.lg-join-wizard__counter {
    display: none;
}

.lg-join-wizard__share,
.lg-join-wizard__close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}

.lg-join-wizard__share:active,
.lg-join-wizard__close:active {
    transform: scale(.94);
    background: rgba(255, 255, 255, .22);
}

.lg-join-wizard__counter {
    margin: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .82;
}

.lg-join-wizard__viewport {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    touch-action: pan-y;
}

.lg-join-wizard__track {
    display: flex;
    height: 100%;
    will-change: transform;
    transition: transform .38s cubic-bezier(.32, .72, 0, 1);
}

.lg-join-wizard__slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    background:
        radial-gradient(ellipse 120% 80% at 50% -10%, rgba(255, 255, 255, .18), transparent 55%),
        linear-gradient(165deg, var(--jw-c1, #059669) 0%, var(--jw-c2, #0f2d52) 62%, #061018 100%);
}

.lg-join-wizard__slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    background:
        radial-gradient(ellipse 120% 80% at 50% -10%, rgba(255, 255, 255, .18), transparent 55%),
        linear-gradient(165deg, var(--jw-c1, #059669) 0%, var(--jw-c2, #0f2d52) 62%, #061018 100%);
}

.lg-join-wizard__slide--emerald { --jw-c1: #10b981; --jw-c2: #0f2d52; }
.lg-join-wizard__slide--ocean { --jw-c1: #0ea5e9; --jw-c2: #1e3a8a; }
.lg-join-wizard__slide--violet { --jw-c1: #8b5cf6; --jw-c2: #312e81; }
.lg-join-wizard__slide--sunset { --jw-c1: #f59e0b; --jw-c2: #b45309; }
.lg-join-wizard__slide--mint { --jw-c1: #34d399; --jw-c2: #047857; }

.lg-join-wizard__slide-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 18px;
    box-sizing: border-box;
    height: 100%;
    min-height: 100%;
    /* Chrome overlays the top; keep copy clear of progress + toolbar */
    padding:
        max(96px, calc(env(safe-area-inset-top) + 76px))
        22px
        max(24px, env(safe-area-inset-bottom));
}

.lg-join-wizard__visual {
    position: absolute;
    left: 50%;
    top: max(calc(env(safe-area-inset-top) + 88px), 12vh);
    width: min(68vw, 300px);
    height: min(68vw, 300px);
    transform: translateX(-50%);
    pointer-events: none;
}

.lg-join-wizard__lottie {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .28));
    animation: lgJwFloat 4.8s ease-in-out infinite;
}

.lg-join-wizard__lottie svg {
    width: 100% !important;
    height: 100% !important;
}

.lg-join-wizard__glow {
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .28) 0%, transparent 68%);
    animation: lgJwGlow 3.6s ease-in-out infinite alternate;
}

@keyframes lgJwFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes lgJwGlow {
    from { opacity: .45; transform: scale(.92); }
    to { opacity: .85; transform: scale(1.06); }
}

.lg-join-wizard__copy {
    position: relative;
    z-index: 2;
    max-width: 520px;
    animation: lgJwCopyIn .55s cubic-bezier(.22, 1, .36, 1) both;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.lg-join-wizard__slide:not(.is-active) .lg-join-wizard__copy {
    animation: none;
    opacity: .72;
}

.lg-join-wizard__slide.is-active .lg-join-wizard__copy {
    animation: lgJwCopyIn .55s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes lgJwCopyIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Тонкая обводка цветом фона — читаемость поверх Lottie */
.lg-join-wizard__kicker,
.lg-join-wizard__title,
.lg-join-wizard__lead {
    -webkit-text-stroke: 1px rgba(6, 16, 24, .72);
    paint-order: stroke fill;
    text-shadow:
        0 0 1px rgba(6, 16, 24, .85),
        0 1px 0 rgba(6, 16, 24, .55),
        0 -1px 0 rgba(6, 16, 24, .35),
        1px 0 0 rgba(6, 16, 24, .35),
        -1px 0 0 rgba(6, 16, 24, .35);
}

.lg-join-wizard__kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .92;
    -webkit-text-stroke-width: .7px;
}

.lg-join-wizard__title {
    margin: 0 0 10px;
    font-family: var(--lg-font-brand, system-ui, sans-serif);
    font-size: clamp(28px, 7.2vw, 40px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -.03em;
    text-wrap: balance;
    -webkit-text-stroke-width: 1.15px;
}

.lg-join-wizard__lead {
    margin: 0 0 14px;
    font-size: clamp(15px, 3.8vw, 18px);
    line-height: 1.45;
    font-weight: 600;
    opacity: .96;
    text-wrap: pretty;
    -webkit-text-stroke-width: .75px;
}

.lg-join-wizard__perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.lg-join-wizard__perk {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.lg-join-wizard__perk-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
}

.lg-join-wizard__tap {
    position: absolute;
    top: 72px;
    bottom: 88px;
    z-index: 3;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.lg-join-wizard__tap:focus,
.lg-join-wizard__tap:focus-visible,
.lg-join-wizard__tap:active {
    outline: none;
    background: transparent;
    box-shadow: none;
}

.lg-join-wizard__tap--prev {
    left: 0;
    width: 32%;
}

.lg-join-wizard__tap--next {
    right: 0;
    width: 68%;
}

.lg-join-wizard__foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: grid;
    gap: 10px;
    padding: 0 18px max(16px, env(safe-area-inset-bottom));
    pointer-events: none;
}

.lg-join-wizard__foot > * {
    pointer-events: auto;
}

/* Last slide with CTAs: lift copy above footer buttons */
.lg-join-wizard:has(.lg-join-wizard__foot:not([hidden])) .lg-join-wizard__slide-inner {
    padding-bottom: max(140px, calc(env(safe-area-inset-bottom) + 120px));
}

.lg-join-wizard__foot[hidden] {
    display: none !important;
}

.lg-join-wizard__cta {
    width: 100%;
    justify-content: center;
    min-height: 50px;
    font-size: 15px;
    font-weight: 800;
    border-radius: 14px;
    font-family: inherit;
}

.lg-join-wizard__cta--wa {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .22);
    color: #fff;
}

.lg-join-wizard__login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    border-radius: 8px;
    transition: color .15s, opacity .15s;
    -webkit-tap-highlight-color: transparent;
}

.lg-join-wizard__login-link:hover {
    color: #fff;
}

.lg-join-wizard__login-link strong {
    color: #34d399;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lg-join-wizard__toast {
    position: absolute;
    left: 50%;
    bottom: max(96px, calc(env(safe-area-inset-bottom) + 80px));
    transform: translateX(-50%);
    z-index: 6;
    margin: 0;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(6, 16, 24, .88);
    border: 1px solid rgba(255, 255, 255, .14);
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
    animation: lgJwToast .28s ease both;
}

.lg-join-wizard__toast[hidden] {
    display: none !important;
}

@keyframes lgJwToast {
    from { opacity: 0; transform: translate(-50%, 8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

body.lg-join-wizard-open {
    overflow: hidden;
}

body.lg-join-wizard-open .lg-app-dock {
    transform: translateY(110%);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .lg-join-wizard.is-section-anim,
    .lg-join-wizard__track,
    .lg-join-wizard__seg-fill,
    .lg-join-wizard__lottie,
    .lg-join-wizard__glow,
    .lg-join-wizard__copy {
        animation: none !important;
        transition: none !important;
    }
}

@media (min-width: 768px) {
    .lg-join-wizard__visual {
        top: max(calc(env(safe-area-inset-top) + 104px), 12vh);
        width: min(52vw, 340px);
        height: min(52vw, 340px);
    }

    .lg-join-wizard__slide-inner {
        max-width: 560px;
        margin: 0 auto;
        width: 100%;
    }

    .lg-join-wizard__foot {
        max-width: 560px;
        margin: 0 auto;
        width: 100%;
    }
}
