/* V1.0.78: a contained, accessible content-only cover workflow. */
.fm-capture-dialog{--cap-ink:#24223b;--cap-muted:#666278;--cap-line:#e6e1ee;--cap-surface:#fff;--cap-soft:#f6f4fb;--cap-accent:#6536d7;color:var(--cap-ink);background:var(--cap-surface);width:min(1320px,calc(100vw - 40px));max-width:none;max-height:calc(100dvh - 40px);padding:0;border:1px solid var(--cap-line);border-radius:22px;box-shadow:0 30px 100px #14112855;overflow:auto;font-family:inherit}
.fm-capture-dialog::backdrop{background:#151128b8;backdrop-filter:blur(7px)}
.fm-capture-dialog *{box-sizing:border-box}
.fm-capture-dialog [hidden]{display:none!important}
.fm-capture-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 26px;border-bottom:1px solid var(--cap-line);position:sticky;top:0;z-index:3;background:var(--cap-surface)}
.fm-capture-head span,.fm-capture-review>div>span{font-size:10px;font-weight:800;letter-spacing:.14em;color:var(--cap-accent)}
.fm-capture-head h2{font-size:21px;margin:5px 0 0;line-height:1.3;overflow-wrap:anywhere}
.fm-capture-dialog button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;max-width:100%;padding:10px 16px;background:var(--cap-surface);border:1px solid var(--cap-line);border-radius:11px;color:var(--cap-ink);font-family:inherit;font-size:13px;font-weight:600;line-height:1.3;cursor:pointer;box-shadow:none}
.fm-capture-dialog button:hover:not(:disabled){border-color:var(--cap-accent);background:var(--cap-soft)}
.fm-capture-dialog button:focus-visible{outline:3px solid #8c69e9;outline-offset:3px}
.fm-capture-dialog button:disabled{opacity:.5;cursor:default}
.fm-capture-dialog button[data-close-capture]{font-size:24px;min-width:44px;padding:4px}
.fm-capture-dialog svg{width:19px;height:19px;flex-shrink:0}
.fm-capture-toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:12px 26px;background:var(--cap-soft)}
.fm-capture-toolbar p,.fm-capture-review p{font-size:13px;line-height:1.6;color:var(--cap-muted);margin:0}
.fm-capture-toolbar>div{display:flex;gap:5px;flex-shrink:0}
.fm-capture-toolbar button[aria-pressed=true]{background:var(--cap-surface);color:var(--cap-accent);border-color:#bda5ef}
.fm-capture-stage{display:flex;justify-content:center;align-items:flex-start;padding:18px;background:repeating-conic-gradient(#e6e3ee 0% 25%,#efedf5 0% 50%) 50%/18px 18px}
.fm-capture-stage iframe{width:100%;height:min(62dvh,720px);min-height:300px;display:block;border:0;background:#fff;box-shadow:0 8px 30px #20173820;flex-shrink:1}
.fm-capture-dialog[data-viewport=mobile] iframe{width:min(390px,100%);height:min(65dvh,740px)}
.fm-capture-review{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:20px 26px;background:var(--cap-soft);border-top:1px solid var(--cap-line)}
.fm-capture-review img{display:block;max-width:52%;max-height:240px;object-fit:contain;border-radius:10px;box-shadow:0 3px 15px #17132920;background:#fff}
#videoCaptureDialog{width:min(960px,calc(100vw - 40px))}
#videoCaptureDialog .fm-capture-review{flex-direction:column;align-items:stretch}
#videoCaptureDialog .fm-capture-review img{max-width:100%;max-height:62dvh;align-self:center}
.fm-capture-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;position:sticky;bottom:0;background:var(--cap-surface);padding:16px 26px;border-top:1px solid var(--cap-line)}
.fm-capture-footer p{font-size:13px;color:var(--cap-muted);line-height:1.5;margin:0}
.fm-capture-footer p[data-error=true]{color:#b33153}
.fm-capture-footer>div{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;flex-shrink:0}
.fm-capture-dialog button.fm-capture-primary{background:var(--cap-accent);color:#fff;border-color:var(--cap-accent)}
.fm-capture-dialog button.fm-capture-primary:hover:not(:disabled){background:#5126b5;color:#fff}
.vs-cover-tools{display:flex;align-items:center;gap:14px;margin:0 0 18px;padding:16px;background:var(--card,#fff);border:1px solid var(--line,#e6e1ee);border-radius:16px}
.vs-cover-tools img{width:100px;aspect-ratio:16/10;object-fit:contain;background:#eeebf5;border-radius:10px}
.vs-cover-tools>div{display:flex;flex-wrap:wrap;gap:8px;align-items:center;min-width:0}
.vs-cover-tools button{display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:9px 13px;border-radius:10px}
.vs-cover-tools svg{width:18px;height:18px}
.vs-cover-tools small{flex-basis:100%;color:var(--muted,#666278);line-height:1.4}
html[data-theme=dark] .fm-capture-dialog,body.dark .fm-capture-dialog{--cap-ink:#f1edf9;--cap-muted:#b9b4ca;--cap-line:#373349;--cap-surface:#191827;--cap-soft:#211f32;--cap-accent:#ac8aff}
html[data-theme=dark] .fm-capture-stage{background:#11101c}
html[data-theme=dark] .fm-capture-footer p[data-error=true]{color:#ffabc0}
@media(max-width:700px){.fm-capture-dialog,#videoCaptureDialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:16px}.fm-capture-head{padding:15px}.fm-capture-head h2{font-size:17px}.fm-capture-toolbar{padding:12px 15px;align-items:flex-start;flex-direction:column;gap:9px}.fm-capture-stage{padding:6px}.fm-capture-stage iframe{min-height:260px;height:52dvh}.fm-capture-review{padding:15px;gap:12px;align-items:stretch;flex-direction:column}.fm-capture-review img{max-width:100%;max-height:220px;align-self:center}.fm-capture-footer{padding:12px;flex-direction:column;align-items:stretch;gap:10px}.fm-capture-footer>div{display:grid;grid-template-columns:1fr 1fr}.fm-capture-footer button{font-size:12px;padding:9px;white-space:normal}.vs-cover-tools{align-items:flex-start;padding:12px;gap:10px}.vs-cover-tools img{width:72px}.vs-cover-tools button{font-size:12px}}
@media(prefers-reduced-motion:reduce){.fm-capture-dialog *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
html[data-studio-device="mobile"] dialog.fm-capture-dialog{padding:0!important}
@media(max-width:700px){#videoCaptureDialog .fm-capture-review img{max-height:min(44dvh,350px)}}
/* V1.0.81 — non-destructive frame crop; pointer and keyboard controls. */
.fm-capture-review{align-items:flex-start}
.fm-crop-workbench{flex:1;min-width:0;display:flex;align-items:center;flex-direction:column;gap:12px}
.fm-crop-image{position:relative;max-width:100%;width:fit-content;overflow:hidden;border-radius:12px;background:#151324}
.fm-capture-review .fm-crop-image img,#videoCaptureDialog .fm-capture-review .fm-crop-image img{display:block;max-width:100%;max-height:330px;width:auto;height:auto;border-radius:0;box-shadow:none}
.fm-crop-overlay{position:absolute;inset:0;overflow:hidden;cursor:crosshair;touch-action:none}
.fm-crop-overlay>div{position:absolute;border:2px solid #fff;box-shadow:0 0 0 1000px #111528a6;background:linear-gradient(90deg,transparent 33%,#fff5 33%,#fff5 33.3%,transparent 33.3%,transparent 66.6%,#fff5 66.6%,#fff5 67%,transparent 67%),linear-gradient(transparent 33%,#fff5 33%,#fff5 33.3%,transparent 33.3%,transparent 66.6%,#fff5 66.6%,#fff5 67%,transparent 67%);pointer-events:none}
.fm-crop-controls{align-self:stretch;max-width:800px;padding:16px;background:var(--cap-surface);border:1px solid var(--cap-line);border-radius:14px}
.fm-crop-ranges{display:grid;grid-template-columns:1fr 1fr;gap:12px 24px;margin:16px 0}
.fm-crop-ranges label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:var(--cap-muted)}
.fm-crop-ranges input{width:100%;min-height:30px;accent-color:var(--cap-accent);cursor:ew-resize}
.fm-crop-controls output{font-size:12px;font-variant-numeric:tabular-nums;color:var(--cap-muted)}
.fm-crop-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.fm-capture-dialog[data-cropping=true] .fm-capture-stage,.fm-capture-dialog[data-cropping=true] .fm-capture-toolbar{display:none}
.fm-capture-dialog[data-cropping=true] .fm-capture-review{flex-direction:column;align-items:stretch}
.fm-capture-dialog[data-cropping=true] .fm-crop-image img{max-height:42dvh}
@media(max-width:700px){.fm-crop-workbench{width:100%}.fm-crop-controls{padding:12px}.fm-crop-actions{display:grid;grid-template-columns:1fr 1fr}.fm-capture-review .fm-crop-image img{max-height:30dvh}.fm-crop-ranges{gap:8px 16px}}
.fm-crop-controls{width:min(100%,800px);align-self:center}
.fm-capture-dialog[data-cropping=true] .fm-crop-image img{max-height:min(30dvh,300px)}
.fm-capture-dialog[data-cropping=true] .fm-capture-review>div:first-child p{display:none}
.fm-capture-dialog[data-cropping=true] .fm-capture-footer>div{display:none}
@media(max-width:700px){.fm-capture-dialog[data-cropping=true] .fm-crop-image img{max-height:26dvh}.fm-capture-dialog[data-cropping=true] .fm-crop-ranges{margin:10px 0}.fm-capture-dialog[data-cropping=true] .fm-capture-footer{padding:10px 15px}}
