/* Editor de vídeo de HM Studio (se carga después de styles.css, que comparte con el editor de audio) */
.video-page { --lane-v: 72px; --lane-m: 54px; --pad: 16px; }

.v-main { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.v-preview { flex: none; height: clamp(150px, 34dvh, 46vh); position: relative; background: #000; overflow: hidden; cursor: pointer; }
.v-preview canvas { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }

.toolbar .chip { display: inline-flex; align-items: center; gap: 4px; color: var(--text); }
.toolbar .chip svg { width: 15px; height: 15px; }

.v-tl { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.v-tl .scroller { overflow-x: auto; overflow-y: hidden; }
.v-tl .timeline { min-height: 0; height: 100%; padding-top: 8px; }
.vlane { position: relative; height: var(--lane-v); border-bottom: 1px solid var(--line-soft); }
.vlane.music { height: var(--lane-m); }
.lane-add { position: absolute; left: var(--pad); top: 6px; bottom: 6px; padding: 0 14px; border-radius: 8px; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.lane-add svg { width: 14px; height: 14px; }

/* Clips: los no seleccionados dejan desplazar la línea de tiempo con el dedo; el seleccionado se arrastra. */
.video-page .clip { touch-action: pan-x pan-y; cursor: pointer; }
.video-page .clip.sel { touch-action: none; cursor: grab; }
.video-page .clip.v { --c: #3fa7ff; }
.video-page .clip.m { --c: #38d39f; }
.strip { position: absolute; inset: 16px 0 0 0; display: flex; overflow: hidden; pointer-events: none; }
.strip i { flex: none; height: 100%; background: #0b0d11 center / cover no-repeat; border-right: 1px solid rgba(0,0,0,.35); }
.clip .badge-t { position: absolute; left: 4px; bottom: 3px; font-size: 10px; font-weight: 800; padding: 0 4px; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff; pointer-events: none; }
.clip.v .fade { z-index: 1; }
.insert-mark { position: absolute; top: 4px; width: 3px; margin-left: -1.5px; height: calc(var(--lane-v) + 4px); background: #ffd36b; border-radius: 2px; z-index: 6; pointer-events: none; }
.insert-mark[hidden] { display: none; }
.clip.ghost { opacity: .85; z-index: 5; box-shadow: 0 10px 24px rgba(0,0,0,.55); }
.past-end { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(0,0,0,.35) 0 6px, transparent 6px 12px); pointer-events: none; z-index: 2; }

.time { display: flex; align-items: baseline; }
.time small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 2px; }

.sheet-actions.five { grid-template-columns: repeat(5, 1fr); }
.sheet .text.area { height: auto; padding: 8px 12px; resize: vertical; font-size: 16px; line-height: 1.3; }
.sheet[data-k="m"] .only-clip, .sheet[data-k="m"] .only-video, .sheet[data-k="m"] .only-image,
.sheet[data-k="v"] .only-music, .sheet[data-k="v"] .only-image,
.sheet[data-k="i"] .only-music, .sheet[data-k="i"] .only-video, .sheet[data-k="i"] .only-audio { display: none; }

.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; font-size: 13px; color: var(--muted); }
.menu-row .seg-btn { padding: 5px 8px; font-size: 12px; }
.menu-row .seg-btn.on { color: var(--accent); }

@media (min-width: 720px) {
  .video-page { --lane-v: 84px; --lane-m: 60px; }
  .v-preview { height: clamp(200px, 46dvh, 60vh); }
}
body.exporting .transport, body.exporting .toolbar { pointer-events: none; opacity: .5; }
#pool { position: fixed; left: 0; top: 0; width: 2px; height: 2px; overflow: hidden; opacity: 0; pointer-events: none; z-index: -1; }
#pool video { width: 2px; height: 2px; }
