:root {
    --accent: #ff2f8f;
    --button-color: #ff2f8f;
    --button-text: #ffffff;
    --text: #111111;
    --muted: #6f6f78;
    --page-bg: #fafafa;
    --content-width: 343px;
    --top-band-height: 160px;
    --avatar-size: 200px;
    --avatar-margin-top: -100px;
    --avatar-border-width: 6px;
    --avatar-object-position: center center;
    --avatar-scale: 1;
    --avatar-translate-x: 0%;
    --avatar-translate-y: 0%;
    --hero-height: min(100vw, 58vh);
    --hero-object-position: center 30%;
    --button-font-size: 18px;
    --button-border-color: #20252b;
    --button-icon-size: 42px;
    --card-radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page-bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--page-bg);
}

body:not(.is-ready) .page-shell {
    visibility: hidden;
}

body.has-warning-modal {
    overflow: hidden;
}

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

.page-shell {
    min-height: 100vh;
    background: var(--page-bg);
}

.profile-card {
    min-height: 100vh;
    width: 100%;
    background: var(--page-bg);
    overflow: hidden;
}

.top-band {
    height: var(--top-band-height);
    background: var(--accent);
}

.profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100% - 32px, var(--content-width));
    margin: 0 auto;
    padding: 0 0 calc(28px + env(safe-area-inset-bottom));
    text-align: center;
}

.avatar-frame {
    width: var(--avatar-size);
    height: var(--avatar-size);
    margin-top: var(--avatar-margin-top);
    border: var(--avatar-border-width) solid #ffffff;
    border-radius: 50%;
    background: #f6f6f7;
    box-shadow: 0 12px 28px rgb(0 0 0 / 0.16);
    overflow: hidden;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--avatar-object-position);
    transform: translate(var(--avatar-translate-x), var(--avatar-translate-y)) scale(var(--avatar-scale));
    transform-origin: var(--avatar-object-position);
}

.hero-frame {
    position: relative;
    display: none;
    width: 100%;
    height: var(--hero-height);
    background: #131315;
}

.hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--hero-object-position);
}

.hero-frame::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 20%;
    background: linear-gradient(180deg, var(--page-bg) 0%, rgb(0 0 0 / 0) 100%);
    pointer-events: none;
}

.hero-frame::after {
    content: "";
    position: absolute;
    inset: 52% 0 0;
    background: linear-gradient(180deg, rgb(0 0 0 / 0) 0%, var(--page-bg) 96%);
    pointer-events: none;
}

body.layout-hero .hero-frame {
    display: block;
}

body.layout-hero .top-band,
body.layout-hero .avatar-frame,
body.layout-hero .subtitle {
    display: none;
}

.profile-name {
    display: flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 22px 0 7px;
    font-size: 24px;
    line-height: 1.16;
    font-weight: 800;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

body.layout-hero .profile-name {
    position: relative;
    z-index: 1;
    margin: -96px 0 0;
    color: #ffffff;
    font-size: 30px;
    text-shadow: 0 2px 16px rgb(0 0 0 / 0.5);
}

.verified-badge {
    display: inline-grid;
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--button-color);
    color: #ffffff;
}

body.layout-hero .verified-badge {
    width: 20px;
    height: 20px;
}

.verified-badge svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.profile-handle {
    display: none;
    margin: 6px 0 0;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 600;
}

body.layout-hero .profile-handle {
    position: relative;
    z-index: 1;
    display: block;
    color: rgb(255 255 255 / 0.78);
    text-shadow: 0 1px 10px rgb(0 0 0 / 0.5);
}

.subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
}

.button-list {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 14px;
    margin-top: 26px;
}

body.layout-hero .button-list {
    gap: 12px;
    margin-top: 20px;
}

.main-button {
    display: flex;
    width: 100%;
    min-height: 78px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 18px 24px;
    border-radius: 999px;
    background: var(--button-color);
    color: var(--button-text);
    font-size: var(--button-font-size);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0;
    text-align: center;
    text-decoration: none;
    box-shadow: none;
    -webkit-touch-callout: default;
    user-select: none;
}

body.layout-hero .main-button {
    --button-font-size: 16px;
    --button-icon-size: 30px;
    min-height: 56px;
    gap: 12px;
    padding: 12px 20px;
}

body.is-landing-stage .main-button {
    border-radius: 16px;
}

body.layout-hero.is-landing-stage .main-button {
    --button-font-size: 18px;
    min-height: 78px;
    padding: 18px 24px;
}

body.is-content-stage .main-button {
    border-radius: 999px;
    border: 1px solid var(--button-border-color);
}

body.layout-hero.is-content-stage .main-button {
    border: 0;
}

.main-button.has-icon {
    justify-content: flex-start;
    padding-left: 32px;
    padding-right: 32px;
}

body.layout-hero .main-button.has-icon {
    padding-left: 24px;
    padding-right: 24px;
}

.button-icon {
    width: var(--button-icon-size);
    height: var(--button-icon-size);
    flex: 0 0 auto;
    object-fit: contain;
}

