/* VEO 3.1 — Desktop layout: стиль syntx.ai — чистый, просторный, минималистичный */

/* Базовые оптимизации для стабильного layout на всех экранах */
/* ==========================================================================
   GLOBAL ANIMATION OFF TOGGLE
   ========================================================================== */
/* Только чат и фоновые звёзды — без отключения анимаций у панели промпта / UI */
body.veo-chat-anim-off #veoChatArea,
body.veo-chat-anim-off #veoChatArea *,
body.veo-chat-anim-off #veoChatArea *::before,
body.veo-chat-anim-off #veoChatArea *::after,
body.veo-chat-anim-off .veo-background-animation,
body.veo-chat-anim-off .veo-background-animation *,
body.veo-chat-anim-off .veo-background-animation *::before,
body.veo-chat-anim-off .veo-background-animation *::after {
    animation: none !important;
}

/* Плейсхолдер «идёт генерация» — анимации оставляем даже при «без анимации в чате» */
body.veo-chat-anim-off #veoChatArea .veo-generating-placeholder-shimmer {
    animation: veo-generating-shimmer 2.2s ease-in-out infinite !important;
}
body.veo-chat-anim-off #veoChatArea .veo-generating-loader-ring {
    animation: veo-generating-spin 0.9s linear infinite !important;
}
body.veo-chat-anim-off #veoChatArea .veo-generating-dots span {
    animation: veo-generating-dot 1.1s ease-in-out infinite !important;
}
body.veo-chat-anim-off #veoChatArea .veo-generating-dots span:nth-child(2) {
    animation-delay: 0.15s !important;
}
body.veo-chat-anim-off #veoChatArea .veo-generating-dots span:nth-child(3) {
    animation-delay: 0.3s !important;
}

/* Крестик ошибки: при animation:none штрихи остаются невидимыми — показываем сразу */
body.veo-chat-anim-off #veoChatArea .veo-chat-error-x-arm,
body.veo-chat-anim-off #veoChatArea .veo-chat-error-x-arm--b {
    animation: none !important;
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
}

body.veo-generation-body {
    overflow-x: visible;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.5) rgba(15, 12, 41, 0.9);
    /* Мобилка / дефолт: потолки превью в чате (результат 16:9 / 9:16); ПК — ниже крупнее */
    --veo-d-chat-video-16-9: 460px;
    --veo-d-chat-video-9-16: 236px;
    --veo-d-chat-video-9-16-toolbar: 310px;
    /* 1:1, 4:3, 3:4, 21:9 — чат: потолок ширины рамки результата */
    --veo-d-chat-video-1-1: 340px;
    --veo-d-chat-video-4-3: 420px;
    --veo-d-chat-video-3-4: 300px;
    --veo-d-chat-video-3-4-toolbar: 352px;
    --veo-d-chat-video-21-9: 520px;
    /* Ряд «тулбар + 16:9»: gap + padding тулбара + колонка кнопок (~40px) + бордеры */
    --veo-d-chat-16-9-toolbar-slack: calc(0.75rem + 1rem + 40px + 4px);
}

/* ПК: крупнее превью в ленте чата (16:9 и вертикаль с тулбаром) */
body.veo-generation-body:not(.mobile-version) {
    --veo-d-chat-video-16-9: 460px;
    --veo-d-chat-video-9-16: 264px;
    --veo-d-chat-video-9-16-toolbar: 340px;
    --veo-d-chat-video-1-1: 360px;
    --veo-d-chat-video-4-3: 440px;
    --veo-d-chat-video-3-4: 320px;
    --veo-d-chat-video-3-4-toolbar: 372px;
    --veo-d-chat-video-21-9: 540px;
    /* Увеличенный потолок высоты результата 16:9 (визуально крупнее рядом с левой колонкой кнопок) */
    --veo-result-toolbar-stack-h: calc(200px + 3rem + 2px);
}

/* Глобальный скролл страницы генерации (системный в браузере, фиолетовый космос) */
html:has(body.veo-generation-body)::-webkit-scrollbar,
body.veo-generation-body::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
html:has(body.veo-generation-body)::-webkit-scrollbar-track,
body.veo-generation-body::-webkit-scrollbar-track {
    background: rgba(15, 12, 41, 0.9);
}
html:has(body.veo-generation-body)::-webkit-scrollbar-thumb,
body.veo-generation-body::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.4);
    border-radius: 5px;
    border: 2px solid rgba(15, 12, 41, 0.9);
}
html:has(body.veo-generation-body)::-webkit-scrollbar-thumb:hover,
body.veo-generation-body::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.65);
}

/* Универсальные тултипы Veo — фиолетовый космический стиль */
body.veo-generation-body .veo-tooltip {
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-4px);
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    max-width: 240px;
    color: #e9d5ff;
    background: linear-gradient(135deg, #312e81 0%, #1e1b4b 50%, #0f0c29 100%);
    border: 1px solid rgba(167, 139, 250, 0.5);
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 24px rgba(139, 92, 246, 0.3), 0 0 0 1px rgba(167, 139, 250, 0.2) inset;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 100;
}
body.veo-generation-body .veo-tooltip.veo-tooltip--long {
    white-space: normal;
    max-width: 520px;
    min-width: 320px;
    text-align: center;
    padding: 0.6rem 1rem;
    line-height: 1.4;
}
/* Подсказка у кнопки «Повторить» в тулбаре результата */
body.veo-generation-body .veo-tooltip.veo-tooltip--fit {
    white-space: normal;
    min-width: 260px;
    width: fit-content;
    max-width: min(320px, calc(100vw - 2rem));
    text-align: center;
    padding: 0.5rem 1rem;
    line-height: 1.35;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
}
/* Уже для кнопок "Повторить" в тулбаре результата */
body.veo-generation-body .veo-result-toolbar .veo-toolbar-btn-repeat .veo-tooltip.veo-tooltip--fit,
body.veo-generation-body .veo-result-toolbar .veo-toolbar-btn-repeat-edit .veo-tooltip.veo-tooltip--fit {
    min-width: 190px;
    max-width: min(230px, calc(100vw - 2rem));
    padding: 0.48rem 0.72rem;
}
/* Тултип справа от элемента (для тулбара результата) */
body.veo-generation-body .veo-tooltip.veo-tooltip--right {
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    margin-left: 8px;
}
body.veo-generation-body .veo-has-tooltip:hover .veo-tooltip.veo-tooltip--right {
    transform: translateY(-50%) translateX(0);
}
/* Скрыть "залипший" текст тултипов левого/результатного меню после скролла/закрытия */
body.veo-generation-body.veo-hide-toolbar-tooltips .veo-result-toolbar .veo-tooltip,
body.veo-generation-body.veo-hide-toolbar-tooltips .veo-left-icon-btn .veo-left-tooltip {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-50%) translateX(4px) !important;
}
body.veo-generation-body .veo-has-tooltip {
    position: relative;
}
/* Обёртка: у disabled submit нет :hover на самой кнопке — тултип снаружи, наведение на область кнопки */
body.veo-generation-body .veo-prompt-send-wrap.veo-has-tooltip {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    max-width: 100%;
}
body.veo-generation-body .veo-prompt-send-wrap .veo-prompt-send:disabled {
    pointer-events: none;
}
body.veo-generation-body .veo-prompt-send-wrap:has(.veo-prompt-send:disabled) {
    cursor: not-allowed;
}
body.veo-generation-body .veo-has-tooltip:hover .veo-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
/* Общее правило UX: когда контрол активен/меню раскрыто — tooltip скрываем, чтобы не было наложения. */
body.veo-generation-body .veo-has-tooltip[aria-expanded="true"] .veo-tooltip,
body.veo-generation-body .veo-has-tooltip[aria-pressed="true"] .veo-tooltip,
body.veo-generation-body .veo-has-tooltip.open .veo-tooltip,
body.veo-generation-body .veo-has-tooltip.active .veo-tooltip,
body.veo-generation-body .veo-custom-select.open .veo-tooltip,
body.veo-generation-body .veo-photo-upload-wrap[data-open="true"] .veo-photo-upload-btn .veo-tooltip,
body.veo-generation-body .veo-photo-upload-wrap[data-open="true"] .veo-has-tooltip .veo-tooltip {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(-50%) translateY(-4px) !important;
}
/* Тултипы в хеддере — показывать сверху, чтобы не перекрывать контент */
body.veo-generation-body .header .veo-tooltip:not(.veo-tooltip--below) {
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
}
body.veo-generation-body .header .veo-has-tooltip:hover .veo-tooltip:not(.veo-tooltip--below) {
    transform: translateX(-50%) translateY(0);
}
/* Звук в хеддере — тултип снизу (кнопка сверху экрана), позиция левее чтобы не резало */
body.veo-generation-body .header .veo-tooltip--below {
    top: calc(100% + 8px);
    bottom: auto;
    transform: translateX(-50%) translateY(-4px);
}
body.veo-generation-body .header .veo-has-tooltip:hover .veo-tooltip--below {
    transform: translateX(-50%) translateY(0);
}
/* Тултип кнопки «Создать видео» — сверху, заметный фон */
body.veo-generation-body .veo-tooltip--above {
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
}
body.veo-generation-body .veo-has-tooltip:hover .veo-tooltip--above {
    transform: translateX(-50%) translateY(0);
}

/* Чип Wan V2V: тултип имени и строки обрезки — фиолетовый стиль как у остальных .veo-tooltip */
body.veo-generation-body .veo-tooltip.veo-tooltip--wan-chip {
    white-space: normal;
    min-width: 0;
    max-width: min(420px, calc(100vw - 2rem));
    text-align: left;
    line-height: 1.45;
    font-size: 0.78rem;
    font-weight: 500;
    color: #e9d5ff;
    padding: 0.5rem 0.85rem;
    border: 1px solid rgba(167, 139, 250, 0.55);
    border-radius: 10px;
    background: linear-gradient(135deg, #312e81 0%, #1e1b4b 50%, #0f0c29 100%);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.55), 0 0 24px rgba(139, 92, 246, 0.28), 0 0 0 1px rgba(167, 139, 250, 0.15) inset;
    z-index: 500;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Панель записи голоса (desktop + mobile): волна + таймер, счётчик, разделитель, контурные кнопки */
body.veo-generation-body .veo-voice-record-panel {
    display: none;
    margin: 0 0 0.45rem;
    padding: 0.52rem 0.65rem 0.44rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(18, 16, 28, 0.97) 0%, rgba(10, 9, 16, 0.99) 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
}
body.veo-generation-body .veo-voice-record-panel.veo-voice-record-panel--open {
    display: block;
}
body.veo-generation-body .veo-voice-record-top {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}
body.veo-generation-body .veo-voice-record-wave-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}
body.veo-generation-body .veo-voice-record-wave-shell {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 52px;
    border-radius: 10px;
    padding: 0 5px;
    background: linear-gradient(180deg, rgba(15, 12, 41, 0.55) 0%, rgba(30, 27, 75, 0.35) 50%, rgba(15, 12, 41, 0.5) 100%);
    border: 1px solid rgba(99, 102, 241, 0.18);
    box-shadow:
        0 0 24px rgba(99, 102, 241, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    overflow: hidden;
}
body.veo-generation-body .veo-voice-record-wave-glow {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 52%;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.14) 55%, rgba(139, 92, 246, 0.2) 100%);
    pointer-events: none;
    opacity: 0.95;
}
/* «Лента» эквалайзера: столбцы на всю ширину, новые значения справа, история уходит влево */
body.veo-generation-body .veo-voice-record-wave {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 1px;
    padding: 0 1px 4px;
    box-sizing: border-box;
}
body.veo-generation-body .veo-voice-wave-bar {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    height: 100%;
    align-self: stretch;
    border-radius: 999px;
    transform-origin: 50% 100%;
    transform: scaleY(0.12);
    /* Плавность при записи — в JS (rAF); иначе transition конфликтует с покадровым scale. */
    transition: transform 0.05s linear, opacity 0.05s linear;
    background: linear-gradient(
        180deg,
        rgba(224, 231, 255, 0.95) 0%,
        rgba(165, 180, 252, 0.92) 28%,
        rgba(129, 140, 248, 0.95) 52%,
        rgba(91, 33, 182, 0.9) 100%
    );
    box-shadow:
        0 0 10px rgba(99, 102, 241, 0.55),
        0 0 4px rgba(167, 139, 250, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
body.veo-generation-body .veo-voice-record-panel--open .veo-voice-wave-bar {
    transition: none;
    will-change: transform;
    backface-visibility: hidden;
}
body.veo-generation-body .veo-voice-record-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    flex-shrink: 0;
    color: rgba(203, 213, 225, 0.92);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}
body.veo-generation-body .veo-voice-record-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: radial-gradient(circle at 32% 28%, #fecdd3 0%, #f43f5e 42%, #9f1239 100%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 10px rgba(244, 63, 94, 0.5);
    animation: veo-voice-rec-dot-pulse 1.25s ease-in-out infinite;
}
@keyframes veo-voice-rec-dot-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 8px rgba(244, 63, 94, 0.45);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.4), 0 0 16px rgba(139, 92, 246, 0.55);
        transform: scale(1.08);
    }
}
body.veo-generation-body .veo-voice-record-stat-row {
    text-align: right;
    line-height: 1.2;
}
body.veo-generation-body .veo-voice-record-divider {
    height: 1px;
    margin: 0.4rem 0 0.36rem;
    border: 0;
    padding: 0;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.22), transparent);
}
body.veo-generation-body .veo-voice-record-bottom {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}
body.veo-generation-body .veo-voice-mini-stat {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.92);
    font-variant-numeric: tabular-nums;
}
body.veo-generation-body .veo-voice-record-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
body.veo-generation-body .veo-voice-record-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.5);
    color: rgba(248, 250, 252, 0.92);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
body.veo-generation-body .veo-voice-record-btn:hover {
    background: rgba(30, 41, 59, 0.65);
    border-color: rgba(148, 163, 184, 0.35);
}
body.veo-generation-body .veo-voice-record-btn-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}
body.veo-generation-body .veo-voice-record-btn--send,
body.veo-generation-body .veo-voice-record-btn--cancel {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.5);
}
body.veo-generation-body .veo-voice-record-btn--send:hover {
    border-color: rgba(52, 211, 153, 0.35);
    color: #a7f3d0;
}
body.veo-generation-body .veo-voice-record-btn--cancel:hover {
    border-color: rgba(248, 113, 113, 0.35);
    color: #fecaca;
}
body.veo-generation-body .veo-tooltip--submit {
    background: linear-gradient(135deg, #312e81 0%, #1e1b4b 50%, #0f0c29 100%);
    border-color: rgba(167, 139, 250, 0.58);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 24px rgba(139, 92, 246, 0.34), 0 0 0 1px rgba(167, 139, 250, 0.24) inset;
    color: #e9d5ff;
}
/* InfiniteTalk: длинная причина «почему неактивна» — тот же космический стиль, чуть шире и ярче тень */
body.infinitalk-page.veo-generation-body .veo-prompt-send-wrap .veo-prompt-send:disabled ~ .veo-tooltip--submit.veo-tooltip--long {
    max-width: min(440px, calc(100vw - 2rem));
    z-index: 120;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 0 32px rgba(139, 92, 246, 0.38), 0 0 0 1px rgba(167, 139, 250, 0.22) inset;
}
body.veo-generation-body .header,
body.veo-generation-body .veo-desktop-layout,
body.veo-generation-body .veo-prompt-control-bar {
    box-sizing: border-box;
}

/* Контур разделителей — как у блока ввода промпта (фиолетовый градиент) */
:root {
    --veo-divider-h: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.15), rgba(99, 102, 241, 0.2), transparent);
    --veo-divider-v: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.15), rgba(99, 102, 241, 0.2), transparent);
}

/* Хеддер — базовый layout на всех страницах с veo-generation-body (плотный фон — поверх прозрачного body / fixed html) */
body.veo-generation-body .header {
    background: #0a0a0f !important;
    background-color: #0a0a0f !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.4rem 0;
}
body.veo-generation-body .header-content {
    padding-left: clamp(0.75rem, 2vw, 1.25rem);
    padding-right: clamp(1rem, 3vw, 1.5rem);
    max-width: none;
    width: 100%;
    min-width: 0;
}
body.veo-generation-body .desktop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.35rem, 1.5vw, 0.75rem);
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
}
body.veo-generation-body .desktop-header .logo {
    flex-shrink: 0;
    min-width: 0;
}
body.veo-generation-body .desktop-header .desktop-nav {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
    flex-shrink: 1;
}
body.veo-generation-body .desktop-header .desktop-nav .nav-link {
    white-space: nowrap;
}
/* Иконки навигации хедера — 20px, снизу на одной линии (разные viewBox у SVG) */
body.veo-generation-body:has(.veo-desktop-layout) .header .desktop-nav .nav-link-icon {
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .desktop-nav .nav-link-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    stroke: #a78bfa;
}
/* Иконка «Текст» визуально крупнее/выше из-за формы — чуть меньше и опускаем к общему baseline */
body.veo-generation-body:has(.veo-desktop-layout) .header .desktop-nav .nav-link-icon.nav-link-icon-text svg {
    transform: translateY(1px) scale(0.93);
    transform-origin: 50% 100%;
}

/* Навигация хедера — иконки фиолетовые, текст белый; низ подписи = низ иконки */
body.veo-generation-body:has(.veo-desktop-layout) .header .desktop-nav .nav-link {
    color: var(--text-primary);
    align-items: flex-end;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .desktop-nav .nav-link > span:last-child {
    color: var(--text-primary);
}
body.veo-generation-body:has(.veo-desktop-layout) .header .desktop-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.8), rgba(99, 102, 241, 0.9));
    transition: width 0.3s ease;
    border-radius: 1px;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .desktop-nav .nav-link:hover::after,
body.veo-generation-body:has(.veo-desktop-layout) .header .desktop-nav .nav-link.active::after {
    width: 60%;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .desktop-nav .nav-link:hover .nav-link-icon {
    transform: scale(1.08);
}
body.veo-generation-body .desktop-header .desktop-header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
/* Разделитель под хеддером убран — хеддер и чат без лишней линии */
/* Лого + название Vision Flow AI — космический шрифт */
body.veo-generation-body:has(.veo-desktop-layout) .header .logo,
body.veo-generation-body:has(.veo-desktop-layout) .header .mobile-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .header-brand-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.03em;
    color: #ffffff;
}
@keyframes veo-brand-shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}
body.veo-generation-body:has(.veo-desktop-layout) .header .mobile-logo .header-brand-name {
    font-size: 1.1rem;
}

/* Лого — PNG через <img> внутри; flip только на обёртке (иначе Chrome с background-image на анимируемом слое дёргает сеть). */
body.veo-generation-body:has(.veo-desktop-layout) .header .veo-logo-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    overflow: hidden;
    animation: vf-logo-flip-h 5.5s ease-in-out infinite;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .veo-logo-gradient .veo-logo-gradient-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .logo:hover .veo-logo-gradient {
    animation-duration: 3s;
}
@keyframes vf-logo-flip-h {
    0% { transform: scaleX(1); }
    9% { transform: scaleX(-1); }
    45% { transform: scaleX(-1); }
    55% { transform: scaleX(1); }
    100% { transform: scaleX(1); }
}
body.veo-generation-body:has(.veo-desktop-layout) .header .veo-logo-gradient-mobile {
    width: 40px;
    height: 40px;
    animation: vf-logo-flip-h 5.5s ease-in-out infinite;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .mobile-logo:hover .veo-logo-gradient-mobile,
body.veo-generation-body.mobile-version .veo-mobile-header-brand-trigger:hover .veo-logo-gradient-mobile {
    animation-duration: 3s;
}

/* Кнопка КУПИТЬ — фиолетовый с анимацией */
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .profile-buy-btn {
    position: relative;
    height: 32px;
    box-sizing: border-box;
    border: 1px solid rgba(139, 92, 246, 0.6);
    border-radius: var(--radius-xl);
    padding: 0.35rem 0.7rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: none;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.4) 0%, rgba(139, 92, 246, 0.25) 50%, rgba(109, 40, 217, 0.4) 100%);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4), 0 0 40px rgba(124, 58, 237, 0.2);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    overflow: hidden;
    animation: veoBuyBtnPulse 2.5s ease-in-out infinite;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .profile-buy-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.15) 50%, transparent 75%);
    background-size: 200% 100%;
    background-position: 200% 0;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .profile-buy-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 25%, rgba(255, 255, 255, 0.25) 50%, transparent 75%);
    transform: rotate(45deg);
    animation: ctaShine 3s infinite;
    pointer-events: none;
    z-index: 0;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .profile-buy-btn:hover {
    transform: scale(1.05);
    border-color: rgba(139, 92, 246, 0.9);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.6), 0 0 50px rgba(124, 58, 237, 0.35);
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .profile-buy-btn:hover::before {
    opacity: 0.8;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .profile-buy-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}
@keyframes veoBuyBtnPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(139, 92, 246, 0.3), 0 0 35px rgba(124, 58, 237, 0.15);
    }
    50% {
        box-shadow: 0 0 25px rgba(139, 92, 246, 0.5), 0 0 50px rgba(124, 58, 237, 0.25);
    }
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group {
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-2xl);
    padding: 0.2rem 0.4rem;
    gap: 0.35rem;
    transition: border-color 0.3s ease;
    box-shadow: none;
    overflow: visible;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group:hover {
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: none;
}

/* Связка звук + Войти/аватар — фиолетовый (Veo 3) */
body.veo-generation-body:has(.veo-desktop-layout) .header .audio-avatar-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-2xl);
    padding: 0.2rem 0.4rem;
    transition: border-color 0.3s ease;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .audio-avatar-group:hover {
    border-color: rgba(139, 92, 246, 0.35);
}
body.veo-generation-body:has(.veo-desktop-layout) .header .audio-avatar-group .profile-separator,
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .profile-separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    margin: 0 0.05rem;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .profile-separator-equals {
    color: #fff;
    font-weight: 600;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .vf-currency-selector .vf-currency-trigger {
    padding: 0.35rem 0.65rem;
    height: 32px;
    min-height: 32px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    line-height: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    transition: border-color 0.3s ease, background 0.3s ease;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .vf-currency-selector .vf-currency-trigger:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(139, 92, 246, 0.3);
}
/* Мобильный хедер: пилюля баланса и звук — сразу тёмно-фиолетовое «стекло» (без прозрачного main.css и серой подложки выше) */
body.veo-generation-body:has(.veo-desktop-layout) .header .vf-mobile-balance-selector.buy-balance-group .vf-currency-trigger.vf-mobile-balance-pill {
    background: linear-gradient(165deg, rgba(30, 27, 75, 0.58) 0%, rgba(15, 12, 41, 0.88) 100%) !important;
    border: 1px solid rgba(167, 139, 250, 0.4) !important;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
    border-radius: 10px !important;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .vf-mobile-balance-selector.buy-balance-group .vf-currency-trigger.vf-mobile-balance-pill:hover,
body.veo-generation-body:has(.veo-desktop-layout) .header .vf-mobile-balance-selector.buy-balance-group .vf-currency-trigger.vf-mobile-balance-pill:focus-visible {
    background: linear-gradient(165deg, rgba(42, 38, 98, 0.72) 0%, rgba(22, 18, 58, 0.92) 100%) !important;
    border-color: rgba(196, 181, 253, 0.52) !important;
    box-shadow:
        0 2px 18px rgba(0, 0, 0, 0.42),
        0 0 22px rgba(139, 92, 246, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .veo-mobile-header-audio.mobile-audio-toggle-btn {
    background: linear-gradient(165deg, rgba(30, 27, 75, 0.58) 0%, rgba(15, 12, 41, 0.88) 100%) !important;
    border: 1px solid rgba(167, 139, 250, 0.4) !important;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
    border-radius: 10px !important;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .veo-mobile-header-audio.mobile-audio-toggle-btn:hover,
body.veo-generation-body:has(.veo-desktop-layout) .header .veo-mobile-header-audio.mobile-audio-toggle-btn:focus-visible {
    background: linear-gradient(165deg, rgba(42, 38, 98, 0.72) 0%, rgba(22, 18, 58, 0.92) 100%) !important;
    border-color: rgba(196, 181, 253, 0.52) !important;
    box-shadow:
        0 2px 18px rgba(0, 0, 0, 0.42),
        0 0 20px rgba(139, 92, 246, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .audio-avatar-group.mobile-audio-avatar-group {
    margin-right: 0.25rem;
}

/* Иконка звука и аватар — фиолетовый (Veo 3) */
body.veo-generation-body:has(.veo-desktop-layout) .header .audio-toggle-btn,
body.veo-generation-body:has(.veo-desktop-layout) .header .mobile-audio-toggle-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(139, 92, 246, 0.5);
    background: rgba(255, 255, 255, 0.04);
}
body.veo-generation-body:has(.veo-desktop-layout) .header .audio-toggle-btn.audio-muted,
body.veo-generation-body:has(.veo-desktop-layout) .header .mobile-audio-toggle-btn.audio-muted {
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.25), 0 0 20px rgba(139, 92, 246, 0.1);
}
/* Звук включён — фиолетовый */
body.veo-generation-body:has(.veo-desktop-layout) .header .audio-toggle-btn:not(.audio-muted),
body.veo-generation-body:has(.veo-desktop-layout) .header .mobile-audio-toggle-btn:not(.audio-muted) {
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.5), 0 0 24px rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.6);
}
body.veo-generation-body:has(.veo-desktop-layout) .header .audio-toggle-btn:not(.audio-muted) .audio-icon,
body.veo-generation-body:has(.veo-desktop-layout) .header .mobile-audio-toggle-btn:not(.audio-muted) .audio-icon {
    color: #c4b5fd;
}
/* Звук выключен — зачёркнутая иконка */
body.veo-generation-body:has(.veo-desktop-layout) .header .audio-toggle-btn.audio-muted,
body.veo-generation-body:has(.veo-desktop-layout) .header .mobile-audio-toggle-btn.audio-muted {
    opacity: 0.85;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .audio-toggle-btn:hover,
body.veo-generation-body:has(.veo-desktop-layout) .header .mobile-audio-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.7);
}
body.veo-generation-body:has(.veo-desktop-layout) .header .audio-toggle-btn:not(.audio-muted):hover,
body.veo-generation-body:has(.veo-desktop-layout) .header .mobile-audio-toggle-btn:not(.audio-muted):hover {
    border-color: rgba(139, 92, 246, 0.8);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.6), 0 0 32px rgba(139, 92, 246, 0.3);
}
@keyframes veo-neon-glow-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(139, 92, 246, 0.25), 0 0 20px rgba(139, 92, 246, 0.1); }
    50% { box-shadow: 0 0 14px rgba(139, 92, 246, 0.35), 0 0 28px rgba(139, 92, 246, 0.15); }
}
@keyframes veo-neon-glow-pulse-strong {
    0%, 100% { box-shadow: 0 0 12px rgba(139, 92, 246, 0.5), 0 0 24px rgba(139, 92, 246, 0.25); }
    50% { box-shadow: 0 0 18px rgba(139, 92, 246, 0.6), 0 0 36px rgba(139, 92, 246, 0.3); }
}
/* Только аватар — круг; кнопка звука не должна становиться круглой */
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(139, 92, 246, 0.6);
}
body.veo-generation-body:has(.veo-desktop-layout) .header .audio-toggle-btn:not(.audio-muted):not(.mobile-audio-toggle-btn),
body.veo-generation-body:has(.veo-desktop-layout) .header .mobile-audio-toggle-btn:not(.audio-muted):not(.veo-mobile-header-audio) {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: var(--radius-xl);
    border-width: 1px;
    border-style: solid;
    border-color: rgba(139, 92, 246, 0.6);
}
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar:hover {
    border-color: rgba(139, 92, 246, 0.95);
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.5), 0 0 28px rgba(139, 92, 246, 0.2);
    transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
    body.veo-generation-body:has(.veo-desktop-layout) .header .audio-toggle-btn,
    body.veo-generation-body:has(.veo-desktop-layout) .header .mobile-audio-toggle-btn,
    body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar,
    body.veo-generation-body:has(.veo-desktop-layout) .header .veo-logo-gradient,
    body.veo-generation-body:has(.veo-desktop-layout) .header .veo-logo-gradient-mobile,
    .profile-user-avatar {
        animation: none !important;
    }
}

