/**
 * Reelsy redesign v3 — полная пересборка главной страницы с нуля.
 * Структура и классы взяты из референса (D:\testskill\reelsy-redesign.html),
 * "glass" заменён на плотные Soft-UI поверхности (без backdrop-filter).
 * Палитра — существующий голубой бренд Reelsy.
 */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

body.reelsy-landing {
    --primary: #0ea5e9;
    --primary-2: #0284c7;
    --cyan: #06b6d4;
    --indigo: #4f46e5;
    --success: #059669;
    --danger: #dc2626;
    --bg: #eaf6ff;
    --fg: #0b1c2c;
    --muted: #4b5f75;
    --muted-2: #64748b;
    --surface: #ffffff;
    --border: rgba(14, 116, 180, 0.14);
    --border-strong: rgba(14, 116, 180, 0.32);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 40px;
    --space-5: 64px;
    --space-6: 96px;
    --font-heading: 'Space Grotesk', 'PT Sans', sans-serif;
    --font-body: 'Inter', 'PT Sans', system-ui, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 1px rgba(15, 23, 42, 0.03);
    --shadow-2: 0 8px 22px rgba(14, 116, 180, 0.10), 0 2px 6px rgba(15, 23, 42, 0.05);
    --shadow-3: 0 24px 48px rgba(14, 116, 180, 0.16), 0 6px 16px rgba(15, 23, 42, 0.07);

    font-family: var(--font-body) !important;
    color: var(--fg);
    background: radial-gradient(120% 60% at 50% 0%, #d6ecff 0%, var(--bg) 55%, #ffffff 100%);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

html:has(body.reelsy-landing) {
    overflow-x: hidden;
}

body.reelsy-landing * {
    box-sizing: border-box;
}

body.reelsy-landing h1,
body.reelsy-landing h2,
body.reelsy-landing h3,
body.reelsy-landing h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--fg);
}

body.reelsy-landing .rlz-container {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 var(--space-3);
}

body.reelsy-landing .rlz-section {
    position: relative;
    padding: var(--space-6) 0;
}

@media (max-width: 768px) {
    body.reelsy-landing .rlz-section {
        padding: var(--space-5) 0;
    }

    body.reelsy-landing .rlz-container {
        padding: 0 var(--space-2);
    }
}

body.reelsy-landing .rlz-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--primary-2);
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: var(--space-2);
}

body.reelsy-landing .rlz-eyebrow iconify-icon {
    font-size: 15px;
}

body.reelsy-landing .rlz-section-head {
    max-width: 640px;
    margin-bottom: var(--space-4);
}

body.reelsy-landing .rlz-section-head h2 {
    font-size: clamp(26px, 4vw, 38px);
    margin-bottom: 14px;
}

body.reelsy-landing .rlz-section-head p {
    color: var(--muted);
    font-size: 16.5px;
}

body.reelsy-landing .rlz-section-head.rlz-center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

body.reelsy-landing .rlz-grad-text {
    background: linear-gradient(120deg, var(--fg) 0%, var(--primary-2) 55%, var(--indigo) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ===== Buttons ===== */
body.reelsy-landing .rlz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
    transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), background 220ms var(--ease-out), border-color 220ms var(--ease-out);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

body.reelsy-landing .rlz-btn iconify-icon,
body.reelsy-landing .rlz-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 220ms var(--ease-out);
}

body.reelsy-landing .rlz-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: var(--shadow-2);
}

body.reelsy-landing .rlz-btn-primary:hover {
    box-shadow: var(--shadow-3);
    color: #fff;
}

body.reelsy-landing .rlz-btn-primary:hover iconify-icon,
body.reelsy-landing .rlz-btn-primary:hover svg {
    transform: translateX(3px);
}

body.reelsy-landing .rlz-btn-ghost {
    background: var(--surface);
    color: var(--fg);
    border-color: var(--border);
    box-shadow: var(--shadow-1);
}

body.reelsy-landing .rlz-btn-ghost:hover {
    border-color: var(--border-strong);
    color: var(--fg);
    box-shadow: var(--shadow-2);
}

body.reelsy-landing .rlz-btn-block {
    width: 100%;
}

body.reelsy-landing .rlz-magnetic:hover {
    transform: translateY(-2px);
}

body.reelsy-landing .rlz-btn:active {
    transform: translateY(0) scale(0.97);
}

/* ===== Soft card (замена glass) ===== */
body.reelsy-landing .rlz-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
}

body.reelsy-landing .rlz-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
    animation: rlzDrift 22s ease-in-out infinite;
}

@keyframes rlzDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -25px) scale(1.08); }
}

body.reelsy-landing .rlz-tilt {
    transition: transform 260ms var(--ease-out), border-color 260ms, box-shadow 260ms;
}

body.reelsy-landing .rlz-tilt:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-3);
}

body.reelsy-landing .rlz-img-frame {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

body.reelsy-landing .rlz-img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 500ms var(--ease-out);
}

body.reelsy-landing .rlz-img-frame:hover img {
    transform: scale(1.06);
}

/* ===== Nav ===== */
body.reelsy-landing .rlz-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    padding: 14px 0;
}

body.reelsy-landing .rlz-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-2);
    transition: box-shadow 300ms, background 300ms;
}

body.reelsy-landing .rlz-header.rlz-scrolled .rlz-navbar {
    box-shadow: var(--shadow-3);
}

body.reelsy-landing .rlz-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    color: var(--fg);
}

body.reelsy-landing .rlz-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--indigo));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
    color: #fff;
    flex-shrink: 0;
}

body.reelsy-landing .rlz-logo-mark svg {
    width: 18px;
    height: 18px;
}

body.reelsy-landing .rlz-nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

body.reelsy-landing .rlz-nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color 180ms;
}

body.reelsy-landing .rlz-nav-links a:hover {
    color: var(--fg);
}

body.reelsy-landing .rlz-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.reelsy-landing .rlz-nav-login {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    padding: 10px 16px;
    text-decoration: none;
}

body.reelsy-landing .rlz-nav-login:hover {
    color: var(--fg);
}

body.reelsy-landing .rlz-nav-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: var(--fg);
    padding: 6px;
    cursor: pointer;
}

body.reelsy-landing .rlz-nav-toggle-btn svg {
    width: 24px;
    height: 24px;
}

body.reelsy-landing .rlz-mobile-menu {
    display: none;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 300ms var(--ease-out);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-3);
}

body.reelsy-landing .rlz-mobile-menu.is-open {
    /* Пунктов в меню больше, чем помещалось в фиксированные 500px — то, что
       не влезало (кнопка CTA и "Войти"), обрезалось и было некликабельным.
       Важно: transition на max-height анимируется только к фиксированному px
       (переход к vh/% не доигрывает и застревает на 0 в некоторых браузерах) —
       поэтому лимит в px, с запасом над реальной высотой контента (~564px),
       а overflow-y: auto — страховка на случай ещё более длинного списка
       или совсем маленьких экранов. */
    max-height: 700px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 1;
    margin-top: 10px;
    padding: 18px;
}

body.reelsy-landing .rlz-mobile-menu a {
    display: block;
    padding: 10px 4px;
    color: var(--muted);
    font-weight: 500;
    text-decoration: none;
}

body.reelsy-landing .rlz-mobile-menu .rlz-mm-cta {
    /* .rlz-mobile-menu a (общий стиль пунктов списка) специфичнее .rlz-btn
       и перебивает его display/паддинги/цвет — кнопка превращалась в обычную
       ссылку с текстом слева и тусклым цветом вместо центрированной кнопки. */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    color: #fff;
    margin-top: 10px;
}

@media (max-width: 900px) {
    body.reelsy-landing .rlz-nav-links,
    body.reelsy-landing .rlz-nav-login,
    body.reelsy-landing .rlz-nav-cta-desktop {
        display: none;
    }

    body.reelsy-landing .rlz-nav-toggle-btn {
        display: block;
    }

    body.reelsy-landing .rlz-mobile-menu {
        display: block;
    }
}

/* ===== Hero ===== */
body.reelsy-landing .rlz-hero {
    position: relative;
    padding-top: var(--space-6);
    overflow: visible;
}

body.reelsy-landing .rlz-hero-inner {
    position: relative;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 var(--space-2);
}

body.reelsy-landing .rlz-hero h1 {
    font-size: clamp(34px, 6vw, 60px);
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}