.button-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.main-button.is-pressed {
    transform: translateY(1px) scale(0.992);
}

.main-button:focus {
    outline: none;
}

.main-button:focus-visible {
    outline: 3px solid rgb(17 17 17 / 0.18);
    outline-offset: 4px;
}

body.layout-hero .main-button:focus-visible {
    outline-color: rgb(255 255 255 / 0.4);
}

.card-button {
    position: relative;
    display: block;
    width: 100%;
    min-height: 130px;
    aspect-ratio: 16 / 10;
    border-radius: var(--card-radius);
    background: #17181a;
    overflow: hidden;
    text-decoration: none;
    -webkit-touch-callout: default;
    user-select: none;
}

.card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--card-object-position, center);
}

.card-button::after {
    content: "";
    position: absolute;
    inset: 55% 0 0;
    background: linear-gradient(180deg, rgb(0 0 0 / 0) 0%, rgb(0 0 0 / 0.55) 100%);
    pointer-events: none;
}

.card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 1;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 12px;
    background: rgb(0 0 0 / 0.5);
}

.card-badge img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.card-caption {
    position: absolute;
    right: 16px;
    bottom: 16px;
    left: 16px;
    z-index: 1;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 1px 8px rgb(0 0 0 / 0.45);
    overflow-wrap: anywhere;
}

.card-button:active {
    transform: scale(0.99);
}

.card-button:focus {
    outline: none;
}

.card-button:focus-visible {
    outline: 3px solid rgb(255 255 255 / 0.4);
    outline-offset: 4px;
}

.hold-hint {
    display: none;
    margin: 18px 0 0;
    color: var(--button-color);
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0;
}

body.is-landing-stage .hold-hint {
    display: block;
}

[hidden] {
    display: none !important;
}

.tap-message {
    min-height: 42px;
    margin: 16px 0 0;
    color: #3f3f46;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 160ms ease,
    transform 160ms ease;
}

body.layout-hero .tap-message {
    color: rgb(255 255 255 / 0.78);
}

.tap-message.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.warning-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.warning-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(18 18 20 / 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.warning-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(100%, 400px);
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 30px 24px 26px;
    border-radius: 24px;
    background: rgb(246 246 248 / 0.92);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    color: #111111;
    text-align: center;
    box-shadow: 0 24px 60px rgb(0 0 0 / 0.35);
}

.warning-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #e3e3e5;
    object-fit: cover;
    object-position: var(--avatar-object-position);
}

.warning-dialog h2 {
    margin: 2px 0 0;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0;
}

.warning-divider {
    width: 92px;
    height: 2px;
    border-radius: 1px;
    background: #d6d6da;
}

.warning-dialog p {
    max-width: 300px;
    margin: 0;
    color: #5f6673;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 400;
}

.warning-continue {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 12px 24px;
    border-radius: 999px;
    background: #0b0b0c;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.1;
    font-weight: 600;
    text-decoration: none;
}

.warning-decline {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 0;
    border-radius: 999px;
    background: rgb(120 120 128 / 0.16);
    color: #23262b;
    font: inherit;
    font-size: 17px;
    line-height: 1.1;
    font-weight: 500;
    cursor: pointer;
}