/* Кнопка «Войти» — того же размера, что Купить и баланс (Veo 3 — фиолетовый) */
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar.veo-avatar-login {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: auto;
    width: auto;
    height: 32px;
    min-height: 32px;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.6);
    border-radius: var(--radius-xl);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.35), 0 0 24px rgba(139, 92, 246, 0.15);
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    overflow: visible;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar.veo-avatar-login::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(110deg, transparent 30%, rgba(196, 181, 253, 0.15) 50%, transparent 70%);
    background-size: 200% 100%;
    background-position: 200% 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar.veo-avatar-login:hover {
    border-color: rgba(139, 92, 246, 0.8);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.35), 0 0 40px rgba(139, 92, 246, 0.15);
    transform: translateY(-1px) scale(1.02);
}
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar.veo-avatar-login:hover::before {
    opacity: 0.6;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar.veo-avatar-login:active {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(0);
}
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar.veo-avatar-login:hover .veo-login-icon img {
    transform: scale(1.05);
}
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar:not(.veo-avatar-login) .veo-login-icon {
    display: none;
}
/* Один слой: у авторизованного круга не показывать дублирующий шлем (рядом с фото / fallback) */
body.veo-generation-body .header .profile-user-avatar:not(.veo-avatar-login) .veo-login-icon {
    display: none !important;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar.veo-avatar-login .veo-login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    flex-shrink: 0;
    min-width: 23px;
    min-height: 23px;
    color: rgba(224, 231, 255, 0.95);
}
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar.veo-avatar-login .veo-login-icon svg,
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar.veo-avatar-login .veo-login-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar.veo-avatar-login .veo-login-icon img {
    filter: invert(1) brightness(1.1);
    transition: transform 0.3s ease;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .profile-user-avatar.veo-avatar-login .profile-avatar-letter {
    position: relative;
    z-index: 1;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: none;
    color: rgba(224, 231, 255, 0.95);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    filter: none;
    animation: none;
}

/* Баланс — на уровне кнопки КУПИТЬ, живая иконка мозга */
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .profile-balance-header {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.35rem 0.65rem;
    height: 32px;
    min-height: 32px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    transition: border-color 0.3s ease, background 0.3s ease;
    overflow: visible;
    line-height: 1;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .profile-balance-header:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(139, 92, 246, 0.3);
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .profile-balance-amount-header,
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .vf-currency-amount {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    font-family: inherit;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.02em;
    text-shadow: none;
    color: var(--text-primary);
}
/* Флаг в хедере — жёстко как в списке валют (flex + max-width:100% у глобальных img не должны раздувать картинку) */
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .vf-currency-flag {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 18px;
    overflow: hidden;
    line-height: 0;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .vf-currency-flag-img {
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    height: 15px;
    object-fit: cover;
    object-position: center;
    border-radius: 3px;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .profile-balance-icon-header {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem !important;
    line-height: 1;
    overflow: visible;
}
body.veo-generation-body:has(.veo-desktop-layout) .header .buy-balance-group .profile-balance-icon-header .veo-rocket-wrap {
    display: inline-flex;
    align-items: center;
    position: relative;
    animation: veo-rocket-spin 3s ease-in-out infinite;
}

/* Выпадающий список валют в хедере — только ПК, страница Veo: космический фиолетовый + компактнее строки валют */
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) {
    background: linear-gradient(135deg, #312e81 0%, #1e1b4b 50%, #0f0c29 100%);
    border: 1px solid rgba(167, 139, 250, 0.5);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 32px rgba(139, 92, 246, 0.22),
        0 0 0 1px rgba(167, 139, 250, 0.2) inset;
    scrollbar-color: rgba(167, 139, 250, 0.45) rgba(99, 102, 241, 0.12);
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown)::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.1);
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown)::-webkit-scrollbar-thumb {
    background: rgba(167, 139, 250, 0.4);
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown)::-webkit-scrollbar-thumb:hover {
    background: rgba(196, 181, 253, 0.55);
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-dropdown-header-block {
    border-bottom-color: rgba(167, 139, 250, 0.22);
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-dropdown-header {
    font-size: 0.82rem;
    color: #e9d5ff;
    text-shadow: 0 0 14px rgba(139, 92, 246, 0.35);
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-dropdown-desc {
    font-size: 0.76rem;
    color: rgba(196, 181, 253, 0.78);
    line-height: 1.45;
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-hint {
    border-bottom-color: rgba(167, 139, 250, 0.18);
    color: rgba(196, 181, 253, 0.72);
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-option {
    padding: 0.38rem 0.55rem;
    font-size: 0.72rem;
    gap: 0.4rem;
    border-radius: 8px;
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-option:hover {
    background: rgba(139, 92, 246, 0.2);
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-option[data-currency].vf-currency-option--active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.32) 0%, rgba(76, 29, 149, 0.28) 100%);
    color: #f5f3ff;
    border: 1px solid rgba(167, 139, 250, 0.45);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.2);
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-option-name {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(245, 243, 255, 0.94);
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-option-rate {
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(196, 181, 253, 0.92);
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-option-flag-wrap {
    width: 22px;
    height: 16px;
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-option-flag,
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-option .vf-currency-flag-wavy {
    width: 18px;
    height: 13px;
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-option .vf-currency-flag-wavy {
    font-size: 0.78rem;
}
body.veo-generation-body:not(.mobile-version):has(.veo-desktop-layout) .header .vf-currency-selector .vf-currency-dropdown:not(.vf-mobile-balance-dropdown) .vf-currency-option-text {
    gap: 0.06rem;
}

@keyframes veo-rocket-spin {
    0%, 100% { transform: scale(1) rotate(-6deg); }
    50% { transform: scale(1.15) rotate(8deg); }
}
@keyframes veo-brain-alive {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.15) rotate(5deg); }
}

/* Списание баланса — космическая вспышка (индиго / фиолетовый, без оранжевого) */
@keyframes vf-balance-debit-pop {
    0% { transform: scale(1); filter: brightness(1); }
    30% { transform: scale(1.06); filter: brightness(1.12) drop-shadow(0 0 18px rgba(129, 140, 248, 0.65)); }
    55% { transform: scale(0.985); filter: brightness(1.06) drop-shadow(0 0 22px rgba(167, 139, 250, 0.5)); }
    100% { transform: scale(1); filter: brightness(1); }
}
@keyframes vf-balance-debit-ring {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.45), 0 0 0 0 rgba(139, 92, 246, 0.25); }
    50% { box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.2), 0 0 28px rgba(129, 140, 248, 0.35); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0), 0 0 0 0 rgba(139, 92, 246, 0); }
}
body.veo-generation-body .buy-balance-group.vf-balance-debit-explode {
    animation: vf-balance-debit-pop 0.68s cubic-bezier(0.34, 1.35, 0.64, 1) forwards;
    transform-origin: center center;
    z-index: 5;
}
body.veo-generation-body .buy-balance-group.vf-balance-debit-explode .profile-balance-header {
    animation: vf-balance-debit-ring 0.65s ease-out forwards;
    border-radius: var(--radius-xl);
}
body.veo-generation-body .buy-balance-group.vf-balance-debit-explode .profile-balance-amount-header,
body.veo-generation-body .buy-balance-group.vf-balance-debit-explode .vf-mobile-balance-pill-amount,
body.veo-generation-body .buy-balance-group.vf-balance-debit-explode .vf-currency-amount {
    color: #e0e7ff !important;
    text-shadow: 0 0 14px rgba(129, 140, 248, 0.75), 0 0 24px rgba(99, 102, 241, 0.35), 0 0 2px rgba(15, 12, 41, 0.9);
    transition: color 0.15s ease;
}
@keyframes vf-balance-float-up {
    0% { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.75); }
    12% { opacity: 1; }
    100% { opacity: 0; transform: translateX(-50%) translateY(-32px) scale(1.05); }
}
body.veo-generation-body .vf-balance-debit-float {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #c4b5fd;
    pointer-events: none;
    white-space: nowrap;
    z-index: 30;
    opacity: 0;
    text-shadow: 0 0 12px rgba(129, 140, 248, 0.9), 0 0 20px rgba(167, 139, 250, 0.45);
}
body.veo-generation-body .vf-balance-debit-float.vf-balance-debit-float--active {
    animation: vf-balance-float-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Анимация возврата баланса (+N 🚀 зелёная) */
@keyframes vf-balance-refund-pop {
    0% { transform: scale(1); }
    35% { transform: scale(1.25); }
    70% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
body.veo-generation-body .buy-balance-group.vf-balance-refund-explode {
    animation: vf-balance-refund-pop 0.65s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}
body.veo-generation-body .buy-balance-group.vf-balance-refund-explode .profile-balance-header {
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.45), 0 0 22px rgba(16, 185, 129, 0.28);
}
body.veo-generation-body .buy-balance-group.vf-balance-refund-explode .profile-balance-amount-header,
body.veo-generation-body .buy-balance-group.vf-balance-refund-explode .vf-mobile-balance-pill-amount,
body.veo-generation-body .buy-balance-group.vf-balance-refund-explode .vf-currency-amount {
    color: #a7f3d0 !important;
    text-shadow: 0 0 12px rgba(52, 211, 153, 0.55), 0 0 2px rgba(15, 12, 41, 0.85);
    transition: color 0.15s ease;
}
body.veo-generation-body .vf-balance-refund-float {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #86efac;
    pointer-events: none;
    white-space: nowrap;
    z-index: 30;
    opacity: 0;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.85), 0 0 22px rgba(34, 197, 94, 0.45);
}
body.veo-generation-body .vf-balance-refund-float.vf-balance-refund-float--active {
    animation: vf-balance-float-up 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Блокировка микро-скролла: на десктопе контент на высоту вьюпорта, скролл только в чате и настройках.
   Как в админке: фон на html + background-attachment: fixed и 100dvh — без «полоски» снизу у мобильных браузеров. */
/* Базовые стили Veo (чат, панели): на всех ширинах; раскладка row/column задаётся ниже */
@media (min-width: 0) {
    html:has(body.veo-generation-body:not(.mobile-version)),
    html:has(body.veo-generation-body:not(.mobile-version) .veo-desktop-layout) {
        overflow: hidden !important;
        height: 100vh;
        max-height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        overscroll-behavior: none;
        background-color: #000000;
        background-image: linear-gradient(165deg, #010101 0%, #0a0a0f 45%, #000000 100%);
        background-attachment: fixed;
        background-size: cover;
    }
    body.veo-generation-body:not(.mobile-version) {
        overflow: hidden !important;
        height: 100vh;
        max-height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        padding-bottom: 0; /* иначе var(--safe-bottom) добавляет высоту и даёт микро-скролл */
        overscroll-behavior: none;
        background-color: transparent !important;
        background-image: none !important;
    }
    body.veo-generation-body:not(.mobile-version) .app-container,
    body.veo-generation-body.telegram-webapp:not(.mobile-version) .app-container {
        display: flex;
        flex-direction: column;
        height: 100vh;
        max-height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        min-height: 0;
        padding-top: 60px; /* под фиксированный хедер, чтобы не резало название чата и левый сайдбар */
        padding-left: 0;
        padding-right: 0;
        overflow: hidden !important; /* без hidden — полоска скролла справа; скролл только в чате и настройках */
    }
    
    body.veo-generation-body:not(.mobile-version) main.veo-main {
        display: flex !important;
        flex-direction: column;
        flex: 1;
        min-height: calc(100vh - 60px);
        min-height: calc(100dvh - 60px);
    }
    
    body.veo-generation-body .veo-form {
        display: flex;
        flex: 1;
        min-height: 0;
    }
    
    body.veo-generation-body:not(.mobile-version) .veo-desktop-layout {
        display: flex;
        flex: 1;
        height: calc(100vh - 60px);
        min-height: calc(100vh - 60px);
        height: calc(100dvh - 60px);
        min-height: calc(100dvh - 60px);
        min-width: 0;
        position: relative;
        z-index: 1;
        gap: 0;
        padding: 0;
        box-sizing: border-box;
        align-items: stretch;
        overflow: visible; /* тултипы справки (?) из правой панели выходят в область чата */
    }

    /* Левый сайдбар — чаты, новый чат, каталог видео. Полупрозрачный — контент чата просвечивает */
    .veo-left-sidebar {
        position: relative;
        z-index: 2;
        width: clamp(48px, 8vw, 60px);
        min-width: clamp(48px, 8vw, 60px);
        background: rgba(10, 10, 15, 0.88);
        border-right: none;
        padding: 1rem clamp(8px, 1.2vw, 12px) 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: clamp(0.75rem, 2vw, 1rem);
        box-sizing: border-box;
    }
    /* Тонкий разделитель без градиентного «свечения» (раньше был --veo-divider-v с cyan/violet) */
    .veo-left-sidebar::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 1px;
        background: rgba(255, 255, 255, 0.06);
        box-shadow: none;
    }

    .veo-left-icon-btn {
        position: relative;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        border-radius: 8px;
        color: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
    }
    .veo-left-icon-btn:hover {
        background: rgba(124, 58, 237, 0.12);
    }

    /* Кастомные тултипы левого сайдбара — космический стиль */
    .veo-left-tooltip {
        position: absolute;
        left: calc(100% + 12px);
        top: 50%;
        transform: translateY(-50%) translateX(-4px);
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
        font-weight: 500;
        white-space: nowrap;
        color: rgba(255, 255, 255, 0.95);
        background: linear-gradient(135deg, #1e1b4b 0%, #0f0c29 100%);
        border: 1px solid rgba(139, 92, 246, 0.4);
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
        z-index: 100;
    }
    .veo-left-icon-btn:hover .veo-left-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%) translateX(0);
    }

    .veo-left-sidebar-icon {
        display: block;
        width: 20px;
        height: 20px;
        background: #fff;
        -webkit-mask-size: contain;
        mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-position: center;
        mask-position: center;
    }
    .veo-left-icon-chats {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
    }
    .veo-left-new-chat .veo-new-chat-icon {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
    }
    .veo-left-icon-filter {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-6.54L22 3z'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-6.54L22 3z'/%3E%3C/svg%3E");
    }
    /* Анимация в чате: солнце/лучи; при выключении — диагональ (как «без эффектов») */
    .veo-left-icon-chat-motion {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3C/svg%3E");
    }
    #veoBtnChatMotion.veo-left-icon-btn--active .veo-left-icon-chat-motion {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3Cline x1='3' y1='3' x2='21' y2='21'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3Cline x1='3' y1='3' x2='21' y2='21'/%3E%3C/svg%3E");
    }
    .veo-left-icon-zoom {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E");
    }
    .veo-left-zoom-wrap {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .veo-chat-zoom-panel {
        position: absolute;
        left: calc(100% + 12px);
        bottom: 0;
        z-index: 250;
        min-width: 200px;
        padding: 0.85rem 1rem;
        background: linear-gradient(135deg, #1e1b4b 0%, #0f0c29 100%);
        border: 1px solid rgba(139, 92, 246, 0.45);
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(-6px);
        transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    }
    .veo-chat-zoom-panel.veo-chat-zoom-panel--open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0);
    }
    .veo-chat-zoom-title {
        margin: 0 0 0.65rem 0;
        font-size: 0.82rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.92);
    }
    .veo-chat-zoom-range {
        width: 100%;
        min-width: 168px;
        height: 6px;
        border-radius: 4px;
        accent-color: #a855f7;
        cursor: pointer;
    }
    .veo-chat-zoom-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        margin-top: 0.65rem;
    }
    .veo-chat-zoom-value {
        font-size: 0.85rem;
        font-weight: 600;
        color: rgba(196, 181, 253, 0.95);
        min-width: 3.2rem;
    }
    .veo-chat-zoom-reset {
        padding: 0.35rem 0.65rem;
        font-size: 0.78rem;
        font-weight: 600;
        color: #e9d5ff;
        background: rgba(139, 92, 246, 0.3);
        border: 1px solid rgba(139, 92, 246, 0.55);
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.15s, border-color 0.15s;
    }
    .veo-chat-zoom-reset:hover {
        background: rgba(139, 92, 246, 0.45);
        border-color: rgba(139, 92, 246, 0.75);
    }
    #veoBtnChatZoom.veo-left-icon-btn--active {
        background: rgba(124, 58, 237, 0.22);
        color: rgba(255, 255, 255, 0.95);
    }
    #veoBtnChatMotion.veo-left-icon-btn--active {
        background: rgba(124, 58, 237, 0.22);
        color: rgba(255, 255, 255, 0.95);
    }
    .veo-left-icon-btn:hover .veo-left-sidebar-icon {
        background: #fff;
    }
    .veo-left-new-chat {
        width: 36px;
        height: 36px;
    }

    /* Центральная область — прозрачный фон по бокам, чтобы при скролле чат/видео не перекрывались */
    .veo-center-area {
        --veo-chat-scale: 1;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
        min-height: 0;
        background: transparent;
        padding: clamp(0.35rem, 1.2vw, 0.5rem) clamp(0.25rem, 1.5vw, 0.5rem) clamp(0.5rem, 1.5vw, 0.75rem);
        position: relative;
        overflow-x: visible;
        overflow-y: hidden;
    }
    .veo-center-area > * {
        position: relative;
        z-index: 1;
    }
    /* Область сообщений — звёзды только здесь, не в поле ввода */
    .veo-chat-messages-wrap {
        position: relative;
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow-x: visible;
        overflow-y: hidden;
    }
    /* Звёзды по бокам чата — слева и справа от области сообщений (бардовые, мерцающие, движущиеся) */
    .veo-cosmic-stars-sides {
        position: absolute;
        inset: 0;
        pointer-events: none;
        z-index: 1;
        overflow: hidden;
    }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(1) { left: 2%; top: 8%; width: 2px; height: 2px; animation-delay: 0s; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(2) { left: 4%; top: 22%; width: 1px; height: 1px; animation-delay: 0.5s; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(3) { left: 3%; top: 38%; width: 2px; height: 2px; animation-delay: 1s; animation-duration: 12s; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(4) { left: 5%; top: 55%; width: 1px; height: 1px; animation-delay: 0.3s; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(5) { left: 2%; top: 72%; width: 2px; height: 2px; animation-delay: 1.2s; animation-duration: 14s; animation-name: veo-star-drift-2; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(6) { left: 6%; top: 88%; width: 1px; height: 1px; animation-delay: 0.7s; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(7) { left: 4%; top: 45%; width: 2px; height: 2px; animation-delay: 1.5s; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(8) { left: 3%; top: 62%; width: 1px; height: 1px; animation-delay: 0.2s; animation-duration: 11s; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(9) { left: 96%; top: 12%; width: 2px; height: 2px; animation-delay: 0.4s; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(10) { left: 94%; top: 28%; width: 1px; height: 1px; animation-delay: 0.9s; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(11) { left: 97%; top: 48%; width: 2px; height: 2px; animation-delay: 1.1s; animation-duration: 13s; animation-name: veo-star-drift-2; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(12) { left: 95%; top: 65%; width: 1px; height: 1px; animation-delay: 0.1s; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(13) { left: 98%; top: 78%; width: 2px; height: 2px; animation-delay: 1.3s; animation-duration: 15s; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(14) { left: 94%; top: 92%; width: 1px; height: 1px; animation-delay: 0.6s; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(15) { left: 96%; top: 35%; width: 2px; height: 2px; animation-delay: 1.8s; }
    .veo-cosmic-stars-sides .veo-cosmic-star:nth-child(16) { left: 95%; top: 82%; width: 1px; height: 1px; animation-delay: 0.8s; animation-duration: 10s; animation-name: veo-star-drift-2; }

    /* Белые космические звёзды — как в космосе, часть мерцает, часть движется, падающие через экран */
    /* overflow: hidden — анимации «падающих» звёзд используют translateX(100vw+…); без обрезки они раздувают overflow по X и дают мигающий горизонтальный скролл */
    .veo-chat-messages-wrap .veo-cosmic-stars {
        position: absolute;
        inset: 0;
        pointer-events: none;
        z-index: 1;
        overflow: hidden;
    }
    .veo-cosmic-stars {
        pointer-events: none;
    }
    .veo-cosmic-star {
        position: absolute;
        border-radius: 50%;
        background: rgba(255, 255, 255, 1);
        box-shadow: 0 0 10px rgba(255, 255, 255, 1), 0 0 20px rgba(255, 255, 255, 0.7), 0 0 32px rgba(255, 255, 255, 0.4);
    }
    /* Цветные звёзды — яркие, насыщенные */
    .veo-cosmic-star--blue { background: rgba(147, 197, 253, 1); box-shadow: 0 0 12px rgba(147, 197, 253, 1), 0 0 24px rgba(147, 197, 253, 0.9), 0 0 40px rgba(147, 197, 253, 0.6); }
    .veo-cosmic-star--cyan { background: rgba(103, 232, 249, 1); box-shadow: 0 0 12px rgba(103, 232, 249, 1), 0 0 24px rgba(103, 232, 249, 0.9), 0 0 40px rgba(103, 232, 249, 0.6); }
    .veo-cosmic-star--gold { background: rgba(253, 224, 71, 1); box-shadow: 0 0 12px rgba(253, 224, 71, 1), 0 0 24px rgba(253, 224, 71, 0.9), 0 0 40px rgba(253, 224, 71, 0.6); }
    .veo-cosmic-star--lavender { background: rgba(196, 181, 253, 1); box-shadow: 0 0 12px rgba(196, 181, 253, 1), 0 0 24px rgba(196, 181, 253, 0.9), 0 0 40px rgba(196, 181, 253, 0.6); }
    .veo-cosmic-star--pink { background: rgba(249, 168, 212, 1); box-shadow: 0 0 12px rgba(249, 168, 212, 1), 0 0 24px rgba(249, 168, 212, 0.9), 0 0 40px rgba(249, 168, 212, 0.6); }
    .veo-cosmic-star--coral { background: rgba(251, 146, 60, 1); box-shadow: 0 0 12px rgba(251, 146, 60, 1), 0 0 24px rgba(251, 146, 60, 0.9), 0 0 40px rgba(251, 146, 60, 0.6); }
    .veo-cosmic-star--burgundy { background: rgba(180, 55, 90, 1); box-shadow: 0 0 12px rgba(200, 60, 100, 1), 0 0 24px rgba(180, 55, 90, 0.9), 0 0 40px rgba(160, 40, 75, 0.6); }
    .veo-cosmic-star--white { background: rgba(255, 255, 255, 1); box-shadow: 0 0 10px rgba(255, 255, 255, 1), 0 0 20px rgba(255, 255, 255, 0.7), 0 0 32px rgba(255, 255, 255, 0.4); }
    /* На больших экранах (≥1920px) — звёзды меньше и с меньшим blur, чтобы не пикселились */
    @media (min-width: 1920px) {
        .veo-cosmic-star {
            max-width: 2px !important;
            max-height: 2px !important;
        }
        .veo-cosmic-star--blue { box-shadow: 0 0 6px rgba(147, 197, 253, 1), 0 0 12px rgba(147, 197, 253, 0.9), 0 0 18px rgba(147, 197, 253, 0.6) !important; }
        .veo-cosmic-star--cyan { box-shadow: 0 0 6px rgba(103, 232, 249, 1), 0 0 12px rgba(103, 232, 249, 0.9), 0 0 18px rgba(103, 232, 249, 0.6) !important; }
        .veo-cosmic-star--gold { box-shadow: 0 0 6px rgba(253, 224, 71, 1), 0 0 12px rgba(253, 224, 71, 0.9), 0 0 18px rgba(253, 224, 71, 0.6) !important; }
        .veo-cosmic-star--lavender { box-shadow: 0 0 6px rgba(196, 181, 253, 1), 0 0 12px rgba(196, 181, 253, 0.9), 0 0 18px rgba(196, 181, 253, 0.6) !important; }
        .veo-cosmic-star--pink { box-shadow: 0 0 6px rgba(249, 168, 212, 1), 0 0 12px rgba(249, 168, 212, 0.9), 0 0 18px rgba(249, 168, 212, 0.6) !important; }
        .veo-cosmic-star--coral { box-shadow: 0 0 6px rgba(251, 146, 60, 1), 0 0 12px rgba(251, 146, 60, 0.9), 0 0 18px rgba(251, 146, 60, 0.6) !important; }
        .veo-cosmic-star--burgundy { box-shadow: 0 0 6px rgba(200, 60, 100, 1), 0 0 12px rgba(180, 55, 90, 0.9), 0 0 18px rgba(160, 40, 75, 0.6) !important; }
        .veo-cosmic-star--white { box-shadow: 0 0 6px rgba(255, 255, 255, 1), 0 0 12px rgba(255, 255, 255, 0.7), 0 0 18px rgba(255, 255, 255, 0.4) !important; }
        .veo-cosmic-star--shoot { width: 2px !important; height: 2px !important; box-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 0 0 12px rgba(255, 255, 255, 0.5) !important; }
    }
    .veo-cosmic-star--twinkle {
        animation: veo-star-twinkle 2.5s ease-in-out infinite;
    }
    .veo-cosmic-star--twinkle:nth-child(1) { left: 8%; top: 12%; width: 2px; height: 2px; animation-delay: 0s; }
    .veo-cosmic-star--twinkle:nth-child(2) { left: 22%; top: 35%; width: 3px; height: 3px; animation-delay: 0.4s; }
    .veo-cosmic-star--twinkle:nth-child(3) { left: 45%; top: 8%; width: 1px; height: 1px; animation-delay: 0.8s; }
    .veo-cosmic-star--twinkle:nth-child(4) { left: 68%; top: 45%; width: 2px; height: 2px; animation-delay: 1.2s; }
    .veo-cosmic-star--twinkle:nth-child(5) { left: 85%; top: 25%; width: 2px; height: 2px; animation-delay: 1.6s; }
    .veo-cosmic-star--twinkle:nth-child(6) { left: 15%; top: 65%; width: 1px; height: 1px; animation-delay: 0.2s; }
    .veo-cosmic-star--twinkle:nth-child(7) { left: 55%; top: 72%; width: 2px; height: 2px; animation-delay: 0.6s; }
    .veo-cosmic-star--twinkle:nth-child(8) { left: 78%; top: 85%; width: 1px; height: 1px; animation-delay: 1s; }
    .veo-cosmic-star--twinkle:nth-child(9) { left: 35%; top: 55%; width: 2px; height: 2px; animation-delay: 1.4s; }
    .veo-cosmic-star--twinkle:nth-child(10) { left: 92%; top: 50%; width: 1px; height: 1px; animation-delay: 1.8s; }
    .veo-cosmic-star--twinkle:nth-child(11) { left: 12%; top: 28%; width: 2px; height: 2px; animation-delay: 0.3s; }
    .veo-cosmic-star--twinkle:nth-child(12) { left: 38%; top: 18%; width: 1px; height: 1px; animation-delay: 0.7s; }
    .veo-cosmic-star--twinkle:nth-child(13) { left: 58%; top: 42%; width: 2px; height: 2px; animation-delay: 1.1s; }
    .veo-cosmic-star--twinkle:nth-child(14) { left: 72%; top: 78%; width: 1px; height: 1px; animation-delay: 0.5s; }
    .veo-cosmic-star--twinkle:nth-child(15) { left: 5%; top: 48%; width: 2px; height: 2px; animation-delay: 1.5s; }
    .veo-cosmic-star--twinkle:nth-child(16) { left: 42%; top: 62%; width: 1px; height: 1px; animation-delay: 0.9s; }
    .veo-cosmic-star--twinkle:nth-child(17) { left: 88%; top: 15%; width: 2px; height: 2px; animation-delay: 0.1s; }
    .veo-cosmic-star--twinkle:nth-child(18) { left: 25%; top: 82%; width: 1px; height: 1px; animation-delay: 1.3s; }
    .veo-cosmic-star--twinkle:nth-child(19) { left: 65%; top: 5%; width: 2px; height: 2px; animation-delay: 0.6s; }
    .veo-cosmic-star--twinkle:nth-child(20) { left: 18%; top: 42%; width: 1px; height: 1px; animation-delay: 1.7s; }
    .veo-cosmic-star--twinkle:nth-child(21) { left: 52%; top: 28%; width: 2px; height: 2px; animation-delay: 0.2s; }
    .veo-cosmic-star--twinkle:nth-child(22) { left: 8%; top: 72%; width: 2px; height: 2px; animation-delay: 0.9s; }
    .veo-cosmic-star--twinkle:nth-child(23) { left: 75%; top: 52%; width: 1px; height: 1px; animation-delay: 1.4s; }
    .veo-cosmic-star--twinkle:nth-child(24) { left: 28%; top: 12%; width: 2px; height: 2px; animation-delay: 0.5s; }
    .veo-cosmic-star--twinkle:nth-child(25) { left: 62%; top: 68%; width: 2px; height: 2px; animation-delay: 1.1s; }
    .veo-cosmic-star--twinkle:nth-child(26) { left: 14%; top: 38%; width: 1px; height: 1px; animation-delay: 1.6s; }
    .veo-cosmic-star--twinkle:nth-child(27) { left: 82%; top: 42%; width: 2px; height: 2px; animation-delay: 0.3s; }
    .veo-cosmic-star--twinkle:nth-child(28) { left: 40%; top: 78%; width: 1px; height: 1px; animation-delay: 0.8s; }
    .veo-cosmic-star--twinkle:nth-child(29) { left: 6%; top: 22%; width: 2px; height: 2px; animation-delay: 1.3s; }
    .veo-cosmic-star--twinkle:nth-child(30) { left: 90%; top: 62%; width: 1px; height: 1px; animation-delay: 0.1s; }
    .veo-cosmic-star--twinkle:nth-child(46) { left: 3%; top: 58%; width: 2px; height: 2px; animation-delay: 0.4s; }
    .veo-cosmic-star--twinkle:nth-child(47) { left: 48%; top: 5%; width: 1px; height: 1px; animation-delay: 0.9s; }
    .veo-cosmic-star--twinkle:nth-child(48) { left: 95%; top: 35%; width: 2px; height: 2px; animation-delay: 1.5s; }
    .veo-cosmic-star--twinkle:nth-child(49) { left: 18%; top: 18%; width: 1px; height: 1px; animation-delay: 0.2s; }
    .veo-cosmic-star--twinkle:nth-child(50) { left: 72%; top: 58%; width: 2px; height: 2px; animation-delay: 1.1s; }
    .veo-cosmic-star--twinkle:nth-child(51) { left: 32%; top: 42%; width: 1px; height: 1px; animation-delay: 0.6s; }
    .veo-cosmic-star--twinkle:nth-child(52) { left: 88%; top: 78%; width: 2px; height: 2px; animation-delay: 1.8s; }
    .veo-cosmic-star--twinkle:nth-child(53) { left: 7%; top: 88%; width: 1px; height: 1px; animation-delay: 0.3s; }
    .veo-cosmic-star--twinkle:nth-child(54) { left: 55%; top: 22%; width: 2px; height: 2px; animation-delay: 1.4s; }
    .veo-cosmic-star--twinkle:nth-child(55) { left: 42%; top: 88%; width: 1px; height: 1px; animation-delay: 0.7s; }
    .veo-cosmic-star--twinkle:nth-child(56) { left: 78%; top: 8%; width: 2px; height: 2px; animation-delay: 1.2s; }
    .veo-cosmic-star--twinkle:nth-child(57) { left: 12%; top: 52%; width: 1px; height: 1px; animation-delay: 0.5s; }
    .veo-cosmic-star--twinkle:nth-child(58) { left: 62%; top: 48%; width: 2px; height: 2px; animation-delay: 1.6s; }
    .veo-cosmic-star--twinkle:nth-child(59) { left: 25%; top: 68%; width: 1px; height: 1px; animation-delay: 0.1s; }
    .veo-cosmic-star--twinkle:nth-child(60) { left: 92%; top: 12%; width: 2px; height: 2px; animation-delay: 1.3s; }
    .veo-cosmic-star--twinkle:nth-child(61) { left: 38%; top: 32%; width: 1px; height: 1px; animation-delay: 0.8s; }
    .veo-cosmic-star--twinkle:nth-child(62) { left: 68%; top: 38%; width: 2px; height: 2px; animation-delay: 1.7s; }
    .veo-cosmic-star--twinkle:nth-child(63) { left: 5%; top: 75%; width: 1px; height: 1px; animation-delay: 0.4s; }
    .veo-cosmic-star--twinkle:nth-child(64) { left: 82%; top: 48%; width: 2px; height: 2px; animation-delay: 1.0s; }
    .veo-cosmic-star--twinkle:nth-child(65) { left: 15%; top: 8%; width: 1px; height: 1px; animation-delay: 1.5s; }
    .veo-cosmic-star--twinkle:nth-child(76) { left: 4%; top: 42%; width: 2px; height: 2px; animation-delay: 0.2s; }
    .veo-cosmic-star--twinkle:nth-child(77) { left: 36%; top: 6%; width: 1px; height: 1px; animation-delay: 0.8s; }
    .veo-cosmic-star--twinkle:nth-child(78) { left: 94%; top: 48%; width: 2px; height: 2px; animation-delay: 1.4s; }
    .veo-cosmic-star--twinkle:nth-child(79) { left: 22%; top: 72%; width: 1px; height: 1px; animation-delay: 0.5s; }
    .veo-cosmic-star--twinkle:nth-child(80) { left: 66%; top: 14%; width: 2px; height: 2px; animation-delay: 1.1s; }
    .veo-cosmic-star--twinkle:nth-child(81) { left: 10%; top: 58%; width: 1px; height: 1px; animation-delay: 0.3s; }
    .veo-cosmic-star--twinkle:nth-child(82) { left: 54%; top: 82%; width: 2px; height: 2px; animation-delay: 1.7s; }
    .veo-cosmic-star--twinkle:nth-child(83) { left: 80%; top: 28%; width: 1px; height: 1px; animation-delay: 0.6s; }
    .veo-cosmic-star--twinkle:nth-child(84) { left: 16%; top: 34%; width: 2px; height: 2px; animation-delay: 1.2s; }
    .veo-cosmic-star--twinkle:nth-child(85) { left: 44%; top: 54%; width: 1px; height: 1px; animation-delay: 0.4s; }
    .veo-cosmic-star--twinkle:nth-child(86) { left: 86%; top: 68%; width: 2px; height: 2px; animation-delay: 1.5s; }
    .veo-cosmic-star--twinkle:nth-child(87) { left: 2%; top: 18%; width: 1px; height: 1px; animation-delay: 0.9s; }
    .veo-cosmic-star--twinkle:nth-child(88) { left: 60%; top: 62%; width: 2px; height: 2px; animation-delay: 1.0s; }
    .veo-cosmic-star--twinkle:nth-child(89) { left: 30%; top: 92%; width: 1px; height: 1px; animation-delay: 0.7s; }
    .veo-cosmic-star--twinkle:nth-child(90) { left: 74%; top: 38%; width: 2px; height: 2px; animation-delay: 1.6s; }
    .veo-cosmic-star--twinkle:nth-child(101) { left: 7%; top: 14%; width: 2px; height: 2px; animation-delay: 0.2s; }
    .veo-cosmic-star--twinkle:nth-child(102) { left: 24%; top: 52%; width: 1px; height: 1px; animation-delay: 0.6s; }
    .veo-cosmic-star--twinkle:nth-child(103) { left: 41%; top: 22%; width: 2px; height: 2px; animation-delay: 1s; }
    .veo-cosmic-star--twinkle:nth-child(104) { left: 59%; top: 68%; width: 1px; height: 1px; animation-delay: 0.4s; }
    .veo-cosmic-star--twinkle:nth-child(105) { left: 76%; top: 38%; width: 2px; height: 2px; animation-delay: 1.4s; }
    .veo-cosmic-star--twinkle:nth-child(106) { left: 93%; top: 78%; width: 1px; height: 1px; animation-delay: 0.8s; }
    .veo-cosmic-star--move:nth-child(107) { left: 12%; top: 44%; width: 2px; height: 2px; animation-delay: 0.5s; animation-duration: 11s; }
    .veo-cosmic-star--move:nth-child(108) { left: 33%; top: 16%; width: 1px; height: 1px; animation-delay: 1.2s; animation-duration: 14s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(109) { left: 51%; top: 58%; width: 2px; height: 2px; animation-delay: 0.3s; animation-duration: 12s; }
    .veo-cosmic-star--move:nth-child(110) { left: 69%; top: 8%; width: 1px; height: 1px; animation-delay: 1.5s; animation-duration: 15s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(111) { left: 86%; top: 62%; width: 2px; height: 2px; animation-delay: 0.7s; animation-duration: 13s; }
    .veo-cosmic-star--move:nth-child(112) { left: 18%; top: 88%; width: 1px; height: 1px; animation-delay: 1.1s; animation-duration: 16s; animation-name: veo-star-drift-2; }
    /* Белые звёзды — разные размеры (1px, 2px, 3px) */
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(113) { left: 4%; top: 6%; width: 1px; height: 1px; animation-delay: 0s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(114) { left: 11%; top: 22%; width: 3px; height: 3px; animation-delay: 0.3s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(115) { left: 19%; top: 48%; width: 1px; height: 1px; animation-delay: 0.6s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(116) { left: 27%; top: 14%; width: 2px; height: 2px; animation-delay: 0.9s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(117) { left: 34%; top: 72%; width: 1px; height: 1px; animation-delay: 0.2s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(118) { left: 43%; top: 32%; width: 3px; height: 3px; animation-delay: 0.5s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(119) { left: 51%; top: 88%; width: 2px; height: 2px; animation-delay: 0.8s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(120) { left: 58%; top: 18%; width: 1px; height: 1px; animation-delay: 0.1s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(121) { left: 66%; top: 56%; width: 3px; height: 3px; animation-delay: 0.4s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(122) { left: 73%; top: 8%; width: 2px; height: 2px; animation-delay: 0.7s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(123) { left: 81%; top: 42%; width: 1px; height: 1px; animation-delay: 0s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(124) { left: 89%; top: 76%; width: 3px; height: 3px; animation-delay: 0.3s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(125) { left: 96%; top: 28%; width: 1px; height: 1px; animation-delay: 0.6s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(126) { left: 6%; top: 38%; width: 2px; height: 2px; animation-delay: 0.9s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(127) { left: 14%; top: 64%; width: 1px; height: 1px; animation-delay: 0.2s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(128) { left: 23%; top: 92%; width: 3px; height: 3px; animation-delay: 0.5s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(129) { left: 31%; top: 44%; width: 2px; height: 2px; animation-delay: 0.8s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(130) { left: 39%; top: 12%; width: 1px; height: 1px; animation-delay: 0.1s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(131) { left: 47%; top: 58%; width: 3px; height: 3px; animation-delay: 0.4s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(132) { left: 55%; top: 84%; width: 1px; height: 1px; animation-delay: 0.7s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(133) { left: 63%; top: 24%; width: 2px; height: 2px; animation-delay: 0s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(134) { left: 71%; top: 52%; width: 1px; height: 1px; animation-delay: 0.3s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(135) { left: 79%; top: 16%; width: 3px; height: 3px; animation-delay: 0.6s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(136) { left: 87%; top: 68%; width: 2px; height: 2px; animation-delay: 0.9s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(137) { left: 2%; top: 52%; width: 1px; height: 1px; animation-delay: 0.2s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(138) { left: 9%; top: 78%; width: 3px; height: 3px; animation-delay: 0.5s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(139) { left: 17%; top: 34%; width: 2px; height: 2px; animation-delay: 0.8s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(140) { left: 25%; top: 6%; width: 1px; height: 1px; animation-delay: 0.1s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(141) { left: 37%; top: 62%; width: 3px; height: 3px; animation-delay: 0.4s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(142) { left: 46%; top: 26%; width: 1px; height: 1px; animation-delay: 0.7s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(143) { left: 54%; top: 94%; width: 2px; height: 2px; animation-delay: 0s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(144) { left: 62%; top: 46%; width: 1px; height: 1px; animation-delay: 0.3s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(145) { left: 70%; top: 82%; width: 3px; height: 3px; animation-delay: 0.6s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(146) { left: 78%; top: 38%; width: 2px; height: 2px; animation-delay: 0.9s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(147) { left: 86%; top: 14%; width: 1px; height: 1px; animation-delay: 0.2s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(148) { left: 94%; top: 58%; width: 3px; height: 3px; animation-delay: 0.5s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(149) { left: 8%; top: 44%; width: 1px; height: 1px; animation-delay: 0.8s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(150) { left: 52%; top: 12%; width: 2px; height: 2px; animation-delay: 0.1s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(151) { left: 74%; top: 66%; width: 1px; height: 1px; animation-delay: 0.4s; }
    .veo-cosmic-star--white.veo-cosmic-star--twinkle:nth-child(152) { left: 92%; top: 32%; width: 3px; height: 3px; animation-delay: 0.7s; }
    .veo-cosmic-star--white.veo-cosmic-star--move:nth-child(153) { left: 8%; top: 20%; width: 2px; height: 2px; animation-delay: 0s; animation-duration: 12s; }
    .veo-cosmic-star--white.veo-cosmic-star--move:nth-child(154) { left: 24%; top: 52%; width: 1px; height: 1px; animation-delay: 1s; animation-duration: 14s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--white.veo-cosmic-star--move:nth-child(155) { left: 42%; top: 8%; width: 3px; height: 3px; animation-delay: 0.5s; animation-duration: 11s; }
    .veo-cosmic-star--white.veo-cosmic-star--move:nth-child(156) { left: 58%; top: 72%; width: 1px; height: 1px; animation-delay: 1.5s; animation-duration: 16s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--white.veo-cosmic-star--move:nth-child(157) { left: 76%; top: 36%; width: 2px; height: 2px; animation-delay: 0.3s; animation-duration: 13s; }
    .veo-cosmic-star--white.veo-cosmic-star--move:nth-child(158) { left: 4%; top: 68%; width: 1px; height: 1px; animation-delay: 1.2s; animation-duration: 15s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--white.veo-cosmic-star--move:nth-child(159) { left: 36%; top: 44%; width: 3px; height: 3px; animation-delay: 0.7s; animation-duration: 10s; }
    .veo-cosmic-star--white.veo-cosmic-star--move:nth-child(160) { left: 68%; top: 16%; width: 2px; height: 2px; animation-delay: 0.2s; animation-duration: 17s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--white.veo-cosmic-star--move:nth-child(161) { left: 88%; top: 84%; width: 1px; height: 1px; animation-delay: 1.8s; animation-duration: 12s; }
    .veo-cosmic-star--white.veo-cosmic-star--move:nth-child(162) { left: 16%; top: 92%; width: 2px; height: 2px; animation-delay: 0.6s; animation-duration: 14s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move {
        animation: veo-star-drift 10s ease-in-out infinite;
    }
    .veo-cosmic-star--move:nth-child(31) { left: 5%; top: 20%; width: 2px; height: 2px; animation-delay: 0s; animation-duration: 14s; }
    .veo-cosmic-star--move:nth-child(32) { left: 30%; top: 5%; width: 1px; height: 1px; animation-delay: 1s; animation-duration: 16s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(33) { left: 60%; top: 30%; width: 2px; height: 2px; animation-delay: 2s; animation-duration: 11s; }
    .veo-cosmic-star--move:nth-child(34) { left: 80%; top: 60%; width: 1px; height: 1px; animation-delay: 0.5s; animation-duration: 13s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(35) { left: 45%; top: 80%; width: 2px; height: 2px; animation-delay: 1.5s; animation-duration: 15s; }
    .veo-cosmic-star--move:nth-child(36) { left: 10%; top: 55%; width: 1px; height: 1px; animation-delay: 2.5s; animation-duration: 12s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(37) { left: 70%; top: 12%; width: 2px; height: 2px; animation-delay: 0.75s; animation-duration: 17s; }
    .veo-cosmic-star--move:nth-child(38) { left: 50%; top: 45%; width: 1px; height: 1px; animation-delay: 1.25s; animation-duration: 10s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(39) { left: 95%; top: 70%; width: 2px; height: 2px; animation-delay: 0.25s; animation-duration: 14s; }
    .veo-cosmic-star--move:nth-child(40) { left: 3%; top: 88%; width: 1px; height: 1px; animation-delay: 1.75s; animation-duration: 18s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(41) { left: 20%; top: 40%; width: 2px; height: 2px; animation-delay: 0.5s; animation-duration: 15s; }
    .veo-cosmic-star--move:nth-child(42) { left: 55%; top: 15%; width: 1px; height: 1px; animation-delay: 1.5s; animation-duration: 13s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(43) { left: 85%; top: 35%; width: 2px; height: 2px; animation-delay: 2s; animation-duration: 16s; }
    .veo-cosmic-star--move:nth-child(44) { left: 35%; top: 65%; width: 1px; height: 1px; animation-delay: 0.8s; animation-duration: 14s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(45) { left: 72%; top: 85%; width: 2px; height: 2px; animation-delay: 1.2s; animation-duration: 12s; }
    .veo-cosmic-star--move:nth-child(66) { left: 2%; top: 32%; width: 2px; height: 2px; animation-delay: 0.3s; animation-duration: 13s; }
    .veo-cosmic-star--move:nth-child(67) { left: 40%; top: 10%; width: 1px; height: 1px; animation-delay: 1.1s; animation-duration: 15s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(68) { left: 75%; top: 52%; width: 2px; height: 2px; animation-delay: 1.8s; animation-duration: 11s; }
    .veo-cosmic-star--move:nth-child(69) { left: 15%; top: 75%; width: 1px; height: 1px; animation-delay: 0.6s; animation-duration: 17s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(70) { left: 58%; top: 88%; width: 2px; height: 2px; animation-delay: 1.4s; animation-duration: 12s; }
    .veo-cosmic-star--move:nth-child(71) { left: 92%; top: 22%; width: 1px; height: 1px; animation-delay: 0.2s; animation-duration: 14s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(72) { left: 28%; top: 48%; width: 2px; height: 2px; animation-delay: 1.6s; animation-duration: 16s; }
    .veo-cosmic-star--move:nth-child(73) { left: 65%; top: 68%; width: 1px; height: 1px; animation-delay: 0.9s; animation-duration: 10s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(74) { left: 8%; top: 15%; width: 2px; height: 2px; animation-delay: 1.2s; animation-duration: 18s; }
    .veo-cosmic-star--move:nth-child(75) { left: 85%; top: 92%; width: 1px; height: 1px; animation-delay: 0.5s; animation-duration: 14s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(91) { left: 11%; top: 26%; width: 2px; height: 2px; animation-delay: 0.4s; animation-duration: 15s; }
    .veo-cosmic-star--move:nth-child(92) { left: 46%; top: 8%; width: 1px; height: 1px; animation-delay: 1.2s; animation-duration: 12s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(93) { left: 78%; top: 44%; width: 2px; height: 2px; animation-delay: 1.8s; animation-duration: 14s; }
    .veo-cosmic-star--move:nth-child(94) { left: 6%; top: 68%; width: 1px; height: 1px; animation-delay: 0.7s; animation-duration: 16s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(95) { left: 52%; top: 76%; width: 2px; height: 2px; animation-delay: 1.3s; animation-duration: 11s; }
    .veo-cosmic-star--move:nth-child(96) { left: 96%; top: 18%; width: 1px; height: 1px; animation-delay: 0.1s; animation-duration: 17s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(97) { left: 34%; top: 56%; width: 2px; height: 2px; animation-delay: 1.5s; animation-duration: 13s; }
    .veo-cosmic-star--move:nth-child(98) { left: 68%; top: 24%; width: 1px; height: 1px; animation-delay: 0.9s; animation-duration: 10s; animation-name: veo-star-drift-2; }
    .veo-cosmic-star--move:nth-child(99) { left: 18%; top: 84%; width: 2px; height: 2px; animation-delay: 1.1s; animation-duration: 18s; }
    .veo-cosmic-star--move:nth-child(100) { left: 88%; top: 56%; width: 1px; height: 1px; animation-delay: 0.6s; animation-duration: 14s; animation-name: veo-star-drift-2; }
    /* Падающая звезда — пролетает через экран со светящимся следом */
    .veo-cosmic-star--shoot {
        width: 3px;
        height: 3px;
        top: 18%;
        opacity: 0.4;
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.9), 0 0 16px rgba(255, 255, 255, 0.5);
        animation-timing-function: linear;
        animation-iteration-count: infinite;
    }
    .veo-cosmic-star--shoot::before {
        content: '';
        position: absolute;
        top: 50%;
        width: 35px;
        height: 2px;
        transform: translateY(-50%);
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.5));
        border-radius: 1px;
        box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
    }
    .veo-cosmic-star--shoot-ltr {
        left: -80px;
        animation-name: veo-shoot-ltr;
        animation-delay: 0s;
        animation-duration: 28s;
    }
    .veo-cosmic-star--shoot-ltr::before {
        left: 0;
        transform: translateY(-50%) translateX(-100%);
        background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.2) 40%, rgba(255, 255, 255, 0.6) 100%);
    }
    .veo-cosmic-star--shoot-rtl {
        left: 100%;
        animation-name: veo-shoot-rtl;
        animation-delay: 9s;
        animation-duration: 28s;
    }
    .veo-cosmic-star--shoot-rtl::before {
        right: 0;
        left: auto;
        transform: translateY(-50%) translateX(100%);
        background: linear-gradient(to left, transparent 0%, rgba(255, 255, 255, 0.2) 40%, rgba(255, 255, 255, 0.6) 100%);
    }
    /* Падающие звёзды вверх и вниз */
    .veo-cosmic-star--shoot-up {
        left: 25%;
        top: 100%;
        animation-name: veo-shoot-up;
        animation-delay: 5s;
        animation-duration: 28s;
    }
    .veo-cosmic-star--shoot-up::before {
        left: 50%;
        top: 100%;
        width: 2px;
        height: 35px;
        transform: translateX(-50%);
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.2) 60%, transparent 100%);
    }
    .veo-cosmic-star--shoot-down {
        left: 75%;
        top: -20px;
        animation-name: veo-shoot-down;
        animation-delay: 14s;
        animation-duration: 28s;
    }
    .veo-cosmic-star--shoot-down::before {
        left: 50%;
        top: 0;
        width: 2px;
        height: 35px;
        transform: translateX(-50%) translateY(-100%);
        background: linear-gradient(to top, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.2) 60%, transparent 100%);
    }
    /* Дополнительные падающие звёзды — разные позиции */
    .veo-cosmic-star--shoot-alt {
        top: 45%;
    }
    .veo-cosmic-star--shoot-alt.veo-cosmic-star--shoot-ltr {
        animation-delay: 4s;
        animation-duration: 28s;
    }
    .veo-cosmic-star--shoot-alt.veo-cosmic-star--shoot-rtl {
        animation-delay: 12s;
        animation-duration: 28s;
    }
    @keyframes veo-star-twinkle {
        0%, 100% { opacity: 0.75; transform: scale(1); }
        50% { opacity: 1; transform: scale(1.4); }
    }
    /* Дрейфующие звёзды — цикл вперёд и назад, немного подвижнее */
    @keyframes veo-star-drift {
        0% { transform: translate(0, 0); opacity: 0.8; }
        25% { opacity: 1; }
        50% { transform: translate(35px, -50px); opacity: 1; }
        75% { opacity: 1; }
        100% { transform: translate(0, 0); opacity: 0.8; }
    }
    @keyframes veo-star-drift-2 {
        0% { transform: translate(0, 0); opacity: 0.8; }
        25% { opacity: 1; }
        50% { transform: translate(-30px, 40px); opacity: 1; }
        75% { opacity: 1; }
        100% { transform: translate(0, 0); opacity: 0.8; }
    }
    /* Падающие звёзды — быстро пролетают по краю */
    @keyframes veo-shoot-ltr {
        0% { transform: translateX(0); opacity: 0; }
        0.5% { opacity: 1; }
        4% { transform: translateX(calc(100vw + 100px)); opacity: 1; }
        4.5% { opacity: 0; }
        100% { opacity: 0; }
    }
    @keyframes veo-shoot-rtl {
        0% { transform: translateX(0); opacity: 0; }
        0.5% { opacity: 1; }
        4% { transform: translateX(calc(-100vw - 100px)); opacity: 1; }
        4.5% { opacity: 0; }
        100% { opacity: 0; }
    }
    @keyframes veo-shoot-up {
        0% { transform: translateY(0); opacity: 0; }
        0.5% { opacity: 1; }
        4% { transform: translateY(calc(-100vh - 100px)); opacity: 1; }
        4.5% { opacity: 0; }
        100% { opacity: 0; }
    }
    @keyframes veo-shoot-down {
        0% { transform: translateY(0); opacity: 0; }
        0.5% { opacity: 1; }
        4% { transform: translateY(calc(100vh + 100px)); opacity: 1; }
        4.5% { opacity: 0; }
        100% { opacity: 0; }
    }

    /* Пыльца феи — только в центральной колонке; не над промптом (слой выше поля ввода) и не над результатами (см. initVeoFairyDust) */
    .veo-fairy-dust {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 120px;
        pointer-events: none;
        z-index: 5;
        overflow: hidden;
    }
    .veo-fairy-wrap {
        position: absolute;
        width: 0;
        height: 0;
        left: 0;
        top: 0;
        pointer-events: none;
    }
    .veo-fairy-dot {
        position: absolute;
        left: 0;
        top: 0;
        width: 10px;
        height: 10px;
        margin-left: -5px;
        margin-top: -5px;
        border-radius: 50%;
        animation: veo-fairy-scatter 0.7s ease-out forwards;
        pointer-events: none;
    }
    .veo-fairy-white {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 0 12px rgba(255,255,255,0.8), 0 0 24px rgba(255,255,255,0.4);
    }
    .veo-fairy-gold {
        background: rgba(255, 230, 180, 0.9);
        box-shadow: 0 0 10px rgba(255, 220, 150, 0.7), 0 0 20px rgba(255, 200, 100, 0.3);
    }
    .veo-fairy-pink {
        background: rgba(255, 200, 220, 0.9);
        box-shadow: 0 0 10px rgba(255, 180, 210, 0.6), 0 0 20px rgba(255, 150, 180, 0.25);
    }
    .veo-fairy-blue {
        background: rgba(200, 230, 255, 0.9);
        box-shadow: 0 0 10px rgba(180, 220, 255, 0.6), 0 0 20px rgba(150, 200, 255, 0.25);
    }
    @keyframes veo-fairy-scatter {
        0% { transform: translate(0, 0) scale(1); opacity: 1; }
        100% { transform: translate(0, -52px) scale(0.15); opacity: 0; }
    }

    /* Бар: заголовок по центру, справа — каталог всех видео */
    .veo-chat-title-bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, min(100%, 440px)) minmax(0, 1fr);
        align-items: center;
        gap: 0.35rem;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 10;
        padding: 0.1rem 0.35rem 0;
        pointer-events: none;
        box-sizing: border-box;
    }
    .veo-chat-title-bar > * {
        pointer-events: auto;
    }
    .veo-chat-title-bar-spacer {
        min-width: 0;
    }
    .veo-chat-title-bar-actions {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        min-width: 0;
    }
    .veo-chat-title-filter-btn {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        border: none;
        border-radius: 10px;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.88);
        background: linear-gradient(135deg, #0f0c29 0%, #1e1b4b 30%, #312e81 60%, #4c1d95 100%);
        box-shadow: 0 4px 24px rgba(99, 102, 241, 0.35), 0 0 40px rgba(139, 92, 246, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
        transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
    }
    .veo-chat-title-filter-btn:hover {
        filter: brightness(1.08);
        box-shadow: 0 6px 28px rgba(99, 102, 241, 0.45), 0 0 48px rgba(139, 92, 246, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
    .veo-chat-title-filter-btn svg {
        width: 18px;
        height: 18px;
    }
    .veo-chat-title {
        font-size: 1rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.55);
        text-align: center;
        margin: 0;
        letter-spacing: 0.04em;
        padding: 0.1rem 0.25rem 0;
        text-transform: none;
        background: none;
        border: none;
        position: relative;
        left: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        z-index: 5;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        pointer-events: auto;
        box-sizing: border-box;
    }
    .veo-chat-title-editable {
        cursor: pointer;
        transition: color 0.15s;
    }
    .veo-chat-title-editable:hover {
        color: rgba(255, 255, 255, 0.7);
    }
    /* Перекрываем базовый .veo-tooltip { white-space: nowrap } — иначе длинная строка вылезает из поля */
    body.veo-generation-body .veo-chat-title .veo-tooltip {
        display: block;
        white-space: normal !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        width: min(220px, calc(100vw - 2.5rem));
        max-width: min(220px, calc(100vw - 2.5rem));
        min-width: 0;
        box-sizing: border-box;
        font-size: 0.78rem;
        font-weight: 500;
        padding: 0.48rem 0.65rem;
        line-height: 1.4;
        border-radius: 6px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45), 0 0 12px rgba(139, 92, 246, 0.2), 0 0 0 1px rgba(167, 139, 250, 0.15) inset;
        text-align: center;
    }
    .veo-chat-title-input {
        width: 100%;
        max-width: 320px;
        font-size: 1rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.9);
        background: rgba(30, 27, 75, 0.95);
        border: 1px solid rgba(139, 92, 246, 0.5);
        border-radius: 6px;
        padding: 0.35rem 0.6rem;
        text-align: center;
        outline: none;
    }
    .veo-chat-title-input:focus {
        border-color: rgba(139, 92, 246, 0.8);
        box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
    }

    .veo-chat-body {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        gap: 0;
        border-radius: var(--radius-lg);
        overflow: visible;
        /* prompt — overlay внизу, чтобы контент не обрезался фоновой полосой */
    }
    /* Без двухколоночного деления: чат сверху, промпт внизу, справа настройки, слева результаты в чате */

    .veo-chat-messages {
        position: relative;
        z-index: 6;
        flex: 1;
        min-height: 0;
        min-width: 0;
        overflow-x: visible; /* hidden обрезало видео сбоку */
        overflow-y: auto;
        overscroll-behavior-y: none;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: clamp(1rem, 2.2vw, 1.75rem) clamp(0.6rem, 2.2vw, 1.5rem) 12rem clamp(0.6rem, 2.2vw, 1.5rem); /* 12rem внизу — место для overlay промпта */
        /* Масштаб — см. блок @supports ниже: zoom (а не transform), иначе столбец «плывёт», скролл режет контент */
        transition: min-height 0.05s ease-out;
        scrollbar-width: thin;
        scrollbar-color: rgba(139, 92, 246, 0.5) rgba(99, 102, 241, 0.12);
    }
    /* Заголовок «Новый чат» — position:absolute; компактнее сверху, чтобы приветствие влезало без скролла */
    .veo-chat-messages:has(.veo-welcome-chat) {
        padding-top: clamp(1.35rem, 2.8vw, 2.1rem);
    }
    .veo-chat-messages::-webkit-scrollbar {
        width: 8px;
    }
    .veo-chat-messages::-webkit-scrollbar-track {
        background: rgba(99, 102, 241, 0.08);
    }
    .veo-chat-messages::-webkit-scrollbar-thumb {
        background: rgba(139, 92, 246, 0.5);
        border-radius: 4px;
    }
    .veo-chat-messages::-webkit-scrollbar-thumb:hover {
        background: rgba(139, 92, 246, 0.65);
    }

    /* Без «пружин» по вертикали — иначе пустой чат почти всегда со скроллом при типичной высоте окна */
    .veo-chat-messages:has(.veo-welcome-chat)::before,
    .veo-chat-messages:has(.veo-welcome-chat)::after {
        content: none;
        display: none;
    }
    .veo-chat-messages:empty::after {
        content: '';
        display: block;
        flex: 1;
        min-height: 40px;
    }

    /* Приветственный блок в чате — шире по колонке, плотнее по вертикали (без скролла на типичном мониторе) */
    .veo-welcome-chat {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
        padding: 0.65rem 0.75rem 0.5rem;
        min-height: 0;
        width: 100%;
        max-width: min(760px, calc(100% - 1rem));
        margin: 0 auto;
    }
    .veo-welcome-chat-brand {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        margin-bottom: 0.55rem;
        flex-wrap: nowrap;
    }
    .veo-welcome-chat-brand .veo-welcome-chat-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .veo-welcome-chat-brand .veo-welcome-chat-title {
        margin: 0;
    }
    .veo-welcome-chat-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 1.25rem;
    }
    /* Космический стиль иконки ИИ — единый для всех нейросетей (Veo, Kling, будущие) */
    .veo-ai-icon-badge,
    .veo-google-g-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 18px;
        background: linear-gradient(135deg, #0f0c29 0%, #1e1b4b 30%, #312e81 60%, #4c1d95 100%);
        box-shadow: 0 4px 24px rgba(99, 102, 241, 0.35), 0 0 40px rgba(139, 92, 246, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
        position: relative;
        overflow: hidden;
    }
    .veo-google-g-badge {
        animation: veo-icon-glow 4s ease-in-out infinite;
    }
    .veo-ai-icon-badge {
        animation: veo-icon-glow 4s ease-in-out infinite;
    }
    .veo-google-g-badge::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: radial-gradient(ellipse 80% 80% at 30% 20%, rgba(255,255,255,0.12), transparent 60%);
        pointer-events: none;
        animation: veo-icon-aurora 6s ease-in-out infinite;
    }
    .veo-google-g-badge::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 45%, rgba(255,255,255,0.04) 100%);
        pointer-events: none;
    }
    @keyframes veo-icon-glow {
        0%, 100% { box-shadow: 0 4px 24px rgba(99, 102, 241, 0.35), 0 0 40px rgba(139, 92, 246, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.08) inset; }
        50% { box-shadow: 0 4px 28px rgba(99, 102, 241, 0.45), 0 0 50px rgba(139, 92, 246, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.12) inset; }
    }
    @keyframes veo-icon-aurora {
        0%, 100% { opacity: 0.6; }
        50% { opacity: 1; }
    }
    .veo-google-g-badge {
        width: 72px;
        height: 72px;
    }
    .veo-welcome-chat-brand .veo-welcome-chat-icon.veo-google-g-badge,
    .veo-welcome-chat-brand .veo-google-g-badge {
        width: 56px;
        height: 56px;
        border-radius: 15px;
    }
    .veo-google-g-badge-sm {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        margin-right: 0.5rem;
    }
    /* G: как раньше — градиент по форме маски (PNG с прозрачностью), не плоское белое img + лишний drop-shadow */
    .veo-google-g-icon {
        display: block;
        width: 65%;
        height: 65%;
        max-width: 100%;
        max-height: 100%;
        flex-shrink: 0;
        box-sizing: border-box;
        background: linear-gradient(135deg, #fff 0%, #e0e7ff 40%, #c4b5fd 70%, #a5b4fc 100%);
        -webkit-mask-size: contain;
        mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-position: center;
        mask-position: center;
        position: relative;
        z-index: 1;
        filter: none;
    }
    .veo-google-g-badge-sm .veo-google-g-icon {
        width: 60%;
        height: 60%;
    }
    .veo-google-g-icon-img {
        display: block;
        width: 60%;
        height: 60%;
        object-fit: contain;
        flex-shrink: 0;
    }
    .veo-wan-badge {
        box-shadow: 0 4px 24px rgba(79, 70, 229, 0.38), 0 0 40px rgba(124, 58, 237, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
    /* Wan: цветной PNG внутри бейджа (не mask — у файла нет «дырявой» альфы под градиент как у G) */
    .veo-wan-mark-img {
        display: block;
        width: 80%;
        height: 80%;
        max-width: 100%;
        max-height: 100%;
        flex-shrink: 0;
        box-sizing: border-box;
        object-fit: contain;
        object-position: center;
        position: relative;
        z-index: 1;
        pointer-events: none;
        user-select: none;
    }
    .veo-google-g-badge-sm .veo-wan-mark-img {
        width: 78%;
        height: 78%;
    }
    /* Wan: крупнее знак в большом бейдже приветствия */
    .veo-welcome-chat--wan .veo-welcome-chat-icon.veo-wan-badge .veo-wan-mark-img {
        width: 86%;
        height: 86%;
    }
    .veo-welcome-chat-title {
        font-size: 1.5rem;
        font-weight: 600;
        color: #ffffff;
        margin: 0 0 1rem;
        letter-spacing: -0.02em;
    }
    .veo-welcome-chat-brand .veo-welcome-chat-title {
        font-size: 1.42rem;
    }
    .veo-welcome-chat-demo {
        display: block;
        width: 100%;
        max-width: min(100%, 480px);
        margin-left: auto;
        margin-right: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        border-radius: 14px;
        margin-bottom: 0.75rem;
        box-sizing: border-box;
        border: 1px solid rgba(129, 140, 248, 0.28);
        box-shadow: 0 8px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
        background: #0a0a0f;
    }
    .veo-welcome-chat-desc {
        font-size: 1.02rem;
        color: #ffffff;
        line-height: 1.42;
        margin: 0 0 0.65rem;
        max-width: 100%;
        width: 100%;
        text-align: center;
    }
    .veo-welcome-chat-action {
        font-size: 0.98rem;
        color: #ffffff;
        line-height: 1.42;
        margin: 0 0 0.5rem;
        max-width: 100%;
        width: 100%;
        text-align: center;
    }
    .veo-welcome-chat-hint {
        font-size: 0.84rem;
        color: #ffffff;
        line-height: 1.38;
        margin: 0;
        max-width: 100%;
        width: 100%;
        text-align: center;
    }
    /* Wan: больше воздуха под демо-видео и между абзацами приветствия */
    .veo-welcome-chat--wan .veo-welcome-chat-demo {
        margin-bottom: 1.35rem;
    }
    .veo-welcome-chat--wan .veo-welcome-chat-desc {
        margin-bottom: 1rem;
        line-height: 1.5;
    }
    .veo-welcome-chat--wan .veo-welcome-chat-action {
        margin-bottom: 0.95rem;
        line-height: 1.5;
    }
    .veo-welcome-chat--wan .veo-welcome-chat-hint {
        line-height: 1.48;
    }

    /* Блоки сообщений/видео внутри чата (добавляются из JS после генерации) */
    .veo-chat-messages .veo-video-block {
        flex: 0 0 auto;
    }

    /* Блок ожидания отправки — 5 сек на отмену */
    .veo-pending-send {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem 1.25rem;
        margin: 0.5rem 0;
        background: #15132a;
        border: 1px solid rgba(139, 92, 246, 0.35);
        border-radius: 12px;
        max-width: 480px;
        align-self: flex-start;
        position: relative;
        z-index: 5;
    }
    .veo-pending-send-text {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.9);
        text-align: center;
        line-height: 1.4;
    }
    .veo-pending-send-timer {
        font-size: 0.95rem;
        color: #00ff88;
        text-shadow: 0 0 8px rgba(0, 255, 136, 0.9), 0 0 16px rgba(0, 255, 136, 0.6);
    }
    .veo-pending-send-count {
        font-weight: 700;
        color: #00ff88;
        text-shadow: 0 0 8px rgba(0, 255, 136, 0.9), 0 0 16px rgba(0, 255, 136, 0.6);
    }
    .veo-pending-send-actions {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        flex-wrap: nowrap;
    }
    .veo-pending-send-actions button {
        flex-shrink: 0;
    }
    .veo-pending-send-skip {
        padding: 0.5rem 1.25rem;
        font-size: 0.92rem;
        min-width: 7rem;
        font-weight: 600;
        color: #e9d5ff;
        background: rgba(139, 92, 246, 0.35);
        border: 1px solid rgba(139, 92, 246, 0.65);
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
        box-shadow: 0 0 14px rgba(139, 92, 246, 0.3), 0 0 0 1px rgba(167, 139, 250, 0.15) inset;
    }
    .veo-pending-send-skip:hover {
        background: rgba(139, 92, 246, 0.5);
        border-color: rgba(139, 92, 246, 0.85);
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.45), 0 0 0 1px rgba(167, 139, 250, 0.25) inset;
    }
    .veo-pending-send-cancel {
        padding: 0.5rem 1.25rem;
        font-size: 0.92rem;
        font-weight: 600;
        min-width: 7rem;
        color: #fecaca;
        background: rgba(239, 68, 68, 0.2);
        border: 1px solid rgba(239, 68, 68, 0.6);
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
        text-shadow: 0 0 8px rgba(239, 68, 68, 0.8), 0 0 16px rgba(239, 68, 68, 0.4);
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
    }
    .veo-pending-send-cancel:hover {
        background: rgba(239, 68, 68, 0.35);
        border-color: rgba(239, 68, 68, 0.85);
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.2) inset;
    }
    /* Сообщения статуса в чате (вместо popup) */
    .veo-chat-status {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.85rem 1.2rem;
        margin: 0.5rem 0;
        background: #15132a;
        border: 1px solid rgba(139, 92, 246, 0.3);
        border-radius: 12px;
        max-width: 480px;
        align-self: flex-start;
        font-size: 0.9rem;
        line-height: 1.4;
        position: relative;
        z-index: 5;
    }
    .veo-chat-status--success {
        border-color: rgba(34, 197, 94, 0.4);
        background: #0d2818;
    }
    .veo-chat-status--success .veo-chat-status-icon {
        color: #4ade80;
    }
    .veo-chat-status--error {
        border-color: rgba(239, 68, 68, 0.55);
        background: linear-gradient(135deg, rgba(42, 12, 16, 0.96) 0%, rgba(20, 8, 10, 0.98) 100%);
        box-shadow:
            0 2px 14px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(248, 113, 113, 0.1) inset,
            0 0 22px rgba(239, 68, 68, 0.18);
    }
    .veo-chat-status--error .veo-chat-status-icon:empty {
        display: none;
    }
    /* Текст ошибок — насыщенный красный, лёгкое свечение */
    .veo-chat-error-text {
        color: #f87171;
        text-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
        font-weight: 600;
    }
    .veo-chat-status--error .veo-chat-status-text.veo-chat-error-text {
        color: #f87171;
    }
    .veo-chat-status--info .veo-chat-status-icon {
        color: rgba(167, 139, 250, 0.95);
    }
    .veo-chat-status-icon {
        flex-shrink: 0;
        font-weight: 700;
        font-size: 1rem;
    }
    .veo-chat-status-text {
        color: rgba(255, 255, 255, 0.92);
    }
    .veo-chat-status-link {
        color: var(--purple-light, #a855f7);
        font-weight: 600;
        margin-left: 0.25rem;
    }
    .veo-chat-status-link:hover {
        text-decoration: underline;
    }
    /* Сообщения в чате (история генераций) */
    .veo-chat-message {
        flex: 0 0 auto;
        display: flex;
        justify-content: flex-start;
        margin: 0.5rem 0;
        max-width: 100%;
        min-width: 0;
    }
    .veo-chat-message--user {
        justify-content: flex-end;
    }
    .veo-chat-message--assistant {
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
    }
    .veo-chat-message-bubble {
        max-width: 92%;
        min-width: min(280px, 100%);
        padding: 0.85rem 1.15rem;
        border-radius: 14px;
        font-size: 0.9rem;
        line-height: 1.45;
        background: #15132a;
        border: 1px solid rgba(139, 92, 246, 0.35);
        color: rgba(255, 255, 255, 0.92);
        position: relative;
        z-index: 5;
    }
    /* Результат с видео — без фона, компактный размер */
    .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-result-with-toolbar) {
        background: transparent;
        border: none;
        padding: 0.5rem 0;
        padding-left: 0.85rem;
        min-width: 0;
        width: fit-content;
        max-width: 100%;
        overflow: visible;
    }
    /* Десктоп 16:9: пузырь вмещает ролик + левый тулбар (--veo-d-chat-video-16-9 — ширина самого видео) */
    body.veo-generation-body:not(.mobile-version) .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-result-with-toolbar):has(.veo-video-wrapper[data-aspect-layout="landscape"]),
    body.veo-generation-body:not(.mobile-version) .generation-form .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-result-with-toolbar):has(.veo-video-wrapper[data-aspect-layout="landscape"]) {
        width: fit-content;
        max-width: calc(var(--veo-d-chat-video-16-9) + var(--veo-d-chat-16-9-toolbar-slack));
        box-sizing: border-box;
    }
    /* 9:16 / 3:4 — тот же ряд «тулбар + ролик», потолок как у .veo-result-with-toolbar (портрет) */
    body.veo-generation-body:not(.mobile-version) .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-result-with-toolbar):has(.veo-video-wrapper[data-aspect-layout="portrait"]),
    body.veo-generation-body:not(.mobile-version) .generation-form .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-result-with-toolbar):has(.veo-video-wrapper[data-aspect-layout="portrait"]) {
        width: fit-content;
        max-width: min(var(--veo-d-chat-video-3-4-toolbar), 100%);
        box-sizing: border-box;
    }
    /* Обёртка блока ошибки — как у результата: без фона, минимальный padding, выравнивание по левому краю */
    .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-chat-status--error) {
        background: transparent;
        border: none;
        padding: 0.5rem 0;
        padding-left: 0.85rem;
        min-width: 0;
        width: fit-content;
        max-width: min(var(--veo-d-chat-video-16-9), 100%);
        overflow: visible;
    }
    /*
     * Десктоп (не mobile-version): левый край текста ошибки и «Получено» = как левый край видео у результата.
     * Тулбар результата: padding 0.5rem + 40px + border 2px + gap 0.75rem к .veo-video-block.
     */
    body.veo-generation-body:not(.mobile-version) .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-chat-status--error),
    body.veo-generation-body:not(.mobile-version) .generation-form .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-chat-status--error) {
        padding-left: calc(0.85rem + 40px + 1rem + 2px + 0.75rem);
        max-width: min(50%, var(--veo-d-chat-video-16-9));
    }
    /* Мета под ошибкой: «Получено» сверху, ID на второй строке — как под блоком видео */
    body.veo-generation-body:not(.mobile-version) .veo-chat-message-bubble:has(.veo-chat-status--error) > .veo-video-block-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem 0;
    }
    body.veo-generation-body:not(.mobile-version) .veo-chat-message-bubble:has(.veo-chat-status--error) > .veo-video-block-meta .veo-video-block-received {
        flex: 0 0 auto;
        width: 100%;
    }
    body.veo-generation-body:not(.mobile-version) .veo-chat-message-bubble:has(.veo-chat-status--error) > .veo-video-block-meta .veo-video-block-id-wrap {
        flex: 0 0 auto;
        width: 100%;
    }
    .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-result-with-toolbar) .veo-chat-status-link {
        display: inline-block;
        margin-top: 0.5rem;
    }
    .veo-chat-message-user-content {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.4rem;
        max-width: 75%;
    }
    /* Десктоп: промпт справа — не шире половины колонки чата (вид «мессенджера») */
    body.veo-generation-body:not(.mobile-version) .veo-chat-message--user .veo-chat-message-user-content,
    body.veo-generation-body:not(.mobile-version) .generation-form .veo-chat-message--user .veo-chat-message-user-content {
        max-width: 50%;
    }
    .veo-chat-message-media {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
        align-items: flex-start;
        justify-content: flex-end;
    }
    .veo-chat-media-preview {
        flex-shrink: 0;
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid rgba(99, 102, 241, 0.35);
        background: rgba(15, 12, 41, 0.6);
    }
    /* Превью в чате — не ссылка, клик ничего не открывает */
    .veo-chat-media-preview--image {
        cursor: default;
    }
    .veo-chat-media-preview--image img,
    .veo-chat-media-preview--video video {
        display: block;
        width: 56px;
        height: 56px;
        object-fit: cover;
    }
    .veo-chat-media-preview--audio audio {
        width: 140px;
        height: 32px;
        max-width: 100%;
    }
    .veo-chat-message--user .veo-chat-message-bubble {
        /* Непрозрачный фон — звёзды чата не просвечивают */
        background-color: #14122a;
        background-image: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        isolation: isolate;
        border-color: rgba(129, 140, 248, 0.55);
        box-shadow: 0 2px 14px rgba(15, 12, 41, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
        min-width: 0;
        max-width: 100%;
    }
    .veo-user-message-timestamp {
        font-size: 0.8rem;
        font-weight: 500;
        font-variant-numeric: tabular-nums;
        color: rgba(165, 180, 252, 0.95);
        padding: 0.15rem 0;
        width: fit-content;
        max-width: 100%;
        min-width: 0;
        align-self: flex-end;
        margin-left: auto;
        text-align: right;
        word-break: break-word;
        line-height: 1.35;
    }
    .veo-chat-prompt-text {
        word-break: break-word;
        white-space: pre-wrap;
        color: #fff;
    }
    .veo-chat-message-meta {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
        margin-top: 0.35rem;
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.5);
    }
    .veo-chat-timestamp {
        font-variant-numeric: tabular-nums;
    }
    .veo-chat-show-full-btn {
        margin: 0.4rem 0 0;
        appearance: none;
        -webkit-appearance: none;
        font-family: inherit;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        padding: 0.32rem 0.75rem;
        font-size: 0.74rem;
        font-weight: 600;
        letter-spacing: 0.01em;
        color: #eef2ff;
        cursor: pointer;
        text-decoration: none;
        border-radius: 999px;
        border: 1px solid rgba(165, 180, 253, 0.55);
        background: linear-gradient(135deg, rgba(79, 70, 229, 0.55) 0%, rgba(99, 102, 241, 0.42) 50%, rgba(67, 56, 202, 0.5) 100%);
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.07) inset,
            0 2px 12px rgba(15, 12, 41, 0.45);
        transition: color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s;
    }
    .veo-chat-show-full-btn:hover {
        color: #ffffff;
        border-color: rgba(199, 210, 254, 0.85);
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.1) inset,
            0 0 18px rgba(129, 140, 248, 0.35);
        transform: translateY(-1px);
    }
    .veo-chat-show-full-btn:focus-visible {
        outline: 2px solid rgba(165, 180, 253, 0.9);
        outline-offset: 2px;
    }
    .veo-chat-message--assistant .veo-chat-message-meta {
        margin-top: 0.5rem;
    }
    .veo-chat-message-bubble--status {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    /* Ошибка + строка «Получено / ID» — одна колонка: левый край плашки = левый край мета (без отступа под тулбар, его здесь нет) */
    .veo-chat-message--assistant .veo-chat-message-bubble--status.veo-chat-status--error {
        margin-left: 0;
        align-self: flex-start;
        max-width: min(580px, calc(100% - 1rem));
        width: 100%;
        min-width: min(320px, 100%);
    }
    /* Ошибка в паре user/assistant — карточка как пузырь промпта, в красной гамме */
    .veo-chat-message-bubble--status.veo-chat-status--error {
        align-items: center;
        gap: 0.28rem;
        padding: 0.5rem 0.72rem 0.52rem 0.42rem;
        background: linear-gradient(135deg, rgba(42, 12, 16, 0.96) 0%, rgba(22, 10, 12, 0.98) 100%);
        border: 1px solid rgba(239, 68, 68, 0.52);
        border-radius: 14px;
        box-shadow:
            0 2px 14px rgba(0, 0, 0, 0.38),
            0 0 0 1px rgba(248, 113, 113, 0.1) inset,
            0 0 20px rgba(239, 68, 68, 0.14);
    }
    .veo-chat-error-text-col {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    .veo-chat-error-expand-meta {
        margin-top: 0;
        margin-bottom: 0;
    }
    .veo-chat-message-bubble--status.veo-chat-status--error .veo-chat-error-text {
        flex: 0 1 auto;
        width: 100%;
        min-width: 0;
        line-height: 1.45;
        font-size: 0.9rem;
        font-weight: 400;
        text-shadow: 0 0 8px rgba(239, 68, 68, 0.22);
        word-break: break-word;
    }
    /* Анимированный крестик ошибки (pqoqubbw/icons — отрисовка штрихов + stagger 0.2s) */
    .veo-chat-error-x-icon {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        color: #ef4444;
        filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.75)) drop-shadow(0 0 12px rgba(220, 38, 38, 0.35));
    }
    .veo-chat-error-x-svg {
        display: block;
        width: 22px;
        height: 22px;
    }
    .veo-chat-error-x-arm {
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        vector-effect: non-scaling-stroke;
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
        opacity: 0;
        animation: veo-error-x-arm-draw 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
    .veo-chat-error-x-arm--b {
        animation-delay: 0.2s;
    }
    @keyframes veo-error-x-arm-draw {
        0% {
            opacity: 0;
            stroke-dashoffset: 1;
        }
        35% {
            opacity: 1;
        }
        100% {
            opacity: 1;
            stroke-dashoffset: 0;
        }
    }
    @media (prefers-reduced-motion: reduce) {
        .veo-chat-error-x-arm {
            animation: none;
            opacity: 1;
            stroke-dashoffset: 0;
        }
    }
    .veo-chat-message-bubble.veo-chat-message-combined {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .veo-chat-message-combined .veo-chat-prompt-preview {
        font-weight: 500;
        color: rgba(255, 255, 255, 0.95);
        padding-bottom: 0.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        width: 100%;
    }
    .veo-chat-message-combined .veo-chat-status-row {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        color: rgba(255, 255, 255, 0.75);
        font-size: 0.88rem;
    }
    /* Плейсхолдер «генерируется» — без внешней обводки, только сам прямоугольник с анимацией */
    .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-generating-placeholder) {
        background: transparent;
        border: none;
        padding: 0.5rem 0;
        padding-left: calc(0.85rem + 52px + 0.85rem);
        min-width: 0;
        width: fit-content;
        max-width: 100%;
        overflow: visible;
    }
    body.veo-generation-body:not(.mobile-version) .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-generating-placeholder),
    body.veo-generation-body:not(.mobile-version) .generation-form .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-generating-placeholder) {
        max-width: 50%;
    }
    .veo-generating-placeholder {
        position: relative;
        width: 100%;
        max-width: min(var(--veo-d-chat-video-16-9), 100%);
        min-width: 0;
        aspect-ratio: 16 / 9;
        border-radius: 14px;
        overflow: hidden;
        background: #080816;
        border: 1px solid rgba(99, 102, 241, 0.28);
    }
    body.veo-generation-body:not(.mobile-version) .veo-chat-message-bubble .veo-generating-placeholder {
        min-width: 0;
        max-width: 100%;
    }
    .veo-generating-placeholder-shimmer {
        position: absolute;
        inset: 0;
        background: linear-gradient(
            110deg,
            transparent 0%,
            transparent 38%,
            rgba(139, 92, 246, 0.1) 50%,
            transparent 62%,
            transparent 100%
        );
        background-size: 200% 100%;
        animation: veo-generating-shimmer 2.2s ease-in-out infinite;
    }
    @keyframes veo-generating-shimmer {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }
    .veo-generating-badge {
        position: absolute;
        top: 0.65rem;
        left: 0.65rem;
        z-index: 2;
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.28rem 0.5rem 0.28rem 0.4rem;
        border-radius: 8px;
        background: rgba(15, 12, 41, 0.92);
        border: 1px solid rgba(129, 140, 248, 0.4);
        color: rgba(224, 231, 255, 0.95);
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        pointer-events: none;
    }
    .veo-generating-badge-icon {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        opacity: 0.95;
    }
    .veo-generating-badge-label {
        line-height: 1;
    }
    .veo-generating-center {
        position: absolute;
        inset: 0;
        z-index: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.65rem;
        /* Бейдж сверху — компенсируем, чтобы анимация была по центру по высоте */
        padding-top: 2rem;
        box-sizing: border-box;
    }
    .veo-generating-loader {
        position: relative;
        width: 88px;
        height: 88px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .veo-generating-loader-ring {
        position: absolute;
        inset: 0;
        border-radius: 50%;
        border: 3px solid rgba(99, 102, 241, 0.22);
        border-top-color: rgba(167, 139, 250, 0.95);
        animation: veo-generating-spin 0.9s linear infinite;
    }
    @keyframes veo-generating-spin {
        to { transform: rotate(360deg); }
    }
    .veo-generating-dots {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    .veo-generating-dots span {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: rgba(196, 181, 253, 0.95);
        box-shadow: 0 0 10px rgba(167, 139, 250, 0.45);
        animation: veo-generating-dot 1.1s ease-in-out infinite;
    }
    .veo-generating-dots span:nth-child(2) {
        animation-delay: 0.15s;
    }
    .veo-generating-dots span:nth-child(3) {
        animation-delay: 0.3s;
    }
    @keyframes veo-generating-dot {
        0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
        40% { transform: translateY(-6px); opacity: 1; }
    }
    .veo-generating-caption {
        margin: 0;
        font-size: 0.92rem;
        font-weight: 600;
        color: rgba(199, 210, 254, 0.88);
        letter-spacing: 0.02em;
        text-shadow: 0 1px 12px rgba(15, 12, 41, 0.9);
    }
    /* Тулбар слева от видео: G, Скачать, Повторить, Редактировать, Ещё */
    .veo-result-with-toolbar {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 0.95rem;
        width: fit-content;
        max-width: 100%;
        overflow: visible;
    }
    .veo-result-toolbar {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        flex-shrink: 0;
        overflow: visible;
        padding: 0.5rem;
        border-radius: 14px;
        position: relative;
        z-index: 2;
        isolation: isolate;
        /* Сплошной подложка + градиент — звёзды чата не просвечивают сквозь слой */
        background-color: #0f0c29;
        background-image: linear-gradient(135deg, #1e1b4b 0%, #0f0c29 100%);
        border: 1px solid rgba(167, 139, 250, 0.3);
    }
    .veo-toolbar-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #1e1b4b;
        background-image: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
        border: 1px solid rgba(167, 139, 250, 0.5);
        border-radius: 10px;
        color: rgba(224, 231, 255, 0.95);
        cursor: pointer;
        transition: background 0.2s, border-color 0.2s, color 0.2s;
    }
    .veo-toolbar-btn:hover {
        background-color: #312e81;
        background-image: linear-gradient(135deg, #4338ca 0%, #312e81 100%);
        border-color: rgba(196, 181, 253, 0.8);
        color: #fff;
    }
    .veo-toolbar-btn svg {
        width: 20px;
        height: 20px;
    }
    /* Блок иконки G в тулбаре результата; название модели — только в тултипе при наведении */
    .veo-result-toolbar > .veo-toolbar-ai-block {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex-shrink: 0;
    }
    /* Иконка Veo в тулбаре — как кнопка у соседей; тултип не режется overflow бейджа */
    .veo-result-toolbar > .veo-toolbar-ai-block .veo-toolbar-ai-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        cursor: default;
        border-radius: 10px;
        position: relative;
        background-color: #1e1b4b;
        background-image: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
        border: 1px solid rgba(167, 139, 250, 0.5);
    }
    .veo-result-toolbar > .veo-toolbar-ai-block button.veo-toolbar-ai-icon {
        appearance: none;
        margin: 0;
        padding: 0;
        font: inherit;
        line-height: 0;
        color: inherit;
    }
    .veo-result-toolbar > .veo-toolbar-ai-block .veo-toolbar-ai-icon.veo-google-g-badge,
    .veo-result-toolbar > .veo-toolbar-ai-block .veo-toolbar-ai-icon.veo-google-g-badge-sm {
        overflow: visible;
        animation: none;
    }
    .veo-result-toolbar > .veo-toolbar-ai-block .veo-toolbar-ai-icon.veo-google-g-badge::before,
    .veo-result-toolbar > .veo-toolbar-ai-block .veo-toolbar-ai-icon.veo-google-g-badge::after {
        display: none;
    }
    .veo-result-toolbar > .veo-toolbar-ai-block .veo-toolbar-ai-icon.veo-google-g-badge-sm {
        width: 40px;
        height: 40px;
        margin-right: 0;
    }
    .veo-result-toolbar > .veo-toolbar-ai-block .veo-toolbar-ai-icon .veo-google-g-icon {
        width: 22px;
        height: 22px;
    }
    /* Тултипы тулбара (в т.ч. название модели у G) — единая компактная высота и стиль */
    .veo-result-toolbar .veo-tooltip.veo-tooltip--right:not(.veo-tooltip--fit) {
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
        line-height: 1.2;
        min-height: unset;
    }
    .veo-toolbar-btn-download {
        text-decoration: none;
        cursor: pointer;
    }
    .veo-toolbar-more-wrap {
        position: relative;
    }
    /* «Ещё» — те же фон и иконка, что у Скачать / Повторить / Редактировать (.veo-toolbar-btn) */
    .veo-result-more-menu {
        position: absolute;
        left: 100%;
        top: 0;
        margin-left: 6px;
        min-width: 280px;
        padding: 0.5rem 0;
        background: linear-gradient(180deg, rgba(28, 28, 42, 0.98) 0%, rgba(20, 20, 35, 0.99) 100%);
        border: 1px solid rgba(99, 102, 241, 0.25);
        border-radius: var(--radius-md);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 12px rgba(99, 102, 241, 0.08);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        z-index: 200;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s, visibility 0.2s;
    }
    .veo-result-more-menu.veo-result-more-menu--open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .veo-more-menu-item {
        display: block;
        width: 100%;
        padding: 0.5rem 1rem;
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.95);
        font-size: 0.875rem;
        font-weight: 500;
        text-align: left;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
    }
    .veo-more-menu-item:hover {
        background: rgba(139, 92, 246, 0.28);
        color: rgba(255, 255, 255, 0.98);
    }
    .veo-more-menu-item--danger {
        color: rgba(252, 165, 165, 0.95);
    }
    .veo-more-menu-item--danger:hover {
        background: rgba(239, 68, 68, 0.22);
        color: #fecaca;
    }
    .veo-more-menu-item--copy-id {
        white-space: normal;
        line-height: 1.35;
        padding: 0.55rem 1rem;
    }
    .veo-more-menu-item--copy-id .veo-more-menu-item-title {
        display: block;
        font-weight: 600;
        margin-bottom: 0.2rem;
    }
    .veo-more-menu-item--copy-id .veo-more-menu-item-desc {
        display: block;
        font-size: 0.78rem;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.62);
    }
    .veo-params-modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
        padding: 1rem;
    }
    .veo-params-modal {
        background: linear-gradient(135deg, #1e1b4b 0%, #0f0c29 100%);
        border: 1px solid rgba(139, 92, 246, 0.5);
        border-radius: 12px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 32px rgba(139, 92, 246, 0.2);
        max-width: 100%;
        width: 420px;
        max-height: 80vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    .veo-params-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(139, 92, 246, 0.3);
        color: #e9d5ff;
        font-weight: 600;
    }
    .veo-params-modal-close {
        background: none;
        border: none;
        color: rgba(196, 181, 253, 0.8);
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        padding: 0 0.25rem;
    }
    .veo-params-modal-close:hover {
        color: #e9d5ff;
    }
    .veo-params-modal-body {
        padding: 1rem;
        margin: 0;
        overflow: auto;
        color: rgba(196, 181, 253, 0.95);
        font-size: 0.9rem;
        line-height: 1.5;
        white-space: pre-wrap;
        word-break: break-word;
    }
    .veo-result-with-toolbar .veo-video-block {
        flex: 0 0 auto;
        min-width: 0;
        width: fit-content;
        max-width: 100%;
        position: relative;
        z-index: 1;
        gap: 0.95rem;
    }
    /* Портретное видео (9:16, 3:4) — тулбар слева вертикально, видео справа */
    .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="portrait"]) {
        max-width: min(var(--veo-d-chat-video-3-4-toolbar), 100%);
        flex-direction: row;
        align-items: flex-start;
        /* Как у 16:9: одинаковый зазор между видео и колонкой кнопок */
        gap: 0.95rem;
    }
    /* Портрет: те же 40×40 и gap 0.5rem, что у 16:9 — без отдельного уменьшения кнопок */
    .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="portrait"]) .veo-video-block {
        max-width: var(--veo-d-chat-video-3-4);
        flex: 0 0 auto;
        align-items: flex-start;
    }
    /*
     * 9:16 / 3:4: базовый .veo-video-wrapper[data-aspect="9:16"] задаёт margin-left/right: auto — рамка по центру колонки,
     * а «Получено / ID» без auto-margin остаётся слева → разный левый край. Убираем centering у ряда с тулбаром.
     */
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="portrait"]) .veo-video-block > .veo-video-wrapper[data-aspect="9:16"],
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="portrait"]) .veo-video-block > .veo-video-wrapper[data-aspect="3:4"] {
        margin-left: 0;
        margin-right: 0;
        align-self: flex-start;
    }
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="portrait"]) .veo-video-block > .veo-video-block-meta {
        align-self: stretch;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="portrait"]) .veo-result-more-menu {
        left: 0;
        right: auto;
        transform: none;
        top: auto;
        bottom: 100%;
        margin-left: 0;
        margin-bottom: 6px;
    }
    /* Ландшафтные форматы: список «Ещё» над кнопкой, не вниз под ролик */
    .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="landscape"]) .veo-result-more-menu {
        left: 0;
        right: auto;
        transform: none;
        top: auto;
        bottom: 100%;
        margin-left: 0;
        margin-bottom: 6px;
    }
    /* Ландшафт / квадрат / ультраширокий — компактный ряд с тулбаром (потолок по самому широкому 21:9) */
    .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="landscape"]) {
        max-width: min(calc(var(--veo-d-chat-video-21-9) + var(--veo-d-chat-16-9-toolbar-slack)), 100%);
    }
    .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="landscape"]) .veo-video-block {
        max-width: min(var(--veo-d-chat-video-21-9), 100%);
    }
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="landscape"]) {
        max-width: calc(var(--veo-d-chat-video-21-9) + var(--veo-d-chat-16-9-toolbar-slack));
        width: fit-content;
        align-items: flex-start;
    }
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="landscape"]) .veo-video-block {
        flex: 1 1 0%;
        min-width: 0;
        max-width: min(var(--veo-d-chat-video-21-9), 100%);
        width: auto;
        align-self: flex-start;
    }
    /* Тулбар + ролик: геометрия рамки по высоте столбца кнопок — для каждого соотношения свой множитель */
    body.veo-generation-body:not(.mobile-version) #veoChatArea .veo-chat-messages .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect="16:9"]) .veo-video-wrapper[data-aspect="16:9"],
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect="16:9"]) .veo-video-wrapper[data-aspect="16:9"] {
        width: calc(var(--veo-result-toolbar-stack-h) * 16 / 9);
        max-width: min(100%, calc(var(--veo-result-toolbar-stack-h) * 16 / 9), var(--veo-d-chat-video-16-9));
        aspect-ratio: 16 / 9;
        height: auto;
        max-height: var(--veo-result-toolbar-stack-h);
        box-sizing: border-box;
    }
    body.veo-generation-body:not(.mobile-version) #veoChatArea .veo-chat-messages .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect="4:3"]) .veo-video-wrapper[data-aspect="4:3"],
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect="4:3"]) .veo-video-wrapper[data-aspect="4:3"] {
        width: calc(var(--veo-result-toolbar-stack-h) * 4 / 3);
        max-width: min(100%, calc(var(--veo-result-toolbar-stack-h) * 4 / 3), var(--veo-d-chat-video-4-3));
        aspect-ratio: 4 / 3;
        height: auto;
        max-height: var(--veo-result-toolbar-stack-h);
        box-sizing: border-box;
    }
    body.veo-generation-body:not(.mobile-version) #veoChatArea .veo-chat-messages .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect="1:1"]) .veo-video-wrapper[data-aspect="1:1"],
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect="1:1"]) .veo-video-wrapper[data-aspect="1:1"] {
        width: var(--veo-result-toolbar-stack-h);
        max-width: min(100%, var(--veo-result-toolbar-stack-h), var(--veo-d-chat-video-1-1));
        aspect-ratio: 1 / 1;
        height: auto;
        max-height: var(--veo-result-toolbar-stack-h);
        box-sizing: border-box;
    }
    body.veo-generation-body:not(.mobile-version) #veoChatArea .veo-chat-messages .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect="21:9"]) .veo-video-wrapper[data-aspect="21:9"],
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect="21:9"]) .veo-video-wrapper[data-aspect="21:9"] {
        width: calc(var(--veo-result-toolbar-stack-h) * 21 / 9);
        max-width: min(100%, calc(var(--veo-result-toolbar-stack-h) * 21 / 9), var(--veo-d-chat-video-21-9));
        aspect-ratio: 21 / 9;
        height: auto;
        max-height: var(--veo-result-toolbar-stack-h);
        box-sizing: border-box;
    }
    .veo-chat-message-bubble .veo-video-wrapper {
        max-width: 100%;
        margin: 0;
    }
    .veo-chat-message-bubble .veo-video-wrapper video {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }
    /* Только ПК: absolute у video + fit-content у пузыря на мобилке схлопывали ширину 16:9 */
    body.veo-generation-body:not(.mobile-version) .veo-chat-message-bubble .veo-video-wrapper.veo-video-wrapper--custom video {
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 0;
        box-sizing: border-box;
    }
    .veo-video-block {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    /* Получено + ID — как строка «Отправлено: …» у пользователя: без отдельного «окна» */
    .veo-video-block-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        align-self: flex-start;
        gap: 0.35rem 0.65rem;
        max-width: 100%;
        min-width: 0;
        font-size: 0.8rem;
        font-weight: 500;
        line-height: 1.35;
        padding: 0.15rem 0;
        margin-top: 0.35rem;
        background: none;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }
    .veo-result-with-toolbar .veo-video-block-meta {
        margin-top: 0;
        gap: 0.48rem 0.7rem;
        line-height: 1.42;
    }
    /* Мета «Получено / ID» под красным блоком ошибки (не внутри .veo-video-block) */
    .veo-chat-message-bubble > .veo-video-block-meta {
        margin-top: 0.35rem;
        align-self: flex-start;
    }
    .veo-video-block-received {
        flex: 1 1 12rem;
        min-width: 0;
        font-size: 0.8rem;
        font-weight: 500;
        font-variant-numeric: tabular-nums;
        color: rgba(165, 180, 252, 0.95);
        word-break: break-word;
        line-height: 1.35;
    }
    .veo-video-block-id-wrap {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        min-width: 0;
        flex: 1 1 auto;
        /* Одна линия с цифрами: общий размер и мятный цвет */
        --veo-block-id-mint: rgba(167, 243, 208, 0.98);
        --veo-block-id-size: 0.8rem;
    }
    .veo-video-block-id-label {
        flex-shrink: 0;
        font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
        font-weight: 600;
        font-size: var(--veo-block-id-size);
        line-height: 1.25;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        color: var(--veo-block-id-mint);
    }
    .veo-video-block-id-value {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
        font-size: var(--veo-block-id-size);
        font-weight: 600;
        line-height: 1.25;
        font-variant-numeric: tabular-nums;
        color: var(--veo-block-id-mint);
        background: none;
        padding: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    /* Кнопка копирования ID — та же мятная гамма, не лаванда .veo-user-msg-btn */
    .veo-video-block-id-copy {
        flex-shrink: 0;
    }
    body.veo-generation-body .veo-video-block-meta .veo-video-block-id-copy.veo-user-msg-btn {
        color: rgba(110, 231, 183, 0.92);
    }
    body.veo-generation-body .veo-video-block-meta .veo-video-block-id-copy.veo-user-msg-btn:hover {
        color: #d1fae5;
        background: rgba(52, 211, 153, 0.14);
    }
    .veo-video-block-id-help {
        flex-basis: 100%;
        width: 100%;
        margin: 0.2rem 0 0;
        padding: 0;
        border-radius: 0;
        background: none;
        border: none;
        box-shadow: none;
        color: rgba(165, 180, 252, 0.65);
        font-size: 0.72rem;
        line-height: 1.45;
        font-weight: 400;
        text-align: left;
    }
    body.veo-generation-body .veo-video-block-id-copy.vf-copy-hint::after {
        white-space: normal;
        min-width: 260px;
        max-width: min(480px, calc(100vw - 28px));
        text-align: left;
        line-height: 1.35;
    }

    .veo-video-wrapper {
        position: relative;
        width: 100%;
        max-width: min(var(--veo-d-chat-video-16-9), 100%);
        margin: 0 auto;
        aspect-ratio: 16 / 9;
        border-radius: 12px;
        overflow: hidden;
        box-sizing: border-box;
        /* Непрозрачная подложка: иначе «звёзды» чата просвечивают в полосах letterbox и у скруглений */
        background-color: #0a0918;
        background-image: linear-gradient(160deg, rgba(18, 14, 45, 0.95) 0%, rgba(8, 7, 22, 0.98) 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid rgba(139, 92, 246, 0.35);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(139, 92, 246, 0.15);
    }
    .veo-video-wrapper.veo-video-wrapper--custom {
        border-radius: 18px;
        border: 2px solid rgba(139, 92, 246, 0.4);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 28px rgba(139, 92, 246, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    }
    .veo-video-wrapper[data-aspect="9:16"] {
        aspect-ratio: 9 / 16;
        max-width: min(var(--veo-d-chat-video-9-16), 100%);
        margin-left: auto;
        margin-right: auto;
    }
    .veo-video-wrapper[data-aspect="3:4"] {
        aspect-ratio: 3 / 4;
        max-width: min(var(--veo-d-chat-video-3-4), 100%);
        margin-left: auto;
        margin-right: auto;
    }
    .veo-video-wrapper[data-aspect="1:1"] {
        aspect-ratio: 1 / 1;
        max-width: min(var(--veo-d-chat-video-1-1), 100%);
        margin-left: auto;
        margin-right: auto;
    }
    .veo-video-wrapper[data-aspect="4:3"] {
        aspect-ratio: 4 / 3;
        max-width: min(var(--veo-d-chat-video-4-3), 100%);
    }
    .veo-video-wrapper[data-aspect="21:9"] {
        aspect-ratio: 21 / 9;
        max-width: min(var(--veo-d-chat-video-21-9), 100%);
    }
    /* ПК: ландшафт / квадрат — компактный потолок (ряд с тулбаром исключён — там своя геометрия). */
    body.veo-generation-body:not(.mobile-version) .veo-video-wrapper[data-aspect="16:9"]:not(.veo-result-with-toolbar .veo-video-wrapper) {
        max-width: min(var(--veo-d-chat-video-16-9), 100%);
    }
    body.veo-generation-body:not(.mobile-version) .veo-video-wrapper[data-aspect="4:3"]:not(.veo-result-with-toolbar .veo-video-wrapper) {
        max-width: min(var(--veo-d-chat-video-4-3), 100%);
    }
    body.veo-generation-body:not(.mobile-version) .veo-video-wrapper[data-aspect="1:1"]:not(.veo-result-with-toolbar .veo-video-wrapper) {
        max-width: min(var(--veo-d-chat-video-1-1), 100%);
    }
    body.veo-generation-body:not(.mobile-version) .veo-video-wrapper[data-aspect="21:9"]:not(.veo-result-with-toolbar .veo-video-wrapper) {
        max-width: min(var(--veo-d-chat-video-21-9), 100%);
    }
    /* Чат: до loadedmetadata — потолок по ландшафту (без тулбар-ряда); legacy 9:16 без layout — узкий потолок */
    body.veo-generation-body:not(.mobile-version) #veoChatArea .veo-chat-messages .veo-video-wrapper:not([data-aspect-layout="portrait"]):not([data-aspect="9:16"]):not(.veo-result-with-toolbar .veo-video-wrapper) {
        max-width: min(var(--veo-d-chat-video-21-9), 100%);
    }
    /* Видео заполняет рамку — только ПК (на мобилке absolute ломает ширину в fit-content ряду с тулбаром) */
    body.veo-generation-body:not(.mobile-version) .veo-video-wrapper--custom video {
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
        cursor: pointer;
        z-index: 0;
        box-sizing: border-box;
    }
    /* Готовый результат с тулбаром: без letterbox внутри фиолетовой рамки (16:9 и 9:16, слегка неверные пиксели у файла). */
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar .veo-video-wrapper.veo-video-wrapper--custom video {
        object-fit: cover;
        object-position: center;
    }
    /* Плейсхолдер для удалённых видео (B2, 30 дней) — карточка в космическом стиле */
    .veo-video-unavailable {
        display: none;
        position: absolute;
        inset: 0;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 0.55rem 0.55rem;
        text-align: center;
        z-index: 3;
        border-radius: inherit;
        overflow-x: hidden;
        overflow-y: auto;
        box-sizing: border-box;
        background: radial-gradient(ellipse 85% 70% at 50% 45%, rgba(99, 102, 241, 0.24) 0%, transparent 55%),
            linear-gradient(165deg, rgba(8, 7, 22, 0.96) 0%, rgba(18, 16, 48, 0.94) 45%, rgba(12, 10, 32, 0.97) 100%);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    .veo-video-unavailable[aria-hidden="false"] {
        display: flex;
    }
    .veo-video-unavailable-inner {
        width: 100%;
        max-width: min(var(--veo-d-chat-video-9-16-toolbar), 94%);
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }
    .veo-video-unavailable-card {
        width: 100%;
        padding: 1.15rem 1.2rem 1.25rem;
        border-radius: 14px;
        background: linear-gradient(155deg, rgba(30, 27, 75, 0.55) 0%, rgba(15, 12, 41, 0.75) 100%);
        border: 1px solid rgba(139, 92, 246, 0.38);
        box-shadow:
            0 4px 28px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(255, 255, 255, 0.06) inset,
            0 1px 0 rgba(196, 181, 253, 0.12) inset;
    }
    .veo-video-unavailable-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        margin: 0 auto 0.85rem;
        border-radius: 14px;
        color: rgba(196, 181, 253, 0.95);
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(76, 29, 149, 0.35) 100%);
        border: 1px solid rgba(139, 92, 246, 0.45);
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    }
    .veo-video-unavailable-icon-svg {
        width: 28px;
        height: 28px;
        display: block;
        filter: drop-shadow(0 2px 8px rgba(139, 92, 246, 0.35));
    }
    .veo-video-unavailable-badge {
        margin: 0 0 0.55rem;
        font-size: 0.62rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: rgba(167, 139, 250, 0.92);
    }
    .veo-video-unavailable-title {
        margin: 0 0 0.55rem;
        font-size: 1.05rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        line-height: 1.25;
        color: rgba(255, 255, 255, 0.96);
    }
    .veo-video-unavailable-text {
        margin: 0;
        font-size: 0.82rem;
        line-height: 1.55;
        color: rgba(224, 231, 255, 0.72);
    }
    .veo-video-unavailable-accent {
        font-weight: 600;
        color: rgba(129, 230, 217, 0.98);
        text-shadow: 0 0 20px rgba(45, 212, 191, 0.25);
    }
    a.veo-video-unavailable-link {
        text-decoration: underline;
        text-decoration-color: rgba(129, 230, 217, 0.45);
        text-underline-offset: 2px;
        cursor: pointer;
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.15s, text-decoration-color 0.15s;
    }
    a.veo-video-unavailable-link:hover,
    a.veo-video-unavailable-link:active {
        color: rgba(167, 243, 208, 1);
        text-decoration-color: rgba(167, 243, 208, 0.7);
    }
    /* 16:9 (и любой не 9:16): карточка по центру фрейма; размеры текста — clamp под ширину окна */
    .veo-video-wrapper:not([data-aspect-layout="portrait"]) .veo-video-unavailable {
        align-items: center;
        justify-content: center;
        padding: clamp(0.5rem, 2.5vmin, 1.25rem);
    }
    .veo-video-wrapper:not([data-aspect-layout="portrait"]) .veo-video-unavailable-inner {
        max-width: min(380px, 94%);
    }
    .veo-video-wrapper:not([data-aspect-layout="portrait"]) .veo-video-unavailable-card {
        padding: clamp(0.65rem, 2vmin, 1rem) clamp(0.75rem, 2.5vw, 1.15rem);
    }
    .veo-video-wrapper:not([data-aspect-layout="portrait"]) .veo-video-unavailable-icon {
        width: clamp(40px, 11vmin, 56px);
        height: clamp(40px, 11vmin, 56px);
        margin: 0 auto clamp(0.35rem, 1.5vmin, 0.65rem);
    }
    .veo-video-wrapper:not([data-aspect-layout="portrait"]) .veo-video-unavailable-icon-svg {
        width: clamp(22px, 5.5vmin, 30px);
        height: clamp(22px, 5.5vmin, 30px);
    }
    .veo-video-wrapper:not([data-aspect-layout="portrait"]) .veo-video-unavailable-badge {
        font-size: clamp(0.56rem, calc(1.1vmin + 0.45rem), 0.68rem);
        margin: 0 0 clamp(0.28rem, 1vmin, 0.45rem);
        letter-spacing: 0.1em;
    }
    .veo-video-wrapper:not([data-aspect-layout="portrait"]) .veo-video-unavailable-title {
        font-size: clamp(0.95rem, calc(1.8vmin + 0.55rem), 1.18rem);
        margin: 0 0 clamp(0.32rem, 1vmin, 0.5rem);
        line-height: 1.22;
    }
    .veo-video-wrapper:not([data-aspect-layout="portrait"]) .veo-video-unavailable-text {
        font-size: clamp(0.76rem, calc(1.1vmin + 0.48rem), 0.9rem);
        line-height: 1.48;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    /* Десктоп 16:9: оверлей без внутреннего скролла; компактная карточка, чтобы влезала в ту же высоту, что и колонка тулбара */
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="landscape"]) .veo-video-unavailable {
        padding: clamp(0.45rem, 1.6vmin, 0.85rem);
        overflow: hidden;
        overflow-x: hidden;
        overflow-y: hidden;
        overscroll-behavior: none;
    }
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="landscape"]) .veo-video-unavailable-inner {
        max-width: min(420px, 94%);
        max-height: 100%;
        min-height: 0;
        overflow: hidden;
        justify-content: center;
    }
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="landscape"]) .veo-video-unavailable-card {
        padding: clamp(0.55rem, 1.8vmin, 0.9rem) clamp(0.7rem, 2.2vw, 1.05rem);
        max-height: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="landscape"]) .veo-video-unavailable-icon {
        width: clamp(40px, 9vmin, 52px);
        height: clamp(40px, 9vmin, 52px);
        margin-bottom: clamp(0.28rem, 1vmin, 0.5rem);
    }
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="landscape"]) .veo-video-unavailable-icon-svg {
        width: clamp(22px, 5vmin, 28px);
        height: clamp(22px, 5vmin, 28px);
    }
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="landscape"]) .veo-video-unavailable-badge {
        font-size: clamp(0.52rem, calc(0.75vmin + 0.42rem), 0.65rem);
        margin-bottom: clamp(0.22rem, 0.85vmin, 0.4rem);
    }
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="landscape"]) .veo-video-unavailable-title {
        font-size: clamp(0.88rem, calc(1.55vmin + 0.52rem), 1.08rem);
        margin-bottom: clamp(0.28rem, 1vmin, 0.48rem);
        line-height: 1.2;
    }
    body.veo-generation-body:not(.mobile-version) .veo-result-with-toolbar:has(.veo-video-wrapper[data-aspect-layout="landscape"]) .veo-video-unavailable-text {
        font-size: clamp(0.7rem, calc(1vmin + 0.42rem), 0.84rem);
        line-height: 1.4;
    }
    .veo-video-wrapper[data-aspect-layout="portrait"] .veo-video-unavailable {
        align-items: center;
        padding: 1rem 0.85rem;
    }
    .veo-video-wrapper.veo-video-wrapper--unavailable .veo-video-unavailable {
        display: flex;
    }
    .veo-video-wrapper.veo-video-wrapper--unavailable {
        border-color: rgba(139, 92, 246, 0.28);
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(139, 92, 246, 0.1);
    }
    .veo-video-wrapper.veo-video-wrapper--unavailable video {
        opacity: 0.22;
        filter: grayscale(0.35) brightness(0.75);
    }
    @keyframes veo-player-icon-glow {
        0%, 100% {
            filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.14));
            opacity: 1;
        }
        50% {
            filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.38)) drop-shadow(0 0 16px rgba(196, 181, 253, 0.4));
            opacity: 0.96;
        }
    }
    /* Лёгкое свечение кольца — в тон нижним кнопкам (не лавандовый градиент) */
    @keyframes veo-player-big-ring-glow {
        0%, 100% {
            box-shadow:
                0 4px 20px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(255, 255, 255, 0.08) inset,
                0 0 18px rgba(99, 102, 241, 0.18);
        }
        50% {
            box-shadow:
                0 6px 24px rgba(0, 0, 0, 0.42),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset,
                0 0 22px rgba(129, 140, 248, 0.22);
        }
    }
    @media (prefers-reduced-motion: reduce) {
        .veo-player-big-play svg,
        .veo-player-big-pause svg,
        .veo-player-play .veo-player-icon-play,
        .veo-player-play .veo-player-icon-pause {
            animation: none !important;
        }
        .veo-player-big-play::before,
        .veo-player-big-pause::before {
            animation: none !important;
        }
    }
    /* Большие Play / Pause по центру — один стиль */
    .veo-player-big-play,
    .veo-player-big-pause {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 2;
        transition: opacity 0.2s;
    }
    /* Круг как у .veo-player-btn (громкость, PiP, полный экран) — тот же фон, бордер, цвет иконки */
    .veo-player-big-play::before,
    .veo-player-big-pause::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        width: 96px;
        height: 96px;
        margin-left: -48px;
        margin-top: -48px;
        border-radius: 50%;
        background: rgba(18, 16, 45, 0.98);
        border: 1px solid rgba(139, 92, 246, 0.5);
        box-shadow:
            0 2px 12px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.06) inset;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
        animation: veo-player-big-ring-glow 2.8s ease-in-out infinite;
    }
    .veo-player-big-play:hover::before,
    .veo-player-big-pause:hover::before {
        transform: scale(1.06);
        background: rgba(49, 46, 129, 0.95);
        border-color: rgba(167, 139, 250, 0.7);
        box-shadow:
            0 4px 18px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(255, 255, 255, 0.08) inset,
            0 0 20px rgba(99, 102, 241, 0.2);
    }
    .veo-player-big-play svg,
    .veo-player-big-pause svg {
        position: relative;
        width: 56px;
        height: 56px;
        display: block;
        margin: 0;
        flex-shrink: 0;
        color: rgba(224, 231, 255, 0.95);
        animation: veo-player-icon-glow 2.2s ease-in-out infinite;
        transition: transform 0.25s ease, color 0.25s ease;
    }
    .veo-player-big-play:hover svg,
    .veo-player-big-pause:hover svg {
        transform: scale(1.06);
        color: #fff;
    }
    .veo-player-big-play[style*="display: none"],
    .veo-player-big-pause[style*="display: none"] {
        pointer-events: none;
    }
    /* Панель управления — появляется после старта воспроизведения. cursor: pointer — нижняя часть иконки play/pause перекрыта панелью */
    .veo-player-controls {
        position: absolute;
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 0.5rem;
        z-index: 2;
        opacity: 0;
        visibility: hidden;
        transform: translateY(4px);
        transition: opacity 0.25s ease, visibility 0.25s, transform 0.25s ease;
        cursor: pointer;
    }
    .veo-player-controls.veo-player-controls--visible,
    .veo-video-wrapper--custom:hover .veo-player-controls {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .veo-player-bar {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 0.85rem;
        background: rgba(18, 16, 45, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(139, 92, 246, 0.35);
        border-radius: 999px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.12);
        cursor: pointer;
    }
    .veo-player-btn {
        flex-shrink: 0;
        width: 36px;
        height: 36px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(18, 16, 45, 0.98);
        border: 1px solid rgba(139, 92, 246, 0.5);
        border-radius: 50%;
        color: rgba(224, 231, 255, 0.95);
        cursor: pointer;
        transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    }
    .veo-player-btn:hover {
        background: rgba(49, 46, 129, 0.95);
        border-color: rgba(167, 139, 250, 0.7);
        color: #fff;
        transform: scale(1.05);
    }
    .veo-player-btn svg {
        width: 18px;
        height: 18px;
        display: block;
    }
    .veo-player-play {
        position: relative;
    }
    .veo-player-play .veo-player-icon-play,
    .veo-player-play .veo-player-icon-pause {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 18px;
        height: 18px;
        margin: 0;
        transform: translate(-50%, -50%);
        animation: veo-player-icon-glow 2.2s ease-in-out infinite;
    }
    .veo-player-play .veo-player-icon-pause {
        transform: translate(-50%, -50%);
    }
    .veo-player-progress-pill {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }
    .veo-player-progress {
        flex: 1;
        min-width: 0;
        height: 5px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 999px;
        cursor: pointer;
        overflow: hidden;
    }
    .veo-player-progress-fill {
        height: 100%;
        width: 0%;
        background: linear-gradient(90deg, #6d28d9, #4f46e5);
        border-radius: 999px;
        transition: width 0.1s linear;
    }
    .veo-player-time {
        flex-shrink: 0;
        font-size: 0.75rem;
        font-variant-numeric: tabular-nums;
        color: rgba(255, 255, 255, 0.9);
    }
    .veo-player-btn.veo-player-muted {
        opacity: 0.6;
    }
    /* Обёртка громкости — при наведении показывается вертикальная шкала. Слайдер absolute — не занимает места в ряду */
    .veo-player-volume-wrap {
        position: relative;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    .veo-player-volume-slider {
        position: absolute;
        left: 50%;
        bottom: 100%;
        transform: translateX(-50%);
        margin-bottom: 4px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s, visibility 0.2s;
    }
    .veo-player-volume-wrap:hover .veo-player-volume-slider {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .veo-player-volume-track {
        width: 12px;
        height: 100px;
        background: #1e1b4b;
        border: 1px solid rgba(167, 139, 250, 0.4);
        border-radius: 999px;
        cursor: pointer;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    .veo-player-volume-fill {
        width: 100%;
        height: 0%;
        background: linear-gradient(180deg, #6d28d9, #4f46e5);
        border-radius: 999px;
        transition: height 0.05s;
        min-height: 4px;
    }
    /* 16:9 — один ряд: play | progress | time | vol | pip | fs */
    .veo-video-wrapper:not([data-aspect-layout="portrait"]) .veo-player-controls {
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
    }
    .veo-video-wrapper:not([data-aspect-layout="portrait"]) .veo-player-stack {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.35rem;
        margin-left: 0.25rem;
        flex-shrink: 0;
    }
    .veo-video-wrapper:not([data-aspect-layout="portrait"]) .veo-player-fs-bar {
        display: none;
    }
    .veo-video-wrapper:not([data-aspect-layout="portrait"]) .veo-player-fs-stack {
        display: flex;
    }
    /* 9:16 — отдельный стиль: vol | pip | fs стеком вертикально справа (как на скрине 2) */
    .veo-video-wrapper[data-aspect-layout="portrait"] .veo-player-controls {
        justify-content: space-between;
        align-items: flex-end;
    }
    .veo-video-wrapper[data-aspect-layout="portrait"] .veo-player-bar {
        flex: 1;
        min-width: 0;
    }
    .veo-video-wrapper[data-aspect-layout="portrait"] .veo-player-stack {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.35rem;
        margin-left: 0.35rem;
        flex-shrink: 0;
    }
    .veo-video-wrapper[data-aspect-layout="portrait"] .veo-player-fs-bar {
        display: none;
    }
    .veo-video-wrapper[data-aspect-layout="portrait"] .veo-player-fs-stack {
        display: flex;
    }

    /* 9:16 ПК: кнопки (громкость / PiP / полный экран) над панелью; полоска прогресса на всю ширину ролика */
    body.veo-generation-body:not(.mobile-version) .veo-video-wrapper[data-aspect-layout="portrait"] .veo-player-controls {
        flex-direction: column-reverse;
        align-items: stretch;
        justify-content: flex-end;
        gap: 0.42rem;
        left: 0.35rem;
        right: 0.35rem;
        bottom: 0.45rem;
    }
    body.veo-generation-body:not(.mobile-version) .veo-video-wrapper[data-aspect-layout="portrait"] .veo-player-bar {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        flex: 0 0 auto;
        border-radius: 12px;
        padding: 0.45rem 0.65rem;
    }
    body.veo-generation-body:not(.mobile-version) .veo-video-wrapper[data-aspect-layout="portrait"] .veo-player-stack {
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-end;
        margin-left: 0;
        align-self: flex-end;
        gap: 0.45rem;
    }
    body.veo-generation-body:not(.mobile-version) .veo-video-wrapper[data-aspect-layout="portrait"] .veo-player-progress-pill {
        flex: 1;
        min-width: 0;
    }
    body.veo-generation-body:not(.mobile-version) .veo-video-wrapper[data-aspect-layout="portrait"] .veo-player-progress {
        flex: 1;
        min-width: 0;
    }

    .veo-video-placeholder {
        position: absolute;
        inset: 0;
        background: transparent;
    }

    .veo-video-controls {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        z-index: 2;
    }

    .veo-video-ctrl {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.4);
        border: none;
        border-radius: 50%;
        color: rgba(255, 255, 255, 0.9);
        cursor: pointer;
        transition: background 0.15s;
    }

    .veo-video-ctrl:hover {
        background: rgba(0, 0, 0, 0.6);
    }

    .veo-video-ctrl svg {
        width: 16px;
        height: 16px;
    }

    .veo-chat-bubble {
        position: absolute;
        top: 1rem;
        right: 1rem;
        max-width: 220px;
        padding: 0.65rem 0.9rem;
        border-radius: 10px;
        background: rgba(0, 0, 0, 0.7);
        color: #fff;
        font-size: 0.875rem;
        line-height: 1.4;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        z-index: 2;
    }

    .veo-chat-bubble-time {
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.5);
    }

    .veo-video-progress {
        position: absolute;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2;
    }

    .veo-video-time {
        padding: 0.25rem 0.6rem;
        border-radius: 4px;
        font-size: 0.75rem;
        background: rgba(0, 0, 0, 0.6);
        color: rgba(255, 255, 255, 0.9);
    }

    .veo-video-timestamp {
        font-size: 0.8rem;
        color: var(--text-muted);
    }

    /* Поле промпта — overlay внизу, чтобы не создавать сплошную полосу, обрезающую контент.
       Градиент сверху — контент при скролле плавно просвечивает. z-index выше .veo-chat-messages */
    .veo-prompt-wrapper {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 20;
        width: 100%;
        padding: 2.5rem 1.5rem 0.75rem; /* верхний отступ — зона плавного перехода, контент просвечивает */
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        background: linear-gradient(to bottom, transparent 0%, rgba(10, 10, 15, 0.4) 35%, rgba(10, 10, 15, 0.85) 75%, rgba(10, 10, 15, 0.95) 100%);
        pointer-events: none; /* прозрачная область пропускает клики к видео/плей */
    }
    .veo-prompt-wrapper .veo-scroll-to-bottom,
    .veo-prompt-stack .veo-scroll-to-bottom,
    .veo-prompt-wrapper .veo-prompt-box {
        pointer-events: auto;
    }
    /* Слои из шаблона (клава): не перехватывать колесо над лентой; без класса — не участвуют в flex-цепочке */
    body.veo-generation-body:not(.mobile-version) #veoKeyboardBackdrop.veo-keyboard-backdrop {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 15;
        pointer-events: none;
        box-sizing: border-box;
    }
    body.veo-generation-body:not(.mobile-version) #veoKeyboardBackdrop.veo-keyboard-backdrop--visible {
        display: block;
    }
    body.veo-generation-body:not(.mobile-version) #veoKbGlassScrim.veo-kb-glass--scrim {
        pointer-events: none;
    }
    /* Кнопка «в конец» вне сворачиваемого дока (мобилка: иначе opacity:0 на collapsible прячет fixed) */
    .veo-prompt-stack {
        position: relative;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 720px;
        margin: 0 auto;
    }
    .veo-prompt-area {
        position: relative;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 720px;
        margin: 0 auto;
    }
    /* Масштаб только ленты сообщений; область ввода (промпт) всегда 100% — не тянется за ползунком */
    @supports (zoom: 1) {
        #veoChatArea .veo-chat-messages {
            zoom: var(--veo-chat-scale, 1);
        }
    }
    @supports not (zoom: 1) {
        #veoChatArea .veo-chat-messages {
            transform: scale(var(--veo-chat-scale, 1));
            transform-origin: top center;
            width: calc(100% / var(--veo-chat-scale, 1));
            margin-left: auto;
            margin-right: auto;
            box-sizing: border-box;
        }
    }
    /* Стрелка «В конец» — строго над областью ввода, поднимается при добавлении фото */
    .veo-scroll-to-bottom {
        position: absolute;
        left: 50%;
        bottom: 100%;
        margin-bottom: 6px;
        transform: translateX(-50%);
        margin-left: 0;
        width: 36px;
        height: 36px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #0f0c29 0%, #1e1b4b 30%, #312e81 60%, #4c1d95 100%);
        border: 1px solid rgba(139, 92, 246, 0.5);
        border-radius: 50%;
        color: rgba(196, 181, 253, 0.9);
        cursor: pointer;
        transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s, box-shadow 0.2s;
        z-index: 11;
        box-shadow: 0 4px 24px rgba(99, 102, 241, 0.35), 0 0 40px rgba(139, 92, 246, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    }
    .veo-scroll-to-bottom:hover {
        background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
        border-color: rgba(139, 92, 246, 0.7);
        color: #e9d5ff;
    }
    .veo-scroll-to-bottom svg {
        width: 18px;
        height: 18px;
    }
    .veo-prompt-wrapper .veo-prompt-box {
        max-width: 720px;
        width: 100%;
        min-width: 0;
        margin: 0 auto; /* центрируем без смещения — симметрия слева/справа */
    }

    .veo-prompt-box {
        position: relative;
        display: flex;
        flex-direction: column;
        border-radius: var(--radius-md);
        overflow: visible;
        isolation: isolate;
        transform-origin: center bottom;
        background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(15, 12, 41, 0.98) 50%, rgba(20, 18, 50, 0.97) 100%);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(139, 92, 246, 0.35);
        animation: veo-prompt-contour-glow 4s ease-in-out infinite;
    }
    @keyframes veo-prompt-contour-glow {
        0%, 100% { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 12px rgba(139, 92, 246, 0.12); }
        50% { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.22), 0 0 40px rgba(139, 92, 246, 0.08); }
    }
    .veo-prompt-box:focus-within {
        border-color: rgba(139, 92, 246, 0.5);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.15);
        animation:
            veo-prompt-focus-enter 0.44s cubic-bezier(0.33, 1.15, 0.48, 1) 1 both,
            veo-prompt-contour-glow-focus 3s ease-in-out infinite;
    }
    @keyframes veo-prompt-contour-glow-focus {
        0%, 100% { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(139, 92, 246, 0.18); }
        50% { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 28px rgba(139, 92, 246, 0.28), 0 0 50px rgba(139, 92, 246, 0.1); }
    }
    @keyframes veo-prompt-focus-enter {
        0% {
            transform: scale(0.988) translateY(3px);
            filter: brightness(0.93);
        }
        58% {
            transform: scale(1.006) translateY(-1px);
            filter: brightness(1.05);
        }
        100% {
            transform: scale(1) translateY(0);
            filter: brightness(1);
        }
    }
    @media (prefers-reduced-motion: reduce) {
        .veo-prompt-box:focus-within {
            animation: veo-prompt-contour-glow-focus 3s ease-in-out infinite;
            transform: none;
            filter: none;
        }
    }
    @keyframes veo-buy-btn-neon {
        0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.4), 0 0 40px rgba(124, 58, 237, 0.2); }
        50% { box-shadow: 0 0 28px rgba(139, 92, 246, 0.55), 0 0 55px rgba(124, 58, 237, 0.35); }
    }
    @keyframes veo-buy-btn-shimmer {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }
    /* «Создать видео»: пульсация контура + блик, проходящий по кнопке (как у кнопки «Купить») */
    @keyframes veo-prompt-send-soft-pulse {
        0%,
        100% {
            border-color: rgba(139, 92, 246, 0.55);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
        }
        50% {
            border-color: rgba(186, 168, 255, 0.9);
            box-shadow: 0 3px 14px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.09);
        }
    }
    @keyframes veo-prompt-send-shimmer {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }

    .veo-prompt-input-zone {
        position: relative;
        z-index: 1;
        flex: 1;
        min-height: 0;
        padding: 0.85rem 1.25rem 0.75rem;
        padding-left: 1.25rem;
        background: linear-gradient(180deg, rgba(22, 20, 55, 0.7) 0%, rgba(10, 8, 28, 0.92) 100%);
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .veo-prompt-control-bar {
        position: relative;
        z-index: 5;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: clamp(0.35rem, 1.5vw, 0.5rem);
        padding: 0.5rem 0.85rem 0.6rem;
        min-height: 36px;
        flex-wrap: nowrap;
        background: linear-gradient(180deg, rgba(30, 27, 75, 0.7) 0%, rgba(15, 12, 41, 0.95) 100%);
        border-top: none;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        overflow: visible;
    }
    .veo-prompt-control-bar::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 1px;
        background: rgba(139, 92, 246, 0.25);
    }
    /* Слева панели — только загрузка фото (режимы с изображениями) */
    .veo-prompt-control-left--photo-only {
        flex-shrink: 0;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    /* Панель промпта: иконка «фото» (Lucide / pqoqubbw-стиль pathLength + прорисовка), без коробки; красный/зелёный по квоте */
    @keyframes veo-photo-upload-img-pulse-red {
        0%, 100% {
            filter: drop-shadow(0 0 1px rgba(248, 113, 113, 0.5));
        }
        50% {
            filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.75)) drop-shadow(0 0 10px rgba(220, 38, 38, 0.35));
        }
    }
    @keyframes veo-photo-upload-img-pulse-green {
        0%, 100% {
            filter: drop-shadow(0 0 1px rgba(74, 222, 128, 0.45));
        }
        50% {
            filter: drop-shadow(0 0 5px rgba(34, 197, 94, 0.65)) drop-shadow(0 0 12px rgba(22, 101, 52, 0.3));
        }
    }
    .veo-photo-upload-wrap--control-bar .veo-photo-upload-btn {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        animation: none !important;
        color: #f87171;
        transition: color 0.2s;
        overflow: visible; /* drop-shadow и обводка не обрезаются по краям кнопки */
    }
    /* Десктоп: иконка загрузки крупнее замка / молнии / микрофона (36×36); счётчик 0/1 — без изменений */
    body.veo-generation-body:not(.mobile-version) .veo-photo-upload-wrap--control-bar .veo-photo-upload-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 0;
        box-sizing: border-box;
    }
    body.veo-generation-body:not(.mobile-version) .veo-photo-upload-wrap--control-bar .veo-photo-upload-img-icon,
    body.veo-generation-body:not(.mobile-version) .veo-photo-upload-wrap--control-bar .veo-photo-upload-img-svg {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
        box-sizing: border-box;
    }
    body.veo-generation-body:not(.mobile-version) .veo-photo-upload-wrap--control-bar .veo-photo-upload-img-stroke {
        stroke-width: 1.75;
        vector-effect: non-scaling-stroke;
    }
    body.veo-generation-body:not(.mobile-version) .veo-photo-upload-wrap--control-bar .veo-photo-upload-counter {
        bottom: 0;
        right: 0;
        min-width: 12px;
        height: 12px;
        padding: 0 2px;
        font-size: 0.52rem;
        line-height: 12px;
        border-radius: 6px;
    }
    .veo-photo-upload-wrap--control-bar .veo-photo-upload-btn:hover {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        color: #fca5a5;
    }
    .veo-photo-upload-wrap--control-bar .veo-photo-upload-img-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        overflow: visible; /* моб.: было 22×22 — резало свечение и верх/лево рамки */
    }
    /* Как видео в этой же строке и как десктоп Veo 3 — глиф 28×28 (не 22px) */
    .veo-photo-upload-wrap--control-bar .veo-photo-upload-img-svg {
        width: 28px;
        height: 28px;
        display: block;
        overflow: visible;
        transform-origin: center;
        animation: veo-photo-upload-img-pulse-red 2.2s ease-in-out infinite;
    }
    /* pathLength=1: одно число в dasharray даёт паттерн 1,1 — видна половина пути (часто «съедается» левый верх рамки) */
    .veo-photo-upload-wrap--control-bar .veo-photo-upload-img-stroke {
        stroke-dasharray: 1 0;
        stroke-dashoffset: 0;
    }
    @media (hover: hover) and (pointer: fine) {
        .veo-photo-upload-wrap--control-bar .veo-photo-upload-btn:hover .veo-photo-upload-img-stroke--frame {
            animation: veo-auto-send-zap-draw 0.55s ease forwards;
            animation-delay: 0s;
        }
        .veo-photo-upload-wrap--control-bar .veo-photo-upload-btn:hover .veo-photo-upload-img-stroke--land {
            animation: veo-auto-send-zap-draw 0.55s ease forwards;
            animation-delay: 0.1s;
        }
    }
    .veo-photo-upload-img-stroke--frame.veo-photo-upload-img-replay {
        animation: veo-auto-send-zap-draw 0.55s ease forwards;
        animation-delay: 0s;
    }
    .veo-photo-upload-img-stroke--land.veo-photo-upload-img-replay {
        animation: veo-auto-send-zap-draw 0.55s ease forwards;
        animation-delay: 0.1s;
    }
    @media (prefers-reduced-motion: reduce) {
        .veo-photo-upload-wrap--control-bar .veo-photo-upload-img-svg {
            animation: none !important;
            filter: none;
        }
        .veo-photo-upload-wrap--control-bar .veo-photo-upload-btn:hover .veo-photo-upload-img-stroke,
        .veo-photo-upload-img-stroke.veo-photo-upload-img-replay {
            animation: none !important;
        }
        .veo-photo-upload-wrap--control-bar .veo-photo-upload-img-stroke {
            stroke-dasharray: 1 0;
            stroke-dashoffset: 0;
            opacity: 1;
        }
    }
    .veo-photo-upload-wrap--control-bar .veo-photo-upload-counter {
        background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 50%, #b91c1c 100%);
        border: 1px solid rgba(254, 180, 190, 0.35);
        box-shadow: 0 0 8px rgba(180, 50, 70, 0.45);
    }
    .veo-photo-upload-wrap--control-bar.veo-photo-upload-wrap--quota-complete .veo-photo-upload-btn {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        animation: none !important;
        color: #4ade80;
    }
    .veo-photo-upload-wrap--control-bar.veo-photo-upload-wrap--quota-complete .veo-photo-upload-btn:hover {
        background: transparent !important;
        border: none !important;
        color: #86efac;
    }
    .veo-photo-upload-wrap--control-bar.veo-photo-upload-wrap--quota-complete .veo-photo-upload-img-svg {
        animation: veo-photo-upload-img-pulse-green 2.2s ease-in-out infinite;
    }
    .veo-photo-upload-wrap--control-bar.veo-photo-upload-wrap--quota-complete .veo-photo-upload-counter {
        background: linear-gradient(135deg, #14532d 0%, #166534 50%, #15803d 100%);
        border: 1px solid rgba(134, 239, 172, 0.4);
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.42);
    }
    @keyframes veo-video-upload-pulse {
        0%, 100% { filter: drop-shadow(0 0 1px rgba(96, 165, 250, 0.35)); }
        50% { filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.7)) drop-shadow(0 0 12px rgba(37, 99, 235, 0.35)); }
    }
    .veo-video-upload-wrap--control-bar .veo-video-upload-btn {
        color: #f87171;
    }
    .veo-video-upload-wrap--control-bar .veo-video-upload-btn:hover {
        color: #fca5a5;
    }
    .veo-video-upload-wrap--control-bar .veo-video-upload-svg {
        width: 28px;
        height: 28px;
        display: block;
        overflow: visible;
        animation: veo-video-upload-pulse 2.1s ease-in-out infinite;
    }
    .veo-video-upload-wrap--control-bar .veo-video-upload-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        overflow: visible;
    }
    .veo-video-upload-wrap--control-bar .veo-video-upload-stroke {
        stroke-dasharray: 1 0;
        stroke-dashoffset: 0;
    }
    .veo-video-upload-wrap--control-bar .veo-photo-upload-counter {
        background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 50%, #b91c1c 100%);
        border: 1px solid rgba(252, 165, 165, 0.4);
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.42);
    }
    .veo-video-upload-wrap--control-bar .veo-video-upload-svg {
        animation: veo-photo-upload-img-pulse-red 2.2s ease-in-out infinite;
    }
    .veo-video-upload-wrap--control-bar.veo-video-upload-wrap--min-ok .veo-video-upload-btn {
        color: #4ade80;
    }
    .veo-video-upload-wrap--control-bar.veo-video-upload-wrap--min-ok .veo-video-upload-btn:hover {
        color: #86efac;
    }
    .veo-video-upload-wrap--control-bar.veo-video-upload-wrap--min-ok .veo-video-upload-svg {
        animation: veo-photo-upload-img-pulse-green 2.2s ease-in-out infinite;
    }
    .veo-video-upload-wrap--control-bar.veo-video-upload-wrap--min-ok .veo-photo-upload-counter {
        background: linear-gradient(135deg, #14532d 0%, #166534 50%, #15803d 100%);
        border: 1px solid rgba(134, 239, 172, 0.4);
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.42);
    }
    .veo-prompt-control-left--photo-only .veo-photo-upload-wrap--control-bar .veo-photo-upload-dropdown {
        left: 0;
        right: auto;
        transform: translateY(4px);
        border-color: rgba(139, 92, 246, 0.45);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(99, 102, 241, 0.18);
    }
    /* Меню рисуется над полем промпта; без этого верхние пункты перехватываются textarea */
    .veo-prompt-box:has(#veoPhotoUploadWrap[data-open="true"]) .veo-prompt-input-zone,
    .veo-prompt-box:has(#wanAudioUploadWrap[data-open="true"]) .veo-prompt-input-zone {
        pointer-events: none;
    }
    .veo-prompt-control-left--photo-only .veo-photo-upload-wrap--control-bar .veo-photo-upload-option:hover,
    .veo-prompt-control-left--photo-only .veo-photo-upload-wrap--control-bar .veo-photo-upload-option:focus-visible {
        background: rgba(139, 92, 246, 0.28);
    }
    .veo-prompt-control-left--photo-only .veo-photo-upload-wrap--control-bar[data-open="true"] .veo-photo-upload-dropdown {
        transform: translateY(0);
    }
    .veo-prompt-control-left--photo-only .veo-photo-upload-wrap--control-bar .veo-photo-upload-dropdown::after {
        left: 12px;
        right: auto;
        transform: none;
    }
    .veo-prompt-control-left {
        display: flex;
        align-items: center;
        gap: 0.35rem;
        overflow: visible;
        flex-shrink: 0;
    }
    .veo-photo-upload-wrap {
        position: relative;
        overflow: visible;
    }
    .veo-photo-upload-btn {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 10px;
        color: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        font-variant-numeric: tabular-nums;
        transition: background 0.2s, color 0.2s, border-color 0.2s;
        flex-shrink: 0;
    }
    .veo-photo-upload-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.12);
        color: rgba(255, 255, 255, 0.85);
    }
    .veo-photo-upload-icon {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
    .veo-photo-upload-img-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    .veo-photo-upload-img-svg {
        display: block;
        width: 16px;
        height: 16px;
    }
    .veo-photo-upload-label {
        display: none;
    }
    .veo-photo-upload-counter {
        position: absolute;
        bottom: -2px;
        right: -2px;
        min-width: 14px;
        height: 14px;
        padding: 0 3px;
        font-size: 0.6rem;
        line-height: 14px;
        text-align: center;
        background: rgba(99, 102, 241, 0.9);
        border-radius: 7px;
        color: #fff;
    }
    .veo-photo-upload-dropdown {
        position: absolute;
        bottom: 100%;
        left: 0;
        margin-bottom: 0;
        min-width: 220px;
        padding: 0.5rem 0;
        background: linear-gradient(180deg, rgba(28, 28, 42, 0.98) 0%, rgba(20, 20, 35, 0.99) 100%);
        border: 1px solid rgba(99, 102, 241, 0.25);
        border-radius: var(--radius-md);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 12px rgba(99, 102, 241, 0.08);
        z-index: 500;
        opacity: 0;
        visibility: hidden;
        transform: translateY(3px);
        transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
        pointer-events: auto;
    }
    .veo-photo-upload-dropdown::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 12px;
        border: 5px solid transparent;
        border-top-color: rgba(28, 28, 42, 0.98);
        filter: drop-shadow(0 1px 0 rgba(99, 102, 241, 0.2));
        pointer-events: none;
    }
    .veo-photo-upload-wrap[data-open="true"] .veo-photo-upload-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .veo-photo-upload-dropdown.veo-infinitalk-audio-dropdown {
        min-width: 268px;
        padding: 0.45rem 0 0.5rem;
    }
    .veo-infinitalk-audio-dropdown-hint {
        margin: 0 0.55rem 0.55rem;
        padding: 0.4rem 0.55rem;
        font-size: 0.72rem;
        line-height: 1.38;
        color: rgba(245, 243, 255, 0.88);
        background: rgba(8, 8, 22, 0.82);
        border: 1px solid rgba(99, 102, 241, 0.28);
        border-radius: 8px;
        text-align: left;
    }
    .veo-infinitalk-audio-dropdown-hint__line {
        display: block;
    }
    .veo-infinitalk-audio-dropdown-hint__line + .veo-infinitalk-audio-dropdown-hint__line {
        margin-top: 0.22rem;
    }
    .veo-photo-upload-option {
        display: block;
        width: 100%;
        padding: 0.5rem 1rem;
        text-align: left;
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.95);
        font-size: 0.875rem;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.15s;
    }
    .veo-photo-upload-option:hover,
    .veo-photo-upload-option:focus-visible {
        background: rgba(139, 92, 246, 0.28);
    }
    .veo-photo-upload-limit {
        position: relative;
        padding: 0.45rem 1rem;
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.65);
        border-top: none;
    }
    .veo-photo-upload-limit::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 1px;
        background: var(--veo-divider-h);
    }
    .veo-prompt-control-right {
        display: flex;
        align-items: center;
        gap: clamp(0.3rem, 1vw, 0.4rem);
        overflow: visible;
        flex-shrink: 0;
    }

    /* Десктоп: замок / автоотправка / мик — одна область клика (ориентир — кнопка замка 36×36) */
    body.veo-generation-body:not(.mobile-version) .veo-prompt-control-right .veo-prompt-enter-btn,
    body.veo-generation-body:not(.mobile-version) .veo-prompt-control-right .veo-auto-send-btn,
    body.veo-generation-body:not(.mobile-version) .veo-prompt-control-right .veo-mic-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        box-sizing: border-box;
        border-radius: 10px;
    }

    /* Как молния/микрофон: без зелёной «плашки», только иконка; активное — лавандовый акцент */
    .veo-prompt-enter-btn {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        background: transparent !important;
        border: none !important;
        border-radius: 10px;
        color: rgba(226, 232, 240, 0.72);
        cursor: pointer;
        transition: color 0.2s;
        box-shadow: none !important;
    }
    .veo-prompt-enter-btn:hover {
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.95);
        box-shadow: none !important;
    }
    .veo-prompt-enter-btn[aria-pressed="true"] {
        background: transparent !important;
        border: none !important;
        color: #c4b5fd;
        box-shadow: none !important;
    }
    .veo-prompt-enter-btn[aria-pressed="true"]:hover {
        background: transparent !important;
        border: none !important;
        color: #ddd6fe;
        box-shadow: none !important;
    }
    .veo-prompt-enter-icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .veo-prompt-enter-icon svg {
        width: 16px;
        height: 16px;
    }
    /* Десктоп: замок Enter — как молния/мик (22px); на mobile-version остаётся 16px выше */
    body.veo-generation-body:not(.mobile-version) .veo-prompt-control-right .veo-prompt-enter-icon svg {
        width: 22px;
        height: 22px;
    }
    .veo-prompt-enter-label {
        display: none;
    }
    /* Выкл — замок закрыт */
    .veo-prompt-enter-btn .veo-prompt-enter-icon-unlocked {
        display: none;
    }
    .veo-prompt-enter-btn .veo-prompt-enter-icon-locked {
        display: flex;
    }
    /* Вкл — замок открыт */
    .veo-prompt-enter-btn[aria-pressed="true"] .veo-prompt-enter-icon-locked {
        display: none;
    }
    .veo-prompt-enter-btn[aria-pressed="true"] .veo-prompt-enter-icon-unlocked {
        display: flex;
    }

    /* Анимация замка в духе pqoqubbw/icons lock (рядом с молнией) */
    .veo-prompt-enter-btn .veo-lock-icon-pqo--prompt {
        display: block;
        overflow: visible;
        transform-origin: 50% 55%;
    }
    .veo-prompt-enter-icon-locked .veo-lock-icon-pqo--prompt {
        animation: veo-lock-pqo-svg 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    }
    .veo-prompt-enter-icon-locked .veo-lock-icon-pqo__shackle:not(.veo-lock-icon-pqo__shackle--open) {
        stroke-dasharray: 1;
        stroke-dashoffset: 0;
        animation: veo-lock-pqo-shackle 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    }
    .veo-prompt-enter-btn[aria-pressed="true"] .veo-lock-icon-pqo--prompt.veo-lock-icon-pqo--unlocked {
        animation: veo-auto-send-zap-active 2.2s ease-in-out infinite;
        transform-origin: center;
    }
    @media (prefers-reduced-motion: reduce) {
        .veo-prompt-enter-icon-locked .veo-lock-icon-pqo--prompt,
        .veo-prompt-enter-icon-locked .veo-lock-icon-pqo__shackle:not(.veo-lock-icon-pqo__shackle--open) {
            animation: none !important;
        }
        .veo-prompt-enter-icon-locked .veo-lock-icon-pqo__shackle:not(.veo-lock-icon-pqo__shackle--open) {
            stroke-dashoffset: 0 !important;
        }
        .veo-prompt-enter-btn[aria-pressed="true"] .veo-lock-icon-pqo--prompt.veo-lock-icon-pqo--unlocked {
            animation: none !important;
            filter: none !important;
        }
    }

    .veo-prompt-input {
        width: 100%;
        min-height: 2.2rem;
        max-height: 168px;
        background: transparent;
        border: none;
        color: var(--text-primary, #fff);
        font-size: 0.95rem;
        font-family: inherit;
        resize: none;
        line-height: 1.5;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.25) rgba(255, 255, 255, 0.04);
        caret-animation: manual;
    }
    .veo-prompt-input::-webkit-scrollbar {
        width: 6px;
    }
    .veo-prompt-input::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.04);
        border-radius: 3px;
    }
    .veo-prompt-input::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }
    .veo-prompt-input::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.35);
    }
    .veo-prompt-input::-webkit-scrollbar-button {
        display: none;
    }

    .veo-prompt-input::placeholder {
        color: rgba(255, 255, 255, 0.35);
    }

    .veo-prompt-input:focus {
        outline: none;
    }
    .veo-prompt-box:focus-within .veo-prompt-input::placeholder {
        color: rgba(255, 255, 255, 0.4);
    }

    .veo-prompt-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .veo-prompt-action {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 10px;
        color: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        transition: color 0.15s, background 0.15s, border-color 0.15s;
        flex-shrink: 0;
    }

    .veo-prompt-action:hover {
        color: rgba(255, 255, 255, 0.9);
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.12);
    }

    .veo-prompt-action svg {
        width: 16px;
        height: 16px;
    }
    .veo-mic-btn .veo-mic-icon {
        width: 22px;
        height: 22px;
        display: block;
        overflow: visible;
    }
    /* Микрофон — без «плашки» как у соседних action; иконка pqoqubbw/lucide-animated (капсула двигается) */
    .veo-prompt-action.veo-mic-btn {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        color: rgba(226, 232, 240, 0.72);
    }
    .veo-prompt-action.veo-mic-btn:hover {
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.95);
    }
    .veo-mic-btn .veo-mic-capsule {
        transform-origin: 12px 8.5px;
        animation: veo-mic-capsule-idle 2.8s ease-in-out infinite;
    }
    .veo-mic-btn:hover .veo-mic-capsule,
    .veo-mic-btn:focus-visible .veo-mic-capsule {
        animation: veo-mic-capsule-hover 0.6s ease-in-out infinite;
    }
    @keyframes veo-mic-capsule-idle {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-1.5px); }
    }
    @keyframes veo-mic-capsule-hover {
        0%, 100% { transform: translateY(0); }
        20% { transform: translateY(-3px); }
        40% { transform: translateY(0); }
        60% { transform: translateY(-2px); }
        80% { transform: translateY(0); }
    }

    /* Стоимость в ракетах — компактнее иконок панели; на десктопе ниже — чип в одной линии */
    .veo-prompt-tokens {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        margin: 0;
        padding: 0;
        min-width: 0;
        height: auto;
        font-size: 0.85rem;
        font-weight: 600;
        line-height: 1;
        text-align: center;
        color: rgba(255, 255, 255, 0.92);
        background: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    .veo-prompt-tokens span {
        font-weight: inherit;
        text-align: center;
    }
    /* Десктоп: хватает ракет / не хватает — цвет числа (на мобилке классы не ставятся в JS) */
    body.veo-generation-body:not(.mobile-version) .veo-prompt-tokens.veo-prompt-tokens--sufficient #costDisplayDesktop {
        color: #86efac;
        text-shadow: 0 0 8px rgba(34, 197, 94, 0.22);
    }
    body.veo-generation-body:not(.mobile-version) .veo-prompt-tokens.veo-prompt-tokens--insufficient #costDisplayDesktop {
        color: #fca5a5;
        text-shadow: 0 0 8px rgba(239, 68, 68, 0.22);
    }
    /* Десктоп: цифра + ракета — высота и скругление как у кнопок замка/микрофона (36×36, radius 10px) */
    body.veo-generation-body:not(.mobile-version) .veo-prompt-control-right .veo-prompt-tokens {
        font-size: 0.9375rem;
        font-weight: 600;
        line-height: 1;
        gap: 0.2rem;
        padding: 0 0.55rem;
        min-height: 36px;
        height: 36px;
        box-sizing: border-box;
        border-radius: 10px;
        background: rgba(15, 12, 41, 0.75);
        border: 1px solid rgba(99, 102, 241, 0.32);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    }
    body.veo-generation-body:not(.mobile-version) .veo-prompt-control-right .veo-prompt-tokens.veo-prompt-tokens--sufficient {
        background: rgba(22, 101, 52, 0.16);
        border-color: rgba(52, 211, 153, 0.32);
    }
    body.veo-generation-body:not(.mobile-version) .veo-prompt-control-right .veo-prompt-tokens.veo-prompt-tokens--insufficient {
        background: rgba(127, 29, 29, 0.18);
        border-color: rgba(248, 113, 113, 0.35);
    }
    body.veo-generation-body:not(.mobile-version) .veo-prompt-control-right .veo-prompt-tokens #costDisplayDesktop {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 0;
        font-variant-numeric: tabular-nums;
    }
    body.veo-generation-body:not(.mobile-version) .veo-prompt-control-right .veo-prompt-tokens .veo-cost-brain {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.125rem;
        line-height: 1;
        vertical-align: middle;
        transform-origin: center center;
        /* Как ракета в хедере — лёгкий покачивающийся пульс */
        animation: veo-rocket-spin 3s ease-in-out infinite;
    }
    /* Десктоп: замок 22×22; мик чуть крупнее (контур тоньше молнии); молния 25×25 */
    body.veo-generation-body:not(.mobile-version) .veo-prompt-control-right .veo-lock-icon-pqo--prompt {
        width: 22px;
        height: 22px;
        display: block;
        flex-shrink: 0;
        box-sizing: border-box;
    }
    body.veo-generation-body:not(.mobile-version) .veo-prompt-control-right .veo-mic-icon {
        width: 24px;
        height: 24px;
        display: block;
        flex-shrink: 0;
        box-sizing: border-box;
    }
    body.veo-generation-body:not(.mobile-version) .veo-prompt-control-right .veo-auto-send-zap-svg {
        width: 25px;
        height: 25px;
        display: block;
        flex-shrink: 0;
        box-sizing: border-box;
    }
    .veo-cost-brain {
        display: inline-block;
        animation: veo-rocket-spin 3s ease-in-out infinite;
    }

    /* Кнопка «Создать видео» — тот же фиолетовый стиль, что и «Купить» */
    .veo-prompt-send {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        min-width: 36px;
        width: 36px;
        height: 36px;
        padding: 0;
        flex-shrink: 0;
        background: linear-gradient(135deg, rgba(124, 58, 237, 0.4) 0%, rgba(139, 92, 246, 0.25) 50%, rgba(109, 40, 217, 0.4) 100%);
        border: 1px solid rgba(139, 92, 246, 0.6);
        border-radius: 50%;
        color: #fff;
        font-weight: 700;
        font-size: 0.85rem;
        cursor: pointer;
        overflow: hidden;
        transition: transform 0.35s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
        animation: veo-prompt-send-soft-pulse 2.5s ease-in-out infinite;
    }
    .veo-prompt-send::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.06) 35%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0.06) 65%, transparent 80%);
        background-size: 220% 100%;
        background-position: 200% 0;
        animation: veo-prompt-send-shimmer 3.8s ease-in-out infinite;
        pointer-events: none;
        z-index: 0;
        opacity: 0.75;
        transition: opacity 0.25s ease;
    }
    .veo-prompt-send:hover {
        border-color: rgba(167, 139, 250, 0.95);
        transform: scale(1.02);
        box-shadow: 0 3px 16px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
        animation: veo-prompt-send-soft-pulse 2s ease-in-out infinite;
    }
    .veo-prompt-send:hover::before {
        opacity: 0.95;
    }
    .veo-prompt-send:active {
        transform: scale(0.99);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    .veo-prompt-send:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
        animation: none;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    }
    .veo-prompt-send:disabled:hover {
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
        animation: none;
    }
    .veo-prompt-send:disabled::before,
    .veo-prompt-send:disabled:hover::before {
        animation: none;
        opacity: 0;
    }
    .veo-prompt-send-text,
    .veo-prompt-send-icon {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
    }
    .veo-prompt-send-text {
        display: none;
        font-weight: 700;
        line-height: 1;
    }
    .veo-prompt-send-icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .veo-prompt-send svg {
        width: 20px;
        height: 20px;
    }
    /* Иконка видеокамеры */
    .veo-icon-video {
        transition: transform 0.2s ease;
    }
    .veo-prompt-send:hover .veo-icon-video {
        transform: scale(1.05);
    }
    @media (min-width: 700px) {
        .veo-prompt-send {
            min-width: 120px;
            width: auto;
            height: 36px;
            padding: 0 1rem;
            border-radius: 18px;
        }
        .veo-prompt-send-text {
            display: inline-flex;
            align-items: center;
            white-space: nowrap;
            font-weight: 700;
            line-height: 1;
        }
    }
    @media (prefers-reduced-motion: reduce) {
        .veo-prompt-send,
        .veo-prompt-send:hover {
            animation: none;
        }
        .veo-prompt-send::before,
        .veo-prompt-send:hover::before {
            animation: none;
            opacity: 0;
        }
        body.veo-generation-body .btn-submit::before,
        body.veo-generation-body .btn-submit:hover:not(:disabled)::before {
            animation: none !important;
            opacity: 0 !important;
        }
    }

    .veo-mic-btn.veo-mic-recording {
        color: #fb7185;
        background: transparent !important;
        border: none !important;
        overflow: visible;
        animation: none;
    }
    /* «Звуковая» капсула + свечение иконки + кольцо — заметно, что идёт запись */
    .veo-mic-btn.veo-mic-recording::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        width: 70%;
        height: 70%;
        margin-left: -35%;
        margin-top: -35%;
        border-radius: 50%;
        border: 2px solid rgba(251, 113, 133, 0.75);
        box-shadow: 0 0 14px rgba(251, 113, 133, 0.45);
        pointer-events: none;
        z-index: 0;
        animation: veo-mic-recording-ring 1.15s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
    }
    .veo-mic-btn.veo-mic-recording .veo-mic-icon {
        position: relative;
        z-index: 1;
        transform-origin: center center;
        animation: veo-mic-icon-recording 0.7s ease-in-out infinite;
    }
    .veo-mic-btn.veo-mic-recording .veo-mic-capsule,
    .veo-mic-btn.veo-mic-recording:hover .veo-mic-capsule,
    .veo-mic-btn.veo-mic-recording:focus-visible .veo-mic-capsule {
        animation: veo-mic-capsule-recording 0.52s ease-in-out infinite;
    }
    @keyframes veo-mic-recording-ring {
        0% {
            transform: scale(0.65);
            opacity: 0.95;
        }
        70% {
            opacity: 0.25;
        }
        100% {
            transform: scale(1.85);
            opacity: 0;
        }
    }
    @keyframes veo-mic-icon-recording {
        0%, 100% {
            filter: drop-shadow(0 0 5px rgba(251, 113, 133, 0.65)) drop-shadow(0 0 12px rgba(244, 63, 94, 0.35));
        }
        50% {
            filter: drop-shadow(0 0 10px rgba(251, 113, 133, 1)) drop-shadow(0 0 22px rgba(244, 63, 94, 0.55));
        }
    }
    @keyframes veo-mic-capsule-recording {
        0%, 100% { transform: translateY(0) scaleY(1) scaleX(1); }
        20% { transform: translateY(-2px) scaleY(1.14) scaleX(0.94); }
        40% { transform: translateY(-1px) scaleY(0.9) scaleX(1.06); }
        60% { transform: translateY(-3px) scaleY(1.1) scaleX(0.96); }
        80% { transform: translateY(-0.5px) scaleY(0.95) scaleX(1.03); }
    }
    @media (prefers-reduced-motion: reduce) {
        .veo-mic-btn .veo-mic-capsule,
        .veo-mic-btn:hover .veo-mic-capsule,
        .veo-mic-btn:focus-visible .veo-mic-capsule,
        .veo-mic-btn.veo-mic-recording .veo-mic-capsule {
            animation: none;
        }
        .veo-mic-btn.veo-mic-recording::after,
        .veo-mic-btn.veo-mic-recording .veo-mic-icon {
            animation: none;
        }
        .veo-mic-btn.veo-mic-recording .veo-mic-icon {
            filter: none;
        }
    }

    /* Превью загруженных изображений — миниатюры сверху области ввода */
    .veo-chat-attachments {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 0;
        flex-wrap: wrap;
        padding: 0.85rem 1.25rem 0.5rem;
        background: linear-gradient(180deg, rgba(15, 15, 28, 0.9) 0%, rgba(10, 10, 22, 0.95) 100%);
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        position: relative;
    }
    .veo-chat-attachments::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.3), rgba(99, 102, 241, 0.4), transparent);
    }
    /* InfiniTalk: превью фото и чип аудио — одна строка (слева фото, справа полоса аудио на остаток ширины) */
    body.infinitalk-page:not(.mobile-version) .veo-infinitalk-prompt-media {
        display: none;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.42rem;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0.48rem 0.85rem 0.36rem;
        background: linear-gradient(180deg, rgba(15, 15, 28, 0.9) 0%, rgba(10, 10, 22, 0.95) 100%);
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        position: relative;
    }
    body.infinitalk-page:not(.mobile-version) .veo-infinitalk-prompt-media:has(.veo-chat-attachments[style*="flex"]),
    body.infinitalk-page:not(.mobile-version) .veo-infinitalk-prompt-media:has(.veo-prompt-video-row[style*="flex"]) {
        display: flex;
    }
    body.infinitalk-page:not(.mobile-version) .veo-infinitalk-prompt-media::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.3), rgba(99, 102, 241, 0.4), transparent);
        opacity: 0;
        pointer-events: none;
    }
    body.infinitalk-page:not(.mobile-version) .veo-infinitalk-prompt-media:has(.veo-chat-attachments[style*="flex"])::after,
    body.infinitalk-page:not(.mobile-version) .veo-infinitalk-prompt-media:has(.veo-prompt-video-row[style*="flex"])::after {
        opacity: 1;
    }
    body.infinitalk-page:not(.mobile-version) .veo-infinitalk-prompt-media .veo-chat-attachments {
        padding: 0;
        margin: 0;
        background: transparent;
        border-radius: 0;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        align-items: center;
        align-self: center;
        order: 1; /* слева фото; в HTML чип аудио выше — меняем визуальный порядок */
    }
    body.infinitalk-page:not(.mobile-version) .veo-infinitalk-prompt-media .veo-chat-attachments::after {
        display: none;
    }
    body.infinitalk-page:not(.mobile-version) .veo-infinitalk-prompt-media .veo-prompt-video-row {
        padding: 0;
        margin: 0;
        background: transparent;
        border-radius: 0;
        flex: 1 1 0%;
        min-width: 0;
        width: auto;
        max-width: none;
        order: 2;
    }
    body.infinitalk-page:not(.mobile-version) .veo-infinitalk-prompt-media .veo-prompt-video-row::after {
        display: none;
    }
    .veo-prompt-box:has(.veo-chat-attachments[style*="flex"]) .veo-prompt-input-zone,
    .veo-prompt-box.veo-prompt-box--has-video-chip .veo-prompt-input-zone {
        border-radius: 0;
    }

    /* Видео «Продолжить» / «Улучшение качества» — над полем ввода */
    .veo-prompt-video-row {
        display: none;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 0.35rem;
        padding: 0.55rem 0.95rem 0.35rem;
        background: linear-gradient(180deg, rgba(15, 15, 28, 0.9) 0%, rgba(10, 10, 22, 0.95) 100%);
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        position: relative;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    /* Wan v2v: две ячейки в ряд; новые ряды уходят вверх — 3–4 над 1–2 */
    .veo-prompt-video-row:has(.veo-prompt-video-chip--wan) {
        flex-wrap: wrap-reverse;
        align-content: flex-start;
        gap: 0.26rem 0.38rem;
        padding: 0.34rem 0.65rem 0.24rem;
    }
    .veo-prompt-video-row::after {
        content: '';
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 25%;
        max-width: 200px;
        bottom: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.3), rgba(99, 102, 241, 0.4), transparent);
    }
    .veo-prompt-video-chip {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0.45rem 0.65rem 0.45rem 0.45rem;
        border-radius: 10px;
        border: 1px solid rgba(139, 92, 246, 0.4);
        background: rgba(139, 92, 246, 0.1);
    }
    .veo-prompt-video-chip--wan {
        overflow: visible;
        align-items: flex-start;
    }
    .veo-prompt-video-chip--wan .veo-prompt-video-thumb--wan {
        margin-top: 0.08rem;
    }
    .veo-prompt-video-chip--wan .veo-prompt-audio-chip-actions {
        display: flex;
        flex-direction: column;
        gap: 0.32rem;
        flex-shrink: 0;
        align-items: stretch;
        margin-top: 0.12rem;
    }
    .veo-prompt-video-chip--wan .veo-prompt-video-edit--wan {
        margin-top: 0;
    }
    .veo-prompt-video-chip--wan .veo-prompt-video-remove {
        margin-top: 0.24rem;
    }
    .veo-prompt-video-chip--extend {
        border-color: rgba(34, 197, 94, 0.5);
        background: rgba(34, 197, 94, 0.1);
    }
    .veo-prompt-video-chip--upgrade {
        border-color: rgba(167, 139, 250, 0.55);
        background: rgba(99, 102, 241, 0.12);
    }
    .veo-prompt-video-thumb {
        flex-shrink: 0;
        width: 48px;
        height: 48px;
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(0, 0, 0, 0.35);
    }
    .veo-prompt-video-thumb video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .veo-prompt-video-thumb-placeholder {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.45);
    }
    .veo-prompt-video-meta {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        overflow: hidden;
    }
    .veo-prompt-video-badge {
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.55);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
    .veo-prompt-video-label {
        display: block;
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.92);
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .veo-prompt-video-remove {
        flex-shrink: 0;
        width: 26px;
        height: 26px;
        border: none;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.55);
        color: #fff;
        font-size: 16px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.15s;
    }
    .veo-prompt-video-remove:hover {
        background: rgba(231, 76, 60, 0.45);
    }
    .veo-prompt-video-edit {
        flex-shrink: 0;
        width: 26px;
        height: 26px;
        border: none;
        border-radius: 50%;
        background: rgba(59, 130, 246, 0.28);
        color: rgba(219, 234, 254, 0.95);
        font-size: 13px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.15s, transform 0.15s;
    }
    .veo-prompt-video-edit:hover {
        background: rgba(37, 99, 235, 0.45);
        transform: translateY(-1px);
    }
    .veo-prompt-video-row:has(.veo-prompt-video-chip--wan) .veo-prompt-video-chip--wan {
        flex: 0 0 calc(50% - 0.19rem);
        width: calc(50% - 0.19rem);
        max-width: calc(50% - 0.19rem);
        min-width: 0;
        gap: 0.4rem;
        padding: 0.28rem 0.42rem 0.28rem 0.28rem;
        border-radius: 9px;
        background: linear-gradient(145deg, rgba(6, 78, 59, 0.28), rgba(2, 44, 34, 0.45));
        border-color: rgba(16, 185, 129, 0.38);
        box-shadow: 0 6px 16px rgba(3, 16, 12, 0.28), 0 0 0 1px rgba(16, 185, 129, 0.1) inset;
    }
    .veo-prompt-video-row:has(> .veo-prompt-video-chip--wan:only-child) > .veo-prompt-video-chip--wan {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
    .veo-prompt-video-row:has(> .veo-prompt-video-chip--wan:nth-child(3):last-child) > .veo-prompt-video-chip--wan:nth-child(3) {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
    .veo-prompt-video-row:has(.veo-prompt-video-chip--wan) .veo-prompt-video-thumb--wan {
        width: 40px;
        height: 40px;
        border-radius: 7px;
        border-color: rgba(148, 163, 184, 0.28);
        background: linear-gradient(160deg, rgba(15, 23, 42, 0.75), rgba(2, 6, 23, 0.82));
    }
    /* Превью кадра в чипе — не перехватывать клики (кнопки «Редактировать» / ×) */
    .veo-prompt-video-thumb--wan video[data-wan-chip-preview] {
        pointer-events: none;
    }
    .veo-prompt-video-chip--wan .veo-prompt-video-thumb-placeholder {
        font-size: 1rem;
        color: rgba(209, 250, 229, 0.78);
    }
    .veo-prompt-video-chip--wan .veo-prompt-video-badge {
        color: rgba(167, 243, 208, 0.85);
        letter-spacing: 0.04em;
        font-size: 0.6rem;
    }
    .veo-prompt-video-submeta {
        display: block;
        font-size: 0.72rem;
        color: rgba(204, 251, 241, 0.92);
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 600;
        letter-spacing: 0.02em;
        text-shadow: 0 0 12px rgba(45, 212, 191, 0.28);
    }
    .veo-prompt-video-chip--wan .veo-prompt-video-submeta {
        color: rgba(209, 250, 229, 0.98);
        text-shadow: 0 0 14px rgba(52, 211, 153, 0.35), 0 0 1px rgba(6, 95, 70, 0.6);
        font-size: 0.68rem;
    }
    .veo-prompt-video-chip--wan .veo-prompt-video-label {
        font-size: 0.78rem;
    }
    .veo-prompt-video-chip--wan .veo-prompt-video-meta {
        gap: 0.12rem;
        overflow: visible;
    }
    .veo-prompt-video-chip--wan .veo-prompt-video-label.veo-has-tooltip {
        overflow: visible;
        min-width: 0;
    }
    .veo-prompt-video-chip--wan .veo-prompt-video-label-line {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
    .veo-prompt-video-chip--wan .veo-prompt-video-submeta.veo-has-tooltip {
        overflow: visible;
        min-width: 0;
    }
    .veo-prompt-video-chip--wan .veo-prompt-video-submeta-line {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
    .veo-prompt-video-chip--wan .veo-prompt-video-clip-dur {
        display: block;
        font-size: 0.64rem;
        font-weight: 600;
        color: rgba(204, 251, 241, 0.95);
        letter-spacing: 0.02em;
        line-height: 1.38;
        margin-top: 0.1rem;
        text-shadow: 0 0 12px rgba(45, 212, 191, 0.22);
    }
    .veo-prompt-video-edit--wan {
        width: auto;
        min-width: 76px;
        height: 26px;
        padding: 0 0.48rem;
        border-radius: 8px;
        color: rgba(245, 243, 255, 0.98);
        border: 1px solid rgba(167, 139, 250, 0.45);
        background: linear-gradient(135deg, rgba(49, 46, 129, 0.72) 0%, rgba(76, 29, 149, 0.55) 50%, rgba(91, 33, 182, 0.5) 100%);
        box-shadow: 0 2px 12px rgba(99, 102, 241, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.01em;
    }
    .veo-prompt-video-edit--wan:hover {
        color: #fff;
        border-color: rgba(196, 181, 253, 0.55);
        background: linear-gradient(135deg, rgba(67, 56, 202, 0.82) 0%, rgba(91, 33, 182, 0.68) 55%, rgba(109, 40, 217, 0.62) 100%);
        box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
    .veo-prompt-video-edit--wan:focus-visible {
        outline: none;
        box-shadow: 0 0 0 2px rgba(15, 12, 41, 0.95), 0 0 0 4px rgba(167, 139, 250, 0.55);
    }
    /* Wan 2.7 T2V: чип фонового аудио над полем промпта */
    .veo-prompt-video-chip--wan.veo-prompt-audio-chip--t2v {
        border-color: rgba(129, 140, 248, 0.42);
        background: linear-gradient(145deg, rgba(30, 27, 75, 0.5), rgba(15, 12, 41, 0.62));
        box-shadow: 0 6px 16px rgba(15, 12, 41, 0.35), 0 0 0 1px rgba(99, 102, 241, 0.18) inset;
        align-items: center;
    }
    .veo-prompt-video-chip--wan.veo-prompt-audio-chip--t2v .veo-prompt-audio-chip-actions {
        margin-top: 0;
        justify-content: center;
    }
    .veo-prompt-video-chip--wan.veo-prompt-audio-chip--t2v .veo-prompt-video-remove {
        margin-top: 0;
        align-self: center;
    }
    /* T2V / InfiniTalk: обложка в чипе чуть крупнее стандартного Wan-превью */
    .veo-prompt-video-chip--wan.veo-prompt-audio-chip--t2v .veo-prompt-video-thumb--wan.veo-prompt-audio-thumb {
        width: 54px;
        height: 54px;
        border-radius: 8px;
    }
    .veo-prompt-video-chip--wan.veo-prompt-audio-chip--t2v .veo-prompt-audio-thumb .veo-prompt-audio-thumb-play {
        width: 24px;
        height: 24px;
    }
    .veo-prompt-video-chip--wan.veo-prompt-audio-chip--t2v .veo-prompt-audio-thumb .veo-prompt-audio-thumb-play::before {
        border-top-width: 3px;
        border-bottom-width: 3px;
        border-left-width: 5px;
        transform: translateX(0.5px);
    }
    .veo-prompt-video-chip--wan.veo-prompt-audio-chip--t2v .veo-prompt-audio-thumb .veo-prompt-audio-thumb-play[data-state="playing"]::before {
        width: 6px;
        height: 6px;
        background-size: 1.5px 5px, 1.5px 5px;
        background-position: 0.5px 50%, 4px 50%;
        transform: none;
    }
    /* InfiniTalk: длительность ≤15 с после обрезки/загрузки — зелёный спокойный акцент */
    .veo-prompt-video-chip--wan.veo-prompt-audio-chip--t2v.veo-prompt-audio-chip--infinitalk-ok {
        border-color: rgba(52, 211, 153, 0.48);
        background: linear-gradient(145deg, rgba(6, 78, 59, 0.42), rgba(6, 36, 32, 0.62));
        box-shadow: 0 6px 16px rgba(15, 12, 41, 0.32), 0 0 0 1px rgba(16, 185, 129, 0.22) inset;
    }
    /* InfiniTalk: исходник длиннее 15 с — нужна обрезка, красное предупреждение */
    .veo-prompt-video-chip--wan.veo-prompt-audio-chip--t2v.veo-prompt-audio-chip--needs-trim {
        border-color: rgba(248, 113, 113, 0.65);
        background: linear-gradient(145deg, rgba(127, 29, 29, 0.52), rgba(45, 12, 12, 0.72));
        box-shadow: 0 6px 18px rgba(69, 10, 10, 0.45), 0 0 0 1px rgba(248, 113, 113, 0.22) inset;
        opacity: 1;
    }
    .veo-prompt-audio-thumb {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }
    .veo-prompt-audio-thumb .veo-prompt-audio-thumb-placeholder {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        margin: 0;
        font-size: 1.1rem;
        line-height: 1;
        color: rgba(209, 250, 229, 0.88);
    }
    .veo-prompt-audio-thumb .veo-prompt-audio-cover-img {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .veo-prompt-audio-thumb .veo-prompt-audio-thumb-play {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 22px;
        height: 22px;
        border-radius: 999px;
        border: 1px solid rgba(196, 181, 253, 0.72);
        background: linear-gradient(135deg, rgba(15, 12, 41, 0.92), rgba(30, 27, 75, 0.9));
        color: transparent;
        font-size: 0;
        line-height: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        cursor: pointer;
        z-index: 3;
        box-shadow: 0 8px 20px rgba(15, 12, 41, 0.45), 0 0 0 1px rgba(129, 140, 248, 0.28) inset;
        transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    }
    .veo-prompt-audio-thumb .veo-prompt-audio-thumb-play::before {
        content: '';
        display: block;
        width: 0;
        height: 0;
        border-top: 3.5px solid transparent;
        border-bottom: 3.5px solid transparent;
        border-left: 6px solid rgba(236, 253, 245, 0.98);
        transform: translateX(0.5px);
    }
    /* Пауза: две полоски строго по центру (без box-shadow — он смещал группу вправо) */
    .veo-prompt-audio-thumb .veo-prompt-audio-thumb-play[data-state="playing"]::before {
        width: 8px;
        height: 8px;
        border: 0;
        border-radius: 0;
        background-color: transparent;
        background-image:
            linear-gradient(to bottom, rgba(236, 253, 245, 0.98), rgba(236, 253, 245, 0.98)),
            linear-gradient(to bottom, rgba(236, 253, 245, 0.98), rgba(236, 253, 245, 0.98));
        background-size: 2px 7px, 2px 7px;
        background-position: 0 50%, 6px 50%;
        background-repeat: no-repeat;
        box-shadow: none;
        transform: none;
    }
    .veo-prompt-audio-thumb .veo-prompt-audio-thumb-play:hover {
        transform: translate(-50%, -50%) scale(1.05);
        border-color: rgba(167, 243, 208, 0.8);
        box-shadow: 0 10px 24px rgba(15, 12, 41, 0.55), 0 0 0 1px rgba(45, 212, 191, 0.28) inset;
    }
    .veo-prompt-audio-thumb .veo-prompt-audio-thumb-play:focus-visible {
        outline: none;
        box-shadow: 0 0 0 2px rgba(15, 12, 41, 0.96), 0 0 0 4px rgba(129, 140, 248, 0.58);
    }
    .veo-prompt-audio-dur-line {
        font-size: 0.64rem;
        font-weight: 600;
        color: rgba(199, 210, 254, 0.95);
        line-height: 1.35;
    }
    .veo-prompt-audio-trim-line {
        font-size: 0.62rem;
        font-weight: 600;
        color: rgba(167, 243, 208, 0.92);
        line-height: 1.35;
    }
    /* Оболочка плеера: космический градиент + мягкая «дыхание» анимация */
    .wan-t2v-audio-editor-player-shell {
        position: relative;
        margin: 0.45rem 0 0.55rem;
        padding: 3px;
        border-radius: 16px;
        background: linear-gradient(125deg, rgba(99, 102, 241, 0.55), rgba(139, 92, 246, 0.42), rgba(34, 211, 238, 0.35), rgba(99, 102, 241, 0.5));
        background-size: 240% 240%;
        animation: wan-t2v-audio-shell-flow 7s ease-in-out infinite;
        box-shadow:
            0 6px 28px rgba(15, 12, 41, 0.55),
            0 0 36px rgba(99, 102, 241, 0.2),
            inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    }
    @keyframes wan-t2v-audio-shell-flow {
        0%, 100% { background-position: 0% 40%; }
        50% { background-position: 100% 60%; }
    }
    @media (prefers-reduced-motion: reduce) {
        .wan-t2v-audio-editor-player-shell {
            animation: none;
            background: linear-gradient(125deg, rgba(99, 102, 241, 0.45), rgba(139, 92, 246, 0.38), rgba(34, 211, 238, 0.3));
        }
    }
    .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player {
        width: 100%;
        max-width: 100%;
        margin: 0;
        display: block;
        border-radius: 12px;
        border: 1px solid rgba(167, 139, 250, 0.35);
        /* Сплошной фиолетовый под панелью нативных контролов (без «овала» темнее по углам) */
        background: #3b2f7a;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
        color-scheme: dark;
        overflow: hidden;
    }
    body.wan-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-enclosure,
    body.infinitalk-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-enclosure {
        background: #4338ca;
        border-radius: 0;
    }
    body.wan-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-panel,
    body.infinitalk-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-panel {
        background: #4338ca;
        border-radius: 0;
    }
    body.wan-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-current-time-display,
    body.wan-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-time-remaining-display,
    body.infinitalk-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-current-time-display,
    body.infinitalk-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-time-remaining-display {
        color: rgba(232, 245, 255, 0.95);
        text-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
    }
    body.wan-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-play-button,
    body.wan-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-mute-button,
    body.wan-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-volume-slider,
    body.wan-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-timeline,
    body.infinitalk-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-play-button,
    body.infinitalk-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-mute-button,
    body.infinitalk-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-volume-slider,
    body.infinitalk-page .wan-t2v-audio-editor-modal .wan-t2v-audio-editor-player-shell .wan-t2v-audio-editor-player::-webkit-media-controls-timeline {
        filter: saturate(1.25) hue-rotate(-8deg) brightness(1.1);
    }
    .wan-t2v-audio-editor-strip {
        min-height: 48px;
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        gap: 1px;
        padding: 5px 6px;
        background: linear-gradient(90deg, rgba(30, 27, 75, 0.62), rgba(15, 12, 41, 0.86), rgba(30, 27, 75, 0.62));
        border: 1px solid rgba(129, 140, 248, 0.28);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
        border-radius: 6px;
    }
    /* Реальная волна на canvas — не flex-ряд «столбиков» */
    .wan-t2v-audio-editor-strip:has(.wan-t2v-audio-waveform-canvas) {
        display: block;
        gap: 0;
        padding: 4px 6px;
    }
    .wan-t2v-audio-editor-strip .wan-t2v-audio-waveform-canvas {
        width: 100%;
        height: 100%;
        min-height: 40px;
        vertical-align: top;
    }
    .wan-t2v-audio-wave-bar {
        flex: 1 1 auto;
        min-width: 2px;
        max-width: 5px;
        align-self: center;
        border-radius: 999px;
        background: linear-gradient(180deg, rgba(191, 219, 254, 0.96) 0%, rgba(56, 189, 248, 0.9) 48%, rgba(99, 102, 241, 0.9) 100%);
        box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
        pointer-events: none;
    }
    .wan-t2v-audio-editor-strip::before {
        display: none;
    }
    .wan-t2v-audio-editor-strip::after {
        display: none;
    }
    .wan-t2v-audio-editor-strip-ph {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        font-size: 0.68rem;
        color: rgba(199, 210, 254, 0.65);
        letter-spacing: 0.02em;
    }
    .wan-t2v-audio-listen-modal {
        width: min(420px, calc(100vw - 2rem));
        border-radius: 16px;
        border: 1px solid rgba(129, 140, 248, 0.45);
        background: linear-gradient(150deg, rgba(24, 24, 50, 0.96) 0%, rgba(10, 10, 24, 0.96) 100%);
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 34px rgba(99, 102, 241, 0.24);
        overflow: hidden;
    }
    .wan-t2v-audio-listen-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(99, 102, 241, 0.25);
    }
    .wan-t2v-audio-listen-body {
        padding: 1rem 1rem 0.5rem;
    }
    .wan-t2v-audio-listen-name {
        margin: 0 0 0.65rem;
        font-size: 0.82rem;
        color: rgba(224, 221, 255, 0.92);
        word-break: break-word;
    }
    .wan-t2v-audio-listen-player {
        width: 100%;
        min-height: 40px;
    }
    .wan-t2v-audio-listen-hint {
        margin: 0.75rem 0 0;
        font-size: 0.72rem;
        line-height: 1.45;
        color: rgba(199, 210, 254, 0.65);
    }
    .wan-t2v-audio-listen-foot {
        padding: 0.65rem 1rem 1rem;
        display: flex;
        justify-content: flex-end;
    }
    .veo-video-editor-overlay {
        position: fixed;
        inset: 0;
        z-index: 20000;
        background: rgba(3, 2, 10, 0.72);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        display: none;
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }
    .veo-video-editor-overlay[aria-hidden="false"] {
        display: flex;
    }
    .veo-video-editor-modal {
        width: min(680px, calc(100vw - 2rem));
        border-radius: 16px;
        border: 1px solid rgba(129, 140, 248, 0.45);
        background: linear-gradient(150deg, rgba(24, 24, 50, 0.96) 0%, rgba(10, 10, 24, 0.96) 100%);
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 34px rgba(99, 102, 241, 0.24);
        overflow: hidden;
    }
    .veo-video-editor-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.55rem 0.85rem;
        border-bottom: 1px solid rgba(129, 140, 248, 0.28);
        color: rgba(230, 230, 255, 0.95);
    }
    .veo-video-editor-close {
        width: 30px;
        height: 30px;
        border: none;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.08);
        color: rgba(255, 255, 255, 0.92);
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-size: 1.15rem;
        font-weight: 400;
        line-height: 1;
        padding: 0;
        transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    }
    .veo-video-editor-close:hover {
        background: rgba(248, 113, 113, 0.22);
        color: #fecdd3;
        transform: scale(1.05);
        box-shadow: inset 0 0 0 1px rgba(252, 165, 165, 0.35), 0 6px 20px rgba(127, 29, 29, 0.25);
    }
    .veo-video-editor-close:active {
        transform: scale(0.97);
    }
    .veo-video-editor-close:focus-visible {
        outline: none;
        box-shadow: 0 0 0 2px rgba(15, 12, 41, 0.95), 0 0 0 4px rgba(129, 140, 248, 0.55);
    }
    .veo-video-editor-body {
        padding: 0.9rem 1rem;
    }
    #wanVideoEditorPlayer {
        width: 100%;
        max-height: 48vh;
        border-radius: 10px;
        background: #02020b;
        border: 1px solid rgba(99, 102, 241, 0.32);
    }
    .veo-video-editor-time {
        margin-top: 0.6rem;
        font-size: 0.86rem;
        font-weight: 600;
        color: rgba(204, 251, 241, 0.96);
        text-shadow: 0 0 12px rgba(45, 212, 191, 0.22);
        text-align: center;
        width: 100%;
    }
    .wan-t2v-audio-editor-modal .veo-video-editor-time {
        display: block;
        text-align: center;
    }
    .veo-video-editor-timeline {
        --trim-start: 0%;
        --trim-end: 100%;
        margin-top: 0.65rem;
        position: relative;
        border: 1px solid rgba(99, 102, 241, 0.35);
        border-radius: 10px;
        overflow: hidden;
        cursor: ew-resize;
        background: rgba(7, 7, 20, 0.9);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 10px 24px rgba(2, 6, 23, 0.28);
        touch-action: none;
    }
    .veo-video-editor-filmstrip {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(32px, 1fr);
        height: 54px;
        gap: 1px;
    }
    .veo-video-editor-thumb {
        display: block;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        filter: saturate(1.05) brightness(0.94);
    }
    .veo-video-editor-selection {
        position: absolute;
        top: 0;
        bottom: 0;
        left: var(--trim-start);
        right: calc(100% - var(--trim-end));
        border: 2px solid rgba(125, 211, 252, 0.96);
        background: linear-gradient(90deg, rgba(56, 189, 248, 0.2), rgba(59, 130, 246, 0.12));
        box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.5) inset, 0 0 24px rgba(59, 130, 246, 0.3);
        pointer-events: auto;
        cursor: grab;
        touch-action: none;
    }
    .veo-video-editor-selection:active {
        cursor: grabbing;
    }
    .veo-video-editor-handle {
        position: absolute;
        top: 50%;
        width: 14px;
        height: 34px;
        border: 1px solid rgba(191, 219, 254, 0.7);
        border-radius: 8px;
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(30, 58, 138, 0.9));
        box-shadow: 0 0 12px rgba(59, 130, 246, 0.45);
        transform: translateY(-50%);
        cursor: ew-resize;
        touch-action: none;
    }
    .veo-video-editor-handle::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        width: 2px;
        height: 16px;
        border-radius: 2px;
        background: rgba(219, 234, 254, 0.95);
        transform: translate(-50%, -50%);
    }
    .veo-video-editor-handle--start {
        left: -8px;
    }
    .veo-video-editor-handle--end {
        right: -8px;
    }
    /* Ручной ввод секунд в редакторе обрезки аудио (Wan / InfiniTalk) */
    .wan-t2v-audio-editor-sec-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        width: 100%;
        gap: 0.65rem 1.1rem;
        margin: 0.4rem 0 0.55rem;
    }
    .wan-t2v-audio-editor-sec-label {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        font-size: 0.82rem;
        font-weight: 600;
        color: rgba(224, 221, 255, 0.9);
    }
    .wan-t2v-audio-editor-sec-label-text {
        white-space: nowrap;
    }
    .wan-t2v-audio-editor-sec-input {
        width: 5.75rem;
        max-width: 42vw;
        padding: 0.34rem 0.48rem;
        border-radius: 8px;
        border: 1px solid rgba(139, 92, 246, 0.48);
        background: rgba(12, 10, 28, 0.88);
        color: #f5f3ff;
        font-size: 0.88rem;
        font-variant-numeric: tabular-nums;
        box-sizing: border-box;
        accent-color: #8b5cf6;
        color-scheme: dark;
    }
    .wan-t2v-audio-editor-sec-input:focus {
        outline: none;
        border-color: rgba(129, 140, 248, 0.85);
        box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35);
    }
    /* Стрелки шага number: Chromium/WebKit — через filter к фиолетовому (#8b5cf6) */
    .wan-t2v-audio-editor-sec-input::-webkit-inner-spin-button,
    .wan-t2v-audio-editor-sec-input::-webkit-outer-spin-button {
        opacity: 1;
        height: 1.4rem;
        cursor: pointer;
        filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(243deg) brightness(103%) contrast(96%);
    }
    .veo-video-editor-sliders {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.65rem;
        margin-top: 0.65rem;
    }
    .veo-video-editor-sliders label {
        display: grid;
        grid-template-columns: 90px 1fr;
        gap: 0.6rem;
        align-items: center;
        color: rgba(186, 250, 232, 0.92);
        font-size: 0.84rem;
        font-weight: 500;
    }
    .veo-video-editor-sliders input[type="range"] {
        width: 100%;
        accent-color: #60a5fa;
        height: 6px;
        border-radius: 999px;
        appearance: none;
        background: linear-gradient(90deg, rgba(59, 130, 246, 0.9) 0%, rgba(14, 165, 233, 0.84) 45%, rgba(129, 140, 248, 0.82) 100%);
        box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.35), 0 0 10px rgba(59, 130, 246, 0.25);
        cursor: pointer;
    }
    .veo-video-editor-sliders input[type="range"]::-webkit-slider-runnable-track {
        height: 6px;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(100, 116, 139, 0.3) 0%, rgba(30, 41, 59, 0.4) 100%);
        box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.24);
    }
    .veo-video-editor-sliders input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 18px;
        height: 18px;
        margin-top: -6px;
        border-radius: 50%;
        border: 1px solid rgba(191, 219, 254, 0.9);
        background: radial-gradient(circle at 30% 30%, #dbeafe 0%, #93c5fd 36%, #6366f1 100%);
        box-shadow: 0 0 0 2px rgba(30, 41, 59, 0.8), 0 0 14px rgba(99, 102, 241, 0.42);
    }
    .veo-video-editor-sliders input[type="range"]::-moz-range-track {
        height: 6px;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(100, 116, 139, 0.3) 0%, rgba(30, 41, 59, 0.4) 100%);
        box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.24);
    }
    .veo-video-editor-sliders input[type="range"]::-moz-range-thumb {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        border: 1px solid rgba(191, 219, 254, 0.9);
        background: radial-gradient(circle at 30% 30%, #dbeafe 0%, #93c5fd 36%, #6366f1 100%);
        box-shadow: 0 0 0 2px rgba(30, 41, 59, 0.8), 0 0 14px rgba(99, 102, 241, 0.42);
    }
    .veo-video-editor-foot {
        display: flex;
        justify-content: flex-end;
        gap: 0.5rem;
        padding: 0.8rem 1rem 1rem;
    }
    .veo-video-editor-btn {
        border: 1px solid rgba(148, 163, 184, 0.35);
        background: rgba(30, 41, 59, 0.45);
        color: rgba(241, 245, 249, 0.94);
        border-radius: 10px;
        padding: 0.42rem 0.85rem;
        cursor: pointer;
    }
    .veo-video-editor-btn--apply {
        border-color: rgba(99, 102, 241, 0.45);
        background: linear-gradient(135deg, rgba(55, 48, 163, 0.65), rgba(37, 99, 235, 0.58));
    }
    textarea.veo-prompt-input--locked,
    .veo-prompt-input-zone--locked .veo-prompt-input {
        opacity: 0.72;
        cursor: not-allowed;
    }
    .veo-prompt-input-zone--locked {
        position: relative;
    }
    /* Подсказка при наведении на заблокированное поле (режим «Улучшение качества») */
    body.veo-generation-body #veoPromptInputZone .veo-prompt-upgrade-lock-tooltip.veo-tooltip--long {
        min-width: 0;
        max-width: min(300px, calc(100vw - 2rem));
        text-align: center;
        font-size: 0.78rem;
        line-height: 1.45;
        padding: 0.55rem 0.85rem;
    }
    
    .veo-chat-attachment-preview {
        position: relative;
        width: 80px;
        height: 80px;
        border-radius: 10px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    .veo-chat-attachment-preview-inner {
        width: 100%;
        height: 100%;
        position: relative;
        display: block;
        cursor: pointer;
    }
    .veo-chat-attachment-preview-inner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        pointer-events: none;
    }
    .veo-chat-attachment-preview--audio-file {
        width: auto;
        min-width: 180px;
        max-width: 240px;
        background: linear-gradient(135deg, rgba(15, 12, 41, 0.92), rgba(49, 46, 129, 0.55));
    }
    .veo-chat-attachment-preview-inner--audio-file {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        padding: 0.8rem 2rem 0.8rem 0.9rem;
        cursor: default;
    }
    .veo-chat-attachment-audio-file-icon {
        width: 34px;
        height: 34px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(99, 102, 241, 0.22);
        color: #ddd6fe;
        font-size: 1rem;
        flex-shrink: 0;
    }
    .veo-chat-attachment-audio-file-meta {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }
    .veo-chat-attachment-audio-file-name {
        color: #f5f3ff;
        font-size: 0.82rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .veo-chat-attachment-audio-file-submeta {
        color: rgba(224, 221, 255, 0.72);
        font-size: 0.74rem;
    }
    .veo-chat-attachment-hover {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        color: rgba(196, 181, 253, 0.95);
        font-size: 0.8rem;
        font-weight: 600;
        text-align: center;
        opacity: 0;
        transition: opacity 0.2s;
        pointer-events: none;
    }
    .veo-chat-attachment-preview-inner:hover .veo-chat-attachment-hover {
        opacity: 1;
    }
    /* Первое превью в ряду: «Изменить» всегда видно (и на мобилке), чтобы было ясно — тап откроет кадрирование */
    .veo-chat-attachment-preview-inner--edit-hint .veo-chat-attachment-hover {
        opacity: 1;
    }
    .veo-chat-attachment-remove {
        position: absolute;
        top: 4px;
        right: 4px;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.72);
        color: #fff;
        border: none;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
        appearance: none;
        -webkit-appearance: none;
        font-size: 0;
        line-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    .veo-chat-attachment-remove svg {
        display: block;
        width: 11px;
        height: 11px;
        flex-shrink: 0;
    }
    
    /* Правый сайдбар — настройки. Ширина clamp: на узких окнах (600–1100px) больше места чату */
    .veo-right-settings {
        position: relative;
        width: clamp(260px, 18vw + 120px, 320px);
        min-width: clamp(260px, 18vw + 120px, 320px);
        min-height: 0;
        background: rgba(10, 10, 15, 0.88);
        border-left: none;
        overflow: visible;
        padding: 0.75rem clamp(0.35rem, 1vw, 0.5rem) 0.75rem clamp(0.65rem, 1.8vw, 1.25rem);
        display: flex;
        flex-direction: column;
    }
    .veo-settings-scroll {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: visible; /* тултипы справки (?) выходят в область чата */
        padding: 0.5rem 1rem 1rem 0; /* справа отступ между контентом и скроллом */
        scrollbar-width: thin;
        scrollbar-color: rgba(139, 92, 246, 0.5) rgba(99, 102, 241, 0.12);
    }
    .veo-settings-scroll::-webkit-scrollbar {
        width: 8px;
    }
    .veo-settings-scroll::-webkit-scrollbar-track {
        background: rgba(99, 102, 241, 0.08);
    }
    .veo-settings-scroll::-webkit-scrollbar-thumb {
        background: rgba(139, 92, 246, 0.5);
        border-radius: 4px;
    }
    .veo-settings-scroll::-webkit-scrollbar-thumb:hover {
        background: rgba(139, 92, 246, 0.65);
    }
    .veo-right-settings .veo-settings-section,
    .veo-right-settings .veo-settings-footer {
        position: relative;
        z-index: 1;
    }
    .veo-right-settings .veo-settings-section.veo-dropdown-open {
        z-index: 1000;
    }
    .veo-right-settings::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 1px;
        background: rgba(255, 255, 255, 0.06);
        box-shadow: none;
    }

    .veo-settings-chevron {
        width: 14px;
        height: 14px;
        opacity: 0.5;
        transition: transform 0.2s;
        /* По умолчанию секция раскрыта — стрелка вниз */
        transform: rotate(0deg);
    }
    /* Секция свёрнута — стрелка вверх */
    .veo-settings-section.collapsed .veo-settings-section-header .veo-settings-chevron {
        transform: rotate(180deg);
    }

    .veo-settings-reset-btn {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.3rem 0.5rem;
        background: transparent;
        border: none;
        border-radius: 6px;
        color: var(--text-muted);
        font-size: 0.8rem;
        cursor: pointer;
        transition: color 0.15s, background 0.15s;
    }

    .veo-settings-reset-btn:hover {
        color: var(--text-secondary);
        background: rgba(255, 255, 255, 0.04);
    }

    .veo-settings-reset-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .veo-settings-section {
        margin-bottom: 1.25rem;
    }
    .veo-settings-section[id="settingsModel"] {
        margin-top: 0;
    }
    /* Разделитель между блоками */
    .veo-settings-section[id="settingsFormat"] {
        padding-top: 1rem;
        margin-top: 0.5rem;
        position: relative;
    }
    .veo-settings-section[id="settingsFormat"]::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.15), transparent);
    }
    .veo-settings-section[id="settingsQuality"] {
        padding-top: 1rem;
        margin-top: 0.5rem;
        position: relative;
    }
    .veo-settings-section[id="settingsQuality"]::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.15), transparent);
    }
    .veo-settings-section[id="settingsExtend"],
    .veo-settings-section[id="settingsUpgrade"] {
        padding-top: 1rem;
        margin-top: 0.5rem;
        position: relative;
    }
    .veo-settings-section[id="settingsExtend"]::before,
    .veo-settings-section[id="settingsUpgrade"]::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.15), transparent);
    }
    .veo-upgrade-desc {
        font-size: 0.78rem;
        color: rgba(255, 255, 255, 0.55);
        line-height: 1.45;
        margin: 0 0 0.85rem 0;
        padding: 0.5rem 0.65rem;
        overflow-wrap: break-word;
        word-break: break-word;
        background: rgba(99, 102, 241, 0.06);
        border-radius: 6px;
        border-left: 2px solid rgba(139, 92, 246, 0.35);
    }
    .veo-upgrade-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
        margin-top: 0.65rem;
    }
    .veo-upgrade-btn {
        width: 100%;
        padding: 0.45rem 0.7rem;
        font-size: 0.8rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.95);
        background: rgba(99, 102, 241, 0.12);
        border: 1px solid rgba(139, 92, 246, 0.3);
        border-radius: 6px;
        cursor: pointer;
        transition: background 0.2s, border-color 0.2s;
    }
    .veo-upgrade-btn:hover {
        background: rgba(99, 102, 241, 0.18);
        border-color: rgba(139, 92, 246, 0.5);
    }
    .veo-upgrade-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
    
    .veo-settings-section-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.6rem;
        min-height: 2.25rem;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.95);
        font-weight: 600;
        font-size: 0.8rem;
        line-height: 1.25;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        user-select: none;
        background: rgba(99, 102, 241, 0.12);
        border-radius: 8px;
        border: 1px solid rgba(139, 92, 246, 0.25);
        transition: color 0.2s, border-color 0.2s, background 0.2s;
        overflow: visible;
    }
    
    .veo-settings-section-header:hover {
        color: #fff;
        background: rgba(99, 102, 241, 0.18);
        border-color: rgba(139, 92, 246, 0.4);
    }
    
    .veo-settings-section-header svg {
        width: 12px;
        height: 12px;
        opacity: 0.4;
        transition: transform 0.2s;
        flex-shrink: 0;
    }
    
    .veo-settings-section.collapsed .veo-settings-section-content {
        display: none;
    }
    
    .veo-settings-section-content {
        padding-top: 0.35rem;
        overflow: visible;
    }
    
    .veo-settings-row {
        margin-bottom: 1rem;
    }
    
    .veo-settings-row-mode {
        margin-top: 0.75rem;
    }
    
    .veo-settings-row:last-child {
        margin-bottom: 0;
    }
    
    .veo-settings-label {
        display: flex;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.85rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.95);
        margin-bottom: 0.4rem;
        overflow-wrap: break-word;
        word-break: break-word;
    }


    /* Кастомные дропдауны — стиль как кнопка «Создать видео» (фиолетовый градиент) */
    .veo-custom-select {
        position: relative;
        width: 100%;
    }

    .veo-custom-select-trigger {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.55rem 0.85rem;
        font-size: 0.9rem;
        background: linear-gradient(180deg, #06060a 0%, #050508 50%, #040407 100%);
        border: 1px solid rgba(99, 102, 241, 0.35);
        border-radius: 8px;
        color: var(--text-primary);
        cursor: pointer;
        transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
        text-align: left;
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
    }

    .veo-custom-select-trigger:hover {
        background: linear-gradient(180deg, #08080e 0%, #07070c 50%, #06060a 100%);
        border-color: rgba(139, 92, 246, 0.45);
        box-shadow: 0 0 14px rgba(99, 102, 241, 0.2);
    }

    .veo-custom-select.open .veo-custom-select-trigger {
        border-color: rgba(99, 102, 241, 0.5);
        background: linear-gradient(180deg, #08080e 0%, #07070c 50%, #06060a 100%);
        box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.4), 0 0 18px rgba(99, 102, 241, 0.2);
    }

    .veo-custom-select-label {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .veo-custom-select-chevron {
        width: 14px;
        height: 14px;
        opacity: 0.6;
        flex-shrink: 0;
        transition: transform 0.2s;
        /* Закрыт — стрелка вверх */
        transform: rotate(180deg);
    }

    .veo-custom-select.open .veo-custom-select-chevron {
        /* Открыт — стрелка вниз */
        transform: rotate(0deg);
    }

    .veo-custom-select-locked .veo-custom-select-trigger {
        cursor: default;
        opacity: 0.85;
        pointer-events: none;
    }
    .veo-custom-select-locked .veo-custom-select-trigger:hover {
        background: linear-gradient(180deg, #06060a 0%, #050508 50%, #040407 100%);
        border-color: rgba(99, 102, 241, 0.35);
    }
    .veo-custom-select-lock-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        opacity: 0.6;
    }
    .veo-custom-select-locked .veo-custom-select-chevron {
        display: none;
    }

    /* Десктоп: замок качества — как остальные дропдауны (indigo), без «чужого» акцента; анимация как pqoqubbw/icons lock */
    body.veo-generation-body:not(.mobile-version) .veo-custom-select-locked .veo-custom-select-trigger {
        opacity: 1;
    }
    body.veo-generation-body:not(.mobile-version) .veo-custom-select-lock-icon {
        opacity: 1;
        color: rgba(196, 181, 253, 0.88);
    }
    body.veo-generation-body:not(.mobile-version) .veo-lock-icon-pqo {
        display: block;
        overflow: visible;
        transform-origin: 50% 55%;
        animation: veo-lock-pqo-svg 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    }
    body.veo-generation-body:not(.mobile-version) .veo-lock-icon-pqo__shackle {
        stroke-dasharray: 1;
        stroke-dashoffset: 0;
        animation: veo-lock-pqo-shackle 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    }
    @keyframes veo-lock-pqo-svg {
        0%, 100% { transform: rotate(0deg) scale(1); }
        18% { transform: rotate(-3deg) scale(0.95); }
        36% { transform: rotate(1deg) scale(1.05); }
        54% { transform: rotate(-2deg) scale(0.98); }
        72% { transform: rotate(0deg) scale(1); }
    }
    @keyframes veo-lock-pqo-shackle {
        0%, 100%, 40% { stroke-dashoffset: 0; }
        20% { stroke-dashoffset: 0.28; }
    }
    @media (prefers-reduced-motion: reduce) {
        body.veo-generation-body:not(.mobile-version) .veo-lock-icon-pqo,
        body.veo-generation-body:not(.mobile-version) .veo-lock-icon-pqo__shackle {
            animation: none !important;
        }
        body.veo-generation-body:not(.mobile-version) .veo-lock-icon-pqo__shackle {
            stroke-dashoffset: 0 !important;
        }
    }

    .veo-custom-select-dropdown {
        position: fixed;
        z-index: 2147483646;
        background: #23233d;
        background-image: linear-gradient(180deg, #2a2a45 0%, #23233d 50%, #1e1e36 100%);
        border: 2px solid rgba(139, 92, 246, 0.7);
        border-radius: 10px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9), 0 0 32px rgba(99, 102, 241, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
        max-height: 220px;
        overflow-y: auto;
        display: none;
        scrollbar-width: thin;
        scrollbar-color: rgba(139, 92, 246, 0.5) rgba(99, 102, 241, 0.12);
    }
    .veo-custom-select-dropdown::-webkit-scrollbar {
        width: 6px;
    }
    .veo-custom-select-dropdown::-webkit-scrollbar-track {
        background: rgba(99, 102, 241, 0.08);
        border-radius: 3px;
    }
    .veo-custom-select-dropdown::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, rgba(139, 92, 246, 0.45), rgba(99, 102, 241, 0.4));
        border-radius: 3px;
    }
    .veo-custom-select-dropdown::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, rgba(139, 92, 246, 0.6), rgba(99, 102, 241, 0.55));
    }
    .veo-custom-select-dropdown::-webkit-scrollbar-button {
        display: none;
    }

    .veo-custom-select.open .veo-custom-select-dropdown {
        display: block;
    }

    .veo-custom-select-option {
        padding: 0.55rem 0.85rem;
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.95);
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        background: transparent;
        border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    }
    .veo-custom-select-option:last-child {
        border-bottom: none;
    }
    .veo-custom-select-option .veo-option-icon {
        flex-shrink: 0;
        margin-right: 0;
    }
    .veo-custom-select-option .veo-option-icon.veo-google-g-badge-sm {
        width: 22px;
        height: 22px;
    }
    /* Иконки соотношения сторон — горизонтальный, вертикальный, квадрат */
    .veo-aspect-icon {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(199, 210, 254, 0.9);
    }
    .veo-aspect-icon svg {
        width: 100%;
        height: 100%;
    }
    .veo-custom-select-trigger .veo-aspect-icon {
        width: 20px;
        height: 20px;
    }
    .veo-custom-select-option .veo-aspect-icon {
        width: 22px;
        height: 22px;
    }
    .veo-custom-select-option .veo-option-desc {
        margin-left: auto;
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.5);
    }

    .veo-custom-select-option:hover {
        background: linear-gradient(180deg, #08080e 0%, #07070c 50%, #06060a 100%);
        color: #fff;
    }

    .veo-custom-select-option.selected {
        background: linear-gradient(180deg, #0a0a12 0%, #08080e 50%, #07070c 100%);
        color: rgba(199, 210, 254, 1);
        border-radius: 6px;
        box-shadow: inset 0 0 8px rgba(99, 102, 241, 0.15);
    }

    .veo-option-placeholder {
        opacity: 0.7;
    }

    .veo-option-badge {
        font-size: 0.7rem;
        color: var(--text-muted);
        margin-left: 0.25rem;
    }
    
    .veo-settings-select {
        width: 100%;
        padding: 0.5rem 0.75rem;
        background: linear-gradient(180deg, #06060a 0%, #050508 50%, #040407 100%);
        border: 1px solid rgba(99, 102, 241, 0.3);
        border-radius: 8px;
        color: var(--text-primary);
        font-size: 0.875rem;
        box-shadow: 0 0 8px rgba(99, 102, 241, 0.08);
    }
    
    .veo-settings-select:focus {
        outline: none;
        border-color: rgba(99, 102, 241, 0.5);
        box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
    }
    
    /* Модель — радио-карточки в правой панели */
    .veo-settings-model-options {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .veo-settings-model-option {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
        border: 1px solid rgba(99, 102, 241, 0.25);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.15s;
        box-shadow: 0 0 6px rgba(99, 102, 241, 0.1);
    }
    
    .veo-settings-model-option:hover {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
        border-color: rgba(99, 102, 241, 0.35);
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.18);
    }
    
    .veo-settings-model-option.selected {
        border-color: rgba(99, 102, 241, 0.5);
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
        box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
    }
    
    .veo-settings-model-option .model-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        border: 2px solid rgba(99, 102, 241, 0.4);
        flex-shrink: 0;
    }
    
    .veo-settings-model-option.selected .model-dot {
        border-color: rgba(99, 102, 241, 0.8);
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        box-shadow: 0 0 6px rgba(99, 102, 241, 0.5);
    }
    
    /* Toggle для качества + Сбросить */
    .veo-settings-toggle-row {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.5rem 0;
    }
    
    .veo-settings-toggle-label {
        font-size: 0.9rem;
        color: var(--text-secondary);
    }
    
    .veo-settings-toggle {
        width: 40px;
        height: 22px;
        background: rgba(99, 102, 241, 0.2);
        border: 1px solid rgba(99, 102, 241, 0.25);
        border-radius: 11px;
        position: relative;
        cursor: pointer;
        transition: all 0.2s;
        box-shadow: 0 0 6px rgba(99, 102, 241, 0.1);
    }
    
    .veo-settings-toggle.active,
    .veo-settings-toggle:has(input:checked) {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.35) 100%);
        border-color: rgba(99, 102, 241, 0.5);
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
    }
    
    .veo-settings-toggle::after {
        content: '';
        position: absolute;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #fff;
        top: 2px;
        left: 2px;
        transition: transform 0.2s;
    }
    
    .veo-settings-toggle.active::after,
    .veo-settings-toggle:has(input:checked)::after {
        transform: translateX(18px);
    }
    
    .veo-settings-input {
        background: linear-gradient(180deg, #06060a 0%, #050508 50%, #040407 100%);
        border: 1px solid rgba(99, 102, 241, 0.25);
        border-radius: 6px;
        padding: 0.4rem 0.6rem;
        color: var(--text-primary, #fff);
        font-size: 0.9rem;
    }
    
    .veo-settings-input::placeholder {
        color: rgba(255,255,255,0.4);
    }
    
    /* Кнопки сброса — закреплены внизу панели, не скроллятся */
    .veo-settings-footer {
        position: relative;
        flex-shrink: 0;
        padding: 1rem 1.25rem 0.75rem 0;
        margin-top: auto;
        border-top: none;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        background: var(--bg-primary);
    }
    .veo-settings-footer::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 1px;
        background: var(--veo-divider-h);
    }
    
    .veo-settings-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.55rem 1rem;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 8px;
        color: #fff;
        font-size: 0.875rem;
        cursor: pointer;
        transition: all 0.15s;
    }

    .veo-settings-btn svg {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }
    
    .veo-settings-btn:hover {
        background: rgba(255, 255, 255, 0.06);
        color: #fff;
    }

    /* ПК: секторы настроек (модель, формат, …) — отдельные карточки, не сливаются */
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-scroll > .veo-settings-section {
        margin-bottom: 0.9rem;
        padding: 0.55rem 0.65rem 0.72rem;
        background: linear-gradient(
            165deg,
            rgba(24, 22, 52, 0.94) 0%,
            rgba(14, 12, 34, 0.96) 48%,
            rgba(16, 12, 40, 0.94) 100%
        );
        border: 1px solid rgba(99, 102, 241, 0.34);
        border-radius: 14px;
        box-shadow:
            0 6px 26px rgba(0, 0, 0, 0.32),
            0 0 0 1px rgba(139, 92, 246, 0.07) inset,
            0 1px 0 rgba(255, 255, 255, 0.045) inset;
    }
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-scroll > .veo-settings-section[id="settingsModel"] {
        margin-top: 0;
    }
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-scroll > .veo-settings-section:last-child {
        margin-bottom: 0.55rem;
    }
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-section[id="settingsFormat"],
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-section[id="settingsQuality"],
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-section[id="settingsExtend"],
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-section[id="settingsUpgrade"] {
        padding-top: 0.55rem;
        margin-top: 0;
    }
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-section[id="settingsFormat"]::before,
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-section[id="settingsQuality"]::before,
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-section[id="settingsExtend"]::before,
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-section[id="settingsUpgrade"]::before {
        display: none;
    }
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-section-header {
        margin-bottom: 0.5rem;
        background: linear-gradient(135deg, rgba(49, 46, 129, 0.42) 0%, rgba(76, 29, 149, 0.28) 55%, rgba(30, 27, 75, 0.35) 100%);
        border-color: rgba(139, 92, 246, 0.38);
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    }
    /* Закрытая секция: только шапка — без margin под скрытый контент, нижний padding = верхнему (ровная обводка) */
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-scroll > .veo-settings-section.collapsed {
        padding-bottom: 0.55rem;
    }
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-section.collapsed .veo-settings-section-header {
        margin-bottom: 0;
    }
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-section-header:hover {
        background: linear-gradient(135deg, rgba(67, 56, 202, 0.45) 0%, rgba(91, 33, 182, 0.32) 100%);
        border-color: rgba(167, 139, 250, 0.48);
    }
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-section-content {
        padding-top: 0.2rem;
    }
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-footer {
        margin-top: 0.35rem;
        padding: 0.75rem 0.7rem 0.8rem;
        padding-right: 1rem;
        background: linear-gradient(
            165deg,
            rgba(20, 18, 44, 0.95) 0%,
            rgba(12, 10, 28, 0.97) 100%
        );
        border: 1px solid rgba(99, 102, 241, 0.3);
        border-radius: 14px;
        box-shadow:
            0 6px 22px rgba(0, 0, 0, 0.28),
            0 0 0 1px rgba(139, 92, 246, 0.06) inset;
    }
    body.veo-generation-body:not(.mobile-version) .veo-right-settings .veo-settings-footer::before {
        display: none;
    }
    
    /* Скрыть header на desktop внутри main, т.к. header общий */
    /* Main content для desktop — full height */
    body.veo-generation-body .veo-desktop-layout + .main-content-spacer,
    body.veo-generation-body main.main-content .veo-desktop-main-inner {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: calc(100vh - 60px);
    }
}