body.reelsy-landing .rlz-hero-sub {
    font-size: 18px;
    color: var(--muted);
    max-width: 620px;
    margin: 0 auto 34px;
    position: relative;
    z-index: 1;
}

body.reelsy-landing .rlz-hero-ctas {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
}

body.reelsy-landing .rlz-hero-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

body.reelsy-landing .rlz-pill-badge {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-1);
}

body.reelsy-landing .rlz-pill-badge iconify-icon {
    font-size: 14px;
    color: var(--success);
}

body.reelsy-landing .rlz-hero-visual {
    position: relative;
    max-width: 980px;
    margin: 64px auto 0;
    padding: 0 28px;
}

body.reelsy-landing .rlz-hero-shot-wrap {
    position: relative;
}

body.reelsy-landing .rlz-hero-shot {
    padding: 10px;
}

body.reelsy-landing .rlz-hero-shot .rlz-img-frame {
    border-radius: 16px;
    aspect-ratio: 16 / 9;
}

body.reelsy-landing .rlz-hero-float {
    position: absolute;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 170px;
    z-index: 2;
    animation: rlzFloatY 5s var(--ease-out) infinite;
}

body.reelsy-landing .rlz-hero-float-1 {
    top: -24px;
    left: -20px;
}

body.reelsy-landing .rlz-hero-float-2 {
    bottom: -26px;
    right: -16px;
    animation-delay: -2.5s;
}

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

@media (max-width: 820px) {
    body.reelsy-landing .rlz-hero-float {
        display: none;
    }

    /* Декоративные .rlz-blob в hero позиционируются с отрицательными
       left/right (напр. right:-160px) специально, чтобы вылезать за
       карточку на десктопе — на мобильных экранах это раздувает всю
       страницу по ширине и создаёт горизонтальный скролл/пустую область
       справа. На мобильных плавающие бейджи и так скрыты, обрезать hero
       по границам безопасно. */
    body.reelsy-landing .rlz-hero {
        overflow: hidden;
    }
}

body.reelsy-landing .rlz-hero-float-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 16px;
}

body.reelsy-landing .rlz-hero-float b {
    display: block;
    font-family: var(--font-heading);
    font-size: 15px;
}

body.reelsy-landing .rlz-hero-float span {
    font-size: 11px;
    color: var(--muted-2);
}

/* ===== Roles / team cards ===== */
body.reelsy-landing .rlz-roles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    body.reelsy-landing .rlz-roles-grid {
        grid-template-columns: 1fr;
    }
}

body.reelsy-landing .rlz-role-card {
    padding: 28px;
}

body.reelsy-landing .rlz-role-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(14, 165, 233, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 22px;
    color: var(--primary-2);
}

body.reelsy-landing .rlz-role-card h3 {
    font-size: 19px;
    margin-bottom: 6px;
}

body.reelsy-landing .rlz-role-price {
    font-size: 15px;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--muted-2);
    text-decoration: line-through;
    text-decoration-color: rgba(100, 116, 139, 0.5);
    margin-bottom: 2px;
}

body.reelsy-landing .rlz-role-price span {
    font-size: 13px;
    color: var(--muted-2);
    font-weight: 400;
    text-decoration: none;
}

body.reelsy-landing .rlz-role-ref {
    font-size: 12px;
    color: var(--muted-2);
    margin-bottom: 16px;
}

body.reelsy-landing .rlz-role-card p.rlz-desc {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 18px;
}

body.reelsy-landing .rlz-role-included {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--success);
}

body.reelsy-landing .rlz-role-included iconify-icon {
    font-size: 15px;
}

/* ===== Process ===== */
body.reelsy-landing .rlz-process-track {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    position: relative;
}

@media (max-width: 1100px) {
    body.reelsy-landing .rlz-process-track {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    body.reelsy-landing .rlz-process-track {
        grid-template-columns: 1fr;
    }
}

body.reelsy-landing .rlz-process-track::before {
    content: '';
    position: absolute;
    top: 26px;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border) 15%, var(--border) 85%, transparent);
    z-index: 0;
}

@media (max-width: 900px) {
    body.reelsy-landing .rlz-process-track::before {
        display: none;
    }
}

body.reelsy-landing .rlz-process-step {
    position: relative;
    z-index: 1;
    padding: 24px 20px;
    text-align: left;
}

body.reelsy-landing .rlz-process-num {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(79, 70, 229, 0.15));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--primary-2);
}

body.reelsy-landing .rlz-process-step h3 {
    font-size: 17px;
    margin-bottom: 8px;
}

body.reelsy-landing .rlz-process-step p {
    font-size: 14px;
    color: var(--muted);
}

/* ===== Tools tabs ===== */
body.reelsy-landing .rlz-tab-nav {
    position: relative;
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    padding: 6px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
}

body.reelsy-landing .rlz-tab-thumb {
    position: absolute;
    top: 6px;
    left: 6px;
    bottom: 6px;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
    transition: transform 460ms var(--ease-out), width 460ms var(--ease-out);
    z-index: 0;
}

body.reelsy-landing .rlz-tab-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    border: none;
    transition: color 320ms var(--ease-out);
    cursor: pointer;
}

body.reelsy-landing .rlz-tab-btn iconify-icon {
    font-size: 17px;
    transition: transform 420ms var(--ease-out);
}

body.reelsy-landing .rlz-tab-btn:hover {
    color: var(--fg);
}

body.reelsy-landing .rlz-tab-btn.is-active {
    color: #fff;
}

body.reelsy-landing .rlz-tab-btn.is-active iconify-icon {
    transform: scale(1.12) rotate(-8deg);
}

@media (max-width: 720px) {
    /* На широком экране это одна строка — идеальная "таблетка" (radius:999px)
       смотрится нормально. На мобильном кнопки переносятся в несколько строк,
       и та же radius:999px растягивает углы контейнера так, что вёрстка
       выглядит перекошенной. Плюс без justify-content ряды с разной шириной
       кнопок прижимались к левому краю неровной "лесенкой". */
    body.reelsy-landing .rlz-tab-nav {
        border-radius: var(--radius-lg);
        justify-content: center;
        gap: 6px;
    }

    body.reelsy-landing .rlz-tab-thumb {
        display: none;
    }

    body.reelsy-landing .rlz-tab-btn {
        justify-content: center;
    }

    body.reelsy-landing .rlz-tab-btn.is-active {
        background: linear-gradient(135deg, var(--primary), var(--primary-2));
        box-shadow: var(--shadow-2);
    }
}

body.reelsy-landing .rlz-tab-panels {
    position: relative;
    overflow: hidden;
    transition: height 460ms var(--ease-out);
}

body.reelsy-landing .rlz-tab-panel {
    display: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}

body.reelsy-landing .rlz-tab-panel.is-active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
}

body.reelsy-landing .rlz-tab-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    body.reelsy-landing .rlz-tab-panel.is-active {
        grid-template-columns: 1fr;
    }
}

body.reelsy-landing .rlz-tab-panel-media .rlz-img-frame {
    aspect-ratio: 16 / 9;
}

body.reelsy-landing .rlz-tab-panel-body h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

body.reelsy-landing .rlz-tab-panel-body > p {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 24px;
}

body.reelsy-landing .rlz-mini-accordion {
    margin-bottom: 24px;
}

body.reelsy-landing .rlz-acc-item {
    border-bottom: 1px solid var(--border);
}

body.reelsy-landing .rlz-acc-trigger {
    width: 100%;
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14.5px;
    gap: 10px;
    padding: 14px 0;
    background: none;
    border: none;
    text-align: left;
    color: var(--fg);
}

body.reelsy-landing .rlz-acc-chevron {
    width: 16px;
    height: 16px;
    color: var(--muted-2, var(--muted));
    transition: transform 320ms var(--ease-out), color 320ms var(--ease-out);
    flex-shrink: 0;
}

body.reelsy-landing .rlz-acc-item.is-open .rlz-acc-trigger {
    color: var(--primary-2);
}

body.reelsy-landing .rlz-acc-item.is-open .rlz-acc-chevron {
    transform: rotate(180deg);
    color: var(--primary-2);
}