.icon-row {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.icon-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.icon-tile {
    display: flex;
    width: 64px;
    height: 64px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: 16px;
    background: transparent;
    transition: transform 120ms ease, background-color 120ms ease;
}

body.layout-classic .icon-tile {
    border-color: rgb(17 17 17 / 0.12);
}

.icon-row.is-plain .icon-tile {
    border-color: transparent;
    background: transparent;
}

.icon-tile img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.icon-label {
    color: rgb(255 255 255 / 0.6);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 600;
}

body.layout-classic .icon-label {
    color: var(--muted);
}

.icon-button:active .icon-tile {
    transform: scale(0.94);
    background: rgb(255 255 255 / 0.08);
}

.icon-button:focus {
    outline: none;
}

.icon-button:focus-visible .icon-tile {
    outline: 3px solid rgb(255 255 255 / 0.4);
    outline-offset: 3px;
}

.icon-tile-badge {
    color: #ffffff;
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.icon-tile.has-text {
    display: flex;
    width: auto;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
}

.icon-tile-text {
    color: #ffffff;
    font-size: 15px;
    line-height: 1;
    font-weight: 700;
}

.icon-row.is-plain .icon-button:active .icon-tile {
    background: transparent;
}

/* ---------- Funnel hero style ---------- */

.badge-seal {
    display: none;
}

body.hero-funnel .hero-frame {
    height: clamp(200px, calc(100vh - 420px), min(105vw, 440px));
    height: clamp(200px, calc(100svh - 420px), min(105vw, 440px));
    background: var(--page-bg);
}

body.hero-funnel .hero-frame::before {
    height: 16%;
}

/* extends 2px below the frame so iOS subpixel rounding can't leave a light seam under the photo */
body.hero-funnel .hero-frame::after {
    inset: 58% 0 -2px;
    background: linear-gradient(180deg, rgb(0 0 0 / 0) 0%, var(--page-bg) 88%);
}

body.hero-funnel .profile-name {
    position: static;
    margin: 10px 0 0;
    font-size: 26px;
    text-shadow: none;
}

body.hero-funnel .profile-handle {
    display: none;
}

body.hero-funnel .verified-badge {
    width: 24px;
    height: 24px;
    background: transparent;
    color: var(--button-color);
}

body.hero-funnel .badge-check {
    display: none;
}

body.hero-funnel .badge-seal {
    display: block;
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.status-row {
    display: flex;
    max-width: 100%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    margin: 10px 0 0;
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
}

body.layout-classic .status-row {
    color: var(--text);
}

.status-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.status-item svg {
    width: 13px;
    height: 13px;
    opacity: 0.85;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    animation: status-dot-glow 1.45s ease-in-out infinite;
    transform-origin: center;
    will-change: box-shadow, opacity, transform;
}

@keyframes status-dot-glow {
    0%, 100% {
        box-shadow: 0 0 6px rgb(34 197 94 / 0.45), 0 0 12px rgb(34 197 94 / 0.35);
        opacity: 0.82;
        transform: scale(0.92);
    }
    50% {
        box-shadow: 0 0 10px rgb(34 197 94 / 0.95), 0 0 22px rgb(34 197 94 / 0.75);
        opacity: 1;
        transform: scale(1.08);
    }
}

body.hero-funnel .subtitle {
    display: block;
    margin: 10px 0 0;
    color: rgb(255 255 255 / 0.92);
    font-size: 15px;
    font-weight: 600;
}

body.hero-funnel .button-list {
    gap: 12px;
    margin-top: 14px;
}

body.hero-funnel .card-button {
    aspect-ratio: 2.35 / 1;
    border-radius: 16px;
}

body.hero-funnel .card-button::after {
    inset: 0;
    background: linear-gradient(180deg, rgb(0 0 0 / 0.3) 0%, rgb(0 0 0 / 0.6) 100%);
}

body.hero-funnel .card-caption {
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 12px 44px 14px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 8px rgb(0 0 0 / 0.6);
}

.card-corner-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    height: 24px;
    width: auto;
}

.pulse-wrap {
    position: relative;
    animation: cta-bounce 1.15s ease-in-out infinite;
    will-change: transform;
}

.pulse-glow {
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    background: rgb(255 255 255 / 0.5);
    filter: blur(11px);
    pointer-events: none;
}

.pulse-wrap .card-button {
    position: relative;
    z-index: 1;
}

@keyframes cta-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    38% {
        transform: translateY(-7px) scale(1.026);
    }
    62% {
        transform: translateY(1px) scale(0.992);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pulse-wrap,
    .status-dot {
        animation: none;
    }
}

.offer-line {
    margin: 0;
    color: var(--button-color);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    text-align: center;
    text-shadow: 0 1px 2px rgb(0 0 0 / 0.95), 0 0 10px rgb(0 175 240 / 0.55);
    font-variant-numeric: tabular-nums;
}

body.hero-funnel .icon-row {
    margin-top: 14px;
}

@media (min-width: 768px) {
    body.hero-funnel {
        background: #000000;
    }

    body.hero-funnel .page-shell {
        position: relative;
        display: flex;
        min-height: 100vh;
        align-items: flex-start;
        justify-content: center;
        padding: 24px;
        background: transparent;
    }

    body.hero-funnel .page-shell::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image: var(--hero-bg, none);
        background-size: cover;
        background-position: center;
        filter: blur(60px);
        opacity: 0.6;
        transform: scale(1.12);
        pointer-events: none;
    }

    body.hero-funnel .profile-card {
        position: relative;
        z-index: 1;
        width: 430px;
        min-height: 0;
        padding-bottom: 10px;
        border-radius: 24px;
        box-shadow: 0 25px 60px rgb(0 0 0 / 0.6);
    }

    body.hero-funnel .hero-frame {
        height: clamp(200px, calc(100vh - 405px), 520px);
        height: clamp(200px, calc(100svh - 405px), 520px);
        border-radius: 24px 24px 0 0;
        overflow: hidden;
    }
}

/* Funnel: секундарные кнопки — стеклянные пилюли в столбик */

body.hero-funnel.is-content-stage .main-button {
    min-height: 56px;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: 16px;
    background: rgb(255 255 255 / 0.06);
    color: #ffffff;
}

body.hero-funnel.is-content-stage .main-button.has-custom-color {
    border-color: transparent;
    background: var(--button-color);
    color: var(--button-text);
}

body.hero-funnel.is-content-stage .main-button.has-icon {
    position: relative;
    justify-content: center;
    padding-left: 56px;
    padding-right: 56px;
}

body.hero-funnel.is-content-stage .main-button.has-icon .button-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
}

body.hero-funnel.is-content-stage .main-button:active {
    transform: scale(0.98);
    background: rgb(255 255 255 / 0.1);
}

/* не обрезать свечение пульсирующей карточки */
body.hero-funnel .profile-card {
    overflow: visible;
}