/* Подложка: клик вне панели закрывает её.
   Safari iOS 26+ (Liquid Glass): у fixed у края вьюпорта читаются background/backdrop-filter даже при opacity:0 — из-за этого «глухая» полоса у адресной строки. Закрытое состояние только display:none. */
.veo-chats-panel-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0, 0, 0, 0.25);
}
.veo-chats-panel-backdrop[aria-hidden="true"] {
    display: none !important;
}
.veo-chats-panel-backdrop[aria-hidden="false"] {
    display: block !important;
    pointer-events: auto;
}
/* Панель списка чатов — от самого левого края, без кнопки скрыть */
.veo-chats-panel {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: env(safe-area-inset-bottom, 0);
    width: 360px;
    max-width: 90vw;
    background: var(--bg-primary);
    border-right: none;
    z-index: 200;
    flex-direction: column;
    min-height: 0;
    overflow-x: hidden;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}
.veo-chats-panel[aria-hidden="true"] {
    display: none !important;
}
.veo-chats-panel[aria-hidden="false"] {
    display: flex !important;
}
.veo-chats-panel::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}
.veo-chats-panel-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem 1rem;
    border-bottom: none;
    font-weight: 600;
    color: var(--text-primary);
}
.veo-chats-panel-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--veo-divider-h);
}
.veo-chats-panel-header-spacer {
    width: 36px;
    flex-shrink: 0;
}
.veo-chats-panel-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.veo-chats-panel-back:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
}
.veo-chats-panel-back svg {
    width: 20px;
    height: 20px;
}
.veo-chats-panel-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}
.veo-chats-panel-search-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
}
.veo-chats-panel-search-icon svg {
    width: 18px;
    height: 18px;
}
.veo-chats-panel-search-input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.veo-chats-panel-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.veo-chats-panel-search-input:focus {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(99, 102, 241, 0.12);
}
.veo-chats-panel-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.5) rgba(99, 102, 241, 0.1);
}
.veo-chats-panel-list::-webkit-scrollbar {
    width: 8px;
}
.veo-chats-panel-list::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.06);
    border-radius: 4px;
}
.veo-chats-panel-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.4), rgba(99, 102, 241, 0.35));
    border-radius: 4px;
}
.veo-chats-panel-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.55), rgba(99, 102, 241, 0.5));
}
.veo-chats-panel-section {
    min-width: 0;
    padding: 0.6rem 1rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.veo-chats-panel-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
    padding: 0.6rem 1rem;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
}
.veo-chats-panel-item-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}
.veo-chats-panel-item-msg-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    padding-right: 0.15rem;
}
.veo-chats-panel-msg-track {
    flex: 1;
    min-width: 0;
    height: 4px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.2);
    overflow: hidden;
}
.veo-chats-panel-msg-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.85), rgba(167, 139, 250, 0.95));
    transition: width 0.2s ease;
    max-width: 100%;
}
.veo-chats-panel-msg-limit-label {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(167, 139, 250, 0.65);
    white-space: nowrap;
}
.veo-chats-panel-item--active .veo-chats-panel-msg-limit-label {
    color: rgba(196, 181, 253, 0.78);
}
.veo-chats-panel-msg-count {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: rgba(196, 181, 253, 0.85);
    letter-spacing: -0.02em;
}
.veo-chats-panel-item--active .veo-chats-panel-msg-count {
    color: rgba(221, 214, 254, 0.95);
}
.veo-chats-panel-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
.veo-chats-panel-item--active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.25) 0%, rgba(76, 29, 149, 0.15) 100%);
    border-left: 3px solid rgba(167, 139, 250, 0.9);
}
.veo-chats-panel-item--active:hover {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.32) 0%, rgba(76, 29, 149, 0.2) 100%);
}
.veo-chats-panel-item--active .veo-chats-panel-item-title {
    color: #c4b5fd;
}
.veo-chats-panel-item-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.veo-chats-panel-item-edit {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(49, 46, 129, 0.5) 0%, rgba(30, 27, 75, 0.6) 100%);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 8px;
    color: rgba(196, 181, 253, 0.9);
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.veo-chats-panel-item-edit:hover {
    color: #e9d5ff;
    background: linear-gradient(135deg, rgba(76, 29, 149, 0.7) 0%, rgba(49, 46, 129, 0.85) 100%);
    border-color: rgba(167, 139, 250, 0.6);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
}
.veo-chats-panel-item-edit svg {
    width: 14px;
    height: 14px;
}
.veo-chats-panel-item-delete {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.35) 0%, rgba(69, 10, 10, 0.5) 100%);
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 8px;
    color: rgba(252, 165, 165, 0.9);
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.veo-chats-panel-item-delete:hover {
    color: #fecaca;
    background: linear-gradient(135deg, rgba(153, 27, 27, 0.6) 0%, rgba(127, 29, 29, 0.8) 100%);
    border-color: rgba(248, 113, 113, 0.65);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
}
.veo-chats-panel-item-delete svg {
    width: 14px;
    height: 14px;
}
.veo-chats-panel-item-input {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(30, 27, 75, 0.95);
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    outline: none;
}
.veo-chats-panel-item-input:focus {
    border-color: rgba(139, 92, 246, 0.8);
}
.veo-chats-panel-auth-hint {
    padding: 1rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}
