/* Video to Frames: the same Video Engine skeleton as Video Studio (rail · library · preview · inspector · bottom bar),
   with a source panel, export settings and a frame gallery in place of the timeline tracks. */
.vf { --lib:272px; --insp:300px; --tl:268px; }
.vf .vx-top { grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); }
.vf .vx-title { max-width:none; margin:0; cursor:default; }
.vf .vx-title:hover { background:none; }
.vf button:disabled { opacity:.38; cursor:default; transform:none; }
.vf :is(button,a,input,select,summary,[tabindex]):focus-visible { outline:2px solid #22d3ee; outline-offset:2px; }
.vf a,.vf-dialog a { color:#c4b5fd; text-decoration:none; }
.vf a:hover,.vf-dialog a:hover { text-decoration:underline; }
.vf .vx-hint { margin:10px 0 0; color:#71717a; font-size:11.5px; line-height:1.5; }
.vf .vx-field { width:100%; font-size:12.5px; background:#111118; color:#e4e4e7; }

/* top bar */
.vf-private { gap:8px; color:#a1a1aa; font-size:12px; font-weight:600; }
.vf-private span { width:7px; height:7px; border-radius:50%; background:#4ade80; box-shadow:0 0 0 3px #4ade801a; }

/* left: your video */
.vf-file { margin-top:16px; padding:14px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.02); }
.vf-filename { margin:0 0 12px; color:#fafafa; font-size:13px; font-weight:700; line-height:1.4; overflow-wrap:anywhere; }
.vf-meta { display:grid; grid-template-columns:auto minmax(0,1fr); gap:9px 12px; margin:0; font-size:12px; }
.vf-meta dt { color:#71717a; }
.vf-meta dd { margin:0; color:#d4d4d8; text-align:right; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.vf-links { display:grid; gap:4px; margin-top:18px; padding-top:14px; border-top:1px solid var(--line); }
.vf .vf-links a { display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:10px; color:#d4d4d8; font-size:12.5px; font-weight:600; }
.vf .vf-links a:hover { background:rgba(255,255,255,.05); color:#fff; text-decoration:none; }
.vf-links svg { width:17px; height:17px; flex:none; color:#8b8b96; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

/* centre: preview */
.vf .vx-stage { position:relative; display:flex; flex-direction:column; overflow:hidden; }
.vf .vx-view { position:relative; flex:1; min-height:0; padding:20px; overflow:hidden; }
.vf video,.vf #vf-fallback { display:block; width:100%; height:100%; min-height:0; object-fit:contain; border-radius:12px; background:#000; }
.vf .vx-empty { gap:14px; cursor:pointer; }
.vf-status { flex:none; margin:0; padding:0 20px 12px; min-height:28px; color:#71717a; font-size:12px; text-align:center; }
.vf-status.bad { color:#fca5a5; }
.vf-working { position:absolute; inset:0; z-index:5; display:grid; place-items:center; padding:20px; background:#07070bf0; text-align:center; }
.vf-working b { font-size:14px; }
.vf-working progress { width:min(260px,65vw); height:6px; accent-color:#a78bfa; border:0; }
.vf-drop { position:absolute; inset:12px; z-index:6; display:grid; place-items:center; border:2px dashed #a78bfa; border-radius:16px; background:#131021ed; font-weight:700; }

/* right: export settings */
.vf .vx-sec > summary em { font-variant-numeric:tabular-nums; }
.vf-formats { display:grid; grid-template-columns:repeat(3,1fr); }
.vf-label { display:flex; justify-content:space-between; margin:16px 0 8px; color:#a1a1aa; font-size:12px; font-weight:600; }
.vf-label output { color:#c4b5fd; font-size:11.5px; }
.vf #vf-quality { width:100%; accent-color:#a78bfa; }
.vf-match { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; padding:12px; border:1px solid #2a2a33; border-radius:12px; background:#111118; color:#e4e4e7; text-align:left; cursor:pointer; transition:border-color .2s, background .2s; }
.vf-match:hover { border-color:#3f3f46; }
.vf-match[aria-pressed="true"] { border-color:#a78bfa80; background:linear-gradient(100deg,#8b5cf61f,#22d3ee08); }
.vf-match span { display:grid; gap:4px; }
.vf-match b { font-size:12.5px; }
.vf-match small { color:#a1a1aa; font-size:11px; }
.vf-match em { padding:3px 7px; border-radius:999px; background:#a78bfa24; color:#c4b5fd; font-size:10.5px; font-weight:700; font-style:normal; }
.vf-fps { display:grid; grid-template-columns:repeat(6,1fr); margin-top:12px; }
.vf .vf-fps button { padding:0 4px; }
.vf-range { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.vf-range label { color:#71717a; font-size:11.5px; font-weight:600; }
.vf-range input { margin-top:6px; }
.vf .vf-whole { width:100%; margin-top:10px; }
.vf-foot { flex:none; display:grid; gap:12px; padding:14px 16px 16px; border-top:1px solid var(--line); background:var(--panel); }
.vf-estimate { display:grid; gap:3px; }
.vf-estimate b { color:#fafafa; font-size:13px; }
.vf-estimate span { color:#71717a; font-size:11.5px; font-variant-numeric:tabular-nums; }
.vf-estimate.bad b { color:#fca5a5; }
.vf .vf-go { justify-content:center; width:100%; height:42px; }

/* bottom: tools · playback · download, then the scrub track and the gallery */
.vf .vx-tb-r .vf-zip { height:34px; padding:0 14px; font-size:12.5px; }
.vf .vx-play svg { fill:currentColor; stroke:none; }
.vf-track { --a:0%; --b:0%; position:relative; flex:none; height:34px; margin:6px 16px 0; }
.vf-track::before,.vf-sel { content:""; position:absolute; top:50%; height:6px; margin-top:-3px; border-radius:6px; }
.vf-track::before { left:0; right:0; background:rgba(255,255,255,.07); }
.vf-sel { left:var(--a); width:calc(var(--b) - var(--a)); background:linear-gradient(90deg,#8b5cf6,#22d3ee); opacity:0; transition:opacity .2s; }
.vf-track.on .vf-sel { opacity:.85; }
.vf-track input { position:relative; width:100%; height:100%; margin:0; background:none; -webkit-appearance:none; appearance:none; cursor:pointer; }
.vf-track input:disabled { cursor:default; }
.vf-track input::-webkit-slider-runnable-track { height:6px; background:none; }
.vf-track input::-moz-range-track { height:6px; background:none; }
.vf-track input::-webkit-slider-thumb { -webkit-appearance:none; width:4px; height:22px; margin-top:-8px; border:0; border-radius:3px; background:#fff; box-shadow:0 0 0 3px #00000080; }
.vf-track input::-moz-range-thumb { width:4px; height:22px; border:0; border-radius:3px; background:#fff; }
.vf-track input:disabled::-webkit-slider-thumb { background:#3f3f46; }
.vf-track input:disabled::-moz-range-thumb { background:#3f3f46; }
.vf-results-head { display:flex; flex:none; align-items:center; gap:12px; min-height:34px; padding:2px 16px 8px; }
.vf-results-head h2 { display:flex; align-items:center; gap:7px; flex:none; margin:0; color:#e4e4e7; font-size:12.5px; }
.vf-results-head h2 span { padding:2px 7px; border-radius:999px; background:rgba(255,255,255,.07); color:#a1a1aa; font-size:11px; font-variant-numeric:tabular-nums; }
.vf-results-head p { flex:1; min-width:0; margin:0; overflow:hidden; color:#71717a; font-size:12px; white-space:nowrap; text-overflow:ellipsis; }
.vf-pagination { display:flex; align-items:center; gap:4px; flex:none; }
.vf-pagination span { min-width:70px; color:#a1a1aa; font-size:11.5px; text-align:center; font-variant-numeric:tabular-nums; }
.vf-pagination .vx-ib svg { width:16px; height:16px; }
.vf-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(132px,1fr)); align-content:start; gap:10px; flex:1; min-height:0; overflow:auto; padding:0 16px 14px; scrollbar-width:thin; scrollbar-color:#27272a transparent; }
.vf-gallery-empty { grid-column:1/-1; display:grid; place-items:center; min-height:64px; border:1px dashed rgba(255,255,255,.08); border-radius:12px; color:#52525b; font-size:12px; }
.vf-card { min-width:0; color:#a1a1aa; font-size:11px; }
.vf .vf-card a { display:grid; gap:6px; color:inherit; font-variant-numeric:tabular-nums; }
.vf .vf-card a:hover { text-decoration:none; }
.vf-card img { display:block; width:100%; aspect-ratio:16/10; object-fit:contain; border:1px solid rgba(255,255,255,.06); border-radius:10px; background:#111118; transition:border-color .2s, transform .2s; }
.vf-card a:hover img { border-color:#a78bfa99; transform:translateY(-2px); }
.vf-card-copy { display:flex; justify-content:space-between; gap:4px; }
.vf-card-copy b { color:#e4e4e7; font-weight:600; }

/* guide */
.vf-dialog { width:min(560px,calc(100% - 24px)); max-height:80dvh; padding:24px; border:1px solid #ffffff1a; border-radius:20px; background:#101017; color:#d4d4d8; font:13px/1.7 Inter,system-ui,sans-serif; box-sizing:border-box; }
.vf-dialog::backdrop { background:#000b; backdrop-filter:blur(5px); }
.vf-dialog h2 { margin:0; color:#fff; font-size:20px; }
.vf-dialog h3 { margin-bottom:0; color:#c4b5fd; font-size:13px; }
.vf-dialog-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.vf-dialog .vx-ib { width:36px; height:36px; border:0; background:none; color:#a1a1aa; cursor:pointer; }

.vf .vx-dock { display:none; }
@media (min-width:761px) and (max-width:1180px) { .vf { --lib:236px; --insp:280px; } .vf-private { display:none; } }
@media (max-height:820px) and (min-width:761px) { .vf { --tl:232px; } }
@media (max-width:760px) {
  body.vf-page .nxa { bottom:calc(80px + env(safe-area-inset-bottom)); }
  .vf { --tl:248px; }
  .vf .vx-top { grid-template-columns:minmax(0,1fr) auto; }
  .vf .vx-title { font-size:13px; }
  .vf .vx-top .mx-primary { padding:0 12px; font-size:12px; gap:6px; }
  .vf-private { display:none; }
  .vf .vx-dock { display:flex; }
  .vf .vx-view { padding:10px; }
  .vf .vx-empty { inset:10px; }
  .vf-status { padding:0 10px 8px; font-size:11px; }
  .vf .vx-tb-l { display:flex; }
  .vf .vx-tb-c { grid-column:auto; }
  .vf .vx-tool { padding:0 8px; }
  .vf .vx-tool span,.vf .vf-zip span { display:none; }
  .vf .vx-tb-r .vf-zip { width:38px; padding:0; justify-content:center; }
  .vf-track { margin:4px 10px 0; }
  .vf-results-head { padding:2px 10px 6px; }
  .vf-results-head p { display:none; }
  .vf-grid { grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:8px; padding:0 10px 10px; }
  .vf .vx-lib,.vf .vx-insp { max-height:80dvh; }
  .vf .vf-fps button { min-height:36px; }
}
@media (max-height:650px) { .vf { --tl:190px; } .vf-results-head p { display:none; } }
@media (prefers-reduced-motion:reduce) { .vf * { animation:none!important; transition:none!important; } }

/* UI clean-up step 6: plain buttons (white primary, no gradient, glow or shine) */
.vf-match[aria-pressed="true"] { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); }
