.gen-video-trim{box-sizing:border-box;width:min(540px,calc(100% - 24px));max-height:92vh;max-height:92dvh;margin:auto;padding:22px;border:1px solid var(--line,#d5d5d5);border-radius:24px;background:var(--bg,#fff);color:var(--text,#161616);box-shadow:0 20px 90px #0003;overflow-y:auto;overscroll-behavior:contain;font:inherit}
.gen-video-trim::backdrop{background:#0007;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.gen-video-trim h2{font-size:21px;line-height:1.4;margin:0 0 8px;font-weight:650}
.gen-video-trim p{line-height:1.55;margin:8px 0;font-size:14px}
.gen-video-trim .gen-video-trim-name{overflow-wrap:anywhere;color:var(--muted,#666);font-size:13px}
.gen-video-trim .gen-video-trim-quota{font-weight:550;margin:12px 0}
.gen-video-trim video{display:block;width:100%;max-height:32vh;max-height:32dvh;object-fit:contain;background:#111;border-radius:14px;margin:14px 0}
.gen-video-trim-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;margin:16px 0 12px}
.gen-video-trim-fields[hidden]{display:none}
.gen-video-trim-fields label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:15px;min-height:44px}
.gen-video-trim-fields input[type=number]{box-sizing:border-box;width:112px;min-height:44px;padding:8px 10px;border:1px solid var(--line,#ccc);border-radius:10px;color:inherit;background:transparent;font:inherit;text-align:right}
.gen-video-trim-fields input[type=range]{width:100%;min-height:44px;margin:0;accent-color:var(--text,#222);touch-action:pan-y}
.gen-video-trim .gen-video-trim-selection{font-size:15px;font-weight:600}
.gen-video-trim .gen-video-trim-help{color:var(--muted,#666);font-size:13px}
.gen-video-trim .gen-video-trim-status{min-height:22px}
.gen-video-trim .gen-video-trim-error{color:var(--danger,#b42626)}
.gen-video-trim progress{display:block;width:100%;height:8px;margin:10px 0;accent-color:var(--text,#222)}
.gen-video-trim progress[hidden]{display:none}
.gen-video-trim-actions{position:sticky;bottom:-22px;display:flex;justify-content:flex-end;gap:12px;padding:14px 0 max(4px,env(safe-area-inset-bottom));background:var(--bg,#fff)}
.gen-video-trim-actions button{min-height:44px;border:1px solid var(--line,#ccc);border-radius:100px;padding:10px 20px;font:inherit;font-size:15px;background:transparent;color:inherit;cursor:pointer}
.gen-video-trim-actions .gen-video-trim-confirm{color:var(--bg,#fff);background:var(--text,#161616);border-color:transparent}
.gen-video-trim-actions button:disabled{opacity:.45;cursor:wait}
.gen-video-trim :is(button,input):focus-visible{outline:2px solid var(--text,#222);outline-offset:3px}
@media(max-width:520px){.gen-video-trim{padding:18px;border-radius:22px}.gen-video-trim-actions{bottom:-18px}.gen-video-trim-actions button{flex:1}}
.gen-video-timeline{position:relative;margin:8px 12px;height:54px;border-radius:8px;isolation:isolate;background:#222}
.gen-video-timeline canvas{width:100%;height:100%;border-radius:8px;opacity:.8}
.gen-video-timeline .gen-video-interval{position:absolute;inset:0 calc(100% - var(--clip-end)) 0 var(--clip-start);border-block:3px solid #ffd34b;pointer-events:none}
.gen-video-trim-fields .gen-video-timeline input[type=range]{position:absolute;inset:0 -12px;width:calc(100% + 24px);height:100%;margin:0;padding:0;appearance:none;-webkit-appearance:none;background:transparent;pointer-events:none}
.gen-video-timeline input::-webkit-slider-thumb{pointer-events:auto;appearance:none;-webkit-appearance:none;width:24px;height:52px;border:3px solid #ffd34b;border-radius:7px;background:linear-gradient(90deg,#ffd34b 42%,#4a3b12 43% 55%,#ffd34b 56%);cursor:ew-resize}
.gen-video-timeline input::-moz-range-thumb{pointer-events:auto;width:18px;height:46px;border:3px solid #ffd34b;border-radius:7px;background:#ffd34b;cursor:ew-resize}
.gen-video-trim video.gen-timeline-decoder{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;margin:0}
