/* timeline-editor.css — таймлайн-редактор вместо Edit Video (2026-10-21), разметку строит timeline-editor.js
   внутри #tl-main (превью + таймлайн) и #tl-side (панель добавления и свойств) из studio.html.
   Тёмная тема студии: фон zinc/чёрный, акцент fuchsia (#d946ef → #a855f7), как у остальной страницы.
   Только свои классы tle-*: разметка из JS без Tailwind-утилит — Tailwind CDN генерирует CSS по классам на лету, и
   перерисовка таймлайна дёргала бы его пересчёт (заметка «Запись в DOM только изменений»). Видимость своих узлов —
   .tle-hide (Tailwind-овский .hidden у контейнеров #tl-main/#tl-side переключает switchStudioTab, как раньше). */

.tle {
    --tle-line: rgba(255, 255, 255, .08);
    --tle-line2: rgba(255, 255, 255, .14);
    --tle-text: #e4e4e7;
    --tle-dim: #a1a1aa;
    --tle-mute: #71717a;
    --tle-acc: #d946ef;
    --tle-acc2: #a855f7;
    --tle-bad: #fb7185;
    color: var(--tle-text);
}
.tle .tle-hide { display: none !important; }
/* сброс — нулевого веса (:where): `.tle button { font: inherit }` весом (0,1,1) перебивал классы кнопок (.tle-mini,
   .tle-chip, Tailwind у Render) — все кнопки выходили 16px (владелец 2026-10-21: «кнопки прям очень большие») */
:where(.tle) button { font: inherit; cursor: pointer; }
:where(.tle) button:disabled { cursor: default; }
:where(.tle) svg { display: block; }

