.local-algorithm-controls { border:1px solid var(--border); border-radius:8px; padding:10px; margin:8px 0; min-width:0; }
.local-algorithm-controls summary { cursor:pointer; font-size:12px; font-weight:600; }
.local-algorithm-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr)); gap:10px; margin:12px 0; }
.local-algorithm-grid label { display:flex; flex-direction:column; gap:5px; min-width:0; font-size:12px; }
.local-algorithm-grid label[hidden] { display:none; }
.local-algorithm-grid input:not([type=checkbox]), .local-algorithm-grid select { box-sizing:border-box; width:100%; min-width:0; }
.local-algorithm-grid input[type=checkbox] { align-self:flex-start; }
.local-algorithm-controls small { display:block; color:var(--text-dim); line-height:1.6; }
@media (max-width:640px) { #chromaModal { padding:8px!important; } #chromaModal > div > div:nth-child(2) { grid-template-columns:1fr!important; } }

.local-algorithm-controls[open] .local-algorithm-grid { max-height:48vh; overflow:auto; padding-right:4px; overscroll-behavior:contain; }
#chromaPreviewCvs { width:100%; max-height:55vh; object-fit:contain; }

#ppLocalCutoutPanel[hidden], #ppLocalUpscalePanel[hidden], #ppEnhanceBtn[hidden] { display:none; }
#ppLocalCutoutPanel > label { display:block; margin-bottom:12px; }
#ppEnhanceBtn { margin-top:10px; }

/* One backdrop behind the entire sequence workspace, never baked into frames. */
#tab-seq { background:var(--bg) !important; }
#tab-seq .seq-stage-card { background:var(--seq-preview-background, repeating-conic-gradient(var(--seq-checker-a) 0% 25%, var(--seq-checker-b) 0% 50%) 0 0 / 18px 18px) !important; }
#tab-seq #seqCombinedView.seq-infinite-stage,
#tab-seq #seqCanvasContainer,
#tab-seq #seqCalibWrap,
#tab-seq #seqCalibCvs { background:transparent !important; }
.seq-preview-background { border-top:1px solid var(--border); padding-top:12px; margin-top:6px; }
.seq-preview-background small { display:block; margin-top:6px; line-height:1.5; font-size:11px; }
.seq-preview-colors { display:flex; gap:12px; align-items:center; margin-top:8px; }
.seq-preview-colors[hidden] { display:none; }
.seq-preview-colors label { display:flex; flex-direction:column; gap:4px; font-size:11px; }
.seq-preview-colors input[type=color] { width:48px; height:28px; padding:2px; }

.matting-method-picker { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; margin:8px 0; }
.matting-method-picker button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-width:0; min-height:50px; padding:7px 2px; border:1px solid var(--border); border-radius:9px; background:var(--surface2); color:var(--text-muted); font:inherit; font-size:11px; line-height:1.2; cursor:pointer; }
.matting-method-picker button svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.matting-method-picker button:hover { border-color:var(--accent); color:var(--text); }
.matting-method-picker button.active { color:#10b981; border-color:rgba(16,185,129,.5); background:rgba(16,185,129,.1); }
body[data-theme="light"] .matting-method-picker button.active { color:#047857; }
.matting-method-picker button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.matting-method-hint { display:block; font-size:11px; color:var(--text-dim); line-height:1.5; margin:6px 0 8px; }