.veo-chats-panel-footer {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
    border-top: 1px solid rgba(99, 102, 241, 0.15);
    background: rgba(15, 12, 41, 0.4);
}
.veo-chats-panel-new-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.4) 0%, rgba(139, 92, 246, 0.3) 100%);
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.veo-chats-panel-new-btn:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.55) 0%, rgba(139, 92, 246, 0.45) 100%);
    border-color: rgba(139, 92, 246, 0.7);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.35);
}

/* Модальное окно входа (Google, Яндекс, Telegram) */
.veo-login-overlay {
    position: fixed;
    inset: 0;
    background: #0a0a0c;
    z-index: 10000;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.veo-login-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}
.veo-login-overlay .veo-login-page {
    display: flex;
    width: 100%;
    min-height: 100vh;
}
.veo-login-overlay .veo-login-panel {
    flex: 0 0 38%;
    min-width: 320px;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2.5rem;
    background: linear-gradient(180deg, #1a1512 0%, #0f0d0b 50%, #0a0908 100%);
    position: relative;
}
.veo-login-overlay .veo-login-back {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.veo-login-overlay .veo-login-back:hover { color: #fff; }
.veo-login-overlay .veo-login-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}
.veo-login-overlay .veo-login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}
.veo-login-overlay .veo-login-logo .veo-login-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.veo-login-overlay .veo-login-brand-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}
.veo-login-overlay .veo-login-beta {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.15rem 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    margin-left: 0.25rem;
}
.veo-login-overlay .veo-login-provider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 0.75rem;
}
.veo-login-overlay .veo-login-provider-btn:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.05);
}
.veo-login-overlay .veo-login-provider-icon { display: flex; align-items: center; justify-content: center; }
.veo-login-overlay .veo-login-provider-icon svg { flex-shrink: 0; }
.veo-login-overlay .veo-login-google-icon svg { width: 20px; height: 20px; }
.veo-login-overlay .veo-login-yandex-icon { color: #fc3f1d; }
.veo-login-overlay .veo-login-yandex-icon svg { width: 20px; height: 20px; }
.veo-login-overlay .veo-login-telegram-icon { color: #0088cc; }
.veo-login-overlay .veo-login-telegram-icon svg { width: 20px; height: 20px; }
.veo-login-overlay .veo-login-legal {
    margin: 1.25rem 0 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}
.veo-login-overlay .veo-login-legal-link { color: rgba(255, 255, 255, 0.7); text-decoration: underline; }
.veo-login-overlay .veo-login-legal-link:hover { color: #fff; }
.veo-login-overlay .veo-login-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
}
.veo-login-overlay .veo-login-info p { margin: 0; }
.veo-login-overlay .veo-login-step-wait { margin-top: 1rem; }
.veo-login-overlay .veo-login-wait-title {
    margin: 0 0 0.5rem; font-size: 1.25rem; font-weight: 600;
    background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 50%, #67e8f9 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.veo-login-overlay .veo-login-wait-text { margin: 0 0 1rem; font-size: 0.9rem; color: rgba(165, 180, 252, 0.9); }
.veo-login-overlay .veo-login-qr-wrap {
    margin: 1rem 0; padding: 14px; display: inline-block;
    background: linear-gradient(135deg, rgba(15, 12, 41, 0.95) 0%, rgba(30, 27, 75, 0.9) 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.25), 0 0 40px rgba(139, 92, 246, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.veo-login-overlay .veo-login-qr { display: block; border-radius: 6px; background: #fff; }
.veo-login-overlay .veo-login-timer { margin: 0 0 1rem; font-size: 0.9rem; color: rgba(165, 180, 252, 0.9); }
.veo-login-overlay .veo-login-open-btns { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; margin-bottom: 1rem; }
.veo-login-overlay .veo-login-open-btn {
    display: block; width: 100%; padding: 0.75rem 1rem; border-radius: 12px; font-size: 0.95rem; font-weight: 600;
    text-align: center; text-decoration: none; cursor: pointer; transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
}
.veo-login-overlay .veo-login-open-btn:hover { opacity: 0.95; transform: translateY(-1px); }
.veo-login-overlay .veo-login-open-btn--primary {
    background: linear-gradient(135deg, #312e81 0%, #4c1d95 50%, #5b21b6 100%);
    color: #fff; border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.35), 0 0 40px rgba(139, 92, 246, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.veo-login-overlay .veo-login-open-btn--primary:hover {
    box-shadow: 0 6px 28px rgba(99, 102, 241, 0.45), 0 0 50px rgba(139, 92, 246, 0.2);
}
.veo-login-overlay .veo-login-open-btn--secondary {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.6) 0%, rgba(49, 46, 129, 0.3) 100%);
    color: #fff; border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.veo-login-overlay .veo-login-open-btn--secondary:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}
.veo-login-overlay .veo-login-link { display: block; word-break: break-all; color: #e67e22; margin-bottom: 1rem; font-size: 0.9rem; }
.veo-login-overlay .veo-login-btn-secondary {
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 0.5rem;
}
.veo-login-overlay .veo-login-btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }
.veo-login-overlay .veo-login-gallery {
    flex: 1;
    min-width: 0;
    padding: 1.5rem;
    background: #0d0d0f;
    overflow: auto;
}
.veo-login-overlay .veo-login-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    max-width: 800px;
    margin: 0 auto;
}
.veo-login-overlay .veo-login-gallery-item { border-radius: 8px; overflow: hidden; aspect-ratio: 1; }
.veo-login-overlay .veo-login-gallery-item--tall { aspect-ratio: 1 / 1.4; }
.veo-login-overlay .veo-login-gallery-item--wide { aspect-ratio: 1.4 / 1; }
.veo-login-overlay .veo-login-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) {
    .veo-login-overlay .veo-login-page { flex-direction: column; }
    .veo-login-overlay .veo-login-panel { flex: none; max-width: none; padding: 2rem 1.5rem; }
    .veo-login-overlay .veo-login-gallery { min-height: 200px; }
    .veo-login-overlay .veo-login-gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Кастомные уведомления и ошибки */
.veo-notify-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.veo-notify-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
/* Космический стиль для справок (info) — как Veo 3 */
.veo-notify-overlay[data-type="info"] {
    background: rgba(15, 12, 41, 0.85);
    backdrop-filter: blur(8px);
}
.veo-notify-modal {
    background: linear-gradient(180deg, #1a1a1f 0%, #141418 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.25s ease;
}
.veo-notify-overlay[data-type="info"] .veo-notify-modal {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f0c29 50%, #141428 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6), 0 4px 24px rgba(99, 102, 241, 0.2), 0 0 40px rgba(139, 92, 246, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.veo-notify-overlay[aria-hidden="false"] .veo-notify-modal {
    transform: scale(1);
}
.veo-notify-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.veo-notify-icon svg {
    width: 28px;
    height: 28px;
}
.veo-notify-overlay[data-type="error"] .veo-notify-icon {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}
.veo-notify-overlay[data-type="error"] .veo-notify-modal {
    background: linear-gradient(180deg, #1a1a24 0%, #14141a 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
}
.veo-notify-overlay[data-type="error"] .veo-notify-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #7c3aed 100%);
    color: #fff;
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4), 0 0 30px rgba(139, 92, 246, 0.2);
}
.veo-notify-overlay[data-type="error"] .veo-notify-btn-primary:hover {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #8b5cf6 100%);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5), 0 0 40px rgba(139, 92, 246, 0.25);
}
.veo-notify-overlay[data-type="success"] .veo-notify-icon {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}
.veo-notify-overlay[data-type="success"] .veo-notify-modal {
    background: linear-gradient(180deg, #1a1a24 0%, #14141a 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
}
.veo-notify-overlay[data-type="success"] .veo-notify-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #7c3aed 100%);
    color: #fff;
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4), 0 0 30px rgba(139, 92, 246, 0.2);
}
.veo-notify-overlay[data-type="success"] .veo-notify-btn-primary:hover {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #8b5cf6 100%);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5), 0 0 40px rgba(139, 92, 246, 0.25);
}
.veo-notify-overlay[data-type="info"] .veo-notify-icon {
    background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3), 0 0 24px rgba(139, 92, 246, 0.15);
}
.veo-notify-overlay[data-type="info"] .veo-notify-icon svg {
    color: #e8e0ff;
}
.veo-notify-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}
.veo-notify-message {
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    white-space: pre-line;
}
.veo-notify-overlay[data-type="info"] .veo-notify-message {
    color: rgba(255, 255, 255, 0.85);
}
.veo-notify-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.veo-notify-btn {
    min-width: 100px;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    border: none;
}
.veo-notify-btn:hover {
    transform: translateY(-1px);
}
.veo-notify-btn-primary {
    background: linear-gradient(135deg, var(--gold, #e67e22) 0%, #c96a1a 100%);
    color: #000;
    box-shadow: 0 4px 14px rgba(230, 126, 34, 0.35);
}
.veo-notify-overlay[data-type="info"] .veo-notify-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #7c3aed 100%);
    color: #fff;
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4), 0 0 30px rgba(139, 92, 246, 0.2);
}
.veo-notify-btn-primary:hover {
    background: linear-gradient(135deg, #f0a040 0%, var(--gold, #e67e22) 100%);
}
.veo-notify-overlay[data-type="info"] .veo-notify-btn-primary:hover {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #8b5cf6 100%);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5), 0 0 40px rgba(139, 92, 246, 0.25);
}
.veo-notify-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Подтверждение отправки генерации — полный экран, изолированный слой */
.veo-confirm-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    box-sizing: border-box;
    isolation: isolate;
    contain: layout style paint;
}
.veo-confirm-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.veo-confirm-modal {
    background: linear-gradient(180deg, #1a1a24 0%, #14141a 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.25s ease;
}
.veo-confirm-overlay[aria-hidden="false"] .veo-confirm-modal {
    transform: scale(1);
}
.veo-confirm-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.25);
    color: #a78bfa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
}
.veo-confirm-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}
.veo-confirm-message {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
}
.veo-confirm-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    text-align: left;
}
.veo-confirm-checkbox input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}
.veo-confirm-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}
.veo-confirm-overlay .veo-notify-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #7c3aed 100%);
    color: #fff;
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4), 0 0 30px rgba(139, 92, 246, 0.2);
}
.veo-confirm-overlay .veo-notify-btn-primary:hover {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #8b5cf6 100%);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5), 0 0 40px rgba(139, 92, 246, 0.25);
}