/* ── экран «Открыть ролик» ───────────────────────────────────────────────── */
.tle-open { position: absolute; inset: 0; overflow-y: auto; padding: 18px 18px 24px; scrollbar-width: thin; }
.tle-open-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tle-h1 { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 19px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.tle-sub { font-size: 12.5px; color: var(--tle-dim); margin-top: 4px; max-width: 560px; line-height: 1.45; }
.tle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; margin-top: 12px; }
.tle-card { position: relative; display: block; width: 100%; aspect-ratio: 9 / 14; border-radius: 12px; overflow: hidden; padding: 0;
    background: #111114; border: 1px solid rgba(255, 255, 255, .07); text-align: left; transition: transform .15s ease, border-color .15s ease; }
.tle-card:hover { transform: translateY(-2px); border-color: rgba(217, 70, 239, .55); }
.tle-card img { width: 100%; height: 100%; object-fit: cover; }
.tle-card-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #52525b; }
.tle-card-ph svg { width: 28px; height: 28px; }
.tle-card-dur { position: absolute; top: 6px; right: 6px; padding: 2px 6px; border-radius: 6px; font-size: 10px; font-weight: 700;
    color: #fff; background: rgba(0, 0, 0, .7); font-variant-numeric: tabular-nums; }
.tle-card-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 7px; font-size: 11px; font-weight: 600; color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, .88)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── рабочая область: превью, транспорт, таймлайн ────────────────────────── */
.tle-work { position: absolute; inset: 0; display: flex; flex-direction: column; }
/* flex-basis 0: размер сцены не зависит от кадра внутри (иначе fitFrame ↔ ResizeObserver раскачивали бы друг друга) */
.tle-stage { position: relative; flex: 1 1 0; min-height: 110px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 10px; }
.tle-frame { position: relative; background: #000; border-radius: 10px; overflow: hidden; width: 160px; height: 284px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06); }
.tle-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; opacity: 0; }
.tle-vid.is-on { opacity: 1; }
.tle-ov { position: absolute; display: none; height: auto; border-radius: 6px; background: #000; box-shadow: 0 6px 24px rgba(0, 0, 0, .55); z-index: 2; }
.tle-ov.is-on { display: block; }
.tle-frame-note { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 16px;
    text-align: center; font-size: 12.5px; color: var(--tle-dim); background: rgba(0, 0, 0, .55); }

.tle-transport { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--tle-line); background: rgba(0, 0, 0, .4); flex-shrink: 0; }
.tle-ibtn { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
    color: #d4d4d8; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); transition: background .15s, color .15s, opacity .15s; }
.tle-ibtn:hover:not(:disabled) { background: rgba(255, 255, 255, .1); color: #fff; }
.tle-ibtn:disabled { opacity: .35; }
.tle-ibtn svg { width: 16px; height: 16px; }
.tle-ibtn.sm { width: 26px; height: 26px; border-radius: 8px; }
.tle-ibtn.sm svg { width: 14px; height: 14px; }
.tle-vsep { width: 1px; height: 18px; background: var(--tle-line2); margin: 0 3px; flex-shrink: 0; }
.tle-tc { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; }
.tle-play { width: 38px; height: 38px; flex-shrink: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
    background: #fff; color: #000; border: 0; box-shadow: 0 4px 16px rgba(0, 0, 0, .5); transition: transform .12s ease; }
.tle-play:hover:not(:disabled) { transform: scale(1.06); }
.tle-play:active:not(:disabled) { transform: scale(.95); }
.tle-play:disabled { opacity: .4; }
.tle-play svg { width: 16px; height: 16px; }
.tle-time { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; color: #e4e4e7; white-space: nowrap; }
.tle-len { font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; color: var(--tle-dim);
    padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); white-space: nowrap; }
.tle-len.is-full { color: #fcd34d; border-color: rgba(252, 211, 77, .35); }
.tle-zoomwrap { display: flex; align-items: center; gap: 4px; }
.tle-zoom { width: 86px; }

.tle-timeline { display: flex; flex-shrink: 0; border-top: 1px solid var(--tle-line); background: #0b0b0f; user-select: none; -webkit-user-select: none; }
.tle-heads { width: 86px; flex-shrink: 0; border-right: 1px solid var(--tle-line); background: rgba(0, 0, 0, .35); }
.tle-head-ruler { height: 22px; border-bottom: 1px solid var(--tle-line); }
.tle-head { display: flex; align-items: center; gap: 7px; padding: 0 10px; font-size: 11px; font-weight: 600; color: var(--tle-dim);
    border-bottom: 1px solid rgba(255, 255, 255, .04); white-space: nowrap; overflow: hidden; box-sizing: border-box; }
.tle-head i { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
.tle-scroll { flex: 1 1 0; min-width: 0; overflow-x: auto; overflow-y: hidden; position: relative; scrollbar-width: thin; scrollbar-color: #3f3f46 transparent; }
.tle-inner { position: relative; min-width: 100%; }
.tle-ruler { position: relative; height: 22px; border-bottom: 1px solid var(--tle-line); background: rgba(0, 0, 0, .25); cursor: pointer; overflow: hidden; touch-action: none; }
.tle-tick { position: absolute; bottom: 0; width: 1px; height: 5px; background: rgba(255, 255, 255, .16); }
.tle-tick.mj { height: 9px; background: rgba(255, 255, 255, .34); }
.tle-tick span { position: absolute; left: 4px; bottom: 8px; font-size: 9.5px; color: var(--tle-mute); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tle-lane { position: relative; border-bottom: 1px solid rgba(255, 255, 255, .04); box-sizing: border-box; cursor: default; }
.tle-lane:nth-child(even) { background: rgba(255, 255, 255, .015); }
.tle-endzone { position: absolute; top: 22px; bottom: 0; right: 0; pointer-events: none; border-left: 1px solid rgba(255, 255, 255, .22);
    background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .5) 0 6px, rgba(0, 0, 0, .32) 6px 12px); }
.tle-capline { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed rgba(251, 113, 133, .6); pointer-events: none; }
.tle-capline span { position: absolute; top: 4px; left: 4px; font-size: 9px; font-weight: 700; color: #fda4af; white-space: nowrap; }
.tle-snap { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed #f0abfc; pointer-events: none; z-index: 6;
    filter: drop-shadow(0 0 3px rgba(217, 70, 239, .85)); }
.tle-playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: #e879f9; pointer-events: none; z-index: 7; will-change: transform; }
.tle-playhead::before { content: ''; position: absolute; top: 0; left: 50%; width: 10px; height: 10px; border-radius: 2px; background: #e879f9;
    transform: translate(-50%, -3px) rotate(45deg); }

/* блоки дорожек */
.tle-blk { position: absolute; left: 0; top: 3px; box-sizing: border-box; border-radius: 7px; overflow: hidden; cursor: grab; touch-action: none;
    border: 1px solid var(--bc); background-color: var(--bg); background-size: auto 100%; background-repeat: repeat-x; background-position: left center;
    transition: box-shadow .12s ease, opacity .12s ease; }
.tle-blk.l-video { --bc: rgba(167, 139, 250, .85); --bg: rgba(109, 40, 217, .42); }
.tle-blk.l-overlay { --bc: rgba(34, 211, 238, .85); --bg: rgba(8, 145, 178, .42); }
.tle-blk.l-voice { --bc: rgba(251, 191, 36, .85); --bg: rgba(180, 83, 9, .45); }
.tle-blk.l-music { --bc: rgba(232, 121, 249, .9); --bg: rgba(162, 28, 175, .45); }
.tle-blk.l-sfx { --bc: rgba(52, 211, 153, .85); --bg: rgba(4, 120, 87, .48); }
.tle-blk:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.tle-blk.is-sel { box-shadow: 0 0 0 2px #fff, 0 0 16px rgba(217, 70, 239, .6); z-index: 3; }
.tle-blk.is-drag { cursor: grabbing; z-index: 4; }
.tle-blk.is-out { opacity: .38; }
.tle-blk-body { position: absolute; top: 0; bottom: 0; left: 7px; right: 7px; display: flex; align-items: center; gap: 5px; pointer-events: none; overflow: hidden; }
.tle-blk-ic { display: none; flex-shrink: 0; color: #fff; opacity: .85; }
.tle-blk-ic svg { width: 11px; height: 11px; }
.tle-blk.is-muted .tle-blk-ic, .tle-blk.is-loop .tle-blk-ic { display: block; }
.tle-blk-label { min-width: 0; font-size: 11px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.tle-blk-dur { margin-left: auto; flex-shrink: 0; font-size: 9.5px; color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.tle-blk.is-short .tle-blk-dur, .tle-blk.is-tiny .tle-blk-label { display: none; }
.tle-blk-h { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 2; }
.tle-blk-hl { left: 0; }
.tle-blk-hr { right: 0; }
.tle-blk-h::after { content: ''; position: absolute; top: 25%; bottom: 25%; left: 3px; width: 2px; border-radius: 2px; background: transparent; transition: background .15s; }
.tle-blk:hover .tle-blk-h::after, .tle-blk.is-sel .tle-blk-h::after { background: rgba(255, 255, 255, .9); }
.tle-blk.is-tiny .tle-blk-h { width: 5px; }

/* ── боковая панель ──────────────────────────────────────────────────────── */
.tle-side-in { flex: 1 1 auto; min-height: 340px; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08); background: rgba(14, 14, 18, .74); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
@media (min-width: 768px) { .tle-side-in { min-height: 0; } }
.tle-side-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--tle-line); flex-shrink: 0; }
.tle-side-title { flex: 1 1 auto; min-width: 0; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: rgba(240, 171, 252, .88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tle-side-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.tle-side-foot { flex-shrink: 0; padding: 10px; border-top: 1px solid var(--tle-line); display: flex; flex-direction: column; gap: 6px; }
/* Render — те же классы, что у кнопки Generate студии (#generate-btn, studio.html): шрифт, размер, отступы — её */
.tle-render:disabled { opacity: .55; }

.tle-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 11px; border-radius: 10px; font-size: 12px; font-weight: 700;
    color: #e4e4e7; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); transition: background .15s, color .15s, border-color .15s; white-space: nowrap; }
.tle-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .1); color: #fff; }
.tle-btn:disabled { opacity: .5; }
.tle-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.tle-btn.sm { padding: 5px 9px; font-size: 11px; border-radius: 8px; }
.tle-btn.is-acc { color: #fff; border-color: transparent; background: linear-gradient(90deg, #c026d3, #9333ea); box-shadow: 0 0 18px rgba(217, 70, 239, .25); }
.tle-btn.is-acc:hover:not(:disabled) { background: linear-gradient(90deg, #d946ef, #a855f7); }
.tle-btn.is-danger { color: #fda4af; }
.tle-btn.is-danger:hover:not(:disabled) { background: rgba(244, 63, 94, .14); color: #fecdd3; border-color: rgba(244, 63, 94, .35); }
.tle-btn.wide { width: 100%; }
.tle-note { font-size: 11px; line-height: 1.45; color: var(--tle-mute); }
.tle-hint { font-size: 12.5px; line-height: 1.5; color: var(--tle-dim); padding: 6px 2px; }

.tle-sec { border: 1px solid rgba(255, 255, 255, .07); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.tle-sec.is-open { border-color: rgba(217, 70, 239, .28); background: rgba(217, 70, 239, .03); }
.tle-sec-h { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left; color: #fff; background: none; border: 0; }
.tle-sec-ico { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #f0abfc;
    background: linear-gradient(135deg, rgba(217, 70, 239, .22), rgba(124, 58, 237, .22)); border: 1px solid rgba(255, 255, 255, .08); }
.tle-sec-ico svg { width: 16px; height: 16px; }
.tle-sec-tt { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 700; }
.tle-sec-tt small { display: block; margin-top: 1px; font-size: 10.5px; font-weight: 500; color: var(--tle-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tle-chev { color: var(--tle-mute); transition: transform .2s ease; }
.tle-chev svg { width: 14px; height: 14px; }
.tle-sec.is-open .tle-chev { transform: rotate(180deg); }
.tle-sec-b { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.tle-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.tle-chip { padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--tle-dim); background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08); transition: color .15s, background .15s, border-color .15s; }
.tle-chip:hover { color: #fff; }
.tle-chip.is-on { color: #fff; background: rgba(217, 70, 239, .18); border-color: rgba(217, 70, 239, .55); }
.tle-search { width: 100%; border-radius: 10px; padding: 7px 10px; font-size: 12px; }
.tle-list { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3f3f46 transparent; }
.tle-li { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; background: rgba(255, 255, 255, .025); border: 1px solid transparent; transition: border-color .15s; }
.tle-li:hover { border-color: rgba(217, 70, 239, .35); }
/* строки источников перетаскиваются на дорожки таймлайна (владелец 2026-10-21: «вместо кнопок — перетаскивать») */
.tle-li[draggable="true"] { cursor: grab; }
.tle-li[draggable="true"]:active { cursor: grabbing; }
.tle-li.is-drag { opacity: .45; }
/* призрак броска: где ляжет и какой длины будет блок — как #edit-drag-ghost старого Edit Video (пунктир #d946ef,
   заливка 10 %); вместо светящейся линии (владелец 2026-10-21: «вместо ползунка — просто фантом-блок») */
.tle-ghost { position: absolute; left: 0; top: 0; box-sizing: border-box; border: 1px dashed #d946ef; border-radius: 7px;
    background: rgba(217, 70, 239, .10); pointer-events: none; z-index: 5; will-change: transform; }
.tle-li-thumb { position: relative; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; background: #18181b; flex-shrink: 0; }
.tle-li-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tle-li-thumb .tle-card-ph svg { width: 18px; height: 18px; }
.tle-li-dur { position: absolute; right: 3px; bottom: 3px; padding: 1px 4px; border-radius: 4px; font-size: 9px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .72); }
.tle-li-main { flex: 1 1 auto; min-width: 0; }
.tle-li-title { font-size: 12px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tle-li-sub { font-size: 10.5px; color: var(--tle-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.tle-li-acts { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.tle-mini { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 7px; font-size: 10.5px; font-weight: 700; color: #f5d0fe;
    background: rgba(217, 70, 239, .14); border: 1px solid rgba(217, 70, 239, .32); transition: background .15s, color .15s; white-space: nowrap; }
.tle-mini:hover:not(:disabled) { background: rgba(217, 70, 239, .3); color: #fff; }
.tle-mini:disabled { opacity: .5; }
.tle-mini svg { width: 11px; height: 11px; }
.tle-pbtn { width: 30px; height: 30px; flex-shrink: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
    color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); transition: background .15s; }
.tle-pbtn:hover { background: rgba(217, 70, 239, .35); }
.tle-pbtn.is-on { background: #d946ef; border-color: #d946ef; }
.tle-pbtn svg { width: 12px; height: 12px; }
.tle-group { padding: 6px 2px 1px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--tle-mute); }
.tle-empty { padding: 12px 4px; text-align: center; font-size: 11.5px; color: var(--tle-mute); }
.tle-upbar { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.tle-upbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #d946ef, #a855f7); transition: width .2s ease; }

.tle-card2 { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(135deg, rgba(217, 70, 239, .08), rgba(124, 58, 237, .06)); }
.tle-card2-t { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #fff; }
.tle-card2-t svg { width: 16px; height: 16px; color: #f0abfc; }
.tle-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(217, 70, 239, .1); border: 1px solid rgba(217, 70, 239, .35); }
.tle-banner > svg { width: 16px; height: 16px; color: #f0abfc; flex-shrink: 0; }
.tle-banner-tt { flex: 1 1 auto; min-width: 0; font-size: 12px; color: #fff; }
.tle-banner-tt b { font-weight: 700; }
.tle-banner-tt small { display: block; font-size: 10.5px; color: var(--tle-dim); margin-top: 2px; }

/* свойства выбранного блока */
.tle-props { display: flex; flex-direction: column; gap: 13px; }
.tle-ph { display: flex; align-items: center; gap: 8px; }
.tle-lane-tag { flex-shrink: 0; padding: 3px 7px; border-radius: 6px; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.tle-ph-title { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tle-x { width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
    color: var(--tle-dim); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); }
.tle-x:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.tle-x svg { width: 13px; height: 13px; }
.tle-time2 { font: 600 11px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; color: var(--tle-dim); }
.tle-row { display: flex; flex-direction: column; gap: 6px; }
.tle-row-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 600; color: var(--tle-dim); }
.tle-row-h b { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.tle-row input[type=range] { width: 100%; }
.tle-row input[type=range]:disabled { opacity: .4; }
.tle-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 11px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .06); }
.tle-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 6px; border-radius: 8px; border: 0;
    font-size: 12px; font-weight: 700; color: var(--tle-dim); background: none; transition: background .15s, color .15s; }
.tle-seg button svg { width: 14px; height: 14px; }
.tle-seg button:hover { color: #fff; }
.tle-seg button.is-on { color: #fff; background: rgba(217, 70, 239, .22); box-shadow: inset 0 0 0 1px rgba(217, 70, 239, .55); }
.tle-boxes { position: relative; width: 108px; aspect-ratio: 9 / 12; border-radius: 9px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .1); }
.tle-boxes button { position: absolute; width: 34%; height: 22%; border-radius: 5px; border: 1px dashed rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .04); padding: 0; }
.tle-boxes button:hover { border-color: rgba(240, 171, 252, .8); }
.tle-boxes button.is-on { border-style: solid; border-color: #e879f9; background: rgba(217, 70, 239, .45); }
.tle-boxes [data-v=tl] { left: 6%; top: 5%; }
.tle-boxes [data-v=tr] { right: 6%; top: 5%; }
.tle-boxes [data-v=c] { left: 33%; top: 39%; }
.tle-boxes [data-v=bl] { left: 6%; bottom: 5%; }
.tle-boxes [data-v=br] { right: 6%; bottom: 5%; }
.tle-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--tle-text); cursor: pointer; user-select: none; }
.tle-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tle-switch span.k { position: relative; width: 30px; height: 17px; flex-shrink: 0; border-radius: 999px; background: #3f3f46; transition: background .15s; }
.tle-switch span.k::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 999px; background: #fff; transition: transform .15s; }
.tle-switch input:checked + span.k { background: #d946ef; }
.tle-switch input:checked + span.k::after { transform: translateX(13px); }
.tle-switch input:focus-visible + span.k { box-shadow: 0 0 0 2px rgba(240, 171, 252, .7); }
.tle-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tle-actions .tle-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }

@media (max-width: 767px) {
    .tle-heads { width: 66px; }
    .tle-head { padding: 0 7px; font-size: 10px; }
    .tle-zoomwrap { display: none; }
    .tle-open { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .tle-card, .tle-play, .tle-blk, .tle-chev { transition: none; }
}
