/* ========== VIDEO (components/dashboard/Video.phtml, assets/js/video-*.js) ==========
   Dvě části:
     1. domovská stránka (.vh-*): Moje videa a Klipy z fotek, světlé téma aplikace,
     2. editor (.ve-*, .vt-*, .vp-*): celoobrazovkový střihový program v tmavém tématu (jako Premiere nebo CapCut):
        horní lišta, vlevo knihovna, uprostřed monitor, vpravo inspektor, dole časová osa.
   Dialogy (nový klip, zvuk, hotové video) jsou mimo editor a mají světlé téma aplikace; znovupoužívají třídy dialogů
   a stránky Zvuk (.add-sit-*, .stu-pole, .zvuk-*). */

/* ==========================================================================
   1. DOMOVSKÁ STRÁNKA
   ========================================================================== */

.vh-akce {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vh-sekce {
    margin-top: 28px;
}

.vh-sekce .rady-nadpis {
    margin-bottom: 4px;
}

.vh-mrizka {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    margin-top: 14px;
    align-items: start;
}

.vh-mrizka--klipy {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.vh-karta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.vh-karta:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-md);
}

.vh-karta--zvyrazneni {
    box-shadow: 0 0 0 3px var(--primary);
}

.vh-karta-obraz {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 10;
    padding: 0;
    border: none;
    background: #0f172a;
    color: #64748b;
    font-size: 34px;
    cursor: pointer;
    overflow: hidden;
}

.vh-karta--klip .vh-karta-obraz {
    cursor: default;
}

.vh-karta-obraz img,
.vh-karta-obraz video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vh-karta-obraz--prazdny {
    background: var(--bg-hover);
}

