:root{color-scheme:dark;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:#101720;color:#e8edf1}*{box-sizing:border-box}body{margin:0}header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #283541;background:#151f29;padding:14px 22px;gap:12px}header strong{font-size:20px;letter-spacing:-.5px;color:#f0f6fb}header span{display:block;color:#a9b8c6;font-size:12px;margin-top:4px}.tag{background:#23313d;border:1px solid #455362;color:#d2e1eb;border-radius:18px;font-size:12px;padding:7px 12px}main{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;max-width:1700px;margin:0 auto;padding:18px}.main{min-width:0}h1{font-size:23px;margin:2px 0 10px}h2{font-size:15px;margin:0 0 12px}p{line-height:1.48}.intro{color:#b4c1cd;font-size:14px;margin:0 0 16px}.panel{background:#17232e;border:1px solid #34414e;border-radius:12px;padding:13px;margin:0 0 13px}.inputs{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.file{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:37px;max-width:100%;border-radius:8px;border:1px solid #53687a;background:#273a49;padding:8px 12px;font-size:13px;cursor:pointer;font-weight:550}.file input[type=file]{display:none}.file:has(input:focus-visible){outline:2px solid #8bd6d0}button{border:1px solid #3b9c96;background:#21857f;color:white;border-radius:8px;padding:9px 13px;font-size:13px;font-weight:650;cursor:pointer;line-height:1.2}button:hover{filter:brightness(1.12)}button:disabled{opacity:.4;cursor:not-allowed}button.outline,.file.secondary{background:#253541;color:#e3eef5;border-color:#526675}.danger{background:#4b2732;border-color:#8e4c59;color:#fbdde4}.minor{color:#a6b6c4;font-size:12px;line-height:1.45}.inputs .minor{flex:1}.video-wrap{background:#080c10;border:1px solid #34434f;border-radius:12px;position:relative;overflow:hidden;min-height:220px;display:flex;align-items:center;justify-content:center;aspect-ratio:16/9}video{width:100%;height:100%;position:absolute;object-fit:contain;inset:0}#overlay{position:absolute;inset:0;width:100%;height:100%;cursor:crosshair;touch-action:none}.video-empty{font-weight:600;color:#98a9bb}.video-help{position:absolute;bottom:12px;left:12px;right:12px;pointer-events:none;padding:9px 12px;border-radius:8px;background:#101820cc;color:#d3e4ee;font-size:12px;text-align:center}.transport{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.transport input[type=range]{flex:1;min-width:120px}input[type=range]{accent-color:#41b6b1}.transport label{font-size:12px;color:#bccbd7}.transport select{max-width:92px}#timeLabel{font-size:12px;color:#b2c4d0;white-space:nowrap;font-variant-numeric:tabular-nums}.selection-actions,.track-controls{display:flex;flex-wrap:wrap;align-items:center;gap:9px}.track-controls{border-top:1px solid #34434c;margin-top:12px;padding-top:12px}.track-controls label{display:flex;align-items:center;gap:6px;font-size:12px;color:#adbdc9}.selection>p{margin:8px 0 4px}.status{border-left:3px solid #5cbfb5;background:#1b2c35;border-radius:6px;padding:12px;font-size:13px;margin-bottom:12px;min-height:40px}.smallprint{font-size:12px;color:#8ea2b1}.sidebar{min-width:0}label:not(.file){display:block;margin:0 0 8px;font-size:12px;color:#c1d0dc}label input:not([type=checkbox]):not([type=radio]):not([type=range]),label select{margin-top:5px;display:block;width:100%;border-radius:7px;color:#edf5fa;background:#0f1a23;border:1px solid #465866;padding:9px;font:inherit}select{color:#eff5f9;background:#162633;border:1px solid #50616f;border-radius:7px;padding:7px}.full{width:100%;margin:7px 0}.row{display:flex;gap:9px;align-items:center}.row>*{flex:1}.players,.elements{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}.player,.element{border-radius:9px;border:1px solid #3a4c59;background:#13202a;padding:10px;display:flex;justify-content:space-between;gap:9px;align-items:center}.player.is-selected{border-color:#e7c267;box-shadow:inset 0 0 0 1px #e7c26777}.player-info{display:flex;align-items:center;gap:9px;min-width:0;flex:1;cursor:pointer}.player-info strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.player-info small{font-size:11px;color:#a7bac9;display:block;margin-top:3px}.swatch{height:13px;width:13px;border-radius:50%;flex-shrink:0;box-shadow:0 0 0 2px #0006}.tiny{padding:5px 7px;font-size:11px;line-height:1}.counter{font-size:11px;border:1px solid #50616f;background:#23323e;border-radius:99px;padding:2px 8px;color:#d4e4ed}.checks{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:10px 0}.checks label{display:flex;align-items:center;gap:7px;padding:7px;border-radius:7px;background:#21313d;margin:0;font-size:12px}.checks input{accent-color:#42b6ad}.element strong{font-size:12px}.element span{display:block;color:#a5b6c6;font-size:11px;margin-top:3px;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}footer{padding:16px 24px;color:#8da0ae;border-top:1px solid #2d3b49;font-size:12px;text-align:center}@media(max-width:1000px){main{grid-template-columns:1fr}.sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.sidebar .panel{margin:0}}@media(max-width:620px){main{padding:10px}.sidebar{display:block}.sidebar .panel{margin-bottom:10px}.transport{gap:6px}.transport button{padding:8px}.tag{display:none}header{padding:13px}h1{font-size:19px}.video-wrap{min-height:165px}} 

label.file input[type=file]{display:none!important}label.file[data-file]::after{content:attr(data-file);font-size:10px;font-weight:400;color:#b9e8e1;max-width:145px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-left:8px}
.selection-actions button.selected{border-color:#a3ce76;box-shadow:inset 0 0 0 1px #a3ce76}

.diagnostic-row{display:flex;gap:8px;align-items:stretch;margin-bottom:12px}.diagnostic-row .status{flex:1;margin-bottom:0}.diagnostic-row button{max-width:190px}@media(max-width:620px){.diagnostic-row{flex-direction:column}.diagnostic-row button{max-width:none}}

/* 0.2.2 review/repair */
.repair-panel {border-color:#406064;background:#172832}
.repair-panel h2 {color:#e6f3ef}
.repair-review {flex-wrap:wrap;margin:12px 0}
.repair-review > button {flex:0 0 auto}
.repair-review .minor {flex:1 1 220px}
.repair-actions {display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.repair-actions > button {min-height:38px;flex:1 1 150px}
#repairInfo {padding:9px 10px;border-radius:6px;background:#203641;border-left:3px solid #a6c87a;line-height:1.55}
.review-pill {background:#563f2a;color:#ffdea5;border:1px solid #a77c3e;border-radius:999px;padding:2px 6px;font-size:11px;margin-left:5px}
@media(max-width:620px){.repair-actions{flex-direction:column}.repair-review button{flex:1}}
/* YOLOX overlay and long-video adjustments */
#stage{touch-action:pan-y}#stage canvas{z-index:1}#videoHelp{z-index:2;opacity:.91}#videoEmpty{z-index:2;pointer-events:none}
#detectHere{background:#296b8a;border-color:#4e9cb3}.selection button:disabled{opacity:.42}.player-info{min-width:0}.player{flex-wrap:wrap}.player button{white-space:nowrap}
.file[data-file]::after{display:inline-block;content:attr(data-file);color:#8ce2d6;max-width:115px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;margin-left:6px;font-size:10px}

/* PlanTactico v0.8.2 - explicit assisted correction; no fake certainty */
.assist-panel{border-color:#406d74;background:linear-gradient(125deg,#1a2d37,#16252f)}
.assist-panel h2{font-size:16px}.assist-subtitle{font-size:12px;color:#92bfc1;font-weight:400;margin-left:7px}
.assist-info{margin:10px 0;padding:10px 12px;background:#10232c;border:1px solid #385867;border-radius:8px;font-size:12px;line-height:1.6;color:#d5e5eb}
.assist-timeline-label{display:flex;justify-content:space-between;gap:12px;align-items:center;color:#a9bec9;font-size:11px;font-variant-numeric:tabular-nums;margin:10px 0 6px}
.assist-timeline{height:38px;position:relative;background:repeating-linear-gradient(90deg,#243947 0px,#243947 1px,#182934 1px,#182934 12.5%);border:1px solid #4b6976;border-radius:8px;cursor:crosshair;overflow:hidden}
.assist-pt{position:absolute;height:10px;top:14px;width:3px;border-radius:2px;background:#71dfce;pointer-events:none;transform:translateX(-50%)}
.assist-pt.manual{width:6px;height:19px;top:9px;background:#ffcf76;z-index:3}
.assist-pt.estimate{background:#a19bc6;opacity:.9;top:13px;height:12px;border:1px dashed #dfd2ff}
.assist-pt.review{background:#fa9d74;top:12px;height:13px}
.assist-gap{position:absolute;height:100%;top:0;background:#8e3e4390;pointer-events:none}
.assist-head{position:absolute;top:0;bottom:0;width:2px;background:#fff;z-index:5;pointer-events:none;box-shadow:0 0 5px #eef6ff}
.assist-legend{display:flex;flex-wrap:wrap;gap:14px;margin:9px 0 12px;font-size:11px;color:#bccbd3}
.assist-legend>span{display:inline-flex;align-items:center;gap:5px}.assist-legend .dot{display:inline-block;width:9px;height:9px;border-radius:50%}.dot.auto{background:#71dfce}.dot.manual{background:#ffcf76}.dot.gap{background:#b55156}.dot.estimate{background:#b3a1d4}
.assist-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.assist-actions>button{flex:0 1 auto}.assist-range{border-top:1px solid #38505a;margin-top:12px;padding-top:9px}.assist-range .minor{align-self:center}.assist-warning{margin:8px 0 2px}.assist-actions .danger-lite{color:#ffd4cc;border-color:#9a5654;background:#402d32}
@media(max-width:600px){.assist-actions>button{flex:1 1 42%}.assist-timeline-label span:nth-child(2){display:none}}

/* v0.8.3: corroborada temporalmente, distinta de una deteccion primaria. */
.assist-pt.bidirectional{background:#98d4ee;top:12px;height:14px;width:4px;border:1px dashed #315a70}
.dot.bidirectional{background:#98d4ee;border:1px dashed #315a70}

/* Diseño de beta privada: superficie principal despejada, controles secundarios plegables. */
.app-header{padding:16px 22px}
.brand{display:flex;flex-direction:column;gap:1px}
.brand span{margin-top:0}
.flow-strip{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 16px}
.flow-strip span{font-size:12px;color:#c7d8e2;border:1px solid #324a58;background:#1a2a35;border-radius:999px;padding:7px 11px;display:inline-flex;align-items:center;gap:7px}
.flow-strip b{display:inline-flex;align-items:center;justify-content:center;background:#2c555e;color:#f3fafb;width:20px;height:20px;border-radius:50%;font-size:11px}
.panel-heading{width:100%;display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px}
.panel-heading h2{margin:0}.panel-heading p{margin:0}
.inputs{display:block}.prep-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:11px;align-items:center}
.file-primary{background:#244d4f;border-color:#4da49e}.prep-status{margin:10px 0 6px}
.workbench-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:5px 2px 10px}
.workbench-head h2{margin:0}.workbench .transport{margin-top:10px}
.selection h2{font-size:16px}.selection>p{margin:4px 0 11px}
.follow-area{border-top:1px solid #384e59;margin-top:17px;padding-top:16px}
.follow-area h2{margin:0 0 10px}.follow-area .minor{margin:8px 0 0}
.track-controls{border:0;padding:0;margin:0}.track-controls label{margin:0}
.track-controls label select{margin-top:3px;min-width:90px}
.track-controls .follow-cta{background:#2c9c8e;border-color:#63c6b8;min-height:40px}
.advanced,.side-tools{margin-top:12px;border:1px solid #3b5260;border-radius:9px;background:#152733;overflow:hidden}
.advanced summary,.side-tools summary{padding:12px 13px;cursor:pointer;color:#c8dee6;font-size:12px;font-weight:650;list-style-position:inside}
.advanced[open] summary,.side-tools[open] summary{border-bottom:1px solid #344958}
.advanced-content{padding:12px}
.advanced-content .assist-range{border-top:0;margin-top:0;padding-top:0}
.side-tools{margin:0 0 13px}.side-tools>.panel{margin:10px}
.save-panel #exportProject{background:#237f78}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:1000px){.sidebar{display:block}.sidebar .panel{margin-bottom:13px}}
@media(max-width:650px){.panel-heading{display:block}.panel-heading p{margin-top:6px}.workbench-head{display:block}.workbench-head span{display:block;margin-top:5px}.track-controls>button.follow-cta{flex:1 1 100%}.flow-strip{gap:5px}.flow-strip span{padding:6px 8px;font-size:11px}.flow-strip b{width:17px;height:17px}}

/* v0.8.4: analisis tactico visible + exportacion MP4 por recorte. */
.tactical-panel{margin:0 0 13px;border:1px solid #3c6668;border-radius:12px;padding:11px;background:#142630}
.tactical-heading{padding:4px 4px 11px}
.tactical-heading h2{margin:0 0 5px;color:#b6eee3;font-size:16px}
.tactical-heading p{margin:0;color:#aebfcb;font-size:12px;line-height:1.45}
.tactical-panel>.panel{margin:0 0 9px;background:#192b35;border-color:#38515d}
.tactical-panel>.panel:last-child{margin-bottom:0}
.export-panel{border-color:#436766;background:#172930}
.export-panel h2{font-size:16px;color:#c4f0e9}
.clip-time-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 6px}
.clip-time-row label{min-width:0;margin-bottom:0}
.export-markers{margin:8px 0 12px;align-items:stretch}
.export-markers button{padding:8px 6px;font-size:11px}
.audio-option{display:flex!important;align-items:flex-start;flex-wrap:wrap;gap:6px;cursor:pointer;margin:8px 0 12px!important}
.audio-option input{flex:none;margin-top:2px;accent-color:#41b6b1}
.audio-option span{color:#9aadb9;font-size:11px}
#exportVideo{background:#237f78;min-height:41px}
#cancelVideoExport[hidden]{display:none!important}
.export-message{border-left:2px solid #5da49f;padding:8px 10px;border-radius:5px;background:#10232c;min-height:36px}
@media(max-width:620px){.clip-time-row{gap:7px}.export-markers{gap:6px}.export-markers button{padding:8px 4px;font-size:10px}}

/* PlanTactico v0.8.5: interfaz tactica operativa, visual y accesible. */
:root{--pt-bg:#0b141d;--pt-panel:#152531;--pt-surface:#1c303c;--pt-border:#395160;--pt-muted:#acbfce;--pt-accent:#45c6b5;--pt-gold:#f7c96b;--pt-focus:#ffe1a0}
body{background:var(--pt-bg);color:#eef5f8;font-size:14px}
.app-header{background:#0f1d29;border-bottom-color:#29424e}
.brand strong{font-size:22px;letter-spacing:-.65px}
.tag{border-color:#456b72;background:#19333c;color:#bff5e8}
main{grid-template-columns:minmax(0,1fr) minmax(340px,390px);gap:20px;padding:22px;max-width:1760px}
h1{font-size:26px;letter-spacing:-.65px}
h2{font-size:16px;letter-spacing:-.15px}
.panel{background:var(--pt-panel);border-color:var(--pt-border);border-radius:13px;padding:16px;margin-bottom:15px}
.intro{font-size:14px;color:#b9cbd5;max-width:770px}
button,.file{min-height:42px;transition:background .12s,border-color .12s,filter .12s;letter-spacing:.03px}
button{background:#257e78;border-color:#42afa3;color:#fff;font-size:13px}
button.outline{background:#223846;border-color:#55717d;color:#eaf8fa}
button.danger{background:#492b35;border-color:#965463}
button:disabled{opacity:.48}
button:focus-visible,summary:focus-visible,.file:focus-within,input:focus-visible,select:focus-visible,.player-info:focus-visible{outline:3px solid var(--pt-focus);outline-offset:2px}
label{color:#c9dce3!important}
label input:not([type=checkbox]):not([type=radio]):not([type=range]),label select{background:#0f202b;border-color:#4c6878;color:#f1fbff;min-height:41px}
input[type=checkbox]{accent-color:var(--pt-accent);width:17px;height:17px}
input[type=color]{min-height:40px;padding:3px!important;cursor:pointer}
.video-wrap{border-color:#4e6574;box-shadow:0 11px 32px #0108109a;min-height:185px}
.workbench-head h2{font-size:17px}
.transport{background:#162734;border-color:#405865;gap:7px;padding:11px}
.transport button{min-height:40px;padding:10px 12px}
.transport #playPause{background:#2b847c;border-color:#5ac3b8}
.transport input[type=range]{min-width:95px}
.selection-actions button,.assist-actions button{min-height:42px}
.track-controls .follow-cta{background:#269d88;border-color:#66d9c3;font-size:14px;min-height:46px}
.flow-strip span{border-color:#425b6a;background:#182b37;color:#d1e1e8}
.flow-strip b{background:#356d70;color:white}
.editor-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;border:1px solid #42616e;padding:9px;border-radius:12px;margin:10px 0 7px;background:#132733}
.editor-tools .tools-title{font-size:11px;text-transform:uppercase;letter-spacing:.85px;color:#a5bfc8;font-weight:800;margin:0 7px 0 3px}
.editor-tools button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:9px;border:1px solid #466474;background:#1c3543;color:#dceef2;padding:10px 13px;border-radius:9px}
.editor-tools button span{font-size:17px;min-width:16px;text-align:center;line-height:1}
.editor-tools button.active,.editor-tools button[aria-pressed=true]{background:#2a7973;border-color:#72d8c5;color:#fff;box-shadow:inset 0 0 0 1px #61c8ba6a}
.editor-tools button.tool-export{margin-left:auto;background:#43513a;border-color:#9cb56e;color:#eff8da}
.tool-help{background:#122a33;border-left:3px solid #66c4b5;padding:7px 12px;border-radius:6px;font-size:12px;color:#c4d8df;margin:0 0 12px}
.sidebar .player-panel{border-color:#43626e}
.player-info{border:0;background:transparent;color:inherit;min-height:35px;padding:0;text-align:left;min-width:0;display:flex;justify-content:flex-start;flex:1;box-shadow:none}
.player-info:hover{background:transparent;filter:none}
.player-info>div{min-width:0}
.player-info strong{font-size:13px}
.player.is-selected{background:#243c41;border-color:#8bcaac;box-shadow:inset 0 0 0 1px #8bcaac55}
.player{padding:9px;gap:6px}
.player>.tiny{min-width:34px;min-height:35px;padding:7px}
.swatch{width:14px;height:14px}
.marker-panel{background:linear-gradient(155deg,#1a3039,#14242e);border-color:#53847e}
.heading-inline{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px}
.heading-inline h2{margin-bottom:4px}
.heading-inline .minor{margin:0}
.section-kicker{font-size:10px;letter-spacing:.9px;font-weight:800;border:1px solid #53847e;padding:5px 8px;border-radius:5px;color:#bff1e5}
.marker-editor{display:grid;grid-template-columns:94px minmax(0,1fr);gap:12px;align-items:center;margin:10px 0 15px}
.marker-preview{position:relative;height:100px;border:1px solid #476573;background:repeating-linear-gradient(90deg,#214337 0px,#214337 24px,#28513d 24px,#28513d 48px);border-radius:9px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.marker-preview .preview-oval{border:3px solid var(--pt-gold);width:51px;height:18px;border-radius:50%;box-shadow:0 0 12px #0005;position:absolute;bottom:20px;transform-origin:center}
.preview-label{font-size:11px;background:#081a23dd;padding:4px 6px;border-radius:4px;color:#fff;position:absolute;top:16px;max-width:88px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.marker-fields label{font-size:12px;margin-bottom:5px}
.marker-fields input[type=color]{width:100%;margin-top:5px}
.color-presets{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}
.color-dot{flex:none;width:27px;height:27px;min-height:27px;border:2px solid #ffffff69;padding:0;border-radius:50%;outline-offset:2px}
.color-dot.is-selected{border-color:white;box-shadow:0 0 0 2px #66bfb2}
.style-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:3px 0 10px}
.style-grid label{min-width:0}
.style-grid input[type=range]{display:block;width:100%;margin:13px 0 0;min-height:23px}
.style-grid output{color:#9fe4d7;font-weight:700}
.switch-row{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.switch-row label{display:inline-flex;align-items:center;gap:7px;border:1px solid #42616e;background:#213946;padding:7px 9px;border-radius:8px;margin:0;font-size:12px}
.switch-row input{flex:none}
.annotation-panel{background:#1a2b35;border-color:#426575}
.annotation-style-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.annotation-time-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.annotation-panel label{min-width:0}
.annotation-actions{margin:9px 0 0;align-items:stretch}
.annotation-actions button{min-width:0;padding:10px 7px;min-height:45px}
.annotation-actions button:first-child{background:#276c78;border-color:#4cacbd}
.tactical-panel{background:#132731;border-color:#488078;padding:12px}
.tactical-panel>.panel{background:#1a303a;border-color:#395d66;padding:13px}
.tactical-heading h2{color:#c9f4ed}
.element{gap:5px;flex-wrap:wrap}
.element>div:first-child{flex:1 1 120px;min-width:0}
.element button{min-height:35px}
.export-panel{border-color:#547e75}
@media(max-width:1080px){main{grid-template-columns:minmax(0,1fr)}.sidebar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:12px}.sidebar .panel{margin:0 0 12px}.sidebar .tactical-panel{margin:0 0 12px}.sidebar .tactical-panel>.panel{margin:0 0 9px}.sidebar .player-panel,.sidebar .marker-panel{grid-column:auto}.sidebar .tactical-panel,.sidebar .export-panel,.sidebar .save-panel{grid-column:1/-1}}
@media(max-width:690px){main{padding:10px;gap:12px}.sidebar{display:block}.editor-tools{gap:5px;padding:7px}.editor-tools .tools-title{width:100%;margin-bottom:1px}.editor-tools button{flex:1 1 28%;font-size:12px;min-width:0;padding:9px 7px}.editor-tools button.tool-export{margin-left:0;flex:1 1 100%}.transport{gap:5px;padding:8px}.transport button{min-height:40px;padding:8px 6px;font-size:12px}.transport #seek{order:10;flex:1 1 calc(100% - 90px)}.transport #timeLabel{order:11}.marker-editor{grid-template-columns:90px minmax(0,1fr)}.marker-panel{margin-bottom:12px}.style-grid{gap:7px}.tag{display:none}.flow-strip span{font-size:10px}}
@media(prefers-reduced-motion:reduce){button,.file{transition:none!important}*{scroll-behavior:auto!important}}
.annotation-edit-controls[hidden]{display:none!important}
.annotation-edit-controls{border:1px solid #50877f;background:#153e40;padding:11px;border-radius:9px;margin:10px 0}
.annotation-edit-controls p{margin:0 0 8px;color:#cef5e8}
.annotation-edit-controls button{min-width:0;min-height:43px}

/* v0.8.7 guided tracking: clear primary action and coach confirmation */
.guided-card{margin:12px 0;padding:14px;border:1px solid #4c7a78;background:#112c31;border-radius:12px}
.guided-title{font-size:14px;font-weight:760;color:#e6fbf8;margin:0 0 6px}
.guided-card .minor{margin:0 0 12px;max-width:72ch}
.guided-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:9px}
.guided-actions button{min-height:46px;white-space:normal;font-size:13px}
.guided-actions .follow-cta{background:#278f80;border-color:#7ad5c5}
.guided-checkbox{display:flex!important;align-items:flex-start;gap:9px;margin:12px 0 0!important;font-size:12px;color:#e4eff1}
.guided-checkbox input{margin-top:2px;accent-color:#49c3b7}
.guided-tip{font-size:12px;line-height:1.4;color:#b9d4cf;border-left:3px solid #65b0a4;padding:8px 10px;margin-top:10px;background:#1c3740;border-radius:5px}
@media(max-width:650px){.guided-actions{grid-template-columns:1fr}.guided-actions button{width:100%}}

/* v0.8.8 — Once/Focus inspired: controls attached to the video, not far below it. */
.app-header{position:sticky;top:0;z-index:30;min-height:56px;padding:9px 20px;box-shadow:0 5px 16px #07121a88}
main{padding:12px 16px;gap:14px;grid-template-columns:minmax(0,1fr) minmax(308px,340px)}
.main>h1{font-size:22px;margin:1px 0 5px}.intro{margin:0 0 8px}
.flow-strip{margin-bottom:10px}.flow-strip span{padding:5px 9px}
.inputs{padding:11px 14px;margin-bottom:12px}
.inputs .panel-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.inputs .panel-heading h2{margin:0;font-size:13px}
.inputs .panel-heading p{margin:0}
.inputs .prep-row{margin-top:8px}
.inputs .prep-row button,.inputs .prep-row .file{min-height:38px;padding:7px 12px}
.inputs .prep-status{margin:5px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pt-video-ready .intro,.pt-video-ready .flow-strip{display:none}
.pt-video-ready .main>h1{font-size:19px;margin-bottom:7px}
.workbench{border:1px solid #3b5968;border-radius:14px;padding:10px;background:#111f2a}
.workbench-head{padding:1px 4px 9px;align-items:center}
.workbench-head h2{font-size:15px}
.workbench-head .minor{font-size:11px}
.stage-actions{position:sticky;top:56px;z-index:18;background:#122630;border:1px solid #486a75;border-radius:11px;padding:8px 9px;margin:0 0 8px;box-shadow:0 9px 16px #050d1588}
.stage-command-primary,.stage-command-secondary{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.stage-command-secondary{padding-top:7px;margin-top:7px;border-top:1px solid #35515d}
.stage-command-caption{font-size:10px;letter-spacing:1.15px;font-weight:750;min-width:51px;color:#91aebd}
.stage-actions .stage-button{min-height:38px;padding:8px 11px;background:#1b3947;border-color:#47717e;color:#e3f0f6;border-radius:8px;white-space:nowrap;font-size:12px}
.stage-actions .stage-button.detect{background:#285879;border-color:#519bb9}
.stage-actions .stage-button.follow{background:#247f72;border-color:#65cab4;color:#fff;font-weight:800}
.stage-actions .stage-button.continue{background:#415e38;border-color:#a1cc78;color:#f4ffdf}
.stage-actions .stage-button.subtle{background:#203744;border-color:#526978}
.stage-actions .stage-button.region{background:#3e486c;border-color:#778bc2}
.stage-actions button:disabled{opacity:.36}
.stage-actions button:focus-visible{outline:2px solid #ffe5b6;outline-offset:2px}
.stage-actions .stage-button:hover:not(:disabled){filter:brightness(1.16)}
.stage-actions button.selected{background:#385e77!important;border-color:#94d2ef!important;box-shadow:inset 0 0 0 1px #a9dfff5e}
.zoom-cluster{display:flex;align-items:center;gap:0;border:1px solid #526b79;border-radius:8px;overflow:hidden;height:38px}
.stage-actions .zoom-control{min-height:36px;height:36px;background:#1c3541;color:#f2f9fd;border:0;border-radius:0;padding:0 13px;font-size:17px}
.stage-actions .zoom-value{min-width:61px;background:#122a36;font-size:12px;font-variant-numeric:tabular-nums;padding:0 7px}
.stage-actions .zoom-control+.zoom-control{border-left:1px solid #415765}
.zoom-note{margin-left:auto;color:#a6bec6;font-size:10px}
.stage-live-info{font-size:12px;color:#b5d5d6;background:#0f2029;border-left:3px solid #42b9ac;border-radius:4px;margin-top:7px;padding:6px 9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:29px}
.workbench .editor-tools{margin:0 0 8px;padding:5px 7px;gap:5px;border-color:#365765}
.workbench .editor-tools button{min-height:34px;padding:7px 10px;font-size:11px}
.workbench .editor-tools button span{font-size:14px}
.workbench .editor-tools .tools-title{font-size:10px}
.workbench .video-wrap{border-radius:9px;box-shadow:none}
.workbench .transport{margin:8px 0 0;padding:7px 9px;border-radius:9px}
.workbench .transport button{min-height:34px;padding:7px 9px}
.video-wrap.is-pan-mode #overlay{cursor:grab!important}
.video-wrap.is-pan-mode #overlay:active{cursor:grabbing!important}
.stage-loupe{position:absolute;top:12px;right:12px;z-index:8;background:#0a1b24ec;border:1px solid #a9cfd7;border-radius:10px;box-shadow:0 10px 28px #000a;padding:5px;pointer-events:none;width:180px}
.stage-loupe[hidden]{display:none!important}
.stage-loupe canvas{display:block;width:168px;height:168px;image-rendering:auto;border-radius:6px}
.stage-loupe span{display:block;text-align:center;margin:5px 0 2px;font-size:10px;color:#cbecf0}
.workflow-more{border:1px solid #385364;background:#152630;border-radius:11px;margin:12px 0}
.workflow-more summary{padding:12px 16px;cursor:pointer;font-size:13px;color:#c4dee4;font-weight:650}
.workflow-more[open] summary{border-bottom:1px solid #365362}
.workflow-more-content{padding:11px}
.workflow-more-content .panel{margin-bottom:10px}
.workflow-more-content .panel:last-child{margin-bottom:0}
@media(max-width:1140px){main{grid-template-columns:minmax(0,1fr)}.sidebar{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sidebar .tactical-panel,.sidebar .export-panel,.sidebar .save-panel{grid-column:1/-1}}
@media(max-width:740px){main{padding:9px;gap:10px}.stage-command-caption{min-width:100%;padding:2px 0 1px}.stage-command-primary{gap:5px}.stage-command-secondary{gap:5px}.stage-actions .stage-button{font-size:11px;min-height:40px;padding:8px 9px;flex:0 0 auto}.stage-actions{top:55px;padding:8px 7px}.stage-command-primary .stage-button.follow,.stage-command-primary .stage-button.continue{flex:1 1 130px}.zoom-note{margin-left:4px}.workbench{padding:7px}.sidebar{display:block}.workbench-head .minor{display:none}.workbench .editor-tools .tools-title{display:none}.workbench .editor-tools button{flex:1 1 26%;font-size:11px}.workbench .editor-tools .tool-export{flex:1 1 100%}.workbench .transport button{min-height:40px}.stage-loupe{width:132px}.stage-loupe canvas{width:120px;height:120px}}
@media(max-width:420px){.stage-command-primary .stage-button{flex:1 1 40%}.stage-command-secondary .stage-button{flex:1 1 auto}.stage-live-info{font-size:11px}.app-header .tag{display:none}.stage-actions{position:relative;top:auto}}
/* Once a video has loaded, keep video setup available but out of the main sight line. */
.pt-video-ready .inputs{display:flex;align-items:center;min-height:55px;padding:8px 11px}
.pt-video-ready .inputs .panel-heading,.pt-video-ready .inputs .prep-status,.pt-video-ready .inputs .advanced{display:none}
.pt-video-ready .inputs .prep-row{margin:0;gap:8px}
.pt-video-ready .workbench-head{padding:0 4px 6px}
.pt-video-ready .workbench .editor-tools{margin-top:8px;margin-bottom:0}
@media(max-width:740px){.pt-video-ready .inputs{padding:8px}.pt-video-ready .inputs .prep-row{flex-wrap:wrap}.pt-video-ready .inputs .prep-row button,.pt-video-ready .inputs .prep-row .file{flex:1 1 auto}}
.pt-video-ready .video-wrap{width:100%;min-height:0;min-width:0}

.stage-actions .stage-button.playback{margin-left:auto;background:#273e4e;border-color:#708b97;color:#e6f5fa}
@media(max-width:740px){.stage-actions .stage-button.playback{margin-left:0}}

/* v0.8.9: compact contextual controls and direct editing of fixed areas. */
.stage-actions-compact{padding:6px 8px;box-shadow:0 6px 14px #050d1577}
.stage-actions-compact .stage-command-primary{gap:5px;flex-wrap:wrap}
.stage-actions-compact .stage-button{min-height:34px;padding:6px 9px;font-weight:650}
.stage-actions-compact .stage-button.playback{margin-left:auto}
.stage-actions-compact .stage-live-info{margin-top:4px;padding:4px 8px;min-height:23px;font-size:11px}
.stage-actions-compact .zoom-cluster{height:34px}
.stage-actions-compact .zoom-control{height:32px;min-height:32px;padding:0 10px}
.stage-actions-compact .zoom-value{min-width:58px;font-size:11px;padding:0 5px}
.stage-divider{height:23px;width:1px;background:#45616c;margin:0 3px}
.stage-more{position:relative;z-index:28}
.stage-more summary{list-style:none;cursor:pointer;border:1px solid #5c7883;border-radius:7px;padding:8px 11px;color:#d8edf0;font-weight:650;font-size:12px;line-height:18px;background:#223b49}
.stage-more summary::-webkit-details-marker{display:none}
.stage-more summary::after{content:' ▾';font-size:10px}
.stage-more[open] summary{border-color:#8cbdc5;background:#34546a}
.stage-more-panel{position:absolute;top:calc(100% + 7px);right:0;z-index:32;width:188px;padding:9px;background:#142733;border:1px solid #5c8393;border-radius:9px;box-shadow:0 12px 30px #020a0edb;display:grid;gap:6px}
.stage-more-panel .stage-button{width:100%;text-align:left;min-height:36px}
.stage-more-panel .zoom-note{display:block;font-size:11px;margin:0;padding:5px 3px;white-space:normal}
.stage-actions-compact .compact-region[hidden],.zone-edit-bar[hidden]{display:none!important}
.stage-actions-compact .compact-region{background:#384e74;border-color:#879cce}
.zone-edit-bar{position:absolute;z-index:12;top:10px;left:10px;max-width:min(430px,calc(100% - 20px));display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:8px 10px;border:1px solid #e8ca85;background:#10252fe9;border-radius:10px;box-shadow:0 10px 26px #0009;color:#eff7fa;font-size:12px;pointer-events:auto}
.zone-edit-bar>span{font-weight:750;color:#ffe3a1;margin-right:4px}
.zone-edit-bar label{display:flex;align-items:center;gap:5px;font-size:11px;margin:0}
.zone-edit-bar input[type=color]{width:31px;height:28px;border:0;padding:0;background:none;cursor:pointer}
.zone-edit-bar button{min-height:31px;font-size:11px;border-radius:7px;padding:6px 9px}
.zone-edit-bar .zone-remove{background:#793947;border-color:#e598a1;color:#fff}
.zone-edit-bar small{flex:1 1 100%;font-size:10px;line-height:1.2;color:#b9d1d8}
.zone-edit-bar button:focus-visible{outline:2px solid #fff0c4;outline-offset:2px}
@media(max-width:740px){.stage-divider{display:none}.stage-actions-compact .stage-command-primary{gap:4px}.stage-actions-compact .stage-button{flex:0 0 auto;min-height:36px;padding:7px 8px}.stage-actions-compact .stage-button.follow,.stage-actions-compact .stage-button.continue{flex:0 0 auto}.stage-actions-compact .stage-button.playback{margin-left:0}.stage-actions-compact .stage-more-panel .stage-button{width:100%}.stage-more-panel{left:0;right:auto}.zone-edit-bar{padding:6px;gap:5px}}
@media(max-width:420px){.stage-actions-compact .stage-command-primary .stage-button{flex:1 1 auto}.stage-actions-compact .stage-command-primary .compact-region{flex:1 1 100%}.stage-actions-compact .stage-command-primary .stage-button.playback{flex:1 1 auto}.stage-more{flex:1 1 auto}.stage-more summary{text-align:center}.stage-more-panel{left:auto;right:0}.zone-edit-bar{max-width:calc(100% - 12px);left:6px;top:6px}}

#zoneEditBar label{display:inline-flex;align-items:center;gap:5px;margin:0}
#zoneEditBar #zoneEditColor{display:block;flex:0 0 31px;width:31px;min-width:31px;max-width:31px;height:29px;margin:0;padding:0;border:1px solid #829da5;border-radius:5px;background:none;cursor:pointer}

/* v0.9.0 — three action guided toolbar, with recovery only when needed. */
.stage-command-primary{gap:7px}
.stage-command-primary #quickTrack{background:#248d7a;border-color:#69d2bc;font-weight:800}
.stage-command-primary #quickFix{background:#243946;border-color:#597b89}
.stage-command-primary #quickFix.is-urgent{background:#a35a26;border-color:#ffd18c;color:#fff;box-shadow:0 0 0 2px #edb85b55;font-weight:800}
.stage-command-primary #quickDetect{background:#254e68;border-color:#568db0}
.stage-guide-row{display:flex;align-items:stretch;gap:7px;min-width:0}
.stage-guide-row .stage-live-info{flex:1;min-width:0;padding:10px 12px;line-height:1.45;white-space:normal;overflow:visible;text-overflow:clip}
.stage-help{position:relative;z-index:16;flex:none;margin:0}
.stage-help>summary{list-style:none;cursor:pointer;border:1px solid #547481;border-radius:8px;padding:10px 12px;background:#1d3642;color:#e8f5f3;font-size:12px;font-weight:700;white-space:nowrap;min-height:39px}
.stage-help>summary::-webkit-details-marker{display:none}
.stage-help-content{position:absolute;top:calc(100% + 5px);right:0;width:min(360px,calc(100vw - 28px));background:#132b37;border:1px solid #5d868c;border-radius:10px;padding:13px 15px;box-shadow:0 14px 32px #000a}
.stage-help-content p{margin:0 0 11px;font-size:12px;line-height:1.55;color:#e0eef3}
.stage-help-content p:last-child{margin:0;color:#b4ced7}
@media(max-width:720px){.stage-command-primary{gap:5px}.stage-command-primary #quickDetect,.stage-command-primary #quickTrack,.stage-command-primary #quickFix{flex:1 1 27%;min-width:0;font-size:11px;padding:8px 7px}.stage-guide-row{align-items:stretch}.stage-help>summary{font-size:11px;padding:9px}}

/* v0.9.1 -- compact three-workspace studio, shared player and recording. */
.studio-workspace{margin:9px 0 6px;background:#142833;border:1px solid #42616e;border-radius:10px;overflow:hidden}
.studio-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:4px;gap:4px;border-bottom:1px solid #395361;background:#101f2a}
.studio-tabs .studio-tab{min-height:41px;display:flex;align-items:center;justify-content:center;gap:7px;border-radius:7px;background:transparent;border:1px solid transparent;color:#adc9d3;font-size:12px;white-space:nowrap;padding:8px 10px}
.studio-tab.active,.studio-tab[aria-selected=true]{background:#246159;border:1px solid #60ad9c;color:#fff}
.studio-tab:focus-visible,.studio-workspace button:focus-visible{outline:2px solid #ffce76;outline-offset:2px}
.studio-tab .tab-small{font-size:10px;font-weight:400;opacity:.73}
.studio-panel{padding:11px 13px 13px;min-height:105px}
.studio-panel[hidden]{display:none!important}
.studio-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.studio-panel-heading h3{font-size:13px;margin:2px 0 3px;color:#effbfa;line-height:1.3}
.studio-subtitle{font-size:11px;color:#a9c3cb;line-height:1.5;margin:0}
.studio-count{flex:none;font-size:11px;font-weight:700;border-radius:16px;background:#263f4c;border:1px solid #537987;color:#ccedef;padding:5px 9px;white-space:nowrap}
.studio-time-label{display:flex;justify-content:space-between;font-size:10px;color:#bdd2da;margin-top:12px;margin-bottom:5px;font-variant-numeric:tabular-nums}
.studio-rail{height:31px;position:relative;background:#0e1c25;border:1px solid #537683;cursor:crosshair;border-radius:6px;overflow:hidden;touch-action:manipulation;background-image:repeating-linear-gradient(90deg,transparent 0,transparent calc(10% - 1px),#375263 calc(10% - 1px),#375263 10%)}
.studio-rail:focus-visible{outline:2px solid #f5d694;outline-offset:2px}
.studio-rail-item{position:absolute;top:9px;width:2px;height:13px;border-radius:2px;background:#59c1a9;pointer-events:none;z-index:1}
.studio-rail-item.manual{background:#ffd16e;height:19px;top:6px;width:4px;z-index:3}
.studio-rail-item.review,.studio-rail-item.issue{background:#f99c70;width:5px;height:20px;top:5px;z-index:4}
.studio-rail-item.recovered{background:#9ad9fc}
.studio-rail-item.gap{top:0;height:100%;background:#b75258a8;z-index:2}
.studio-rail-head{position:absolute;top:0;bottom:0;width:2px;background:#f8fffc;box-shadow:0 0 7px #e7fdff;z-index:6;pointer-events:none}
.studio-legend{display:flex;gap:12px;flex-wrap:wrap;margin:7px 0 10px;font-size:10px;color:#a7bfca}
.studio-legend span{display:inline-flex;align-items:center;gap:5px}
.studio-legend i{width:8px;height:8px;border-radius:2px;background:#55c0ac}.studio-legend .leg-manual{background:#ffd16e}.studio-legend .leg-issue{background:#f99c70}.studio-legend .leg-gap{background:#b75258}
.studio-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:9px}
.studio-actions button{min-height:35px;padding:8px 11px;font-size:11px;border-radius:7px}
.studio-action-primary{background:#278c7d;border-color:#64cbb5;color:white}
.studio-danger{color:#f4b4b6!important;border-color:#84545c!important}
.studio-hint{font-size:11px;color:#b6cfda;line-height:1.5;margin:9px 0 0;border-left:3px solid #43a995;background:#132b31;border-radius:5px;padding:7px 10px}
.studio-clip-fields{display:grid;grid-template-columns:minmax(145px,2fr) repeat(2,minmax(90px,1fr));gap:8px;margin-top:12px}
.studio-event-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:11px 0 0}
.studio-clip-fields label,.studio-event-fields label,.studio-trim-control label{font-size:11px;min-width:0;margin:0}
.studio-clip-fields input,.studio-event-fields input,.studio-event-fields select{font-size:12px;margin-top:4px!important;padding:8px!important}
.studio-trim-control{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:10px}
.studio-trim-control input[type=range]{width:100%;margin:5px 0 0}
.studio-choice-row{display:flex;gap:18px;flex-wrap:wrap;margin:12px 0 2px}
.studio-choice-row label{display:flex;align-items:center;gap:6px;font-size:11px;margin:0}
.studio-choice-row input{accent-color:#53c7b5}
.studio-list{display:flex;flex-direction:column;gap:7px;margin-top:10px;max-height:300px;overflow:auto}
.studio-list-item{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#10232c;border:1px solid #3a5764;border-radius:8px;padding:8px 10px}
.studio-list-copy{display:flex;flex-direction:column;gap:4px;min-width:0;overflow:hidden}
.studio-list-copy strong{font-size:12px;color:#e4f7f6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.studio-list-copy small{font-size:10px;color:#aac3cd;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.studio-list-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.studio-list-actions button{font-size:10px;padding:6px 8px;min-height:29px}
.studio-empty{font-size:11px;color:#a6c3cd;margin:6px 0 3px}
.studio-filter{display:flex!important;align-items:center;gap:5px;margin:0!important}
.studio-filter select{max-width:122px;margin:0!important;font-size:11px;padding:6px 7px}
@media(max-width:740px){.studio-panel{padding:10px 9px 11px}.studio-tab .tab-small{display:none}.studio-tabs .studio-tab{font-size:12px;padding:8px 5px}.studio-list-item{align-items:flex-start;flex-direction:column}.studio-list-actions{justify-content:flex-start}.studio-event-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-clip-fields{grid-template-columns:1.5fr 1fr 1fr;gap:6px}.studio-actions button{flex:1 1 auto}}
@media(max-width:470px){.studio-clip-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-clip-fields label:first-child{grid-column:1/-1}.studio-event-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-event-fields label:last-child{grid-column:1/-1}.studio-panel-heading{align-items:center}.studio-subtitle{font-size:10px}.studio-tab{letter-spacing:-.2px}.studio-actions button{flex:1 1 40%}}
.studio-legacy-export{border:1px solid #3d5562;border-radius:10px;background:#162936;margin-bottom:12px;overflow:hidden}
.studio-legacy-export summary{cursor:pointer;color:#bed7e0;padding:12px;font-size:12px;font-weight:700}
.studio-legacy-export .export-panel{margin:0;border:0;border-top:1px solid #3d5562;border-radius:0}
.studio-event-stats{display:flex;gap:5px;flex-wrap:wrap;margin:10px 0 0}
.studio-event-stat{font-size:10px;padding:4px 8px;border-radius:12px;color:#cee8e8;border:1px solid #4b7980;background:#203d45}

/* v0.9.2 - single, user-facing setting for stable marker presentation. */
.marker-stability-toggle{display:flex;align-items:center;gap:9px;border-top:1px solid rgba(140,198,215,.18);padding-top:12px;font-size:13px;font-weight:650;line-height:1.35}
.marker-stability-toggle input{width:17px;height:17px;flex:0 0 17px;accent-color:#68c9bd}
.marker-stability-help{font-size:11px;line-height:1.55;opacity:.9}
