/* Мастер-форма генерации видео (/video/*): Material 3 + glassmorphism,
   кнопки и заголовки — в общем стиле сервиса (токены как в imgedit.css).

   Принципы (лучшие практики многошаговых форм):
   один вопрос на экран, индикатор прогресса по центру, навигация стрелками
   по бокам на одной линии с контентом, стабильная высота формы без скачков. */

:root {
    --vd-accent: #0d6efd;
    --vd-accent-soft: rgba(13, 110, 253, 0.12);
    --vd-accent-soft-2: rgba(13, 110, 253, 0.22);
    --vd-glass-bg: rgba(255, 255, 255, 0.55);
    --vd-glass-bg-strong: rgba(255, 255, 255, 0.72);
    --vd-glass-border: rgba(255, 255, 255, 0.65);
    --vd-shadow: 0 18px 48px rgba(18, 38, 63, 0.12);
    --vd-shadow-soft: 0 8px 24px rgba(18, 38, 63, 0.08);
    --vd-muted: #6b7280;
    --vd-radius: 1rem;
}

.vd-workspace {
    display: flex; flex-direction: column; gap: 22px;
    padding: 30px 28px 34px !important;
    margin: 10px 0 46px;
}

/* Атрибут hidden должен побеждать наши display:flex у внутренних блоков */
.vd-workspace [hidden], .vd-modal[hidden], .vd-toast[hidden] { display: none !important; }

/* ── Liquid-переходы состояний и шагов ── */
.vd-stage,
.vd-step {
    transition: opacity .45s cubic-bezier(.22, 1, .36, 1),
                transform .45s cubic-bezier(.22, 1, .36, 1),
                filter .45s ease;
    will-change: opacity, transform;
}
.vd-stage-enter { opacity: 0; transform: translateY(16px) scale(.985); filter: blur(6px); }
.vd-stage-leave { opacity: 0; transform: translateY(-12px) scale(.985); filter: blur(6px); pointer-events: none; }

.vd-step { display: none; width: 100%; }
.vd-step.is-active { display: block; animation: vd-step-in .45s cubic-bezier(.22, 1, .36, 1); }
@keyframes vd-step-in {
    from { opacity: 0; transform: translateX(26px); filter: blur(5px); }
    to   { opacity: 1; transform: none; filter: none; }
}
.vd-step.is-back.is-active { animation-name: vd-step-back; }
@keyframes vd-step-back {
    from { opacity: 0; transform: translateX(-26px); filter: blur(5px); }
    to   { opacity: 1; transform: none; filter: none; }
}

