/* Trim video: a preview, then one strip per cut with two handles, in the order the cuts will play */
.tv-editor { display: grid; gap: 16px; }
.tv-preview { background: #0e0807; border-radius: 16px; overflow: hidden; }
.tv-preview video { display: block; width: 100%; max-height: 440px; background: #000; }
.tv-preview-bar { display: flex; align-items: center; gap: 12px 16px; padding: 10px 14px; background: #171717; color: #fff; flex-wrap: wrap; }
.tv-play { font: 500 13px/1 var(--sans); color: var(--ink); background: #fff; border: 0; border-radius: var(--pill); padding: 9px 14px; cursor: pointer; }
.tv-play:hover { background: var(--yellow); }
.tv-time { font: 500 13px/1 var(--sans); font-variant-numeric: tabular-nums; }
.tv-hint { font: 400 12.5px/1.4 var(--sans); color: rgba(255, 255, 255, 0.62); }

.tv-clips { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: cut; }
.tv-clip { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; display: grid; gap: 10px; transition: border-color var(--t) var(--ease); }
.tv-clip.is-active { border-color: var(--ink); }
.tv-clip.is-drop { outline: 2px dashed var(--muted-2); outline-offset: 3px; }
.tv-clip-head { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.tv-clip-head::before { counter-increment: cut; content: counter(cut); font: 600 12px/1 var(--sans); width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.tv-grip { cursor: grab; color: var(--muted-2); display: grid; place-items: center; width: 18px; flex: none; touch-action: none; }
.tv-grip:active { cursor: grabbing; }
.tv-name { font: 500 14px/1.3 var(--sans); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34%; }
.tv-range { font: 400 13px/1.3 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.tv-actions { margin-left: auto; display: flex; gap: 4px; }
.tv-btn { font: 500 12px/1 var(--sans); border: 1px solid var(--line); background: #fff; border-radius: var(--pill); padding: 7px 11px; cursor: pointer; color: var(--ink); }
.tv-btn:hover { border-color: var(--ink); }
.tv-btn:disabled { opacity: 0.4; cursor: default; }

.tv-strip { position: relative; height: 64px; border-radius: 10px; overflow: hidden; background: #171717; touch-action: none; user-select: none; -webkit-user-select: none; }
.tv-frames { position: absolute; inset: 0; display: flex; }
.tv-frames img { flex: 1 1 0; min-width: 0; height: 100%; object-fit: cover; display: block; }
.tv-frames.is-empty::after { content: "Reading the video…"; position: absolute; inset: 0; display: grid; place-items: center; font: 400 12px/1 var(--sans); color: rgba(255, 255, 255, 0.55); }
.tv-shade { position: absolute; top: 0; bottom: 0; background: rgba(14, 8, 7, 0.66); pointer-events: none; }
.tv-shade-l { left: 0; }
.tv-shade-r { right: 0; }
.tv-sel { position: absolute; top: 0; bottom: 0; border-top: 3px solid var(--yellow); border-bottom: 3px solid var(--yellow); box-sizing: border-box; cursor: grab; }
.tv-sel:active { cursor: grabbing; }
.tv-handle { position: absolute; top: 0; bottom: 0; width: 14px; background: var(--yellow); cursor: ew-resize; display: grid; place-items: center; }
.tv-handle::after { content: ""; width: 2px; height: 22px; background: rgba(14, 8, 7, 0.5); border-radius: 2px; }
.tv-handle-l { border-radius: 10px 0 0 10px; }
.tv-handle-r { border-radius: 0 10px 10px 0; }
.tv-cursor { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; pointer-events: none; display: none; }
.tv-times { display: flex; gap: 14px; flex-wrap: wrap; }
.tv-times label { display: flex; align-items: center; gap: 8px; font: 500 12.5px/1 var(--sans); color: var(--muted); }
.tv-times input { width: 96px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; font: 500 14px/1.2 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink); background: #fff; }
.tv-times input:focus { outline: none; border-color: var(--ink); }
.tv-add { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tv-total { font: 500 14px/1.3 var(--sans); color: var(--muted); }
@media (max-width: 600px) {
  .tv-name { max-width: 100%; }
  .tv-actions { margin-left: 0; }
  .tv-hint { display: none; }
}