/* Универсальное подтверждение (Да/Нет) в стиле Vision Flow */
.veo-confirm-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 12, 41, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.veo-confirm-dialog-overlay.veo-confirm-dialog--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.veo-confirm-dialog-modal {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f0c29 50%, #141428 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6), 0 4px 24px rgba(99, 102, 241, 0.2), 0 0 40px rgba(139, 92, 246, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}
.veo-confirm-dialog-overlay.veo-confirm-dialog--visible .veo-confirm-dialog-modal {
    transform: scale(1);
}
.veo-confirm-dialog-title {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}
.veo-confirm-dialog-message {
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}
.veo-confirm-dialog-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}
.veo-confirm-dialog-btn {
    min-width: 100px;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    border: none;
}
.veo-confirm-dialog-btn:hover {
    transform: translateY(-1px);
}
.veo-confirm-dialog-btn--cancel {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.veo-confirm-dialog-btn--cancel:hover {
    background: rgba(255, 255, 255, 0.14);
}
.veo-confirm-dialog-btn--confirm {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #7c3aed 100%);
    color: #fff;
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4), 0 0 30px rgba(139, 92, 246, 0.2);
}
.veo-confirm-dialog-btn--confirm:hover {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #8b5cf6 100%);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5), 0 0 40px rgba(139, 92, 246, 0.25);
}

