/* Clip workspace: the source, its selected range, and the assembled cut. */
body:has(.ce) { overflow:hidden; }
.ce, .ce-dialog, .ce-toast { font-family:var(--bz-font-ui); color:var(--bz-text); font-size:14px; }
.ce *, .ce-dialog * { box-sizing:border-box; }
.ce [hidden], .ce-dialog [hidden], .ce-toast[hidden] { display:none!important; }
.ce { height:100dvh; min-height:560px; display:grid; grid-template-columns:258px minmax(300px,1fr) 256px; grid-template-rows:66px minmax(0,1fr) 182px; grid-template-areas:'header header header' 'library work inspector' 'sequence sequence sequence'; background:var(--bz-bg); }
.ce button, .ce-dialog button, .ce-dialog a { font:500 14px/1.15 var(--bz-font-ui); cursor:pointer; }
.ce button, .ce-dialog button { color:var(--bz-text); border:1px solid transparent; background:none; border-radius:4px; display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:8px 10px; }
.ce button:hover, .ce-dialog button:hover { background:var(--bz-surface-3); }
.ce button:disabled, .ce-dialog button:disabled { opacity:.35; cursor:default; }
.ce button:focus-visible, .ce-dialog button:focus-visible, .ce input:focus-visible, .ce-dialog input:focus-visible, .ce select:focus-visible, .ce-dialog select:focus-visible, .ce-dialog textarea:focus-visible, .ce-crop-frame:focus-visible { outline:2px solid var(--bz-focus); outline-offset:2px; }
.ce .bz-icon, .ce-dialog .bz-icon { width:18px;height:18px;flex:none; }
.ce .ce-primary, .ce-dialog .ce-primary { background:var(--bz-accent); color:var(--bz-text); border:0; font-weight:700; clip-path:polygon(0 0,calc(100% - 9px) 0,100% 9px,100% 100%,0 100%); border-radius:0; padding:11px 16px; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.ce .ce-primary:hover, .ce-dialog .ce-primary:hover { background:var(--bz-accent-strong); }
.ce .ce-primary.is-added { background:var(--bz-surface-2);color:var(--bz-text-dim);border:1px solid var(--bz-border);clip-path:none;opacity:1; }
.ce .ce-secondary, .ce-dialog .ce-secondary { border-color:var(--bz-border-strong); background:var(--bz-surface-2); }
.ce .ce-text { color:var(--bz-text-dim); padding:6px; font-size:13px; }
.ce .ce-icon, .ce-dialog .ce-icon { width:36px; padding:7px;flex:none; }
.ce .ce-wide, .ce-dialog .ce-wide { width:100%; }
.ce input:not([type=range]), .ce select, .ce-dialog input, .ce-dialog select, .ce-dialog textarea { background:var(--bz-surface-2); border:1px solid var(--bz-border); border-radius:4px; color:var(--bz-text); font:400 15px/1.25 var(--bz-font-ui); padding:10px; width:100%; min-width:0; }
.ce input::placeholder, .ce-dialog input::placeholder { color:var(--bz-text-muted); }
.ce h2, .ce-dialog h2 { font:800 13px/1.2 var(--bz-font-display); letter-spacing:.09em; margin:0; }
.ce-muted { color:var(--bz-text-muted); font-size:12px;line-height:1.4; }
.ce-time, .ce time, .ce-camera-key, .ce-shot-index, .ce-mark-row input, .ce-dialog dt { font-family:var(--bz-font-mono)!important;font-variant-numeric:tabular-nums; }
.ce-eyebrow { font-size:10px; font-weight:700; letter-spacing:.14em; color:var(--bz-text-muted); }
.ce-spacer { flex:1; }
.ce-row { display:flex;gap:8px;align-items:center; }
.ce-header { grid-area:header; border-bottom:1px solid var(--bz-border);display:flex;align-items:center;gap:8px;padding:0 20px;min-width:0;background:var(--bz-surface-1); }
.ce-brand { display:flex;gap:12px;align-items:center;color:var(--bz-text);text-decoration:none;flex:none;font:800 16px var(--bz-font-display);letter-spacing:.04em;padding-right:20px; }
.ce-brand img { width:43px;height:39px; }
.ce .ce-fight { justify-content:space-between;min-width:140px;max-width:440px;text-align:left;border-left:1px solid var(--bz-border);border-radius:0; }
.ce-fight span { overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.ce-save { margin-left:auto;font-size:12px;color:var(--bz-text-muted);white-space:nowrap; }
.ce-panel-heading { display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px; }
.ce-panel-heading h2 span { color:var(--bz-text-muted);margin-left:4px;font-family:var(--bz-font-mono); }
.ce-library { grid-area:library;min-height:0;display:flex;flex-direction:column;border-right:1px solid var(--bz-border);padding:18px 14px 12px;background:var(--bz-surface-1); }
.ce-camera-actions { display:flex;gap:2px;margin:10px 0 14px;border-bottom:1px solid var(--bz-border);padding-bottom:6px; }
.ce .ce-camera-actions button { flex:1;font-size:12px;padding:6px 3px;min-height:32px; }
.ce button[aria-pressed=true] { background:var(--bz-accent-bg);border-color:var(--bz-accent-dim);box-shadow:inset 3px 0 var(--bz-accent);color:var(--bz-text);border-radius:0;clip-path:polygon(0 0,calc(100% - 5px) 0,100% 5px,100% 100%,0 100%); }
.ce-camera-grid { overflow:auto;flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;gap:8px;align-content:start;padding:2px; }
.ce-camera-group { grid-column:1/-1;font-size:10px;font-weight:700;letter-spacing:.12em;color:var(--bz-text-muted);margin:8px 0 0; }
.ce .ce-camera { display:flex;flex-direction:column;gap:0;align-items:stretch;justify-content:start;padding:0;text-align:left;overflow:hidden;border:1px solid var(--bz-border);background:var(--bz-bg);position:relative;min-width:0; }
.ce-camera video { width:100%;aspect-ratio:16/9;object-fit:cover;background:var(--bz-surface-2);pointer-events:none; }
.ce-camera-name { font-size:12px;line-height:1.2;font-weight:500;padding:8px 7px 2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.ce-camera-state { color:var(--bz-text-muted);font-size:10px;padding:1px 7px 8px; }
.ce-camera-key { position:absolute;top:4px;right:4px;background:rgba(10,8,20,.8);padding:3px;font-size:9px; }
.ce-cache-panel { border-top:1px solid var(--bz-border);padding-top:10px;margin-top:10px;font-size:12px; }
.ce-cache-panel>div { display:flex;align-items:center;justify-content:space-between;gap:8px; }
.ce-cache-panel progress { width:100%;height:3px;accent-color:var(--bz-accent);display:block;margin:4px 0 6px;border:0; }
.ce-cache-panel progress::-webkit-progress-bar { background:var(--bz-surface-3); }
.ce-cache-panel progress::-webkit-progress-value { background:var(--bz-accent); }
.ce-workspace { grid-area:work;min-height:0;min-width:0;display:flex;flex-direction:column;padding:0 20px 14px; }
.ce-view-heading { flex:none;height:48px;display:flex;align-items:center;justify-content:space-between;gap:10px; }
.ce-view-heading>div { overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.ce-view-heading .ce-eyebrow { margin-right:12px; }
#ce-source-name { font-size:13px;font-weight:500; }
.ce-stage { position:relative;flex:1;min-height:130px;display:flex;align-items:center;justify-content:center;background:var(--bz-surface-1);overflow:hidden;border:1px solid var(--bz-border);border-radius:4px; }
.ce-picture { position:relative;max-width:100%;max-height:100%;width:100%;height:100%;overflow:hidden; }
.ce-picture video { width:100%;height:100%;display:block;object-fit:contain; }
.ce-picture.is-output { aspect-ratio:16/9; }
.ce-picture.is-output video { position:absolute;max-width:none;max-height:none;object-fit:fill; }
.ce-welcome { position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:radial-gradient(ellipse at center,var(--bz-surface-2),var(--bz-bg)); }
.ce-welcome img { width:90px;opacity:.3; }
.ce-welcome h1 { font:400 clamp(24px,3vw,44px)/1.1 var(--bz-font-hero);margin:0; }
.ce-playback-state { position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:10px 16px;background:rgba(10,8,20,.9);border:1px solid var(--bz-border-strong);display:flex;gap:12px;align-items:center;max-width:90%;text-align:center;z-index:6;border-radius:4px; }
.ce-media-badge { position:absolute;left:10px;top:10px;font:400 10px var(--bz-font-mono);background:rgba(10,8,20,.85);padding:7px 9px;pointer-events:none; }
.ce .ce-crop-done { position:absolute;right:10px;top:10px;background:var(--bz-surface-2);border-color:var(--bz-border-strong); }
.ce-transport { flex:none;display:flex;gap:3px;align-items:center;height:54px; }
.ce .ce-play { background:var(--bz-surface-3);width:40px;height:38px;border:1px solid var(--bz-border-strong);margin:0 5px; }
.ce-transport .ce-time { font-size:12px;margin-left:6px; }
.ce-trimmer { flex:none;border-top:1px solid var(--bz-border); }
.ce-trim-heading { display:flex;align-items:center;height:35px;gap:10px; }
.ce-trim-heading .ce-time { font-size:10px; }
.ce-scroll { overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;padding-bottom:4px; }
.ce-source-track { position:relative;height:84px;min-width:100%;touch-action:pan-x; }
.ce-ruler { height:20px;position:absolute;top:0;left:0;width:100%;overflow:hidden; }
.ce-ruler span { position:absolute;top:0;font:400 9px var(--bz-font-mono);color:var(--bz-text-muted);border-left:1px solid var(--bz-border);padding-left:4px;height:100%; }
.ce-filmstrip { position:absolute;top:20px;left:0;height:42px;width:100%;background:var(--bz-surface-2);opacity:.75; }
.ce-waveform { position:absolute;top:62px;left:0;height:20px;width:100%;background:var(--bz-surface-1); }
.ce-range { position:absolute;top:20px;bottom:2px;border:2px solid var(--bz-accent);background:color-mix(in srgb,var(--bz-accent) 10%,transparent);pointer-events:none;z-index:3; }
.ce .ce-move-range { position:absolute;inset:0;width:100%;height:100%;min-height:0;min-width:0;padding:0;border:0;border-radius:0;pointer-events:auto;touch-action:none;cursor:grab;background:transparent; }
.ce .ce-move-range:hover { background:var(--bz-accent-bg); }
.ce .ce-range.is-moving .ce-move-range { cursor:grabbing; }
.ce .ce-handle { z-index:1;pointer-events:auto;position:absolute;top:-2px;bottom:-2px;width:13px;min-height:0;padding:0;background:var(--bz-accent);border:0;border-radius:2px;cursor:ew-resize;touch-action:none; }
.ce-handle::after { content:'';height:16px;width:2px;background:var(--bz-text);opacity:.85; }
.ce-handle-in { left:-6px; }.ce-handle-out { right:-6px; }
.ce-playhead { position:absolute;top:16px;bottom:0;width:2px;background:var(--bz-text);z-index:4;pointer-events:none; }
.ce-playhead::before { content:'';position:absolute;top:-4px;left:-4px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid var(--bz-text); }
#ce-seek { position:absolute;inset:20px 0 0;width:100%;height:62px;opacity:0;margin:0;cursor:crosshair;z-index:2; }
.ce-mark-row { display:flex;align-items:center;gap:8px;padding-top:8px; }
.ce-mark-row label { color:var(--bz-text-muted);font-size:9px;display:flex;flex-direction:column;gap:2px; }
.ce .ce-mark-row input { width:93px;padding:5px;font-size:11px;border-color:transparent;background:var(--bz-surface-1); }
.ce-mark-row kbd { font:400 9px var(--bz-font-mono);color:var(--bz-text-muted); }
.ce-mark-row .ce-primary { margin-left:auto;white-space:nowrap; }
.ce-range-duration { color:var(--bz-text-dim);font-size:11px; }
.ce-inspector { grid-area:inspector;background:var(--bz-surface-1);border-left:1px solid var(--bz-border);padding:20px 16px;overflow:auto; }
.ce fieldset { border:0;padding:0;margin:0;min-width:0; }
.ce fieldset:disabled { opacity:.4; }
.ce-inspector section { padding:16px 0;border-bottom:1px solid var(--bz-border); }
.ce-inspector section:first-child { padding-top:4px; }
.ce-inspector label.ce-eyebrow { display:flex;justify-content:space-between;margin-bottom:10px; }
.ce-inspector output { font-family:var(--bz-font-mono);color:var(--bz-text-dim); }
.ce-speed { display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin-bottom:9px; }
.ce .ce-speed button { background:var(--bz-surface-2);font:400 11px var(--bz-font-mono);border-color:var(--bz-border); }
.ce .ce-speed button[aria-pressed=true] { background:var(--bz-accent-bg);border-color:var(--bz-accent-dim); }
.ce-inspector select { font-size:13px;margin-bottom:10px; }
.ce-range-label { display:flex;align-items:center;justify-content:space-between;font-size:12px;margin:12px 0 8px; }
.ce input[type=range] { accent-color:var(--bz-accent);width:100%; }
.ce-shot-actions { display:flex;flex-direction:column;gap:8px; }
.ce-shot-actions .ce-row button { flex:1;font-size:12px; }
.ce-shot-actions .ce-secondary { font-size:13px; }
.ce-crop-frame { position:absolute;border:2px solid var(--bz-accent);box-shadow:0 0 0 1500px rgba(10,8,20,.65);cursor:move;touch-action:none;z-index:3; }
.ce-crop-frame::before,.ce-crop-frame::after { content:'';position:absolute;border:1px solid color-mix(in srgb,var(--bz-text) 35%,transparent);pointer-events:none; }
.ce-crop-frame::before { left:33.33%;right:33.33%;top:0;bottom:0;border-top:0;border-bottom:0; }.ce-crop-frame::after { top:33.33%;bottom:33.33%;left:0;right:0;border-left:0;border-right:0; }
.ce-sequence { grid-area:sequence;border-top:1px solid var(--bz-border-strong);background:var(--bz-surface-1);padding:12px 20px 18px;min-width:0; }
.ce-sequence-heading { display:flex;align-items:center;gap:16px;height:38px;margin-bottom:10px; }
.ce-sequence-heading h2 { display:flex;gap:14px;align-items:center; }
.ce-sequence-heading h2 span { color:var(--bz-text-muted);font-size:10px;letter-spacing:0; }
#ce-total { font-size:14px; }
.ce-shots { display:flex;gap:7px;overflow:auto;align-items:stretch;min-height:88px;padding:2px; }
.ce .ce-shot { position:relative;flex:0 0 190px;display:flex;align-items:stretch;justify-content:start;padding:0;border:1px solid var(--bz-border-strong);background:var(--bz-surface-2);overflow:hidden;text-align:left;min-height:83px; }
.ce-shot img { width:76px;object-fit:cover;opacity:.8; }
.ce-shot-content { display:flex;flex-direction:column;gap:5px;padding:10px 8px;min-width:0; }
.ce-shot-index { font-size:9px;color:var(--bz-text-muted); }
.ce-shot-name { font-size:13px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.ce-shot-time { font:400 10px var(--bz-font-mono);color:var(--bz-text-dim); }
.ce-shot-play { position:absolute;left:0;bottom:0;height:3px;background:var(--bz-accent-strong); }
.ce-sequence-empty { width:100%;display:flex;align-items:center;justify-content:center;border:1px dashed var(--bz-border-strong);color:var(--bz-text-muted);font-size:13px;border-radius:4px; }
.ce-empty-note { grid-column:1/-1;padding:16px 0; }
.ce-dialog { background:var(--bz-surface-1);border:1px solid var(--bz-border-strong);border-radius:8px;padding:24px;width:min(520px,calc(100vw - 28px));max-height:calc(100dvh - 40px);overflow:auto;box-shadow:var(--bz-shadow-2); }
.ce-dialog::backdrop { background:rgba(10,8,20,.85); }
.ce-dialog header { display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;gap:12px; }
.ce-dialog h2 { font-size:18px; }
.ce-dialog form>label { display:block;margin:16px 0 6px;font-size:13px; }
.ce-dialog .ce-export-summary { border:1px solid var(--bz-border);background:var(--bz-surface-2);padding:16px;margin:18px 0 12px;font-family:var(--bz-font-mono);font-size:12px; }
.ce-dialog .ce-muted { margin:12px 0 20px; }
.ce-picker { width:min(720px,calc(100vw - 28px)); }
.ce-picker-controls select { margin-bottom:10px; }
.ce-picker-controls form { display:flex;gap:8px; }
.ce-fight-results { margin-top:16px;max-height:50dvh;overflow:auto; }
.ce-dialog .ce-fight-result { display:flex;flex-direction:column;align-items:flex-start;width:100%;padding:14px 10px;gap:6px;border-bottom:1px solid var(--bz-border);text-align:left; }
.ce-fight-result strong { font:800 italic 18px var(--bz-font-display); }
.ce-fight-result span { color:var(--bz-text-muted);font-size:12px; }
.ce-shortcuts { display:grid;grid-template-columns:130px 1fr;gap:16px;font-size:13px; }
.ce-shortcuts dt { color:var(--bz-text-dim); }.ce-shortcuts dd { margin:0; }
.ce-toast { position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--bz-surface-3);padding:13px 20px;border:1px solid var(--bz-border-strong);box-shadow:var(--bz-shadow-2);z-index:150;width:max-content;max-width:calc(100vw - 28px);border-radius:4px; }
.ce-tabs { display:none; }
@media(min-width:1600px) { .ce { grid-template-columns:290px minmax(300px,1fr) 280px;grid-template-rows:70px minmax(0,1fr) 196px; }.ce-camera-name { font-size:13px; }.ce-shots .ce-shot { flex-basis:220px; }.ce-workspace { padding:0 28px 18px; } }
@media(max-width:1180px) and (min-width:761px) { .ce { grid-template-columns:210px minmax(300px,1fr) 215px; }.ce-header { padding:0 12px; }.ce-brand { padding-right:8px; }.ce-save { display:none; }.ce-fight { margin-right:auto; }.ce-workspace { padding:0 12px 12px; }.ce-mark-row { gap:5px;flex-wrap:wrap; }.ce-mark-row .ce-text { font-size:12px; }.ce-range-duration { display:none; }.ce-inspector { padding:18px 12px; }.ce-camera-actions button { font-size:11px!important; }.ce-mark-row kbd { display:none; } }
@media(max-width:760px) {
  body:has(.ce) { overflow:auto; }.ce { min-height:100dvh;height:auto;grid-template-columns:1fr;grid-template-rows:58px 44px auto auto;grid-template-areas:'header' 'tabs' 'work' 'sequence'; }
  .ce-header { padding:0 10px;gap:3px;position:sticky;top:0;z-index:20; }.ce-brand { padding:0 5px 0 0; }.ce-brand img { width:32px;height:32px; }.ce-brand span,.ce-save,#ce-help { display:none; }.ce .ce-fight { min-width:0;max-width:none;flex:1;font-size:12px;padding:8px; }.ce .ce-header .ce-icon { width:30px;padding:5px; }.ce #ce-export { padding:10px;font-size:12px; }.ce #ce-export .bz-icon { display:none; }
  .ce-tabs { grid-area:tabs;display:flex;border-bottom:1px solid var(--bz-border);background:var(--bz-surface-1);position:sticky;top:58px;z-index:20; }.ce-tabs button { flex:1;font-size:13px;min-height:44px; }
  .ce-workspace { padding:0 12px 12px; }.ce-view-heading { height:43px; }.ce-stage { height:clamp(180px,52vw,390px);flex:none; }.ce-transport { height:52px;gap:0; }.ce-transport .ce-time { font-size:10px; }#ce-duration { display:none; }.ce-transport .ce-text { font-size:12px; }.ce .ce-transport .ce-icon { width:32px; }.ce-mark-row { flex-wrap:wrap;gap:6px; }.ce .ce-mark-row input { width:91px;font-size:11px; }.ce-mark-row kbd { display:none; }.ce-range-duration { display:none; }.ce-mark-row .ce-primary { width:100%;margin-top:3px; }.ce .ce-handle { width:22px; }.ce-handle-in { left:-10px; }.ce-handle-out { right:-10px; }
  .ce-library,.ce-inspector { display:none;grid-area:work;min-height:400px;padding:18px 16px;border:0; }.ce[data-panel=cameras] .ce-library { display:flex; }.ce[data-panel=settings] .ce-inspector { display:block; }.ce[data-panel=cameras] .ce-workspace,.ce[data-panel=settings] .ce-workspace { display:none; }.ce-camera-grid { grid-template-columns:repeat(3,minmax(0,1fr));max-height:50dvh; }.ce-camera-actions { max-width:400px; }.ce-camera-actions button { min-height:44px!important; }.ce-inspector .ce-speed { grid-template-columns:repeat(6,1fr); }.ce-inspector .ce-shot-actions { display:grid;grid-template-columns:1fr 1fr; }.ce-inspector .ce-shot-actions .ce-row { grid-column:1/-1; }
  .ce-sequence { padding:12px 12px max(20px,env(safe-area-inset-bottom)); }.ce-sequence-heading { gap:8px;flex-wrap:wrap;height:auto;min-height:40px; }.ce-sequence-heading h2 { gap:8px;font-size:12px; }#ce-total { font-size:12px; }.ce-sequence-heading .ce-secondary { font-size:12px; }.ce-sequence-heading .ce-text { font-size:12px; }.ce-shots { margin-top:8px; }.ce .ce-shot { flex-basis:170px; }.ce-shot img { width:58px; }
  .ce-dialog { padding:18px; }.ce-dialog h2 { font-size:16px; }.ce-welcome img { width:56px; }.ce-welcome { gap:12px; }.ce-welcome h1 { font-size:25px; }.ce button,.ce-dialog button { min-height:44px; }.ce-trim-heading button { min-height:32px; }
}
@media(max-height:700px) and (min-width:761px) { .ce { grid-template-rows:56px minmax(0,1fr) 146px;min-height:530px; }.ce-view-heading { height:36px; }.ce-transport { height:44px; }.ce-sequence { padding-top:6px;padding-bottom:10px; }.ce-sequence-heading { margin-bottom:4px; }.ce-source-track { height:68px; }.ce-waveform { top:50px;height:16px; }.ce-filmstrip { height:30px; }.ce-mark-row { padding-top:4px; } }
@media(prefers-reduced-motion:reduce) { .ce *, .ce-dialog * { scroll-behavior:auto!important;transition:none!important; } }

#ce-redo svg { transform:scaleX(-1); }

.ce-camera-grid { grid-auto-rows:max-content; }.ce .ce-camera { min-height:112px; }.ce-camera video,.ce-camera-name,.ce-camera-state { flex:none; }.ce-camera video { height:auto; }