/* ── Индикатор шагов: внизу формы, по центру, компактный ── */
.vd-steps {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    list-style: none; margin: 26px 0 0; padding: 0;
    flex-wrap: wrap;
}
.vd-steps li { display: flex; align-items: center; gap: 4px; }
.vd-steps li:not(:last-child)::after {
    content: ""; width: 20px; height: 2px; border-radius: 2px;
    background: var(--vd-accent-soft-2); margin: 0 2px;
    transition: background .3s ease;
}
.vd-steps li.is-done:not(:last-child)::after { background: var(--vd-accent); }
.vd-step-pill {
    display: inline-flex; align-items: center; gap: 7px;
    border: 0; padding: 5px 12px 5px 6px; border-radius: 999px;
    background: var(--vd-glass-bg);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: var(--vd-shadow-soft);
    font-size: .8rem; font-weight: 600; color: var(--vd-muted);
    cursor: default;
    transition: color .25s, background .25s, transform .25s cubic-bezier(.22,1,.36,1);
}
.vd-step-pill .vd-step-num {
    width: 20px; height: 20px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--vd-accent-soft); color: var(--vd-accent);
    font-size: .74rem; font-weight: 700;
    transition: background .25s, color .25s;
}
li.is-active .vd-step-pill { color: #1f2937; background: var(--vd-glass-bg-strong); }
li.is-active .vd-step-pill .vd-step-num { background: var(--vd-accent); color: #fff; }
li.is-done .vd-step-pill { color: #1f2937; cursor: pointer; }
li.is-done .vd-step-pill:hover { transform: translateY(-1px); }
li.is-done .vd-step-pill .vd-step-num { background: var(--vd-accent); color: #fff; }
li.is-done .vd-step-pill .vd-step-num::before { content: "✓"; }
li.is-done .vd-step-pill .vd-step-num span { display: none; }

/* ── Тело мастера: контент + стрелки по бокам на одной линии ── */
/* z-index: пилюли шагов (backdrop-filter => stacking context) идут в DOM позже
   тела мастера и перекрывали выпадающий селект — поднимаем тело над ними */
.vd-body { position: relative; z-index: 20; }
.vd-steps { position: relative; z-index: 1; }
.vd-panels {
    min-height: 340px;
    display: flex; align-items: center;
    padding: 0 56px;
    max-width: 720px; margin: 0 auto;
}
.vd-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 46px; height: 46px; border: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; cursor: pointer; z-index: 5;
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: var(--vd-shadow-soft);
    transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .3s, background .25s;
}
.vd-arrow:hover { transform: translateY(-50%) scale(1.07); box-shadow: var(--vd-shadow); }
.vd-arrow-back { left: 0; background: var(--vd-glass-bg-strong); color: #374151; }
.vd-arrow-next { right: 0; background: var(--vd-accent); color: #fff; }
.vd-arrow-next:hover { background: #0b5ed7; }

/* ── Заголовок шага и подсказки ── */
.vd-step-title {
    font-weight: 700; font-size: 1.08rem; color: #1f2937;
    margin-bottom: 18px; display: flex; align-items: center; justify-content: center; gap: 8px;
    text-align: center;
}
.vd-hint {
    position: relative; border: 0; background: none; padding: 2px;
    color: var(--vd-muted); font-size: .95rem; cursor: pointer;
    transition: color .2s;
}
.vd-hint:hover, .vd-hint:focus-visible { color: var(--vd-accent); }
.vd-hint-pop {
    /* display:none, а не opacity: скрытый absolute-блок шириной 320px иначе
       раздувает scrollWidth и даёт горизонтальный скролл на мобильных */
    display: none;
    position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%);
    width: min(320px, 82vw); max-width: calc(100vw - 24px);
    padding: 12px 14px; border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border: 1px solid var(--vd-glass-border);
    box-shadow: var(--vd-shadow);
    color: #374151; font-size: .84rem; font-weight: 400; line-height: 1.45; text-align: left;
    z-index: 30;
}
.vd-hint:hover .vd-hint-pop, .vd-hint:focus-visible .vd-hint-pop, .vd-hint.is-open .vd-hint-pop {
    display: block;
    animation: vd-pop-in .25s cubic-bezier(.22, 1, .36, 1);
}
@keyframes vd-pop-in {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Шаг «как будем генерировать» ── */
.vd-source-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vd-source-card {
    border: 1.5px solid transparent; border-radius: var(--vd-radius);
    background: var(--vd-glass-bg);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    box-shadow: var(--vd-shadow-soft);
    padding: 26px 20px; text-align: center; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 9px;
    transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .3s, border-color .25s, background .25s;
}
.vd-source-card:hover { transform: translateY(-2px); box-shadow: var(--vd-shadow); background: var(--vd-glass-bg-strong); }
.vd-source-card.is-selected { border-color: var(--vd-accent); background: linear-gradient(180deg, var(--vd-accent-soft), var(--vd-glass-bg-strong)); }
.vd-source-icon {
    width: 52px; height: 52px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    background: var(--vd-accent-soft); color: var(--vd-accent); font-size: 1.35rem;
}
.vd-source-name { font-weight: 700; color: #1f2937; }
.vd-source-desc { font-size: .85rem; color: var(--vd-muted); line-height: 1.4; }

/* ── Дропзона ── */
.vd-dropzone {
    border-radius: var(--vd-radius); padding: 30px 22px;
    background: var(--vd-glass-bg);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border: 1.5px dashed rgba(13, 110, 253, 0.35);
    box-shadow: var(--vd-shadow-soft); cursor: pointer; outline: none;
    transition: border-color .25s, background .25s, box-shadow .3s, transform .25s cubic-bezier(.22,1,.36,1);
}
.vd-dropzone:hover, .vd-dropzone:focus-visible {
    border-color: var(--vd-accent); background: var(--vd-glass-bg-strong); box-shadow: var(--vd-shadow);
}
.vd-dropzone.dragover {
    border-color: var(--vd-accent); border-style: solid;
    background: linear-gradient(180deg, var(--vd-accent-soft), var(--vd-glass-bg-strong));
    transform: translateY(-2px) scale(1.004); box-shadow: var(--vd-shadow);
}
.vd-dropzone-empty { text-align: center; }
.vd-dropzone-icon { font-size: 1.9rem; color: var(--vd-accent); margin-bottom: 8px; }
.vd-dropzone-title { font-weight: 700; color: #1f2937; }
.vd-dropzone-hint { color: var(--vd-muted); font-size: .87rem; margin-top: 4px; }
.vd-dropzone-empty .vd-ghost-btn { margin-top: 12px; }
.vd-link { color: var(--vd-accent); text-decoration: underline; cursor: pointer; }

.vd-files { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.vd-file-card {
    position: relative; width: 108px;
    border-radius: 14px; overflow: hidden;
    box-shadow: var(--vd-shadow-soft); background: #fff;
    animation: vd-step-in .35s cubic-bezier(.22,1,.36,1);
}
.vd-file-card img { width: 108px; height: 108px; object-fit: cover; display: block; cursor: zoom-in; }
.vd-file-x {
    position: absolute; top: 6px; right: 6px;
    width: 24px; height: 24px; border: 0; border-radius: 50%;
    background: rgba(17, 24, 39, .55); color: #fff; font-size: .75rem;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: background .2s;
}
.vd-file-x:hover { background: rgba(220, 53, 69, .85); }
.vd-file-main {
    position: absolute; left: 6px; top: 6px;
    padding: 3px 8px; border-radius: 999px; border: 0;
    font-size: .68rem; font-weight: 700;
    background: rgba(255, 255, 255, .85); color: var(--vd-muted); cursor: pointer;
    transition: background .2s, color .2s;
}
.vd-file-card.is-main .vd-file-main { background: var(--vd-accent); color: #fff; }
.vd-add-more {
    width: 108px; height: 108px; border-radius: 14px;
    border: 1.5px dashed rgba(13, 110, 253, .4); background: none;
    color: var(--vd-accent); font-size: 1.3rem; cursor: pointer;
    transition: background .2s, border-color .2s;
}
.vd-add-more:hover { background: var(--vd-accent-soft); border-color: var(--vd-accent); }

/* Плейсхолдер, пока нейросеть рисует кадр */
.vd-file-loading {
    width: 108px; height: 108px; border-radius: 14px;
    background: linear-gradient(110deg, var(--vd-accent-soft) 8%, rgba(13,110,253,.22) 18%, var(--vd-accent-soft) 33%);
    background-size: 200% 100%;
    animation: vd-shimmer 1.4s linear infinite;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    color: var(--vd-accent); font-size: .68rem; font-weight: 700; text-align: center;
}
.vd-file-loading .vd-spinner {
    width: 22px; height: 22px; border-radius: 50%;
    border: 3px solid var(--vd-accent-soft-2); border-top-color: var(--vd-accent);
    animation: vd-spin .8s linear infinite;
}
@keyframes vd-spin { to { transform: rotate(360deg); } }
@keyframes vd-shimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }

/* ── Два слота «первый кадр -> последний кадр» (страницы two_frames) ── */
.vd-slots {
    display: flex; align-items: stretch; justify-content: center; gap: 10px;
}
.vd-slot {
    position: relative; flex: 0 1 264px; min-height: 196px;
    border-radius: var(--vd-radius); padding: 12px;
    background: var(--vd-glass-bg);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border: 1.5px dashed rgba(13, 110, 253, 0.35);
    box-shadow: var(--vd-shadow-soft); outline: none;
    display: flex; flex-direction: column; gap: 8px;
    transition: border-color .25s, background .25s, box-shadow .3s, transform .25s cubic-bezier(.22,1,.36,1);
}
#vd-slot-first { cursor: pointer; }
#vd-slot-first:hover, #vd-slot-first:focus-visible, .vd-slot.dragover {
    border-color: var(--vd-accent); background: var(--vd-glass-bg-strong); box-shadow: var(--vd-shadow);
}
.vd-slot.is-filled { border-style: solid; border-color: rgba(13, 110, 253, 0.25); cursor: default; }
.vd-slot-label {
    font-size: .78rem; font-weight: 700; color: var(--vd-muted);
    text-transform: uppercase; letter-spacing: .04em; text-align: center;
}
.vd-slot-empty {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; text-align: center;
}
.vd-slot-hint { color: var(--vd-muted); font-size: .82rem; line-height: 1.4; }
.vd-slot-choice {
    flex: 1; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 10px;
}
.vd-slot-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid rgba(13, 110, 253, .3); border-radius: 999px;
    background: var(--vd-glass-bg-strong); color: var(--vd-accent);
    padding: 9px 12px; font-size: .84rem; font-weight: 600; cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s cubic-bezier(.22,1,.36,1);
}
.vd-slot-btn:hover { background: var(--vd-accent-soft); border-color: var(--vd-accent); transform: translateY(-1px); }
.vd-slot-btn-accent { background: var(--vd-accent); color: #fff; border-color: var(--vd-accent); }
.vd-slot-btn-accent:hover { background: #0b5ed7; color: #fff; }
.vd-slot-loading {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    color: var(--vd-accent); font-size: .82rem; font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(110deg, var(--vd-accent-soft) 8%, rgba(13,110,253,.22) 18%, var(--vd-accent-soft) 33%);
    background-size: 200% 100%;
    animation: vd-shimmer 1.4s linear infinite;
}
.vd-slot-filled { position: relative; flex: 1; border-radius: 12px; overflow: hidden; }
.vd-slot-filled img {
    width: 100%; height: 100%; min-height: 140px; object-fit: cover; display: block; cursor: zoom-in;
}
.vd-slot-badge {
    position: absolute; left: 8px; bottom: 8px;
    padding: 3px 9px; border-radius: 999px;
    font-size: .68rem; font-weight: 700;
    background: rgba(255, 255, 255, .88); color: var(--vd-accent);
}
.vd-slot-arrow {
    align-self: center; color: var(--vd-accent); font-size: 1.2rem; opacity: .7;
}
.vd-swap {
    position: absolute; left: 50%; top: 12px; transform: translateX(-50%);
    width: 34px; height: 34px; border: 0; border-radius: 50%; z-index: 6;
    background: var(--vd-glass-bg-strong); color: var(--vd-accent);
    box-shadow: var(--vd-shadow-soft); cursor: pointer; font-size: .82rem;
    display: flex; align-items: center; justify-content: center;
    transition: transform .25s cubic-bezier(.22,1,.36,1), background .2s;
}
.vd-swap:hover { transform: translateX(-50%) scale(1.08); background: var(--vd-accent-soft); }
.vd-slots { position: relative; }

/* ── Кнопка «Сгенерировать фото» ── */
.vd-genframe-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.vd-ghost-btn {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid rgba(13, 110, 253, .3); border-radius: 999px;
    background: var(--vd-glass-bg); color: var(--vd-accent);
    padding: 9px 16px; font-size: .88rem; font-weight: 600; cursor: pointer;
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    transition: background .25s, border-color .25s, transform .25s cubic-bezier(.22,1,.36,1);
}
.vd-ghost-btn:hover:not(:disabled) { background: var(--vd-accent-soft); border-color: var(--vd-accent); transform: translateY(-1px); }
.vd-ghost-btn:disabled { opacity: .55; cursor: default; }

/* ── Описание сцены ── */
.vd-query-wrap { position: relative; }
.vd-textarea {
    width: 100%; border-radius: var(--vd-radius);
    border: 1px solid var(--vd-glass-border);
    background: var(--vd-glass-bg-strong);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: var(--vd-shadow-soft);
    padding: 14px 16px 26px; font-size: .95rem; color: #1f2937;
    resize: vertical; outline: none;
    transition: box-shadow .25s, border-color .25s;
}
.vd-textarea:focus { border-color: var(--vd-accent); box-shadow: 0 0 0 4px var(--vd-accent-soft), var(--vd-shadow-soft); }
.vd-counter {
    position: absolute; right: 12px; bottom: 10px;
    font-size: .74rem; color: var(--vd-muted); pointer-events: none;
}
.vd-chips-caption { margin: 16px 0 8px; font-size: .84rem; color: var(--vd-muted); }
.vd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* Без backdrop-filter: на мобильных он растрирует слой и мылит текст чипа */
.vd-chip {
    border: 1px solid rgba(13, 110, 253, .25); border-radius: 999px;
    background: #fff; color: #374151;
    padding: 7px 14px; font-size: .84rem; font-weight: 600; cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s cubic-bezier(.22,1,.36,1);
}
.vd-chip:hover { background: var(--vd-accent-soft); border-color: var(--vd-accent); transform: translateY(-1px); }

/* ── Параметры ── */
.vd-params {
    display: flex; flex-direction: column; gap: 30px;
    max-width: 480px; margin: 0 auto;
}
.vd-field-label {
    display: flex; align-items: baseline; justify-content: space-between;
    font-weight: 600; font-size: .92rem; color: #374151; margin-bottom: 8px;
}
.vd-seconds-out { color: var(--vd-accent); font-weight: 700; }
.vd-range { width: 100%; accent-color: var(--vd-accent); height: 34px; }
.vd-range-scale { display: flex; justify-content: space-between; font-size: .76rem; color: var(--vd-muted); margin-top: 2px; }

.vd-select { position: relative; }
.vd-select-btn {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border: 1px solid var(--vd-glass-border); border-radius: var(--vd-radius);
    background: var(--vd-glass-bg-strong);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: var(--vd-shadow-soft);
    padding: 11px 16px; font-size: .92rem; color: #1f2937; cursor: pointer;
    transition: border-color .25s, box-shadow .25s;
}
.vd-select-btn:hover, .vd-select-btn[aria-expanded="true"] { border-color: var(--vd-accent); }
.vd-select-current { display: flex; align-items: center; gap: 10px; }
.vd-select-menu {
    position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 8px);
    border-radius: var(--vd-radius); padding: 6px;
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    backdrop-filter: saturate(180%) blur(22px);
    border: 1px solid var(--vd-glass-border); box-shadow: var(--vd-shadow);
    max-height: 320px; overflow: auto;
    animation: vd-step-in .25s cubic-bezier(.22,1,.36,1);
}
.vd-option {
    width: 100%; display: flex; align-items: center; gap: 10px;
    border: 0; border-radius: 12px; background: none;
    padding: 9px 10px; font-size: .9rem; color: #1f2937; cursor: pointer; text-align: left;
    transition: background .18s;
}
.vd-option:hover { background: var(--vd-accent-soft); }
.vd-option[hidden] { display: none; }
.vd-option-label { flex: 1; }
.vd-option-dims { font-size: .78rem; color: var(--vd-muted); }
.vd-option-check { opacity: 0; color: var(--vd-accent); font-size: .8rem; }
.vd-option.is-selected .vd-option-check { opacity: 1; }
.vd-aspect-icon { width: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--vd-accent); }
.vd-aspect-rect { display: inline-block; border: 2px solid var(--vd-accent); border-radius: 3px; }
.vd-res-hint { font-size: .8rem; color: var(--vd-muted); margin-top: 6px; min-height: 1.1em; }

/* ── Тумблер «показать превращение» ── */
.vd-transform-row {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 22px auto 0; max-width: 480px;
}
.vd-check {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: .92rem; font-weight: 600; color: #374151; cursor: pointer;
    margin: 0;
}
.vd-check input { display: none; }
.vd-check-box {
    width: 22px; height: 22px; border-radius: 7px;
    border: 1.5px solid rgba(13, 110, 253, .4);
    background: var(--vd-glass-bg-strong);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: .7rem;
    transition: background .2s, border-color .2s;
}
.vd-check-box i { opacity: 0; transition: opacity .15s; }
.vd-check input:checked + .vd-check-box { background: var(--vd-accent); border-color: var(--vd-accent); }
.vd-check input:checked + .vd-check-box i { opacity: 1; }

.vd-summary {
    margin: 22px auto 0; max-width: 480px;
    padding: 12px 16px; border-radius: var(--vd-radius);
    background: var(--vd-accent-soft); color: #1f2937; font-size: .9rem; text-align: center;
}
/* два класса в селекторе: перебиваем display:inline-flex из .write-submit-btn
   (common.css), из-за которого auto-маргины не работали и кнопка липла влево */
.vd-workspace .vd-submit { margin: 18px auto 0; display: flex; max-width: 480px; width: 100%; }

/* ── Тост-предупреждение и подсветка незаполненного поля ── */
.vd-toast {
    position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
    z-index: 1090; max-width: min(440px, calc(100vw - 24px));
    display: flex; align-items: flex-start; gap: 10px;
    padding: 13px 18px; border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 193, 7, .55);
    box-shadow: var(--vd-shadow);
    color: #5c4a03; font-size: .9rem; font-weight: 500; line-height: 1.4;
    cursor: pointer;
    animation: vd-toast-in .35s cubic-bezier(.22,1,.36,1);
}
.vd-toast i { color: #d39e00; margin-top: 2px; }
@keyframes vd-toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-14px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.vd-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, .15), var(--vd-shadow-soft) !important;
    animation: vd-shake .4s cubic-bezier(.36,.07,.19,.97);
}
@keyframes vd-shake {
    10%, 90% { transform: translateX(-2px); }
    30%, 70% { transform: translateX(4px); }
    50%      { transform: translateX(-4px); }
}

/* ── Модалки (генерация кадра, просмотр фото) ── */
.vd-modal { position: fixed; inset: 0; z-index: 1060; display: flex; align-items: center; justify-content: center; padding: 18px; }
.vd-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, .45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: vd-fade-in .25s ease;
}
@keyframes vd-fade-in { from { opacity: 0; } to { opacity: 1; } }
.vd-modal-card {
    position: relative; width: min(560px, 100%);
    border-radius: 20px; padding: 26px 24px;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid var(--vd-glass-border); box-shadow: var(--vd-shadow);
    animation: vd-modal-in .35s cubic-bezier(.22,1,.36,1);
}
@keyframes vd-modal-in {
    from { opacity: 0; transform: translateY(22px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
.vd-modal-x {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px; border: 0; border-radius: 50%;
    background: rgba(17, 24, 39, .08); color: #374151;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: background .2s;
}
.vd-modal-x:hover { background: rgba(17, 24, 39, .16); }
.vd-modal-title { font-weight: 700; font-size: 1.05rem; color: #1f2937; padding-right: 34px; }
.vd-modal-sub { color: var(--vd-muted); font-size: .87rem; line-height: 1.45; margin: 6px 0 14px; }
.vd-modal-go { margin-top: 12px; width: 100%; }

.vd-lightbox { z-index: 1070; }
/* подложка с запасом за края: при эмуляции/дробном DPR слой вьюпорта
   округляется и справа/снизу оставалась белая полоска 1-2px */
.vd-lightbox .vd-modal-backdrop { inset: -2px; background: rgba(10, 14, 24, .82); }
.vd-lightbox-img {
    position: relative; max-width: 94vw; max-height: 88vh;
    border-radius: 14px; box-shadow: var(--vd-shadow);
    /* фон в тон подложки: дробные размеры на мобильных дают щель 1-2px
       у правого/нижнего края — с тёмным фоном она не видна */
    background: #0a0e18;
    animation: vd-modal-in .3s cubic-bezier(.22,1,.36,1);
}
.vd-lightbox-x { position: fixed; top: 18px; right: 18px; background: rgba(255,255,255,.16); color: #fff; }
.vd-lightbox-x:hover { background: rgba(255,255,255,.3); }

/* ── Ожидание ── */
.vd-wait {
    min-height: 380px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 16px; padding: 28px 18px; text-align: center;
}
.vd-frame-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vd-frame-img {
    max-height: 220px; max-width: min(420px, 100%); border-radius: 14px;
    box-shadow: var(--vd-shadow);
    animation: vd-step-in .5s cubic-bezier(.22,1,.36,1);
}
.vd-frame-caption { font-size: .84rem; color: var(--vd-muted); }
.vd-wait-orb { display: flex; gap: 10px; align-items: center; height: 46px; }
.vd-wait-orb span {
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--vd-accent);
    animation: vd-orb 1.15s ease-in-out infinite;
}
.vd-wait-orb span:nth-child(2) { animation-delay: .18s; opacity: .75; }
.vd-wait-orb span:nth-child(3) { animation-delay: .36s; opacity: .5; }
@keyframes vd-orb {
    0%, 100% { transform: translateY(0) scale(1); }
    45%      { transform: translateY(-12px) scale(1.12); }
}
.vd-wait-stage { font-weight: 700; font-size: 1.02rem; color: #1f2937; }
.vd-wait-stage::after {
    content: ""; display: inline-block; width: 1.2em; text-align: left;
    animation: vd-dots 1.6s steps(4) infinite;
}
@keyframes vd-dots {
    0%  { content: ""; }
    25% { content: "."; }
    50% { content: ".."; }
    75% { content: "..."; }
}
.vd-progress {
    width: min(420px, 100%); height: 8px; border-radius: 999px;
    background: var(--vd-accent-soft); overflow: hidden;
}
.vd-progress-bar {
    height: 100%; width: 0; border-radius: 999px;
    background: linear-gradient(90deg, var(--vd-accent) 30%, #7db4ff 50%, var(--vd-accent) 70%);
    background-size: 200% 100%;
    /* позиция убывает -> блик едет слева направо */
    animation: vd-shimmer 1.5s linear infinite;
    transition: width .6s cubic-bezier(.22,1,.36,1);
}
.vd-wait-meta {
    display: flex; gap: 12px; align-items: baseline; justify-content: center; flex-wrap: wrap;
    font-size: .88rem; color: var(--vd-muted);
}
.vd-wait-meta #vd-percent { font-weight: 700; color: var(--vd-accent); }

/* ── Готовое видео: отдельная карточка под формой ── */
.vd-done { text-align: center; }
.vd-done-title {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-size: 1.25rem; font-weight: 800; color: #1f2937; margin: 0 0 6px;
}
.vd-done-title i { color: #16a34a; }

/* ── Результат ── */
.vd-result { text-align: center; }
.vd-demo-note {
    margin: 16px auto 0; max-width: 560px;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 18px 20px; border-radius: var(--vd-radius);
    background: var(--vd-accent-soft);
    border: 1px solid rgba(13, 110, 253, .18);
}
.vd-demo-note-text { color: #374151; font-size: .92rem; line-height: 1.5; }
.vd-demo-pro {
    display: inline-flex; align-items: center; gap: 9px;
    border: 0; border-radius: 999px; padding: 11px 26px;
    background: linear-gradient(135deg, var(--vd-accent), #6ea8fe);
    color: #fff; font-weight: 700; font-size: .95rem; cursor: pointer;
    box-shadow: 0 10px 26px rgba(13, 110, 253, .35);
    transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .3s;
}
.vd-demo-pro:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(13, 110, 253, .45); }
.vd-video {
    width: 100%; max-height: 480px; border-radius: var(--vd-radius);
    box-shadow: var(--vd-shadow); background: #000; display: block;
}
.vd-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.vd-act {
    display: inline-flex; align-items: center; gap: 9px;
    border: 0; border-radius: 999px; padding: 11px 18px;
    background: var(--vd-glass-bg); color: #1f2937; font-weight: 600; font-size: .9rem;
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: var(--vd-shadow-soft); cursor: pointer; text-decoration: none;
    transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .3s, background .25s;
}
.vd-act:hover { transform: translateY(-1px); box-shadow: var(--vd-shadow); color: #1f2937; }
.vd-act-primary { background: var(--vd-accent); color: #fff; }
.vd-act-primary:hover { background: #0b5ed7; color: #fff; }
.vd-act-col { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.vd-act-sub { font-size: .68rem; font-weight: 400; opacity: .75; }
.vd-error {
    padding: 14px 18px; border-radius: var(--vd-radius);
    background: rgba(255, 193, 7, .14); border: 1px solid rgba(255, 193, 7, .4);
    color: #664d03; font-size: .92rem; text-align: center;
}

/* ── Плашка «попытки закончились» ── */
.vd-paywall {
    min-height: 380px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 14px; padding: 34px 20px; text-align: center;
}
.vd-paywall-icon {
    width: 72px; height: 72px; border-radius: 24px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--vd-accent), #6ea8fe);
    color: #fff; font-size: 1.7rem;
    box-shadow: 0 14px 34px rgba(13, 110, 253, .35);
}
.vd-paywall-title { font-weight: 800; font-size: 1.35rem; color: #1f2937; }
.vd-paywall-text { color: #4b5563; font-size: .95rem; line-height: 1.55; max-width: 430px; }
.vd-paywall-cta {
    margin-top: 6px; padding: 12px 34px !important;
    font-size: 1rem !important; font-weight: 700 !important;
    box-shadow: 0 12px 30px rgba(13, 110, 253, .35);
}
.vd-paywall-sub { color: var(--vd-muted); font-size: .82rem; }
.vd-back-link {
    border: 0; background: none; margin-top: 4px;
    color: var(--vd-muted); font-size: .85rem; text-decoration: underline; cursor: pointer;
    transition: color .2s;
}
.vd-back-link:hover { color: var(--vd-accent); }

/* ── Мобильная раскладка ── */
@media (max-width: 640px) {
    .vd-workspace { padding: 20px 12px 26px !important; margin-bottom: 30px; }
    .vd-source-cards { grid-template-columns: 1fr; }
    .vd-panels { padding: 0 42px; min-height: 300px; }
    .vd-arrow { width: 38px; height: 38px; font-size: .9rem; }
    .vd-steps li:not(:last-child)::after { width: 10px; }
    .vd-step-pill { padding: 5px 9px 5px 5px; font-size: .74rem; }
    .vd-step-pill .vd-step-label { display: none; }
    li.is-active .vd-step-pill .vd-step-label { display: inline; }
    .vd-file-card, .vd-file-card img, .vd-add-more, .vd-file-loading { width: 88px; }
    .vd-file-card img, .vd-add-more, .vd-file-loading { height: 88px; }
    .vd-wait { min-height: 320px; }
    .vd-slots { flex-direction: column; align-items: stretch; }
    .vd-slot { flex-basis: auto; min-height: 150px; }
    .vd-slot-arrow { transform: rotate(90deg); }
    .vd-swap { top: 50%; transform: translate(-50%, -50%); }
    .vd-swap:hover { transform: translate(-50%, -50%) scale(1.08); }
}

/* ═══ Навигация по дереву страниц: крошки, каталог, похожие ═══
   Точная копия ie-* блоков из imgedit.css (единый вид навигации по сайту).
   При правках синхронизировать с imgedit.css. Переменные ie-* дублируем:
   video.css живёт без imgedit.css. */

:root {
    --ie-accent: #0d6efd;
    --ie-accent-soft: rgba(13, 110, 253, 0.12);
    --ie-glass-bg: rgba(255, 255, 255, 0.55);
    --ie-glass-bg-strong: rgba(255, 255, 255, 0.72);
    --ie-glass-border: rgba(255, 255, 255, 0.65);
    --ie-shadow: 0 18px 48px rgba(18, 38, 63, 0.12);
    --ie-shadow-soft: 0 8px 24px rgba(18, 38, 63, 0.08);
    --ie-text-muted: #6b7280;
    --ie-radius: 1rem;
}

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.ie-act-sub {
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    color: var(--ie-text-muted);
}

@media (max-width: 480px) {
    .ie-actions { gap: 8px; }
    .ie-act { height: 42px; padding: 0 15px; font-size: 13.5px; gap: 7px; }
}

/* ─── Каталог /image-edit ──────────────────────────────────────────────── */

.ie-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding-top: 12px;
}

.ie-catalog-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 18px;
    background: var(--ie-glass-bg-strong);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--ie-glass-border);
    box-shadow: var(--ie-shadow-soft);
    color: #1f2937;
    text-decoration: none;
    transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease;
}

a.ie-catalog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ie-shadow);
    color: #1f2937;
}

.ie-catalog-card__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--ie-accent);
    background: var(--ie-accent-soft);
    font-size: 22px;
    line-height: 1;
}

.ie-catalog-card__name { flex: 1; font-weight: 600; font-size: 15px; }
.ie-catalog-card__arrow { color: var(--ie-accent); opacity: .7; }

.ie-catalog-card--soon {
    cursor: default;
    opacity: .72;
}

.ie-soon-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #9aa3af;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 10px;
    border-radius: 999px;
}

/* ─── Навигация: хлебные крошки ─────────────────────────────────────────── */

.ie-crumbs { margin: 2px 0 10px; }

.ie-crumbs-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
}

.ie-crumb {
    display: flex;
    align-items: center;
    gap: 2px;
}

.ie-crumb + .ie-crumb::before {
    content: "›";
    margin-right: 6px;
    color: #b6bec9;
    font-size: 15px;
    line-height: 1;
}

.ie-crumb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--ie-text-muted);
    background: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.ie-crumb-link:hover {
    color: var(--ie-accent);
    background: var(--ie-accent-soft);
    border-color: var(--ie-glass-border);
}

.ie-crumb-emoji { font-size: 14px; line-height: 1; }

/* Сегмент с выпадающим списком: раздел и текущий инструмент.
   Ссылка и стрелка лежат в одной пилюле, поэтому отступы от текста до краёв
   одинаковые с обеих сторон, а щели между текстом и стрелкой нет. */
.ie-crumb-drop { position: relative; }

.ie-crumb-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.ie-crumb-pill:hover {
    color: var(--ie-accent);
    background: var(--ie-accent-soft);
    border-color: var(--ie-glass-border);
}

.ie-crumb-pill .ie-crumb-link,
.ie-crumb-pill .ie-crumb-link:hover {
    padding: 0;
    background: none;
    border-color: transparent;
    color: inherit;
}

.ie-crumb-pill .ie-crumb-toggle { pointer-events: none; }

.ie-crumb-link-static { color: #1f2937; font-weight: 600; }

.ie-crumb-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 18px;
    padding: 0;
    border: 0;
    color: var(--ie-text-muted);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    transition: color .18s ease, transform .18s ease;
}

.ie-crumb-toggle:hover { color: var(--ie-accent); }
.ie-crumb-drop.is-open .ie-crumb-toggle { color: var(--ie-accent); transform: rotate(180deg); }

.ie-crumb-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    left: 0;
    min-width: 248px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid var(--ie-glass-border);
    background: var(--ie-glass-bg-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--ie-shadow);
    animation: ie-crumb-in .16s ease;
}

@keyframes ie-crumb-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.ie-crumb-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 10px;
    color: #1f2937;
    font-size: 13.5px;
    text-decoration: none;
}

.ie-crumb-menu-item:hover { color: var(--ie-accent); background: var(--ie-accent-soft); }

.ie-crumb-menu-item.is-current {
    color: var(--ie-accent);
    background: var(--ie-accent-soft);
    font-weight: 600;
}



/* ─── Каталог: разделы по категориям ─────────────────────────────────────── */

.ie-chip-emoji { font-size: 15px; line-height: 1; }

.ie-cat-section { scroll-margin-top: 84px; padding-top: 6px; }
.ie-cat-section + .ie-cat-section { margin-top: 34px; }
/* Последний раздел не должен упираться карточками в футер */
.ie-cat-section:last-of-type { padding-bottom: 44px; }

.ie-cat-head { margin-bottom: 12px; }

.ie-cat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    color: #1f2937;
}

.ie-cat-title__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--ie-accent-soft);
    font-size: 19px;
    line-height: 1;
}

.ie-cat-title__count {
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--ie-text-muted);
    font-size: 12px;
    font-weight: 700;
}

.ie-cat-desc {
    /* Отступ слева равен ширине иконки раздела (38px) плюс её gap (10px):
       описание начинается ровно под текстом заголовка, а не под иконкой.
       Ширину не ограничиваем — блок тянется на всю колонку каталога. */
    margin: 8px 0 0;
    padding-left: 48px;
    color: var(--ie-text-muted);
    font-size: 14px;
}

/* ─── Блок похожих инструментов ─────────────────────────────────────────── */

.ie-related > h2 { margin-bottom: 0; }

.ie-related-subtitle {
    font-size: 17px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px;
}

.ie-related > h2 + .ie-related-subtitle { margin-top: 16px; }
.ie-related .seo-links-cloud { margin: 0; }
.ie-related .seo-links-cloud + .ie-related-subtitle { margin-top: 26px; }

.ie-cat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 10px;
}