body.reelsy-landing .rlz-mini-q {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.reelsy-landing .rlz-mini-q svg {
    width: 15px;
    height: 15px;
    color: var(--primary-2);
    flex-shrink: 0;
}

body.reelsy-landing .rlz-acc-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 380ms var(--ease-out);
}

body.reelsy-landing .rlz-acc-item.is-open .rlz-acc-panel {
    grid-template-rows: 1fr;
}

body.reelsy-landing .rlz-acc-panel-inner {
    overflow: hidden;
    min-height: 0;
}

body.reelsy-landing .rlz-acc-panel-inner p {
    padding-top: 2px;
    padding-bottom: 14px;
    color: var(--muted);
    font-size: 14px;
}

/* ===== Features ===== */
body.reelsy-landing .rlz-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

@media (max-width: 1024px) {
    body.reelsy-landing .rlz-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    body.reelsy-landing .rlz-features-grid {
        grid-template-columns: 1fr;
    }
}

body.reelsy-landing .rlz-feature-card {
    padding: 24px;
}

body.reelsy-landing .rlz-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(79, 70, 229, 0.15));
    font-size: 20px;
    color: var(--primary-2);
}

body.reelsy-landing .rlz-feature-card h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

body.reelsy-landing .rlz-feature-card p {
    font-size: 13.5px;
    color: var(--muted);
}

/* ===== Cost compare ===== */
body.reelsy-landing .rlz-cost-wrap {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: stretch;
}

@media (max-width: 900px) {
    body.reelsy-landing .rlz-cost-wrap {
        grid-template-columns: 1fr;
    }

    body.reelsy-landing .rlz-cost-vs {
        display: none;
    }
}

body.reelsy-landing .rlz-cost-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    align-self: center;
    background: linear-gradient(135deg, var(--primary), var(--indigo));
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    box-shadow: var(--shadow-2);
}

body.reelsy-landing .rlz-cost-card {
    padding: 32px;
}

body.reelsy-landing .rlz-cost-card.rlz-bad {
    border-color: rgba(248, 113, 113, 0.3);
}

body.reelsy-landing .rlz-cost-card.rlz-good {
    border-color: rgba(52, 211, 153, 0.35);
    background: linear-gradient(160deg, rgba(52, 211, 153, 0.06), rgba(14, 165, 233, 0.03));
}

body.reelsy-landing .rlz-cost-card h3 {
    font-size: 15px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
}

body.reelsy-landing .rlz-cost-price {
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 4px;
}

body.reelsy-landing .rlz-cost-card.rlz-bad .rlz-cost-price {
    color: var(--danger);
}

body.reelsy-landing .rlz-cost-card.rlz-good .rlz-cost-price {
    color: var(--success);
}

body.reelsy-landing .rlz-cost-time {
    font-size: 14px;
    color: var(--muted-2);
    margin-bottom: 22px;
}

body.reelsy-landing .rlz-cost-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.reelsy-landing .rlz-cost-list li {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--muted);
    padding: 9px 0;
    border-top: 1px solid var(--border);
}

body.reelsy-landing .rlz-cost-list li:first-child {
    border-top: none;
}

body.reelsy-landing .rlz-cost-list li span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.reelsy-landing .rlz-cost-list li span:first-child svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

body.reelsy-landing .rlz-cost-card.rlz-bad .rlz-cost-list svg {
    color: var(--danger);
}

body.reelsy-landing .rlz-cost-card.rlz-good .rlz-cost-list svg {
    color: var(--success);
}

body.reelsy-landing .rlz-mid-cta {
    text-align: center;
    margin-top: 40px;
}

body.reelsy-landing .rlz-mid-cta p {
    color: var(--muted);
    font-size: 16px;
    margin-bottom: 18px;
}

/* ===== Pricing ===== */
body.reelsy-landing .rlz-value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    body.reelsy-landing .rlz-value-grid {
        grid-template-columns: 1fr;
    }
}

body.reelsy-landing .rlz-value-card {
    padding: 22px;
    text-align: center;
}

body.reelsy-landing .rlz-value-card .rlz-feature-icon {
    margin: 0 auto 14px;
}

body.reelsy-landing .rlz-value-card h3 {
    font-size: 15.5px;
    margin-bottom: 6px;
}

body.reelsy-landing .rlz-value-card p {
    font-size: 13.5px;
    color: var(--muted);
}

body.reelsy-landing .rlz-pricing-wrap {
    max-width: 460px;
    margin: 0 auto;
}

body.reelsy-landing .rlz-price-card {
    padding: 40px 32px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(14, 165, 233, 0.4);
    box-shadow: var(--shadow-3);
}

body.reelsy-landing .rlz-price-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--primary-2);
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.3);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 18px;
}

body.reelsy-landing .rlz-price-amount {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 4px;
}

body.reelsy-landing .rlz-price-amount span {
    font-size: 16px;
    color: var(--muted-2);
    font-weight: 400;
    font-family: var(--font-body);
}

body.reelsy-landing .rlz-price-tokens {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 26px;
}

body.reelsy-landing .rlz-price-features {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

body.reelsy-landing .rlz-price-features li {
    display: flex;
    gap: 10px;
    font-size: 14.5px;
    padding: 9px 0;
    color: var(--fg);
}

body.reelsy-landing .rlz-price-features li svg {
    width: 18px;
    height: 18px;
    color: var(--success);
    flex-shrink: 0;
    margin-top: 1px;
}

body.reelsy-landing .rlz-price-note {
    text-align: center;
    font-size: 12.5px;
    color: var(--muted-2);
    margin-top: 14px;
}

/* ===== FAQ ===== */
body.reelsy-landing .rlz-faq-wrap {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.reelsy-landing .rlz-faq-item {
    padding: 6px 8px;
}

body.reelsy-landing .rlz-faq-item summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    font-weight: 600;
    font-size: 15.5px;
    gap: 12px;
}

body.reelsy-landing .rlz-faq-item summary::-webkit-details-marker {
    display: none;
}

body.reelsy-landing .rlz-faq-item summary > svg {
    width: 20px;
    height: 20px;
    color: var(--muted);
    transition: transform 260ms var(--ease-out);
    flex-shrink: 0;
}

body.reelsy-landing .rlz-faq-q {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.reelsy-landing .rlz-faq-q svg {
    width: 18px;
    height: 18px;
    color: var(--primary-2);
    flex-shrink: 0;
}

body.reelsy-landing .rlz-faq-item[open] summary svg {
    transform: rotate(180deg);
    color: var(--primary-2);
}

body.reelsy-landing .rlz-faq-item p {
    padding: 0 16px 18px;
    color: var(--muted);
    font-size: 14.5px;
}

body.reelsy-landing .rlz-faq-contact {
    text-align: center;
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

body.reelsy-landing .rlz-faq-contact a {
    color: var(--primary-2);
    font-weight: 600;
}

/* ===== SEO landing intro ===== */
body.reelsy-landing .rlz-seo-intro {
    max-width: 820px;
    margin: 0 auto;
}

body.reelsy-landing .rlz-seo-intro__p {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--rlz-text-muted, #64748b);
    margin: 0 0 1.25rem;
}

body.reelsy-landing .rlz-seo-intro__p:last-child {
    margin-bottom: 0;
}

body.reelsy-landing .rlz-seo-intro__p strong {
    color: var(--rlz-text, #0f172a);
    font-weight: 600;
}

/* ===== SEO-текст под FAQ ===== */
body.reelsy-landing .rlz-seo-text {
    max-width: 820px;
    margin: 0 auto;
}

body.reelsy-landing .rlz-seo-text__title {
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    line-height: 1.3;
    margin: 0 0 1.1rem;
}

body.reelsy-landing .rlz-seo-text__p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--rlz-text-muted, #64748b);
    margin: 0 0 1.05rem;
}

body.reelsy-landing .rlz-seo-text__p:last-child {
    margin-bottom: 0;
}

body.reelsy-landing .rlz-seo-text__p strong {
    color: var(--rlz-text, #0f172a);
    font-weight: 600;
}

/* ===== Final CTA ===== */
body.reelsy-landing .rlz-final-cta {
    padding: 64px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(14, 165, 233, 0.14), rgba(79, 70, 229, 0.1));
}

body.reelsy-landing .rlz-final-cta h2 {
    font-size: clamp(26px, 4vw, 38px);
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

body.reelsy-landing .rlz-final-cta p {
    color: var(--muted);
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Latest reels (динамическая секция, использует общий .reel-card) ===== */
body.reelsy-landing #latest-reels .rlz-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    max-width: none;
}

/* ===== Footer ===== */
body.reelsy-landing .rlz-footer {
    padding: var(--space-4) 0 var(--space-3);
    background: linear-gradient(160deg, #0b1e33 0%, #0f2c47 55%, #0b1e33 100%);
    color: rgba(255, 255, 255, 0.82);
}

body.reelsy-landing .rlz-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 36px;
    padding-top: var(--space-4);
}

@media (max-width: 768px) {
    body.reelsy-landing .rlz-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    body.reelsy-landing .rlz-footer-grid {
        grid-template-columns: 1fr;
    }
}

body.reelsy-landing .rlz-footer-brand .rlz-logo {
    color: #fff;
}

body.reelsy-landing .rlz-footer-brand p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13.5px;
    margin-top: 12px;
    max-width: 320px;
    line-height: 1.6;
}

body.reelsy-landing .rlz-footer-col h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.reelsy-landing .rlz-footer-col h4 svg {
    width: 15px;
    height: 15px;
    color: var(--primary);
    flex-shrink: 0;
}

body.reelsy-landing .rlz-footer-col a,
body.reelsy-landing .rlz-footer-col span {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.82);
    padding: 6px 0;
    text-decoration: none;
    transition: color 220ms var(--ease-out), padding-left 220ms var(--ease-out);
}

body.reelsy-landing .rlz-footer-col a:hover {
    color: #fff;
    padding-left: 4px;
}

body.reelsy-landing .rlz-footer-col span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
    line-height: 1.55;
}

body.reelsy-landing .rlz-footer-legal {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 24px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.65;
}

body.reelsy-landing .rlz-footer-legal p {
    margin-bottom: 8px;
}

body.reelsy-landing .rlz-footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 18px;
}