/* Модальное окно выбора из сгенерированных */
.veo-generated-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.veo-generated-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
/* Кадрирование: фон как у шапки Veo (#0a0a0f), без blur «зеркала» страницы под модалкой */
.veo-attachment-preview-overlay.veo-generated-overlay {
    background: #0a0a0f;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
/* Лайтбокс: превью и кадрирование загруженного изображения */
.veo-attachment-preview-overlay .veo-attachment-crop-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    max-width: min(96vw, 1400px);
    max-height: 90vh;
    margin: 0 auto;
    position: relative;
}
.veo-attachment-crop-area {
    flex: 1;
    min-width: 280px;
    min-height: 400px;
    max-height: 90vh;
    height: 70vh;
    background: #0a0a0f;
    border-radius: 12px;
    overflow: hidden;
    /* Угловые ручки Cropper выступают на ~5px за рамку — без отступа они клипались до первого движения */
    padding: 16px;
    box-sizing: border-box;
}
.veo-attachment-crop-area > img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
/* Убираем стандартную «шахматку» Cropper.js — фон как у шапки (без чёрного «зеркала») */
.veo-attachment-crop-area .cropper-bg {
    background-image: none !important;
    background-color: #0a0a0f !important;
}
.veo-attachment-crop-area .cropper-wrap-box,
.veo-attachment-crop-area .cropper-container {
    background-color: #0a0a0f !important;
}
.veo-attachment-crop-area .cropper-modal {
    background-color: #0a0a0f !important;
    opacity: 0.58 !important;
}
/* Рамки Cropper.js — фиолетовая тема как на сайте */
.veo-attachment-crop-area .cropper-view-box {
    outline-color: rgba(139, 92, 246, 0.9) !important;
    outline-width: 2px;
    outline-offset: 0;
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.3), 0 0 24px rgba(139, 92, 246, 0.2);
}
.veo-attachment-crop-area .cropper-line {
    background-color: rgba(139, 92, 246, 0.6) !important;
    opacity: 0.9;
}

