/* =========================================================
   REVOLUT-INSPIRED LIGHT THEME
   Белый сайт + чёрно-фиолетовые акценты.
   Файл можно ставить вместо старого CSS.
========================================================= */

:root {
    --fb-blue: #494fdf;
    --fb-blue-dark: #191c1f;
    --fb-blue-soft: #f2f1ff;
    --fb-blue-light: #f7f6ff;

    --rev-blue: #494fdf;
    --rev-purple: #6b4dff;
    --rev-black: #191c1f;
    --rev-ink: #111318;

    --green: #05a660;
    --green-soft: #eaf8f1;

    --red: #e53935;

    --bg: #f6f6f7;
    --surface: #ffffff;
    --surface-soft: #fafafc;

    --text: #191c1f;
    --text-soft: #596170;
    --text-muted: #7c8493;
    --text-light: #aab1bd;

    --border: #e6e7ec;
    --border-soft: rgba(230, 231, 236, 0.82);

    --shadow-card: 0 8px 24px rgba(17, 19, 24, 0.055);
    --shadow-button: 0 12px 26px rgba(73, 79, 223, 0.20);

    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;

    --page-x: 16px;
    --header-height: 60px;

    --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
    width: 100%;
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

button,
input {
    font-family: inherit;
}

button {
    border: none;
    cursor: pointer;
    background: none;
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    display: block;
}

.app {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% -8%, rgba(73, 79, 223, 0.055), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 58%, #f0f0f3 100%);
}

/* HEADER */

.app-header {
    height: var(--header-height);
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 var(--page-x);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand__logo {
    position: relative;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--fb-blue);
    color: #ffffff;
}

.brand__logo::before {
    content: "R";
    color: #ffffff;
    font-size: 21px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.8px;
}

.brand__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand__logo img[src=""],
.brand__logo img:not([src]) {
    display: none;
}

@supports selector(:has(*)) {
    .brand__logo:has(img[src]:not([src=""]))::before {
        display: none;
    }

    .brand__logo:has(img[src]:not([src=""])) img {
        display: block;
    }
}

.brand__text {
    color: var(--fb-blue);
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.8px;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.online-status {
    height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid rgba(49, 162, 76, 0.13);
    white-space: nowrap;
}

.online-status__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
}

.online-status__count {
    min-width: 20px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    text-align: right;
}

.online-status__text {
    font-size: 9px;
    line-height: 1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12px;
}

.header-btn,
.menu-btn {
    position: relative;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    transition: background 0.18s ease, transform 0.18s ease;
}

.menu-btn {
    background: transparent;
    border-color: transparent;
}

.header-btn svg,
.menu-btn svg {
    width: 18px;
    height: 18px;
}

.header-btn:active,
.menu-btn:active {
    transform: scale(0.94);
    background: #eef0f3;
}

.header-btn__badge {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
    border: 2px solid var(--surface-soft);
}

/* LAYOUT */

.app-main {
    flex: 1;
    min-height: 0;
    width: 100%;
    padding: 10px var(--page-x) calc(10px + env(safe-area-inset-bottom));
    overflow: hidden;
}

.screen,
.screen-intro {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.intro-stack {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hero-card,
.assistant-card,
.scan-panel,
.scan-note {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-card);
}

/* HERO */

.hero-card {
    flex: 0 0 auto;
    padding: 15px 15px 16px;
    border-radius: var(--radius-xl);
}

.hero-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 11px;
}

.verified-badge,
.hero-ai-chip {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10.2px;
    line-height: 1;
    font-weight: 600;
    white-space: nowrap;
}

.verified-badge {
    color: var(--fb-blue);
    background: var(--fb-blue-soft);
    border: 1px solid rgba(73, 79, 223, 0.12);
}

.verified-badge__icon {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.hero-ai-chip {
    color: var(--green);
    background: var(--green-soft);
    border: 1px solid rgba(49, 162, 76, 0.12);
}

.hero-ai-chip__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
}

.hero-card__title {
    color: var(--text);
    font-size: clamp(20px, 4.7vw, 20px);
    line-height: 1.13;
    font-weight: 700;
    letter-spacing: -0.6px;
}

.hero-card__subtitle {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: clamp(12px, 3.35vw, 13.3px);
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: -0.03px;
}

/* ASSISTANT */

.assistant-card {
    flex: 0 0 auto;
    min-height: auto;
    padding: 12px;
    border-radius: var(--radius-xl);
    display: block;
}

.assistant-card__header {
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: center;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
}

.assistant-avatar {
    position: relative;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
}

.assistant-avatar__slot {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--fb-blue-light);
    border: 1px solid rgba(73, 79, 223, 0.14);
    overflow: hidden;
}

.assistant-avatar__slot dotlottie-player {
    position: absolute;
    top: 50%;
    left: 45%;
    width: 88px;
    height: 88px;
    transform: translate(-50%, -50%) scale(1.18);
    transform-origin: center center;
    display: block;
    pointer-events: none;
}

.assistant-avatar__status {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--green);
    border: 3px solid var(--surface);
}
.assistant-info {
    min-width: 0;
}

.assistant-info__name {
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assistant-info__status {
    margin-top: 4px;
    color: var(--green);
    font-size: 10.8px;
    line-height: 1.2;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assistant-message {
    position: relative;
    display: block;
    margin-top: 10px;
    padding: 12px;
    max-height: 116px;
    overflow: hidden;
    border-radius: 13px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
}

.assistant-message::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 26px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(247, 248, 250, 0), var(--surface-soft) 78%);
}

.assistant-message p {
    color: var(--text-soft);
    font-size: clamp(11px, 3vw, 12.3px);
    line-height: 1.36;
    font-weight: 500;
    letter-spacing: -0.02px;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* SINGLE AI SCAN */

.scan-panel {
    flex: 0 0 auto;
    padding: 12px;
    border-radius: var(--radius-xl);
}

.scan-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.scan-panel__head h3 {
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.14px;
}

.scan-panel__head p {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 10.8px;
    line-height: 1.25;
    font-weight: 500;
}

.scan-panel__status {
    height: 23px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--fb-blue-soft);
    color: var(--fb-blue);
    font-size: 9.5px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease;
}

.scan-panel__status.is-complete {
    background: var(--green-soft);
    color: var(--green);
}

.scan-stage {
    position: relative;
    height: 70px;
    overflow: hidden;
    border-radius: 13px;
}

.scan-row {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 13px;
    background: var(--surface-soft);
    border: 1px solid rgba(228, 230, 235, 0.9);
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    pointer-events: none;
    transition:
        opacity 0.42s ease,
        transform 0.42s ease,
        background 0.28s ease,
        border-color 0.28s ease;
}

.scan-row.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    background: #ffffff;
    border-color: rgba(73, 79, 223, 0.18);
}

.scan-row.is-leaving {
    opacity: 0;
    transform: translateY(-14px) scale(0.985);
}

.scan-row__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--fb-blue);
    background: var(--fb-blue-soft);
    transition: background 0.28s ease, color 0.28s ease, transform 0.28s ease;
}

.scan-row.is-active .scan-row__icon {
    background: var(--fb-blue);
    color: #ffffff;
    transform: scale(1.03);
}

.scan-row.is-complete .scan-row__icon {
    background: var(--green-soft);
    color: var(--green);
}

.scan-row__icon svg {
    width: 18px;
    height: 18px;
}

.scan-row__content {
    min-width: 0;
}

.scan-row__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}

.scan-row__top span {
    min-width: 0;
    color: var(--text-soft);
    font-size: 11.5px;
    line-height: 1.2;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scan-row__top strong {
    min-width: 34px;
    color: var(--text);
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    text-align: right;
}

.scan-row__bar {
    position: relative;
    width: 100%;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.scan-row__bar span {
    position: relative;
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--fb-blue), #7b61ff);
    transition: width 1.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.scan-row.is-active .scan-row__bar span::after {
    content: "";
    position: absolute;
    top: 0;
    left: -35%;
    width: 35%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.75), transparent);
    animation: scanShine 1.15s ease-in-out infinite;
}

@keyframes scanShine {
    0% {
        left: -35%;
        opacity: 0;
    }

    25% {
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

.scan-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 9px;
}

.scan-dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #cfd5df;
    transition: width 0.28s ease, background 0.28s ease;
}

.scan-dots span.is-active {
    width: 18px;
    background: var(--fb-blue);
}

/* NOTE */

.scan-note {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: var(--radius-xl);
}

.scan-note__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--green);
    background: var(--green-soft);
}

.scan-note__icon svg {
    width: 20px;
    height: 20px;
}

.scan-note__content h3 {
    color: var(--text);
    font-size: 13px;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.12px;
}

.scan-note__content p {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 11.3px;
    line-height: 1.3;
    font-weight: 500;
}

/* CTA */

.main-cta {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.primary-btn {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 13px;
    background: var(--fb-blue);
    color: #ffffff;
    font-size: 14.5px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.14px;
    box-shadow: var(--shadow-button);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.primary-btn svg {
    width: 18px;
    height: 18px;
}

.primary-btn:active {
    transform: scale(0.975);
    background: var(--fb-blue-dark);
    box-shadow: 0 6px 14px rgba(73, 79, 223, 0.2);
}

.trust-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 500;
    text-align: center;
}

.trust-line__dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--green);
}

.trust-line strong {
    color: var(--text);
    font-weight: 700;
}

/* HEIGHT ADAPTATION */

@media (max-height: 740px) {
    :root {
        --header-height: 54px;
    }

    .app-main {
        padding-top: 9px;
        padding-bottom: 9px;
    }

    .intro-stack {
        gap: 7px;
    }

    .hero-card {
        padding: 13px 13px 14px;
        border-radius: 15px;
    }

    .hero-card__top {
        margin-bottom: 9px;
    }

    .verified-badge,
    .hero-ai-chip {
        height: 24px;
        padding: 0 8px;
        font-size: 9.8px;
    }

    .hero-card__title {
        font-size: clamp(18.5px, 4.35vw, 20px);
        line-height: 1.1;
    }

    .hero-card__subtitle {
        margin-top: 7px;
        font-size: 11.7px;
        line-height: 1.34;
    }

    .assistant-card {
        padding: 10px;
        border-radius: 15px;
    }

    .assistant-card__header {
    grid-template-columns: 46px 1fr;
    gap: 10px;
    padding-bottom: 8px;
}

.assistant-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
}

.assistant-avatar__slot {
    width: 46px;
    height: 46px;
    border-radius: 12px;
}

.assistant-avatar__slot dotlottie-player {
    width: 70px;
    height: 70px;
    transform: translate(-50%, -50%) scale(1.15);
}

    .assistant-info__name {
        font-size: 13.5px;
    }

    .assistant-info__status {
        font-size: 10px;
    }

    .assistant-message {
        margin-top: 8px;
        padding: 10px;
        max-height: 84px;
        border-radius: 12px;
    }

    .assistant-message p {
        font-size: 10.6px;
        line-height: 1.3;
        -webkit-line-clamp: 5;
    }

    .scan-panel {
        padding: 10px;
        border-radius: 15px;
    }

    .scan-panel__head {
        margin-bottom: 8px;
    }

    .scan-panel__head h3 {
        font-size: 13px;
    }

    .scan-panel__head p {
        font-size: 10.2px;
    }

    .scan-stage {
        height: 62px;
    }

    .scan-row {
        grid-template-columns: 34px 1fr;
        gap: 8px;
        padding: 8px;
        border-radius: 12px;
    }

    .scan-row__icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .scan-row__icon svg {
        width: 16px;
        height: 16px;
    }

    .scan-row__top {
        margin-bottom: 5px;
    }

    .scan-row__top span {
        font-size: 10.6px;
    }

    .scan-row__top strong {
        font-size: 10px;
    }

    .scan-row__bar {
        height: 5px;
    }

    .scan-note {
        grid-template-columns: 34px 1fr;
        gap: 9px;
        padding: 9px 10px;
        border-radius: 15px;
    }

    .scan-note__icon {
        width: 34px;
        height: 34px;
    }

    .scan-note__icon svg {
        width: 18px;
        height: 18px;
    }

    .scan-note__content h3 {
        font-size: 12px;
    }

    .scan-note__content p {
        font-size: 10.4px;
    }

    .primary-btn {
        min-height: 46px;
        border-radius: 12px;
        font-size: 13.6px;
    }

    .trust-line {
        font-size: 10.2px;
    }
}

@media (max-height: 660px) {
    :root {
        --header-height: 52px;
        --page-x: 10px;
    }

    .app-main {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .intro-stack {
        gap: 6px;
    }

    .hero-ai-chip {
        display: none;
    }

    .hero-card__title {
        font-size: clamp(17.8px, 4.1vw, 20.5px);
    }

    .hero-card__subtitle {
        font-size: 11px;
        line-height: 1.3;
    }

    .assistant-message {
        max-height: 66px;
    }

    .assistant-message p {
        font-size: 10.2px;
        line-height: 1.26;
        -webkit-line-clamp: 4;
    }

    .scan-panel__head p {
        display: none;
    }

    .scan-stage {
        height: 58px;
    }

    .scan-row {
        grid-template-columns: 32px 1fr;
        padding: 7px;
    }

    .scan-row__icon {
        width: 32px;
        height: 32px;
    }

    .scan-row__bar {
        height: 4px;
    }

    .scan-note {
        display: none;
    }

    .primary-btn {
        min-height: 44px;
    }
}

/* WIDTH ADAPTATION */

@media (max-width: 374px) {
    :root {
        --page-x: 10px;
        --header-height: 54px;
    }

    .brand__logo {
        width: 26px;
        height: 26px;
    }

    .brand__logo::before {
        font-size: 19px;
    }

    .brand__text {
        font-size: 18px;
        letter-spacing: -0.65px;
    }

    .online-status {
        height: 27px;
        padding: 0 8px;
    }

    .online-status__text {
        display: none;
    }

    .header-btn {
        display: none;
    }

    .menu-btn {
        width: 31px;
        height: 31px;
    }

    .verified-badge {
        max-width: 100%;
    }

    .hero-card__title {
        font-size: 18.6px;
    }

    .scan-panel__status {
        display: none;
    }

    .scan-row__top span {
        font-size: 10px;
    }
}

/* DESKTOP PREVIEW */

@media (min-width: 431px) {
    body {
        display: flex;
        justify-content: center;
        background: #2f3339;
    }

    .app {
        width: 390px;
        max-width: 390px;
        min-height: 100dvh;
        box-shadow:
            0 0 0 1px rgba(28, 30, 33, 0.08),
            0 24px 70px rgba(28, 30, 33, 0.22);
    }
}

/* =========================================================
   SCREEN 2: LOADER + QUIZ MODAL + ANALYSIS MODAL
========================================================= */

.screen-intro {
    transition: opacity 0.26s ease, transform 0.26s ease;
}

.screen-intro.is-leaving {
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
}

.screen-loader,
.screen-quiz {
    display: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.32s ease, transform 0.32s ease;
}

.screen-loader.is-visible,
.screen-quiz.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.screen-loader.is-visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen-quiz.is-visible {
    display: block;
}

.screen-loader.is-leaving {
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
}

/* =========================================================
   LOADER
========================================================= */

.loader-modal {
    width: 100%;
    max-width: 326px;
    margin: 0 auto;
    padding: 24px 18px 22px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(28, 30, 33, 0.09);
}

.loader-logo,
.analysis-logo {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 15px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--fb-blue-soft);
    border: 1px solid rgba(73, 79, 223, 0.13);
}