body.reelsy-landing .rlz-footer-bottom a {
    color: #7dd3fc;
    font-weight: 600;
}

body.reelsy-landing .rlz-footer-bottom a:hover {
    color: #bae6fd;
}

/* ===== Демо-доступ: акцентная CTA-кнопка в футере ===== */
body.reelsy-landing .rlz-footer-col a.rlz-btn-demo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 18px;
    margin: 8px 0 12px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 55%, #0284c7 100%);
    box-shadow: 0 10px 26px rgba(14, 165, 233, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
    animation: rlzDemoPulse 2.6s ease-in-out infinite;
    transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}

body.reelsy-landing .rlz-footer-col a.rlz-btn-demo svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

body.reelsy-landing .rlz-footer-col a.rlz-btn-demo:hover {
    color: #fff;
    padding-left: 18px;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 16px 34px rgba(14, 165, 233, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.24) inset;
    animation-play-state: paused;
}

@keyframes rlzDemoPulse {
    0%, 100% {
        box-shadow: 0 10px 26px rgba(14, 165, 233, 0.45), 0 0 0 0 rgba(56, 189, 248, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
    }
    50% {
        box-shadow: 0 10px 26px rgba(14, 165, 233, 0.55), 0 0 0 9px rgba(56, 189, 248, 0), 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
    }
}

/* ===== Reveal / stagger ===== */
body.reelsy-landing .rlz-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}

body.reelsy-landing .rlz-reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

body.reelsy-landing .rlz-stagger.in-view > * {
    animation: rlzStaggerUp 600ms var(--ease-out) both;
}

body.reelsy-landing .rlz-stagger.in-view > *:nth-child(1) { animation-delay: 0ms; }
body.reelsy-landing .rlz-stagger.in-view > *:nth-child(2) { animation-delay: 80ms; }
body.reelsy-landing .rlz-stagger.in-view > *:nth-child(3) { animation-delay: 160ms; }
body.reelsy-landing .rlz-stagger.in-view > *:nth-child(4) { animation-delay: 240ms; }
body.reelsy-landing .rlz-stagger.in-view > *:nth-child(5) { animation-delay: 320ms; }
body.reelsy-landing .rlz-stagger.in-view > *:nth-child(6) { animation-delay: 400ms; }
body.reelsy-landing .rlz-stagger.in-view > *:nth-child(7) { animation-delay: 480ms; }
body.reelsy-landing .rlz-stagger.in-view > *:nth-child(8) { animation-delay: 560ms; }