/* Ручки: без «кнопок» посередине сторон — только четыре угла (Cropper всё ещё ресайзит с углов) */
.veo-attachment-crop-area .cropper-point.point-n,
.veo-attachment-crop-area .cropper-point.point-e,
.veo-attachment-crop-area .cropper-point.point-s,
.veo-attachment-crop-area .cropper-point.point-w {
    display: none !important;
}

/* Углы — компактные круги, без квадратов и L-скобок */
.veo-attachment-crop-area .cropper-point.point-nw,
.veo-attachment-crop-area .cropper-point.point-ne,
.veo-attachment-crop-area .cropper-point.point-sw,
.veo-attachment-crop-area .cropper-point.point-se {
    opacity: 1 !important;
    width: 11px !important;
    height: 11px !important;
    margin-top: -5.5px !important;
    margin-left: -5.5px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border: 2px solid rgba(139, 92, 246, 0.92) !important;
    box-shadow:
        0 0 0 1px rgba(15, 12, 41, 0.35),
        0 2px 10px rgba(99, 102, 241, 0.35);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.veo-attachment-crop-area .cropper-point.point-nw::before,
.veo-attachment-crop-area .cropper-point.point-ne::before,
.veo-attachment-crop-area .cropper-point.point-sw::before,
.veo-attachment-crop-area .cropper-point.point-se::before {
    display: none !important;
}
.veo-attachment-crop-area .cropper-point.point-nw:hover,
.veo-attachment-crop-area .cropper-point.point-ne:hover,
.veo-attachment-crop-area .cropper-point.point-sw:hover,
.veo-attachment-crop-area .cropper-point.point-se:hover {
    border-color: rgba(196, 181, 253, 1) !important;
    box-shadow:
        0 0 0 1px rgba(139, 92, 246, 0.45),
        0 3px 14px rgba(139, 92, 246, 0.45);
    transform: scale(1.12);
}
/* Сетка правила третей — фиолетовая */
.veo-attachment-crop-area .cropper-dashed {
    border-color: rgba(139, 92, 246, 0.4) !important;
    opacity: 0.9;
}
.veo-attachment-crop-area .cropper-center::before,
.veo-attachment-crop-area .cropper-center::after {
    background-color: rgba(139, 92, 246, 0.5) !important;
}
.veo-attachment-crop-sidebar {
    width: 220px;
    flex-shrink: 0;
    padding: 1rem 1.25rem;
    background: #0a0a0f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-left: 1rem;
}
.veo-attachment-crop-title {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}
.veo-attachment-crop-desc {
    margin: 0 0 1rem;
    font-size: 0.75rem;
    color: rgba(196, 181, 253, 0.7);
}
.veo-attachment-crop-ratios {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}
.veo-attachment-crop-ratio {
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-align: left;
}
.veo-attachment-crop-ratio:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
}
.veo-attachment-crop-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.veo-attachment-crop-apply {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(135deg, #4c1d95, #312e81);
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.veo-attachment-crop-apply:hover {
    background: linear-gradient(135deg, #5b21b6, #4338ca);
}
.veo-attachment-crop-cancel {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.veo-attachment-crop-cancel:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.veo-attachment-preview-overlay-close {
    position: absolute;
    top: -44px;
    right: 0;
    z-index: 2;
}
.veo-generated-modal {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1a1a1f 0%, #141418 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    max-width: min(1080px, 95vw);
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}
.veo-generated-modal-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.veo-generated-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.5) rgba(99, 102, 241, 0.12);
}
.veo-generated-modal-body::-webkit-scrollbar {
    width: 8px;
}
.veo-generated-modal-body::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 4px;
}
.veo-generated-modal-body::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 4px;
}
.veo-generated-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.65);
}
.veo-generated-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}
.veo-generated-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.veo-generated-modal-header .veo-generated-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}
.veo-generated-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    min-width: 0; /* предотвращает overflow по горизонтали */
}
.veo-generated-grid .veo-generated-grid-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}
.veo-generated-card {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.veo-generated-card:hover {
    border-color: rgba(139, 92, 246, 0.8);
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.8), 0 4px 12px rgba(139, 92, 246, 0.25);
}
.veo-generated-card--loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}
.veo-generated-card--loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    animation: veo-card-loading-pulse 0.8s ease-in-out infinite;
}
@keyframes veo-card-loading-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}
.veo-generated-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.veo-generated-empty {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

/* Галерея «добавленных» / «из генераций»: на весь экран, крупные превью */
.veo-gallery-picker-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
}
.veo-gallery-picker-modal.veo-generated-modal {
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding: 1rem 1.25rem 1rem;
    box-sizing: border-box;
}
.veo-gallery-picker-header.veo-generated-modal-header {
    margin-bottom: 0.75rem;
    align-items: flex-start;
}
.veo-gallery-picker-heading {
    min-width: 0;
    flex: 1;
}
.veo-gallery-picker-sub {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: rgba(196, 181, 253, 0.72);
}
.veo-gallery-picker-body.veo-generated-modal-body {
    flex: 1;
    min-height: 0;
}
.veo-gallery-picker-grid.veo-generated-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.85rem;
}

/* ПК: галерея «добавленные» / «из генераций» — не на весь экран, мельче превью */
body.veo-generation-body:not(.mobile-version) .veo-gallery-picker-overlay {
    padding: 1.5rem;
    align-items: center;
    justify-content: center;
}
body.veo-generation-body:not(.mobile-version) .veo-gallery-picker-modal.veo-generated-modal {
    max-width: min(1080px, 95vw);
    width: 100%;
    height: auto;
    max-height: min(85vh, 860px);
    margin: 0 auto;
    border-radius: 16px;
    padding: 1.15rem 1.35rem 1rem;
    box-sizing: border-box;
}
body.veo-generation-body:not(.mobile-version) .veo-gallery-picker-grid.veo-generated-grid {
    grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
    gap: 0.65rem;
}
body.veo-generation-body:not(.mobile-version) .veo-gallery-picker-overlay .veo-gallery-card {
    border-radius: 8px;
}
body.veo-generation-body:not(.mobile-version) .veo-gallery-picker-overlay .veo-gallery-card__action {
    width: 28px;
    height: 28px;
}
body.veo-generation-body:not(.mobile-version) .veo-gallery-picker-overlay .veo-gallery-card__delete {
    top: 4px;
    left: 4px;
}
body.veo-generation-body:not(.mobile-version) .veo-gallery-picker-overlay .veo-gallery-card__check {
    top: 4px;
    right: 4px;
}
body.veo-generation-body:not(.mobile-version) .veo-gallery-picker-overlay .veo-gallery-card__view {
    bottom: 4px;
    left: 4px;
}

.veo-gallery-picker-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    padding-top: 0.85rem;
    margin-top: 0.35rem;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
}
.veo-gallery-picker-apply {
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    border-radius: 10px;
    background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
    border: 1px solid rgba(139, 92, 246, 0.55);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
    transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.veo-gallery-picker-apply:hover:not(:disabled) {
    border-color: rgba(196, 181, 253, 0.75);
    box-shadow: 0 6px 28px rgba(139, 92, 246, 0.35);
}
.veo-gallery-picker-apply:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.veo-gallery-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.veo-gallery-card--selected {
    border-color: rgba(139, 92, 246, 0.95);
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.5),
        0 4px 20px rgba(99, 102, 241, 0.28);
}
.veo-gallery-card--busy {
    pointer-events: none;
    opacity: 0.55;
}
.veo-gallery-card__media {
    position: absolute;
    inset: 0;
}
.veo-gallery-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.veo-gallery-card__action {
    position: absolute;
    z-index: 2;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(15, 12, 41, 0.72);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.veo-gallery-card__action:hover {
    background: rgba(49, 46, 129, 0.88);
    color: #fff;
}
.veo-gallery-card__delete {
    top: 6px;
    left: 6px;
}
.veo-gallery-card__check {
    top: 6px;
    right: 6px;
}
.veo-gallery-card__check .veo-gallery-card__svg {
    stroke: rgba(196, 181, 253, 0.55);
}
.veo-gallery-card--selected .veo-gallery-card__check {
    background: rgba(76, 29, 149, 0.92);
    color: #fff;
}
.veo-gallery-card--selected .veo-gallery-card__check .veo-gallery-card__svg {
    stroke: #fff;
    stroke-width: 2.5;
}
.veo-gallery-card__view {
    bottom: 6px;
    left: 6px;
}
.veo-gallery-card__svg {
    display: block;
    flex-shrink: 0;
}

/* Просмотр фото из галереи на весь экран (поверх пикера) */
.veo-gallery-view-overlay.veo-generated-overlay {
    z-index: 10005;
}
.veo-gallery-view-overlay {
    padding: max(0.5rem, env(safe-area-inset-top, 0px)) max(0.5rem, env(safe-area-inset-right, 0px))
        max(0.5rem, env(safe-area-inset-bottom, 0px)) max(0.5rem, env(safe-area-inset-left, 0px));
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.veo-gallery-view-overlay[aria-hidden="false"] {
    display: flex;
}
.veo-gallery-view-close {
    position: fixed;
    top: max(0.65rem, env(safe-area-inset-top, 0px));
    right: max(0.65rem, env(safe-area-inset-right, 0px));
    z-index: 10002;
}
.veo-gallery-view-inner {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.veo-gallery-view-img {
    max-width: 100%;
    max-height: calc(100vh - 3.5rem);
    max-height: calc(100dvh - 3.5rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}

/* Кнопка «Выбрать видео» вместо списка */
.veo-add-video-wrap {
    width: 100%;
}
.veo-add-video-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.85rem;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.veo-add-video-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}
.veo-add-video-btn.veo-add-video-btn--selected {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.5);
}
.veo-add-video-btn.veo-add-video-btn--selected:hover {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.6);
}
.veo-add-video-icon {
    display: flex;
    width: 18px;
    height: 18px;
}
.veo-add-video-icon svg {
    width: 100%;
    height: 100%;
}
.veo-add-video-text {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Модальное окно выбора видео Veo 3 */
.veo-video-pick-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.veo-video-pick-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.veo-video-pick-modal {
    position: relative;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    max-width: min(960px, 95vw);
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6), 0 0 60px rgba(139, 92, 246, 0.15);
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.5) rgba(99, 102, 241, 0.1);
}
.veo-video-pick-modal::-webkit-scrollbar {
    width: 10px;
}
.veo-video-pick-modal::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 5px;
}
.veo-video-pick-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.5), rgba(99, 102, 241, 0.4));
    border-radius: 5px;
}
.veo-video-pick-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.65), rgba(99, 102, 241, 0.55));
}
.veo-video-pick-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
}
.veo-video-pick-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.veo-video-pick-title {
    margin: 0 0 0.25rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}
.veo-video-pick-desc {
    margin: 0 0 1.25rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}
.veo-video-pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
}

/* ПК: выбор до 3 роликов — модалка и превью */
body.veo-generation-body:not(.mobile-version) .veo-video-pick-modal {
    max-width: min(960px, 95vw);
    padding: 1.4rem 1.5rem;
    max-height: 80vh;
}
body.veo-generation-body:not(.mobile-version) .veo-video-pick-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 0.85rem;
}

.veo-video-pick-card {
    display: flex;
    flex-direction: column;
    aspect-ratio: 9/16;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.veo-video-pick-card:hover {
    border-color: rgba(139, 92, 246, 0.6);
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}
.veo-video-pick-card video {
    flex: 1;
    width: 100%;
    min-height: 0;
    object-fit: cover;
    display: block;
}
.veo-video-pick-card img {
    flex: 1;
    width: 100%;
    min-height: 0;
    object-fit: cover;
    display: block;
}
.veo-video-pick-card video.veo-video-error {
    display: none;
}
.veo-video-pick-placeholder {
    display: none;
    flex: 1;
    min-height: 0;
    align-items: center;
    justify-content: center;
    background: rgba(30, 27, 75, 0.6);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}
.veo-video-pick-placeholder[aria-hidden="false"] {
    display: flex;
}
.veo-video-pick-card-caption {
    flex-shrink: 0;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.veo-video-pick-empty {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    display: none;
}
.veo-video-pick-overlay.veo-video-pick--empty .veo-video-pick-grid { display: none; }
.veo-video-pick-overlay.veo-video-pick--empty .veo-video-pick-empty { display: block; }

/* Каталог видео: компактная панель справа в зоне чата (не полноэкранная модалка).
   Закрытый shell — display:none (см. комментарий у .veo-chats-panel-backdrop, Safari Liquid Glass). */
.veo-video-catalog-shell {
    position: fixed;
    inset: 0;
    z-index: 250;
    pointer-events: none;
}
.veo-video-catalog-shell[aria-hidden="true"] {
    display: none !important;
}
.veo-video-catalog-shell[aria-hidden="false"] {
    display: block !important;
    pointer-events: auto;
}
.veo-video-catalog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 4, 12, 0.45);
    backdrop-filter: blur(4px);
}
.veo-video-catalog-panel {
    position: absolute;
    top: 60px;
    left: 60px;
    bottom: 0;
    width: min(300px, calc(100vw - 60px));
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #16162a 0%, #0a0a12 100%);
    border-right: 1px solid rgba(139, 92, 246, 0.38);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45), 0 0 48px rgba(139, 92, 246, 0.12);
    padding: 0;
    box-sizing: border-box;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.veo-video-catalog-shell[aria-hidden="false"] .veo-video-catalog-panel {
    transform: translateX(0);
}
.veo-video-catalog-panel--filters-only .veo-video-catalog-filters {
    flex: 1;
    margin-bottom: 0;
    min-height: 0;
    overflow-y: auto;
}

