/* Custom video-player chrome: dark glass, lime progress, compact floating tools. */
#canvasOverlay .cv-videonode.cvv-ready{border-radius:20px;}
.cvv-ready .cv-videobox{position:relative;}
#canvasOverlay .cv-videonode.cvv-ready>.cv-head{padding-right:36px;}
#canvasOverlay .cv-videonode.cvv-ready>.cv-node-tag{top:-35px;right:0;}
/* 视频工具条跟随画布深浅色主题（--cv-* 由 #canvasOverlay 定义并在 .light 下整套翻转），
   外面再包一层深色兜底，避免在没定义变量的地方变成透明 */
.cvv-toolbar{position:absolute;bottom:calc(100% + 47px);left:50%;transform:translateX(-50%);z-index:35;display:flex;align-items:center;gap:2px;width:max-content;max-width:calc(100vw - 24px);overflow-x:auto;scrollbar-width:none;padding:5px 7px;border:1px solid var(--cv-line,#ffffff20);border-radius:22px;background:var(--cv-surface,#222325f5);color:var(--cv-ink,#ececed);box-shadow:0 10px 28px #0004;opacity:0;visibility:hidden;transition:opacity .12s;}
.cvv-toolbar::-webkit-scrollbar{display:none;}.cvv-ready:hover>.cvv-toolbar,.cvv-ready.sel>.cvv-toolbar,.cvv-ready:focus-within>.cvv-toolbar{opacity:1;visibility:visible;}
.cvv-toolbar button,.cvv-toolbar a{display:inline-flex;align-items:center;justify-content:center;gap:5px;height:26px;flex-shrink:0;padding:0 7px;border:0;border-radius:7px;background:transparent;color:inherit;text-decoration:none;white-space:nowrap;font:11px "HarmonyOS Sans SC","Microsoft YaHei",sans-serif;cursor:var(--cur-pointer,pointer);}
.cvv-toolbar button:hover,.cvv-toolbar a:hover{background:var(--cv-hover,#ffffff16);}.cvv-toolbar .cv-icon{width:14px;height:14px;}
/* 点开抽屉的那颗工具按钮保持按下态（再点一次收起），颜色走强调色的浅底 --cv-active */
.cvv-toolbar button.on{background:var(--cv-active,#ffffff22);color:var(--cv-ink,#ececed);}
.cvv-ready .cv-icon{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.cvv-ready .cv-videobox video{transition:filter .12s;}
.cvv-controls{position:absolute;inset:auto 0 0;padding:25px 14px 12px;background:linear-gradient(transparent,#111b);color:#fff;z-index:12;box-sizing:border-box;transition:opacity .16s ease,transform .24s cubic-bezier(.3,.7,.28,1);}
.cvv-controls *{transition:opacity .16s ease;}
/* 桌面：控制条平时滑到画面下沿外面藏起来（.cv-videobox 有 overflow:hidden 所以是"往下退场"），
   鼠标放上去 / 节点选中 / 里面拿到焦点（点过进度条或按钮）时才滑上来；移开自动再滑下去。
   手机版不参与 —— 它用的是 .sel/.cvv-touch-selected 那套选中显隐 */
html:not(.cvv-touch-input) .cvv-ready:not(:hover):not(.sel):not(:focus-within) .cvv-controls{opacity:0;transform:translateY(100%);pointer-events:none;}
.cvv-control-row{display:flex;align-items:center;gap:7px;min-height:30px;}.cvv-control-spacer{flex:1;min-width:0;}
.cvv-controls button{display:grid;place-items:center;width:24px;height:28px;flex-shrink:0;padding:0;border:0;border-radius:5px;background:transparent;color:#f7f7f7;cursor:var(--cur-pointer,pointer);}.cvv-controls button:hover{background:#ffffff20;}.cvv-controls .cv-icon{width:19px;height:19px;}
.cvv-time{font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap;}.cvv-seek,.cvv-volume{--progress:0%;appearance:none;-webkit-appearance:none;height:4px;padding:0!important;border:0!important;border-radius:3px;outline:none;background:linear-gradient(to right,#cbff34 var(--progress),#ffffff50 var(--progress));cursor:var(--cur-pointer,pointer);}
.cvv-seek{width:100%;display:block;margin:0 0 7px;}.cvv-volume{width:72px;min-width:35px;margin:0 3px;flex-shrink:1;}
.cvv-seek::-webkit-slider-thumb,.cvv-volume::-webkit-slider-thumb{appearance:none;width:8px;height:8px;border-radius:50%;background:#cbff34;border:0;}.cvv-seek:disabled{opacity:.35;cursor:var(--cur-default,default);}
.cvv-center-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:52px;height:52px;border-radius:50%;border:1px solid #ffffffaa;background:#ffffffe6;color:#444;z-index:10;cursor:var(--cur-pointer,pointer);box-shadow:0 4px 15px #0003;}.cvv-center-play .cv-icon{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}.cvv-playing .cvv-center-play{display:none;}
/* 菜单/参数面板：参考图的模块样子（四角全圆、行高、悬停才亮行），尺寸按用户定的 135 宽 × 320 高 */
.cvv-panel{position:absolute;top:-39px;left:50%;transform:translateX(-50%);z-index:45;width:135px;max-width:calc(100vw - 32px);box-sizing:border-box;padding:6px;border:1px solid var(--cv-line,#ffffff20);border-radius:12px;background:var(--cv-surface,#26272bf7);color:var(--cv-ink,#eee);box-shadow:0 16px 34px #0008;font-size:13px;line-height:1.5;overscroll-behavior:contain;transform-origin:top center;}
/* 入场动画只在 JS 量完位置后加 .cvv-in 才播（scale 用独立属性，不和 JS 写在 style 上的 translate 打架） */
.cvv-panel.cvv-in{animation:cvvDrawerPop .2s cubic-bezier(.18,.86,.32,1.12);}
@keyframes cvvDrawerPop{from{opacity:0;scale:.9 .8}to{opacity:1;scale:1 1}}
.cvv-panel>strong{display:block;padding:3px 22px 7px 8px;font-size:12px;font-weight:500;color:var(--cv-muted,#b8bac3);}
.cvv-panel p{font-size:11px;line-height:1.5;color:var(--cv-muted,#b8bac3);margin:6px 8px;}.cvv-panel-close{position:absolute;right:4px;top:1px;border:0;background:transparent;color:var(--cv-muted,#ddd);font-size:18px;line-height:1.6;cursor:var(--cur-pointer,pointer);}.cvv-panel-close:hover{color:var(--cv-ink,#fff);}
.cvv-menu-items{display:flex;flex-direction:column;gap:2px;margin-top:0;}.cvv-menu-items button{display:flex;align-items:center;height:32px;border:0;border-radius:8px;padding:0 8px;background:transparent;color:var(--cv-ink,#eee);text-align:left;font:12px "Microsoft YaHei",sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:var(--cur-pointer,pointer);}.cvv-menu-items button:hover{background:var(--cv-hover,#ffffff12);}.cvv-menu-items button:active{background:var(--cv-active,#ffffff18);}
.cvv-panel-actions button{border:1px solid var(--cv-line,#ffffff15);border-radius:8px;padding:5px 8px;background:var(--cv-hover,#ffffff08);color:var(--cv-ink,#eee);font:11px "Microsoft YaHei",sans-serif;cursor:var(--cur-pointer,pointer);}.cvv-panel-actions button:hover{background:var(--cv-active,#ffffff18);}
.cvv-tuning label{display:grid;grid-template-columns:40px 1fr 34px;align-items:center;gap:5px;margin:9px 4px;}.cvv-tuning input{width:100%;min-width:0;accent-color:var(--cv-accent,#cbff34);}.cvv-tuning output{text-align:right;font-size:11px;color:var(--cv-muted,#b8bac3);}.cvv-panel-actions{display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end;margin:10px 4px 2px;}
.cvv-compact .cvv-controls{padding-left:8px;padding-right:8px;}.cvv-compact .cvv-control-row{gap:3px;}.cvv-compact .cvv-time{font-size:10px;}.cvv-compact .cvv-controls button{width:20px;}.cvv-compact .cvv-volume{width:38px;min-width:22px;margin:0;}.cvv-compact .cvv-controls [data-cvv="fullscreen"]{display:none;}
#canvasOverlay .cv-videonode:fullscreen{width:100vw!important;height:100vh!important;border:0;border-radius:0;background:#000;left:0!important;top:0!important;}
.cvv-ready:fullscreen .cv-videobox{border-radius:0;}.cvv-ready:fullscreen>.cv-head,.cvv-ready:fullscreen>.cv-plus,.cvv-ready:fullscreen>.cv-node-tag,.cvv-ready:fullscreen>.cv-video-resize{display:none!important;}.cvv-ready:fullscreen>.cvv-toolbar{position:fixed;top:10px;bottom:auto;opacity:1;visibility:visible;}.cvv-ready:fullscreen .cvv-controls{padding:45px 24px 18px;}.cvv-ready:fullscreen .cvv-panel{top:48px;}
/* 触摸设备不再让所有视频工具条常显（以前这条会把每个视频节点上方都挂一条），
   显隐统一交给基规则的 :hover/.sel 与下面 .cvv-touch-input 那套"选中才展开" */
@media(pointer:coarse){.cvv-controls button{height:32px;}}

#canvasOverlay .cv-videonode.cvv-ready>.cv-video-resize{z-index:32;}
.cvv-panel{overflow:auto;}

.cvv-error .cvv-center-play{display:none;}
#canvasOverlay .cv-videonode.cvv-ready>.cv-media-status.error{z-index:14;}
.cvv-analysis-label{display:flex;flex-direction:column;gap:5px;margin:10px 6px;font-size:12.5px;}.cvv-analysis-label select,.cvv-analysis-label textarea{width:100%;box-sizing:border-box;color:var(--cv-ink,#eee);background:var(--cv-hover,#17181c);border:1px solid var(--cv-line,#ffffff28);border-radius:8px;padding:7px;font-family:inherit;font-size:12.5px;}.cvv-analysis-label textarea{resize:vertical;min-height:70px;}.cvv-understand-start{width:100%;padding:9px;border:0;border-radius:8px;color:#17191d;background:#cbff34;font-size:13px;cursor:var(--cur-pointer,pointer);}.cvv-ready .cv-videobox video{cursor:var(--cur-grab,grab);}.cvv-ready .cv-videobox video:active{cursor:var(--cur-grabbing,grabbing);}
/* 深度捕捉 / 解析 / 音频分离 / 视频修复 / 美化 的抽屉朝上开（用户指定，压在工具条上方）。
   桌面工具条底边在节点上方 -47、高 38，所以底边再留 8px 间隙 = -93；手机工具条在节点内 5..39，留 8px = 节点上方 3px。
   朝上的面板从下往上长（transform-origin 改到底边中心），动画用同一套 cvvDrawerPop */
.cvv-panel.up{top:auto;bottom:calc(100% + 93px);transform-origin:bottom center;}
.cvv-touch-input .cvv-panel.up{top:auto;bottom:calc(100% + 82px);}
/* 全屏时工具条固定在屏幕顶上，上方没有空间，朝上的抽屉只能改成朝下挂在它下面 */
.cvv-ready:fullscreen .cvv-panel.up{top:56px;bottom:auto;transform-origin:top center;}
/* Touch devices: selection is the sole permission to operate a video.
   "已选中"同时认两个类：画布自己打的 .sel 和 JS 镜像出来的 .cvv-touch-selected ——
   手机上出现过 .sel 有、.cvv-touch-selected 没跟上（JS 那条链任一环节没跑），结果功能条整个不出来，
   所以这里全部写成"两个类任一即可 / 两个都没有才算未选中" */
.cvv-touch-surface{display:none;}
.cvv-touch-input #canvasOverlay .cv-videonode.cvv-ready .cv-videobox>video{pointer-events:none!important;touch-action:none;}
.cvv-touch-input .cvv-touch-surface{display:block;position:absolute;inset:0;z-index:3;touch-action:none;user-select:none;-webkit-user-select:none;}
.cvv-touch-input .cvv-ready:not(.cvv-touch-selected):not(.sel) .cvv-touch-surface{z-index:18;}
.cvv-touch-input .cvv-ready.cvv-touch-selected .cvv-touch-surface,.cvv-touch-input .cvv-ready.sel .cvv-touch-surface{z-index:3;}
.cvv-touch-input .cvv-ready>.cvv-toolbar,.cvv-touch-input .cvv-ready:hover>.cvv-toolbar,.cvv-touch-input .cvv-ready:focus-within>.cvv-toolbar{opacity:0;visibility:hidden;pointer-events:none;}
.cvv-touch-input .cvv-ready:not(.cvv-touch-selected):not(.sel) .cvv-center-play,
.cvv-touch-input .cvv-ready:not(.cvv-touch-selected):not(.sel) .cvv-controls,
.cvv-touch-input .cvv-ready:not(.cvv-touch-selected):not(.sel) .cvv-controls *,
.cvv-touch-input .cvv-ready:not(.cvv-touch-selected):not(.sel)>.cvv-toolbar,
.cvv-touch-input .cvv-ready:not(.cvv-touch-selected):not(.sel)>.cvv-panel{pointer-events:none!important;}
/* 未选中的视频节点在手机上就是一张普通缩略图：不显示播放键和控制条（原来以 .58/.72 半透明常显，
   看着能点其实点不动），选中后才淡入 —— 和图片节点"选中才有操作"一致 */
.cvv-touch-input .cvv-ready:not(.cvv-touch-selected):not(.sel) .cvv-center-play,
.cvv-touch-input .cvv-ready:not(.cvv-touch-selected):not(.sel) .cvv-controls,
.cvv-touch-input .cvv-ready:not(.cvv-touch-selected):not(.sel) .cvv-controls *{visibility:hidden;opacity:0;}
.cvv-touch-input .cvv-ready:not(.cvv-touch-selected):not(.sel)>.cvv-panel{visibility:hidden;}
.cvv-touch-input .cvv-ready .cvv-controls{pointer-events:none!important;}
.cvv-touch-input .cvv-ready.cvv-touch-selected .cvv-controls button,
.cvv-touch-input .cvv-ready.cvv-touch-selected .cvv-controls input,
.cvv-touch-input .cvv-ready.cvv-touch-selected .cvv-center-play,
.cvv-touch-input .cvv-ready.sel .cvv-controls button,
.cvv-touch-input .cvv-ready.sel .cvv-controls input,
.cvv-touch-input .cvv-ready.sel .cvv-center-play{pointer-events:auto!important;touch-action:none;}
.cvv-touch-input .cvv-ready.cvv-touch-selected .cvv-seek,.cvv-touch-input .cvv-ready.cvv-touch-selected .cvv-volume,
.cvv-touch-input .cvv-ready.sel .cvv-seek,.cvv-touch-input .cvv-ready.sel .cvv-volume{opacity:1;}
/* 选中视频节点就直接展开工具条（以前要先点"工具"才出来，手机上等于没有功能）。
   手机版工具条**放在节点外面**（和图片节点一样）：压在节点上方、标题行再往上 8px，
   宽度按内容自适应、放不下就换行铺开，不横向滚动、不盖住画面；
   bottom 40px = 标题行 cv-head 占掉节点上方 8..32，再留 8px 间隙 */
.cvv-touch-input .cvv-ready.cvv-touch-selected>.cvv-toolbar,.cvv-touch-input .cvv-ready.sel>.cvv-toolbar{top:auto;bottom:calc(100% + 40px);left:50%;right:auto;width:max-content;max-width:var(--cv-fit-w,calc(100vw - 16px))!important;height:auto;box-sizing:border-box;padding:4px 6px;transform:translateX(-50%)!important;opacity:1;visibility:visible;pointer-events:auto;overflow:visible;flex-wrap:wrap;justify-content:center;align-content:center;row-gap:1px;white-space:normal;touch-action:auto;}
/* 抽屉在手机上贴着工具条下沿往画面里长（top -32 = 工具条底边再让 8px）；
   水平方向**和桌面完全同一套**：基准 left:50%+translateX(-50%)（基础规则里），JS 再按"点它的那颗按钮"居中并钳到屏幕左右 12px，
   宽度也由 JS 给（135 世界像素），所以这里不再钉 left/width/transform */
.cvv-touch-input .cvv-panel{top:-32px;right:auto;max-width:none;touch-action:pan-y;overflow:auto;}
/* 快进快退只认节点内部的进度条：轨道 6px、整条触摸热区 26px 仍在视频框内（input 默认 border-box，必须显式 content-box 才不会被 padding 吃掉轨道），滑块放大到 14px 好点 */
.cvv-touch-input .cvv-seek{height:6px;box-sizing:content-box;padding:10px 0!important;background-clip:content-box;margin-bottom:2px;}
.cvv-touch-input .cvv-seek::-webkit-slider-thumb{width:14px;height:14px;}
.cvv-touch-input .cvv-volume::-webkit-slider-thumb{width:12px;height:12px;}
.cvv-touch-input .cvv-center-play{z-index:17;}
.cvv-touch-input .cvv-ready:fullscreen>.cvv-toolbar{top:10px;bottom:auto;left:12px;right:12px;width:auto;max-width:none!important;transform:none!important;opacity:1;visibility:visible;pointer-events:auto;}
.cvv-touch-input .cvv-ready:fullscreen .cvv-controls,.cvv-touch-input .cvv-ready:fullscreen .cvv-controls *,.cvv-touch-input .cvv-ready:fullscreen .cvv-center-play{visibility:visible;opacity:1;}
.cvv-touch-input .cvv-ready:fullscreen .cvv-controls button,.cvv-touch-input .cvv-ready:fullscreen .cvv-controls input{pointer-events:auto!important;opacity:1;}
.cvv-touch-input .cvv-ready:fullscreen .cvv-controls [data-cvv="fullscreen"]{display:grid;}
.cvv-error .cvv-center-play{display:none;}
#canvasOverlay .cv-videonode.cvv-ready>.cv-media-status.error{z-index:19;}
.cvv-analysis-label{display:flex;flex-direction:column;gap:5px;margin:10px 6px;font-size:12.5px;}.cvv-analysis-label select,.cvv-analysis-label textarea{width:100%;box-sizing:border-box;color:var(--cv-ink,#eee);background:var(--cv-hover,#17181c);border:1px solid var(--cv-line,#ffffff28);border-radius:8px;padding:7px;font-family:inherit;font-size:12.5px;}.cvv-analysis-label textarea{resize:vertical;min-height:70px;}.cvv-understand-start{width:100%;padding:9px;border:0;border-radius:8px;color:#17191d;background:#cbff34;font-size:13px;cursor:var(--cur-pointer,pointer);}.cvv-ready .cv-videobox video{cursor:var(--cur-grab,grab);}.cvv-ready .cv-videobox video:active{cursor:var(--cur-grabbing,grabbing);}