@keyframes rlzStaggerUp {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    body.reelsy-landing .rlz-reveal,
    body.reelsy-landing .rlz-stagger > *,
    body.reelsy-landing .rlz-blob,
    body.reelsy-landing .rlz-hero-float {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* =========================================================================
   Общие компоненты кабинета (не трогаем — используются на app-страницах)
   ========================================================================= */
:root {
    --rlz-font-heading: 'Space Grotesk', 'PT Sans', sans-serif;
    --rlz-font-body: 'Inter', 'PT Sans', system-ui, sans-serif;
    --rlz-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --rlz-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --rlz-dur: 240ms;
    --rlz-surface: #ffffff;
    --rlz-border: rgba(14, 116, 180, 0.12);
    --rlz-border-strong: rgba(14, 116, 180, 0.32);
    --rlz-shadow-1: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 1px rgba(15, 23, 42, 0.03);
    --rlz-shadow-2: 0 8px 20px rgba(14, 116, 180, 0.10), 0 2px 6px rgba(15, 23, 42, 0.05);
    --rlz-shadow-3: 0 22px 46px rgba(14, 116, 180, 0.16), 0 6px 14px rgba(15, 23, 42, 0.07);
    --rlz-r-sm: 12px;
    --rlz-r-md: 16px;
    --rlz-r-lg: 22px;
    --rlz-r-pill: 999px;
}

body:has(#main-wrapper) {
    font-family: var(--rlz-font-body) !important;
}

body:has(#main-wrapper) .cab-logo {
    font-family: var(--rlz-font-heading) !important;
}

body:has(#main-wrapper) a,
body:has(#main-wrapper) button,
body:has(#main-wrapper) .btn {
    transition: transform var(--rlz-dur) var(--rlz-ease), box-shadow var(--rlz-dur) var(--rlz-ease), background var(--rlz-dur) var(--rlz-ease), border-color var(--rlz-dur) var(--rlz-ease), color var(--rlz-dur) var(--rlz-ease);
}

body:has(#main-wrapper) .btn {
    border-radius: var(--rlz-r-pill) !important;
}

body:has(#main-wrapper) .btn:hover {
    transform: translateY(-2px);
}

body:has(#main-wrapper) .btn:active {
    transform: translateY(0) scale(0.97);
}

body:has(#main-wrapper) .btn-primary {
    box-shadow: var(--rlz-shadow-2);
}

body:has(#main-wrapper) .card,
body:has(#main-wrapper) .reel-card.card {
    background: var(--rlz-surface) !important;
    border: 1px solid var(--rlz-border) !important;
    border-radius: var(--rlz-r-lg) !important;
    box-shadow: var(--rlz-shadow-2) !important;
    transition: transform var(--rlz-dur) var(--rlz-ease), box-shadow var(--rlz-dur) var(--rlz-ease), border-color var(--rlz-dur) var(--rlz-ease);
}

body:has(#main-wrapper) .reel-card.card:hover {
    transform: translateY(-5px);
    border-color: var(--rlz-border-strong) !important;
    box-shadow: var(--rlz-shadow-3) !important;
}

.reel-media {
    border-radius: var(--rlz-r-sm) !important;
    background: linear-gradient(160deg, #0f2c47, #0a1b2e) !important;
}

.reel-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(2, 6, 23, 0.55) 100%);
    pointer-events: none;
    z-index: 1;
}

.reel-card.card {
    padding: 14px !important;
    display: flex;
    flex-direction: column;
}

/* Прижимаем CTA "AI-разбор" к низу карточки — чтобы кнопка не "съезжала"
   из-за разной длины подписи/адреса у разных роликов */
.reel-analiz-cta {
    margin-top: auto !important;
}

/* ===== Метрики поверх превью (заменяют прежний блок под картинкой) ===== */
.reel-onimage-stats {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity var(--rlz-dur) var(--rlz-ease);
}

.reel-onimage-stats__item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 800;
    font-family: var(--rlz-font-heading, inherit);
    white-space: nowrap;
}

.reel-onimage-stats__item iconify-icon {
    font-size: 1.05rem;
    opacity: 0.9;
}

/* ===== Колонка действий на превью: избранное / Instagram / скачать ===== */
.reel-overlay-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: auto;
}

.reel-overlay-actions__form {
    display: contents;
}

.reel-overlay-actions__btn {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    text-decoration: none;
    transition: transform 150ms var(--rlz-ease-spring), background var(--rlz-dur) var(--rlz-ease), color var(--rlz-dur) var(--rlz-ease);
}

.reel-overlay-actions__btn:hover {
    transform: scale(1.1);
    background: rgba(15, 23, 42, 0.64);
    color: #fff;
}

.reel-overlay-actions__btn iconify-icon,
.reel-overlay-actions__btn svg {
    width: 15px;
    height: 15px;
}

.reel-overlay-actions__btn.is-active {
    background: rgba(244, 63, 94, 0.4);
    border-color: rgba(244, 63, 94, 0.6);
    color: #fff;
}

.reel-overlay-actions__btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

@keyframes reel-fav-pop {
    0% {
        transform: scale(1);
    }
    45% {
        transform: scale(1.28);
    }
    100% {
        transform: scale(1);
    }
}

.reel-overlay-actions__btn.reel-fav-pop {
    animation: reel-fav-pop 400ms var(--rlz-ease-spring, ease);
}

.reel-fav-spark-burst {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.reel-fav-spark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    margin: -2px 0 0 -2px;
    border-radius: 999px;
    background: #f43f5e;
    transform: rotate(var(--angle)) translateX(0) scale(1);
    opacity: 1;
    animation: reel-fav-spark-fly 550ms ease-out forwards;
}

@keyframes reel-fav-spark-fly {
    to {
        transform: rotate(var(--angle)) translateX(18px) scale(0.2);
        opacity: 0;
    }
}

.reel-media.is-engaged .reel-overlay-actions {
    opacity: 0;
    pointer-events: none;
}

/* ===== Аватар с фолбэком на инициалы ===== */
.reel-avatar-wrap {
    position: relative;
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    flex-shrink: 0;
}

.reel-detail-media .reel-avatar-wrap {
    width: 44px;
    height: 44px;
}

.reel-avatar-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    font-family: var(--rlz-font-heading, inherit);
    letter-spacing: 0.02em;
}

.reel-avatar-fallback--0 { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.reel-avatar-fallback--1 { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.reel-avatar-fallback--2 { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.reel-avatar-fallback--3 { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.reel-avatar-fallback--4 { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.reel-avatar-fallback--5 { background: linear-gradient(135deg, #2dd4bf, #0d9488); }

.reel-media.is-engaged .reel-onimage-stats {
    opacity: 0;
}

/* Компактный бейдж виральности/прироста — иконка + число, без подписи */
.reel-stats-overlay__pill {
    border-radius: 999px !important;
    padding: 0.3rem 0.6rem !important;
}

.reel-stats-overlay__pill-sub {
    display: none;
}

.reel-stats-overlay__pill--viral {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.95), rgba(2, 132, 199, 0.95)) !important;
}

/* ===== CTA «AI-сценарий Reels» — зелёная объёмная кнопка ===== */
.reel_analiz {
    margin-top: auto;
}

.reel-analiz-cta {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 0.72rem 0.9rem !important;
    border-radius: var(--rlz-r-sm, 12px) !important;
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 42%, #16a34a 100%) !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
    text-align: center;
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        0 4px 0 #15803d,
        0 8px 18px rgba(22, 163, 74, 0.42);
    transition: transform var(--rlz-dur) var(--rlz-ease), box-shadow var(--rlz-dur) var(--rlz-ease), filter var(--rlz-dur) var(--rlz-ease);
    height: auto !important;
}

.reel-analiz-cta__text {
    display: block;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.reel-analiz-cta__sub {
    display: block;
    font-weight: 600;
    font-size: 0.74rem;
    opacity: 0.92;
}

.reel-analiz-cta iconify-icon {
    font-size: 1.15rem !important;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

.reel-analiz-cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 6px 0 #15803d,
        0 14px 26px rgba(22, 163, 74, 0.48);
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 42%, #16a34a 100%) !important;
    color: #fff !important;
}

.reel-analiz-cta:active {
    transform: translateY(2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 2px 0 #15803d,
        0 5px 12px rgba(22, 163, 74, 0.32);
}

.reel-analiz-cta--locked {
    background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 55%, #64748b 100%) !important;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 3px 0 #475569,
        0 6px 14px rgba(100, 116, 139, 0.28);
}

.reel-analiz-cta--locked:hover {
    filter: none;
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 4px 0 #475569,
        0 8px 18px rgba(100, 116, 139, 0.32);
}

/* ===== Плеер: прогресс-бар + панель управления ===== */
.reel-player-controls {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity var(--rlz-dur) var(--rlz-ease), transform var(--rlz-dur) var(--rlz-ease);
}

.reel-media.is-engaged .reel-player-controls {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.reel-media.is-playing .reel-play-btn {
    opacity: 0;
    pointer-events: none;
}

.reel-progress {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    overflow: hidden;
}

.reel-progress__fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
    transition: width 150ms linear;
}

.reel-controls-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.reel-ctrl-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #fff;
    cursor: pointer;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
    transition: background var(--rlz-dur) var(--rlz-ease), transform 150ms var(--rlz-ease-spring);
}

.reel-ctrl-btn:hover {
    background: rgba(14, 165, 233, 0.85);
    transform: scale(1.08);
}

.reel-ctrl-icon {
    width: 19px;
    height: 19px;
}

.reel-time {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
    margin-left: auto;
    padding-right: 4px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ===== Play-кнопка: компактная, только по наведению ===== */
.reel-play-btn {
    width: 2.75rem !important;
    height: 2.75rem !important;
    background: rgba(15, 23, 42, 0.58) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.85);
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.reel-play-btn::before {
    display: none;
}

.reel-play-btn .reel-play-icon {
    width: 1.1rem !important;
    height: 1.1rem !important;
    margin-left: 2px;
}

.reel-media:not(.is-playing):hover .reel-play-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.reel-play-btn:hover {
    background: rgba(15, 23, 42, 0.72) !important;
    transform: translate(-50%, -50%) scale(1.06) !important;
}

@media (hover: none) {
    .reel-media:not(.is-playing) .reel-play-btn {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, -50%) scale(1);
    }
}

.reel-card-metrics {
    background: transparent !important;
    border: none !important;
    border-top: 1px solid var(--rlz-border) !important;
    border-radius: 0 !important;
    padding: 0.7rem 0 0 !important;
    margin-top: 0.75rem !important;
}

.reel-metric {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.reel-metric--primary {
    background: transparent !important;
    border: none !important;
}

.reel-metric__icon {
    display: none;
}

.reel-metric__value {
    font-family: var(--rlz-font-heading);
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    white-space: nowrap;
}

.reel-metric__label {
    font-size: 0.54rem !important;
    letter-spacing: 0 !important;
    white-space: nowrap;
}

.reel-channel__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.15em;
}

.reel-channel__subline {
    min-height: 1.1em;
}

.reel-card-metrics__meta {
    border-top: none !important;
    padding-top: 0.35rem !important;
    margin-top: 0.15rem !important;
}

.reel-channel {
    border-top: 1px solid var(--rlz-border) !important;
}

.reel-avatar {
    border-color: var(--rlz-border) !important;
}

.reel-play-btn {
    box-shadow: var(--rlz-shadow-2);
    transition: transform var(--rlz-dur) var(--rlz-ease-spring), box-shadow var(--rlz-dur) var(--rlz-ease), background var(--rlz-dur) var(--rlz-ease);
}

.reel-play-btn::before {
    animation: rlzPulse 2.6s var(--rlz-ease) infinite;
}

.reel-media.is-playing .reel-play-btn::before {
    animation: none;
}

.reel-card:hover .reel-play-btn {
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: var(--rlz-shadow-3);
}

@keyframes rlzPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.35); }
    50% { box-shadow: 0 0 0 10px rgba(14, 165, 233, 0); }
}

/* ===== Чат-сценарист: сплит-экран, стиль в духе Claude ===== */
.rlz-chat-layout {
    min-height: 560px;
}

.rlz-chat-layout {
    align-items: stretch;
}

.rlz-chat-layout .card {
    height: 70vh;
    max-height: 70vh;
    min-height: 560px;
    overflow: hidden;
}

/* Flex-контейнер без min-height:0 не сжимается под контент, а растёт вместе с ним —
   из-за этого вся карточка (и страница) раздувалась вместо внутреннего скролла окон. */
.rlz-chat-layout .card > .card-body {
    min-height: 0;
    overflow: hidden;
}

.rlz-chat-layout .card > .card-body > *:not(.rlz-scenario-doc-wrap):not(.rlz-chat-messages):not(#rlz-chat-pending) {
    flex-shrink: 0;
}

.rlz-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1.5rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.rlz-chat-turn {
    display: flex;
    gap: 10px;
    max-width: 100%;
}

.rlz-chat-turn--user {
    justify-content: flex-end;
}

.rlz-chat-avatar {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-top: 2px;
}

.rlz-chat-bubble {
    font-size: 0.94rem;
    line-height: 1.6;
    white-space: pre-wrap;
    color: #0f172a;
}

.rlz-chat-turn--assistant .rlz-chat-bubble {
    max-width: 100%;
    padding: 0;
    background: transparent;
}

.rlz-chat-turn--user .rlz-chat-bubble {
    max-width: 82%;
    padding: 0.65rem 1rem;
    border-radius: 16px 16px 4px 16px;
    background: #eef4fb;
    color: #0f172a;
}

.rlz-chat-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.rlz-chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #94a3b8;
    animation: rlzTypingBounce 1.2s var(--rlz-ease, ease) infinite;
}

.rlz-chat-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.rlz-chat-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes rlzTypingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.rlz-chat-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0 1rem 0.85rem;
    padding: 0.55rem 0.6rem 0.55rem 1rem;
    border: 1px solid var(--rlz-border, rgba(14, 116, 180, 0.12));
    border-radius: 20px;
    background: #f8fafc;
    transition: border-color 200ms var(--rlz-ease, ease), background 200ms var(--rlz-ease, ease);
}

.rlz-chat-input-row:focus-within {
    border-color: var(--reelsy-blue, #0ea5e9);
    background: #fff;
}

.rlz-chat-input-row textarea {
    resize: none;
    border: none !important;
    background: transparent !important;
    padding: 0.4rem 0 !important;
    box-shadow: none !important;
}

.rlz-chat-input-row .btn {
    flex-shrink: 0;
    height: 36px;
    width: 36px;
    border-radius: 999px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.rlz-chat-pending {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* ===== Тулбар над сценарием ===== */
.rlz-scenario-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--rlz-border, rgba(14, 116, 180, 0.12));
}

.rlz-scenario-toolbar__title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
}

.rlz-scenario-toolbar__status {
    font-size: 0.78rem;
    color: #94a3b8;
    min-width: 0;
}

.rlz-scenario-toolbar__status--ok {
    color: #16a34a;
}

.rlz-scenario-toolbar__status--err {
    color: #dc2626;
}

.rlz-scenario-toolbar__actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.rlz-scenario-toolbar__btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: background 200ms var(--rlz-ease, ease), color 200ms var(--rlz-ease, ease);
}

.rlz-scenario-toolbar__btn:hover:not(:disabled) {
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}

.rlz-scenario-toolbar__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.rlz-scenario-doc-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    border-radius: var(--rlz-r-sm, 12px);
}