/* Фильтр: единый стиль панели */
.veo-filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0;
    gap: 0.5rem;
}
.veo-video-catalog-panel-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.35rem;
}
.veo-video-catalog-family {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.veo-video-catalog-seg {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.42rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: rgba(30, 27, 75, 0.45);
    color: rgba(226, 232, 255, 0.88);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.veo-video-catalog-seg:hover {
    border-color: rgba(167, 139, 250, 0.55);
    background: rgba(49, 46, 129, 0.65);
}
.veo-video-catalog-seg--active {
    border-color: rgba(167, 139, 250, 0.75);
    background: linear-gradient(135deg, rgba(76, 29, 149, 0.55) 0%, rgba(49, 46, 129, 0.85) 100%);
    color: #fff;
}
.veo-video-catalog-details {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: rgba(15, 12, 41, 0.35);
    padding: 0.35rem 0.6rem;
    box-sizing: border-box;
}
.veo-video-catalog-details-summary {
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(196, 181, 253, 0.95);
    list-style: none;
}
.veo-video-catalog-details-summary::-webkit-details-marker {
    display: none;
}
.veo-video-catalog-details-inner {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.5rem 0 0.15rem;
}
.veo-video-catalog-dates-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.veo-video-catalog-dates-row .veo-video-catalog-field {
    flex: 1 1 120px;
}
.veo-video-catalog-close {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    line-height: 0;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}
.veo-video-catalog-close-icon {
    display: block;
    flex-shrink: 0;
    margin: 0;
    pointer-events: none;
}
.veo-video-catalog-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.veo-video-catalog-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}
.veo-video-catalog-desc {
    margin: 0 1.25rem 1rem;
    padding: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}
.veo-video-catalog-filters {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin: 0;
    padding: 0 1.25rem 1.25rem;
    flex-shrink: 0;
}
.veo-filter-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}
/* Переключатель «Только результаты» — скрыть ошибки */
.veo-filter-row--toggle {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-top: 1px solid rgba(99, 102, 241, 0.15);
    margin-top: 0.25rem;
}
.veo-filter-toggle-label {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    cursor: pointer;
    flex: 1;
}
.veo-filter-toggle-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}
.veo-filter-toggle-desc {
    font-size: 0.65rem;
    color: rgba(167, 139, 250, 0.6);
}
.veo-filter-toggle-switch {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.veo-filter-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.veo-filter-toggle-track {
    width: 26px;
    height: 26px;
    background: linear-gradient(180deg, rgba(15, 12, 41, 0.9) 0%, rgba(30, 27, 75, 0.5) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.veo-filter-toggle-switch:hover .veo-filter-toggle-track {
    border-color: rgba(99, 102, 241, 0.45);
}
.veo-filter-toggle-switch:has(.veo-filter-toggle-input:checked) .veo-filter-toggle-track {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5) 0%, rgba(139, 92, 246, 0.45) 100%);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.veo-filter-toggle-thumb {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: inherit;
    box-shadow: none;
}
.veo-filter-toggle-thumb::after {
    content: '';
    display: block;
    width: 6px;
    height: 10px;
    flex-shrink: 0;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0) translateY(0);
    transition: transform 0.2s;
}
.veo-filter-toggle-switch:has(.veo-filter-toggle-input:checked) .veo-filter-toggle-thumb::after {
    transform: rotate(45deg) scale(1) translateY(-1px);
}
.veo-video-catalog-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}
.veo-video-catalog-field--grow {
    flex: 1 1 200px;
}
.veo-video-catalog-field--full {
    width: 100%;
    flex-basis: 100%;
}
.veo-video-catalog-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(167, 139, 250, 0.9);
}
.veo-video-catalog-input,
.veo-filter-input {
    font-size: 0.9rem;
    color: var(--text-primary);
    background: linear-gradient(180deg, #08080e 0%, #06060a 50%, #050508 100%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    min-height: 40px;
    height: 40px;
    box-sizing: border-box;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.08);
}
.veo-video-catalog-select {
    font-size: 0.9rem;
    color: var(--text-primary);
    background-color: transparent;
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 8px;
    padding: 0.55rem 2.25rem 0.55rem 0.85rem;
    min-height: 38px;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(180deg, #06060a 0%, #050508 50%, #040407 100%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(224,231,255,0.6)' stroke-width='2'%3E%3Cpath d='M18 15l-6-6-6 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right 0.65rem center;
    background-size: 100% 100%, 14px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}
.veo-video-catalog-select option {
    background: #0a0a12;
    color: rgba(224, 231, 255, 0.95);
}
.veo-video-catalog-input:focus,
.veo-filter-input:focus,
.veo-video-catalog-select:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.4), 0 0 18px rgba(99, 102, 241, 0.2);
}
/* Кастомные дропдауны в панели фильтров — тот же стиль, что в настройках справа (работают и на мобиле) */
.veo-video-catalog-panel .veo-custom-select {
    position: relative;
    width: 100%;
}
.veo-video-catalog-panel .veo-custom-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    min-height: 40px;
    height: 40px;
    box-sizing: border-box;
    font-size: 0.9rem;
    background: linear-gradient(180deg, #08080e 0%, #06060a 50%, #050508 100%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    text-align: left;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.08);
}
.veo-video-catalog-panel .veo-custom-select-trigger:hover {
    background: linear-gradient(180deg, #08080e 0%, #07070c 50%, #06060a 100%);
    border-color: rgba(139, 92, 246, 0.45);
}
.veo-video-catalog-panel .veo-custom-select.open .veo-custom-select-trigger {
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(180deg, #08080e 0%, #07070c 50%, #06060a 100%);
}
.veo-video-catalog-panel .veo-custom-select-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.veo-video-catalog-panel .veo-custom-select-chevron { width: 14px; height: 14px; opacity: 0.6; flex-shrink: 0; transform: rotate(180deg); }
.veo-video-catalog-panel .veo-custom-select.open .veo-custom-select-chevron { transform: rotate(0deg); }
.veo-video-catalog-panel .veo-custom-select-dropdown {
    position: fixed;
    z-index: 2147483646;
    background: #23233d;
    background-image: linear-gradient(180deg, #2a2a45 0%, #23233d 50%, #1e1e36 100%);
    border: 2px solid rgba(139, 92, 246, 0.7);
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9), 0 0 32px rgba(99, 102, 241, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    display: none;
}
.veo-video-catalog-dropdown-portal {
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}
.veo-video-catalog-dependent-fields--hidden {
    display: none !important;
}
.veo-video-catalog-panel .veo-custom-select.open .veo-custom-select-dropdown { display: block; }
.veo-video-catalog-panel .veo-custom-select-option {
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    background: transparent;
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}
.veo-video-catalog-panel .veo-custom-select-option:last-child { border-bottom: none; }
.veo-video-catalog-panel .veo-custom-select-option:hover {
    background: linear-gradient(180deg, #08080e 0%, #07070c 50%, #06060a 100%);
    color: #fff;
}
.veo-video-catalog-panel .veo-custom-select-option.selected {
    background: linear-gradient(180deg, #0a0a12 0%, #08080e 50%, #07070c 100%);
    color: rgba(199, 210, 254, 1);
}

.veo-video-catalog-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    align-items: stretch;
    margin-top: 0.15rem;
}
.veo-video-catalog-btn {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    min-height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.veo-video-catalog-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, #4c1d95 0%, #312e81 100%);
    border-color: rgba(167, 139, 250, 0.45);
}
.veo-video-catalog-btn--primary:hover {
    filter: brightness(1.08);
}
.veo-video-catalog-btn--ghost {
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}
.veo-video-catalog-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}
.veo-video-catalog-meta {
    margin: 0;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    min-height: 1.2em;
    flex-shrink: 0;
}
.veo-video-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 0.65rem;
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
    padding-right: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.45) rgba(99, 102, 241, 0.08);
}
.veo-video-catalog-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.veo-video-catalog-card:hover {
    border-color: rgba(139, 92, 246, 0.55);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}
.veo-video-catalog-card-media {
    aspect-ratio: 9 / 16;
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.veo-video-catalog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.veo-video-catalog-card-placeholder {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    padding: 1rem;
    text-align: center;
}
.veo-video-catalog-card-body {
    padding: 0.55rem 0.65rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 0;
}
.veo-video-catalog-card-prompt {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.78);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.veo-video-catalog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.45);
}
.veo-video-catalog-card-meta span {
    white-space: nowrap;
}
.veo-video-catalog-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.15rem;
}
.veo-video-catalog-link {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(196, 181, 253, 0.95);
    text-decoration: none;
    border-bottom: 1px solid rgba(167, 139, 250, 0.35);
    align-self: flex-start;
}
.veo-video-catalog-link:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.4);
}
.veo-video-catalog-link--primary {
    color: #a5b4fc;
    border-bottom-color: rgba(129, 140, 248, 0.45);
}
.veo-video-catalog-empty {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
}
.veo-video-catalog-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}
.veo-video-catalog-page-btn {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(139, 92, 246, 0.4);
    background: rgba(30, 27, 75, 0.5);
    color: rgba(255, 255, 255, 0.85);
}
.veo-video-catalog-page-btn:hover:not(:disabled) {
    background: rgba(49, 46, 129, 0.65);
}
.veo-video-catalog-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.veo-video-catalog-page-info {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}
@media (max-width: 768px) {
    .veo-video-catalog-panel {
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        transform: translateX(-100%);
        padding-top: max(3.25rem, calc(env(safe-area-inset-top) + 1.75rem));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        border-right: none;
        box-shadow: 0 0 48px rgba(0, 0, 0, 0.55);
    }
    .veo-video-catalog-shell[aria-hidden="false"] .veo-video-catalog-panel {
        transform: translateX(0);
    }
}

/* Модалка: фильтр запрещённого контента в промпте (как в боте) */
.veo-content-filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 6, 24, 0.82);
    backdrop-filter: blur(10px);
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}
.veo-content-filter-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.veo-content-filter-modal {
    position: relative;
    width: 100%;
    max-width: min(440px, 94vw);
    padding: 1.75rem 1.65rem 1.5rem;
    border-radius: 18px;
    background: linear-gradient(160deg, #1e1b4b 0%, #0f0c29 45%, #1a1535 100%);
    border: 1px solid rgba(167, 139, 250, 0.45);
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.55),
        0 0 48px rgba(139, 92, 246, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    text-align: center;
}
.veo-content-filter-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(76, 29, 149, 0.55) 0%, rgba(49, 46, 129, 0.4) 100%);
    color: #fbbf24;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.15);
}
.veo-content-filter-icon svg {
    width: 28px;
    height: 28px;
}
.veo-content-filter-title {
    margin: 0 0 0.65rem;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.96);
    line-height: 1.35;
}
.veo-content-filter-lead {
    margin: 0 0 1rem;
    font-size: 0.84rem;
    line-height: 1.55;
    color: rgba(226, 232, 240, 0.78);
    text-align: left;
}
.veo-content-filter-label {
    margin: 0 0 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(196, 181, 253, 0.85);
    text-align: left;
}
.veo-content-filter-list {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    list-style: none;
    text-align: left;
    max-height: 9.5rem;
    overflow-y: auto;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(139, 92, 246, 0.25);
    scrollbar-width: thin;
    scrollbar-color: rgba(167, 139, 250, 0.45) transparent;
}
.veo-content-filter-list li {
    position: relative;
    padding: 0.35rem 0 0.35rem 1rem;
    font-size: 0.82rem;
    line-height: 1.4;
    color: rgba(254, 226, 226, 0.92);
    word-break: break-word;
}
.veo-content-filter-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f87171, #dc2626);
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.5);
}
.veo-content-filter-message {
    margin: 0 0 1.15rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(203, 213, 225, 0.72);
    text-align: left;
}
.veo-content-filter-ok {
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4c1d95 0%, #6366f1 55%, #312e81 100%);
    box-shadow: 0 6px 22px rgba(99, 102, 241, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    transition: filter 0.2s, transform 0.15s;
}
.veo-content-filter-ok:hover {
    filter: brightness(1.06);
}
.veo-content-filter-ok:active {
    transform: scale(0.98);
}

/* Кнопка автоотправки — молния с прорисовкой контура; как микрофон: без плашки и рамки, только цвет иконки */
.veo-auto-send-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 10px;
    color: rgba(226, 232, 240, 0.72);
    cursor: pointer;
    transition: color 0.2s;
}
.veo-auto-send-btn:hover {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.95);
}
.veo-auto-send-btn[aria-pressed="true"] {
    background: transparent !important;
    border: none !important;
    color: #c4b5fd;
}
.veo-auto-send-btn[aria-pressed="true"]:hover {
    background: transparent !important;
    border: none !important;
    color: #ddd6fe;
}
.veo-auto-send-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.veo-auto-send-icon svg,
.veo-auto-send-zap-svg {
    width: 22px;
    height: 22px;
    display: block;
}
/* Анимация молнии: pathLength + прорисовка контура (~0.6s), в духе pqoqubbw/icons */
.veo-auto-send-zap-path {
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}
@media (hover: hover) and (pointer: fine) {
    .veo-auto-send-btn:hover .veo-auto-send-zap-path {
        animation: veo-auto-send-zap-draw 0.6s ease forwards;
    }
}
/* Тач: без :hover — перезапуск анимации по клику (см. veo-generation.js) */
.veo-auto-send-zap-path.veo-auto-send-zap-replay {
    animation: veo-auto-send-zap-draw 0.6s ease forwards;
}
@keyframes veo-auto-send-zap-draw {
    from {
        stroke-dashoffset: 1;
        opacity: 0.85;
    }
    to {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}
/* Пока автоотправка включена — лёгкое «энергичное» свечение молнии (иконка, не path — не мешает прорисовке по hover) */
.veo-auto-send-btn[aria-pressed="true"] .veo-auto-send-zap-svg {
    animation: veo-auto-send-zap-active 2.2s ease-in-out infinite;
    transform-origin: center;
}
@keyframes veo-auto-send-zap-active {
    0%,
    100% {
        filter: drop-shadow(0 0 1px rgba(196, 181, 253, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 5px rgba(196, 181, 253, 0.85)) drop-shadow(0 0 12px rgba(99, 102, 241, 0.35));
    }
}
@media (prefers-reduced-motion: reduce) {
    .veo-auto-send-btn:hover .veo-auto-send-zap-path,
    .veo-auto-send-zap-path.veo-auto-send-zap-replay {
        animation: none;
    }
    .veo-auto-send-zap-path {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    .veo-auto-send-btn[aria-pressed="true"] .veo-auto-send-zap-svg {
        animation: none;
        filter: none;
    }
    .veo-photo-upload-wrap--control-bar .veo-photo-upload-btn:hover .veo-photo-upload-img-stroke,
    .veo-photo-upload-img-stroke.veo-photo-upload-img-replay {
        animation: none;
    }
    .veo-photo-upload-wrap--control-bar .veo-photo-upload-img-svg {
        animation: none !important;
        filter: none;
    }
    .veo-photo-upload-wrap--control-bar .veo-photo-upload-img-stroke {
        stroke-dasharray: 1 0;
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* Справки (tooltips) — космический стиль Veo 3 везде */
body.veo-generation-body .form-section-help-tooltip {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f0c29 100%) !important;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(99, 102, 241, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.6rem 0.9rem;
    line-height: 1.45;
}
body.veo-generation-body .form-section-help-tooltip::after {
    border-top-color: #0f0c29;
}
/* Справки — тултипы через JS в body (выходят в область чата), CSS-тултип скрыт */
.veo-right-settings .form-section-help-wrapper {
    position: relative;
}
.veo-right-settings .form-section-help-tooltip,
.veo-right-settings .form-section-help-wrapper:hover .form-section-help-tooltip,
.veo-right-settings .form-section-help:focus + .form-section-help-tooltip,
.veo-right-settings .form-section-help-wrapper:focus-within .form-section-help-tooltip {
    display: none !important; /* рендерится в body через JS */
}
@media (max-width: 768px) {
    .veo-right-settings .form-section-help-wrapper:active .form-section-help-tooltip,
    .veo-right-settings .form-section-help:active + .form-section-help-tooltip {
        display: none !important;
    }
}
/* Клон тултипа в body — выходит в область чата, не обрезается */
.veo-help-tooltip-floating {
    position: fixed;
    background: linear-gradient(180deg, #1e1b4b 0%, #0f0c29 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(99, 102, 241, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    color: rgba(255, 255, 255, 0.9);
    padding: 0.6rem 0.9rem;
    font-size: 0.78rem;
    line-height: 1.45;
    min-width: 200px;
    max-width: 320px;
    z-index: 2147483647;
    white-space: pre-line;
    overflow-wrap: break-word;
    pointer-events: none;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}
.veo-help-tooltip-floating.veo-help-tooltip-visible {
    opacity: 1;
}
.veo-help-tooltip-floating::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #1e1b4b;
}

/* Адаптивность хедера на средних экранах */
@media (max-width: 1100px) and (min-width: 600px) {
    body.veo-generation-body .desktop-nav .nav-link {
        padding: 0.5rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* Кнопка «анимация в чате» — мобильная; диагональ при выключенных эффектах */
.veo-mobile-chat-motion-btn[aria-pressed="true"] {
    background: rgba(124, 58, 237, 0.22);
    border-color: rgba(168, 85, 247, 0.45);
}
.veo-mobile-chat-motion-slash {
    transition: opacity 0.15s ease;
}
.veo-mobile-chat-motion-btn[aria-pressed="true"] .veo-mobile-chat-motion-slash {
    opacity: 1 !important;
}

/* Декоративные анимации в чате выключены (класс на body) */
/* Космические звёзды — не только без анимации, а полностью скрыты */
body.veo-generation-body.veo-chat-anim-off #veoChatArea .veo-cosmic-stars-sides,
body.veo-generation-body.veo-chat-anim-off #veoChatArea .veo-chat-messages-wrap .veo-cosmic-stars,
body.veo-generation-body.veo-chat-anim-off .veo-background-animation .veo-cosmic-star,
body.veo-generation-body.veo-chat-anim-off .veo-cosmic-star--shoot {
    display: none !important;
}
body.veo-generation-body.veo-chat-anim-off .veo-fairy-wrap,
body.veo-generation-body.veo-chat-anim-off .veo-generating-placeholder-shimmer,
body.veo-generation-body.veo-chat-anim-off .veo-generating-loader-ring,
body.veo-generation-body.veo-chat-anim-off .veo-generating-dots span,
body.veo-generation-body.veo-chat-anim-off .veo-google-g-badge,
body.veo-generation-body.veo-chat-anim-off .veo-google-g-badge::before,
body.veo-generation-body.veo-chat-anim-off .veo-chat-message .veo-player-big-play::before,
body.veo-generation-body.veo-chat-anim-off .veo-chat-message .veo-player-big-pause::before,
body.veo-generation-body.veo-chat-anim-off .veo-chat-message .veo-player-big-play svg,
body.veo-generation-body.veo-chat-anim-off .veo-chat-message .veo-player-big-pause svg,
body.veo-generation-body.veo-chat-anim-off .veo-chat-message .veo-player-play svg {
    animation: none !important;
}
body.veo-generation-body.veo-chat-anim-off .veo-prompt-send::before,
body.veo-generation-body.veo-chat-anim-off .btn-submit::before {
    animation: none !important;
    opacity: 0 !important;
}
body.veo-generation-body.veo-chat-anim-off .veo-chat-message .veo-video-wrapper {
    animation: none !important;
}
body.veo-generation-body.veo-chat-anim-off #veoFairyDust {
    visibility: hidden;
    pointer-events: none;
}

/* Мобильная панель под хедером (чаты / настройки / модель) — детали в mobile/css/veo-3-1-mobile.css */
.veo-mobile-chat-toolbar {
    display: none;
}

/* Узкий экран (в т.ч. узкое окно на ПК): колонка чат → настройки; левый сайдбар скрыт — см. veo-mobile-chat-toolbar в моб. шаблоне */
/* Узкое окно / планшет: плейсхолдер и ошибки не ломают ширину; отступы ленты ближе к референсу */
@media (max-width: 1023px) {
    body.veo-generation-body .veo-generating-placeholder {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    body.veo-generation-body .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-generating-placeholder) {
        padding-left: max(0.5rem, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(0.5rem, env(safe-area-inset-right, 0px)) !important;
        width: 100%;
        max-width: 100%;
    }
    body.veo-generation-body .veo-chat-message--assistant .veo-chat-message-bubble--status.veo-chat-status--error {
        margin-left: 0 !important;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    body.veo-generation-body:not(.mobile-version) #veoChatArea .veo-chat-messages {
        padding-left: max(0.65rem, env(safe-area-inset-left, 0px), 11vw);
        padding-right: max(0.65rem, env(safe-area-inset-right, 0px), 11vw);
    }
}
@media (max-width: 599px) {
    /* height:auto ломает flex-цепочку и скролл #veoChatMessagesDesktop на моб. шаблоне — только без .mobile-version */
    body.veo-generation-body .veo-desktop-layout {
        flex-direction: column !important;
        min-height: calc(100vh - 60px) !important;
    }
    body.veo-generation-body:not(.mobile-version) .veo-desktop-layout {
        height: auto !important;
    }
    body.veo-generation-body .veo-left-sidebar {
        display: none !important;
    }
    body.veo-generation-body .veo-center-area {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }
    body.veo-generation-body .veo-right-settings {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        flex: 0 1 auto !important;
        max-height: min(48vh, 420px) !important;
        border-left: none !important;
        border-top: 1px solid rgba(99, 102, 241, 0.22);
    }
    body.veo-generation-body .veo-chat-message {
        display: flex;
        flex-direction: row;
        margin: 0.5rem 0;
        max-width: 100%;
        min-width: 0;
    }
    body.veo-generation-body .veo-chat-message--user {
        justify-content: flex-end;
    }
    body.veo-generation-body .veo-chat-message--assistant {
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
    }
    body.veo-generation-body .veo-chat-message--assistant .veo-chat-message-bubble--status.veo-chat-status--error {
        margin-left: 0 !important;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    body.veo-generation-body .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-chat-status--error) {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}
/* Полоса быстрых действий — только в мобильном шаблоне veo-3-1-mobile.html */
@media (min-width: 600px) {
    body.veo-generation-body:not(.mobile-version) .veo-mobile-chat-toolbar {
        display: none !important;
    }
}
@media (min-width: 600px) {
    body.veo-generation-body .veo-desktop-layout {
        display: flex !important;
        flex-direction: row;
    }
}
/* Мобильный шаблон: всегда колонка + полоса кнопок, без левого сайдбара */
body.veo-generation-body.mobile-version .veo-left-sidebar {
    display: none !important;
}
body.veo-generation-body.mobile-version .veo-desktop-layout {
    flex-direction: column !important;
}
/* display: grid задаётся в mobile/css/veo-3-1-mobile.css — flex здесь ломал колонки и выравнивание */
body.veo-generation-body.mobile-version .veo-mobile-chat-toolbar {
    flex-shrink: 0;
}
body.veo-generation-body.mobile-version .veo-center-area {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    width: 100% !important;
}
body.veo-generation-body.mobile-version .veo-right-settings {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: none !important;
    border-left: none !important;
    border-top: none !important;
}

/* Док промпта с вкладками: на ПК разворачиваем без лишней обёртки */
body:not(.mobile-version) #veoMobileInputDock {
    display: contents;
}
body:not(.mobile-version) .veo-mobile-dock-fab-row,
body:not(.mobile-version) .veo-mobile-prompt-tabs-row,
body:not(.mobile-version) .veo-mobile-dock-capsule-bar {
    display: none !important;
}
body:not(.mobile-version) .veo-mobile-tab-panel--settings {
    display: none !important;
}
body:not(.mobile-version) .veo-mobile-dock-collapsible-wrap,
body:not(.mobile-version) .veo-mobile-dock-collapsible {
    display: contents;
}
body:not(.mobile-version) .veo-mobile-tab-panels {
    display: contents;
}
body:not(.mobile-version) .veo-mobile-tab-panel--prompt {
    display: contents;
}
body:not(.mobile-version) .veo-prompt-char-count {
    position: absolute;
    right: 1.05rem;
    bottom: 0.34rem;
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(214, 199, 176, 0.72);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    letter-spacing: 0.02em;
    z-index: 2;
}
body.veo-generation-body .bottom-nav { display: none !important; }

/* Кнопка «Создать видео» в моб. листе (.btn-submit) — тот же фиолетовый стиль и блик, что у .veo-prompt-send */
body.veo-generation-body .btn-submit {
    position: relative;
    overflow: hidden !important;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.4) 0%, rgba(139, 92, 246, 0.25) 50%, rgba(109, 40, 217, 0.4) 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.6) !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    animation: veo-prompt-send-soft-pulse 2.5s ease-in-out infinite;
}
body.veo-generation-body .btn-submit::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: inherit;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.06) 35%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0.06) 65%, transparent 80%) !important;
    background-size: 220% 100% !important;
    background-position: 200% 0 !important;
    animation: veo-prompt-send-shimmer 3.8s ease-in-out infinite !important;
    transition: opacity 0.25s ease !important;
    pointer-events: none;
    z-index: 0;
    opacity: 0.75;
}
body.veo-generation-body .btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.5) 0%, rgba(139, 92, 246, 0.35) 50%, rgba(109, 40, 217, 0.5) 100%) !important;
    border-color: rgba(167, 139, 250, 0.95) !important;
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}
body.veo-generation-body .btn-submit:hover:not(:disabled)::before {
    opacity: 0.95 !important;
    left: 0 !important;
}
body.veo-generation-body .btn-submit:disabled::before {
    animation: none !important;
    opacity: 0 !important;
}
body.veo-generation-body .btn-submit .btn-submit-content {
    position: relative;
    z-index: 1;
}
body.veo-generation-body .btn-submit .btn-submit-row {
    font-size: inherit;
}
body.veo-generation-body .btn-submit .btn-submit-price {
    font-size: inherit !important;
    font-weight: inherit;
    color: inherit !important;
    text-shadow: none;
}

/* Мобильные карточки выбора — стиль как кнопка «Создать видео» */
body.veo-generation-body .aspect-ratio-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
}
body.veo-generation-body .aspect-ratio-card:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: rgba(99, 102, 241, 0.35);
}
body.veo-generation-body .aspect-ratio-card.selected {
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}
body.veo-generation-body .aspect-ratio-card.selected .aspect-ratio-icon {
    color: rgba(199, 210, 254, 1);
}
body.veo-generation-body .aspect-ratio-card.selected .aspect-ratio-radio {
    border-color: rgba(99, 102, 241, 0.8);
}
body.veo-generation-body .aspect-ratio-card.selected .radio-dot {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.5);
}

body.veo-generation-body .model-select-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
}
body.veo-generation-body .model-select-card:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: rgba(99, 102, 241, 0.35);
}
body.veo-generation-body .model-select-card.selected {
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}
body.veo-generation-body .model-select-card.selected .model-select-name {
    color: rgba(199, 210, 254, 1);
}

/* Блок ожидания отправки — работает и на mobile */
body.veo-generation-body .veo-pending-send {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 0.75rem auto;
    background: #15132a;
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 12px;
    max-width: 480px;
}
body.veo-generation-body .veo-pending-send-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    line-height: 1.4;
}
body.veo-generation-body .veo-pending-send-timer {
    font-size: 0.95rem;
    color: #00ff88;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.9), 0 0 16px rgba(0, 255, 136, 0.6);
}
body.veo-generation-body .veo-pending-send-count {
    color: #00ff88;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.9), 0 0 16px rgba(0, 255, 136, 0.6);
}
body.veo-generation-body .veo-pending-send-actions {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    width: 100%;
    min-height: 2.5rem;
}
body.veo-generation-body .veo-pending-send-actions button {
    flex-shrink: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
body.veo-generation-body .veo-pending-send-skip {
    display: inline-flex !important;
    padding: 0.5rem 1.25rem;
    min-width: 7rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #e9d5ff;
    background: rgba(139, 92, 246, 0.35);
    border: 1px solid rgba(139, 92, 246, 0.65);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.3), 0 0 0 1px rgba(167, 139, 250, 0.15) inset;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
body.veo-generation-body .veo-pending-send-skip:hover {
    background: rgba(139, 92, 246, 0.5);
    border-color: rgba(139, 92, 246, 0.85);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.45), 0 0 0 1px rgba(167, 139, 250, 0.25) inset;
}
body.veo-generation-body .veo-pending-send-cancel {
    padding: 0.5rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    min-width: 7rem;
    color: #fecaca;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.6);
    border-radius: 8px;
    cursor: pointer;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.8), 0 0 16px rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}
body.veo-generation-body .veo-pending-send-cancel:hover {
    background: rgba(239, 68, 68, 0.35);
    border-color: rgba(239, 68, 68, 0.85);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.2) inset;
}
.generation-form .veo-chat-status {
    align-self: stretch;
    max-width: none;
    background: #15132a;
    z-index: 5;
}
.generation-form .veo-chat-message-bubble {
    background: #15132a;
    z-index: 5;
}
.generation-form .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-result-with-toolbar) {
    background: transparent;
    border: none;
    width: fit-content;
    max-width: 100%;
}
.generation-form .veo-chat-message--assistant .veo-chat-message-bubble:has(.veo-chat-status--error) {
    background: transparent;
    border: none;
    padding-left: 0.85rem;
    padding-right: 0;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    min-width: 0;
    max-width: min(var(--veo-d-chat-video-16-9), 100%);
    width: fit-content;
}
.generation-form .veo-chat-message--user .veo-chat-message-bubble {
    background-color: #14122a;
    background-image: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    isolation: isolate;
    border-color: rgba(129, 140, 248, 0.55);
    box-shadow: 0 2px 14px rgba(15, 12, 41, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.generation-form .veo-pending-send {
    background: #15132a;
    z-index: 5;
    overflow: visible;
}
.generation-form .veo-pending-send .veo-pending-send-actions {
    display: flex !important;
    flex-wrap: nowrap;
}

/* Промпт в чате: копировать / удалить (десктоп и моб.) */
body.veo-generation-body .veo-user-message-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0.1rem;
}
body.veo-generation-body .veo-user-message-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.05rem;
}
body.veo-generation-body .veo-user-msg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(165, 180, 252, 0.88);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}
body.veo-generation-body .veo-user-msg-btn:hover {
    color: rgba(199, 210, 254, 0.98);
    background: rgba(99, 102, 241, 0.14);
}
body.veo-generation-body .veo-user-msg-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}
body.veo-generation-body .veo-user-msg-delete:hover {
    color: rgba(252, 165, 165, 0.95);
    background: rgba(239, 68, 68, 0.1);
}

/* Подсветка сообщения при автоскролле к готовому ролику */
@keyframes veo-result-focus-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.5), 0 4px 28px rgba(15, 12, 41, 0.45);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.55), 0 0 36px rgba(167, 139, 250, 0.4);
    }
}
body.veo-generation-body .veo-chat-message--assistant.veo-chat-message--result-focus .veo-chat-message-bubble {
    animation: veo-result-focus-pulse 1s ease-out 2;
    border-radius: 12px;
}

/* Toast «Видео готово!» — зелёный неон, единый стиль по всему сайту (переменные из main.css) */
.veo-video-ready-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--vf-ready-bg, linear-gradient(135deg, rgba(5, 46, 22, 0.95) 0%, rgba(6, 78, 27, 0.95) 100%));
    border: 1px solid var(--vf-ready-border, rgba(34, 197, 94, 0.6));
    border-radius: 12px;
    color: var(--vf-ready-text, #bbf7d0);
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: var(--vf-ready-glow, 0 4px 24px rgba(34, 197, 94, 0.4), 0 0 40px rgba(22, 163, 74, 0.25)), 0 0 0 1px rgba(34, 197, 94, 0.2) inset;
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.veo-video-ready-toast--visible {
    opacity: 1;
    transform: translateY(0);
}
.veo-video-ready-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(34, 197, 94, 0.3);
    border-radius: 50%;
    color: #4ade80;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.veo-video-ready-toast-link {
    color: var(--vf-ready-link, #6ee7b7);
    font-weight: 600;
    margin-left: 0.25rem;
}
.veo-video-ready-toast-link:hover {
    color: var(--vf-ready-link-hover, #86efac);
    text-decoration: underline;
}

/* Универсальный toast (настройки скопированы и т.п.) */
.veo-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 10080;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(15, 12, 41, 0.95) 100%);
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 10px;
    color: rgba(233, 213, 255, 0.95);
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.veo-toast--visible {
    opacity: 1;
    transform: translateY(0);
}
.veo-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    box-sizing: border-box;
    background: rgba(139, 92, 246, 0.4);
    border-radius: 50%;
    color: #c4b5fd;
    font-size: 0.85rem;
    font-weight: 700;
}
.veo-toast-icon-svg {
    width: 13px;
    height: 13px;
    display: block;
    flex-shrink: 0;
}
.veo-toast-text {
    font-weight: 500;
}
.veo-toast.veo-toast--warning {
    border-color: rgba(251, 191, 36, 0.45);
    box-shadow: 0 4px 22px rgba(251, 191, 36, 0.18);
}
.veo-toast.veo-toast--warning .veo-toast-icon {
    background: rgba(251, 191, 36, 0.22);
    color: #fde68a;
}

/* Выпадающее меню по клику на аватар (Veo) — тот же фиолетовый космический стиль, что панели валюты / моб. дропы */
.vf-user-menu-dropdown {
    min-width: 220px;
    max-width: min(300px, calc(100vw - 16px));
    padding: 0.55rem 0 0.65rem;
    background: linear-gradient(165deg, rgba(18, 14, 48, 0.98) 0%, rgba(12, 10, 28, 0.99) 45%, rgba(15, 12, 41, 1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(139, 92, 246, 0.18) inset, 0 0 32px rgba(99, 102, 241, 0.08);
    color-scheme: dark;
}
.vf-user-menu-time-block {
    padding: 0 0.55rem 0.45rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.22);
    margin-bottom: 0.25rem;
}
.vf-user-menu-time-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    /* общая вертикаль с компактным селектом */
    --vf-menu-tz-pad-y: 0.28rem;
}
.vf-user-menu-time-main {
    flex-shrink: 0;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.96);
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    padding: var(--vf-menu-tz-pad-y) 0;
    display: inline-flex;
    align-items: center;
}
/* Селект UTC — в тон панели (индиго, не серая «плашка») */
.vf-menu-tz-select {
    width: 100%;
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: rgba(30, 27, 75, 0.55);
    color: #fff;
    color-scheme: dark;
    cursor: pointer;
}
.vf-menu-tz-select option,
.vf-menu-tz-select optgroup {
    background: #1e1b4b;
    color: #fff;
}
.vf-menu-tz-select--compact {
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
    max-width: 6.85rem;
    padding: var(--vf-menu-tz-pad-y, 0.28rem) 0.4rem var(--vf-menu-tz-pad-y, 0.28rem) 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.4);
    background: rgba(30, 27, 75, 0.6);
    color: #fff;
    color-scheme: dark;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.vf-menu-tz-select--compact:focus {
    outline: none;
    border-color: rgba(167, 139, 250, 0.55);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.vf-menu-tz-select--compact,
.vf-menu-tz-select {
    accent-color: #a78bfa;
}
.vf-menu-tz-select--compact option {
    background: #1e1b4b;
    color: #fff;
    font-weight: 500;
}
.vf-user-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 0.35rem;
}
a.vf-user-menu-item,
span.vf-user-menu-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    font-size: 0.88rem;
    color: #fff;
    text-decoration: none;
    transition: background 0.15s ease;
}
a.vf-user-menu-item:hover {
    background: rgba(139, 92, 246, 0.22);
    color: #fff;
}
.vf-user-menu-nav a.vf-user-menu-item[hidden] {
    display: none !important;
}
.vf-user-menu-item--accent {
    font-weight: 600;
    color: #fff !important;
}
.vf-user-menu-item--logout {
    margin-top: 0.2rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(99, 102, 241, 0.22);
    color: rgba(252, 165, 165, 0.95) !important;
    font-size: 0.86rem;
}
a.vf-user-menu-item--logout:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca !important;
}
.vf-user-menu-item--muted {
    opacity: 0.55;
    cursor: default;
    font-size: 0.88rem;
}

/* Десктоп Veo: звёзды в чате — острые точки без radial-свечения (box-shadow) */
body.veo-generation-body:not(.mobile-version) .veo-chat-messages-wrap .veo-cosmic-stars .veo-cosmic-star,
body.veo-generation-body:not(.mobile-version) .veo-cosmic-stars-sides .veo-cosmic-star {
    box-shadow: none !important;
}
body.veo-generation-body:not(.mobile-version) .veo-chat-messages-wrap .veo-cosmic-stars .veo-cosmic-star--shoot,
body.veo-generation-body:not(.mobile-version) .veo-cosmic-stars-sides .veo-cosmic-star--shoot {
    box-shadow: none !important;
}
body.veo-generation-body:not(.mobile-version) .veo-chat-messages-wrap .veo-cosmic-stars .veo-cosmic-star--shoot::before,
body.veo-generation-body:not(.mobile-version) .veo-cosmic-stars-sides .veo-cosmic-star--shoot::before {
    box-shadow: none !important;
}

/* Десктоп Veo: убрать плавающие туманности (blur-орбы в main.css) — остаётся сплошной фон .veo-background-animation и звёзды */
body.veo-generation-body:not(.mobile-version) .veo-nebula-orb {
    display: none !important;
    visibility: hidden !important;
    animation: none !important;
}

/* Фон страницы — на html (fixed) в блоке @media выше; здесь только слой под звёздами */
body.veo-generation-body:not(.mobile-version) .veo-background-animation {
    background: linear-gradient(165deg, #010101 0%, #000000 55%, #000000 100%);
}

/* Центральная колонка чата — тот же тон, что у левой/правой панели; без боковых «полей» другого цвета */
body.veo-generation-body:not(.mobile-version) #veoChatArea.veo-center-area {
    background: rgba(10, 10, 15, 0.88);
    padding-left: 0;
    padding-right: 0;
}

/* Hide mobile-specific extend/upgrade UI on desktop */
body:not(.mobile-version) .veo-mobile-extend-upgrade-flow {
    display: none !important;
}

/* Wan 2.7 — длительность (ползунок + ввод), негативный промпт */
body.wan-page .wan27-duration-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}
body.wan-page .wan27-duration-slider {
    flex: 1;
    min-width: 140px;
    accent-color: #6366f1;
}
body.wan-page .wan27-duration-input {
    width: 52px;
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
    background: rgba(15, 12, 41, 0.88);
    border: 1px solid rgba(129, 140, 248, 0.45);
    color: #e0ddff;
    font-size: 0.88rem;
}
body.wan-page .wan27-duration-clear {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(30, 27, 75, 0.6);
    color: #c4b5fd;
    cursor: pointer;
    line-height: 1;
    font-size: 1rem;
}
body.wan-page .veo-wan-seed-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(15, 12, 41, 0.75);
    color: #e0ddff;
    padding: 0.5rem 0.65rem;
    font-size: 0.88rem;
    resize: none;
}
body.wan-page .veo-wan-neg-textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(15, 12, 41, 0.75);
    color: #e0ddff;
    padding: 0.5rem 0.65rem;
    font-size: 0.88rem;
    resize: vertical;
    min-height: 2.75rem;
    max-height: 8rem;
    overflow-x: hidden;
    overflow-y: auto;
}
body.wan-page #wanNegPromptRow {
    min-width: 0;
}

/* Wan / InfiniTalk: глобальный `#wanAudioInput` в конце body — визуально скрыт без display:none/pointer-events:none (иначе нет диалога файла). Без z-index < 0 — иначе часть браузеров не открывает диалог по label/click(). */
.vf-wan-audio-file-hidden {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    border: 0;
    padding: 0;
    margin: 0;
    z-index: 1;
}
body:is(.wan-page, .infinitalk-page) label.veo-photo-upload-option.vf-wan-audio-file-label {
    display: block;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

/* Wan / InfiniTalk: нота в панели промпта — тот же размер глифа, что фото и видео (Veo 3, 28×28) */
body:is(.wan-page, .infinitalk-page) .vf-music-note-svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: block;
}
body:is(.wan-page, .infinitalk-page) .vf-music-note-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}
/* InfiniteTalk: фото и аудио в одном ряду */
body.infinitalk-page:not(.mobile-version) .veo-prompt-control-left--photo-only {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.32rem;
    min-width: 0;
}
/* Wan 2.7 Text to Video: аудио опционально — лавандовая нота, фиолетовый 0/1, анимация dash */
body.wan-page .veo-wan-audio-upload-btn.vf-music-note-btn {
    position: relative;
    color: #a5b4fc;
}
body.wan-page .vf-music-note-svg {
    color: #a5b4fc;
}
body.wan-page .vf-music-note-path--a {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: vfMusicNoteDraw 2.4s ease-in-out infinite;
}
body.wan-page .vf-music-dot--a,
body.wan-page .vf-music-dot--b {
    animation: vfMusicDotPulse 1.5s ease-in-out infinite;
}
body.wan-page .vf-music-dot--b {
    animation-delay: 0.35s;
}
/* Wan: опциональное аудио — счётчик не «обязательный» красный */
body.wan-page .veo-wan-audio-upload-wrap .veo-photo-upload-counter {
    background: linear-gradient(135deg, #312e81 0%, #3730a3 50%, #4338ca 100%);
    border: 1px solid rgba(165, 180, 252, 0.42);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.36);
    color: rgba(224, 231, 255, 0.96);
}
/* InfiniTalk: аудио обязательно — как фото: красный 0/1 (общие .veo-photo-upload-wrap--control-bar), зелёный при 1/1 */
body.infinitalk-page .veo-wan-audio-upload-wrap.veo-photo-upload-wrap--control-bar:not(.veo-photo-upload-wrap--quota-complete) .vf-music-note-svg {
    color: #f87171;
    animation: veo-photo-upload-img-pulse-red 2.2s ease-in-out infinite;
}
body.infinitalk-page .veo-wan-audio-upload-wrap.veo-photo-upload-wrap--control-bar:not(.veo-photo-upload-wrap--quota-complete) .vf-music-note-path--a {
    animation: none;
    stroke-dashoffset: 0;
    stroke-dasharray: 1 0;
    opacity: 1;
}
body.infinitalk-page .veo-wan-audio-upload-wrap.veo-photo-upload-wrap--control-bar:not(.veo-photo-upload-wrap--quota-complete) .vf-music-dot--a,
body.infinitalk-page .veo-wan-audio-upload-wrap.veo-photo-upload-wrap--control-bar:not(.veo-photo-upload-wrap--quota-complete) .vf-music-dot--b {
    animation: none;
    opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
    body.infinitalk-page .veo-wan-audio-upload-wrap.veo-photo-upload-wrap--control-bar:not(.veo-photo-upload-wrap--quota-complete) .vf-music-note-svg {
        animation: none !important;
        filter: none;
    }
}
/* Трек выбран — зелёный как у фото (Wan / InfiniTalk) */
body:is(.wan-page, .infinitalk-page) .veo-wan-audio-upload-wrap.veo-photo-upload-wrap--quota-complete .vf-music-note-svg {
    animation: veo-photo-upload-img-pulse-green 2.2s ease-in-out infinite;
    color: #86efac;
}
body:is(.wan-page, .infinitalk-page) .veo-wan-audio-upload-wrap.veo-photo-upload-wrap--quota-complete .veo-wan-audio-upload-btn {
    color: #4ade80;
}
@keyframes vfMusicNoteDraw {
    0% { stroke-dashoffset: 1; opacity: 0.65; }
    45% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0.75; }
}
@keyframes vfMusicDotPulse {
    0%, 100% { opacity: 0.55; transform: scale(0.92); }
    50% { opacity: 1; transform: scale(1); }
}