.loader-logo::before,
.analysis-logo::before {
    content: "";
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--fb-blue);
}

.loader-logo img,
.analysis-logo img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.loader-logo img[src=""],
.analysis-logo img[src=""],
.loader-logo img:not([src]),
.analysis-logo img:not([src]) {
    display: none;
}

.loader-modal h2 {
    color: var(--text);
    font-size: 18px;
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -0.35px;
}

.loader-modal p {
    max-width: 260px;
    margin: 9px auto 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
}

.loader-progress {
    width: 100%;
    height: 6px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.loader-progress span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: var(--fb-blue);
    transition: width 0.18s ease;
}

.loader-percent {
    margin-top: 9px;
    color: var(--fb-blue);
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
}

/* =========================================================
   QUIZ MODAL WRAPPER
========================================================= */

.quiz-overlay {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px 12px;
}

.quiz-modal {
    width: 100%;
   
    max-height: calc(100dvh - var(--header-height) - 22px);
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(28, 30, 33, 0.09);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.quiz-modal.is-hidden {
    opacity: 0;
    transform: translateY(-12px) scale(0.985);
}

.quiz-modal[hidden] {
    display: none !important;
}

/* =========================================================
   QUIZ TOP
========================================================= */

.quiz-modal__top {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.quiz-assistant {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 10px;
}

.assistant-avatar--quiz,
.assistant-avatar--quiz .assistant-avatar__slot {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
}

.assistant-avatar--quiz .assistant-avatar__slot {
    border-radius: 12px;
}

.assistant-avatar--quiz .assistant-avatar__slot dotlottie-player {
    position: absolute;
    top: 50%;
    left: 45%;
    width: 78px;
    height: 78px;
    transform: translate(-50%, -50%) scale(1.16);
    transform-origin: center center;
}

.quiz-assistant__info {
    min-width: 0;
}

.quiz-assistant__info h2 {
    color: var(--text);
    font-size: 14px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quiz-assistant__info p {
    margin-top: 3px;
    color: var(--green);
    font-size: 10.7px;
    line-height: 1.2;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quiz-count {
    flex: 0 0 auto;
    height: 25px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--fb-blue-soft);
    color: var(--fb-blue);
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
}

/* =========================================================
   QUIZ MESSAGE + PROGRESS
========================================================= */

.quiz-message {
    flex: 0 0 auto;
    margin-top: 12px;
    padding: 11px;
    border-radius: 13px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
}

.quiz-message p {
    color: var(--text-soft);
    font-size: 11.2px;
    line-height: 1.36;
    font-weight: 500;

    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.quiz-progress-line {
    flex: 0 0 auto;
    width: 100%;
    height: 5px;
    margin: 13px 0 15px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.quiz-progress-line span {
    display: block;
    width: 17%;
    height: 100%;
    border-radius: inherit;
    background: var(--fb-blue);
    transition: width 0.35s ease;
}

/* =========================================================
   QUIZ STEP AREA
========================================================= */

.quiz-step-frame {
    position: relative;
    flex: 1 1 auto;
    min-height: 318px;
    overflow: hidden;
}

.quiz-step {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateX(18px);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.quiz-step.is-active {
    opacity: 1;
    transform: translateX(0);
}

.quiz-step.is-entering-back {
    transform: translateX(-18px);
}

.quiz-step.is-exit-left {
    opacity: 0;
    transform: translateX(-18px);
}

.quiz-step.is-exit-right {
    opacity: 0;
    transform: translateX(18px);
}

/* =========================================================
   QUESTION CONTENT
========================================================= */

.quiz-question {
    margin-bottom: 14px;
}

.quiz-question > span,
.quiz-question__label {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 9px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: var(--fb-blue-soft);
    color: var(--fb-blue);
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
}

.quiz-question h3 {
    color: var(--text);
    font-size: 18px;
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -0.34px;
}

.quiz-question p {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 500;
}

.quiz-fields,
.quiz-input-grid {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.quiz-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.quiz-field span {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
}

.quiz-field input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border-radius: 13px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.quiz-field input:focus {
    background: #fff;
    border-color: rgba(73, 79, 223, 0.38);
    box-shadow: 0 0 0 3px rgba(73, 79, 223, 0.10);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.quiz-option {
    width: 100%;
    min-height: 48px;
    display: grid;
    grid-template-columns: 23px 1fr;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 13px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    color: var(--text-soft);
    text-align: left;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.quiz-option:active {
    transform: scale(0.985);
}

.quiz-option.is-selected {
    background: var(--fb-blue-soft);
    border-color: rgba(73, 79, 223, 0.34);
    color: var(--text);
}

.quiz-option__check,
.quiz-option__circle {
    width: 23px;
    height: 23px;
    border-radius: 50%;
    border: 2px solid #c9d1dc;
    background: #fff;
    position: relative;
}

.quiz-option.is-selected .quiz-option__check,
.quiz-option.is-selected .quiz-option__circle {
    border-color: var(--fb-blue);
    background: var(--fb-blue);
}

.quiz-option.is-selected .quiz-option__check::after,
.quiz-option.is-selected .quiz-option__circle::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 4px;
    width: 6px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.quiz-option__text {
    font-size: 13px;
    line-height: 1.25;
    font-weight: 500;
}

.quiz-actions {
    display: none !important;
}

/* =========================================================
   ANALYSIS MODAL
========================================================= */

.analysis-modal {
    position: relative;
    width: 100%;
    max-width: 326px;
    min-height: 372px;
    padding: 26px 18px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(28, 30, 33, 0.09);
    opacity: 0;
    transform: translateY(12px) scale(0.985);
    transition: opacity 0.32s ease, transform 0.32s ease;
}

.analysis-modal.is-visible {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.analysis-modal[hidden] {
    display: none !important;
}

.analysis-logo {
    margin-bottom: 18px;
}

.analysis-orbit {
    position: absolute;
    top: 46px;
    left: 50%;
    width: 116px;
    height: 116px;
    margin-left: -58px;
    border-radius: 50%;
    border: 1px solid rgba(73, 79, 223, 0.12);
    animation: orbitRotate 2.4s linear infinite;
    pointer-events: none;
}

.analysis-orbit span {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fb-blue);
}

.analysis-orbit span:nth-child(1) {
    top: -4px;
    left: 50%;
}

.analysis-orbit span:nth-child(2) {
    right: 9px;
    bottom: 20px;
    background: var(--green);
}

.analysis-orbit span:nth-child(3) {
    left: 9px;
    bottom: 20px;
    background: #bbb6ff;
}

@keyframes orbitRotate {
    to {
        transform: rotate(360deg);
    }
}

.analysis-modal h2 {
    color: var(--text);
    font-size: 18px;
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -0.35px;
}

.analysis-modal p {
    margin-top: 10px;
    max-width: 276px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.42;
    font-weight: 500;
}

.analysis-progress {
    width: 100%;
    max-width: 254px;
    height: 6px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.analysis-progress span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: var(--fb-blue);
    transition: width 0.25s ease;
}

/* =========================================================
   MOBILE HEIGHT ADAPTATION
========================================================= */

@media (max-height: 740px) {
    .loader-modal {
        max-width: 320px;
        padding: 22px 18px;
    }

    .quiz-overlay {
        padding: 6px 4px 10px;
    }

    .quiz-modal {
        max-width: 338px;
        min-height: 410px;
        max-height: calc(100dvh - var(--header-height) - 18px);
        padding: 14px;
    }

    .quiz-message {
        display: none;
    }

    .quiz-progress-line {
        margin: 12px 0 13px;
    }

    .quiz-step-frame {
        min-height: 292px;
    }

    .quiz-question {
        margin-bottom: 12px;
    }

    .quiz-question h3 {
        font-size: 15.5px;
    }

    .quiz-question p {
        font-size: 11px;
    }

    .quiz-field input {
        height: 48px;
    }

    .quiz-option {
        min-height: 43px;
        padding: 8px 10px;
    }

    .quiz-option__text {
        font-size: 12px;
    }

    .analysis-modal {
        min-height: 336px;
        max-width: 318px;
    }
}

@media (max-height: 660px) {
    .quiz-modal {
        min-height: 386px;
        padding: 13px;
    }

    .quiz-step-frame {
        min-height: 258px;
    }

    .quiz-question h3 {
        font-size: 14px;
    }

    .quiz-question p {
        display: none;
    }

    .quiz-options {
        gap: 7px;
    }

    .quiz-option {
        min-height: 39px;
    }

    .analysis-modal {
        min-height: 306px;
    }
}



.loader-lottie {
    position: relative;
    width: 82px;
    height: 82px;
    margin: 0 auto 15px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--fb-blue-soft);
    border: 1px solid rgba(73, 79, 223, 0.13);
}

.loader-lottie dotlottie-player {
    position: absolute;
    top: 50%;
    left: 45%;
    width: 126px;
    height: 126px;
    transform: translate(-50%, -50%) scale(1.12);
    transform-origin: center center;
    display: block;
    pointer-events: none;
}
/* FIX: make quiz modal taller and more premium */

.quiz-overlay {
    align-items: center;
    padding: 8px 4px 12px;
}

.quiz-modal {
    min-height: 455px;
    max-height: calc(100dvh - var(--header-height) - 22px);
    padding: 16px;
    border-radius: 18px;
}

.quiz-step-frame {
    min-height: 335px;
}

.quiz-question {
    margin-bottom: 14px;
}

.quiz-question h3 {
    font-size: 16.5px;
    line-height: 1.22;
}

.quiz-question p {
    display: block;
    margin-top: 7px;
    font-size: 11.5px;
    line-height: 1.35;
}

.quiz-options {
    gap: 8px;
}

.quiz-option {
    min-height: 44px;
    padding: 8px 11px;
    border-radius: 12px;
}

.quiz-option__text {
    font-size: 12.2px;
    line-height: 1.22;
}

/* Name step */
.quiz-fields,
.quiz-input-grid {
    gap: 11px;
}

.quiz-field input {
    height: 50px;
}

/* Medium/low screens */
@media (max-height: 740px) {
    .quiz-modal {
        min-height: 430px;
        max-height: calc(100dvh - var(--header-height) - 16px);
        padding: 14px;
    }

    .quiz-step-frame {
        min-height: 305px;
    }

    .quiz-question h3 {
        font-size: 15.5px;
    }

    .quiz-question p {
        display: block;
        font-size: 11px;
        line-height: 1.3;
    }

    .quiz-option {
        min-height: 41px;
        padding: 7px 10px;
    }

    .quiz-options {
        gap: 7px;
    }
}

@media (max-height: 660px) {
    .quiz-modal {
        min-height: 398px;
        padding: 12px;
    }

    .quiz-step-frame {
        min-height: 275px;
    }

    .quiz-question h3 {
        font-size: 14.5px;
    }

    .quiz-question p {
        display: none;
    }

    .quiz-option {
        min-height: 38px;
        padding: 6px 9px;
    }
}
/* UNIVERSAL LOTTIE IN MODALS */

.modal-lottie {
    position: relative;
    display: grid;
    place-items: center;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    border-radius: 50%;
    background: var(--fb-blue-soft);
    border: 1px solid rgba(73, 79, 223, 0.13);
}

.modal-lottie dotlottie-player {
    position: absolute;
    top: 50%;
    left: 45%;
    display: block;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(1.16);
    transform-origin: center center;
}

.modal-lottie--loader {
    width: 86px;
    height: 86px;
    margin-bottom: 15px;
}

.modal-lottie--loader dotlottie-player {
    width: 132px;
    height: 132px;
}

.modal-lottie--analysis {
    width: 96px;
    height: 96px;
    margin-bottom: 20px;
}

.modal-lottie--analysis dotlottie-player {
    width: 148px;
    height: 148px;
}

/* убираем старую орбиту, если где-то осталась */
.analysis-orbit {
    display: none !important;
}

/* если старые logo-классы остались, они не должны мешать */
.loader-logo,
.analysis-logo {
    display: none !important;
}

@media (max-height: 740px) {
    .modal-lottie--loader {
        width: 78px;
        height: 78px;
        margin-bottom: 14px;
    }

    .modal-lottie--loader dotlottie-player {
        width: 122px;
        height: 122px;
    }

    .modal-lottie--analysis {
        width: 86px;
        height: 86px;
        margin-bottom: 18px;
    }

    .modal-lottie--analysis dotlottie-player {
        width: 136px;
        height: 136px;
    }
}


/* =========================================================
   SCREEN 3: RESULT / PACKAGES (PREMIUM UI)
========================================================= */

.result-modal {
    width: 100%;
    max-width: 360px; /* Немного расширили для красивых карточек */
    max-height: calc(100dvh - var(--header-height) - 20px);
    padding: 20px 16px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(28, 30, 33, 0.08), 0 1px 3px rgba(0,0,0,0.05);
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.result-modal.is-visible {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.result-modal[hidden] {
    display: none !important;
}

/* --- HEADER РЕЗУЛЬТАТОВ --- */
.result-header {
    flex: 0 0 auto;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-soft);
}

.result-header__assistant {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-header__info h2 {
    color: var(--text);
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.result-header__info p {
    margin-top: 2px;
    color: var(--green);
    font-size: 11px;
    font-weight: 600;
}

/* --- TITLE AREA --- */
.result-title-area {
    flex: 0 0 auto;
    margin-bottom: 16px;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 24px;
    padding: 0 10px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.result-badge svg {
    width: 14px;
    height: 14px;
}

.result-title-area h2 {
    color: var(--text);
    font-size: 19px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.text-highlight {
    color: var(--fb-blue);
}

.result-title-area p {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
}

/* --- PRICING TIERS (RADIOGROUP) --- */
.pricing-tiers {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 4px;
    /* Убираем скроллбар для эстетики, сохраняя функционал */
    scrollbar-width: none; 
}
.pricing-tiers::-webkit-scrollbar {
    display: none;
}

.tier-card {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    text-align: left;
    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.2s ease;
    cursor: pointer;
}

.tier-card:active {
    transform: scale(0.98);
}

.tier-card.is-selected {
    border: 1.5px solid rgba(73, 79, 223, 0.95);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 247, 255, 0.98) 100%);
    box-shadow:
        0 10px 24px rgba(73, 79, 223, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Рекомендуемый пакет */
.tier-card--recommended {
    border-color: rgba(73, 79, 223, 0.3);
}

.tier-badge-popular {
    position: absolute;
    top: -10px;
    right: 16px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #494fdf, #3338b8);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(73, 79, 223, 0.25);
    z-index: 2;
}

/* Кастомный Radio Button */
.tier-card__radio {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #fff;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tier-card__radio::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--fb-blue);
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tier-card.is-selected .tier-card__radio {
    border-color: var(--fb-blue);
}

.tier-card.is-selected .tier-card__radio::after {
    transform: scale(1);
}

/* Верхняя часть карточки */
.tier-card__top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-right: 30px; /* Отступ от радиокнопки */
}

.tier-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}
.tier-icon svg,
.tier-icon img {
    width: 32px;
    border-radius: 9px;
    height: 32px;
    object-fit: contain; /* Защита от сплющивания, если твоя иконка не квадратная */
    display: block;
}


.tier-titles h3 {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.tier-titles span {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
}

/* Блок Дохода */
.tier-card__income {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--surface-soft);
    border: 1px solid rgba(0,0,0,0.03);
}

.tier-card.is-selected .tier-card__income {
    background: #ffffff;
    border-color: rgba(73, 79, 223, 0.15);
}

.income-label {
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.income-value {
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.income-value small {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.tier-card.is-selected .income-value {
    color: var(--green);
}

/* Фичи (Буллиты) */
.tier-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tier-features li {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-soft);
    font-size: 11.5px;
    font-weight: 500;
}

.tier-features li svg {
    width: 14px;
    height: 14px;
    color: var(--green);
    flex-shrink: 0;
}

/* --- TRUST PROMO BOX --- */
.trust-promo-box {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--green-soft);
    border: 1px solid rgba(49, 162, 76, 0.15);
}

.trust-promo-box__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    color: var(--green);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(49, 162, 76, 0.1);
}

.trust-promo-box__icon svg {
    width: 18px;
    height: 18px;
}

.trust-promo-box__text {
    color: #1f7a3a;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 500;
}

.trust-promo-box__text strong {
    font-weight: 700;
}

/* --- CTA SUBMIT BUTTON --- */
.submit-action-btn {
    flex: 0 0 auto;
    width: 100%;
    min-height: 52px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--fb-blue) 0%, #3438b8 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
    box-shadow: var(--shadow-button), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.2s ease;
}

.submit-action-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.submit-action-btn:active {
    transform: translateY(2px);
    box-shadow: 0 4px 10px rgba(73, 79, 223, 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}

.submit-action-btn:active svg {
    transform: translateX(4px);
}

.submit-action-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* =========================================================
   ADAPTIVE (MOBILE SCREENS)
========================================================= */

@media (max-height: 740px) {
    .result-modal {
        max-width: 350px;
        padding: 16px 14px;
    }
    
    .result-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    
    .result-title-area {
        margin-bottom: 12px;
    }

    .result-title-area h2 {
        font-size: 17.5px;
    }

    .tier-card {
        padding: 12px 14px;
        border-radius: 14px;
    }

    .tier-card__top {
        margin-bottom: 10px;
    }

    .tier-icon {
        width: 32px;
        height: 32px;
    }

    .tier-titles h3 {
        font-size: 14px;
    }

    .tier-card__income {
        padding: 8px 10px;
        margin-bottom: 10px;
    }

    .income-value {
        font-size: 16.5px;
    }

    .trust-promo-box {
        margin-top: 12px;
        padding: 10px 12px;
    }

    .submit-action-btn {
        min-height: 48px;
        margin-top: 12px;
        font-size: 14px;
    }
}

@media (max-height: 660px) {
    .result-modal {
        padding: 12px;
    }

    .result-header__info p,
    .result-title-area p {
        display: none; /* Экономим высоту на маленьких экранах */
    }
    
    .result-title-area h2 {
        font-size: 16px;
    }

    .tier-card {
        padding: 10px 12px;
    }

    .tier-card__radio {
        top: 12px;
        right: 12px;
        width: 18px;
        height: 18px;
    }

    .tier-icon {
        width: 28px;
        height: 28px;
    }

    .tier-icon svg {
        width: 16px;
        height: 16px;
    }

    .tier-titles span {
        font-size: 10px;
    }

    .tier-card__income {
        margin-bottom: 8px;
    }

    .income-label {
        font-size: 9.5px;
    }

    .income-value {
        font-size: 15px;
    }

    .tier-features li {
        font-size: 10.5px;
    }
}



/* ============== SCREEN 4 · AI TRADING BOT SESSION ============== */

#tradingScreen {
    --bg-main: #f6f6f7;
    --fb-blue: #494fdf;
    --fb-blue-hover: #3338b8;
    --green-accent: #05a660;
    --red-alert: #e53935;
    --text-dark: #191c1f;
    --text-muted: #7c8493;
    --card-bg: #ffffff;
    --card-shadow: 0 8px 24px rgba(17, 19, 24, 0.055);
    --card-border: 1px solid rgba(230, 231, 236, 0.88);

    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 0;
    color: var(--text-dark);
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#tradingScreen::-webkit-scrollbar {
    display: none;
}

#tradingScreen.is-visible {
    opacity: 1;
    transform: translateY(0);
}

#tradingScreen[hidden] {
    display: none !important;
}

#tradingScreen .bento-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 15px;
    border: var(--card-border);
    box-shadow: var(--card-shadow);
}

/* HERO */

.trade-hero-card {
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
}

.trade-hero-card::before {
    content: "";
    position: absolute;
    right: -54px;
    top: -54px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(73, 79, 223, 0.07);
    pointer-events: none;
}

.trade-hero-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.trade-hero-copy {
    min-width: 0;
}

.trade-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(49, 162, 76, 0.1);
    color: var(--green-accent);
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 8px;
}

.trade-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-accent);
    box-shadow: 0 0 0 0 rgba(49, 162, 76, 0.45);
    animation: tradeLivePulse 1.8s ease-out infinite;
}

@keyframes tradeLivePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(49, 162, 76, 0.45);
    }

    70% {
        box-shadow: 0 0 0 7px rgba(49, 162, 76, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(49, 162, 76, 0);
    }
}

.trade-title {
    color: var(--text-dark);
    font-size: 21px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.55px;
}

.trade-session-pill {
    min-width: 70px;
    height: 46px;
    padding: 7px 10px;
    border-radius: 13px;
    background: #f5f7fb;
    border: 1px solid rgba(0, 0, 0, 0.045);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex: 0 0 auto;
}

.trade-session-pill span {
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.trade-session-pill strong {
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.trade-balance-row {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.trade-balance-label {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
    margin-bottom: 6px;
}

.trade-balance {
    display: block;
    color: var(--text-dark);
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.trade-change {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
}

.trade-change.is-flat {
    background: #f1f3f6;
    color: var(--text-muted);
}

.trade-change.is-positive {
    background: rgba(49, 162, 76, 0.1);
    color: var(--green-accent);
}

.trade-change.is-negative {
    background: rgba(228, 30, 63, 0.1);
    color: var(--red-alert);
}

.trade-status-row {
    position: relative;
    z-index: 2;
    min-height: 36px;
    padding: 0 10px 0 12px;
    border-radius: 12px;
    background: #f7f8fa;
    border: 1px solid rgba(0, 0, 0, 0.045);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
}

.trade-status-row span:first-child {
    min-width: 0;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.25;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade-signal {
    min-height: 23px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(73, 79, 223, 0.09);
    color: var(--fb-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9.5px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
}

.trade-signal.is-positive {
    background: rgba(49, 162, 76, 0.1);
    color: var(--green-accent);
}

.trade-signal.is-negative {
    background: rgba(228, 30, 63, 0.1);
    color: var(--red-alert);
}

/* CHART */

.trade-chart-card {
    position: relative;
    flex: 0 0 auto;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.trade-chart-card.is-positive {
    border-color: rgba(49, 162, 76, 0.16) !important;
    box-shadow: 0 8px 22px rgba(49, 162, 76, 0.08) !important;
}

.trade-chart-card.is-negative {
    border-color: rgba(228, 30, 63, 0.15) !important;
    box-shadow: 0 8px 22px rgba(228, 30, 63, 0.07) !important;
}

.trade-chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.trade-chart-head h2 {
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.25px;
}

.trade-chart-head p {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.25;
    font-weight: 600;
}

.trade-asset-badge {
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(73, 79, 223, 0.08);
    color: var(--fb-blue);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
    flex: 0 0 auto;
}

.asset-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--fb-blue);
}

.trade-chart-wrap {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(73, 79, 223, 0.045), rgba(255, 255, 255, 0)),
        #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.045);
}

.trade-chart-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* DEALS */

.trade-deals-card {
    flex: 0 0 auto;
}

.trade-deals-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.trade-deals-head h2 {
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.25px;
}

.trade-deals-head p {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.25;
    font-weight: 600;
}

.trade-deals-counter {
    min-height: 25px;
    min-width: 42px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f3f5f8;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    flex: 0 0 auto;
}

.trade-deals-empty {
    min-height: 64px;
    padding: 10px;
    border-radius: 13px;
    background: #f8fafc;
    border: 1px dashed rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: center;
    gap: 10px;
    transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.2s ease, margin 0.2s ease;
}

.trade-deals-empty.is-hidden {

    transform: translateY(-4px);
    max-height: 0;
    min-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    border-width: 0;
}

.trade-deals-empty-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(73, 79, 223, 0.08);
    color: var(--fb-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.trade-deals-empty-icon svg {
    width: 18px;
    height: 18px;
}

.trade-deals-empty h3 {
    color: var(--text-dark);
    font-size: 12px;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 3px;
}

.trade-deals-empty p {
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.3;
    font-weight: 600;
}

.trade-deals-viewport {
    min-height: 100px;
    overflow: hidden;
}

.trade-deals-track {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trade-deal-card {
    min-height: 96px;
    padding: 9px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.045);
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-areas:
        "logo title title"
        "desc desc result";
    column-gap: 9px;
    row-gap: 7px;
    align-items: center;
    opacity: 0;
    transform: translateY(8px) scale(0.985);
}

.trade-deal-card.enter {
    animation: tradeDealIn 0.32s ease forwards;
}

.trade-deal-card.leave {
    animation: tradeDealOut 0.26s ease forwards;
}

.trade-deal-logo {
    grid-area: logo;
    width: 26px;
    height: 26px;

  
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.trade-deal-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.trade-deal-logo-img[src=""] {
    opacity: 0;
}

.trade-deal-info {
    display: contents;
}

.trade-deal-title-row {
    grid-area: title;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.trade-deal-name {
    min-width: 0;
    color: var(--text-dark);
    font-size: 12px;
    line-height: 1.15;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade-deal-status {
    min-height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(73, 79, 223, 0.08);
    color: var(--fb-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
    flex: 0 0 auto;
}

.trade-deal-desc {
    grid-area: desc;
    min-width: 0;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.3;
    font-weight: 600;
    padding-left: 2px;
    padding-right: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade-deal-result {
    grid-area: result;
    align-self: end;
    justify-self: end;
    min-width: 58px;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trade-deal-profit {
    color: var(--green-accent);
    font-size: 10.5px;
    line-height: 1;
    font-weight: 900;
}

.trade-deal-percent {
    color: var(--green-accent);
    font-size: 9.5px;
    line-height: 1;
    font-weight: 800;
}

.trade-deal-card.is-positive {
    background: rgba(49, 162, 76, 0.055);
    border-color: rgba(49, 162, 76, 0.14);
}

.trade-deal-card.is-positive .trade-deal-status {
    background: rgba(49, 162, 76, 0.1);
    color: var(--green-accent);
}

@keyframes tradeDealIn {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes tradeDealOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
}

/* PROGRESS */

.trade-progress-card {
    flex: 0 0 auto;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.trade-progress-card.is-finished {
    border-color: rgba(49, 162, 76, 0.16) !important;
    box-shadow: 0 8px 22px rgba(49, 162, 76, 0.08) !important;
}

.trade-progress-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trade-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.trade-progress-top span {
    color: var(--text-dark);
    font-size: 13px;
    line-height: 1.15;
    font-weight: 800;
}

.trade-progress-top strong {
    color: var(--fb-blue);
    font-size: 13px;
    line-height: 1;
    font-weight: 900;
}

.trade-progress-bar {
    height: 7px;
    border-radius: 999px;
    background: #e7edf5;
    overflow: hidden;
}

.trade-progress-bar span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--fb-blue), #7b61ff);
    transition: width 0.18s ease;
}

.trade-progress-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.trade-progress-bottom > div {
    min-height: 42px;
    padding: 8px 9px;
    border-radius: 12px;
    background: #f7f8fa;
    border: 1px solid rgba(0, 0, 0, 0.045);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.trade-progress-bottom span {
    color: var(--text-muted);
    font-size: 9.5px;
    line-height: 1;
    font-weight: 700;
}

.trade-progress-bottom strong {
    color: var(--text-dark);
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
}

/* START MODAL */

.trade-modal {
    position: fixed;
    inset: 0;
    z-index: 150;
    padding: 18px;
    background: rgba(5, 5, 5, 0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.trade-modal.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.trade-modal-card {
    width: 100%;
    max-width: 330px;
    padding: 40px 18px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.18);
    text-align: center;
    transform: translateY(14px) scale(0.98);
    transition: transform 0.28s ease;
}

.trade-modal.is-visible .trade-modal-card {
    transform: translateY(0) scale(1);
}

.trade-modal-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    border-radius: 18px;
  
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.trade-modal-custom-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.trade-modal-custom-icon[src=""] {
    opacity: 0;
}

.trade-modal-card h2 {
    color: var(--text-dark);
    font-size: 21px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.45px;
    margin-bottom: 8px;
}

.trade-modal-card p {
    max-width: 260px;
    margin: 0 auto 18px;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.45;
    font-weight: 600;
}

.trade-modal-btn {
    width: 100%;
    height: 50px;
    border-radius: 13px;
    background: var(--fb-blue);
    color: #ffffff;
    font-size: 14px;
    line-height: 1;
    font-weight: 800;
    transition: background 0.18s ease, transform 0.18s ease;
}

.trade-modal-btn:active {
    transform: scale(0.98);
    background: var(--fb-blue-hover);
}

.trade-modal-btn:disabled {
    opacity: 0.65;
    pointer-events: none;
}

/* RESULT MODAL */

.trade-result-modal {
    position: fixed;
    inset: 0;
    z-index: 160;
    padding: 18px;
    background: rgba(5, 5, 5, 0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.trade-result-modal.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.trade-result-card {
    width: 100%;
    max-width: 350px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.18);
    transform: translateY(14px) scale(0.98);
    transition: transform 0.28s ease;
}

.trade-result-modal.is-visible .trade-result-card {
    transform: translateY(0) scale(1);
}
.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}


.trade-result-logo {
    position: relative;
    width: 102px;
    height: 62px;
    margin: 0 auto 14px;
    border-radius: 18px;
  
    color: var(--fb-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.trade-result-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.trade-result-logo-img[src=""] {
    opacity: 0;
}

.trade-result-logo-fallback {
    width: 28px;
    height: 28px;
    position: absolute;
    inset: 0;
    margin: auto;
    z-index: 1;
}

.trade-result-logo-img:not([src=""]) + .trade-result-logo-fallback {
    opacity: 0;
}

.trade-result-head {
    text-align: center;
    margin-bottom: 14px;
}

.trade-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(49, 162, 76, 0.1);
    color: var(--green-accent);
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 10px;
}

.trade-result-badge span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-accent);
}

.trade-result-head h2 {
    color: var(--text-dark);
    font-size: 19px;
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: -0.45px;
    margin-bottom: 7px;
}

.trade-result-head p {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
}

.trade-result-balance {
    padding: 13px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(49, 162, 76, 0.09), rgba(49, 162, 76, 0.045));
    border: 1px solid rgba(49, 162, 76, 0.13);
    text-align: center;
    margin-bottom: 10px;
}

.trade-result-balance span {
    display: block;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 7px;
}

.trade-result-balance strong {
    display: block;
    color: var(--text-dark);
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.8px;
    margin-bottom: 6px;
}

.trade-result-balance em {
    color: var(--green-accent);
    font-style: normal;
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
}

.trade-result-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.trade-result-stat {
    min-height: 54px;
    padding: 9px;
    border-radius: 13px;
    background: #f7f8fa;
    border: 1px solid rgba(0, 0, 0, 0.045);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.trade-result-stat span {
    color: var(--text-muted);
    font-size: 9.5px;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.trade-result-stat strong {
    color: var(--text-dark);
    font-size: 13px;
    line-height: 1;
    font-weight: 900;
}

.trade-result-note {
    min-height: 52px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(73, 79, 223, 0.055);
    border: 1px solid rgba(73, 79, 223, 0.09);
    display: grid;
    grid-template-columns: 32px 1fr;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
}

.trade-result-note-icon {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    background: rgba(73, 79, 223, 0.08);
    color: var(--fb-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.trade-result-note-icon svg {
    width: 17px;
    height: 17px;
}

.trade-result-note p {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.35;
    font-weight: 700;
}

.trade-result-btn {
    width: 100%;
    height: 50px;
    border-radius: 13px;
    background: var(--fb-blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    font-weight: 900;
    transition: background 0.18s ease, transform 0.18s ease;
}

.trade-result-btn:active {
    transform: scale(0.98);
    background: var(--fb-blue-hover);
}

/* MOBILE */

@media (max-width: 420px) {
    #tradingScreen {
        gap: 8px;
    }

    #tradingScreen .bento-card {
        padding: 14px;
    }

    .trade-title {
        font-size: 19px;
    }

    .trade-balance {
        font-size: 25px;
    }

    .trade-chart-wrap {
        height: 145px;
    }

    .trade-deals-viewport {
        min-height: 96px;
    }

    .trade-deal-card {
        min-height: 96px;
        padding: 9px;
        grid-template-columns: 32px minmax(0, 1fr) auto;
        column-gap: 8px;
        row-gap: 6px;
    }

    .trade-deal-logo {
        width: 28px;
        height: 28px;
    }

    .trade-deal-name {
        font-size: 11px;
    }

    .trade-deal-profit {
        font-size: 10px;
    }

    .trade-deal-percent {
        font-size: 9.5px;
    }

    .trade-modal-card {
        padding: 40px 16px;
        border-radius: 18px;
    }

    .trade-modal-card h2 {
        font-size: 20px;
    }

    .trade-result-card {
        padding: 16px;
    }

    .trade-result-head h2 {
        font-size: 18px;
    }

    .trade-result-balance strong {
        font-size: 28px;
    }
}

@media (max-width: 360px) {
    .trade-chart-wrap {
        height: 135px;
    }

    .trade-deals-track {
        gap: 7px;
    }

    .trade-deal-card {
        min-height: 92px;
        padding: 8px;
        grid-template-columns: 30px minmax(0, 1fr) auto;
        column-gap: 7px;
    }

    .trade-deal-logo {
        width: 28px;
        height: 28px;
    }

    .trade-deal-name {
        font-size: 11px;
    }

    .trade-deal-desc {
        font-size: 9.5px;
    }

    .trade-deal-result {
        min-width: 48px;
    }

    .trade-deal-profit {
        font-size: 10px;
    }

    .trade-deal-percent {
        font-size: 9px;
    }

    .trade-progress-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-height: 860px) {
    #tradingScreen {
        gap: 8px;
    }

    .trade-chart-wrap {
        height: 138px;
    }

    #tradingScreen .bento-card {
        padding: 14px;
    }

    .trade-deals-empty {
        min-height: 58px;
    }

    .trade-deals-viewport {
        min-height: 92px;
    }

    .trade-deal-card {
        min-height: 92px;
    }
}

@media (max-height: 760px) {
    .trade-hero-top {
        margin-bottom: 11px;
    }

    .trade-balance-row {
        margin-bottom: 10px;
    }

    .trade-chart-wrap {
        height: 128px;
    }

    .trade-result-card {
        padding: 15px;
    }

    .trade-result-logo {
        width: 52px;
        height: 52px;
        margin-bottom: 10px;
    }

    .trade-result-head {
        margin-bottom: 10px;
    }

    .trade-result-head h2 {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .trade-result-head p {
        font-size: 11px;
        line-height: 1.35;
    }

    .trade-result-balance {
        padding: 11px;
        margin-bottom: 8px;
    }

    .trade-result-balance strong {
        font-size: 26px;
    }

    .trade-result-stats {
        gap: 7px;
        margin-bottom: 8px;
    }

    .trade-result-stat {
        min-height: 48px;
        padding: 8px;
    }

    .trade-result-note {
        min-height: 48px;
        margin-bottom: 10px;
    }

    .trade-result-btn {
        height: 48px;
    }
}











.brand--wordmark {
    width: 96px !important;
    min-width: 96px !important;
    height: 36px !important;
    flex: 0 0 96px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

.brand--wordmark .brand__wordmark-logo {
    display: block !important;
    width: 96px !important;
    height: auto !important;
    max-width: 96px !important;
    max-height: 28px !important;

    object-fit: contain !important;
    object-position: left center !important;

    opacity: 1 !important;
    visibility: visible !important;
}



/* ================================
   QUIZ SCREEN FIX / PREMIUM VERSION
================================ */

.quiz-overlay {
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 4px 12px !important;
}

.quiz-modal {
    width: 100% !important;
    max-width: 344px !important;
    min-height: auto !important;
    max-height: calc(100dvh - var(--header-height) - 20px) !important;

    padding: 15px !important;
    border-radius: 22px !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(228, 230, 235, 0.95);
    box-shadow:
        0 18px 42px rgba(28, 30, 33, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

    scrollbar-width: none;
}

.quiz-modal::-webkit-scrollbar {
    display: none;
}

.quiz-modal__top {
    align-items: center !important;
    gap: 10px !important;
}

.quiz-assistant {
    grid-template-columns: 46px 1fr !important;
    gap: 10px !important;
}

.assistant-avatar--quiz,
.assistant-avatar--quiz .assistant-avatar__slot {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;
}

.assistant-avatar--quiz .assistant-avatar__slot {
    border-radius: 14px !important;
}

.quiz-assistant__info h2 {
    font-size: 14.5px !important;
    line-height: 1.15 !important;
}

.quiz-assistant__info p {
    font-size: 10.5px !important;
}

.quiz-count {
    height: 26px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    background: #eaf2ff !important;
}

.quiz-message {
    margin-top: 13px !important;
    padding: 12px !important;
    border-radius: 15px !important;
    background: #f8fafc !important;
    border: 1px solid rgba(228, 230, 235, 0.95) !important;
}

.quiz-message p {
    font-size: 11px !important;
    line-height: 1.38 !important;
    -webkit-line-clamp: 4 !important;
}

.quiz-progress-line {
    height: 5px !important;
    margin: 13px 0 14px !important;
    background: #e4e8ef !important;
}

.quiz-progress-line span {
    background: linear-gradient(90deg, var(--fb-blue), #7b61ff) !important;
}

.quiz-step-frame {
    position: relative !important;
    flex: 0 0 auto !important;
    min-height: auto !important;
    overflow: visible !important;
}

.quiz-step {
    position: relative !important;
    inset: auto !important;
    overflow: visible !important;
    opacity: 0;
    transform: translateX(18px);
    transition:
        opacity 0.24s ease,
        transform 0.24s ease;
}

.quiz-step.is-active {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

.quiz-question {
    margin-bottom: 12px !important;
}

.quiz-question > span {
    height: 24px !important;
    padding: 0 10px !important;
    margin-bottom: 10px !important;
    border-radius: 999px !important;
    background: #eaf2ff !important;
    color: var(--fb-blue) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
}

.quiz-question h3 {
    color: var(--text) !important;
    font-size: 17px !important;
    line-height: 1.18 !important;
    font-weight: 800 !important;
    letter-spacing: -0.38px !important;
}

.quiz-question p {
    display: block !important;
    margin-top: 8px !important;
    color: var(--text-muted) !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    font-weight: 500 !important;
}

.quiz-name-card {
    padding: 13px !important;
    border-radius: 18px !important;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(73, 79, 223, 0.12);
    box-shadow:
        0 8px 22px rgba(73, 79, 223, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.quiz-fields--name {
    gap: 10px !important;
}

.quiz-field--modern {
    gap: 7px !important;
}

.quiz-field--modern span {
    color: #4b5563 !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
}

.quiz-field--modern input {
    height: 50px !important;
    padding: 0 14px !important;

    border-radius: 14px !important;
    background: #f4f6f9 !important;
    border: 1px solid #e2e8f0 !important;

    color: var(--text) !important;
    font-size: 14px !important;
    font-weight: 600 !important;

    box-shadow: none !important;
    outline: none !important;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.quiz-field--modern input::placeholder {
    color: #8b95a5 !important;
    font-weight: 500 !important;
}

.quiz-field--modern input:focus {
    background: #ffffff !important;
    border-color: rgba(73, 79, 223, 0.55) !important;
    box-shadow:
        0 0 0 3px rgba(73, 79, 223, 0.11),
        0 8px 18px rgba(73, 79, 223, 0.08) !important;
}

.quiz-next-btn {
    width: 100%;
    min-height: 50px;
    margin-top: 13px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border-radius: 14px;
    background: linear-gradient(180deg, var(--fb-blue) 0%, #3438b8 100%);
    color: #ffffff;

    font-size: 14px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.15px;

    box-shadow:
        0 10px 20px rgba(73, 79, 223, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);

    transition:
        opacity 0.2s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.quiz-next-btn svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    transition: transform 0.18s ease;
}

.quiz-next-btn:active {
    transform: scale(0.985);
}

.quiz-next-btn:active svg {
    transform: translateX(3px);
}

.quiz-next-btn:disabled {
    opacity: 0.45;
    pointer-events: none;
    box-shadow: none;
}

.quiz-next-btn.is-loading {
    opacity: 0.78;
    pointer-events: none;
}

.quiz-name-hint {
    margin-top: 10px;
    padding: 9px 10px;

    display: grid;
    grid-template-columns: 8px 1fr;
    align-items: center;
    gap: 8px;

    border-radius: 12px;
    background: rgba(49, 162, 76, 0.08);
    border: 1px solid rgba(49, 162, 76, 0.10);
}

.quiz-name-hint span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
}

.quiz-name-hint p {
    margin: 0;
    color: #23743a;
    font-size: 10.5px;
    line-height: 1.32;
    font-weight: 600;
}

/* options тоже чуть красивее */

.quiz-options {
    gap: 8px !important;
}

.quiz-option {
    min-height: 46px !important;
    padding: 9px 11px !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    border: 1px solid #e4e8ef !important;
}

.quiz-option.is-selected {
    background: #f1f7ff !important;
    border-color: rgba(73, 79, 223, 0.48) !important;
    box-shadow: 0 6px 14px rgba(73, 79, 223, 0.09) !important;
}

.quiz-option__text {
    font-size: 12.4px !important;
    line-height: 1.24 !important;
    font-weight: 600 !important;
}

/* small height */

@media (max-height: 740px) {
    .quiz-modal {
        max-width: 338px !important;
        padding: 13px !important;
        border-radius: 20px !important;
    }

    .quiz-message {
        display: none !important;
    }

    .quiz-question h3 {
        font-size: 15.5px !important;
    }

    .quiz-question p {
        font-size: 11px !important;
    }

    .quiz-name-card {
        padding: 12px !important;
    }

    .quiz-field--modern input {
        height: 47px !important;
    }

    .quiz-next-btn {
        min-height: 48px !important;
    }
}

@media (max-height: 660px) {
    .quiz-overlay {
        padding: 4px 3px 8px !important;
    }

    .quiz-modal {
        padding: 12px !important;
    }

    .quiz-question p {
        display: none !important;
    }

    .quiz-field--modern input {
        height: 44px !important;
    }

    .quiz-next-btn {
        min-height: 44px !important;
    }

    .quiz-name-hint {
        display: none !important;
    }
}
/* ================================
   UNIVERSAL BUTTON LOADERS
================================ */

button.is-loading {
    pointer-events: none !important;
    user-select: none;
}

.button-loader {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #ffffff;
    animation: buttonLoaderSpin 0.72s linear infinite;
}

.button-loader-text {
    color: inherit;
    font: inherit;
    line-height: 1;
}

@keyframes buttonLoaderSpin {
    to {
        transform: rotate(360deg);
    }
}

/* loader для светлых кнопок/option cards */

.quiz-option.is-loading {
    position: relative;
    pointer-events: none;
    border-color: rgba(73, 79, 223, 0.48) !important;
    background: #f1f7ff !important;
    box-shadow: 0 6px 14px rgba(73, 79, 223, 0.09) !important;
}

.quiz-option.is-loading::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid rgba(73, 79, 223, 0.22);
    border-top-color: var(--fb-blue);
    animation: buttonLoaderSpin 0.72s linear infinite;
}

.quiz-option.is-loading .quiz-option__text {
    padding-right: 24px;
}

.quiz-option.is-loading .quiz-option__check {
    border-color: var(--fb-blue);
    background: var(--fb-blue);
}

.quiz-option.is-loading .quiz-option__check::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 4px;
    width: 6px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

/* чтобы кнопки не прыгали при замене текста */
.primary-btn,
.quiz-next-btn,
.submit-action-btn,
.trade-modal-btn,
.trade-result-btn {
    position: relative;
    overflow: hidden;
}


/* ================================
   MOBILE COMPACT TRADE DEALS
================================ */

@media (max-width: 430px) {
    .trade-deals-card {
        padding: 12px !important;
        border-radius: 16px !important;
    }

    .trade-deals-head {
        margin-bottom: 8px !important;
        align-items: center !important;
    }

    .trade-deals-head h2 {
        font-size: 14px !important;
        line-height: 1.1 !important;
    }

    .trade-deals-head p {
        margin-top: 2px !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        max-width: 210px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .trade-deals-counter {
        min-height: 22px !important;
        min-width: 38px !important;
        padding: 0 7px !important;
        font-size: 9.5px !important;
    }

    .trade-deals-viewport {
        min-height: auto !important;
        max-height: 132px !important;
        overflow: hidden !important;
    }

    .trade-deals-track {
        gap: 7px !important;
    }

    .trade-deal-card {
        min-height: 58px !important;
        height: 58px !important;
        padding: 8px 9px !important;
        border-radius: 13px !important;

        display: grid !important;
        grid-template-columns: 34px minmax(0, 1fr) auto !important;
        grid-template-areas:
            "logo title result"
            "logo desc result" !important;

        column-gap: 9px !important;
        row-gap: 3px !important;
        align-items: center !important;

        background: #f8fbf9 !important;
        border: 1px solid rgba(49, 162, 76, 0.12) !important;
    }

    .trade-deal-card.is-positive {
        background: linear-gradient(180deg, rgba(49, 162, 76, 0.075), rgba(49, 162, 76, 0.045)) !important;
        border-color: rgba(49, 162, 76, 0.16) !important;
    }

    .trade-deal-logo {
        grid-area: logo !important;
        width: 24px !important;
        height: 24px !important;
        
     
    }

    .trade-deal-logo-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    .trade-deal-info {
        display: contents !important;
    }

    .trade-deal-title-row {
        grid-area: title !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        justify-content: flex-start !important;
    }

    .trade-deal-name {
        min-width: 0 !important;
        color: var(--text-dark) !important;
        font-size: 11.5px !important;
        line-height: 1.1 !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .trade-deal-status {
        display: none !important;
    }

    .trade-deal-desc {
        grid-area: desc !important;
        padding: 0 !important;
        color: var(--text-muted) !important;
        font-size: 9.5px !important;
        line-height: 1.15 !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .trade-deal-result {
        grid-area: result !important;
        align-self: center !important;
        justify-self: end !important;
        min-width: 58px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        justify-content: center !important;
        gap: 3px !important;
        text-align: right !important;
    }

    .trade-deal-profit {
        color: var(--green-accent) !important;
        font-size: 11px !important;
        line-height: 1 !important;
        font-weight: 900 !important;
        white-space: nowrap !important;
    }

    .trade-deal-percent {
        color: var(--green-accent) !important;
        font-size: 9.5px !important;
        line-height: 1 !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
    }

    .trade-deals-empty {
        min-height: 54px !important;
        padding: 8px !important;
        grid-template-columns: 32px 1fr !important;
        gap: 8px !important;
        border-radius: 13px !important;
    }

    .trade-deals-empty-icon {
        width: 32px !important;
        height: 32px !important;
        border-radius: 10px !important;
    }

    .trade-deals-empty h3 {
        font-size: 11.5px !important;
    }

    .trade-deals-empty p {
        font-size: 9.8px !important;
    }
}

.quiz-option__check,
.quiz-option__circle {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    flex: 0 0 20px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-width: 2px !important;
}

.quiz-option.is-selected .quiz-option__check::after,
.quiz-option.is-selected .quiz-option__circle::after {
    content: "" !important;
    position: static !important;

    width: 5px !important;
    height: 9px !important;

    border-right: 2px solid #ffffff !important;
    border-bottom: 2px solid #ffffff !important;

    transform: rotate(45deg) translate(-1px, -1px) !important;
}

/* =========================================================
   UPDATED SCREEN 1: TYPING ASSISTANT + COMPACT BENEFITS
========================================================= */

.assistant-message--typing {
    min-height: 124px;
    max-height: none;
    overflow: visible;
    padding: 12px 13px;
    background:
        linear-gradient(135deg, rgba(73, 79, 223, 0.055), rgba(49, 162, 76, 0.045)),
        var(--surface-soft);
}

.assistant-message--typing::after {
    display: none;
}

.assistant-message--typing p {
    display: block;
    min-height: 96px;
    overflow: visible;
    color: var(--text-soft);
    font-size: clamp(11.5px, 3.15vw, 12.8px);
    line-height: 1.42;
    font-weight: 500;
    letter-spacing: -0.02px;
    white-space: pre-line;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
}

.assistant-message--typing p.is-typing::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 3px;
    transform: translateY(2px);
    border-radius: 999px;
    background: var(--fb-blue);
    animation: assistantCaretBlink 0.75s steps(2, start) infinite;
}

@keyframes assistantCaretBlink {
    0%,
    45% {
        opacity: 1;
    }

    46%,
    100% {
        opacity: 0;
    }
}

.intro-benefits {
    position: relative;
    flex: 0 0 auto;
    padding: 12px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 92% 8%, rgba(73, 79, 223, 0.13), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(73, 79, 223, 0.12);
    box-shadow: var(--shadow-card);
}

.intro-benefits::before {
    content: "";
    position: absolute;
    right: -34px;
    top: -44px;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: rgba(73, 79, 223, 0.08);
    pointer-events: none;
}

.intro-benefits__top {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.intro-benefits__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--fb-blue);
    background: var(--fb-blue-soft);
    border: 1px solid rgba(73, 79, 223, 0.10);
}

.intro-benefits__icon svg {
    width: 20px;
    height: 20px;
}

.intro-benefits__copy {
    min-width: 0;
}

.intro-benefits__copy h3 {
    color: var(--text);
    font-size: 13.6px;
    line-height: 1.18;
    font-weight: 750;
    letter-spacing: -0.2px;
}

.intro-benefits__copy p {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 10.8px;
    line-height: 1.28;
    font-weight: 500;
}

.intro-benefits__badge {
    min-width: 44px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border-radius: 999px;
    color: var(--green);
    background: var(--green-soft);
    border: 1px solid rgba(49, 162, 76, 0.12);
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
}

.intro-benefits__list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 7px;
}

.intro-benefit {
    min-height: 36px;
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 13px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(228, 230, 235, 0.82);
}

.intro-benefit__check {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--green);
    box-shadow: 0 5px 12px rgba(49, 162, 76, 0.18);
}

.intro-benefit__check svg {
    width: 14px;
    height: 14px;
}

.intro-benefit > span:last-child {
    font-size: 12.1px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.08px;
}

@media (max-height: 740px) {
    .assistant-message--typing {
        min-height: 104px;
        padding: 10px 11px;
    }

    .assistant-message--typing p {
        min-height: 82px;
        font-size: 9.9px;
        line-height: 1.34;
    }

    .intro-benefits {
        padding: 10px;
        border-radius: 15px;
    }

    .intro-benefits__top {
        grid-template-columns: 34px 1fr auto;
        gap: 9px;
        margin-bottom: 8px;
    }

    .intro-benefits__icon {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

    .intro-benefits__icon svg {
        width: 18px;
        height: 18px;
    }

    .intro-benefits__copy h3 {
        font-size: 12.7px;
    }

    .intro-benefits__copy p {
        font-size: 10.1px;
    }

    .intro-benefits__list {
        gap: 6px;
    }

    .intro-benefit {
        min-height: 32px;
        grid-template-columns: 22px 1fr;
        padding: 6px 8px;
        border-radius: 12px;
    }

    .intro-benefit__check {
        width: 22px;
        height: 22px;
    }

    .intro-benefit > span:last-child {
        font-size: 11.3px;
    }
}

@media (max-height: 660px) {
    .assistant-message--typing {
        min-height: 86px;
    }

    .assistant-message--typing p {
        min-height: 66px;
        font-size: 9.2px;
        line-height: 1.3;
    }

    .intro-benefits__copy p {
        display: none;
    }

    .intro-benefits__top {
        margin-bottom: 7px;
    }

    .intro-benefit {
        min-height: 30px;
    }
}


/* =========================================================
   SCREEN 2 CLEANUP: COMPACT AI MESSAGE + NO BADGES
========================================================= */
.quiz-modal__top {
    align-items: center !important;
}

.quiz-count,
.quiz-question > span,
.quiz-question__label {
    display: none !important;
}

.quiz-message--typing {
    position: relative !important;
    min-height: 86px !important;
    overflow: hidden !important;
}

.quiz-message--typing p {
    min-height: 58px !important;
    display: block !important;
    -webkit-line-clamp: initial !important;
    -webkit-box-orient: initial !important;
    overflow: visible !important;
}

.quiz-message--typing p.is-typing::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 3px;
    border-radius: 999px;
    background: var(--fb-blue);
    transform: translateY(2px);
    animation: typingCursorBlink 0.74s steps(2, start) infinite;
}

.quiz-question {
    margin-bottom: 12px !important;
}

.quiz-question h3 {
    font-size: 17px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.32px !important;
}

.quiz-question p {
    display: none !important;
}

.quiz-name-card {
    margin-top: 0 !important;
}

@media (max-height: 740px) {
    .quiz-message {
        display: block !important;
    }

    .quiz-message--typing {
        min-height: 78px !important;
        padding: 10px 11px !important;
    }

    .quiz-message--typing p {
        min-height: 54px !important;
        font-size: 10.7px !important;
        line-height: 1.34 !important;
    }

    .quiz-question {
        margin-bottom: 10px !important;
    }
}

@media (max-height: 660px) {
    .quiz-message--typing {
        min-height: 70px !important;
    }

    .quiz-message--typing p {
        min-height: 46px !important;
        font-size: 10.2px !important;
        line-height: 1.28 !important;
    }

    .quiz-question h3 {
        font-size: 15.5px !important;
    }
}


@keyframes typingCursorBlink {
    0%, 45% {
        opacity: 1;
    }

    46%, 100% {
        opacity: 0;
    }
}


/* =========================================================
   SCREEN 3 QUIZ PATCH: UNIQUE AI TYPING + QUESTION BADGES
========================================================= */
.quiz-question:not(.quiz-question--name) > span,
.quiz-question:not(.quiz-question--name) .quiz-question__label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
    height: 24px !important;
    padding: 0 10px !important;
    margin-bottom: 10px !important;
    border-radius: 999px !important;
    background: var(--fb-blue-soft) !important;
    color: var(--fb-blue) !important;
    font-size: 10px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: -0.05px !important;
    white-space: nowrap !important;
}

.quiz-question--name > span,
.quiz-question--name .quiz-question__label {
    display: none !important;
}

.quiz-message--typing {
    transition: min-height 0.22s ease, padding 0.22s ease !important;
}

.quiz-message--typing p {
    transition: min-height 0.22s ease !important;
}

@media (max-height: 740px) {
    .quiz-question:not(.quiz-question--name) > span,
    .quiz-question:not(.quiz-question--name) .quiz-question__label {
        height: 22px !important;
        margin-bottom: 8px !important;
        padding: 0 9px !important;
        font-size: 9.6px !important;
    }
}

@media (max-height: 660px) {
    .quiz-question:not(.quiz-question--name) > span,
    .quiz-question:not(.quiz-question--name) .quiz-question__label {
        height: 21px !important;
        margin-bottom: 7px !important;
        font-size: 9.2px !important;
    }
}


/* ================================
   1. ФИКС ВЫРАВНИВАНИЯ КНОПОК
================================ */

/* Нормализация выравнивания для всех главных кнопок */
.primary-btn,
.submit-action-btn,
.quiz-next-btn,
.trade-modal-btn,
.trade-result-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
}

/* Исключаем искажение пропорций у иконок внутри кнопок */
.primary-btn svg,
.submit-action-btn svg,
.quiz-next-btn svg,
.trade-result-btn svg {
    display: block;
    flex-shrink: 0;
    margin: 0;
}

/* Фикс галочки в чекбоксах квиза */
.quiz-option.is-selected .quiz-option__check::after,
.quiz-option.is-selected .quiz-option__circle::after {
    content: "";
    position: static !important; 
    width: 6px !important;
    height: 10px !important;
    border-right: 2px solid #ffffff !important;
    border-bottom: 2px solid #ffffff !important;
    transform: rotate(45deg) translate(-1px, -2px) !important;
}

/* ================================
   2. COMPACT RESULT SCREEN (ЭКРАН 8)
================================ */

/* Новый текст от ИИ */
.result-ai-text {
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.35;
    font-weight: 500;
    margin-bottom: 0;
}

/* Уплотняем заголовочную часть */
.result-title-area {
    margin-bottom: 12px !important;
}

/* Расстояние между пакетами */
.pricing-tiers {
    gap: 7px !important;
}

/* Компактные карточки пакетов */
.tier-card {
    padding: 10px 12px !important;
    border-radius: 14px !important;
}

/* Шапка внутри пакета */
.tier-card__top {
    margin-bottom: 8px !important;
}

.tier-icon {
    width: 32px !important;
    height: 32px !important;
}

.tier-titles h3 {
    font-size: 14px !important;
}

.tier-titles span {
    font-size: 10.5px !important;
}

/* Выстраиваем блок с прибылью в одну строку для экономии места */
.tier-card__income {
    margin-bottom: 8px !important;
    padding: 6px 10px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}

.income-label {
    font-size: 10px !important;
    margin: 0 !important;
}

.income-value {
    font-size: 15px !important;
}

.income-value small {
    font-size: 10.5px !important;
}

/* Уменьшаем список преимуществ */
.tier-features {
    gap: 4px !important;
}

.tier-features li {
    font-size: 11px !important;
}

.tier-features li svg {
    width: 12px !important;
    height: 12px !important;
}

/* Размер радиокнопки */
.tier-card__radio {
    top: 12px !important;
    right: 12px !important;
    width: 16px !important;
    height: 16px !important;
}

.tier-card__radio::after {
    width: 8px !important;
    height: 8px !important;
}

/* Уплотняем элементы ниже пакетов */
.trust-promo-box {
    margin-top: 10px !important;
    padding: 10px 12px !important;
}

.submit-action-btn {
    min-height: 48px !important;
    margin-top: 10px !important;
}

/* =========================================================
   SCREEN 9/10 PATCH: AUTO TRADING + COMPACT TRADING SCREEN
========================================================= */

#tradeStartModal,
.trade-modal {
    display: none !important;
}

#tradingScreen {
    gap: 7px !important;
    overflow: hidden !important;
}

#tradingScreen .bento-card {
    padding: 10px 11px !important;
    border-radius: 14px !important;
}

.trade-hero-top {
    margin-bottom: 8px !important;
}

.trade-kicker {
    min-height: 20px !important;
    padding: 0 8px !important;
    margin-bottom: 5px !important;
    font-size: 9px !important;
}

.trade-title {
    font-size: 18px !important;
    line-height: 1.05 !important;
}

.trade-session-pill {
    min-width: 58px !important;
    min-height: 42px !important;
    padding: 7px 8px !important;
    border-radius: 12px !important;
}

.trade-session-pill span {
    font-size: 8.5px !important;
}

.trade-session-pill strong {
    font-size: 13px !important;
}

.trade-balance-row {
    margin-bottom: 7px !important;
}

.trade-balance-label {
    margin-bottom: 3px !important;
    font-size: 9.5px !important;
}

.trade-balance {
    font-size: 23px !important;
    letter-spacing: -0.8px !important;
}

.trade-change {
    min-height: 26px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
}

.trade-status-row {
    min-height: 30px !important;
    padding: 7px 8px !important;
    gap: 8px !important;
}

.trade-status-row span:first-child {
    font-size: 10px !important;
}

.trade-signal {
    min-height: 20px !important;
    font-size: 8.5px !important;
}

.trade-chart-head,
.trade-deals-head {
    margin-bottom: 7px !important;
}

.trade-chart-head h2,
.trade-deals-head h2 {
    font-size: 13px !important;
}

.trade-chart-head p,
.trade-deals-head p {
    margin-top: 2px !important;
    font-size: 9.2px !important;
    line-height: 1.15 !important;
}

.trade-asset-badge,
.trade-deals-counter {
    min-height: 22px !important;
    padding: 0 8px !important;
    font-size: 9px !important;
}

.trade-chart-wrap {
    height: 112px !important;
    border-radius: 12px !important;
    background:
        radial-gradient(circle at 18% 12%, rgba(49, 162, 76, 0.10), transparent 36%),
        linear-gradient(180deg, rgba(73, 79, 223, 0.055), rgba(255, 255, 255, 0)),
        #f8fafc !important;
}

.trade-deals-empty {
    min-height: 46px !important;
    padding: 7px 8px !important;
    grid-template-columns: 30px 1fr !important;
    gap: 8px !important;
}

.trade-deals-empty-icon {
    width: 30px !important;
    height: 30px !important;
    border-radius: 10px !important;
}

.trade-deals-empty h3 {
    font-size: 11px !important;
}

.trade-deals-empty p {
    margin-top: 2px !important;
    font-size: 9px !important;
}

.trade-deals-viewport {
    min-height: 73px !important;
}

.trade-deals-track {
    gap: 6px !important;
}

.trade-deal-card {
    min-height: 73px !important;
    padding: 7px 8px !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    column-gap: 7px !important;
    row-gap: 4px !important;
}

.trade-deal-logo {
    width: 24px !important;
    height: 24px !important;
  
}

.trade-deal-title-row {
    gap: 5px !important;
    margin-bottom: 2px !important;
}

.trade-deal-name {
    font-size: 10.5px !important;
}

.trade-deal-status {
    min-height: 17px !important;
    padding: 0 6px !important;
    font-size: 7.8px !important;
}

.trade-deal-desc {
    font-size: 8.8px !important;
}

.trade-deal-result {
    min-width: 100% !important;
    grid-column: 1 / -1 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding-top: 3px !important;
}

.trade-deal-profit {
    font-size: 10px !important;
}

.trade-deal-percent {
    font-size: 8.5px !important;
}

.trade-progress-meta {
    gap: 6px !important;
}

.trade-progress-top span,
.trade-progress-top strong {
    font-size: 11px !important;
}

.trade-progress-bar {
    height: 5px !important;
}

.trade-progress-bottom {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin-top: 7px !important;
}

.trade-progress-bottom div {
    min-height: 34px !important;
    padding: 6px 7px !important;
    border-radius: 10px !important;
}

.trade-progress-bottom span {
    font-size: 8.2px !important;
}

.trade-progress-bottom strong {
    font-size: 10.5px !important;
}

@media (max-height: 760px) {
    #tradingScreen {
        gap: 6px !important;
    }

    #tradingScreen .bento-card {
        padding: 8px 10px !important;
    }

    .trade-chart-wrap {
        height: 96px !important;
    }

    .trade-deals-viewport {
        min-height: 66px !important;
    }

    .trade-deal-card {
        min-height: 66px !important;
        padding: 6px 7px !important;
    }

    .trade-balance {
        font-size: 21px !important;
    }

    .trade-progress-bottom div {
        min-height: 30px !important;
    }
}

@media (max-height: 680px) {
    .trade-hero-card {
        padding-bottom: 8px !important;
    }

    .trade-chart-wrap {
        height: 82px !important;
    }

    .trade-deals-head p {
        display: none !important;
    }

    .trade-deals-empty {
        min-height: 40px !important;
    }

    .trade-deals-viewport {
        min-height: 58px !important;
    }

    .trade-progress-bottom {
        display: none !important;
    }
}

/* =========================================================
   FINAL FIX V4: trade deals layout without text/profit overlap
   не ужимаем карточки слишком сильно — прибыль в отдельной колонке
========================================================= */
.trade-deals-card {
    padding: 12px !important;
}

.trade-deals-viewport {
    min-height: 150px !important;
    max-height: none !important;
    overflow: hidden !important;
}

.trade-deals-track {
    gap: 8px !important;
}

.trade-deal-card {
    min-height: 64px !important;
    height: 64px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    display: grid !important;
    grid-template-columns: 32px minmax(0, 1fr) 74px !important;
    grid-template-areas: 
        "logo title result"
        "logo desc result" !important;
    column-gap: 8px !important;
    row-gap: 4px !important;
    align-items: center !important;
    overflow: hidden !important;
}
.trade-deal-logo {
    grid-area: logo !important;
    width: 24px !important;
    height: 24px !important;
    align-self: center !important;
    justify-self: center !important;

}

.trade-deal-info {
    display: contents !important;
}

.trade-deal-title-row {
    grid-area: title !important;
    min-width: 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.trade-deal-name {
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.trade-deal-status {
    position: static !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    min-height: 19px !important;
    height: 19px !important;
    padding: 0 7px !important;
    font-size: 8.3px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.trade-deal-desc {
    grid-area: desc !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.trade-deal-result {
    grid-area: result !important;
    grid-column: auto !important;
    grid-row: auto !important;
    align-self: center !important;
    justify-self: end !important;
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 5px !important;
    text-align: right !important;
    overflow: hidden !important;
}

.trade-deal-profit,
.trade-deal-percent {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: right !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    transform: none !important;
}

.trade-deal-profit {
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
}

.trade-deal-percent {
    font-size: 9.7px !important;
    line-height: 1 !important;
    font-weight: 850 !important;
}

@media (max-height: 720px) {
    .trade-deals-viewport {
        min-height: 156px !important;
    }

    .trade-deal-card {
        min-height: 74px !important;
        height: 74px !important;
        padding: 9px 10px !important;
        grid-template-columns: 36px minmax(0, 1fr) 78px !important;
        column-gap: 9px !important;
    }

    .trade-chart-wrap {
        height: 96px !important;
    }
}

/* =========================================================
   FINAL SCREEN: REGISTRATION FORM
========================================================= */

.screen-final {
    display: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.32s ease, transform 0.32s ease;
}

.screen-final.is-visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.final-scroll {
    width: 100%;
    height: 100%;
    min-height: 0;

    overscroll-behavior: contain;
    padding: 2px 0 calc(18px + env(safe-area-inset-bottom));
    scrollbar-width: none;
}

.final-scroll::-webkit-scrollbar {
    display: none;
}

.final-ai-card {
    position: relative;
    padding: 14px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 12% 0%, rgba(73, 79, 223, 0.12), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(73, 79, 223, 0.12);
    box-shadow: 0 12px 30px rgba(28, 30, 33, 0.08);
    overflow: hidden;
}

.final-ai-card::after {
    content: "";
    position: absolute;
    right: -44px;
    top: -50px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(73, 79, 223, 0.09);
    filter: blur(4px);
    pointer-events: none;
}

.final-ai-head,
.final-ai-message,
.final-status-grid {
    position: relative;
    z-index: 1;
}

.final-ai-head {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
}

.assistant-avatar--final,
.assistant-avatar--final .assistant-avatar__slot {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
}

.assistant-avatar--final .assistant-avatar__slot {
    border-radius: 14px;
}

.assistant-avatar--final .assistant-avatar__slot dotlottie-player {
    position: absolute;
    top: 50%;
    left: 45%;
    width: 78px;
    height: 78px;
    transform: translate(-50%, -50%) scale(1.16);
    transform-origin: center center;
}

.final-ai-title {
    min-width: 0;
}

.final-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-size: 10.5px;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18px;
}

.final-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(49, 162, 76, 0.12);
}

.final-ai-title h2 {
    margin-top: 5px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.45px;
}

.final-ai-message {
    margin-top: 12px;
    padding: 11px 12px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(228, 230, 235, 0.95);
}

.final-ai-message p {
    margin: 0;
    color: var(--text-soft);
    font-size: 12.2px;
    line-height: 1.42;
    font-weight: 600;
    letter-spacing: -0.03px;
}

.final-ai-message strong {
    color: var(--fb-blue);
    font-weight: 850;
}

.final-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.final-status-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 58px;
    padding: 9px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(228, 230, 235, 0.82);
}

.final-status-item > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--green);
    background: var(--green-soft);
}

.final-status-item svg {
    width: 17px;
    height: 17px;
}

.final-status-item strong {
    display: block;
    color: var(--text);
    font-size: 10.6px;
    line-height: 1.15;
    font-weight: 850;
    letter-spacing: -0.16px;
}

.final-status-item p {
    margin: 3px 0 0;
    color: var(--text-muted);
    font-size: 9.5px;
    line-height: 1.22;
    font-weight: 600;
}

.screen-final .form-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 10px auto 0;
    padding: 16px 14px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(207, 219, 235, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 16px 38px rgba(18, 34, 58, 0.09),
        0 6px 16px rgba(18, 34, 58, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
    animation: form-enter 0.32s ease both;
    overflow: visible;
}

.screen-final .form-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 3px;
    border-radius: 0 0 999px 999px;
  background: linear-gradient(
    90deg,
    rgba(73, 79, 223, 0),
    rgba(73, 79, 223, 0.78),
    rgba(104, 92, 255, 0.72),
    rgba(25, 28, 31, 0.48),
    rgba(73, 79, 223, 0)
);
    opacity: 0.82;
}

.screen-final .form-wrapper::after {
    content: "";
    position: absolute;
    top: -56px;
    left: 50%;
    width: 210px;
    height: 112px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(73, 79, 223, 0.10);
    filter: blur(28px);
    pointer-events: none;
}

@keyframes form-enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.988);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.screen-final .form-badge,
.screen-final .form-title,
.screen-final .form-subtitle,
.screen-final .cpmn-form {
    position: relative;
    z-index: 1;
}

.screen-final .form-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 26px;
    padding: 6px 9px;
    margin-bottom: 11px;
    border: 1px solid rgba(73, 79, 223, 0.13);
    border-radius: 999px;
    background: rgba(73, 79, 223, 0.055);
    color: var(--fb-blue);
    font-size: 11.2px;
    line-height: 1;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.screen-final .form-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(49, 162, 76, 0.11);
}

.screen-final .form-title {
    margin: 0 0 7px;
    color: var(--text);
    font-size: 21px;
    line-height: 1.12;
    font-weight: 850;
    letter-spacing: -0.65px;
}

.screen-final .form-subtitle {
    max-width: 100%;
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 12.2px;
    line-height: 1.42;
    font-weight: 600;
    letter-spacing: -0.02px;
}

.screen-final .input-group {
    margin-bottom: 10px;
}

.screen-final .input-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    color: var(--text-soft);
    font-size: 11.2px;
    line-height: 1.2;
    font-weight: 750;
}

.screen-final .meta-input {
    width: 100%;
    height: 44px;
    border-radius: 13px;
    border: 1px solid #dce5f1;
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    padding: 0 13px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 1px 2px rgba(15, 23, 42, 0.025);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.screen-final .meta-input::placeholder {
    color: #9aa8ba;
    font-weight: 500;
}

.screen-final .meta-input:hover {
    border-color: #c8d5e6;
}

.screen-final .meta-input:focus {
    border-color: var(--fb-blue);
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(73, 79, 223, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.screen-final .meta-input.has-error {
    border-color: #dc2626;
    background: #fff7f7;
    box-shadow:
        0 0 0 4px rgba(220, 38, 38, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.screen-final .meta-input.has-success {
    border-color: var(--green);
    background: #f4fff8;
    box-shadow:
        0 0 0 4px rgba(49, 162, 76, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.screen-final .field-error {
    min-height: 15px;
    margin: 4px 2px 0;
    color: #dc2626;
    font-size: 11px;
    line-height: 1.34;
    font-weight: 600;
}

.screen-final .field-error[hidden] {
    display: none;
}

.screen-final .field-hint {
    min-height: 15px;
    margin: 4px 2px 0;
    color: var(--text-light);
    font-size: 10.6px;
    line-height: 1.34;
    font-weight: 600;
}

.screen-final .field-hint.is-success {
    color: var(--green);
}

.screen-final .btn-primary {
    width: 100%;
    height: 48px;
    margin-top: 3px;
    border: 0;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
        linear-gradient(135deg, #2f75e8 0%, var(--fb-blue) 52%, #155dcc 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 14.6px;
    line-height: 1;
    font-weight: 650;
    letter-spacing: -0.12px;
    cursor: pointer;
    box-shadow:
        0 13px 25px rgba(73, 79, 223, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.screen-final .btn-primary:hover:not(:disabled) {
    filter: saturate(1.05);
    box-shadow:
        0 17px 32px rgba(73, 79, 223, 0.27),
        inset 0 1px 0 rgba(255, 255, 255, 0.26);
    transform: translateY(-1px);
}

.screen-final .btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    box-shadow: none;
    transform: none;
}

.screen-final .btn-loader {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #ffffff;
    display: none;
    animation: spin-loader 0.8s linear infinite;
}

.screen-final .btn-primary.is-loading .btn-loader {
    display: inline-block;
}

@keyframes spin-loader {
    to {
        transform: rotate(360deg);
    }
}

.screen-final .consent-note {
    max-width: 330px;
    margin: 9px auto 0;
    color: #8b99ad;
    font-size: 9.8px;
    line-height: 1.42;
    text-align: center;
    font-weight: 500;
}

.screen-final .ssl-line {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(220, 228, 239, 0.86);
    color: #77869b;
    font-size: 10.7px;
    line-height: 1.2;
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
    user-select: none;
    font-weight: 650;
}

.screen-final .ssl-line svg {
    color: var(--green);
}

.screen-final .iti {
    width: 100%;
}

.screen-final .iti input.meta-input {
    padding-left: 94px !important;
}

.screen-final .iti__selected-dial-code {
    margin-left: 0;
    color: #1f2937;
    font-size: 13.5px;
    font-weight: 750;
}

.screen-final .iti__country-container {
    border-top-left-radius: 13px;
    border-bottom-left-radius: 13px;
}

.screen-final .iti--separate-dial-code .iti__selected-country {
    background: transparent;
    border-radius: 13px 0 0 13px;
}

.screen-final .iti__selected-country:hover {
    background: rgba(73, 79, 223, 0.045);
}

.screen-final .iti__country-list,
.screen-final .iti__dropdown-content {
    border: 1px solid #d8e2f0;
    border-radius: 14px;
    box-shadow:
        0 18px 42px rgba(15, 23, 42, 0.16),
        0 4px 12px rgba(15, 23, 42, 0.06);
    margin-top: 8px;
    overflow: hidden;
}

.screen-final .iti__search-input {
    height: 38px;
    border: 1px solid #d8e2f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    outline: none;
}

.screen-final .iti__search-input:focus {
    border-color: var(--fb-blue);
    box-shadow: 0 0 0 3px rgba(73, 79, 223, 0.11);
}

.screen-final .iti__country {
    font-family: inherit;
    font-size: 13px;
}

.screen-final .iti__country.iti__highlight {
    background: #f2f6ff;
}

@media (max-height: 760px) {
    .final-ai-card {
        padding: 12px;
    }

    .final-ai-message {
        margin-top: 10px;
        padding: 10px 11px;
    }

    .final-ai-message p {
        font-size: 11.5px;
        line-height: 1.36;
    }

    .final-status-grid {
        gap: 7px;
        margin-top: 8px;
    }

    .final-status-item {
        min-height: 52px;
        padding: 8px;
    }

    .screen-final .form-wrapper {
        margin-top: 8px;
        padding: 14px 13px 13px;
    }

    .screen-final .form-title {
        font-size: 20px;
    }

    .screen-final .form-subtitle {
        margin-bottom: 12px;
        font-size: 11.7px;
        line-height: 1.36;
    }

    .screen-final .input-group {
        margin-bottom: 8px;
    }

    .screen-final .meta-input {
        height: 42px;
    }

    .screen-final .btn-primary {
        height: 46px;
    }
}

@media (max-width: 374px), (max-height: 680px) {
    .final-status-grid {
        grid-template-columns: 1fr;
    }

    .final-status-item {
        min-height: 46px;
    }

    .screen-final .form-badge {
        margin-bottom: 9px;
        font-size: 10.8px;
    }

    .screen-final .form-title {
        font-size: 19px;
    }

    .screen-final .form-subtitle {
        font-size: 11.2px;
    }

    .screen-final .iti input.meta-input {
        padding-left: 88px !important;
    }

    .screen-final .iti__selected-dial-code {
        font-size: 12.8px;
    }
}

/* =========================================================
   FINAL SCREEN V5: COMPACT BOT BLOCK + TYPING MESSAGE
========================================================= */

.screen-final .final-scroll {
    padding-top: 6px !important;
    padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
}

.screen-final .final-ai-card {
    padding: 11px 12px 12px !important;
    border-radius: 18px !important;
    background:
        radial-gradient(circle at 14% 0%, rgba(73, 79, 223, 0.12), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    overflow: visible !important;
}

.screen-final .final-ai-card::after {
    width: 112px !important;
    height: 112px !important;
    right: -34px !important;
    top: -38px !important;
    opacity: 0.8 !important;
}

.screen-final .final-ai-head {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 9px !important;
}

.screen-final .assistant-avatar--final,
.screen-final .assistant-avatar--final .assistant-avatar__slot {
    width: 40px !important;
    height: 40px !important;
    flex-basis: 40px !important;
}

.screen-final .assistant-avatar--final .assistant-avatar__slot {
    border-radius: 13px !important;
}

.screen-final .assistant-avatar--final .assistant-avatar__slot dotlottie-player {
    width: 70px !important;
    height: 70px !important;
}

.screen-final .assistant-avatar--final .assistant-avatar__status {
    width: 12px !important;
    height: 12px !important;
    border-width: 3px !important;
}

.screen-final .final-kicker {
    font-size: 9.5px !important;
    line-height: 1 !important;
    letter-spacing: 0.16px !important;
}

.screen-final .final-ai-title h2 {
    margin-top: 4px !important;
    font-size: 16.5px !important;
    line-height: 1.08 !important;
    letter-spacing: -0.38px !important;
}

.screen-final .final-ai-message {
    min-height: 86px !important;
    margin-top: 9px !important;
    padding: 9px 10px !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, 0.94) !important;
}

.screen-final .final-ai-message p {
    min-height: 66px !important;
    color: var(--text-soft) !important;
    font-size: 11.1px !important;
    line-height: 1.34 !important;
    font-weight: 650 !important;
    letter-spacing: -0.02px !important;
    white-space: pre-line !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

.screen-final .final-ai-message p.is-typing::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 3px;
    transform: translateY(2px);
    border-radius: 999px;
    background: var(--fb-blue);
    animation: typingCursorBlink 0.74s steps(2, start) infinite;
}

.screen-final .final-status-grid {
    display: flex !important;
    gap: 6px !important;
    margin-top: 8px !important;
}

.screen-final .final-status-item {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 7px !important;
    grid-template-columns: 26px minmax(0, 1fr) !important;
    gap: 7px !important;
    border-radius: 13px !important;
}

.screen-final .final-status-item > span {
    width: 26px !important;
    height: 26px !important;
    border-radius: 9px !important;
}

.screen-final .final-status-item svg {
    width: 15px !important;
    height: 15px !important;
}

.screen-final .final-status-item strong {
    font-size: 9.5px !important;
    line-height: 1.12 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.screen-final .final-status-item p {
    margin-top: 2px !important;
    font-size: 8.6px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.screen-final .form-wrapper {
    margin-top: 8px !important;
    padding: 13px 13px 12px !important;
    border-radius: 17px !important;
}

.screen-final .form-badge {
    min-height: 23px !important;
    padding: 5px 8px !important;
    margin-bottom: 8px !important;
    font-size: 9.8px !important;
}

.screen-final .form-badge-dot {
    width: 6px !important;
    height: 6px !important;
    box-shadow: 0 0 0 3px rgba(49, 162, 76, 0.11) !important;
}

.screen-final .form-title {
    margin-bottom: 5px !important;
    font-size: 18.2px !important;
    line-height: 1.1 !important;
    letter-spacing: -0.45px !important;
}

.screen-final .form-subtitle {
    margin-bottom: 10px !important;
    font-size: 10.6px !important;
    line-height: 1.34 !important;
    font-weight: 600 !important;
}

.screen-final .input-group {
    margin-bottom: 7px !important;
}

.screen-final .input-label {
    margin-bottom: 4px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
}

.screen-final .meta-input {
    height: 40px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 0 11px !important;
}

.screen-final .field-error,
.screen-final .field-hint {
    min-height: 13px !important;
    margin-top: 3px !important;
    font-size: 9.8px !important;
    line-height: 1.28 !important;
}

.screen-final .btn-primary {
    height: 43px !important;
    margin-top: 2px !important;
    border-radius: 13px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.screen-final .consent-note {
    margin-top: 7px !important;
    max-width: 300px !important;
    font-size: 8.9px !important;
    line-height: 1.34 !important;
}

.screen-final .ssl-line {
    margin-top: 8px !important;
    padding-top: 8px !important;
    font-size: 9.8px !important;
}

.screen-final .iti input.meta-input {
    padding-left: 88px !important;
}

.screen-final .iti__selected-dial-code {
    font-size: 12px !important;
}

@media (max-height: 720px) {
    .screen-final .final-scroll {
        padding-top: 4px !important;
    }

    .screen-final .final-ai-card {
        padding: 9px 10px 10px !important;
    }

    .screen-final .final-ai-message {
        min-height: 74px !important;
        margin-top: 8px !important;
        padding: 8px 9px !important;
    }

    .screen-final .final-ai-message p {
        min-height: 56px !important;
        font-size: 10.4px !important;
        line-height: 1.28 !important;
    }

    .screen-final .final-status-grid {
        margin-top: 6px !important;
    }

    .screen-final .form-wrapper {
        margin-top: 7px !important;
        padding: 11px 12px !important;
    }

    .screen-final .form-title {
        font-size: 17px !important;
    }

    .screen-final .form-subtitle {
        font-size: 10px !important;
        line-height: 1.28 !important;
    }

    .screen-final .meta-input {
        height: 38px !important;
    }

    .screen-final .btn-primary {
        height: 41px !important;
    }
}


/* =========================================================
   FINAL CLEAN DOTLOTTIE-WC BOT FIX
   Для новой анимации lottie.host / dotlottie-wc
   ВАЖНО: этот блок должен быть последним в style.css
========================================================= */

dotlottie-player {
    display: none !important;
}

dotlottie-wc.ai-bot-lottie {
    display: block !important;
    pointer-events: none !important;
    box-sizing: border-box !important;
}

/* Общая аватарка */
.assistant-avatar {
    position: relative !important;
    overflow: visible !important;
}

.assistant-avatar__slot {
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    background: #eaf3ff !important;
    border: 1px solid rgba(73, 79, 223, 0.16) !important;
}

/* Статусная точка */
.assistant-avatar__status {
    position: absolute !important;
    right: -1px !important;
    bottom: -1px !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: #31a24c !important;
    border: 2px solid #ffffff !important;
    z-index: 10 !important;
}

/* Первый экран: возвращаем нормальный размер, без гигантского увеличения */
.screen-intro .assistant-card__header {
    grid-template-columns: 52px minmax(0, 1fr) !important;
    gap: 12px !important;
}

.screen-intro .assistant-avatar,
.screen-intro .assistant-avatar__slot {
    width: 52px !important;
    height: 52px !important;
    flex: 0 0 52px !important;
    border-radius: 14px !important;
}

.screen-intro .assistant-avatar__slot dotlottie-wc.ai-bot-lottie {
    position: absolute !important;
    top: 57% !important;
    left: 50% !important;
    width:48px !important;
    height: 48px !important; 
    transform: translate(-50%, -50%) !important;
    transform-origin: center center !important;
}

/* Квиз / результат / финальный экран: делаем аватар чуть больше, чтобы робот читался */
.quiz-assistant,
.result-header__assistant,
.final-ai-head {
    display: grid !important;
    grid-template-columns: 54px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 11px !important;
}

.screen-quiz .assistant-avatar,
.screen-quiz .assistant-avatar__slot,
.result-header .assistant-avatar,
.result-header .assistant-avatar__slot,
.final-ai-card .assistant-avatar,
.final-ai-card .assistant-avatar__slot,
.assistant-avatar--final,
.assistant-avatar--final .assistant-avatar__slot {
    width: 54px !important;
    height: 54px !important;
    flex: 0 0 54px !important;
    border-radius: 15px !important;
}

.screen-quiz .assistant-avatar__slot dotlottie-wc.ai-bot-lottie,
.result-header .assistant-avatar__slot dotlottie-wc.ai-bot-lottie,
.final-ai-card .assistant-avatar__slot dotlottie-wc.ai-bot-lottie,
.assistant-avatar--final .assistant-avatar__slot dotlottie-wc.ai-bot-lottie {
    position: absolute !important;
    top: 57% !important;
    left: 50% !important;
    width: 76px !important;
    height: 46px !important;
    transform: translate(-50%, -50%) !important;
    transform-origin: center center !important;
}

.quiz-assistant__info h2,
.result-header__info h2 {
    font-size: 14px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.quiz-assistant__info p,
.result-header__info p {
    font-size: 10.5px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Loader: без обрезания головы и без микроскопического робота */
.loader-lottie {
    position: relative !important;
    width: 96px !important;
    height: 96px !important;
    margin: 0 auto 16px !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    border-radius: 26px !important;
    background: #eaf3ff !important;
    border: 1px solid rgba(73, 79, 223, 0.18) !important;
}

.loader-lottie dotlottie-wc.ai-bot-lottie {
    position: absolute !important;
    top: 57% !important;
    left: 50% !important;
    width: 120px !important;
    height: 70px !important;  
    transform: translate(-50%, -50%) !important;
    transform-origin: center center !important;
}

/* Analysis modal */
.modal-lottie,
.modal-lottie--analysis {
    position: relative !important;
    width: 96px !important;
    height: 96px !important;
    margin: 0 auto 16px !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    border-radius: 26px !important;
    background: #eaf3ff !important;
    border: 1px solid rgba(73, 79, 223, 0.18) !important;
}

.modal-lottie dotlottie-wc.ai-bot-lottie,
.modal-lottie--analysis dotlottie-wc.ai-bot-lottie {
    position: absolute !important;
    top: 57% !important;
    left: 50% !important;
    width: 120px !important;
    height: 80px !important;
    transform: translate(-50%, -50%) !important;
    transform-origin: center center !important;
}

/* Не даём старым logo-обёрткам мешать */
.loader-logo,
.analysis-logo,
.analysis-orbit {
    display: none !important;
}

/* Низкие экраны */
@media (max-height: 720px) {
    .screen-intro .assistant-card__header {
        grid-template-columns: 48px minmax(0, 1fr) !important;
        gap: 10px !important;
    }

    .screen-intro .assistant-avatar,
    .screen-intro .assistant-avatar__slot {
        width: 48px !important;
        height: 48px !important;
        flex-basis: 48px !important;
        border-radius: 13px !important;
    }

    .screen-intro .assistant-avatar__slot dotlottie-wc.ai-bot-lottie {
        width: 42px !important;
        height: 42px !important;
        top: 57% !important;
    }

    .quiz-assistant,
    .result-header__assistant,
    .final-ai-head {
        grid-template-columns: 50px minmax(0, 1fr) !important;
        gap: 10px !important;
    }

    .screen-quiz .assistant-avatar,
    .screen-quiz .assistant-avatar__slot,
    .result-header .assistant-avatar,
    .result-header .assistant-avatar__slot,
    .final-ai-card .assistant-avatar,
    .final-ai-card .assistant-avatar__slot,
    .assistant-avatar--final,
    .assistant-avatar--final .assistant-avatar__slot {
        width: 50px !important;
        height: 50px !important;
        flex-basis: 50px !important;
        border-radius: 14px !important;
    }

    .screen-quiz .assistant-avatar__slot dotlottie-wc.ai-bot-lottie,
    .result-header .assistant-avatar__slot dotlottie-wc.ai-bot-lottie,
    .final-ai-card .assistant-avatar__slot dotlottie-wc.ai-bot-lottie,
    .assistant-avatar--final .assistant-avatar__slot dotlottie-wc.ai-bot-lottie {
        width: 60px !important;
        height: 40px !important;
        top: 57% !important;
    }

    .loader-lottie,
    .modal-lottie,
    .modal-lottie--analysis {
        width: 88px !important;
        height: 88px !important;
        border-radius: 24px !important;
    }

    .loader-lottie dotlottie-wc.ai-bot-lottie,
    .modal-lottie dotlottie-wc.ai-bot-lottie,
    .modal-lottie--analysis dotlottie-wc.ai-bot-lottie {
        width: 126px !important;
        height: 86px !important;
        top: 57% !important;
    }
}

/* Узкие экраны */
@media (max-width: 374px) {
    .quiz-assistant,
    .result-header__assistant,
    .final-ai-head {
        grid-template-columns: 48px minmax(0, 1fr) !important;
        gap: 9px !important;
    }

    .screen-quiz .assistant-avatar,
    .screen-quiz .assistant-avatar__slot,
    .result-header .assistant-avatar,
    .result-header .assistant-avatar__slot,
    .final-ai-card .assistant-avatar,
    .final-ai-card .assistant-avatar__slot,
    .assistant-avatar--final,
    .assistant-avatar--final .assistant-avatar__slot {
        width: 48px !important;
        height: 48px !important;
        flex-basis: 48px !important;
    }

    .screen-quiz .assistant-avatar__slot dotlottie-wc.ai-bot-lottie,
    .result-header .assistant-avatar__slot dotlottie-wc.ai-bot-lottie,
    .final-ai-card .assistant-avatar__slot dotlottie-wc.ai-bot-lottie,
    .assistant-avatar--final .assistant-avatar__slot dotlottie-wc.ai-bot-lottie {
        width: 44px !important;
        height: 44px !important;
        top: 57% !important;
    }

    .quiz-assistant__info h2,
    .result-header__info h2 {
        font-size: 13.2px !important;
    }

    .quiz-assistant__info p,
    .result-header__info p {
        font-size: 9.8px !important;
    }
}
.result-ai-text {
    min-height: 92px;
}

.result-ai-text.is-typing::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 3px;
    background: var(--fb-blue);
    vertical-align: -2px;
    animation: resultCursorBlink 0.75s infinite;
}

@keyframes resultCursorBlink {
    0%, 45% {
        opacity: 1;
    }

    46%, 100% {
        opacity: 0;
    }
}
.result-dialog-area {
    margin: 0 0 14px !important;
}

.result-dialog-bubble {
    position: relative;
    padding: 13px 14px !important;
    border-radius: 15px !important;
    background: #f7f9fc !important;
    border: 1px solid rgba(207, 217, 230, 0.9) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 4px 12px rgba(15, 23, 42, 0.035) !important;
}

.result-dialog-bubble::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 22px;
    width: 14px;
    height: 14px;
    background: #f7f9fc;
    border-left: 1px solid rgba(207, 217, 230, 0.9);
    border-top: 1px solid rgba(207, 217, 230, 0.9);
    transform: rotate(45deg);
}

.result-ai-text {
    min-height: 82px !important;
    margin: 0 !important;
    color: #344054 !important;
    font-size: 12.4px !important;
    line-height: 1.45 !important;
    font-weight: 500 !important;
    letter-spacing: -0.02px !important;
    white-space: pre-line !important;
}

.result-ai-text.is-typing::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 3px;
    background: var(--fb-blue);
    vertical-align: -2px;
    animation: resultCursorBlink 0.75s infinite;
}

@keyframes resultCursorBlink {
    0%, 45% {
        opacity: 1;
    }

    46%, 100% {
        opacity: 0;
    }
}
/* =========================================================
   FIRST SCREEN CTA FIX — CLEAN VERSION
   Только кнопка может быть sticky на низких экранах.
   Без blur, без серой подложки, без sticky всего CTA-блока.
========================================================= */

.screen-intro {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.screen-intro .intro-stack {
    position: relative !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
}

.screen-intro .intro-stack::-webkit-scrollbar {
    display: none !important;
}

.screen-intro .main-cta {
    position: static !important;
    bottom: auto !important;
    z-index: auto !important;
    margin-top: auto !important;
    padding: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}

.screen-intro .primary-btn {
    position: static !important;
    z-index: auto !important;
}

.screen-intro .trust-line {
    position: static !important;
    margin-top: 10px !important;
}

/* Когда высоты не хватает — липкой становится только синяя кнопка */
@media (max-height: 760px) {
    .screen-intro .intro-stack {
        padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important;
    }

    .screen-intro .main-cta {
        display: contents !important;
    }

    .screen-intro .primary-btn {
        position: sticky !important;
        bottom: calc(8px + env(safe-area-inset-bottom)) !important;
        z-index: 70 !important;
        width: 100% !important;
    }

    .screen-intro .trust-line {
        margin-top: 8px !important;
        font-size: 10.5px !important;
    }
}

/* На совсем низких экранах оставляем кнопку, а подпись можно убрать */
@media (max-height: 620px) {
    .screen-intro .intro-stack {
        padding-bottom: calc(58px + env(safe-area-inset-bottom)) !important;
    }

    .screen-intro .primary-btn {
        bottom: calc(7px + env(safe-area-inset-bottom)) !important;
        min-height: 44px !important;
    }

    .screen-intro .trust-line {
        display: none !important;
    }
}

/* =========================================================
   LIGHT REVOLUT POLISH — final corrections
   Сайт остаётся белым. Перекрашены только основные UI-акценты.
========================================================= */
body {
    background: #f1f2f5;
}

.app-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: rgba(230, 231, 236, 0.9);
}

.brand__logo {
    background: #191c1f;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(25, 28, 31, 0.12);
}

.brand__text {
    color: #191c1f;
    font-weight: 750;
}

.hero-card,
.assistant-card,
.scan-panel,
.scan-note,
.loader-modal,
.quiz-modal,
.analysis-modal,
.result-modal,
.final-modal,
.final-card,
#tradingScreen .bento-card {
    background: #ffffff;
    border-color: rgba(230, 231, 236, 0.9);
    box-shadow: 0 10px 28px rgba(17, 19, 24, 0.055);
}

.verified-badge,
.hero-ai-chip,
.scan-panel__status,
.quiz-count,
.quiz-question > span,
.quiz-question__label,
.result-badge,
.trade-signal {
    background: #f2f1ff;
    color: #494fdf;
    border-color: rgba(73, 79, 223, 0.16);
}

.primary-btn {
    background: #191c1f;
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(25, 28, 31, 0.18);
}

.primary-btn:active {
    background: #111318;
    box-shadow: 0 8px 18px rgba(25, 28, 31, 0.16);
}

.submit-action-btn,
.final-submit-btn,
.form-submit-btn,
.trade-start-btn,
.bot-start-btn {
    background: linear-gradient(135deg, #494fdf 0%, #6b4dff 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 30px rgba(73, 79, 223, 0.24), inset 0 1px 0 rgba(255,255,255,0.22) !important;
}

.submit-action-btn:active,
.final-submit-btn:active,
.form-submit-btn:active,
.trade-start-btn:active,
.bot-start-btn:active {
    box-shadow: 0 8px 18px rgba(73, 79, 223, 0.20), inset 0 1px 0 rgba(255,255,255,0.16) !important;
}

.scan-row.is-active {
    background: #ffffff;
    border-color: rgba(73, 79, 223, 0.22);
}

.scan-row__icon,
.modal-lottie,
.loader-lottie,
.assistant-avatar__slot {
    background: #f2f1ff;
    border-color: rgba(73, 79, 223, 0.14);
    color: #494fdf;
}

.scan-row.is-active .scan-row__icon {
    background: #494fdf;
    color: #ffffff;
}

.scan-row__bar span,
.loader-progress span,
.quiz-progress-line span,
.analysis-progress span {
    background: linear-gradient(90deg, #494fdf 0%, #7b61ff 100%);
}

.scan-dots span.is-active {
    background: #494fdf;
}

.quiz-field input:focus,
.final-field input:focus,
.form-field input:focus,
input:focus {
    border-color: rgba(73, 79, 223, 0.42) !important;
    box-shadow: 0 0 0 3px rgba(73, 79, 223, 0.10) !important;
}

.quiz-option.is-selected,
.tier-card.is-selected {
    background: linear-gradient(180deg, #ffffff 0%, #f7f6ff 100%);
    border-color: rgba(73, 79, 223, 0.48);
    box-shadow: 0 10px 24px rgba(73, 79, 223, 0.11);
}

.quiz-option.is-selected .quiz-option__check,
.quiz-option.is-selected .quiz-option__circle,
.tier-card.is-selected .tier-card__radio,
.tier-card.is-selected .tier-card__radio::after {
    border-color: #494fdf;
    background: #494fdf;
}

.tier-badge-popular {
    background: linear-gradient(90deg, #494fdf, #6b4dff);
    box-shadow: 0 6px 14px rgba(73, 79, 223, 0.22);
}

.text-highlight,
.loader-percent,
.result-title-area .text-highlight {
    color: #494fdf;
}

.trade-hero-card::before {
    background: rgba(73, 79, 223, 0.08);
}

.trade-session-pill,
.trade-status-row,
.tier-card__income,
.assistant-message,
.quiz-message {
    background: #fafafc;
    border-color: rgba(230, 231, 236, 0.86);
}

@media (min-width: 431px) {
    body {
        background: #eceef4;
    }

    .app {
        box-shadow:
            0 0 0 1px rgba(17, 19, 24, 0.06),
            0 26px 70px rgba(17, 19, 24, 0.14);
    }
}