/* ===== Сценарий как документ, редактируется прямо в отформатированном виде ===== */
.rlz-scenario-doc {
    min-height: 420px;
    padding: 4px 4px 4px 2px;
    font-family: var(--rlz-font-body, inherit);
    color: #0f172a;
}

.rlz-scenario-doc:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    font-size: 0.9rem;
}

.rlz-scenario-doc [contenteditable="true"] {
    border-radius: 4px;
    outline: none;
    transition: background 150ms var(--rlz-ease, ease), box-shadow 150ms var(--rlz-ease, ease);
}

.rlz-scenario-doc [contenteditable="true"]:hover {
    background: rgba(14, 165, 233, 0.06);
}

.rlz-scenario-doc [contenteditable="true"]:focus {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.45);
}

.rlz-scenario-doc__title {
    font-family: var(--rlz-font-heading, inherit);
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 14px;
}

.rlz-scenario-section {
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--rlz-border, rgba(14, 116, 180, 0.12));
    border-radius: var(--rlz-r-sm, 12px);
    background: #fbfdff;
}

.rlz-scenario-section--scene {
    border-left: 3px solid var(--reelsy-blue, #0ea5e9);
    background: linear-gradient(180deg, #f0f9ff 0%, #fbfdff 60px);
}

.rlz-scenario-section__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #0369a1;
    margin-bottom: 10px;
}

.rlz-scenario-time-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #0284c7;
    background: rgba(14, 165, 233, 0.12);
    padding: 2px 8px;
    border-radius: 999px;
}

.rlz-scenario-row {
    display: flex;
    gap: 6px;
    padding: 4px 0;
    font-size: 0.88rem;
    line-height: 1.5;
}

.rlz-scenario-row__label {
    flex-shrink: 0;
    min-width: 140px;
    font-weight: 600;
    color: #64748b;
}

.rlz-scenario-row__value {
    color: #0f172a;
}

.rlz-scenario-p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #0f172a;
    margin-bottom: 8px;
}

.rlz-scenario-list {
    margin: 0 0 8px;
    padding-left: 1.1rem;
}

.rlz-scenario-list li {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #0f172a;
}

@keyframes rlzScenarioFlash {
    0% {
        background: rgba(14, 165, 233, 0.14);
        box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.35);
    }
    100% {
        background: transparent;
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
    }
}

.rlz-scenario-doc-wrap.rlz-scenario-flash {
    animation: rlzScenarioFlash 1.6s ease-out;
}

@media (max-width: 991.98px) {
    .rlz-chat-layout .card {
        height: auto;
        min-height: 420px;
    }


    .rlz-scenario-doc {
        min-height: 300px;
    }
}

/* Custom select (кабинет-фильтры) */
.rlz-select {
    position: relative;
    width: 100%;
}

.rlz-select__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0.5rem 0.85rem;
    background: var(--rlz-surface);
    border: 1px solid var(--rlz-border);
    border-radius: var(--rlz-r-sm);
    box-shadow: var(--rlz-shadow-1);
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f172a;
    cursor: pointer;
    transition: border-color var(--rlz-dur) var(--rlz-ease), box-shadow var(--rlz-dur) var(--rlz-ease), transform 120ms var(--rlz-ease);
    text-align: left;
}

.rlz-select__trigger:hover {
    border-color: var(--rlz-border-strong);
}

.rlz-select__trigger:active {
    transform: scale(0.99);
}

.rlz-select.is-open .rlz-select__trigger,
.rlz-select__trigger:focus-visible {
    outline: none;
    border-color: var(--reelsy-blue, #0ea5e9);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.rlz-select__chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: transform var(--rlz-dur) var(--rlz-ease);
}

.rlz-select.is-open .rlz-select__chevron {
    transform: rotate(180deg);
}

.rlz-select__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 60;
    background: var(--rlz-surface);
    border: 1px solid var(--rlz-border);
    border-radius: var(--rlz-r-md);
    box-shadow: var(--rlz-shadow-3);
    padding: 6px;
    max-height: 280px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 200ms var(--rlz-ease), transform 200ms var(--rlz-ease);
}

.rlz-select.is-open .rlz-select__panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.rlz-select__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
    transition: background var(--rlz-dur) var(--rlz-ease), color var(--rlz-dur) var(--rlz-ease);
}

