/* Обрезка и субтитры (trim.html, subtitles.html) — поверх style.css + compress.css */
.clip-head { margin-bottom: 8px; word-break: break-all; }
.player { background: #000; border-radius: 10px; overflow: hidden; display: grid; place-items: center; }
.player video, .player canvas { width: 100%; max-height: 60vh; display: block; }
.timeline { position: relative; height: 56px; margin: 12px 0 6px; border-radius: 8px; background: var(--bar); overflow: hidden; touch-action: none; }
.timeline .strip { position: absolute; inset: 0; display: flex; }
.timeline .strip canvas { flex: 1; min-width: 0; height: 100%; object-fit: cover; opacity: .55; }
.timeline .sel { position: absolute; top: 0; bottom: 0; border: 3px solid var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 12%, transparent); pointer-events: none; }
.timeline .playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--fg); pointer-events: none; }
.timeline input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: none; pointer-events: none; appearance: none; -webkit-appearance: none; }
.timeline input[type=range]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 14px; height: 56px; border-radius: 4px; background: var(--accent); cursor: ew-resize; }
.timeline input[type=range]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 56px; border: 0; border-radius: 4px; background: var(--accent); cursor: ew-resize; }
.clip-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 8px 0; }
.clip-row label { display: flex; gap: 6px; align-items: center; }
.clip-row select { width: auto; margin: 0; }
input.tm { width: 7.5em; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); font-variant-numeric: tabular-nums; }
.clip-mode { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; display: grid; gap: 6px; }
.clip-mode label { font-size: 14px; }
#bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
/* субтитры */
.cues { display: grid; gap: 6px; max-height: 50vh; overflow: auto; margin: 10px 0; padding-right: 4px; }
.cue { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; padding: 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); }
.cue.now { border-color: var(--accent); }
.cue .tc { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap; padding-top: 6px; }
.cue textarea { width: 100%; min-height: 2.6em; resize: vertical; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; font-size: 14px; }
.cue button { padding: 2px 8px; background: none; color: var(--muted); font-size: 18px; }
.subs-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; margin: 10px 0; }
.subs-opts label { display: grid; gap: 2px; font-size: 14px; }
.player { position: relative; }
.player .overlay { position: absolute; left: 5%; right: 5%; bottom: 6%; text-align: center; color: #fff; font-weight: 600; font-size: clamp(14px, 3.2vw, 26px);
  text-shadow: 0 0 4px #000, 0 0 4px #000, 0 0 2px #000; pointer-events: none; white-space: pre-line; }

/* CompressLab utility theme: the editing preview is functional, not a hero. */
#editor { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 28px; }
.clip-head { margin-bottom: 16px; font-size: 15px; overflow-wrap: anywhere; }
.player { border-radius: 5px; max-width: 960px; }
.player video, .player canvas { max-height: 360px; object-fit: contain; }
.timeline { border-radius: 4px; max-width: 960px; }
.timeline .sel { border-radius: 4px; }
.timeline input[type=range]:focus-visible { outline-offset: -3px; }
.clip-row { gap: 12px 16px; margin: 16px 0; }
.clip-row label { flex-wrap: wrap; }
.clip-mode { border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 0; margin: 24px 0; gap: 12px; }
.clip-mode legend { font-weight: 550; padding-right: 8px; }
.clip-mode label { line-height: 1.6; }
.cue { border-radius: 4px; padding: 12px; background: transparent; }
.cue button { min-width: 36px; min-height: 44px; }
@media(max-width:540px) {
 .player video, .player canvas { max-height: 240px; }
 .clip-row select { max-width: 100%; }
 .clip-row { gap: 10px; }
 .clip-row button { max-width: 100%; }
 .subs-opts { grid-template-columns: minmax(0,1fr); }
 .cue { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
 .cue .tc { grid-column: 1; white-space: normal; }
 .cue textarea { grid-column: 1; grid-row: 2; }
 .cue button { grid-column: 2; grid-row: 1 / 3; }
}