.ie-cat-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--ie-radius);
    border: 1px solid var(--ie-glass-border);
    background: var(--ie-glass-bg);
    color: #1f2937;
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.ie-cat-tile:hover {
    border-color: var(--ie-accent);
    transform: translateY(-2px);
    box-shadow: var(--ie-shadow);
    color: #1f2937;
}

.ie-cat-tile__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: var(--ie-accent-soft);
    font-size: 20px;
    line-height: 1;
}

.ie-cat-tile__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ie-cat-tile__name { font-weight: 600; font-size: 14.5px; }
.ie-cat-tile__count { color: var(--ie-text-muted); font-size: 12.5px; }
.ie-cat-tile__arrow { color: var(--ie-accent); opacity: .7; }


/* Мобильная адаптация навигации (nav-часть мобильного блока imgedit.css) */
@media (max-width: 575.98px) {
    .ie-crumbs { display: none; }
    .ie-cat-head { text-align: center; }
    .ie-cat-title { font-size: 19px; justify-content: center; }
    .ie-cat-desc { padding-left: 0; }
    .ie-cat-tiles { grid-template-columns: 1fr; }
    .ie-catalog-grid { grid-template-columns: 1fr; padding-top: 6px; }
}

/* ============================================================================
   ТЁМНАЯ ТЕМА для /video (каталог + все подстраницы). Токены --vd-*/--ie-*
   тёмные из theme.css (контейнеры-стекло), здесь добиваем хардкод-цвета
   текста/фонов (.vd-* + переиспользованные .ie-*). Светлая не тронута.
   ============================================================================ */