.rlz-select__option:hover,
.rlz-select__option.is-active {
    background: rgba(14, 165, 233, 0.10);
    color: var(--reelsy-blue-dark, #0284c7);
}

.rlz-select__option.is-selected {
    font-weight: 700;
    color: var(--reelsy-blue-dark, #0284c7);
}

.rlz-select__option svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity var(--rlz-dur) var(--rlz-ease);
}

.rlz-select__option.is-selected svg {
    opacity: 1;
}

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

/* Плавающий индикатор вкладок (кабинет, Bootstrap nav-pills) */
.rlz-tabs {
    position: relative;
}

.rlz-tab-indicator {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: var(--rlz-r-pill);
    background: linear-gradient(135deg, #38bdf8, #0ea5e9, #0284c7);
    box-shadow: var(--rlz-shadow-2);
    z-index: 0;
    transition: transform 320ms var(--rlz-ease), width 320ms var(--rlz-ease);
    pointer-events: none;
    opacity: 0;
}

.rlz-tabs.rlz-tabs--ready .rlz-tab-indicator {
    opacity: 1;
}

.rlz-tabs .nav-link {
    position: relative;
    z-index: 1;
    transition: color var(--rlz-dur) var(--rlz-ease);
}

.rlz-tabs.rlz-tabs--ready .nav-link {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.rlz-tabs.rlz-tabs--ready .nav-link.active {
    color: #fff !important;
}

.rlz-scenarios-group-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #0284c7;
    margin-bottom: 12px;
}

.rlz-scenarios-group-title--muted {
    color: #64748b;
}

.rlz-scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.rlz-scenario-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.rlz-scenario-card__top {
    display: flex;
    gap: 10px;
    padding: 12px;
}

.rlz-scenario-card__thumb {
    width: 56px;
    height: 100px;
    border-radius: 10px;
    background: #0f172a;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.rlz-scenario-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rlz-scenario-card__thumb span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 11px;
}

.rlz-scenario-card__info {
    min-width: 0;
    flex: 1;
}

.rlz-scenario-card__channel {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.rlz-scenario-card__avatar-wrap {
    width: 22px;
    height: 22px;
}

.rlz-scenario-card__avatar-wrap .reel-avatar-fallback {
    font-size: 0.6rem;
    font-weight: 700;
}

.rlz-scenario-card__avatar {
    width: 22px;
    height: 22px;
    border: none;
}

.rlz-scenario-card__username {
    font-size: 12px;
    color: #64748b;
}

.rlz-scenario-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rlz-scenario-card__meta {
    font-size: 12px;
    color: #94a3b8;
}

.rlz-scenario-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #f1f5f9;
}

.rlz-scenario-card__badge {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    text-decoration: none;
}

.rlz-scenario-card__badge--done {
    color: #0284c7;
    background: #e0f2fe;
}

a.rlz-scenario-card__badge--done:hover {
    background: #b5e6fc;
    color: #0369a1;
}

.rlz-scenario-card__badge--progress {
    color: #b45309;
    background: #fef3c7;
}

.rlz-scenario-card__badge--muted {
    color: #64748b;
    background: #f1f5f9;
}

.rlz-scenario-card__cta {
    border: none;
    background: #0ea5e9;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.rlz-scenario-card__cta:hover {
    background: #0284c7;
    color: #fff;
}

.rlz-topic-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.rlz-topic-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.rlz-topic-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.rlz-topic-card__badge {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 999px;
}

.rlz-topic-card__badge--accent {
    color: #0284c7;
    background: #e0f2fe;
}

.rlz-topic-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.rlz-topic-card__date {
    font-size: 12px;
    color: #94a3b8;
}

/* =========================================================================
   Сайдбар кабинета — редизайн (soft-ui) + сворачивание в иконки
   ========================================================================= */
body:has(#main-wrapper) .left-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
    border-right: 1px solid var(--rlz-border);
    box-shadow: 6px 0 28px rgba(14, 116, 180, 0.06);
    transition: width 320ms var(--rlz-ease);
}

body:has(#main-wrapper) .rlz-cab-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.38);
    color: #fff;
    flex-shrink: 0;
}

body:has(#main-wrapper) .rlz-cab-logo-mark svg {
    width: 18px;
    height: 18px;
}

body:has(#main-wrapper) .sidebar-item {
    padding: 0 12px;
    margin-bottom: 3px;
}

body:has(#main-wrapper) .sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px !important;
    border-radius: 12px;
    color: #47607a;
    font-weight: 600;
    font-size: 14px;
    transition: background 220ms var(--rlz-ease), color 220ms var(--rlz-ease);
}

body:has(#main-wrapper) .sidebar-link .aside-icon {
    font-size: 19px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 220ms var(--rlz-ease);
}

body:has(#main-wrapper) .sidebar-link:hover {
    background: rgba(14, 165, 233, 0.08);
    color: #0284c7;
}

body:has(#main-wrapper) .sidebar-link.active {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.32);
}

body:has(#main-wrapper) .sidebar-link.active .aside-icon {
    transform: scale(1.08);
}

body:has(#main-wrapper) .sidebar-item.mgtop {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--rlz-border);
}

/* Кнопка сворачивания на краю сайдбара — по центру высоты, чтобы не наезжать на логотип */
body:has(#main-wrapper) .rlz-sidebar-collapse-btn {
    position: fixed;
    top: 50%;
    left: 260px;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid var(--rlz-border-strong);
    background: #fff;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
    cursor: pointer;
    z-index: 20;
    transition: left 320ms var(--rlz-ease), background 220ms var(--rlz-ease), color 220ms var(--rlz-ease);
}

body:has(#main-wrapper) .rlz-sidebar-collapse-btn:hover {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

#main-wrapper.rlz-sidebar-collapsed .rlz-sidebar-collapse-btn {
    left: 84px;
}

body:has(#main-wrapper) .rlz-sidebar-collapse-btn iconify-icon {
    font-size: 15px;
    transition: transform 320ms var(--rlz-ease);
}

@media (max-width: 1299.98px) {
    body:has(#main-wrapper) .rlz-sidebar-collapse-btn {
        display: none;
    }
}

/* Компактная ссылка на биллинг вместо полной карточки тарифа/токенов в свёрнутом режиме */
body:has(#main-wrapper) .rlz-sidebar-mini-billing {
    display: none;
    width: 44px;
    height: 44px;
    margin: 4px auto 14px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
    font-size: 19px;
    transition: background 220ms var(--rlz-ease), color 220ms var(--rlz-ease), transform 220ms var(--rlz-ease);
}

body:has(#main-wrapper) .rlz-sidebar-mini-billing:hover {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: #fff;
    transform: scale(1.08);
}

/* Общий JS-тултип для подписей в свёрнутом режиме (position:fixed — не обрезается скроллом сайдбара) */
.rlz-sidebar-tooltip {
    position: fixed;
    z-index: 200;
    background: #0f172a;
    color: #fff;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.32);
    opacity: 0;
    transform: translateY(-50%) translateX(-6px);
    pointer-events: none;
    transition: opacity 180ms var(--rlz-ease), transform 180ms var(--rlz-ease);
}

.rlz-sidebar-tooltip::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 4px 5px 4px 0;
    border-style: solid;
    border-color: transparent #0f172a transparent transparent;
}

.rlz-sidebar-tooltip.is-visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@media (min-width: 1300px) {
    #main-wrapper.rlz-sidebar-collapsed .left-sidebar {
        width: 84px;
    }

    #main-wrapper.rlz-sidebar-collapsed .page-wrapper {
        margin-left: 84px;
    }

    #main-wrapper.rlz-sidebar-collapsed .rlz-sidebar-collapse-btn iconify-icon {
        transform: rotate(180deg);
    }

    #main-wrapper.rlz-sidebar-collapsed .brand-logo {
        justify-content: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #main-wrapper.rlz-sidebar-collapsed .cab-logo-text,
    #main-wrapper.rlz-sidebar-collapsed .hide-menu,
    #main-wrapper.rlz-sidebar-collapsed .app-sidebar-account,
    #main-wrapper.rlz-sidebar-collapsed .app-sidebar-support,
    #main-wrapper.rlz-sidebar-collapsed .sidebar-item.mgtop,
    #main-wrapper.rlz-sidebar-collapsed .sidebar-item .btn {
        display: none !important;
    }

    #main-wrapper.rlz-sidebar-collapsed .sidebar-item {
        padding: 0 10px;
        margin-top: 0 !important;
    }

    #main-wrapper.rlz-sidebar-collapsed .sidebar-item:first-child {
        margin-top: 14px !important;
    }

    #main-wrapper.rlz-sidebar-collapsed .sidebar-link {
        display: flex !important;
        width: 100%;
        justify-content: center !important;
        gap: 0 !important;
        padding: 12px !important;
    }

    #main-wrapper.rlz-sidebar-collapsed .sidebar-link > .d-flex {
        justify-content: center;
        width: 100%;
    }

    /* В свёрнутом виде подписи скрыты — иконки крупнее и точно по центру колонки */
    #main-wrapper.rlz-sidebar-collapsed .sidebar-link .aside-icon {
        width: 24px;
        height: 24px;
        font-size: 24px;
    }

    /* Мини-версия карточки тарифа/токенов вместо полной (текстовой) */
    #main-wrapper.rlz-sidebar-collapsed .rlz-sidebar-mini-billing {
        display: flex !important;
    }

    /* Premium-CTA сжимается до иконки-кружка */
    #main-wrapper.rlz-sidebar-collapsed .reelsy-sidebar-premium-wrap {
        padding: 0 10px;
    }

    #main-wrapper.rlz-sidebar-collapsed .reelsy-sidebar-premium-cta {
        width: 44px;
        height: 44px;
        padding: 0 !important;
        border-radius: 999px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }

    #main-wrapper.rlz-sidebar-collapsed .reelsy-sidebar-premium-cta span {
        display: none;
    }
}

