.video-production { --vp-material-width: 128px; --vp-source-width: 200px; --vp-clip-width: 176px; --vp-final-width: 176px; --vp-gap: 144px; --vp-column-gap: 64px; min-width: 0; max-width: 100%; padding: 3px 0; }
.vp-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.vp-heading h3 { margin: 0 0 4px; font-size: 15px; }
.video-production .vp-muted { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.vp-preview-badge { flex: 0 0 auto; color: var(--muted); font-size: 12px; line-height: 18px; }
.video-production .vp-controls { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.video-production .vp-controls > label { display: flex; flex-direction: column; flex: 0 1 auto; gap: 4px; width: auto; min-width: 0; margin: 0; color: var(--muted); font-size: 12px; }
.video-production .vp-controls select { display: block; width: 128px; min-width: 0; max-width: 100%; height: 30px; min-height: 30px; margin: 0; padding: 4px 23px 4px 7px; font-size: 13px; }
.video-production .vp-controls > label:nth-child(4) select { width: 208px; }
.video-production button { flex: 0 0 auto; width: auto; min-height: 28px; height: auto; margin: 0; padding: 4px 8px; font-size: 13px; line-height: 18px; border-radius: 5px; box-shadow: none; }
.video-production .vp-controls > button { min-height: 30px; }
.video-production button:focus-visible, .vp-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.video-production button:disabled { opacity: .5; cursor: not-allowed; }
.vp-steps { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 14px; padding: 3px 0; }
.vp-steps > button { display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px; border: 1px solid transparent; background: transparent; color: var(--muted); }
.vp-steps > button[aria-current="step"] { background: var(--tab-selected-bg); color: var(--tab-selected-ink); }
.vp-step-number { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; color: var(--muted); font-size: 12px; }
.vp-status { margin: 0 0 9px; color: var(--muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.vp-status:empty { display: none; }
.vp-task-notices { display: grid; gap: 4px; max-width: 840px; margin-bottom: 10px; }
.vp-task-notices:empty { display: none; }
.video-production .vp-task-notice { padding: 3px 0; border: 0; background: transparent; color: var(--danger, #d87575); font-size: 12px; line-height: 18px; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.vp-task-notice:hover { text-decoration: underline; }
.vp-scroll-hint { display: none; margin: 0 0 7px; color: var(--muted); font-size: 12px; }
.vp-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding: 0 0 7px; }
.vp-canvas { width: max-content; padding: 3px 1px; }
.vp-column-heads { display: grid; grid-template-columns: var(--vp-materials-width,128px) var(--vp-images-width,128px) var(--vp-clips-width,176px) var(--vp-final-width,176px); gap: var(--vp-gap); margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.vp-column-actions { display: grid; grid-template-columns: var(--vp-materials-width,128px) var(--vp-images-width,128px) var(--vp-clips-width,176px) var(--vp-final-width,176px); gap: var(--vp-gap); align-items: end; margin-top: 14px; }
.video-production .vp-column-actions button { min-height: 28px; padding: 3px 8px; font-size: 12px; }
.vp-workflow-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.vp-workflow-status:empty { display: none; }
.vp-graph { position: relative; display: grid; grid-template-columns: var(--vp-materials-width,128px) var(--vp-images-width,128px) var(--vp-clips-width,176px) var(--vp-final-width,176px); gap: var(--vp-gap); align-items: center; isolation: isolate; padding-top: 8px; }
.vp-stage-region { position: relative; display: flex; align-items: center; gap: var(--vp-column-gap); min-width: 0; }
.vp-stage-heading { position: absolute; left: 0; top: -42px; color: var(--muted); font-size: 14px; }
.vp-stage-action { position: absolute; left: 0; bottom: -46px; }
.vp-stage-stack { display: grid; align-content: start; gap: 28px; flex: 0 0 auto; }
.vp-materials { display: grid; align-content: center; gap: 12px; min-width: 0; }
.vp-lanes { display: grid; gap: 14px; min-width: 0; }
.vp-flow-columns { display: grid; grid-template-columns: repeat(var(--vp-lane-columns, 1), calc(var(--vp-material-width) + var(--vp-source-width) + 2 * var(--vp-gap) + var(--vp-clip-width))); gap: 44px; align-items: start; }
.vp-flow-group { display: grid; grid-template-columns: var(--vp-material-width) calc(var(--vp-source-width) + var(--vp-gap) + var(--vp-clip-width)); gap: var(--vp-gap); align-items: center; }
.vp-lane-heading { display: grid; grid-template-columns: var(--vp-material-width) var(--vp-source-width) var(--vp-clip-width); gap: var(--vp-gap); }
.vp-lane { display: grid; grid-template-columns: var(--vp-source-width) var(--vp-clip-width); gap: var(--vp-gap); align-items: center; min-width: 0; }
.vp-source-group { min-width: 0; padding: 0; border: 0; background: transparent; }
.vp-source-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 5px; }
.vp-source-heading > strong { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; line-height: 16px; }
.vp-source-heading > small { flex: 0 0 auto; color: var(--muted); font-size: 12px; line-height: 16px; }
.vp-images { display: grid; grid-template-columns: repeat(auto-fill, 128px); gap: 8px; }
.vp-image-node, .vp-material-node { position: relative; display: flex; flex-direction: column; align-items: flex-start; width: 128px; min-width: 0; padding: 0; border: 0; background: transparent; }
.vp-image-node > img, .vp-material-node > img, .vp-image-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 128px; height: 72px; box-sizing: border-box; border-radius: 3px; background: transparent; object-fit: contain; }
.vp-image-empty { color: var(--muted); border: 1px dashed color-mix(in srgb, var(--line) 55%, transparent); }
.vp-image-empty > span { font-size: 16px; line-height: 16px; }
.vp-image-empty > small { font-size: 12px; }
.vp-image-name { display: block; max-width: 100%; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 18px; }
.video-production .vp-image-node > button, .video-production .vp-material-node > button { min-height: 23px; margin-top: 3px; padding: 1px 5px; font-size: 12px; }
.vp-clip-node, .vp-final-node { position: relative; min-width: 0; padding: 0; border: 0; background: transparent; }
.vp-video-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; aspect-ratio: 16 / 9; box-sizing: border-box; color: var(--muted); border: 1px solid color-mix(in srgb, var(--line) 55%, transparent); border-radius: 3px; background: transparent; font-size: 12px; }
.vp-video-symbol { font-size: 19px; line-height: 19px; }
.vp-node-info { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding: 4px 0 0; }
.vp-node-info > strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; line-height: 18px; }
.vp-node-info > small { color: var(--muted); font-size: 12px; line-height: 18px; }
.video-production .vp-node-info > button { min-height: 23px; margin-top: 1px; padding: 1px 5px; font-size: 12px; }
.vp-no-images, .vp-no-materials { margin: 0; padding: 8px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.video-production .vp-text-source { width: 128px; min-height: 42px; padding: 8px; border: 1px dashed var(--line); background: transparent; color: var(--muted); font-size: 12px; }
.vp-direct-material { width: 128px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.vp-wires { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.vp-wire, .vp-wire-arrow { fill: none; stroke: var(--video-accent); stroke-width: .9; opacity: .5; vector-effect: non-scaling-stroke; }
.vp-wire { stroke-dasharray: 3 4; }
.vp-wire-connected { opacity: .35; stroke-dasharray: none; }
.vp-wire-active { opacity: .75; stroke-dasharray: none; }
.vp-wire-trail { fill: none; stroke: var(--video-accent); stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; animation: vp-wire-flow var(--vp-flow-speed, 4s) linear infinite; animation-delay: var(--vp-flow-delay, 0s); }
.vp-wire-trail.vp-trail-glow { stroke-width: 3.5; stroke-dasharray: 28 72; opacity: .12; }
.vp-wire-trail.vp-trail-mid { stroke-width: 2; stroke-dasharray: 14 86; stroke-dashoffset: -14; opacity: .3; animation-name: vp-wire-flow-mid; }
.vp-wire-trail.vp-trail-core { stroke-width: 1.1; stroke-dasharray: 4 96; stroke-dashoffset: -24; opacity: .75; animation-name: vp-wire-flow-core; }
.vp-trail-active { --vp-flow-speed: 4s; }
.vp-trail-active.vp-trail-glow { stroke-width: 5; opacity: .2; }
.vp-trail-active.vp-trail-mid { stroke-width: 2.5; opacity: .45; }
.vp-trail-active.vp-trail-core { stroke-width: 1.7; opacity: 1; }
@keyframes vp-wire-flow { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes vp-wire-flow-mid { from { stroke-dashoffset: 86; } to { stroke-dashoffset: -14; } }
@keyframes vp-wire-flow-core { from { stroke-dashoffset: 76; } to { stroke-dashoffset: -24; } }
.vp-material-wire { stroke: var(--image-accent); }
.vp-reference-wire { stroke: var(--image-accent); }
.vp-merge-wire { stroke: var(--blue); }
.vp-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.vp-footer-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.video-production .vp-image-node > .vp-thumb-open, .video-production .vp-material-node > .vp-thumb-open { display: block; width: 128px; height: 72px; min-height: 72px; padding: 0; margin: 0; border: 0; border-radius: 3px; background: transparent; overflow: hidden; }
.vp-thumb-open > img { display: block; width: 128px; height: 72px; object-fit: contain; }
.video-production .vp-image-node > .vp-image-name, .video-production .vp-material-node > .vp-image-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 128px; max-height: 36px; min-height: 0; margin: 4px 0 0; padding: 0; border: 0; background: transparent; font-size: 12px; font-weight: 500; line-height: 18px; text-align: left; white-space: normal; overflow-wrap: anywhere; overflow: hidden; }
.video-production .vp-image-name:hover, .video-production .vp-node-title:hover, .video-production .vp-order-open:hover { color: var(--blue); }
.vp-review-note { color: var(--muted); font-size: 12px; line-height: 18px; }
.vp-clip-node, .vp-final-node { display: grid; grid-template-rows: 99px 81px; gap: 6px; width: var(--vp-clip-width); height: 186px; box-sizing: border-box; padding: 0; border: 0; background: transparent; cursor: pointer; }
.vp-final-node { width: var(--vp-final-width); }
.video-production .vp-node-open { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 99px; min-height: 99px; padding: 0; margin: 0; aspect-ratio: auto; border: 1px solid color-mix(in srgb, var(--line) 55%, transparent); border-radius: 4px; background: var(--soft); font-size: 12px; line-height: 18px; color: var(--muted); overflow: hidden; }
.vp-play-icon { font-size: 23px; line-height: 1; font-weight: 400; }
.vp-video-poster { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #111; pointer-events: none; }
.vp-node-open[data-has-cover=true] .vp-play-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid #fff6; border-radius: 50%; background: #0007; color: #fff; font-size: 19px; line-height: 1; text-shadow: 0 1px 3px #000; }
.vp-node-open[data-has-cover=true]:hover .vp-play-icon { background: #000a; }
.vp-node-open[data-running=true]::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 25%, color-mix(in srgb, var(--video-accent) 12%, transparent) 50%, transparent 75%); transform: translateX(-100%); animation: vp-preview-flow 2.4s ease-in-out infinite; pointer-events: none; }
@property --vp-node-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.vp-node-open[data-running=true]::before { content: ''; position: absolute; inset: 0; padding: 2px; border-radius: inherit; background: conic-gradient(from var(--vp-node-angle), transparent 35%, color-mix(in srgb, var(--video-accent) 12%, transparent) 63%, color-mix(in srgb, var(--video-accent) 55%, transparent) 83%, var(--video-accent) 96%, transparent 100%); mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; pointer-events: none; animation: vp-node-orbit 2.4s linear infinite; z-index: 2; }
.vp-node-open[data-running=true] .vp-play-icon { position: relative; width: 24px; height: 24px; font-size: 0; border: 0; background: transparent; z-index: 1; }
.vp-node-open[data-running=true] .vp-play-icon::before { content: ''; display: block; width: 20px; height: 20px; border: 2px solid color-mix(in srgb, var(--video-accent) 18%, transparent); border-top-color: var(--video-accent); border-right-color: color-mix(in srgb, var(--video-accent) 65%, transparent); border-radius: 50%; animation: vp-spinner-turn .9s linear infinite; }
@keyframes vp-node-orbit { to { --vp-node-angle: 360deg; } }
@keyframes vp-spinner-turn { to { transform: rotate(360deg); } }
@keyframes vp-preview-flow { to { transform: translateX(100%); } }
.vp-node-info { display: grid; grid-template-rows: 33px 18px 26px; align-items: center; gap: 2px; min-height: 0; padding: 0; }
.vp-final-node .vp-node-info { grid-template-rows: 18px 16px 17px 26px; gap: 1px; }
.video-production .vp-node-info > .vp-node-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 100%; min-height: 0; max-height: 36px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 12px; font-weight: 500; line-height: 18px; white-space: normal; text-align: left; overflow-wrap: anywhere; overflow: hidden; }
.vp-node-info > small { font-size: 12px; line-height: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.video-production .vp-node-info > button:last-child { justify-self: start; align-self: end; min-height: 26px; height: 26px; margin: 0; padding: 2px 6px; font-size: 12px; line-height: 20px; white-space: nowrap; }
.video-production .vp-order-open { justify-self: start; min-height: 20px; height: 20px; margin: 0; padding: 0; border: 0; background: transparent; font-size: 12px; line-height: 20px; }
.video-production .vp-final-node .vp-node-title { -webkit-line-clamp: 1; max-height: 18px; }
.vp-final-node .vp-node-info > small { line-height: 16px; }
.video-production .vp-node-info > .vp-order-open { min-height: 17px; height: 17px; line-height: 17px; }
.vp-dialog { width: min(740px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: 88dvh; box-sizing: border-box; margin: auto; padding: 0; border: 1px solid var(--dialog-line); border-radius: 12px; background: var(--paper); color: var(--ink); overflow: hidden; }
.vp-dialog[open] { display: flex; flex-direction: column; }
.vp-dialog-body { min-height: 0; padding: 0 20px 20px; overflow-y: auto; overscroll-behavior: contain; }
.vp-dialog::backdrop { background: #0009; }
.vp-dialog-heading { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 0; padding: 20px 20px 16px; background: var(--paper); }
.vp-dialog-heading h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.vp-dialog-heading button { flex: 0 0 auto; min-height: 30px; padding: 3px 9px; font-size: 13px; }
.vp-image-dialog { width: min(1080px, calc(100vw - 32px)); }
.vp-image-dialog .vp-dialog-body > img { display: block; width: 100%; max-height: 72dvh; object-fit: contain; }
.video-production .vp-node-open[data-error=true] { color: var(--danger, #d87575); }
.vp-detail-section { margin: 0 0 18px; padding: 0; border: 0; background: transparent; }
.vp-detail-section h3 { margin: 0 0 7px; font-size: 14px; line-height: 1.5; }
.vp-detail-text { margin: 0; font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.vp-player { display: block; width: 100%; max-height: 60dvh; background: #111; margin: 0 0 14px; }
.vp-generation-form, .vp-generation-params, .vp-batch-durations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vp-generation-form label, .vp-generation-params label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.vp-generation-form input, .vp-generation-form select { width: 100%; box-sizing: border-box; min-width: 0; min-height: 34px; font-size: 13px; }
.vp-generation-form > p, .vp-generation-params, .vp-batch-durations { grid-column: 1 / -1; }
.vp-generation-form > button { justify-self: start; padding: 5px 10px; font-size: 13px; }
.vp-delete-video { margin: 12px 0; }
@media (prefers-reduced-motion: reduce) { .vp-wire-trail, .vp-wire-trail.vp-trail-mid, .vp-wire-trail.vp-trail-core, .vp-node-open[data-running=true]::after { animation: none; } .vp-node-open[data-running=true]::after { transform: none; opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .vp-node-open[data-running=true]::before, .vp-node-open[data-running=true] .vp-play-icon::before { animation: none; } }
@media (prefers-reduced-motion: no-preference) { body:has(.vp-dialog[open]) .vp-wire-trail { animation-play-state: paused; } }
@media (max-width: 480px) { .vp-generation-form, .vp-generation-params, .vp-batch-durations { grid-template-columns: minmax(0, 1fr); } }
.vp-detail-images { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.vp-detail-images > div { display: flex; flex-direction: column; gap: 4px; width: 132px; min-width: 0; }
.vp-detail-images > div > span { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.vp-detail-images > div > small { font-size: 12px; color: var(--muted); }
.vp-detail-thumb { display: block; width: 132px; height: 80px; padding: 0; margin: 0; border: 0; background: var(--soft); overflow: hidden; }
.vp-detail-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.vp-detail-order { display: grid; gap: 8px; }
.vp-detail-order > button { min-height: 36px; padding: 7px 10px; text-align: left; font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
#output-panel.is-video-production > #result-management, #output-panel.is-video-production > #result-primary-actions, #output-panel.is-video-production > .series-navigation { display: none; }
body:has(#output-panel.is-video-production) > #shot-navigation { display: none; }
@media (max-width: 760px) {
  .video-production { --vp-gap: 220px; }
  .vp-heading { margin-bottom: 10px; }
  .video-production .vp-controls > label { flex: 1 1 calc(50% - 4px); width: calc(50% - 4px); }
  .video-production .vp-controls select, .video-production .vp-controls > label:nth-child(3) select { width: 100%; height: 34px; min-height: 34px; font-size: 16px; }
  .video-production .vp-controls > button, .vp-footer-actions > button { min-height: 32px; }
  .vp-steps { gap: 3px; }
  .vp-steps > button { gap: 3px; padding: 3px 4px; font-size: 12px; }
  .vp-step-number { width: 13px; }
  .vp-scroll-hint { display: block; }
  .vp-dialog { padding: 0; }
  .vp-dialog-heading { padding: 14px 14px 12px; }
  .vp-dialog-body { padding: 0 14px 14px; }
}
.vp-image-node,.vp-material-node{position:relative}
.video-production .vp-media-delete{position:absolute;top:2px;right:2px;width:24px;height:24px;min-height:24px;padding:0;border:0;border-radius:50%;background:#151d29d9;color:#eee;font-size:16px;line-height:24px;z-index:2}
.video-production .vp-node-actions{display:flex;align-items:center;justify-content:center;gap:6px;min-height:28px}
.video-production .vp-node-actions button{width:auto;min-height:26px;padding:3px 7px;font-size:12px}
.video-production .vp-node-actions .vp-delete-video{background:transparent;color:#c9a3a3;border-color:transparent}
@media(min-width:701px){.video-production .vp-controls>label:nth-child(2) select{width:158px}}

/* The viewport has no pan boundaries; the world stays at natural node sizes. */
.vp-scroll { position: relative; width: 100%; height: clamp(480px, 74dvh, 1000px); box-sizing: border-box; overflow: hidden; overscroll-behavior: contain; padding: 0; border: 1px solid var(--line); border-radius: 12px; background-color: var(--paper); background-image: radial-gradient(circle, color-mix(in srgb,var(--muted) 24%,transparent) 1px, transparent 1.2px); background-size: var(--vp-grid-size,40px) var(--vp-grid-size,40px); touch-action: none; cursor: grab; user-select: none; }
.vp-scroll[data-panning=true] { cursor: grabbing; }
.vp-scroll[data-panning=true] * { cursor: grabbing !important; }
.vp-canvas { position: absolute; top: 0; left: 0; width: max-content; padding: 96px 64px 72px; transform-origin: 0 0; will-change: transform; }
.vp-canvas img { -webkit-user-drag: none; }
.vp-canvas-tools { position: absolute; top: 14px; left: 14px; z-index: 10; display: flex; align-items: center; gap: 3px; max-width: calc(100% - 28px); box-sizing: border-box; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb,var(--paper) 93%,transparent); box-shadow: 0 4px 18px #0002; cursor: default; }
.video-production .vp-canvas-tools button { min-height: 28px; height: 28px; padding: 3px 7px; border: 0; background: transparent; white-space: nowrap; font-size: 12px; }
.video-production .vp-canvas-tools button:hover { background: var(--soft); }
.video-production .vp-canvas-tools .vp-zoom-value { min-width: 46px; font-variant-numeric: tabular-nums; }
.vp-canvas-hint { position: absolute; left: 16px; bottom: 12px; z-index: 10; margin: 0; padding: 5px 8px; border-radius: 5px; background: color-mix(in srgb,var(--paper) 90%,transparent); color: var(--muted); font-size: 12px; pointer-events: none; }
.vp-scroll:fullscreen { width: 100vw; height: 100dvh; max-width: none; border: 0; border-radius: 0; }
.vp-scroll .vp-dialog { cursor: auto; user-select: text; touch-action: auto; }
.vp-scroll[data-moving=true] .vp-wire-trail, .vp-scroll[data-hidden=true] .vp-wire-trail { animation-play-state: paused; }
.vp-node-open[data-running=true]::before, .vp-node-open[data-running=true]::after { display: none; }
.vp-trail-ambient { --vp-flow-speed: 7.5s; }
.vp-trail-ambient.vp-trail-glow { opacity: .13; }
.vp-trail-ambient.vp-trail-mid { opacity: .32; }
.vp-trail-ambient.vp-trail-core { opacity: .7; }
.vp-wire-connected { opacity: .32; }
.vp-column-heads { font-size: 14px; letter-spacing: .02em; margin-bottom: 28px; }
@media(max-width:480px) { .vp-scroll { height: 68dvh; min-height: 440px; } .vp-canvas-tools { left: 9px; top: 9px; padding: 3px; gap: 0; } .video-production .vp-canvas-tools button { padding: 3px 6px; } .vp-canvas-hint { left: 9px; bottom: 9px; font-size: 11px; } }

.vp-canvas-toolbar { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 10; padding: 7px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); box-shadow: 0 3px 12px #0002; cursor: default; }
.vp-canvas-commands { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.vp-production-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.video-production .vp-production-actions button { min-height: 30px; padding: 4px 9px; font-size: 12px; white-space: nowrap; }
.vp-canvas-toolbar .vp-canvas-tools { position: static; flex-wrap: wrap; max-width: 100%; padding: 5px 0 0; margin-top: 6px; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: transparent; }
.vp-canvas-search { display: flex; align-items: center; gap: 3px; flex: 1 1 270px; min-width: 0; max-width: 440px; }
.video-production .vp-canvas-search input { flex: 1 1 140px; width: 160px; min-width: 70px; height: 30px; margin: 0; padding: 4px 7px; font-size: 13px; }
.video-production .vp-canvas-search button { min-height: 28px; height: 28px; padding: 3px 6px; font-size: 12px; }
.vp-search-count { color: var(--muted); white-space: nowrap; font-size: 12px; min-width: 0; font-variant-numeric: tabular-nums; }
.vp-canvas-tools label { display: flex; align-items: center; gap: 4px; margin: 0 4px; color: var(--muted); font-size: 12px; }
.vp-canvas-tools select { width: auto; min-width: 88px; min-height: 28px; height: 28px; padding: 3px 20px 3px 5px; margin: 0; font-size: 12px; }
.vp-canvas-tools button[aria-pressed=true] { color: var(--blue); background: var(--soft); }
.vp-canvas-help { position: relative; margin: 0 4px; padding: 0; border: 0; background: transparent; font-size: 12px; }
.vp-canvas-help summary { padding: 4px; cursor: pointer; white-space: nowrap; }
.vp-canvas-help-body { position: absolute; right: 0; top: 30px; z-index: 12; width: max-content; max-width: min(330px,calc(100vw - 65px)); padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); box-shadow: 0 4px 16px #0003; }
.vp-canvas-help-body p { margin: 3px 0; font-size: 12px; line-height: 1.6; }
.vp-node-selected { outline: 2px solid var(--blue); outline-offset: 7px; border-radius: 4px; }
.vp-graph[data-edges=none] .vp-wires { display: none; }
.vp-graph[data-edges=related] .vp-wires path:not(.vp-wire-related) { display: none; }
.vp-scroll[data-locked=true] { cursor: default; }
.vp-canvas { padding-top: 116px; }
@media(max-width:480px) { .vp-canvas-toolbar { left: 7px; right: 7px; top: 7px; padding: 5px; } .vp-canvas-commands { gap: 7px; } .vp-production-actions { display: grid; grid-template-columns: repeat(2,max-content); gap: 4px; } .video-production .vp-production-actions button { padding: 4px 7px; } .vp-canvas-search { flex-basis: 100%; max-width: none; } .video-production .vp-canvas-search input { font-size: 16px; } .vp-canvas-help { position: static; } .vp-canvas-help-body { left: 5px; right: 5px; top: 100%; width: auto; max-width: none; } }

/* Keep the toolbar sized to its controls; secondary view tools open as a menu. */
.vp-canvas-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; right: auto; width: max-content; max-width: calc(100% - 24px); padding: 6px; overflow: visible; }
.vp-canvas-commands { display: contents; }
.vp-production-actions { flex: 0 0 auto; flex-wrap: nowrap; gap: 4px; }
.video-production .vp-production-actions button { flex: 0 0 auto; width: auto; min-height: 28px; padding: 3px 7px; }
.vp-canvas-search { flex: 0 1 210px; width: 210px; min-width: 160px; max-width: 240px; }
.video-production .vp-canvas-search input { width: 100px; flex: 1 1 100px; }
.vp-canvas-toolbar .vp-canvas-tools { display: flex; align-items: center; flex-wrap: nowrap; flex: 0 0 auto; gap: 2px; margin: 0; padding: 0; border: 0; }
.vp-more-tools { position: relative; display: block; flex: 0 0 auto; width: max-content; margin: 0; padding: 0; border: 0; background: transparent; }
.vp-more-tools > summary { display: block; min-height: 28px; padding: 4px 7px; font-size: 12px; line-height: 20px; list-style: none; white-space: nowrap; }
.vp-more-tools > summary::-webkit-details-marker { display: none; }
.vp-more-tools > summary::after { content: '⌄'; margin-left: 5px; color: var(--muted); }
.vp-more-tools > .vp-advanced-tools { position: absolute; z-index: 20; right: 0; top: calc(100% + 8px); display: flex; align-items: center; flex-wrap: wrap; gap: 7px; width: 250px; max-width: calc(100vw - 44px); max-height: 320px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); box-shadow: 0 6px 22px #0004; }
.vp-more-tools:not([open]) > .vp-advanced-tools { display: none; }
.vp-advanced-tools .vp-canvas-help { flex-basis: 100%; margin: 0; }
.vp-advanced-tools .vp-canvas-help-body { position: static; width: auto; max-width: 100%; margin-top: 7px; box-shadow: none; }
.vp-video-ready { position: absolute; right: 5px; bottom: 5px; z-index: 2; padding: 1px 5px; border-radius: 4px; background: #14291ee8; color: #a9e3bd; font-size: 10px; line-height: 16px; pointer-events: none; }
.vp-node-open[data-has-video=true] .vp-play-icon { position: relative; z-index: 1; color: #fff; text-shadow: 0 1px 4px #000; }