/* step pills (active/done) + summary: light text */
[data-bs-theme="dark"] .vd-steps { list-style: none; }
[data-bs-theme="dark"] .vd-steps li.is-active .vd-step-pill { color: var(--rt-text); }
[data-bs-theme="dark"] .vd-steps li.is-done .vd-step-pill { color: var(--rt-text); }
[data-bs-theme="dark"] .vd-summary { color: var(--rt-text); }
/* статус генерации («Подготовка к генерации…») + кнопки под результатом (кроме primary) */
[data-bs-theme="dark"] .vd-wait-stage { color: var(--rt-text); }
[data-bs-theme="dark"] .vd-act:not(.vd-act-primary) { color: var(--rt-text); }
[data-bs-theme="dark"] .vd-act:not(.vd-act-primary):hover { color: var(--rt-accent); }
[data-bs-theme="dark"] .vd-step-title,
[data-bs-theme="dark"] .vd-source-name,
[data-bs-theme="dark"] .vd-dropzone-title,
[data-bs-theme="dark"] .vd-textarea { color: var(--rt-text); }
/* текст → светлый (vd-* B) */
[data-bs-theme="dark"] .vd-select-btn,
[data-bs-theme="dark"] .vd-option,
[data-bs-theme="dark"] .vd-done-title,
[data-bs-theme="dark"] .vd-paywall-title,
[data-bs-theme="dark"] .vd-modal-title { color: var(--rt-text); }
/* текст → светлый (ie-*) */
[data-bs-theme="dark"] .ie-catalog-card,
[data-bs-theme="dark"] a.ie-catalog-card:hover,
[data-bs-theme="dark"] .ie-crumb-link-static,
[data-bs-theme="dark"] .ie-crumb-menu-item,
[data-bs-theme="dark"] .ie-cat-title,
[data-bs-theme="dark"] .ie-related-subtitle,
[data-bs-theme="dark"] .ie-cat-tile,
[data-bs-theme="dark"] .ie-cat-tile:hover { color: var(--rt-text); }