/* =========================================================================
   Глобальный редизайн кабинета — общие компоненты Bootstrap
   (только CSS, без правок разметки — каскадится на все app-страницы)
   ========================================================================= */

/* ---- Фон страницы: лёгкий градиент вместо плоского белого ---- */
body:has(#main-wrapper) .body-wrapper {
    background: linear-gradient(180deg, #f4faff 0%, #eef6fb 100%);
    min-height: 100vh;
}

/* ---- Заголовок страницы (топбар + хлебные крошки) ----
   Намеренно без своей рамки/тени — это не отдельная карточка, а лёгкая
   шапка страницы; иначе она визуально спорит с первым блоком контента под ней. */
body:has(#main-wrapper) .app-breadcrumb-nav {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--rlz-border) !important;
    padding: 4px 0 14px !important;
    margin-bottom: 28px !important;
    box-shadow: none !important;
}

body:has(#main-wrapper) .app-breadcrumb-list {
    font-size: 1rem;
}

body:has(#main-wrapper) .app-breadcrumb-list .breadcrumb-item.active {
    color: #0284c7;
    font-weight: 700;
}

body:has(#main-wrapper) .app-breadcrumb-home-icon {
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.12);
    border-radius: 999px;
    padding: 3px;
    box-sizing: content-box;
}

/* ---- Карточки: заголовки внутри card-body ---- */
body:has(#main-wrapper) .card-body > h1,
body:has(#main-wrapper) .card-body > h2,
body:has(#main-wrapper) .card-body > .h4,
body:has(#main-wrapper) .card-body > .h5 {
    color: #0f172a;
    font-family: var(--rlz-font-heading);
}

/* ---- Таблицы: мягкий современный вид вместо стандартного Bootstrap ---- */
body:has(#main-wrapper) .table {
    --bs-table-bg: transparent;
    border-collapse: separate;
    border-spacing: 0;
}

body:has(#main-wrapper) .table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    background: rgba(14, 165, 233, 0.06);
    border-bottom: none !important;
    padding: 12px 14px;
}

body:has(#main-wrapper) .table thead th:first-child {
    border-top-left-radius: var(--rlz-r-sm);
}

body:has(#main-wrapper) .table thead th:last-child {
    border-top-right-radius: var(--rlz-r-sm);
}

body:has(#main-wrapper) .table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--rlz-border);
    vertical-align: middle;
}

body:has(#main-wrapper) .table tbody tr:last-child td {
    border-bottom: none;
}

body:has(#main-wrapper) .table-hover tbody tr:hover td {
    background: rgba(14, 165, 233, 0.05);
}

/* ---- Алерты: цветной акцент слева + мягкий фон вместо плоских блоков ---- */
body:has(#main-wrapper) .alert {
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: var(--rlz-r-sm);
    box-shadow: var(--rlz-shadow-1);
}

body:has(#main-wrapper) .alert-light {
    background: #f8fafc;
    border-color: var(--rlz-border);
    border-left-color: #94a3b8;
    color: #475569;
}

body:has(#main-wrapper) .alert-info {
    background: #e0f2fe;
    border-color: #bae6fd;
    border-left-color: #0ea5e9;
    color: #075985;
}

body:has(#main-wrapper) .alert-success {
    background: #ecfdf3;
    border-color: #bbf7d0;
    border-left-color: #16a34a;
    color: #166534;
}

body:has(#main-wrapper) .alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    border-left-color: #dc2626;
    color: #991b1b;
}

body:has(#main-wrapper) .alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #d97706;
    color: #92400e;
}

/* ---- Бейджи: мягче стандартных сплошных заливок ---- */
body:has(#main-wrapper) .badge {
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: var(--rlz-r-sm);
    padding: 0.4em 0.7em;
}

body:has(#main-wrapper) .badge.text-bg-light,
body:has(#main-wrapper) .badge.bg-light {
    background: #eef2f6 !important;
    color: #475569 !important;
}

body:has(#main-wrapper) .badge.text-bg-secondary,
body:has(#main-wrapper) .badge.bg-secondary {
    background: rgba(100, 116, 139, 0.14) !important;
    color: #475569 !important;
}

body:has(#main-wrapper) .badge.text-bg-success,
body:has(#main-wrapper) .badge.bg-success {
    background: rgba(22, 163, 74, 0.14) !important;
    color: #166534 !important;
}

body:has(#main-wrapper) .badge.text-bg-warning,
body:has(#main-wrapper) .badge.bg-warning {
    background: rgba(217, 119, 6, 0.16) !important;
    color: #92400e !important;
}

/* ---- Формы ---- */
body:has(#main-wrapper) .form-control,
body:has(#main-wrapper) .form-select {
    border-radius: var(--rlz-r-sm);
    background: #f8fafc;
}

body:has(#main-wrapper) .form-control:focus,
body:has(#main-wrapper) .form-select:focus {
    background: #fff;
}

body:has(#main-wrapper) .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #334155;
}

body:has(#main-wrapper) .form-check-input {
    border-radius: 5px;
    border-width: 2px;
}

body:has(#main-wrapper) .form-check-input:checked {
    background-color: #0ea5e9;
    border-color: #0ea5e9;
}

/* ---- Модальные окна ---- */
body:has(#main-wrapper) .modal-content {
    border: none;
    border-radius: var(--rlz-r-md);
    box-shadow: var(--rlz-shadow-3);
}

body:has(#main-wrapper) .modal-header {
    border-bottom: 1px solid var(--rlz-border);
    padding: 18px 24px;
}

body:has(#main-wrapper) .modal-body {
    padding: 24px;
}

body:has(#main-wrapper) .modal-footer {
    border-top: 1px solid var(--rlz-border);
    padding: 16px 24px;
}

/* ---- Пагинация ---- */
body:has(#main-wrapper) .pagination .page-link {
    border: none;
    border-radius: 999px !important;
    margin: 0 2px;
    color: #475569;
    font-weight: 600;
}

body:has(#main-wrapper) .pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: #fff;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

body:has(#main-wrapper) .pagination .page-link:hover {
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}

/* ---- Выпадающие меню ---- */
body:has(#main-wrapper) .dropdown-menu {
    border: 1px solid var(--rlz-border);
    border-radius: var(--rlz-r-sm);
    box-shadow: var(--rlz-shadow-2);
    padding: 6px;
}

body:has(#main-wrapper) .dropdown-item {
    border-radius: 8px;
    font-weight: 500;
    padding: 8px 12px;
}

body:has(#main-wrapper) .dropdown-item:hover,
body:has(#main-wrapper) .dropdown-item:focus {
    background: rgba(14, 165, 233, 0.08);
    color: #0284c7;
}

/* ---- Вкладки nav-pills / nav-tabs: базовый вид до JS-инициализации бегунка ---- */
body:has(#main-wrapper) .nav-pills .nav-link {
    border-radius: 999px;
    font-weight: 600;
    color: #475569;
}

body:has(#main-wrapper) .nav-pills .nav-link.active {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.3);
}

body:has(#main-wrapper) .nav-tabs {
    border-bottom: 1px solid var(--rlz-border);
}

body:has(#main-wrapper) .nav-tabs .nav-link {
    border: none;
    font-weight: 600;
    color: #64748b;
}

body:has(#main-wrapper) .nav-tabs .nav-link.active {
    color: #0284c7;
    border-bottom: 2px solid #0ea5e9;
    background: transparent;
}
