/* Unified subtitle editor: preview and cues on the left, scoped properties on the right. */
body.fx-editor .fx-workspace{grid-template-columns:minmax(0,1fr) 350px;gap:18px;align-items:start}
.fx-editor .fx-main{min-width:0}.fx-editor #fxInspector{width:auto;min-width:0;position:static;height:auto;max-height:none;overflow:visible;padding:18px;border:1px solid #dce3ed;border-radius:16px;background:#fff}
.fx-editor .fxe-legacy,.fx-editor [hidden]{display:none!important}.fxe-modebar{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}.fxe-modebar button[aria-pressed=true],.fxe-segment button[aria-pressed=true]{background:#173558;color:white;border-color:#173558}
.fxe-title{font-size:14px;margin:0 0 10px}.fxe-segment{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:12px}.fxe-field{display:flex;flex-direction:column;gap:6px;margin:10px 0;font-size:12px;color:#45566b}.fxe-field select,.fxe-field input,.fxe-field textarea{width:100%;min-width:0;box-sizing:border-box}.fxe-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;margin:16px 0 14px;border-bottom:1px solid #dce3ed;padding-bottom:8px}.fxe-tabs button{padding:8px 3px;min-width:0;font-size:12px;border:0}.fxe-tabs [aria-selected=true]{background:#e7eff9;color:#143c69;font-weight:650}
.fxe-panel .fxl-grid{grid-template-columns:1fr 1fr}.fxe-panel .fxl-card{min-width:0}.fxe-panel .fxl-swatch{height:65px;display:flex;align-items:center;justify-content:center;background:#26384b;border-radius:8px;font-size:21px}.fxe-panel>button{margin:5px 5px 10px 0}.fxe-parameters{border-top:1px solid #e6ebf2;padding-top:12px}.fxe-parameter{display:grid;grid-template-columns:minmax(80px,1fr) minmax(80px,1fr) 28px;align-items:center;gap:7px;margin:10px 0}.fxe-parameter>label{font-size:12px;color:#35485f}.fxe-parameter>input,.fxe-parameter>select{min-width:0;width:100%;box-sizing:border-box;height:32px;border:1px solid #cbd5e1;border-radius:6px;padding:4px 7px;background:white}.fxe-parameter>input[type=checkbox]{width:18px;height:18px;justify-self:end}.fxe-parameter>.fxe-reset{font-size:0;padding:0;min-width:26px;height:26px}.fxe-reset:after{content:'↶';font-size:17px}.fxe-source{font-size:10px;color:#63758b;grid-column:2/4}.fxe-native{padding:10px;background:#edf4fc;border-radius:8px;margin-top:12px;font-size:12px}.fxe-native p{margin:0 0 8px;line-height:1.6}.fxe-note{font-size:12px;line-height:1.6;color:#5c6e84;margin:10px 0}.fxe-save,.fxe-highlight{margin-top:16px;padding-top:12px;border-top:1px solid #e3eaf3}.fxe-save>input{width:100%;box-sizing:border-box;margin-bottom:8px}.fxe-save button,.fxe-highlight button{margin:4px 0}.fxe-highlight input[type=color]{width:38px;height:32px;vertical-align:middle}.fxe-panel .ass-cols2,.fxe-panel #mVttCols2{display:block}.fxe-panel #assPanel,.fxe-panel #mVttPanel{border:0;padding:4px 0}.fxe-panel .ass-row{flex-wrap:wrap}.fxe-panel .fx-role-tabs,.fxe-panel .fxl-effects>summary,.fxe-panel #fxLocalEffects>summary{display:none}.fxe-panel #fxLocalEffects{border:0;padding:0}.fx-editor[data-fxe-role=both] #assSrcGrp,.fx-editor[data-fxe-role=both] #assDstGrp,.fx-editor[data-fxe-role=both] #mVttSrcGrp{display:block!important}
.fxe-dialog{max-width:min(920px,calc(100vw - 28px));width:880px}.fxe-dialog .fx-dialog-body{max-height:70vh;overflow:auto}.fxe-dialog h2{margin:0;font-size:18px}.fxe-review-controls{display:flex;gap:16px;flex-wrap:wrap}.fxe-review-controls>.fxe-field{min-width:170px}.fxe-check{display:flex;align-items:center;gap:8px;line-height:1.5;font-size:13px}.fxe-review-summary{padding:12px;background:#edf4fc;border-radius:8px}.fxe-map,.fxe-match{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px 0;border-bottom:1px solid #e4eaf2;align-items:center}.fxe-match p{grid-column:1/3;white-space:pre-wrap;margin:0;overflow-wrap:anywhere}.fxe-match input{max-width:140px}.fxe-map-lines{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;border-bottom:1px solid #e4eaf2;padding:12px 0}.fxe-map-lines pre{font-family:inherit;white-space:pre-wrap;overflow-wrap:anywhere}.fxe-pager{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:16px}.fxe-import-languages{display:grid;grid-template-columns:1fr 1fr;gap:16px}.fxe-error{color:#a12a33;font-size:13px}.fx-editor .rep-slot,.fx-editor [data-column=slot]{display:none}.fx-editor input:disabled,.fx-editor select:disabled{opacity:.55}.fxe-panel .fxl-field{min-width:0}.fxe-panel .fxl-effects,.fxe-panel .fxl-local-effects{max-width:100%}.fxe-panel fieldset{min-width:0}.fxe-panel .fxl-card-name{white-space:normal}.fxe-panel .fxl-field input,.fxe-panel .fxl-field select{max-width:100%}
@media(max-width:1100px){body.fx-editor .fx-workspace{grid-template-columns:minmax(0,1fr) 310px;gap:12px}.fx-editor #fxInspector{padding:12px}.fxe-parameter{grid-template-columns:minmax(70px,1fr) minmax(70px,1fr) 26px;gap:4px}}
@media(max-width:800px){body.fx-editor .fx-workspace{display:flex;flex-direction:column}.fx-editor .fx-main,.fx-editor #fxInspector{width:100%;box-sizing:border-box}.fx-editor #fxInspector{position:static;max-height:none}.fxe-panel .fxl-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.fxe-modebar button{flex:1;font-size:12px;min-width:0}.fxe-map-lines{grid-template-columns:1fr 1fr}.fxe-map-lines pre{grid-column:1/3}.fxe-import-languages{gap:10px}}
@media(max-width:440px){.fxe-panel .fxl-grid{grid-template-columns:1fr 1fr}.fxe-modebar{gap:4px}.fxe-modebar button{padding:8px 5px}.fxe-map{grid-template-columns:1fr}.fxe-review-controls>.fxe-field{width:100%}.fxe-dialog .fx-dialog-body{padding:12px}.fxe-import-languages{grid-template-columns:1fr}.fxe-tabs{position:sticky;top:0;background:#fff;z-index:2}}
.fx-editor .fx-workspace{height:auto;min-height:580px}.fx-editor .fxe-modebar{padding:0 18px;margin:10px 0}.fx-editor #fxInspector{border-radius:14px 0 0 14px}.fx-editor #selDock,.fx-editor .tbl th:nth-child(6),.fx-editor .tbl td:nth-child(6),.fx-editor #pvSeg [data-pv=slot],.fx-editor #pvSeg [data-pv=base]{display:none!important}.fx-editor #fxEditRole{padding:8px;border:1px solid #cbd5e1;border-radius:6px;background:white;height:36px}.fx-editor .fxe-source{line-height:1.2}.fx-editor .fxe-parameter{margin:8px 0}.fx-editor .fx-main{padding-top:8px;overflow:visible}.fx-editor :is(.ass-pv-screen,.vtt-pv-screen,.srt-pv-screen){width:min(100%,480px)}.fx-editor #assPvLine1,.fx-editor #assPvLine2{unicode-bidi:plaintext}.fx-editor .fxe-parameter label{line-height:1.4}
@media(max-width:800px){.fx-editor .fx-workspace{height:auto;min-height:0}.fx-editor #fxInspector{height:auto;border-radius:12px;max-height:none}.fx-editor .fx-main{height:auto;min-height:0}.fx-editor .tbl{min-width:500px}.fx-editor :is(.ass-pv-screen,.vtt-pv-screen,.srt-pv-screen){width:min(100%,380px)}}
.fx-editor #alignLbl,.fx-editor #alignRow,.fx-editor #structLbl,.fx-editor #structRow,.fx-editor #biMaxWLbl,.fx-editor #biMaxWRow{display:none!important}.fxe-panel #fxLocalEffects>p:first-of-type{display:none}.fx-editor .fxe-dialog textarea{font:inherit;line-height:1.5}.fx-editor .fxe-dialog pre{line-height:1.5}
.fxe-match .fxe-match-target{background:#f1f5fa;border-radius:6px;padding:10px;font-size:12px;color:#334c6a}.fxe-map strong{font-size:13px}.fxe-match-target{white-space:pre-wrap;overflow-wrap:anywhere}

/* Native source preview owns the complete frame, including collisions and inline styles. */
.export-native>#mVttPvCue{display:none!important}
#fxVttControls:not([hidden]){display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:8px}#fxVttTime{flex:1;min-width:80px}#fxVttClock{font-size:11px;font-variant-numeric:tabular-nums}#fxVttControls .fxe-note{flex-basis:100%;margin:0;font-size:11px}
.fx-native-preview>.ass-pv-line{display:none!important}.fx-native-preview #fxNativeCanvas{position:absolute;inset:0}.fx-native-preview #fxNativeCanvas canvas{display:block;width:100%;height:100%}#fxNativeStatus{display:none}.fx-native-preview #fxNativeStatus:not([hidden]){display:flex;position:absolute;inset:0;align-items:center;justify-content:center;padding:20px;font-size:12px;line-height:1.6;color:#e2e8f0;text-align:center;background:#191d26}#fxNativeControls:not([hidden]){display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:8px}#fxNativeControls input[type=range]{flex:1;min-width:80px}#fxNativeClock{font-size:11px;font-variant-numeric:tabular-nums}#fxNativeControls .fxe-note{flex-basis:100%;margin:0;font-size:11px}#fxNativeControls .fx-button{padding:3px 8px;min-height:26px;font-size:11px}

#fxEditor-advanced .fxe-field input,#fxEditor-advanced .fxe-field select{height:34px;padding:5px 8px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#243447}#fxStyleDialog .fxl-card-desc{display:block;padding:0 10px 10px;font-size:11px;line-height:1.5;color:#617085;text-align:left;white-space:normal}#fxStyleDialog [data-local-recipe] .fxl-swatch{padding:12px;font-size:15px;line-height:1.5;white-space:normal;box-sizing:border-box}

/* Both columns contribute their natural height so the page bottom follows the editor.
   Only long cue lists scroll internally; the inspector uses the page scroll. */
.fx-editor #rep{flex:none}
.fx-editor .tbl-wrap{flex:none;max-height:clamp(320px,55dvh,640px)}
@media(min-width:801px){.fx-editor .fx-main{position:sticky;top:min(12px,calc(100dvh - var(--fx-main-height,0px) - 12px))}.fx-editor .tbl-wrap{max-height:clamp(220px,calc(100dvh - 540px),480px)}}

/* Explicit per-language properties; a mixed color never masquerades as one color. */
.fx-editor .fxe-parameter{grid-template-columns:minmax(70px,.7fr) minmax(0,1.3fr);gap:6px 8px;align-items:start;margin:12px 0}
.fxe-parameter-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;min-height:34px}.fxe-parameter-heading>label{font-size:12px;color:#35485f;line-height:1.5}.fxe-parameter-heading>.fx-button{min-height:24px;padding:3px 6px;font-size:11px;line-height:16px;color:var(--acc-ink)}
.fxe-value-cell{display:grid;grid-template-columns:minmax(0,1fr) 26px;gap:4px 6px;align-items:center;min-width:0}.fxe-role-caption{grid-column:1/-1;font-size:11px;line-height:1.5;color:#52647b;overflow-wrap:anywhere}.fxe-value-box{position:relative;min-width:0}.fxe-value-box>input,.fxe-value-box>select{width:100%;min-width:0;height:34px;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#243447;padding:4px 7px}.fxe-value-box>input[type=checkbox]{width:18px;height:18px;margin:8px 0}.fxe-value-box>input[type=color]{padding:3px}.fxe-value-cell>.fxe-reset{min-width:26px;height:26px;min-height:26px;font-size:0;padding:0}.fxe-value-cell>.fxe-source{grid-column:1/-1;font-size:10px;line-height:1.4;overflow-wrap:anywhere}
.fx-editor .fxe-parameter.fxe-dual{grid-template-columns:repeat(2,minmax(0,1fr));padding-bottom:10px;border-bottom:1px solid #eef1f5}.fxe-dual>.fxe-parameter-heading{grid-column:1/-1;min-height:26px}.fxe-is-mixed-color{border-radius:6px;background:repeating-linear-gradient(135deg,#fff 0 6px,#eef1f5 6px 12px);box-shadow:inset 0 0 0 1px #cbd5e1}.fxe-is-mixed-color>input{display:none}.fxe-mixed-color{width:100%;height:34px;border:1px solid #cbd5e1;border-radius:6px;background:transparent;font-size:11px;color:#40536b;cursor:pointer}.fxe-is-mixed-color:focus-within{outline:2px solid var(--acc);outline-offset:2px}
#fxUnifyDialog,#fxScaleDialog{width:460px;max-width:calc(100vw - 28px)}#fxUnifyDialog input:not([type=checkbox]),#fxUnifyDialog select,#fxScalePercent{height:36px;padding:6px 8px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#243447;width:100%;box-sizing:border-box}#fxUnifyDialog input[type=checkbox]{width:20px;height:20px}#fxScaleSize{width:100%;margin:12px 0}.fxe-scale-preview{background:#f1f5fa;padding:4px 12px;border-radius:8px}.fxe-unify-value .fxe-field{gap:8px}
