/* Restoration styles are scoped so existing AI Video modes retain their layout. */
#restoreVideoMode { --restore-border:var(--border,#2e3549); --restore-muted:var(--text-muted,#a5afc5); color:var(--text-primary,#eef0fa); max-width:none; margin:0; /* full-width: no page cap (2026-11-07) */ }
#restoreVideoMode * { box-sizing:border-box; }
#restoreVideoMode [hidden] { display:none !important; }
#restoreVideoMode .restore-heading, #restoreVideoMode .restore-section-heading { display:flex; justify-content:space-between; gap:16px; align-items:center; }
#restoreVideoMode .restore-heading { margin:6px 0 20px; }
#restoreVideoMode h2 { font-size:26px; margin:5px 0 8px; letter-spacing:-.5px; }
#restoreVideoMode h3 { font-size:16px; margin:0; }
#restoreVideoMode h4 { margin:0 0 12px; font-size:17px; overflow-wrap:anywhere; }
#restoreVideoMode p { line-height:1.6; }
#restoreVideoMode .restore-heading p { margin:4px 0; color:var(--restore-muted); }
#restoreVideoMode .restore-eyebrow { font-size:12px; }
#restoreVideoMode .restore-layout { display:grid; gap:18px; min-width:0; }
#restoreVideoMode .restore-main { display:grid; gap:18px; min-width:0; }
#restoreVideoMode .restore-support { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:start; min-width:0; }
#restoreVideoMode .restore-card { padding:22px; border:1px solid var(--restore-border); border-radius:14px; background:var(--surface,#171d2e); min-width:0; }
#restoreVideoMode .restore-section-heading { margin-bottom:20px; flex-wrap:wrap; }
#restoreVideoMode h3 > span { color:#b8a3ff; font-size:12px; margin-right:9px; }
#restoreVideoMode .restore-badge { color:#c9baff; background:rgba(139,92,246,.12); border:1px solid rgba(167,139,250,.24); padding:5px 10px; border-radius:20px; font-size:11px; white-space:normal; }
#restoreVideoMode label { display:block; font-size:13px; line-height:1.5; }
#restoreVideoMode input:not([type=checkbox]):not([type=range]), #restoreVideoMode select { width:100%; color:var(--text-primary,#eef0fa); background:var(--bg-primary,#0e1423); border:1px solid var(--restore-border); border-radius:8px; padding:11px 12px; font:inherit; min-width:0; }
#restoreVideoMode select { margin-top:6px; }
#restoreVideoMode input:focus-visible, #restoreVideoMode select:focus-visible, #restoreVideoMode button:focus-visible, #restoreVideoMode a:focus-visible { outline:2px solid #b7a0ff; outline-offset:3px; }
#restoreVideoMode option:disabled { color:#8b93a8; }
#restoreVideoMode .restore-url-row { display:flex; gap:10px; margin:7px 0 16px; }
#restoreVideoMode .restore-upload-row { display:flex; align-items:center; gap:12px; margin:14px 0; }
#restoreVideoMode .restore-upload { flex:1; padding:14px; border:1px dashed #605184; border-radius:10px; background:rgba(139,92,246,.04); min-width:0; }
#restoreVideoMode .restore-upload input { margin:8px 0; padding:7px !important; font-size:12px !important; }
#restoreVideoMode .restore-checkbox { display:flex; gap:9px; align-items:flex-start; margin:16px 0; color:var(--restore-muted); }
#restoreVideoMode input[type=checkbox] { accent-color:#9b7af5; margin-top:4px; flex-shrink:0; }
#restoreVideoMode .restore-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:40px; padding:10px 14px; border-radius:8px; border:1px solid transparent; background:var(--primary,#8354e8); color:#fff; font-family:inherit; font-size:12px; font-weight:600; line-height:1.45; text-decoration:none; cursor:pointer; text-align:center; }
#restoreVideoMode .restore-button:disabled { opacity:.42; cursor:not-allowed; }
#restoreVideoMode .restore-button:hover:enabled { filter:brightness(1.12); }
#restoreVideoMode .restore-secondary { background:transparent; border-color:var(--restore-border); color:var(--text-primary,#e0e5f4); }
#restoreVideoMode .restore-danger { background:transparent; color:#f5a0ae; border-color:#76424f; }
#restoreVideoMode .restore-small, #restoreVideoMode small { font-size:12px; line-height:1.65; color:var(--restore-muted); }
#restoreVideoMode small { display:block; margin-top:5px; }
#restoreVideoMode .restore-muted { color:var(--restore-muted); font-size:13px; }
#restoreVideoMode .restore-notice { padding:12px 16px; border:1px solid var(--restore-border); border-radius:9px; background:rgba(139,92,246,.06); font-size:13px; overflow-wrap:anywhere; }
#restoreVideoMode .restore-notice[data-error=true] { color:#ffb4bd; border-color:#854854; }
#restoreVideoMode .restore-project-label { width:210px; max-width:100%; font-size:11px; color:var(--restore-muted); }
#restoreVideoMode .restore-project-label select { padding:6px; }
#restoreVideoMode .restore-source { display:flex; gap:16px; margin:20px 0; }
#restoreVideoMode .restore-source > div { flex:1; min-width:0; }
#restoreVideoMode .restore-source img { width:120px; height:90px; object-fit:cover; border-radius:8px; }
#restoreVideoMode .restore-metadata { display:grid; grid-template-columns:repeat(auto-fit,minmax(115px,1fr)); gap:10px; margin:14px 0; }
#restoreVideoMode .restore-metadata > div { padding:10px; background:rgba(8,14,28,.35); border:1px solid var(--restore-border); border-radius:8px; min-width:0; }
#restoreVideoMode dt { color:var(--restore-muted); font-size:11px; margin-bottom:5px; }
#restoreVideoMode dd { font-size:12px; margin:0; overflow-wrap:anywhere; line-height:1.5; }
#restoreVideoMode .restore-settings { display:grid; gap:15px; }
#restoreVideoMode .restore-settings .restore-checkbox { margin:0; }
#restoreVideoMode .restore-profile-row { display:grid; grid-template-columns:minmax(230px,1fr) minmax(0,2fr); gap:22px; align-items:center; padding-bottom:6px; }
#restoreVideoMode .restore-profile-notice { padding:12px 16px; border-left:2px solid #af8a56; background:rgba(228,189,125,.045); border-radius:0 8px 8px 0; }
#restoreVideoMode .restore-profile-notice small { margin:0; }
#restoreVideoMode .restore-setting-groups { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
#restoreVideoMode .restore-setting-group { min-width:0; margin:0; padding:18px; border:1px solid var(--restore-border); border-radius:10px; display:grid; align-content:start; gap:15px; background:rgba(8,14,28,.18); }
#restoreVideoMode .restore-setting-group legend { padding:0 7px; color:#d4c4fa; font-size:14px; font-weight:600; }
#restoreVideoMode .restore-group-description { margin:0; font-size:11px; }
#restoreVideoMode .restore-settings-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px 24px; padding-top:4px; }
#restoreVideoMode .restore-settings-footer > p { max-width:540px; margin:0; flex:1 1 280px; }
#restoreVideoMode .restore-settings-footer .restore-actions { margin:0; }
#restoreVideoMode .restore-overlay-settings { min-width:0; margin:8px 0 0; padding:18px; border:1px solid var(--restore-border); border-radius:10px; }
#restoreVideoMode .restore-overlay-settings > legend { padding:0 7px; color:#d4c4fa; font-size:14px; font-weight:600; }
#restoreVideoMode .restore-overlay-mode-row { display:grid; grid-template-columns:minmax(230px,1fr) minmax(0,2fr); gap:22px; align-items:center; }
#restoreVideoMode .restore-overlay-mode-row p { margin:0; }
#restoreVideoMode .restore-overlay-workspace { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(270px,1fr); gap:20px; align-items:start; }
#restoreVideoMode .restore-overlay-canvas { position:relative; width:100%; overflow:hidden; background:#080d17; border:1px solid var(--restore-border); border-radius:8px; touch-action:none; user-select:none; }
#restoreVideoMode .restore-overlay-canvas img { width:100%; height:auto; display:block; pointer-events:none; }
#restoreVideoMode .restore-overlay-canvas > p { margin:0; padding:28px 18px; }
#restoreVideoMode #restoreOverlayBoxes { position:absolute; inset:1px; pointer-events:none; }
#restoreVideoMode .restore-overlay-box { position:absolute; border:2px solid #f0bd7b; background:rgba(240,189,123,.16); }
#restoreVideoMode .restore-overlay-box > span { position:absolute; top:0; left:0; padding:2px 5px; color:#fff; background:#6e3d13; font-size:11px; line-height:1.5; }
#restoreVideoMode .restore-overlay-box.is-draft { border-style:dashed; }
#restoreVideoMode .restore-overlay-area-list > .restore-actions { margin-top:0; }
#restoreVideoMode .restore-overlay-region { margin-top:12px; padding:12px; border:1px solid var(--restore-border); border-radius:8px; background:rgba(8,14,28,.18); }
#restoreVideoMode .restore-overlay-region-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px; font-size:12px; }
#restoreVideoMode .restore-overlay-region-heading button { min-height:30px; padding:5px 9px; font-size:11px; }
#restoreVideoMode .restore-overlay-coordinates { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
#restoreVideoMode .restore-overlay-coordinates label { font-size:11px; }
#restoreVideoMode .restore-overlay-coordinates input { margin-top:5px; padding:8px !important; }
#restoreVideoMode #restoreOverlayValidation[data-error=true] { color:#ffb4bd; }
@media(max-width:1000px) { #restoreVideoMode .restore-overlay-workspace { grid-template-columns:1fr; } }
@media(max-width:850px) { #restoreVideoMode .restore-overlay-mode-row { grid-template-columns:1fr; gap:10px; } }
@media(max-width:520px) { #restoreVideoMode .restore-overlay-settings { padding:14px; } #restoreVideoMode .restore-overlay-coordinates { grid-template-columns:repeat(2,minmax(0,1fr)); } }
#restoreVideoMode .restore-capabilities h3 { margin-bottom:14px; }
#restoreVideoMode .restore-capabilities ul { margin:8px 0 16px; padding-left:18px; }
#restoreVideoMode .restore-findings { display:grid; gap:10px; }
#restoreVideoMode .restore-finding { border-left:3px solid #9271e9; padding:10px 14px; background:rgba(139,92,246,.05); border-radius:3px; font-size:13px; }
#restoreVideoMode .restore-finding p { margin:5px 0 0; color:var(--restore-muted); font-size:12px; }
#restoreVideoMode .restore-finding-kind { margin-left:8px; font-size:10px; text-transform:uppercase; color:#c3b0fa; }
#restoreVideoMode progress { width:100%; height:9px; accent-color:#9c7bec; margin:12px 0 3px; }
#restoreVideoMode progress::-webkit-progress-bar { background:#293045; border-radius:8px; }
#restoreVideoMode progress::-webkit-progress-value { background:#9c7bec; border-radius:8px; }
#restoreVideoMode .restore-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:16px; }
#restoreVideoMode .restore-link { color:#c9b0ff; font-size:12px; text-decoration:underline; }
#restoreVideoMode .restore-players { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
#restoreVideoMode figure { margin:0; min-width:0; }
#restoreVideoMode figcaption { margin:0 0 7px; font-size:12px; color:var(--restore-muted); }
#restoreVideoMode video { width:100%; display:block; background:#070a10; aspect-ratio:16/9; border:1px solid var(--restore-border); border-radius:8px; }
#restoreVideoMode .restore-comparison { grid-column:1/-1; }
#restoreVideoMode .restore-playback { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:16px; }
#restoreVideoMode .restore-playback label { font-size:11px; }
#restoreVideoMode input[type=range] { flex:1; min-width:120px; accent-color:#a183f2; }
#restoreVideoMode output { font:11px monospace; }
#restoreVideoMode details { margin-top:16px; font-size:12px; }
#restoreVideoMode summary { cursor:pointer; color:#c7b5f7; }
#restoreVideoMode pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:280px; overflow:auto; background:#0e1423; padding:12px; border-radius:8px; font-size:11px; }
@media(max-width:1100px) { #restoreVideoMode .restore-setting-groups { grid-template-columns:repeat(2,minmax(0,1fr)); } #restoreVideoMode .restore-card { padding:18px; } }
@media(max-width:850px) { #restoreVideoMode .restore-support { grid-template-columns:1fr; } #restoreVideoMode .restore-profile-row { grid-template-columns:1fr; gap:12px; } }
@media(max-width:600px) { #restoreVideoMode .restore-setting-groups { grid-template-columns:1fr; } #restoreVideoMode .restore-setting-group { padding:15px; } }
@media(max-width:520px) { #restoreVideoMode .restore-heading { align-items:flex-start; flex-direction:column; } #restoreVideoMode h2 { font-size:23px; } #restoreVideoMode .restore-card { padding:15px; } #restoreVideoMode .restore-url-row, #restoreVideoMode .restore-upload-row { flex-direction:column; align-items:stretch; } #restoreVideoMode .restore-source { flex-direction:column; } #restoreVideoMode .restore-source img { width:100%; height:150px; } #restoreVideoMode .restore-players { grid-template-columns:1fr; } #restoreVideoMode .restore-actions > .restore-button { flex:1 1 140px; } #restoreVideoMode .restore-badge { font-size:10px; } }

#restoreVideoMode .restore-warning { color:#e6c394; }
#restoreVideoMode #restoreFinishedVideo { max-height:620px; margin-bottom:16px; }
#restoreVideoMode .restore-output-area { display:grid; gap:18px; min-width:0; }
#restoreVideoMode .restore-output-area-heading { margin:8px 0 0; }
#restoreVideoMode .restore-output-area-heading p { margin:0; }
#restoreVideoMode .restore-output-area .restore-section-heading > h4 { margin:0; font-size:16px; }
#restoreVideoMode .restore-output-empty { display:flex; align-items:center; gap:18px; min-height:130px; padding:22px; border:1px dashed var(--restore-border); border-radius:10px; background:rgba(8,14,28,.2); }
#restoreVideoMode .restore-output-empty h4 { margin:0 0 7px; font-size:14px; }
#restoreVideoMode .restore-output-empty p { margin:0; color:var(--restore-muted); font-size:13px; max-width:760px; }
#restoreVideoMode .restore-output-icon { flex:none; display:grid; place-items:center; width:48px; height:48px; color:#c2a9ff; font-size:30px; border:1px solid rgba(167,139,250,.25); background:rgba(139,92,246,.06); border-radius:50%; }
@media(max-width:520px) { #restoreVideoMode .restore-output-empty { padding:18px 15px; align-items:flex-start; gap:12px; } #restoreVideoMode .restore-output-icon { width:34px; height:34px; font-size:22px; } }

#restorationSidebarProjects { margin-top:10px; border-top:1px solid var(--border,#2e3549); padding-top:8px; }
#restorationSidebarProjects .restore-projects-heading { margin:2px 12px 8px; color:var(--text-muted,#a5afc5); font-size:11px; }
#restorationSidebarProjects .restore-project-item { width:100%; background:transparent; border:0; color:var(--text-primary,#eef0fa); font:inherit; text-align:left; cursor:pointer; }
#restorationSidebarProjects .restore-project-item[aria-current=true] { background:rgba(139,92,246,.12); }
#restorationSidebarProjects .restore-project-item:disabled { opacity:.5; cursor:wait; }
#restorationSidebarProjects .project-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Quantitative charts use native SVG and the studio's existing theme. */
#restoreVideoMode .restore-chart-heading { margin:24px 0 12px; }
#restoreVideoMode .restore-chart-heading h4, #restoreVideoMode .restore-validation-heading { margin:0 0 6px; font-size:14px; }
#restoreVideoMode .restore-chart-heading p { margin:0; }
#restoreVideoMode .restore-chart-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-bottom:14px; }
#restoreVideoMode .restore-chart { min-width:0; padding:13px; border:1px solid var(--restore-border); border-radius:10px; background:rgba(8,14,28,.25); }
#restoreVideoMode .restore-chart figcaption { color:var(--text-primary,#eef0fa); font-size:13px; font-weight:600; margin:0 0 4px; }
#restoreVideoMode .restore-chart p { margin:0 0 8px; min-height:34px; }
#restoreVideoMode .restore-chart svg { display:block; width:100%; height:auto; overflow:visible; }
#restoreVideoMode .restore-chart-axis { fill:var(--restore-muted); font:12px sans-serif; }
#restoreVideoMode .restore-chart-value { fill:var(--text-primary,#eef0fa); font:12px sans-serif; }
#restoreVideoMode .restore-chart-gridline { stroke:var(--restore-border); stroke-width:1; }
#restoreVideoMode .restore-chart-empty { padding:28px 0; color:var(--restore-muted); font-size:12px; }
#restoreVideoMode .restore-chart circle:focus { outline:none; stroke:var(--text-primary,#eef0fa); stroke-width:3; }
#restoreVideoMode .restore-live-charts { grid-template-columns:repeat(3,minmax(0,1fr)); }
#restoreVideoMode .restore-validation-heading { margin-top:22px; }
@media(max-width:1150px) { #restoreVideoMode .restore-chart-grid { grid-template-columns:1fr; } }
#restoreVideoMode .restore-chart .restore-chart-reading { margin:5px 0 0; min-height:0; color:var(--text-primary,#eef0fa); font-size:12px; font-variant-numeric:tabular-nums; }

@media(max-width:1250px) { #restoreVideoMode .restore-live-charts { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { #restoreVideoMode .restore-live-charts { grid-template-columns:1fr; } }

/* Still decisions are visually and behaviorally separate from video approval. */
#restoreVideoMode .restore-still-review .restore-section-heading p { margin:7px 0 0; }
#restoreVideoMode .restore-still-header-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
#restoreVideoMode .restore-still-selector { max-width:680px; margin:18px 0; }
#restoreVideoMode .restore-still-images { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:18px 0; }
#restoreVideoMode .restore-still-images[data-count="3"] { grid-template-columns:repeat(3,minmax(0,1fr)); }
#restoreVideoMode .restore-still-images figure { margin:0; padding:12px; border:1px solid var(--restore-border); border-radius:10px; min-width:0; background:rgba(8,14,28,.2); }
#restoreVideoMode .restore-still-images figcaption { font-size:13px; line-height:1.5; margin-bottom:10px; }
#restoreVideoMode .restore-still-frame { position:relative; aspect-ratio:16 / 10; display:grid; place-items:center; background:#0c1220; border-radius:6px; overflow:hidden; }
#restoreVideoMode .restore-still-frame img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
#restoreVideoMode .restore-still-frame p { padding:12px; text-align:center; }
#restoreVideoMode .restore-still-images .restore-link { display:block; margin-top:10px; overflow-wrap:anywhere; }
#restoreVideoMode .restore-still-verdicts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:20px 0; }
#restoreVideoMode .restore-still-verdicts > div { border:1px solid var(--restore-border); border-radius:10px; padding:15px; min-width:0; }
#restoreVideoMode .restore-still-verdicts h4 { font-size:14px; margin-bottom:8px; }
#restoreVideoMode .restore-still-verdicts p { margin:0; }
#restoreVideoMode .restore-still-verdicts ul { padding-left:18px; overflow-wrap:anywhere; }
#restoreVideoMode #restoreStillReviewHint, #restoreVideoMode #restoreStillWaiting { overflow-wrap:anywhere; }
#restoreVideoMode .restore-motion h5 { margin:22px 0 10px; font-size:13px; }
#restoreVideoMode .restore-motion .restore-players { margin:18px 0; }
#restoreVideoMode .restore-motion video { object-fit:contain; max-height:440px; }
#restoreVideoMode #restoreMotionQA { overflow-wrap:anywhere; }
#restoreVideoMode #restoreMotionQA ul { padding-left:18px; }
@media(max-width:1200px) {
    #restoreVideoMode .restore-still-images, #restoreVideoMode .restore-still-images[data-count="3"] { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
    #restoreVideoMode .restore-still-images, #restoreVideoMode .restore-still-images[data-count="3"], #restoreVideoMode .restore-still-verdicts { grid-template-columns:1fr; }
}