.vh-chip {
    position: absolute;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

.vh-chip--cas {
    right: 8px;
    bottom: 8px;
}

.vh-chip--stav {
    top: 8px;
    left: 8px;
}

.vh-chip--ok { background: #059669; }
.vh-chip--bezi { background: #2563eb; }
.vh-chip--chyba { background: #dc2626; }
.vh-chip--koncept { background: rgba(15, 23, 42, 0.78); }

.vh-karta-ceka {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.9));
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
}

.vh-toci {
    animation: vh-toci 1.1s linear infinite;
}

@keyframes vh-toci {
    to { transform: rotate(360deg); }
}

.vh-karta-tel {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px 12px;
    min-width: 0;
}

.vh-karta-nazev {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vh-karta-meta {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.vh-karta-akce {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.video-klip-varovani {
    margin: 6px 0 0;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
}

/* ---------- dialog: nový klip ---------- */

dialog.video-klip-dialog {
    width: min(860px, calc(100vw - 32px));
}

.video-klip-form {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.video-foto-vyber {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3 / 4;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
}

.video-foto-vyber:hover {
    border-color: var(--primary);
}

.video-foto-vyber img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-klip-pole {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.video-radek {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.video-navaz {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--text);
}

.video-navaz > span {
    flex: 1 1 200px;
}

/* ---------- dialog: hotové video ---------- */

dialog.ve-vysledek-dialog {
    width: min(520px, calc(100vw - 32px));
}

.ve-vysledek-dialog video {
    width: 100%;
    max-height: 68vh;
    border-radius: var(--radius-md);
    background: #000;
}

.video-vysledek-akce {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

/* ---------- dialog: zkratky ---------- */

.ve-zkratky {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 8px 18px;
    margin: 0;
    font-size: 14px;
}

.ve-zkratky dt {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ve-zkratky dd {
    margin: 0;
    color: var(--text-secondary);
}

/* ---------- dialog: přidat zvuk ---------- */

dialog.video-zvuk-dialog {
    width: min(680px, calc(100vw - 32px));
}

.video-zvuk-obsah {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.video-zvuk-obsah [data-vz-panel][hidden] {
    display: none;
}

.video-klip-nazev {
    min-width: 0;
    overflow-wrap: anywhere;
}

.video-vz-hlava {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.video-vz-seznam {
    list-style: none;
    margin: 8px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 340px;
    overflow: auto;
}

.video-vz-polozka {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    align-items: flex-start;
}

.video-vz-hledani {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px auto;
    gap: 8px;
}

.video-vz-tipy {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.video-tip {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: none;
    font: inherit;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.video-tip:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

@media (max-width: 760px) {
    .video-klip-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .video-foto-vyber {
        max-width: 240px;
    }

    .video-vz-hledani {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ==========================================================================
   2. EDITOR (tmavé téma, celá obrazovka)
   ========================================================================== */

.ve {
    /* barvy editorů jsou v editor-theme.css, sdílí je i editor obrázků */
    --vt-vyska: 300px;

        display: flex;
    flex-direction: column;
    background: var(--ve-bg);
    color: var(--ve-text);
    font-size: 13px;
    user-select: none;
    -webkit-user-select: none;
}

.ve[hidden] {
    display: none;
}

html.ve-otevreno,
html.ve-otevreno body {
    overflow: hidden;
}

.ve *,
.ve *::before,
.ve *::after {
    scrollbar-color: #cbd5e1 transparent;
}

.ve input,
.ve textarea {
    user-select: text;
    -webkit-user-select: text;
}

/* ---------- horní lišta ---------- */

.ve-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    height: 52px;
    padding: 0 12px;
    border-bottom: 1px solid var(--ve-line);
    background: var(--ve-panel);
}

.ve-top-pravy {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.ve-nazev {
    width: min(320px, 34vw);
    height: 34px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ve-text);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
}

.ve-nazev:hover {
    border-color: var(--ve-line);
}

.ve-nazev:focus {
    outline: none;
    border-color: var(--ve-accent);
    background: var(--ve-panel-2);
}

.ve-stav {
    color: var(--ve-muted);
    font-size: 12px;
    white-space: nowrap;
}

.ve-stav--chyba {
    color: var(--primary);
}

.ve-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ve-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.ve-btn .nf {
    font-size: 17px;
}

.ve-btn:hover:not(:disabled) {
    background: var(--ve-panel-3);
}

.ve-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.ve-btn--text {
    padding: 0 12px;
}

.ve-btn--zapnuto {
    background: var(--ve-accent-soft);
    border-color: rgba(255, 59, 92, 0.45);
    color: var(--primary);
}

.ve-btn--hrat {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
}

.ve-btn--hrat:hover:not(:disabled) {
    background: #fff;
}

.ve-btn--hrat .nf {
    font-size: 22px;
}

/* tlačítka aplikace uvnitř editoru dostanou tmavý vzhled */
.ve .btn-ghost {
    border: 1px solid var(--ve-line);
    background: transparent;
    color: var(--ve-text);
}

.ve .btn-ghost:hover:not(:disabled) {
    background: var(--ve-panel-3);
    border-color: #cbd5e1;
}

.ve .btn-ghost:disabled {
    opacity: 0.4;
}

.ve .form-input {
    border: 1px solid var(--ve-line);
    background: var(--ve-panel-2);
    color: var(--ve-text);
}

.ve .form-input:focus {
    border-color: var(--ve-accent);
    outline: none;
    box-shadow: none;
}

.ve select.form-input option {
    background: #fff;
    color: var(--text);
}

.ve-banner {
    flex: 0 0 auto;
    margin: 0;
    padding: 7px 14px;
    background: var(--ve-panel-2);
    border-bottom: 1px solid var(--ve-line);
    font-size: 12.5px;
    line-height: 1.45;
}

.ve-banner--bezi {
    background: var(--info-bg);
    color: #1d4ed8;
}

.ve-banner--chyba {
    background: var(--error-bg);
    color: #b91c1c;
}

.ve-banner--varovani {
    background: var(--warning-bg);
    color: #92400e;
}

/* tlačítko Úlohy v editoru */
.ve .rb-jobs-btn {
    border-color: var(--ve-line);
    background: transparent;
    color: var(--ve-text);
    height: 34px;
    padding: 0 12px;
}

.ve .rb-jobs-btn:hover,
.ve .rb-jobs-btn[aria-expanded="true"] {
    background: var(--ve-panel-3);
    border-color: #cbd5e1;
    color: var(--ve-text);
}

.ve .rb-jobs {
    margin-right: 0;
}

/* ---------- tři sloupce ---------- */

.ve-telo {
    display: grid;
    flex: 1 1 0;
    grid-template-columns: 300px minmax(0, 1fr) 300px;
    min-height: 0;
}

.ve-levy,
.ve-pravy {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--ve-panel);
}

.ve-levy {
    border-right: 1px solid var(--ve-line);
}

.ve-pravy {
    border-left: 1px solid var(--ve-line);
    overflow-y: auto;
}

.ve--zamceno .ve-pravy,
.ve--zamceno .vt-draha {
    opacity: 0.55;
}

/* ---------- levý panel ---------- */

.ve-zalozky {
    display: flex;
    flex: 0 0 auto;
    border-bottom: 1px solid var(--ve-line);
}

.ve-zalozka {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 9px 4px 8px;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--ve-muted);
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}

.ve-zalozka .nf {
    font-size: 19px;
}

.ve-zalozka:hover {
    color: var(--ve-text);
}

.ve-zalozka--aktivni {
    border-bottom-color: var(--ve-accent);
    color: var(--ve-text);
}

.ve-panel {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-height: 0;
    padding: 12px;
    overflow-y: auto;
}

.ve-panel[hidden] {
    display: none;
}

.ve-panel-hlava {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.ve-panel-hlava .btn {
    flex: 1 1 auto;
}

.ve-napoveda {
    margin: 4px 0 10px;
    color: var(--ve-muted);
    font-size: 12px;
    line-height: 1.5;
}

.ve-media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.ve-media .ve-napoveda {
    grid-column: 1 / -1;
}

.ve-dlazdice {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ve-line);
    border-radius: 8px;
    background: var(--ve-panel-2);
    transition: border-color 0.12s;
}

.ve-dlazdice[draggable="true"] {
    cursor: grab;
}

.ve-dlazdice:hover {
    border-color: #cbd5e1;
}

.ve-dlazdice--tazena {
    opacity: 0.5;
}

.ve-dlazdice-obraz {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #07080a;
    overflow: hidden;
}

.ve-dlazdice-obraz img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ve-dlazdice--pending .ve-dlazdice-obraz img {
    opacity: 0.45;
}

.ve-dlazdice-ceka {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    font-size: 11.5px;
    font-weight: 600;
}

.ve-dlazdice-ceka--chyba {
    color: var(--primary);
}

.ve-dlazdice-pouzito {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--ve-accent);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
}

.ve-dlazdice-popis {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 6px 6px 8px;
}

.ve-dlazdice-nazev {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ve-dlazdice-akce {
    display: flex;
    flex: 0 0 auto;
    gap: 2px;
}

.ve-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--ve-muted);
    cursor: pointer;
}

.ve-mini:hover:not(:disabled) {
    background: var(--ve-panel-3);
    color: var(--ve-text);
}

.ve-mini:disabled {
    opacity: 0.3;
    cursor: default;
}

.ve-mini--pridat {
    background: var(--ve-accent);
    color: #fff;
}

.ve-mini--pridat:hover:not(:disabled) {
    background: #ff5b77;
    color: #fff;
}

.ve-mini--nebezpecne:hover:not(:disabled) {
    color: var(--primary);
}

/* zvuk */

.ve-zvuky {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ve-zvuk-radek {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 8px;
    border: 1px solid var(--ve-line);
    border-radius: 8px;
    background: var(--ve-panel-2);
    cursor: grab;
}

.ve-zvuk-radek:hover {
    border-color: #cbd5e1;
}

.ve-zvuk-hrat {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: var(--ve-panel-3);
    color: var(--ve-text);
    cursor: pointer;
}

.ve-zvuk-hrat--hraje {
    background: var(--ve-accent);
}

.ve-zvuk-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.ve-zvuk-nazev {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ve-zvuk-meta {
    overflow: hidden;
    color: var(--ve-muted);
    font-size: 11.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* přechody */

.ve-prechody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ve-prechody--mala {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ve-prechod {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--ve-line);
    border-radius: 8px;
    background: var(--ve-panel-2);
    color: var(--ve-text);
    font: inherit;
    cursor: pointer;
}

.ve-prechod:hover {
    border-color: #cbd5e1;
}

.ve-prechod--aktivni {
    border-color: var(--ve-accent);
    background: var(--ve-accent-soft);
}

.ve-prechod-nazev {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.ve-prechod-ukazka {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 5px;
    background: #07080a;
}

.ve-prechod-ukazka i {
    position: absolute;
    inset: 0;
}

.ve-prechod-ukazka .ju-a {
    background: linear-gradient(135deg, #4c6fff, #2a3fa8);
}

.ve-prechod-ukazka .ju-b {
    background: linear-gradient(135deg, #ff7a59, #c23a52);
}

.ve-prechod-ukazka--cut .ju-b {
    clip-path: inset(0 0 0 50%);
}

.ve-prechod-ukazka--fade .ju-b,
.ve-prechod-ukazka--dissolve .ju-b {
    opacity: 0.55;
}

.ve-prechod-ukazka--dissolve .ju-b {
    background: radial-gradient(circle at 50% 50%, #ff7a59 0%, #c23a52 55%, transparent 100%);
}

.ve-prechod-ukazka--fadeblack .ju-a {
    background: linear-gradient(90deg, #4c6fff 0%, #000 55%);
}

.ve-prechod-ukazka--fadeblack .ju-b {
    background: linear-gradient(90deg, #000 45%, #ff7a59 100%);
}

.ve-prechod-ukazka--wipeleft .ju-b {
    clip-path: inset(0 0 0 45%);
}

.ve-prechod-ukazka--slideleft .ju-a {
    transform: translateX(-30%);
}

.ve-prechod-ukazka--slideleft .ju-b {
    transform: translateX(70%);
}

.ve-vsechny {
    margin-top: 12px;
    color: var(--ve-text);
}

.ve .zvuk-zaskrtnuti {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ve-text);
    font-size: 13px;
    cursor: pointer;
}

/* ---------- monitor ---------- */

.ve-stred {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.ve-monitor {
    position: relative;
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    min-height: 0;
    background: #07080a;
    cursor: pointer;
}

.ve-monitor:fullscreen {
    cursor: default;
}

.ve-scena {
    position: relative;
    overflow: hidden;
    background: #000;
    box-shadow: 0 0 0 1px #20242e, 0 12px 40px rgba(0, 0, 0, 0.6);
}

.vp-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    will-change: opacity, transform;
    pointer-events: none;
}

.vp-video[hidden] {
    display: none;
}

.ve-monitor-prazdno {
    position: absolute;
    inset: auto 0 14px 0;
    margin: 0;
    color: var(--ve-muted);
    font-size: 13px;
    text-align: center;
    pointer-events: none;
}

.ve-monitor-prazdno.ve-skryto,
.ve-scena:not(.vp-stage--prazdne) ~ .ve-monitor-prazdno {
    display: none;
}

.ve-nacita {
    position: absolute;
    top: 12px;
    left: 50%;
    margin: 0;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 12px;
    transform: translateX(-50%);
}

.ve-nacita[hidden] {
    display: none;
}

.ve-transport {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 8px 14px;
    border-top: 1px solid var(--ve-line);
    background: var(--ve-panel);
}

.ve-cas {
    color: var(--ve-muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.ve-cas b {
    color: var(--ve-text);
    font-size: 15px;
}

.ve-transport-stred {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ve-transport-pravy {
    display: flex;
    justify-content: flex-end;
}

.ve-hlaska {
    position: absolute;
    left: 50%;
    bottom: 64px;
    z-index: 5;
    max-width: calc(100% - 40px);
    margin: 0;
    padding: 8px 14px;
    border: 1px solid var(--ve-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    line-height: 1.4;
    transform: translateX(-50%);
}

.ve-hlaska[hidden] {
    display: none;
}

/* ---------- inspektor ---------- */

.ve-pravy-hlava {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ve-line);
    font-size: 14px;
}

.ve-pravy-telo {
    display: flex;
    flex-direction: column;
}

.ve-sekce {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid var(--ve-line);
}

.ve-sekce-nadpis {
    margin: 0;
    color: var(--ve-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ve-pole {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.ve-pole-popisek {
    color: var(--ve-muted);
    font-size: 12px;
    font-weight: 600;
}

.ve-pole-napoveda {
    color: var(--ve-muted);
    font-size: 11.5px;
    line-height: 1.4;
}

.ve-vstup {
    width: 100%;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
}

.ve-dvojice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ve-vstup-s-tlacitkem {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ve-rozsah {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ve-rozsah input[type="range"] {
    flex: 1 1 auto;
    min-width: 0;
    accent-color: var(--ve-accent);
}

.ve-rozsah-hodnota {
    min-width: 48px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.ve-akce {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ve-odkaz {
    padding: 0 !important;
    border: none !important;
    background: none !important;
    color: var(--ve-muted) !important;
    font-size: 12px !important;
}

.ve-odkaz:hover {
    color: var(--ve-text) !important;
    text-decoration: underline;
}

.ve-nahled-hlava {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ve-nahled-foto {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
}

.ve-nahled-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ve-nahled-text strong,
.ve-nadpis-radek {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ve-audio {
    width: 100%;
    height: 34px;
    margin-top: 8px;
}

.ve-prehled {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 6px 14px;
    margin: 0;
}

.ve-prehled dt {
    color: var(--ve-muted);
}

.ve-prehled dd {
    margin: 0;
    font-weight: 600;
}

/* ---------- dělič a časová osa ---------- */

.ve-delic {
    flex: 0 0 6px;
    margin: -3px 0;
    position: relative;
    z-index: 9;
    cursor: row-resize;
}

.ve-delic::after {
    content: '';
    position: absolute;
    inset: 2px 0;
    background: var(--ve-line);
    transition: background 0.12s;
}

.ve-delic:hover::after {
    background: var(--ve-accent);
}

.ve-osa {
    display: flex;
    flex: 0 0 var(--vt-vyska);
    flex-direction: column;
    min-height: 0;
    background: var(--ve-lane);
}

.vt-nastroje {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding: 4px 10px;
    border-bottom: 1px solid var(--ve-line);
    background: var(--ve-panel);
}

.vt-skupina {
    display: flex;
    align-items: center;
    gap: 2px;
}

.vt-skupina--zoom input[type="range"] {
    width: 130px;
    accent-color: var(--ve-accent);
}

.vt-cas {
    margin-left: auto;
    color: var(--ve-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.vt-okno {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
}

.vt-plocha {
    position: relative;
    min-width: 100%;
    min-height: 100%;
}

.vt-rad {
    display: flex;
    position: relative;
}

.vt-label {
    position: sticky;
    left: 0;
    z-index: 6;
    display: flex;
    flex: 0 0 150px;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    width: 150px;
    padding: 4px 10px;
    border-right: 1px solid var(--ve-line);
    border-bottom: 1px solid var(--ve-line);
    background: var(--ve-panel);
    overflow: hidden;
}

.vt-label strong {
    font-size: 12px;
}

.vt-label-sub {
    overflow: hidden;
    color: var(--ve-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vt-label--pravitko {
    padding: 0;
}

.vt-rad--pravitko {
    position: sticky;
    top: 0;
    z-index: 7;
}

.vt-pravitko {
    position: relative;
    flex: 0 0 auto;
    height: 28px;
    border-bottom: 1px solid var(--ve-line);
    background: var(--ve-panel);
    cursor: pointer;
    touch-action: none;
}

.vt-znacka {
    position: absolute;
    bottom: 0;
    width: 1px;
    height: 6px;
    background: var(--ve-tick);
}

.vt-znacka--velka {
    height: 12px;
    background: var(--ve-tick-big);
}

.vt-znacka-text {
    position: absolute;
    bottom: 13px;
    left: 4px;
    color: var(--ve-muted);
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.vt-marker {
    position: absolute;
    top: 0;
    z-index: 3;
    width: 14px;
    height: 18px;
    margin-left: -7px;
    background: var(--ve-accent);
    clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
    pointer-events: none;
}

.vt-hlava {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 5;
    width: 0;
    border-left: 2px solid var(--ve-accent);
    margin-left: -1px;
    pointer-events: none;
}

.vt-konec {
    position: absolute;
    top: 28px;
    bottom: 0;
    z-index: 3;
    width: 0;
    border-left: 1px dashed var(--ve-tick-big);
    pointer-events: none;
}

.vt-za-koncem {
    position: absolute;
    top: 28px;
    bottom: 0;
    z-index: 2;
    background: repeating-linear-gradient(135deg, rgba(15, 23, 42, 0.06) 0 6px, transparent 6px 12px);
    pointer-events: none;
}

.vt-draha {
    position: relative;
    flex: 0 0 auto;
    border-bottom: 1px solid var(--ve-line);
    background: var(--ve-lane);
}

.vt-draha--video {
    height: 76px;
}

.vt-rad--video .vt-label {
    height: 76px;
}

.vt-draha--zvuk {
    height: 42px;
}

.vt-rad--zvuk .vt-label {
    height: 42px;
}

.vt-draha--novy {
    height: 40px;
}

.vt-rad--novy .vt-label {
    height: 40px;
}

.vt-pridat {
    align-self: flex-start;
    padding: 4px 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background: none;
    color: var(--ve-muted);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.vt-pridat:hover {
    border-color: var(--ve-accent);
    color: var(--ve-text);
}

.vt-prazdno {
    position: absolute;
    top: 50%;
    left: 14px;
    max-width: calc(100% - 28px);
    color: var(--text-muted);
    font-size: 12.5px;
    transform: translateY(-50%);
    pointer-events: none;
}

.vt-klip {
    position: absolute;
    top: 6px;
    bottom: 6px;
    min-width: 26px;
    border: 1px solid #4b5c7b;
    border-radius: 6px;
    background-color: var(--ve-clip);
    background-position: left center;
    background-repeat: repeat-x;
    background-size: auto 100%;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    transition: box-shadow 0.12s;
}

.vt-klip:hover {
    border-color: #7a8cab;
}

.vt-klip--nehotovy {
    border-style: dashed;
    border-color: #d4872a;
    opacity: 0.8;
}

.vt-klip.vt-vybrany {
    z-index: 3;
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--ve-accent);
}

.vt-klip.vt-tazeny {
    z-index: 8;
    opacity: 0.85;
    cursor: grabbing;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.vt-klip:focus-visible {
    outline: 2px solid #fff;
}

.vt-klip-text {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 5px;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.vt-klip-nazev {
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vt-klip-meta {
    overflow: hidden;
    color: #cbd3e1;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vt-uchyt {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 10px;
    background: rgba(255, 255, 255, 0.14);
    cursor: ew-resize;
    opacity: 0;
    touch-action: none;
}

.vt-uchyt::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 20px;
    background: #fff;
    border-radius: 1px;
    transform: translate(-50%, -50%);
}

.vt-uchyt--l {
    left: 0;
}

.vt-uchyt--r {
    right: 0;
}

.vt-klip:hover .vt-uchyt,
.vt-klip.vt-vybrany .vt-uchyt {
    opacity: 1;
}

.vt-spoj {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: background 0.12s, transform 0.12s;
}

.vt-spoj:hover {
    background: var(--ve-panel-3);
    transform: translate(-50%, -50%) scale(1.15);
}

.vt-spoj--strih {
    opacity: 0.65;
}

.vt-spoj--prechod {
    border-color: var(--ve-accent);
    background: var(--ve-accent);
    color: #fff;
}

.vt-spoj--vybrany {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.vt-vlozit {
    position: absolute;
    top: 2px;
    bottom: 2px;
    z-index: 9;
    width: 3px;
    margin-left: -1px;
    border-radius: 2px;
    background: var(--ve-accent);
    box-shadow: 0 0 8px var(--ve-accent);
    pointer-events: none;
}

.vt-vlozit[hidden] {
    display: none;
}

.vt-zvuk {
    position: absolute;
    top: 5px;
    bottom: 5px;
    display: flex;
    align-items: center;
    min-width: 30px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: var(--ve-music);
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

.vt-zvuk--voice { background: var(--ve-voice); }
.vt-zvuk--music { background: var(--ve-music); }
.vt-zvuk--nature { background: var(--ve-nature); }
.vt-zvuk--sfx { background: var(--ve-sfx); }

.vt-zvuk-vlna {
    position: absolute;
    inset: 0;
    opacity: calc(0.12 + 0.2 * var(--vt-vol, 1));
    background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 5px);
    -webkit-mask-image: linear-gradient(transparent 20%, #000 50%, transparent 80%);
    mask-image: linear-gradient(transparent 20%, #000 50%, transparent 80%);
    pointer-events: none;
}

.vt-zvuk-nazev {
    position: relative;
    z-index: 1;
    overflow: hidden;
    font-size: 11.5px;
    font-weight: 700;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    pointer-events: none;
}

.vt-zvuk--smycka {
    border-right-style: dashed;
}

.vt-zvuk.vt-vybrany {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--ve-accent);
}

.vt-zvuk.vt-tazeny {
    z-index: 8;
    cursor: grabbing;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.vt-zvuk:focus-visible {
    outline: 2px solid #fff;
}

/* ---------- menší obrazovky ---------- */

@media (max-width: 1180px) {
    .ve-telo {
        grid-template-columns: 250px minmax(0, 1fr) 250px;
    }
}

@media (max-width: 900px) {
    .ve-telo {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .ve-pravy {
        display: none;
    }

    .ve-nazev {
        width: 160px;
    }
}

@media (max-width: 680px) {
    .ve-telo {
        grid-template-columns: minmax(0, 1fr);
    }

    .ve-levy {
        display: none;
    }

    .ve-btn--text span,
    .ve-top .btn span:not(#ve-vyrobit-text) {
        display: none;
    }

    .vt-skupina--zoom input[type="range"] {
        width: 80px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vh-toci {
        animation: none;
    }
}

/* ---------- Generovat: formulář klipu a zvuku přímo v levém panelu editoru ---------- */

.ve-gen-nadpis {
    margin: 4px 0 2px;
    font-size: 13px;
    font-weight: 700;
}

.ve-gen-nadpis:not(:first-child) {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--ve-line);
}

.ve-gen-tlacitka {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ve-gen-tlacitka .btn {
    justify-content: flex-start;
}

.ve .video-klip-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.ve .video-foto-vyber {
    aspect-ratio: 16 / 10;
    border-color: var(--ve-line);
    background: var(--ve-panel-2);
    color: var(--ve-muted);
}

.ve .video-radek {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.ve .stu-pole-popisek,
.ve .prop-napoveda {
    color: var(--ve-muted);
}

.ve .video-navaz {
    background: var(--ve-accent-soft);
    color: var(--ve-text);
}

.ve .prop-chyba {
    color: var(--primary);
}

/* rozpracovaný klip na ose: šrafa a nápis */

.vt-klip--generuje {
    border-style: dashed;
    border-color: #7a8cab;
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 8px, transparent 8px 16px) !important;
    animation: vt-generuje 1.6s linear infinite;
    background-size: 22px 22px !important;
}

@keyframes vt-generuje {
    to { background-position: 22px 0; }
}

.vt-zvuk--duch {
    border-style: dashed;
    opacity: 0.55;
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 8px, transparent 8px 16px);
    cursor: default;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .vt-klip--generuje {
        animation: none;
    }
}
/* texty na tmavých podkladech (náhledy klipů, barevné bloky zvuku, rozpracované dlaždice) zůstávají bílé i ve světlém tématu */
.ve-dlazdice-ceka,
.vt-klip,
.vt-zvuk {
    color: #fff;
}

.ve-panel-hlava {
    flex-wrap: wrap;
}

.ve-panel-hlava .btn {
    flex: 1 1 auto;
    white-space: nowrap;
}

.video-foto {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-foto-ai {
    display: flex;
    flex-direction: column;
    gap: 8px;
}