/* вторичный текст */
[data-bs-theme="dark"] .vd-hint-pop,
[data-bs-theme="dark"] .vd-chip,
[data-bs-theme="dark"] .vd-field-label,
[data-bs-theme="dark"] .vd-check,
[data-bs-theme="dark"] .vd-demo-note-text,
[data-bs-theme="dark"] .vd-paywall-text { color: var(--rt-text-2); }

/* приглушённый текст */
[data-bs-theme="dark"] .ie-soon-badge,
[data-bs-theme="dark"] .ie-crumb + .ie-crumb::before { color: var(--rt-muted); }

/* плейсхолдеры */
[data-bs-theme="dark"] .vd-textarea::placeholder { color: var(--rt-muted); opacity: 1; }

/* светлые поверхности → тёмные */
[data-bs-theme="dark"] .vd-chip { background: var(--rt-surface); border-color: var(--rt-border); }
[data-bs-theme="dark"] .vd-hint-pop { background: var(--rt-elevated); border-color: var(--rt-border); }
[data-bs-theme="dark"] .vd-select-menu { background: rgba(31, 36, 45, 0.985); border-color: var(--rt-border); }
[data-bs-theme="dark"] .vd-modal-card { background: var(--rt-elevated); border-color: var(--rt-border); }
[data-bs-theme="dark"] .vd-modal-x { background: rgba(255, 255, 255, .1); color: var(--rt-text-2); }
[data-bs-theme="dark"] .ie-soon-badge,
[data-bs-theme="dark"] .ie-cat-title__count { background: rgba(255, 255, 255, .06); }
[data-bs-theme="dark"] .ie-crumb-link,
[data-bs-theme="dark"] .ie-crumb-pill { background: var(--rt-glass-bg); }

/* предупреждающий тост + ошибка (амбер) → тёмный фон, светлый текст */
[data-bs-theme="dark"] .vd-toast { background: rgba(245, 184, 78, .12); border-color: rgba(245, 184, 78, .4); color: var(--rt-text); }
[data-bs-theme="dark"] .vd-error { background: rgba(245, 184, 78, .12); color: var(--rt-warning); }
