/* 视频剪辑台：从无限画布 canvas.html 剥离出来的独立样式（.cv-edit 作用域，可嵌任意页面） */
.cv-edit{position:fixed;inset:0;z-index:100300;background:#fff;display:flex;flex-direction:column;font:13px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;color:#1f2430}
.cv-edit[hidden]{display:none}
.cv-edit.ce-inline{position:relative;inset:auto;z-index:1;height:100%;border-radius:12px;border:1px solid #e7ecf3;overflow:hidden}
body.ce-open .reference-asset-library{z-index:100400}
.cv-edit .ce-top{height:56px;flex:0 0 56px;display:flex;align-items:center;gap:10px;padding:0 16px;border-bottom:1px solid #eef1f5}
.cv-edit .ce-top .t{font-weight:600;font-size:14px}
.cv-edit .ce-top .sp{flex:1}
.cv-edit .ce-top button{height:32px;padding:0 14px;border-radius:8px;border:1px solid #e6eaf0;background:#fff;color:#3b4553;cursor:pointer;font-size:13px}
.cv-edit .ce-top button:disabled{opacity:.45;cursor:not-allowed}
.cv-edit .ce-main{flex:1;display:flex;min-height:0}
.cv-edit .ce-rail{width:46px;flex:0 0 46px;display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 0;border-right:1px solid #eef1f5}
.cv-edit .ce-rail.r{border-right:0;border-left:1px solid #eef1f5}
.cv-edit .ce-rail button{width:34px;height:34px;border:0;background:transparent;border-radius:8px;cursor:pointer;font-size:15px;color:#5b6472}
.cv-edit .ce-rail button:hover{background:#f2f5f9}
.cv-edit .ce-stage{flex:1;min-width:0;background:#f5f6f8;display:flex;align-items:center;justify-content:center;padding:20px}
.cv-edit .ce-preview{width:100%;height:100%;background:#fff;border:1px solid #e8ebf0;border-radius:12px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.cv-edit .ce-preview video{max-width:100%;max-height:100%}
.cv-edit .ce-empty{display:flex;flex-direction:column;align-items:center;gap:10px;color:#98a2b3;font-size:13px;text-align:center;padding:0 20px}
.cv-edit .ce-empty .ic{font-size:36px;opacity:.5;line-height:1}
.cv-edit .ce-panel{width:300px;flex:0 0 300px;border-left:1px solid #eef1f5;display:flex;flex-direction:column;background:#fff;min-height:0}
.cv-edit .ce-tabs{display:flex;gap:20px;padding:12px 16px 0;border-bottom:1px solid #eef1f5;flex:0 0 auto}
.cv-edit .ce-tabs button{border:0;background:transparent;padding:6px 0 10px;font-size:13px;color:#6b7480;cursor:pointer;border-bottom:2px solid transparent}
.cv-edit .ce-tabs button.on{color:#2f6bff;font-weight:600;border-bottom-color:#2f6bff}
.cv-edit .ce-list{flex:1;overflow:auto;padding:12px;min-height:0}
.cv-edit .ce-hint{color:#98a2b3;font-size:12px;line-height:1.8}
.cv-edit .ce-item{display:flex;align-items:center;gap:10px;padding:7px;border:1px solid #eef1f5;border-radius:10px;margin-bottom:8px;cursor:pointer}
.cv-edit .ce-item:hover{border-color:#cdd9ea;background:#f8fafd}
/* 时间轴上选中的段：右侧素材列表的对应条目要亮起来，一眼看出选的是哪一段 */
.cv-edit .ce-item.on,.cv-edit .ce-item.on:hover{border-color:#2f6bff;background:#eef4ff;box-shadow:inset 0 0 0 1px #2f6bff}
.cv-edit .ce-item .th{width:56px;height:34px;border-radius:6px;background:#eef3fb center/cover no-repeat;flex:0 0 56px;border:1px solid #e6ecf6}
.cv-edit .ce-item .nm{font-size:12px;color:#3b4553;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.cv-edit .ce-item .ad{font-size:11px;color:#2f6bff;flex:0 0 auto}
.ce-toast{position:fixed;left:50%;margin-left:-182px;top:68px;width:364px;max-width:calc(100% - 32px);box-sizing:border-box;background:#fff;border:1px solid #e7ecf3;border-radius:14px;box-shadow:0 18px 44px rgba(20,40,80,.16);padding:14px;z-index:100500;display:flex;gap:10px}
.ce-toast[hidden]{display:none}
.cv-edit .ce-toast{position:absolute;z-index:9}
.ce-toast .ic{width:32px;height:32px;flex:0 0 32px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:600;line-height:1}
.ce-toast.ok .ic{background:#e8f7ee;color:#189a55}
.ce-toast.err .ic{background:#fdecec;color:#dc4b4b}
.ce-toast .bd{flex:1;min-width:0}
.ce-toast .tt{font-size:13px;font-weight:600;color:#1f2430;margin:1px 0 3px}
.ce-toast .ds{font-size:12px;color:#7a8494;line-height:1.6;word-break:break-word}
.ce-toast .ac{display:flex;gap:8px;margin-top:11px;flex-wrap:wrap}
.ce-toast .ac button{border:0;border-radius:8px;padding:5px 11px;font-size:12px;cursor:pointer;font-family:inherit;transition:background .15s}
.ce-toast .ac .go{background:#2f6bff;color:#fff}
.ce-toast .ac .go:hover{background:#2559dd}
.ce-toast .ac .gh{background:#f2f5f9;color:#46505f}
.ce-toast .ac .gh:hover{background:#e9eef6}
.ce-toast .x{flex:0 0 auto;border:0;background:transparent;color:#a4adba;font-size:13px;line-height:1;cursor:pointer;padding:2px}
.ce-toast .x:hover{color:#5b6472}
.cv-edit .ce-bottom{flex:0 0 auto;border-top:1px solid #eef1f5}
.cv-edit .ce-tools{display:flex;align-items:center;gap:2px;padding:6px 14px}
.cv-edit .ce-tools button{width:32px;height:32px;border:0;background:transparent;border-radius:8px;cursor:pointer;font-size:14px;color:#4b5563}
.cv-edit .ce-tools button:hover{background:#f2f5f9}
.cv-edit .ce-tools button.on{background:#eaf1ff;color:#2f6bff}
.cv-edit .ce-tools .sp{flex:1}
.cv-edit .ce-zoom{display:flex;align-items:center;gap:6px;color:#98a2b3}
.cv-edit .ce-zoom input{width:110px;accent-color:#2f6bff}
.cv-edit .ce-ruler{position:relative;height:26px;margin:0 14px;min-width:calc(100% - 28px);border-bottom:1px solid #eef1f5;color:#98a2b3;font-size:11px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;cursor:ew-resize;touch-action:none}
.cv-edit .ce-ruler::-webkit-scrollbar{display:none}
.cv-edit .ce-ticks{position:relative;height:26px}
.cv-edit .ce-tick{position:absolute;top:14px;bottom:0;border-left:1px solid #eef1f5}
.cv-edit .ce-tick.maj{top:10px;border-left-color:#dfe5ee}
.cv-edit .ce-tick b{position:absolute;left:4px;top:-13px;font-weight:400;font-size:11px;white-space:nowrap}
.cv-edit .ce-track{position:relative;min-height:110px;margin:0 14px 12px;border:1px dashed #e3e9f2;border-radius:10px;background:#fcfdff;overflow:auto}
.cv-edit .ce-track.has-clips{border-style:solid;background:#fff}
.cv-edit .ce-note{display:flex;align-items:center;justify-content:center;min-height:110px;color:#98a2b3;font-size:12px}
.cv-edit .ce-lane{position:relative;height:74px;padding-top:8px}
.cv-edit .ce-clip{position:absolute;top:8px;height:56px;border-radius:8px;background:#26303f center/cover no-repeat;border:1px solid #46536b;overflow:hidden;cursor:pointer;box-sizing:border-box}
.cv-edit .ce-clip.on{outline:2px solid #2f6bff;outline-offset:1px}
.cv-edit .ce-clip .lb{position:absolute;left:4px;bottom:4px;max-width:calc(100% - 8px);padding:1px 6px;border-radius:6px;background:rgba(9,14,24,.78);font-size:11px;line-height:15px;color:#fff;text-shadow:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}
.cv-edit .ce-clip .mu{position:absolute;right:4px;top:3px;line-height:14px;padding:0 4px;border-radius:6px;background:rgba(17,24,39,.62);color:#fff;font-size:10px;font-weight:400;text-shadow:none}
.cv-edit .ce-play{position:absolute;top:0;bottom:0;width:9px;margin-left:-4px;background:transparent;pointer-events:auto;cursor:ew-resize;z-index:4;touch-action:none}
.cv-edit .ce-play::after{content:"";position:absolute;top:0;bottom:0;left:4px;width:1px;background:#2f6bff}
.cv-edit .ce-play::before{content:"";position:absolute;top:-1px;left:0;width:9px;height:9px;border-radius:50%;background:#2f6bff}
.cv-edit .ce-time{font-size:12px;color:#6b7480;margin-left:10px;font-variant-numeric:tabular-nums}
.cv-edit .ce-clip .h{position:absolute;top:0;bottom:0;width:8px;background:rgba(47,107,255,.9);display:none;cursor:ew-resize;z-index:5}
.cv-edit .ce-clip.on .h{display:block}
.cv-edit .ce-clip .h.l{left:0;border-radius:6px 0 0 6px}
.cv-edit .ce-clip .h.r{right:0;border-radius:0 6px 6px 0}
.cv-edit .ce-lane{touch-action:none}
body.ce-open .jn-quick-drawer-trigger{display:none!important}

/* ===== 深色模式：跟随站点 html[data-theme="dark"]，与工作台保持一致 ===== */
html[data-theme="dark"] body.ce-open{background:#0b1017}
html[data-theme="dark"] .cv-edit{background:#0f141c;color:#e6ecf7}
html[data-theme="dark"] .cv-edit .ce-top{border-bottom-color:#232a36;background:#0f141c}
html[data-theme="dark"] .cv-edit .ce-top .t{color:#e6ecf7}
html[data-theme="dark"] .cv-edit .ce-top button{background:#151a22;border-color:#2a3140;color:#c7cdd8}
html[data-theme="dark"] .cv-edit .ce-top button:hover{background:#1b2230;border-color:#37445e}
html[data-theme="dark"] .cv-edit .ce-rail{border-color:#232a36}
html[data-theme="dark"] .cv-edit .ce-rail button{color:#9aa5b5}
html[data-theme="dark"] .cv-edit .ce-rail button:hover{background:#1b2230;color:#e6ecf7}
html[data-theme="dark"] .cv-edit .ce-stage{background:#0b1017}
html[data-theme="dark"] .cv-edit .ce-preview{background:#0f141c;border-color:#232a36}
html[data-theme="dark"] .cv-edit .ce-empty{color:#6f7a8a}
html[data-theme="dark"] .cv-edit .ce-panel{background:#0f141c;border-left-color:#232a36}
html[data-theme="dark"] .cv-edit .ce-tabs{border-bottom-color:#232a36}
html[data-theme="dark"] .cv-edit .ce-tabs button{color:#8b95a5}
html[data-theme="dark"] .cv-edit .ce-tabs button.on{color:#6ea8ff;border-bottom-color:#2f6bff}
html[data-theme="dark"] .cv-edit .ce-hint{color:#7c8798}
html[data-theme="dark"] .cv-edit .ce-item{background:#151a22;border-color:#232a36}
html[data-theme="dark"] .cv-edit .ce-item:hover{background:#1b2230;border-color:#37445e}
/* 深色下选中段的高亮：蓝底蓝框，和时间轴上的 on 状态一致 */
html[data-theme="dark"] .cv-edit .ce-item.on,html[data-theme="dark"] .cv-edit .ce-item.on:hover{background:#1d2b47;border-color:#5b8cff;box-shadow:inset 0 0 0 1px #5b8cff}
html[data-theme="dark"] .cv-edit .ce-item .th{background-color:#1b2230;border-color:#2a3140}
html[data-theme="dark"] .cv-edit .ce-item .nm{color:#cdd8ea}
html[data-theme="dark"] .cv-edit .ce-bottom{border-top-color:#232a36}
html[data-theme="dark"] .cv-edit .ce-tools button{color:#9aa5b5}
html[data-theme="dark"] .cv-edit .ce-tools button:hover{background:#1b2230}
html[data-theme="dark"] .cv-edit .ce-tools button.on{background:#1b2b45;color:#6ea8ff}
html[data-theme="dark"] .cv-edit .ce-time{color:#8b95a5}
html[data-theme="dark"] .cv-edit .ce-ruler{border-bottom-color:#232a36;color:#6f7a8a}
html[data-theme="dark"] .cv-edit .ce-tick{border-left-color:#232a36}
html[data-theme="dark"] .cv-edit .ce-tick.maj{border-left-color:#37445e}
html[data-theme="dark"] .cv-edit .ce-track{background:#0d131c;border-color:#2a3140}
html[data-theme="dark"] .cv-edit .ce-track.has-clips{background:#0f141c;border-color:#2a3140}
html[data-theme="dark"] .cv-edit .ce-note{color:#6f7a8a}
html[data-theme="dark"] .cv-edit .ce-zoom{color:#6f7a8a}
html[data-theme="dark"] .cv-edit .ce-zoom input{accent-color:#2f6bff}
html[data-theme="dark"] .cv-edit .ce-clip{border-color:#37445e}
html[data-theme="dark"] .cv-edit .ce-play::after{background:#6ea8ff}
html[data-theme="dark"] .cv-edit .ce-play::before{background:#6ea8ff}
html[data-theme="dark"] .ce-toast{background:#151a22;border-color:#2a3140;box-shadow:0 18px 44px rgba(0,0,0,.55)}
html[data-theme="dark"] .ce-toast .tt{color:#e6ecf7}
html[data-theme="dark"] .ce-toast .ds{color:#8b95a5}
html[data-theme="dark"] .ce-toast .ac .gh{background:#1b2230;color:#c7cdd8}
html[data-theme="dark"] .ce-toast .ac .gh:hover{background:#232d3f}
html[data-theme="dark"] .ce-toast .x{color:#7c8798}
html[data-theme="dark"] .ce-toast.ok .ic{background:#12301f;color:#4ade80}
html[data-theme="dark"] .ce-toast.err .ic{background:#341a1d;color:#f87171}

/* ===== 片段序号 / 当前预览段 / 右键删除菜单 ===== */
.cv-edit .ce-preview{position:relative}
.cv-edit .ce-clip .no{position:absolute;left:4px;top:3px;line-height:14px;padding:0 5px;border-radius:6px;background:rgba(17,24,39,.66);color:#fff;font-size:10px;font-weight:600}
.cv-edit .ce-clip.on .no{background:#2f6bff}
.cv-edit .ce-clipnow{position:absolute;left:12px;top:10px;z-index:3;padding:2px 8px;border-radius:8px;background:rgba(9,14,24,.72);color:#fff;font-size:11px;line-height:18px;pointer-events:none}
.ce-clip-menu{position:fixed;z-index:100600;min-width:128px;background:#fff;border:1px solid #e7ecf3;border-radius:10px;padding:4px;box-shadow:0 12px 30px rgba(20,40,80,.18)}
.ce-clip-menu button{display:block;width:100%;border:0;background:transparent;padding:7px 10px;border-radius:8px;text-align:left;font:12.5px/1.2 inherit;color:#d43f3f;cursor:pointer}
.ce-clip-menu button:hover{background:#fdecec}
html[data-theme="dark"] .ce-clip-menu{background:#151a22;border-color:#2a3140;box-shadow:0 12px 30px rgba(0,0,0,.55)}
html[data-theme="dark"] .ce-clip-menu button:hover{background:#341a1d}
