/* Asset Breakdown keeps its video layers inside the workspace. */
.breakdown-shell,.bd-workspace{--bd-bg:#22272e;--bd-panel:#2c333d;--bd-input:#192029;--bd-text:#e8edf4;--bd-muted:#a6b1c0;--bd-border:#465363;--bd-accent:#60a5fa;color:var(--bd-text);background:var(--bd-bg)}
html[data-theme="light"] .breakdown-shell,html[data-theme="light"] .bd-workspace{--bd-bg:#eef3f8;--bd-panel:#fff;--bd-input:#f7f9fc;--bd-text:#192c43;--bd-muted:#52647b;--bd-border:#b7c5d7;--bd-accent:#1d4ed8}
.breakdown-shell{flex:1;display:flex;flex-direction:column;min-width:0;height:100%;overflow:hidden}
.bd-workspace button,.bd-workspace input:not([type="range"]):not([type="checkbox"]),.bd-workspace select{border:1px solid var(--bd-border);border-radius:7px;background:var(--bd-input);color:var(--bd-text);font:inherit;min-height:38px;padding:7px 11px;box-sizing:border-box}
.bd-workspace{flex:1;min-height:0;overflow-y:auto;padding:18px 22px;font-size:13px;line-height:1.5}
.bd-workspace button{cursor:pointer;touch-action:manipulation}.bd-workspace button:hover{border-color:var(--bd-accent)}.bd-workspace button:disabled{opacity:.45;cursor:wait}.bd-workspace :focus-visible{outline:2px solid var(--bd-accent);outline-offset:3px}
.bd-heading,.bd-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.bd-heading{margin-bottom:18px}.bd-heading h1{font-size:23px;font-weight:750;margin:0}.bd-heading p,.bd-assets>p{color:var(--bd-muted);margin:3px 0 0}.bd-save{display:flex;align-items:center;gap:9px;font-size:11px;color:var(--bd-muted)}.bd-save [data-error="true"]{color:#f87171;max-width:270px}
.bd-episode-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:16px}.bd-episode-bar label{display:flex;align-items:center;gap:10px;font-weight:650;min-width:0}.bd-episode-bar select{max-width:260px;min-width:130px}
.bd-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,290px);gap:20px;align-items:start}.bd-main{min-width:0}.bd-assets{background:var(--bd-panel);border:1px solid var(--bd-border);border-radius:12px;padding:15px}.bd-assets>input{width:100%;margin:14px 0 4px}
.bd-player{position:relative;isolation:isolate;background:#000;border-radius:9px;overflow:hidden;aspect-ratio:16/9;width:100%;max-height:64dvh;display:flex;align-items:center;justify-content:center}.bd-player>video{width:100%;height:100%;object-fit:contain;display:block}.bd-overlay{position:absolute;pointer-events:none}.bd-overlay.bd-drawing{pointer-events:auto;touch-action:none;cursor:crosshair}
/* Expand / restore sits inside the video's top-right corner like other review players.
   Keep it available to touch and keyboard users; never hide it on hover only. */
.bd-workspace .bd-player-expand{position:absolute;z-index:7;right:12px;top:12px;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-height:40px;padding:8px;flex:none;border:1px solid rgba(203,213,225,.35);border-radius:8px;background:rgba(0,0,0,.6);color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.24);transition:background .15s ease}
.bd-workspace .bd-player-expand:hover,.bd-workspace .bd-player-expand:focus-visible{background:rgba(0,0,0,.85);border-color:#93c5fd;color:#fff}
.bd-player-expand svg{display:block;width:20px;height:20px;flex:none;pointer-events:none}
.bd-player-expand .bd-icon-restore,.bd-player-expand[aria-pressed="true"] .bd-icon-expand{display:none}
.bd-player-expand[aria-pressed="true"] .bd-icon-restore{display:block}
@media(max-width:767px){.bd-workspace .bd-player-expand{top:8px;right:8px;width:40px;height:40px}}
.bd-workspace .bd-box{position:absolute;min-height:0;border:2px solid #fbbf24;border-radius:2px;padding:0;background:transparent;color:#111827;pointer-events:auto;overflow:visible;text-align:left}.bd-workspace .bd-box span{position:absolute;left:-2px;top:-2px;display:block;max-width:min(280px,55vw);width:max-content;padding:2px 5px;border-radius:2px;background:#fbbf24;color:#111827;font-size:11px;font-weight:700;line-height:1.4;white-space:normal;overflow-wrap:anywhere;pointer-events:none}.bd-workspace .bd-box-draft{border-color:#60a5fa;pointer-events:none}.bd-workspace .bd-box-draft span{background:#60a5fa}.bd-drawing .bd-box{pointer-events:none}
.bd-transport{background:var(--bd-panel);border:1px solid var(--bd-border);border-radius:0 0 9px 9px;padding:10px 12px}.bd-transport input[type="range"]{display:block;width:100%;height:20px;accent-color:#3b82f6;margin:0 0 8px}.bd-playback{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px}.bd-playback-controls{grid-column:2;display:flex;justify-content:center;align-items:center;gap:8px}.bd-workspace .bd-playback-controls button{display:inline-flex;justify-content:center;align-items:center;flex:none;width:44px;height:42px;min-height:42px;padding:8px}.bd-playback-controls button svg{display:block;width:20px;height:20px;flex:none;fill:currentColor;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.bd-playback-controls .bd-icon-pause{display:none}.bd-playback-controls .is-playing .bd-icon-play{display:none}.bd-playback-controls .is-playing .bd-icon-pause{display:block}.bd-playback-meta{grid-column:3;display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}.bd-playback output{font:11px ui-monospace,monospace;color:var(--bd-muted);white-space:nowrap}
/* Saved asset frames are amber ticks immediately below the seek bar.
   Keep the native range unobstructed for mouse/touch scrubbing; ticks remain
   keyboard-focusable buttons that jump back to the saved source frame. */
.bd-timeline{min-width:0}
.bd-transport .bd-timeline input[type="range"]{margin-bottom:0}
.bd-timeline-marks{height:15px;position:relative;margin:-3px 7px 6px}
.bd-workspace .bd-timeline-mark{position:absolute;top:0;transform:translateX(-50%);width:13px;height:17px;min-height:0;padding:0;border:0;border-radius:0;background:transparent;display:flex;justify-content:center;align-items:flex-start;z-index:1;touch-action:manipulation}
.bd-timeline-mark span{width:3px;height:12px;background:#f59e0b;border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.27);pointer-events:none}
.bd-workspace .bd-timeline-mark:hover span,.bd-workspace .bd-timeline-mark:focus-visible span{width:5px;background:#fbbf24;box-shadow:0 0 0 2px rgba(245,158,11,.22)}
.bd-workspace .bd-timeline-mark:focus-visible{outline:2px solid #fbbf24;outline-offset:1px;border-radius:3px}
.bd-player-actions{grid-column:1;display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;min-width:0;gap:10px;padding:0;white-space:nowrap}.bd-player-actions label{display:flex;gap:6px;align-items:center;flex:none;cursor:pointer;font-size:12px}.bd-player-actions input{accent-color:#2563eb;margin:0}.bd-player-actions>span:not(.bd-visually-hidden){font-size:12px;color:var(--bd-muted)}.bd-markup-help{margin:10px 0 0;color:var(--bd-muted);font-size:12px;line-height:1.45}.bd-workspace .bd-primary{background:#2563eb;border-color:#3b82f6;color:#fff;font-weight:700}.bd-workspace .bd-danger{color:#f87171;margin-left:auto}
.bd-section-title{margin:12px 0}.bd-section-title h2,.bd-editor h2{font-size:14px;font-weight:750;margin:0}.bd-section-title>span{background:var(--bd-input);border:1px solid var(--bd-border);border-radius:20px;padding:1px 9px;font-size:11px}.bd-marks{display:grid;gap:7px}.bd-workspace .bd-mark-row{display:flex;justify-content:space-between;align-items:center;gap:12px;text-align:left;padding:10px 12px}.bd-mark-row>span:last-child{white-space:nowrap;font:11px ui-monospace,monospace;color:var(--bd-muted)}.bd-mark-row b,.bd-asset b{display:block;overflow-wrap:anywhere}.bd-mark-row small,.bd-asset small{display:block;color:var(--bd-muted);font-size:11px}.bd-muted{color:var(--bd-muted);font-size:12px}
.bd-asset{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:12px 0;border-bottom:1px solid var(--bd-border)}.bd-asset:last-child{border-bottom:0}.bd-asset-actions{display:flex;gap:5px}.bd-asset-actions button{font-size:11px;min-height:34px;padding:5px 8px}
.bd-editor{margin:0 0 18px;padding:16px;border:1px solid var(--bd-accent);border-radius:10px;background:var(--bd-panel)}.bd-editor>label,.bd-fields label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:650;min-width:0}.bd-editor h2{margin-bottom:12px}.bd-editor select,.bd-editor input{width:100%}.bd-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.bd-editor-tools,.bd-editor-actions{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:13px}.bd-editor-tools button{font-size:11px}
.bd-empty{padding:36px 20px;text-align:center;color:var(--bd-muted);max-width:500px;margin:auto}.bd-empty h2{font-size:20px;font-weight:700;color:var(--bd-text)}.bd-player .bd-empty{--bd-text:#e2e8f0;--bd-muted:#a6b1c0;--bd-input:#22272e;--bd-border:#465363;color:var(--bd-muted)}.bd-empty p{margin:10px 0 18px}.bd-workspace.bd-expanded{position:fixed;inset:0;z-index:1800;padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom));height:100dvh;overflow:auto}.bd-expanded .bd-player{max-height:76dvh}
@media(max-width:1000px){.bd-layout{grid-template-columns:minmax(0,1fr)}.bd-assets{margin-top:4px}.bd-assets-list{display:grid;grid-template-columns:1fr 1fr}.bd-heading{align-items:flex-start}.bd-save{max-width:42%;flex-wrap:wrap;justify-content:flex-end;text-align:right}.bd-workspace{padding:14px}.bd-heading h1{font-size:20px}.bd-heading p{font-size:11px}.bd-heading{margin-bottom:12px}.bd-player{max-height:55dvh}.bd-episode-bar{gap:6px}.bd-episode-bar label{flex:1 1 190px}.bd-episode-bar select{flex:1;max-width:100%}.bd-workspace button{min-height:40px}.bd-playback{gap:6px}.bd-playback output{font-size:10px}.bd-playback-meta>button{font-size:11px;padding:6px 8px}.bd-mark-row>span:last-child{font-size:10px}}
@media(max-width:380px){.bd-workspace{padding:10px}.bd-playback{gap:6px}.bd-fields{gap:8px}.bd-heading h1{font-size:18px}}

/* Script-project inspired Asset Breakdown episode dashboard. The compact rows
   always remain visible; only one episode mounts its editable player at a time. */
.breakdown-shell,.bd-workspace{--bd-bg:#383838;--bd-panel:#292929;--bd-input:#222830;--bd-border:#59616c;--bd-text:#f1f5f9;--bd-muted:#adb7c6}
.bd-workspace{padding:14px 16px 32px}
.bd-dashboard{max-width:100%;margin:0 auto}
/* Match the inset Asset/Concept desktop content panel below the project strip. */
@media(min-width:768px){
 .breakdown-shell.portal-main-shell>.bd-workspace.portal-dashboard-panel{margin:16px;padding:16px;min-width:0;border:1px solid #374151;border-radius:4px;background:#2e2e2e;box-shadow:inset 0 2px 4px 0 rgb(0 0 0 / .05)}
}
.bd-workspace .bd-add-episode{width:calc(100% - .5rem);min-height:42px;margin-bottom:16px;padding:8px 0;border:1px dashed #6b7280;border-radius:8px;background:#3a3a3a;color:#d1d5db;font-size:16px;line-height:24px;font-weight:500;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 1px 2px 0 rgb(0 0 0 / .05);transition:background .15s ease,color .15s ease}
.bd-add-episode .bd-add-season-icon{color:inherit;font-size:20px;font-weight:700;line-height:1}.bd-add-episode .bd-add-season-label{font-weight:500;letter-spacing:.025em}
.bd-workspace .bd-add-episode:hover{border-color:#6b7280;background:#4d4d4d;color:#fff}
@media(max-width:767px){.bd-workspace .bd-add-episode{width:100%;min-height:46px;margin-bottom:12px;padding:12px 0;border-radius:6px;font-size:14px;line-height:20px}.bd-add-episode .bd-add-season-icon{font-size:18px}.bd-add-episode .bd-add-season-label{letter-spacing:normal}}
.bd-dashboard-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 2px 6px;min-height:37px}
.bd-dashboard-caption{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--bd-muted);min-width:0}
.bd-dashboard-caption b{color:var(--bd-text);font-size:12px;white-space:nowrap}
.bd-dashboard-caption span{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.bd-dashboard-toolbar .bd-save{flex-wrap:wrap;justify-content:flex-end}
.bd-workspace .bd-dashboard-toolbar .bd-save button{min-height:25px;padding:3px 9px;font-size:10px}
.bd-episode-list{display:flex;flex-direction:column;gap:11px}
.bd-list-empty{padding:30px;text-align:center;background:var(--bd-panel);border:1px dashed var(--bd-border);border-radius:9px;color:var(--bd-muted);font-size:12px}
.bd-episode-card{background:#3a3a3a;border:1px solid #59616c;border-radius:8px;overflow:hidden;box-shadow:0 3px 10px rgba(0,0,0,.14);min-width:0}
.bd-episode-card.is-open{border-color:#6487b3}
.bd-episode-summary{display:grid;grid-template-columns:106px minmax(180px,226px) minmax(0,1fr);min-height:145px;align-items:stretch;background:#444;min-width:0}
.bd-episode-thumb{width:106px;min-height:145px;background:#131820;border-right:1px solid #59616c;display:flex;align-items:center;justify-content:center;font-size:34px;overflow:hidden}
.bd-episode-thumb img{width:100%;height:100%;object-fit:cover;align-self:stretch}
.bd-episode-identity{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;min-width:0;padding:22px 14px 14px;gap:12px}
.bd-episode-name{font-weight:800;font-size:15px;line-height:1.25;color:#fff;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.bd-type-badge{border:1px solid #3568a8;background:#18365e;color:#a9d0ff;border-radius:30px;padding:2px 8px;font-size:9px;letter-spacing:.04em;font-weight:800;line-height:1.4}
.bd-episode-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;width:100%;max-width:210px;min-width:0;font-size:9px;color:#c1d5f0}
.bd-episode-stat{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;padding:5px 2px;background:#293d57;border:1px solid #40638e;border-radius:4px;line-height:1.2}
.bd-episode-stat strong{font-size:12px;font-weight:800;max-width:100%;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.bd-episode-stat>span{font-size:8px;white-space:nowrap}
.bd-episode-stage-shell{display:flex;flex-direction:column;justify-content:center;min-width:0;padding:10px 12px 9px;border-left:1px solid rgba(107,114,128,.5)}
/* The Animatic tile is the SAME workflow tile used by Asset / Script,
   not an independent label above the status panel. */
.bd-stage-tabs.assignment-stage-track{height:auto;min-height:0;align-items:center;padding:4px 3px 10px;overflow:visible}
.bd-workspace .bd-stage-tab.assignment-stage-step{width:88px;min-width:88px;height:50px;min-height:50px;padding:7px 9px 6px;display:grid;grid-template-rows:1fr 9px;gap:3px;border-radius:var(--of-radius-sm,7px);text-align:left;background:#303030;color:#e5e7eb;box-shadow:inset 0 3px 0 var(--stage-status-accent)}
.bd-workspace .bd-stage-tab.bd-stage-uploaded{--stage-state:#22c55e;--stage-status-accent:#22c55e;--stage-selection-accent:#22c55e}
.bd-workspace .bd-stage-tab.bd-stage-pending{--stage-state:#6b7280;--stage-status-accent:transparent;--stage-selection-accent:#6b7280}
.bd-workspace .bd-stage-tab .assignment-stage-slide-state-dot{min-width:0}
.bd-workspace .bd-stage-tab .bd-stage-label-mobile{display:none}
.bd-stage-panel .assignment-selected-stage-pointer{--stage-selection-accent:var(--bd-stage-accent);left:39px;top:-9px;background:#292929;border-color:var(--bd-stage-accent)}
.bd-stage-panel{position:relative;--bd-stage-accent:#6b7280;background:#292929;border:1px solid #555;border-top:2px solid var(--bd-stage-accent);border-radius:8px;min-width:0;overflow:visible;box-shadow:0 1px 0 rgba(255,255,255,.06) inset}
.bd-stage-panel.bd-panel-ready{--bd-stage-accent:#22c55e}
.bd-stage-overview{display:grid;grid-template-columns:minmax(135px,440px) minmax(130px,200px) minmax(0,1fr) auto;align-items:stretch;gap:0;min-height:59px;border:0;padding:0}
.bd-stage-progress{display:flex;flex-direction:column;justify-content:center;gap:5px;min-width:0;font-size:10px;color:#aeb8c6;padding:8px 11px}
.bd-stage-meter{height:6px;background:#20242a;border:1px solid #4e5864;border-radius:10px;overflow:hidden}
.bd-stage-meter i{height:100%;display:block;background:#3b82f6}
.bd-stage-status{display:flex;align-items:center;gap:7px;font-size:11px;color:#d1d5db;white-space:nowrap;padding:8px 12px;border-left:1px solid rgba(107,114,128,.34)}
.bd-stage-status i{flex:none;width:8px;height:8px;border:2px solid rgba(255,255,255,.15);border-radius:50%;background:#9ca3af}
.bd-stage-status.is-assigned i{background:#3b82f6}
.bd-stage-status.is-wip i{background:#eab308}
.bd-stage-status.is-unassigned i{background:#9ca3af}
.bd-stage-status .bd-stage-status-copy{display:flex;flex-direction:column;gap:3px;min-width:0;white-space:normal;line-height:1.35}
.bd-stage-status-copy strong{font-size:inherit;font-weight:700}
.bd-stage-status-copy small{font-size:.9em;color:inherit;opacity:.8}
.bd-stage-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:75px;padding:8px 11px;border-left:1px solid rgba(107,114,128,.34)}
.bd-workspace .bd-stage-actions button,.bd-workspace .bd-stage-actions a{border:1px solid #526074;border-radius:5px;padding:5px 11px;min-height:30px;font-size:10px;font-weight:800;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;background:#252b32;color:#d1dce9;line-height:1.4}
.bd-workspace .bd-stage-actions .bd-open{border-color:#9333ea;background:#7e22ce;color:white;min-width:55px}
.bd-workspace .bd-stage-actions button:hover,.bd-workspace .bd-stage-actions a:hover{filter:brightness(1.14)}
.bd-episode-detail{padding:14px 16px 18px 16px;background:var(--bd-bg);border-top:1px solid #59616c}
.bd-episode-detail .bd-layout{gap:16px}
.bd-episode-detail .bd-player{border-radius:7px 7px 0 0}
.bd-episode-detail .bd-assets{border-radius:8px}
/* When maximized, keep the video player and its review tools in the open row. */
.bd-workspace.bd-expanded{overflow-y:auto}
@media(max-width:1050px){
    .bd-episode-summary{grid-template-columns:86px minmax(125px,170px) minmax(0,1fr)}
    .bd-episode-thumb{width:86px}
    .bd-stage-overview{grid-template-columns:minmax(110px,1fr) minmax(115px,1fr) auto}
    .bd-episode-stage-shell{padding:9px 8px}
}
@media(max-width:767px){
    .bd-workspace{padding:10px 9px 86px}
    .bd-episode-summary{grid-template-columns:60px minmax(0,1fr);min-height:0;padding:10px;gap:9px}
    .bd-episode-thumb{width:60px;height:60px;min-height:60px;border:1px solid #59616c;border-radius:8px;grid-column:1;grid-row:1;align-self:center}
    .bd-episode-identity{grid-column:2;grid-row:1;padding:0;gap:5px}
    .bd-episode-name{font-size:14px}
    .bd-episode-meta{font-size:9px}
    .bd-episode-stage-shell{grid-column:1/-1;grid-row:2;padding:3px 0 0;border-left:0}
    .bd-stage-tabs.assignment-stage-track{padding:3px 3px 9px}
    .bd-workspace .bd-stage-tab.assignment-stage-step{width:52px;min-width:52px;height:46px;min-height:46px;padding:6px 5px 5px;grid-template-rows:1fr 8px;border-radius:6px}
    .bd-workspace .bd-stage-tab .bd-stage-label-full{display:none}
    .bd-workspace .bd-stage-tab .bd-stage-label-mobile{display:block}
    .bd-stage-panel .assignment-selected-stage-pointer{left:22px}
    .bd-stage-overview{grid-template-columns:minmax(90px,1fr) minmax(95px,1fr) auto;min-height:56px}
    .bd-stage-progress{padding:7px 8px;font-size:9px}
    .bd-stage-status{padding:7px 8px;font-size:9px;white-space:normal}
    .bd-stage-actions{padding:7px;min-width:0}
    .bd-workspace .bd-stage-actions button,.bd-workspace .bd-stage-actions a{font-size:10px}
    .bd-episode-detail{padding:10px}
    .bd-dashboard-toolbar{gap:7px;align-items:flex-start}
    .bd-dashboard-caption{flex-direction:column;align-items:flex-start;gap:0}
    .bd-dashboard-toolbar .bd-save{max-width:50%}
    .bd-episode-detail .bd-layout{gap:12px}
}
@media(max-width:370px){
    .bd-stage-overview{grid-template-columns:minmax(80px,1fr) minmax(90px,1fr) auto}
    .bd-stage-status{gap:4px}
    .bd-stage-actions{padding:6px}
}
/* Light theme must use readable ink in the cards, not dark-mode-only text. */
html[data-theme="light"] .bd-episode-card{background:#fff;border-color:#b7c5d7}
html[data-theme="light"] .bd-episode-summary{background:#fff}
html[data-theme="light"] .bd-episode-name{color:#192c43}
html[data-theme="light"] .bd-episode-stat{background:#edf3fb;border-color:#b6c8df;color:#294564}
html[data-theme="light"] .bd-stage-panel{background:#f7f9fc;border-color:#bac8d7}
html[data-theme="light"] .bd-stage-overview{border-color:#d2dbe7}
html[data-theme="light"] .bd-stage-status{color:#354962}
html[data-theme="light"] .bd-workspace .bd-stage-actions button:not(.bd-open){background:#edf1f7;color:#223750;border-color:#abbace}
html[data-theme="light"] .bd-workspace .bd-add-episode{background:#fff;color:#25354a}
html[data-theme="light"] .bd-list-empty{background:#fff}


/* Add New Animatics: match Originfly's New Assignment + Thumbnail Crop UI.
   The crop dialog deliberately uses the shared CropperJS dependency, with a
   separate full-size editor and square crop selection (same as Assignment). */
/* Match the shared Asset stage tile in light mode as well. */
html[data-theme="light"] .bd-workspace .bd-stage-tab.assignment-stage-step{background:#edf1f7;color:#192c43;border-color:#a8b6c7}
html[data-theme="light"] .bd-stage-panel{background:#f7f9fc;border-color:#bac8d7;border-top-color:var(--bd-stage-accent)}
html[data-theme="light"] .bd-stage-panel .assignment-selected-stage-pointer{background:#f7f9fc}
html[data-theme="light"] .bd-stage-progress{color:#52647b}
html[data-theme="light"] .bd-stage-status{color:#354962}
.bd-create-overlay{position:fixed;inset:0;z-index:50000;background:rgba(8,10,14,.78);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:18px;overflow-y:auto;overscroll-behavior:contain}
.bd-create-dialog{position:relative;width:min(100%,748px);max-height:calc(100dvh - 38px);display:flex;flex-direction:column;overflow:hidden;margin:auto;border-radius:16px;background:linear-gradient(130deg,#303030,#282828);color:#f8fafc;border:1px solid #494d54;box-shadow:0 28px 90px rgba(0,0,0,.6)}
.bd-create-head{position:relative;padding:20px 64px 8px;display:flex;align-items:center;justify-content:center;min-height:66px;flex-shrink:0}
.bd-create-head h2{font-size:25px;line-height:1.25;font-weight:800;letter-spacing:.012em;color:#fff;text-align:center;margin:0}
.bd-workspace .bd-create-close{position:absolute;right:17px;top:17px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;min-height:36px;border-radius:50%;border:1px solid #474747;background:#2b2b2b;color:#c6ccd6;font-size:23px;font-weight:400;padding:0}
.bd-workspace .bd-create-close:hover{color:#fff;background:#383838;border-color:#64748b}
.bd-create-form{padding:0 22px 22px;display:flex;flex-direction:column;gap:19px;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.bd-create-thumb-row{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:68px;padding:3px 0 1px}
.bd-create-thumb{width:62px;height:62px;display:flex;align-items:center;justify-content:center;border:2px dashed #626d7a;border-radius:17px;background:#2b2c2e;color:#a8b0bf;cursor:pointer;overflow:hidden;transition:border-color .15s,background .15s}
.bd-create-thumb:hover,.bd-create-thumb:focus-within{border-color:#60a5fa;color:#fff;background:#343a44}
.bd-create-thumb svg{flex:none}
.bd-create-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.bd-create-thumb img[hidden],.bd-create-thumb svg[hidden],.bd-create-remove-thumb[hidden]{display:none!important}
.bd-workspace .bd-create-remove-thumb{min-height:20px;padding:0 5px;background:transparent;border:0;font-size:10px;text-decoration:underline;color:#94a3b8;cursor:pointer}
.bd-create-field{display:flex;flex-direction:column;gap:9px;min-width:0;color:#abb3c2;font-size:10px;letter-spacing:.13em;font-weight:850}
.bd-create-field>span{padding-left:4px}
.bd-create-field em,.bd-create-media-group em{font-style:normal;color:#60a5fa}
.bd-workspace .bd-create-field input[type=text],.bd-workspace .bd-create-field input[type=number]{width:100%;height:46px;border:1px solid #505b6c;border-radius:9px;background:#202122;color:#f8fafc;padding:0 14px;font-size:14px;letter-spacing:normal;font-weight:500;outline:none;box-shadow:inset 0 1px 2px rgba(0,0,0,.15)}
.bd-workspace .bd-create-field input[type=text]:focus,.bd-workspace .bd-create-field input[type=number]:focus{border-color:#3b82f6;box-shadow:0 0 0 2px rgba(59,130,246,.2)}
.bd-create-media-group{padding:15px 18px 16px;border:1px solid rgba(148,163,184,.17);border-radius:16px;background:rgba(37,39,43,.72);display:flex;flex-direction:column;gap:11px}
.bd-create-media-group h3{margin:0;text-align:center;font-size:11px;letter-spacing:.105em;color:#aeb5c4;font-weight:850}
.bd-create-video-pick{display:flex;align-items:center;justify-content:center;gap:10px;cursor:pointer;width:100%;min-height:45px;padding:9px 12px;border:1px solid #4d5b6b;border-radius:9px;background:#222325;color:#dce2ec;font-size:14px;font-weight:500;transition:border-color .15s,background .15s}
.bd-create-video-pick:hover{border-color:#60a5fa;background:#2f3540;color:#fff}
.bd-create-video-pick svg{flex:none;color:#c2cbd6}
.bd-create-media-group #bd-video-file-name{margin:0;text-align:center;font-size:11px;line-height:1.4;color:#8291a7;overflow-wrap:anywhere}
.bd-create-form #bd-new-status{margin:0;color:#93c5fd;font-size:12px;line-height:1.4;text-align:center;overflow-wrap:anywhere}
.bd-create-form #bd-new-status:empty{display:none}
.bd-create-actions{padding-top:3px;margin-top:0}
.bd-workspace .bd-create-actions .bd-create-submit{display:block;width:100%;height:50px;border-radius:9px;min-height:50px;border:1px solid #377af2;background:#2d62d8;color:#fff;font-size:14px;font-weight:800;letter-spacing:.005em;box-shadow:0 7px 18px rgba(12,36,91,.2)}
.bd-workspace .bd-create-actions .bd-create-submit:hover{background:#3773ee}
.bd-workspace .bd-create-actions .bd-create-submit:disabled{opacity:.55;cursor:wait}
.bd-create-form input[hidden]{display:none!important}
.bd-create-dialog :is(input,button,label):focus-visible,.bd-crop-dialog button:focus-visible{outline:2px solid #38bdf8;outline-offset:3px}
/* Thumbnail Crop second window: same geometry, navy gradient, control colors,
   and footer placement as the established Originfly assignment cropper. */
.bd-crop-overlay{z-index:50001;background:rgba(5,9,17,.85)}
.bd-crop-dialog{margin:auto;width:min(920px,100%);max-height:calc(100dvh - 24px);overflow:hidden;display:flex;flex-direction:column;border-radius:28px;border:1px solid rgba(148,163,184,.24);background:linear-gradient(145deg,rgba(15,23,42,.98),rgba(34,37,46,.98));color:#f8fafc;box-shadow:0 30px 90px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.07)}
.bd-crop-head{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:18px 20px;border-bottom:1px solid rgba(148,163,184,.14);background:radial-gradient(circle at 12% 0%,rgba(14,165,233,.2),transparent 42%),rgba(2,6,23,.25);flex-shrink:0}
.bd-crop-headline{display:flex;gap:13px;align-items:center;min-width:0}
.bd-crop-headline h2{font-size:24px;font-weight:900;letter-spacing:-.03em;line-height:1.2;margin:0;color:#fff}
.bd-crop-headline p{font-size:11px;font-weight:700;color:#94a3b8;margin:5px 0 0}
.bd-crop-icon{width:48px;height:48px;flex:none;border-radius:16px;display:flex;align-items:center;justify-content:center;background:rgba(14,165,233,.12);color:#bae6fd;border:1px solid rgba(125,211,252,.25);font-size:22px;box-shadow:0 14px 36px rgba(14,165,233,.1)}
.bd-workspace .bd-crop-close{display:flex;align-items:center;justify-content:center;width:42px;min-height:42px;padding:0;flex:none;background:rgba(15,23,42,.55);border:1px solid rgba(148,163,184,.2);border-radius:50%;color:#cbd5e1;font-size:23px;font-weight:800}
.bd-workspace .bd-crop-close:hover{background:#334155;color:#fff}
.bd-crop-body{padding:18px;overflow-y:auto;min-height:0}
.bd-crop-stage{padding:12px;border:1px solid rgba(148,163,184,.18);border-radius:24px;background:rgba(2,6,23,.36);box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
.bd-crop-canvas{height:min(440px,52dvh);min-height:280px;overflow:hidden;border-radius:18px;background:#050505;border:1px solid rgba(148,163,184,.12)}
.bd-crop-canvas img{display:block;max-width:100%}
.bd-crop-dialog .cropper-view-box{outline:2px solid rgba(56,189,248,.9);border-radius:18px;box-shadow:0 0 0 9999px rgba(0,0,0,.48)}
.bd-crop-dialog .cropper-face{border-radius:18px}
.bd-crop-dialog .cropper-line,.bd-crop-dialog .cropper-point{background-color:#38bdf8}
.bd-crop-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 18px 18px;border-top:1px solid rgba(148,163,184,.12);background:rgba(2,6,23,.18);flex-shrink:0}
.bd-workspace .bd-crop-secondary,.bd-workspace .bd-crop-primary{min-height:46px;padding:0 20px;font-size:13px;font-weight:900;border-radius:15px;color:#fff;transition:filter .15s,transform .15s}
.bd-workspace .bd-crop-secondary{background:rgba(71,85,105,.66);border:1px solid rgba(148,163,184,.22)}
.bd-workspace .bd-crop-primary{background:linear-gradient(135deg,rgba(37,99,235,.98),rgba(14,165,233,.84));border:1px solid rgba(125,211,252,.35);box-shadow:0 16px 36px rgba(14,165,233,.16)}
.bd-workspace :is(.bd-crop-primary,.bd-crop-secondary):hover{filter:brightness(1.1);transform:translateY(-1px)}
.bd-workspace .bd-crop-primary:disabled{opacity:.5;cursor:wait}
@media(max-width:760px){
    .bd-create-overlay{padding:10px}
    .bd-create-dialog{width:min(100%,680px)}
    .bd-crop-dialog{border-radius:20px;width:100%;max-height:calc(100dvh - 16px)}
    .bd-crop-body{padding:12px}
    .bd-crop-stage{padding:8px;border-radius:16px}
    .bd-crop-canvas{height:44dvh;min-height:240px;border-radius:12px}
    .bd-crop-head{padding:14px}
    .bd-crop-headline h2{font-size:20px}
    .bd-crop-icon{width:42px;height:42px;border-radius:13px}
    .bd-crop-footer{padding:12px}
    .bd-workspace .bd-crop-secondary,.bd-workspace .bd-crop-primary{flex:1;padding:0 10px}
}
@media(max-width:560px){
    .bd-create-overlay:not(.bd-crop-overlay){padding:0}
    .bd-create-dialog{max-height:100dvh;height:100dvh;width:100%;border:0;border-radius:0}
    .bd-create-head{padding:18px 54px 9px;min-height:64px}
    .bd-create-head h2{font-size:22px}
    .bd-create-form{padding:14px 16px max(18px,env(safe-area-inset-bottom));gap:22px}
    .bd-create-thumb-row{margin-top:6px}
    .bd-create-media-group{padding:16px 12px}
    .bd-create-actions{margin-top:auto;padding-top:15px}
}
html[data-theme="light"] .bd-create-overlay{background:rgba(24,36,53,.6)}
html[data-theme="light"] .bd-create-dialog{background:linear-gradient(140deg,#fff,#f6f8fc);color:#1f2937;border-color:#b6c2d2}
html[data-theme="light"] .bd-create-head h2{color:#1c2a3e}
html[data-theme="light"] .bd-workspace .bd-create-close{background:#eff3f8;color:#35475e;border-color:#cbd5e1}
html[data-theme="light"] .bd-create-thumb{background:#f1f5f9;color:#64748b;border-color:#94a3b8}
html[data-theme="light"] .bd-create-field,html[data-theme="light"] .bd-create-media-group h3{color:#485c74}
html[data-theme="light"] .bd-workspace .bd-create-field input[type=text],html[data-theme="light"] .bd-workspace .bd-create-field input[type=number]{background:#fff;color:#1b2a41;border-color:#a7b6c9}
html[data-theme="light"] .bd-create-media-group{background:#edf2f7;border-color:#cbd5e1}
html[data-theme="light"] .bd-create-video-pick{background:#fff;color:#24394f;border-color:#a9b8ca}
html[data-theme="light"] .bd-create-media-group #bd-video-file-name{color:#526782}
/* Crop window intentionally stays dark even in light mode to judge images well. */
html[data-theme="light"] .bd-crop-overlay{background:rgba(4,9,18,.83)}

/* Full-screen Asset Breakdown editor: Edit opens a separate workspace instead
   of expanding the episode in the project list. Chevron expansion is unchanged. */
.bd-workspace.bd-editor-active{overflow:hidden}
.bd-editor-overlay{position:fixed;inset:0;z-index:46000;width:100vw;height:100dvh;background:var(--bd-bg);color:var(--bd-text);display:flex;flex-direction:column;overflow:hidden;overscroll-behavior:contain}
.bd-editor-window{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;background:var(--bd-bg)}
.bd-editor-window-header{flex:none;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 24px;min-height:72px;border-bottom:1px solid var(--bd-border);background:var(--bd-panel);padding-top:max(14px,env(safe-area-inset-top))}
.bd-editor-window-ident{min-width:0;display:flex;flex-direction:column;gap:2px}
.bd-editor-window-eyebrow{font-size:10px;font-weight:800;letter-spacing:.12em;color:var(--bd-accent)}
.bd-editor-window-header h1{margin:0;font-size:20px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--bd-text)}
.bd-workspace .bd-editor-window-close{flex:none;display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:39px;padding:7px 15px;border:1px solid var(--bd-border);background:var(--bd-input);color:var(--bd-text);font-weight:700;border-radius:8px}
/* Keep the editor header focused on navigation; drawing lives in the transport row. */
.bd-editor-window-actions{display:flex;align-items:center;justify-content:flex-end;flex:none;gap:10px}
.bd-editor-view-only{font-size:12px;color:var(--bd-muted);font-weight:650}
.bd-player-drawing .bd-video-draw-instruction{display:block}
.bd-video-draw-instruction{position:absolute;z-index:4;top:12px;left:12px;max-width:calc(100% - 24px);display:none;padding:7px 12px;border-radius:6px;background:rgba(5,19,36,.87);color:#fff;border:1px solid #38bdf8;font-weight:750;font-size:12px;pointer-events:none;text-align:center}
.bd-workspace .bd-player-draw-button{min-height:42px;padding:8px 15px;background:#7c3aed;border-color:#a78bfa}
/* The Draw control becomes Cancel while the video overlay captures a box. */
.bd-workspace .bd-player-draw-button.is-cancel-drawing{background:#7f1d1d;border-color:#f87171;color:#fff}
.bd-workspace .bd-player-draw-button.is-cancel-drawing:hover{background:#991b1b}

@media(max-width:767px){.bd-editor-window-actions{gap:7px}.bd-video-draw-instruction{left:8px;top:8px;font-size:11px}.bd-editor-view-only{font-size:11px}}
.bd-editor-window-content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:18px 24px max(28px,env(safe-area-inset-bottom))}
.bd-editor-window-content .bd-episode-detail{background:transparent;border:0;padding:0;width:100%}
.bd-editor-window-content .bd-layout{grid-template-columns:minmax(0,1fr) minmax(260px,320px);gap:20px}
.bd-editor-window-content .bd-player{max-height:calc(100dvh - 230px)}
.bd-editor-window.bd-player-maximized .bd-layout{grid-template-columns:minmax(0,1fr)}
.bd-editor-window.bd-player-maximized .bd-player{max-height:none;max-width:100%;height:min(76dvh,calc(100vw * 9 / 16));aspect-ratio:auto}
.bd-editor-window.bd-player-maximized .bd-assets{max-width:none}
@media(max-width:1000px){.bd-editor-window-content .bd-layout{grid-template-columns:minmax(0,1fr)}.bd-editor-window-content .bd-player{max-height:65dvh}}
@media(max-width:767px){
    .bd-editor-window-header{min-height:62px;padding:10px 13px;padding-top:max(10px,env(safe-area-inset-top));gap:7px}
    .bd-editor-window-eyebrow{font-size:9px}
    .bd-editor-window-header h1{font-size:15px}
    .bd-workspace .bd-editor-window-close{min-height:36px;padding:6px 10px;gap:6px;font-size:12px}
    .bd-editor-window-content{padding:12px 10px max(22px,env(safe-area-inset-bottom))}
    .bd-editor-window-content .bd-player{max-height:58dvh}
    .bd-editor-window.bd-player-maximized .bd-player{height:min(67dvh,calc(100vw * 9 / 16))}
}

/* Asset window: circular close icon matching Records & Payments. */
.bd-workspace .bd-editor-window-close.bd-asset-window-close{width:40px;height:40px;min-width:40px;min-height:40px;padding:0;gap:0;border-radius:50%;border:1px solid rgba(255,255,255,.1);background:rgba(0,0,0,.5);color:#9ca3af;line-height:1;transition:background .15s ease,color .15s ease}
.bd-workspace .bd-editor-window-close.bd-asset-window-close:hover{background:rgba(0,0,0,.7);color:#fff;border-color:rgba(255,255,255,.18)}
.bd-asset-window-close svg{display:block;flex:none;pointer-events:none}
html[data-theme="light"] .bd-workspace .bd-editor-window-close.bd-asset-window-close{background:rgba(15,23,42,.06);border-color:rgba(15,23,42,.15);color:#52647b}
html[data-theme="light"] .bd-workspace .bd-editor-window-close.bd-asset-window-close:hover{background:rgba(15,23,42,.12);color:#192c43}

/* Season workflow: a season is one assignment-style row, and each real
   episode is a selectable tile, rather than one static "Animatic" tile. */
.bd-season-card .bd-stage-tabs.assignment-stage-track{
    display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;
    justify-content:flex-start;min-width:0;scrollbar-width:thin;scrollbar-color:#66768b transparent;
    padding:5px 3px 12px;
}
.bd-season-card .bd-stage-tab.assignment-stage-step{flex:0 0 88px;min-width:88px;max-width:88px}
.bd-season-card .bd-stage-tab:not(.assignment-stage-selected){opacity:.77}
.bd-season-card .bd-stage-tab.assignment-stage-selected{border:2px solid #c9d6e5;box-shadow:inset 0 3px 0 var(--stage-status-accent),0 0 0 2px rgba(255,255,255,.15);opacity:1}
.bd-season-card .bd-stage-episode-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;font-size:11px;line-height:1.3;font-weight:800}
.bd-season-card .bd-stage-panel .assignment-selected-stage-pointer{left:clamp(14px,calc(39px + var(--bd-selected-index,0)*94px - var(--bd-scroll-offset,0px)),calc(100% - 24px))}
.bd-workspace .bd-season-card .bd-add-episode-tile{flex:0 0 66px;min-width:66px;width:66px;height:50px;min-height:50px;padding:0;border:1px dashed #728197;background:#333d49;color:#93c5fd;border-radius:7px;font-size:24px;font-weight:600}
.bd-workspace .bd-season-card .bd-add-episode-tile:hover{background:#253c57;border-color:#60a5fa}
.bd-episode-season-name{margin:0;color:#93c5fd;font-weight:800;text-align:center;font-size:12px}
.bd-season-dialog{width:min(100%,540px)}
.bd-season-dialog .bd-create-form{padding-top:28px}
html[data-theme="light"] .bd-season-card .bd-stage-tab.assignment-stage-selected{border-color:#3573ba;box-shadow:inset 0 3px 0 var(--stage-status-accent),0 0 0 2px rgba(37,99,235,.12)}
html[data-theme="light"] .bd-workspace .bd-season-card .bd-add-episode-tile{background:#edf3fa;color:#1d4ed8;border-color:#a8b6c7}
html[data-theme="light"] .bd-episode-season-name{color:#1e40af}
@media(max-width:767px){
    .bd-season-card .bd-stage-tab.assignment-stage-step{flex-basis:70px;min-width:70px;max-width:70px;height:46px;min-height:46px}
    .bd-workspace .bd-season-card .bd-add-episode-tile{flex-basis:48px;min-width:48px;width:48px;height:46px;min-height:46px}
    .bd-season-card .bd-stage-panel .assignment-selected-stage-pointer{left:clamp(14px,calc(31px + var(--bd-selected-index,0)*76px - var(--bd-scroll-offset,0px)),calc(100% - 24px))}
    .bd-season-card .bd-stage-episode-name{font-size:10px}
}

.bd-season-card .bd-episode-thumb{position:relative}
.bd-season-card .bd-season-number{font-size:58px;font-weight:900;line-height:1;color:#fff}
.bd-season-card .bd-season-index{position:absolute;top:6px;left:7px;background:rgba(13,23,37,.84);color:#fff;padding:1px 7px;border:1px solid rgba(255,255,255,.4);border-radius:6px;font-size:13px;font-weight:900}
@media(max-width:767px){.bd-season-card .bd-season-number{font-size:34px}}

/* Season options: same placement and 32px three-dot trigger as Asset's
   assignment menu. Bring only the active card forward so the popup cannot be
   clipped by its row or covered by the season below it. */
.bd-season-card{position:relative;z-index:1}
.bd-season-card.bd-season-menu-open{z-index:90;overflow:visible}
.bd-season-titleline{display:flex;width:100%;align-items:center;justify-content:space-between;gap:7px;min-width:0}
.bd-season-titleline .bd-episode-name{min-width:0;flex:1 1 auto}
.bd-season-actions{position:relative;flex:0 0 auto;z-index:91}
.bd-workspace .bd-season-menu-trigger{display:flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:32px;padding:0;border-radius:8px;background:#252525;border:1px solid #4b5563;color:#d1d5db;box-shadow:0 2px 5px rgba(0,0,0,.17);transition:background .15s ease,color .15s ease,border-color .15s ease}
.bd-workspace .bd-season-menu-trigger:hover{background:#333;color:#fff;border-color:#6b7280}
.bd-workspace .bd-season-menu-trigger[aria-expanded="true"]{border-color:#3b82f6;color:#93c5fd;background:#1f2937}
.bd-season-actions-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:150;width:213px;max-width:calc(100vw - 22px);padding:4px 0;border:1px solid #4b5563;border-radius:12px;background:#262626;box-shadow:0 18px 45px rgba(0,0,0,.65);overflow:hidden;color:#e5e7eb}
.bd-season-actions-menu[hidden]{display:none!important}
.bd-workspace .bd-season-actions-menu button{display:flex;width:100%;align-items:center;gap:12px;text-align:left;border:0;border-radius:0;min-height:41px;padding:10px 12px;background:transparent;color:#e5e7eb;font-size:12px;font-weight:700;line-height:1.35}
.bd-workspace .bd-season-actions-menu button:hover,.bd-workspace .bd-season-actions-menu button:focus-visible{background:#353b45;border-color:transparent}
.bd-season-action-icon{display:flex;flex:0 0 17px;align-items:center;justify-content:center;color:#93c5fd}
.bd-season-menu-divider{height:1px;margin:3px 0;background:#414852}
.bd-workspace .bd-season-actions-menu .bd-season-delete-action{color:#fca5a5}
.bd-workspace .bd-season-actions-menu .bd-season-delete-action .bd-season-action-icon{color:#f87171}
.bd-workspace .bd-season-actions-menu .bd-season-delete-action:hover{background:rgba(153,27,27,.27)}
html[data-theme="light"] .bd-workspace .bd-season-menu-trigger{background:#edf1f7;color:#24364d;border-color:#abbace}
html[data-theme="light"] .bd-workspace .bd-season-menu-trigger[aria-expanded="true"]{color:#1d4ed8;background:#dbeafe;border-color:#60a5fa}
html[data-theme="light"] .bd-season-actions-menu{background:#fff;color:#1e293b;border-color:#b7c5d7;box-shadow:0 14px 32px rgba(15,23,42,.22)}
html[data-theme="light"] .bd-workspace .bd-season-actions-menu button{color:#23354d}
html[data-theme="light"] .bd-workspace .bd-season-actions-menu button:hover,html[data-theme="light"] .bd-workspace .bd-season-actions-menu button:focus-visible{background:#e8f0fb}
html[data-theme="light"] .bd-season-menu-divider{background:#e0e7ef}
html[data-theme="light"] .bd-workspace .bd-season-actions-menu .bd-season-delete-action{color:#b91c1c}
html[data-theme="light"] .bd-workspace .bd-season-actions-menu .bd-season-delete-action:hover{background:#fee2e2}
@media(max-width:767px){
    .bd-season-actions-menu{top:calc(100% + 5px);right:0}
    .bd-workspace .bd-season-menu-trigger{width:32px;height:32px;min-height:32px}
}

/* Asset Breakdown episode assignment: reuse the existing Asset stage-assignee
   pill/avatar/availability colours with its own floating, non-reflowing menu. */
.bd-stage-overview{grid-template-columns:minmax(130px,1.5fr) minmax(110px,.8fr) minmax(192px,1.5fr) auto}
.bd-stage-assignee{position:relative;display:flex;align-items:center;min-width:0;padding:7px 10px;border-left:1px solid rgba(107,114,128,.34)}
.bd-stage-assignee .bd-assignee-picker{width:min(100%,230px)}
.bd-workspace .bd-assignee-picker .assignment-stage-assignee-trigger{height:36px;min-height:36px;border-radius:9px;padding:0 9px;display:flex;align-items:center;gap:8px}
.bd-assignee-empty{font-size:11px;color:var(--bd-muted)}
#bd-assignee-overlay-root{position:fixed;inset:0;z-index:47000;pointer-events:none}
/* Mirror the Asset stage picker: no forced 230px minimum or detached rounded
   popup. The body-level menu joins the trigger at precisely the same width. */
#bd-assignee-overlay-root .assignment-stage-assignee-menu{display:block;position:fixed;top:auto;right:auto;bottom:auto;max-height:252px;pointer-events:auto;z-index:1;min-width:0;box-sizing:border-box;border:1px solid #65717e;border-top-color:#3d444c;border-radius:0 0 9px 9px}
#bd-assignee-overlay-root .assignment-stage-assignee-menu.is-dropup{border-top-color:#65717e;border-bottom-color:#3d444c;border-radius:9px 9px 0 0}
.bd-workspace .bd-assignee-picker.is-dropup .assignment-stage-assignee-trigger{border-radius:0 0 9px 9px;border-top-color:#3d444c;border-bottom-color:#65717e}
.bd-workspace .bd-assignee-picker.is-open:not(.is-dropup) .assignment-stage-assignee-trigger{border-radius:9px 9px 0 0;border-bottom-color:#3d444c}
#bd-assignee-overlay-root .assignment-stage-assignee-option{border:0;border-radius:0;text-align:left;cursor:pointer}
.bd-workspace .bd-assignee-picker.is-readonly .assignment-stage-assignee-trigger{opacity:.86;cursor:default}
@media(max-width:1050px){
    .bd-stage-overview{grid-template-columns:minmax(110px,1fr) minmax(108px,1fr) minmax(160px,1fr) auto}
}
@media(max-width:767px){
    .bd-stage-overview{grid-template-columns:minmax(90px,1fr) minmax(100px,1fr) auto;grid-template-rows:auto auto}
    .bd-stage-progress{grid-column:1;grid-row:1}
    .bd-stage-status{grid-column:2;grid-row:1}
    .bd-stage-assignee{grid-column:1/3;grid-row:2;border-top:1px solid rgba(107,114,128,.34);border-left:0;padding:6px 8px;min-width:0}
    .bd-stage-actions{grid-column:3;grid-row:1/3}
    .bd-stage-assignee .bd-assignee-picker{width:min(100%,220px)}
}
html[data-theme="light"] .bd-stage-assignee{border-color:#d2dbe7}
html[data-theme="light"] .bd-workspace .bd-assignee-picker .assignment-stage-assignee-trigger{background:#f5f7fb;color:#25354a;border-color:#b3bfd0}
html[data-theme="light"] #bd-assignee-overlay-root .assignment-stage-assignee-menu{background:#fff;color:#1e293b;border-color:#b3bfd0}
html[data-theme="light"] #bd-assignee-overlay-root .assignment-stage-assignee-option{color:#1e293b}
html[data-theme="light"] #bd-assignee-overlay-root .assignment-stage-assignee-option:hover{background:#e4ecf7}
html[data-theme="light"] #bd-assignee-overlay-root .assignment-stage-assignee-option.is-selected{background:#bfdbfe;color:#14263c}

/* Season rows are self-contained: episode tabs and Asset/Shots actions
   remain available directly in the row, without a duplicate details panel. */
.bd-workspace .bd-season-card{overflow:visible}

/* Dedicated shot-range editor, reusing each episode's original animatic. */
.bd-editor-window-content.bd-shots-window-content{overflow:hidden;padding:18px clamp(10px,5.4vw,112px) 22px}
.bd-shots-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,320px);gap:22px;max-width:none;width:100%;margin:auto;height:100%;min-height:0;align-items:stretch}
.bd-shots-layout.bd-shot-panel-collapsed{grid-template-columns:minmax(0,1fr)}
.bd-shots-main{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;overscroll-behavior:contain}
.bd-shots-heading{flex:none;display:flex;align-items:center;justify-content:flex-end;gap:14px;margin-bottom:10px}
.bd-shot-hint{color:var(--bd-muted);font-size:12px;line-height:1.6;margin:5px 0 10px}
.bd-shot-fps-label{display:flex;flex-direction:column;gap:4px;flex:none;font-size:11px;font-weight:750}
.bd-workspace .bd-shot-fps-label input{width:98px;min-height:34px}
.bd-editor-window-content .bd-shots-player{flex:1;min-height:0;height:auto;max-height:none;aspect-ratio:auto;border-radius:9px 9px 0 0}
.bd-shots-transport{flex:none;margin:0;min-width:0;box-sizing:border-box;padding:12px;background:var(--bd-panel);border:1px solid var(--bd-border);border-radius:0 0 9px 9px}
.bd-shot-readout{display:flex;justify-content:space-between;gap:8px;font:11px ui-monospace,monospace;color:var(--bd-muted);margin-bottom:8px;flex-wrap:wrap}
.bd-shot-seek-label{display:flex;gap:10px;align-items:center;font-size:11px;color:var(--bd-muted)}
.bd-shots-layout input[type="range"]{accent-color:var(--bd-accent);width:100%;min-width:0;height:24px;cursor:pointer}
.bd-shot-track{position:relative;height:36px;background:var(--bd-input);border:1px solid var(--bd-border);border-radius:4px;margin:6px 0 12px;overflow:hidden}
.bd-workspace .bd-shot-segment{position:absolute;top:3px;bottom:3px;min-height:0;border:1px solid #60a5fa;background:#1e40af;color:#fff;font-size:10px;padding:2px 3px;border-radius:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bd-workspace .bd-shot-segment.is-selected{background:#7e22ce;border-color:#c084fc}
#bd-shot-selection{position:absolute;top:0;bottom:0;border:2px solid #34d399;background:rgba(52,211,153,.14);pointer-events:none;box-sizing:border-box}
#bd-shot-playhead{position:absolute;top:0;bottom:0;border-left:2px solid #fb7185;pointer-events:none}
.bd-shot-playback{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:10px;align-items:center;margin-top:12px}
.bd-shot-playback .bd-playback-controls{grid-row:1}
.bd-shot-actions-right{grid-column:3;grid-row:1;display:flex;justify-content:flex-end;align-items:center;gap:10px;min-width:0}
.bd-shot-panel-control{flex:none}
.bd-workspace .bd-shot-preview{grid-column:1;grid-row:1;justify-self:start;width:min(220px,100%)}
.bd-workspace .bd-shot-set-end{width:clamp(85px,12vw,220px)}
.bd-workspace #bd-shot-save{flex:none;min-width:102px}
.bd-workspace .bd-shot-actions-right .bd-transport-panel-toggle{width:44px;height:42px;min-width:44px;padding:8px}
.bd-workspace .bd-shot-playback button{font-size:12px;min-height:38px}
.bd-workspace .bd-shot-playback .bd-playback-controls button{width:44px;height:42px;min-height:42px;padding:8px}
.bd-shots-main{container:bd-shots-main / inline-size}
@container bd-shots-main (max-width:430px){
    .bd-shot-playback{row-gap:7px;column-gap:4px}
    .bd-shot-playback .bd-playback-controls{gap:3px}
    .bd-workspace .bd-shot-playback .bd-playback-controls button{width:32px;height:38px;min-height:38px;padding:6px}
    .bd-shot-playback .bd-playback-controls button svg{width:17px;height:17px}
    .bd-workspace .bd-shot-panel-control .bd-transport-panel-toggle{width:38px;height:38px;min-width:38px;min-height:38px;padding:7px}
}
.bd-shot-status{font-size:12px;color:var(--bd-accent);margin:8px 0 0;overflow-wrap:anywhere}
.bd-shot-status:empty{display:none}
.bd-shot-status.is-error{color:#fca5a5}
html[data-theme="light"] .bd-shot-status.is-error{color:#b91c1c}
.bd-shot-sidebar{display:flex;flex-direction:column;background:var(--bd-panel);border:1px solid var(--bd-border);border-radius:9px;padding:12px;min-width:0;min-height:0;overflow:hidden}
.bd-shot-sidebar .bd-panel-toolbar,.bd-shot-sidebar .bd-shot-hint{flex:none}
.bd-shot-sidebar .bd-section-title{margin:0;min-width:0}
.bd-shot-list{display:flex;flex-direction:column;gap:7px;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:10px 3px 3px}
.bd-shot-list .bd-shot-row{flex:none}
.bd-workspace .bd-shot-row{text-align:left;display:flex;flex-direction:column;gap:3px;width:100%;padding:10px 12px;font-size:12px;overflow-wrap:anywhere}
.bd-shot-row span,.bd-shot-row small{font-size:11px;color:var(--bd-muted)}
.bd-workspace .bd-shot-row.is-selected{border-color:var(--bd-accent);background:var(--bd-bg);box-shadow:inset 3px 0 var(--bd-accent)}
.bd-shots-layout [hidden]{display:none!important}
@media(max-width:1000px){
    .bd-shots-layout{position:relative;display:block}
    .bd-shots-main{height:100%}
    .bd-shot-sidebar{position:absolute;z-index:8;top:0;right:0;bottom:0;width:min(360px,90%);max-width:100%;box-shadow:-10px 0 30px rgba(0,0,0,.42);margin:0}
}
@media(max-width:600px){
    .bd-stage-actions{flex-wrap:wrap;max-width:140px}
    .bd-shots-layout{gap:14px}.bd-shots-heading{gap:9px}.bd-shots-heading h2{font-size:15px}.bd-shots-heading p{font-size:11px}
    .bd-shots-transport{padding:8px}
    .bd-workspace .bd-shot-playback button{font-size:11px;min-height:40px;padding:6px 9px}
    .bd-shot-fps-label{font-size:10px}.bd-workspace .bd-shot-fps-label input{width:82px}
}
@media(max-width:600px){
    .bd-editor-window-content.bd-shots-window-content{padding:10px 10px max(10px,env(safe-area-inset-bottom))}
    .bd-shot-playback{display:flex;justify-content:space-between;gap:6px;overflow-x:auto;overscroll-behavior:contain;padding-bottom:2px}
    .bd-shot-playback .bd-playback-controls{flex:none;gap:3px}
    .bd-shot-actions-right{flex:none;gap:4px}
    .bd-workspace .bd-shot-preview{flex:none;width:auto;min-width:64px;padding:6px;font-size:10px}
    .bd-workspace .bd-shot-set-end{flex:none;width:auto;min-width:50px;padding:6px;font-size:10px}
    .bd-workspace #bd-shot-save{min-width:58px;padding:6px;font-size:10px}
    .bd-workspace .bd-shot-actions-right .bd-transport-panel-toggle{width:30px;min-width:30px;height:38px;padding:5px}
    .bd-workspace .bd-shot-playback .bd-playback-controls button{width:28px;height:38px;min-height:38px;padding:5px}
}

/* A saved asset box belongs to one frame; no editable time range. */
.bd-mark-frame{font-size:12px;font-weight:700;color:var(--bd-accent);margin:12px 0 0}
/* Draw/labels now share the playback row; there is no detached strip below
   the transport. Adapt to the PLAYER width (not the browser width) because
   the adjacent Markups / Assets panel can shrink the player on desktop. */
.bd-editor-window-content .bd-main{container:bd-asset-main / inline-size}
@container bd-asset-main (max-width:800px){
    /* Keep the list chevron level with Play/Pause even on narrow players. */
    .bd-playback{grid-template-columns:minmax(0,1fr) auto 44px;row-gap:4px}
    .bd-player-actions{grid-column:1;grid-row:1;flex-wrap:wrap;white-space:normal}
    .bd-playback-controls{grid-column:2;grid-row:1}
    .bd-playback-meta{display:contents}
    .bd-playback-meta output{grid-column:1/-1;grid-row:2;justify-self:end}
    .bd-playback-meta .bd-transport-panel-toggle{grid-column:3;grid-row:1;justify-self:end;margin:0}
}
@container bd-asset-main (max-width:430px){
    .bd-playback{grid-template-columns:minmax(0,1fr) auto 38px;column-gap:4px}
    .bd-player-actions{gap:4px}
    .bd-player-actions .bd-show-labels-text{display:none}
    .bd-workspace .bd-player-draw-button{font-size:11px;padding:6px 7px;min-height:38px}
    .bd-workspace .bd-player-move-button{font-size:10px;padding:6px 7px;min-height:38px}
    .bd-workspace .bd-playback-controls button{width:32px;height:38px;min-height:38px;padding:6px}
    .bd-playback-controls button svg{width:17px;height:17px}
    .bd-playback-controls{gap:3px}
    .bd-workspace .bd-playback-meta .bd-transport-panel-toggle{width:38px;min-width:38px;height:38px;min-height:38px;padding:7px}
    .bd-playback output{font-size:10px}
}


/* Episode markups belong in the right-hand asset panel, not below the video.
   The mark list gets its own scroll area when a long animatic has many boxes. */
.bd-sidebar-marks{min-width:0;margin-top:17px;padding-top:13px;border-top:1px solid var(--bd-border)}
.bd-sidebar-marks .bd-section-title{margin:0 0 10px}
.bd-sidebar-marks .bd-marks{min-width:0;max-height:min(48dvh,440px);overflow-y:auto;overscroll-behavior:contain;padding-right:3px}
.bd-sidebar-marks .bd-mark-row{width:100%;min-width:0;gap:8px;padding:9px 10px;font-size:12px}
.bd-sidebar-marks .bd-mark-row>span:first-child{min-width:0;flex:1}
.bd-sidebar-marks .bd-mark-row>span:last-child{flex:none;text-align:right}
.bd-sidebar-marks .bd-muted{margin:3px 0 0}

/* Asset mark/edit form is a compact centered modal, never an inline panel.
   During rectangle creation it is hidden, leaving the full video usable. */
.bd-editor-overlay .bd-mark-dialog-slot{position:absolute;inset:0;z-index:8;pointer-events:none}
.bd-mark-dialog-slot:empty{display:none}
.bd-mark-dialog-backdrop{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;padding:16px;background:rgba(5,10,18,.73);pointer-events:auto;box-sizing:border-box}
.bd-mark-dialog-backdrop[hidden]{display:none!important}
.bd-workspace .bd-mark-dialog-card{width:min(640px,100%);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;margin:0;padding:22px 24px;background:var(--bd-panel);border:1px solid var(--bd-border);border-radius:14px;box-shadow:0 24px 80px rgba(0,0,0,.45);box-sizing:border-box}
.bd-mark-dialog-header{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:16px}
.bd-mark-dialog-header h2{font-size:19px;margin:0;color:var(--bd-text)}
.bd-workspace .bd-mark-dialog-close{min-width:38px;width:38px;height:38px;min-height:38px;display:inline-flex;align-items:center;justify-content:center;padding:0;border-radius:9px;font-size:25px;line-height:1;color:var(--bd-text);background:var(--bd-input)}
.bd-mark-dialog-card .bd-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.bd-mark-dialog-card .bd-editor-actions{margin-top:20px}
@media(max-width:600px){
    .bd-mark-dialog-backdrop{align-items:center;padding:10px}
    .bd-workspace .bd-mark-dialog-card{padding:16px;max-height:calc(100dvh - 20px);border-radius:11px}
    .bd-mark-dialog-header h2{font-size:17px}
    .bd-mark-dialog-card .bd-fields{grid-template-columns:minmax(0,1fr);gap:10px}
    .bd-mark-dialog-card .bd-editor-actions>*{flex:1 1 auto}
}


/* Asset Breakdown editor: fixed-height video workspace with an independent,
   collapsible right-hand Markups / Assets list. Hundreds of rows cannot
   increase the dialog height. Shots editor is intentionally unaffected. */
.bd-editor-window-content.bd-asset-window-content{overflow:hidden}
.bd-editor-window-content .bd-episode-detail{height:100%;min-height:0;display:flex;flex-direction:column}
.bd-editor-window-content .bd-layout{flex:1;min-height:0;align-items:stretch;grid-template-columns:minmax(0,1fr) minmax(260px,320px)}
.bd-editor-window-content .bd-layout.bd-panel-collapsed{grid-template-columns:minmax(0,1fr)}
.bd-editor-window-content .bd-main{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.bd-editor-window-content .bd-assets{min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:12px}
.bd-editor-window-content .bd-assets[hidden]{display:none!important}
.bd-panel-toolbar{flex:none;display:flex;align-items:center;justify-content:space-between;gap:7px;padding-bottom:11px;border-bottom:1px solid var(--bd-border)}
.bd-panel-tabs{display:flex;align-items:center;gap:5px;min-width:0;flex:1}
.bd-workspace .bd-panel-tab{display:inline-flex;align-items:center;gap:5px;justify-content:center;min-height:36px;padding:6px 9px;font-size:12px;white-space:nowrap;background:transparent;border-color:transparent;color:var(--bd-muted)}
.bd-workspace .bd-panel-tab.is-active{background:var(--bd-input);color:var(--bd-text);border-color:var(--bd-border);font-weight:750}
.bd-panel-tab>span{font-size:10px;color:var(--bd-accent)}
.bd-workspace .bd-panel-minimize{flex:none;min-width:36px;width:36px;height:36px;min-height:36px;padding:7px;display:flex;align-items:center;justify-content:center}
/* Animation-style list chevron is the last control on the playback row.
   It stays present in both states: its arrow and accessible name switch in place. */
.bd-workspace .bd-transport-panel-toggle,.bd-workspace .bd-empty-panel-toggle{
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  width:44px;height:44px;min-width:44px;min-height:44px;padding:9px;
  background:var(--bd-input);border:1px solid #586174;border-radius:8px;color:var(--bd-text);
  cursor:pointer;box-sizing:border-box
}
.bd-workspace .bd-transport-panel-toggle:hover,.bd-workspace .bd-transport-panel-toggle:focus-visible,
.bd-workspace .bd-empty-panel-toggle:hover,.bd-workspace .bd-empty-panel-toggle:focus-visible{
  border-color:var(--bd-accent);background:var(--bd-panel);outline-offset:2px
}
.bd-transport-panel-toggle .bd-chevron-show,.bd-empty-panel-toggle .bd-chevron-show{display:none}
.bd-transport-panel-toggle[aria-expanded="false"] .bd-chevron-show,.bd-empty-panel-toggle[aria-expanded="false"] .bd-chevron-show{display:block}
.bd-transport-panel-toggle[aria-expanded="false"] .bd-chevron-hide,.bd-empty-panel-toggle[aria-expanded="false"] .bd-chevron-hide{display:none}
.bd-workspace .bd-player .bd-empty-panel-toggle{position:absolute;z-index:7;right:12px;bottom:12px}
.bd-panel-toggle-open[hidden],.bd-asset-panel[hidden],.bd-sidebar-marks[hidden]{display:none!important}
/* Large screens use only the transport toggle; the drawer's own chevron
   remains available on touch layouts because the drawer overlays that row. */
@media(min-width:1001px){.bd-workspace .bd-panel-minimize{display:none}}
/* Shared, compact filters stay above the independently scrolling list in both tabs. */
.bd-editor-window-content .bd-panel-filters{flex:none;display:grid;grid-template-columns:minmax(0,1fr);gap:7px;padding:10px 0 8px;min-width:0}
.bd-editor-window-content .bd-panel-filters input,.bd-editor-window-content .bd-panel-filters select{box-sizing:border-box;width:100%;min-width:0;min-height:36px;margin:0;padding:7px 10px;border-radius:7px;background:var(--bd-input);color:var(--bd-text);border:1px solid var(--bd-border);font-size:12px}
.bd-editor-window-content .bd-panel-filters input:focus-visible,.bd-editor-window-content .bd-panel-filters select:focus-visible{outline:2px solid var(--bd-accent);outline-offset:1px}
.bd-editor-window-content .bd-panel-filter-summary{font-size:11px;color:var(--bd-muted);min-height:16px;line-height:16px}
.bd-panel-minimize svg,.bd-panel-toggle-open svg{display:block;flex:none;width:18px;height:18px}
.bd-playback-meta .bd-transport-panel-toggle{margin-left:10px}
.bd-playback-meta .bd-transport-panel-toggle svg{width:21px;height:21px}
.bd-visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;clip-path:inset(50%)}
.bd-editor-window-content .bd-asset-panel{flex:1;min-height:0;display:flex;flex-direction:column;gap:9px;padding-top:10px}
.bd-asset-panel>p{color:var(--bd-muted);font-size:11px;margin:0}
.bd-editor-window-content .bd-asset-panel>input{width:100%;margin:0;flex:none}
.bd-editor-window-content #bd-assets-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:3px}
.bd-editor-window-content .bd-sidebar-marks{flex:1;min-height:0;display:flex;flex-direction:column;margin:0;padding:10px 0 0;border:0}
.bd-editor-window-content .bd-sidebar-marks .bd-marks{flex:1;min-height:0;display:block;max-height:none;overflow-y:auto;overscroll-behavior:contain;padding-right:4px}
.bd-editor-window-content .bd-sidebar-marks .bd-mark-row{display:flex;margin-bottom:7px}
.bd-editor-window.bd-player-maximized .bd-layout:not(.bd-panel-collapsed){grid-template-columns:minmax(0,1fr) minmax(260px,320px)}
.bd-editor-window.bd-player-maximized .bd-layout.bd-panel-collapsed{grid-template-columns:minmax(0,1fr)}
@media(max-width:1000px){
  .bd-editor-window-content .bd-layout,.bd-editor-window.bd-player-maximized .bd-layout:not(.bd-panel-collapsed){position:relative;display:block}
  .bd-editor-window-content .bd-main{height:100%;overflow-y:auto}
  .bd-editor-window-content .bd-assets{position:absolute;z-index:8;top:0;right:0;bottom:0;width:min(360px,90%);max-width:100%;box-shadow:-10px 0 30px rgba(0,0,0,.42);margin:0}
}
@media(max-width:767px){
  .bd-editor-window-content .bd-layout{min-height:0}
}

/* Select an existing frame-specific markup, reposition or resize it, and
   commit only on Save Position. Touch targets work in the video-sized overlay. */
.bd-workspace .bd-player-move-button{background:#223047;border-color:#64748b;color:#e2e8f0;font-weight:700}
.bd-workspace .bd-player-move-button.is-active{background:#7c2d12;border-color:#fb923c;color:#fff}
.bd-workspace .bd-transform-save{background:#166534;border-color:#22c55e;color:#fff;font-weight:750}
.bd-workspace .bd-transform-save[hidden]{display:none!important}
.bd-workspace .bd-player-actions button:disabled{opacity:.5;cursor:not-allowed}
.bd-overlay.bd-transforming{pointer-events:auto;touch-action:none}
.bd-workspace .bd-box-transform{border:2px solid #38bdf8;outline:1px dashed rgba(255,255,255,.85);outline-offset:2px;z-index:4;cursor:move;pointer-events:auto;touch-action:none;overflow:visible}
.bd-workspace .bd-box-transform .bd-box-caption{background:#38bdf8;color:#071827}
.bd-workspace .bd-box-transform .bd-resize-handle{position:absolute;display:block;box-sizing:border-box;width:20px;height:20px;border:2px solid #075985;border-radius:4px;background:#fff;touch-action:none;pointer-events:auto;left:auto;top:auto;max-width:none;padding:0;box-shadow:0 0 0 1px #fff}
.bd-box-transform .bd-handle-nw{left:0!important;top:0!important;transform:translate(-50%,-50%);cursor:nwse-resize}
.bd-box-transform .bd-handle-n{left:50%!important;top:0!important;transform:translate(-50%,-50%);cursor:ns-resize}
.bd-box-transform .bd-handle-ne{right:0;top:0!important;transform:translate(50%,-50%);cursor:nesw-resize}
.bd-box-transform .bd-handle-e{right:0;top:50%!important;transform:translate(50%,-50%);cursor:ew-resize}
.bd-box-transform .bd-handle-se{right:0;bottom:0;transform:translate(50%,50%);cursor:nwse-resize}
.bd-box-transform .bd-handle-s{left:50%!important;bottom:0;transform:translate(-50%,50%);cursor:ns-resize}
.bd-box-transform .bd-handle-sw{left:0!important;bottom:0;transform:translate(-50%,50%);cursor:nesw-resize}
.bd-box-transform .bd-handle-w{left:0!important;top:50%!important;transform:translate(-50%,-50%);cursor:ew-resize}
.bd-video-transform-instruction{position:absolute;left:12px;bottom:12px;z-index:5;pointer-events:none;background:rgba(2,6,23,.84);color:white;padding:8px 10px;border-radius:7px;font-size:12px;max-width:calc(100% - 24px)}
.bd-video-transform-instruction[hidden]{display:none!important}
@container bd-asset-main (max-width:800px){.bd-player-actions{flex-wrap:wrap;row-gap:5px}}
@container bd-asset-main (max-width:430px){.bd-workspace .bd-player-move-button,.bd-workspace .bd-transform-save{font-size:11px;padding:7px 8px;min-height:40px}}

/* Asset player: landscape phones have much less vertical space than 16:9.
   The maximized video must consume the space LEFT AFTER the header and
   transport, not a percentage of the entire viewport. The video keeps its
   intrinsic aspect ratio (including portrait animatics) using object-fit. */
@media (orientation:landscape) and (max-height:650px){
  .bd-editor-window.bd-player-maximized .bd-editor-window-header{
    min-height:0;padding:4px max(9px,env(safe-area-inset-right)) 4px max(9px,env(safe-area-inset-left));
  }
  .bd-editor-window.bd-player-maximized .bd-editor-window-ident{gap:0}
  .bd-editor-window.bd-player-maximized .bd-editor-window-eyebrow{font-size:8px;line-height:1.15}
  .bd-editor-window.bd-player-maximized .bd-editor-window-header h1{font-size:13px;line-height:1.2}
  .bd-workspace .bd-editor-window.bd-player-maximized .bd-asset-window-close{
    width:34px;height:34px;min-width:34px;min-height:34px;
  }
  .bd-editor-window.bd-player-maximized .bd-asset-window-content{
    min-height:0;padding:4px max(6px,env(safe-area-inset-right))
      max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));
  }
  .bd-editor-window.bd-player-maximized .bd-layout,
  .bd-editor-window.bd-player-maximized .bd-layout:not(.bd-panel-collapsed){
    position:relative;display:block;height:100%;min-height:0;
  }
  .bd-editor-window.bd-player-maximized .bd-main{
    display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;
  }
  .bd-editor-window.bd-player-maximized .bd-player{
    flex:1 1 0%;height:0;min-height:0;max-height:none;max-width:100%;
    aspect-ratio:auto;
  }
  .bd-editor-window.bd-player-maximized .bd-player > video{
    width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;
  }
  .bd-editor-window.bd-player-maximized .bd-transport{
    flex:none;padding:4px 8px;
  }
  .bd-editor-window.bd-player-maximized .bd-transport .bd-timeline input[type="range"]{
    height:14px;
  }
  .bd-editor-window.bd-player-maximized .bd-timeline-marks{
    height:12px;margin:-2px 7px 2px;
  }
  .bd-editor-window.bd-player-maximized .bd-playback{gap:5px}
  .bd-workspace .bd-editor-window.bd-player-maximized .bd-playback-controls button{
    width:40px;height:40px;min-height:40px;padding:7px;
  }
  .bd-workspace .bd-editor-window.bd-player-maximized .bd-transport-panel-toggle{
    width:40px;height:40px;min-width:40px;min-height:40px;padding:7px;
  }
  .bd-workspace .bd-editor-window.bd-player-maximized .bd-player-actions button{
    min-height:38px;padding:5px 8px;font-size:11px;
  }
  /* A short landscape viewport cannot spare a second row of transport tools. */
  .bd-editor-window.bd-player-maximized .bd-player-actions{
    gap:5px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;
  }
  .bd-editor-window.bd-player-maximized .bd-player-actions::-webkit-scrollbar{display:none}
  /* Keep the list as a drawer rather than shrinking the video width. */
  .bd-editor-window.bd-player-maximized .bd-assets{
    position:absolute;z-index:8;top:0;right:0;bottom:0;
    width:min(360px,75vw);max-width:100%;margin:0;
    box-shadow:-10px 0 30px rgba(0,0,0,.42);
  }
}
@media (orientation:landscape) and (max-height:650px) and (max-width:740px){
  .bd-editor-window.bd-player-maximized .bd-show-labels-text{display:none}
  .bd-editor-window.bd-player-maximized .bd-playback-controls{gap:4px}
}

/* Episode work timer: independently tracks mandays; does not control animatic playback. */
.bd-stage-progress .bd-work-time{display:flex;align-items:center;gap:7px;min-width:0;margin-top:3px}
.bd-stage-status .bd-work-toggle{border:1px solid #4b5563;background:#222;color:#4ade80;min-width:30px;min-height:30px;border-radius:7px;display:flex;flex:none;align-items:center;justify-content:center;width:30px;height:30px;padding:6px;cursor:pointer}
.bd-stage-status .bd-work-toggle svg{width:17px;height:17px}
.bd-stage-status .bd-work-toggle.is-running{color:#facc15;border-color:#64748b;background:#222}
.bd-stage-status .bd-work-toggle:disabled{opacity:.48;cursor:wait}
.bd-stage-progress .bd-work-progress{min-width:0;flex:1;display:flex;flex-direction:column;gap:5px}
.bd-stage-progress .bd-work-label{font-size:10px;color:#dbeafe;white-space:nowrap;font-variant-numeric:tabular-nums}
.bd-stage-progress .bd-work-label.is-overdue{color:#fca5a5}
.bd-stage-progress .bd-work-track{width:100%;height:4px;background:#18212b;border-radius:6px;overflow:hidden}
.bd-stage-progress .bd-work-track i{display:block;height:100%;background:#3b82f6}
.bd-stage-status .bd-work-control{display:flex;flex:none;align-items:center}
html[data-theme="light"] .bd-stage-progress .bd-work-label{color:#2f4a70}
html[data-theme="light"] .bd-stage-progress .bd-work-label.is-overdue{color:#b91c1c}
html[data-theme="light"] .bd-stage-status .bd-work-toggle{color:#15803d;background:#f8fafc;border-color:#cbd5e1}
html[data-theme="light"] .bd-stage-status .bd-work-toggle.is-running{color:#a16207}
@media(max-width:767px){
    .bd-stage-progress .bd-work-time{gap:4px;flex-wrap:wrap}
    .bd-stage-status .bd-work-toggle{width:28px;min-width:28px;height:28px;min-height:28px}
    .bd-stage-progress .bd-work-label{font-size:9px}
    .bd-stage-progress .bd-work-progress{flex-basis:78px}
}

/* Keep the work timer readable on narrow episode cards. */
.bd-stage-progress .bd-work-label{white-space:normal;overflow-wrap:anywhere;line-height:1.3}
@media(max-width:767px){
  .bd-stage-overview.bd-stage-has-work-timer{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto}
  .bd-stage-has-work-timer .bd-stage-progress{grid-column:1;grid-row:1}
  .bd-stage-has-work-timer .bd-stage-status{grid-column:1;grid-row:2;border-left:0;border-top:1px solid rgba(107,114,128,.34)}
  .bd-stage-has-work-timer .bd-stage-assignee{grid-column:1;grid-row:3}
  .bd-stage-has-work-timer .bd-stage-actions{grid-column:2;grid-row:1/4}
  .bd-stage-has-work-timer .bd-work-progress{flex-basis:auto}
}

/* Asset review workspace: separate editing tools from frame navigation. */
.bd-asset-editor-window{
  --bd-bg:#171c24;--bd-panel:#202731;--bd-input:#283241;--bd-border:#3e4b5e;
  --bd-text:#eef2f8;--bd-muted:#a2afc2;background:var(--bd-bg)
}
html[data-theme="light"] .bd-asset-editor-window{
  --bd-bg:#edf2f7;--bd-panel:#fff;--bd-input:#f3f6fa;--bd-border:#cbd5e1;
  --bd-text:#1e293b;--bd-muted:#64748b
}
.bd-asset-editor-window .bd-editor-window-header{
  background:var(--bd-panel);border-bottom:1px solid var(--bd-border);gap:16px
}
.bd-asset-editor-window .bd-editor-window-ident{gap:4px}
.bd-asset-editor-window .bd-editor-window-eyebrow{letter-spacing:.11em;line-height:1.4}
.bd-asset-editor-window .bd-asset-window-content{padding:18px;background:var(--bd-bg)}
.bd-asset-editor-window .bd-layout{gap:18px}
.bd-asset-editor-window .bd-main{display:flex;flex-direction:column;min-height:0}
.bd-asset-editor-window .bd-player{
  flex:1 1 auto;min-height:180px;max-height:calc(100dvh - 255px);
  border-radius:12px 12px 0 0;border:1px solid var(--bd-border);border-bottom:0;
  box-sizing:border-box
}
.bd-asset-editor-window .bd-transport{
  flex:none;padding:12px 14px;border-radius:0 0 12px 12px;background:var(--bd-panel);
  box-shadow:0 10px 24px rgba(0,0,0,.12)
}
.bd-asset-editor-window .bd-timeline input[type="range"]{height:24px;cursor:pointer}
.bd-asset-editor-window .bd-timeline-marks{margin-bottom:10px}
.bd-asset-editor-window .bd-playback{
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:10px 12px
}
.bd-asset-editor-window .bd-player-actions{
  grid-column:1/-1;grid-row:1;flex-wrap:wrap;gap:8px;white-space:normal;
  padding:0 0 10px;border-bottom:1px solid var(--bd-border);align-items:center
}
.bd-workspace .bd-asset-editor-window .bd-player-actions button{
  height:40px;min-height:40px;padding:7px 11px;border-radius:8px;
  font-size:12px;font-weight:650;line-height:1.2
}
.bd-workspace .bd-asset-editor-window .bd-player-draw-button:not(.is-cancel-drawing){
  background:#4f46e5;border-color:#756ef0;color:#fff
}
.bd-workspace .bd-asset-editor-window .bd-player-move-button:not(.is-active){
  background:var(--bd-input);border-color:var(--bd-border);color:var(--bd-text)
}
.bd-asset-editor-window .bd-player-actions label{margin-left:auto;min-height:40px;font-size:12px;gap:7px}
.bd-asset-editor-window .bd-player-actions input[type="checkbox"]{width:16px;height:16px;flex:none}
.bd-asset-editor-window .bd-player-actions .bd-show-labels-text{display:inline}
.bd-asset-editor-window .bd-playback-controls{grid-column:2;grid-row:2;gap:8px}
.bd-workspace .bd-asset-editor-window .bd-playback-controls button{
  width:42px;min-width:42px;height:42px;min-height:42px;padding:9px;border-radius:8px
}
.bd-asset-editor-window .bd-playback-controls button svg{width:19px;height:19px}
.bd-workspace .bd-asset-editor-window #bd-play{background:#2563eb;border-color:#3b82f6;color:#fff}
.bd-asset-editor-window .bd-playback-meta{display:contents}
.bd-workspace .bd-asset-editor-window .bd-playback-meta .bd-transport-panel-toggle{
  grid-column:3;grid-row:2;justify-self:end;margin:0;width:42px;min-width:42px;
  height:42px;min-height:42px;padding:9px;border-radius:8px
}
.bd-asset-editor-window .bd-playback-meta output{
  grid-column:1/-1;grid-row:3;justify-self:center;min-width:0;max-width:100%;
  font-size:11px;line-height:1.5;letter-spacing:.01em;white-space:normal;text-align:center
}
.bd-asset-editor-window .bd-assets{border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.1)}
@media(max-width:767px){
  .bd-asset-editor-window .bd-editor-window-header{min-height:64px;padding:10px 14px;padding-top:max(10px,env(safe-area-inset-top))}
  .bd-asset-editor-window .bd-asset-window-content{padding:12px 12px max(12px,env(safe-area-inset-bottom))}
  .bd-asset-editor-window .bd-player{height:min(56dvh,calc(100dvh - 255px));max-height:56dvh;aspect-ratio:auto;flex:none}
  .bd-asset-editor-window .bd-transport{padding:10px 12px}
  .bd-workspace .bd-asset-editor-window .bd-player-actions button{font-size:11px;padding:7px 10px}
  .bd-asset-editor-window .bd-player-actions label{font-size:11px}
  .bd-asset-editor-window .bd-playback-meta output{font-size:10px}
}
@media(orientation:landscape) and (max-height:500px){
  .bd-asset-editor-window .bd-player{min-height:100px;max-height:calc(100dvh - 255px);height:calc(100dvh - 255px);aspect-ratio:auto;flex:none}
  .bd-asset-editor-window .bd-asset-window-content{padding-top:8px;padding-bottom:8px}
  .bd-asset-editor-window .bd-transport{padding-top:7px;padding-bottom:7px}
  .bd-asset-editor-window .bd-playback{row-gap:6px}
}

/* Short landscape viewports keep the heading and review controls to one row each. */
@media(orientation:landscape) and (max-height:650px) and (max-width:1100px){
  .bd-asset-editor-window .bd-editor-window-header{
    min-height:44px;height:44px;padding:4px max(10px,env(safe-area-inset-right))
      4px max(10px,env(safe-area-inset-left));gap:10px
  }
  .bd-asset-editor-window .bd-editor-window-ident{
    flex-direction:row;align-items:baseline;gap:10px;min-width:0;overflow:hidden
  }
  .bd-asset-editor-window .bd-editor-window-eyebrow{
    font-size:9px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
  }
  .bd-asset-editor-window .bd-editor-window-header h1{
    font-size:14px;line-height:1.2;flex:none;max-width:50%;margin:0
  }
  .bd-workspace .bd-asset-editor-window .bd-asset-window-close{
    width:32px;min-width:32px;height:32px;min-height:32px
  }
  .bd-asset-editor-window .bd-asset-window-content{
    min-height:0;padding:4px max(6px,env(safe-area-inset-right))
      max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));overflow:hidden
  }
  .bd-asset-editor-window .bd-layout{height:100%;min-height:0}
  .bd-asset-editor-window .bd-main{
    display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden
  }
  .bd-asset-editor-window .bd-player{
    flex:1 1 0%;height:0;min-height:0;max-height:none;aspect-ratio:auto
  }
  .bd-asset-editor-window .bd-player>video{width:100%;height:100%;object-fit:contain}
  .bd-asset-editor-window .bd-transport{flex:none;padding:4px 9px;box-shadow:none}
  .bd-asset-editor-window .bd-timeline input[type="range"]{height:18px;margin:0}
  .bd-asset-editor-window .bd-timeline-marks{height:12px;margin:-2px 7px 3px}
  .bd-asset-editor-window .bd-timeline-mark span{height:9px}
  .bd-asset-editor-window .bd-video-draw-instruction,
  .bd-asset-editor-window .bd-video-transform-instruction{font-size:10px;padding:4px 7px}
}

/* Phones share the icon toolbar in portrait and landscape. */
@media(max-width:767px), (orientation:landscape) and (max-height:650px) and (max-width:1100px){
  .bd-asset-editor-window .bd-playback{
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-rows:auto;
    column-gap:8px;row-gap:0;align-items:center
  }
  .bd-asset-editor-window .bd-player-actions{
    grid-column:1;grid-row:1;gap:5px;flex-wrap:nowrap;white-space:nowrap;
    padding:0;border:0;overflow-x:auto;scrollbar-width:none
  }
  .bd-asset-editor-window .bd-player-actions::-webkit-scrollbar{display:none}
  .bd-workspace .bd-asset-editor-window .bd-player-actions button{
    display:inline-flex;align-items:center;justify-content:center;flex:none;
    width:36px;min-width:36px;height:36px;min-height:36px;padding:8px;
    font-size:0;line-height:1
  }
  .bd-asset-editor-window .bd-player-actions button::before{
    content:"";display:block;flex:none;width:18px;height:18px;background:currentColor;
    -webkit-mask:var(--bd-tool-icon) center/contain no-repeat;
    mask:var(--bd-tool-icon) center/contain no-repeat
  }
  .bd-asset-editor-window .bd-player-draw-button{--bd-tool-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2020l4-1L20%207l-3-3L5%2016l-1%204M14%207l3%203%22%2F%3E%3C%2Fsvg%3E")}
  .bd-asset-editor-window .bd-player-move-button{--bd-tool-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203v18M3%2012h18M8%207l4-4%204%204M8%2017l4%204%204-4M7%208l-4%204%204%204M17%208l4%204-4%204%22%2F%3E%3C%2Fsvg%3E")}
  .bd-asset-editor-window .bd-transform-save{--bd-tool-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%2012l4%204L19%206%22%2F%3E%3C%2Fsvg%3E")}
  .bd-asset-editor-window .bd-player-draw-button.is-cancel-drawing,
  .bd-asset-editor-window .bd-player-move-button.is-active{--bd-tool-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%206l12%2012M18%206%206%2018%22%2F%3E%3C%2Fsvg%3E")}
  .bd-asset-editor-window .bd-player-actions label{
    margin:0;min-height:36px;gap:0;flex:none;padding:0 4px
  }
  .bd-asset-editor-window .bd-player-actions .bd-show-labels-text{display:none}
  .bd-asset-editor-window .bd-player-actions>span:not(.bd-visually-hidden){font-size:10px}
  .bd-asset-editor-window .bd-playback-controls{grid-column:2;grid-row:1;gap:5px}
  .bd-workspace .bd-asset-editor-window .bd-playback-controls button{
    width:36px;min-width:36px;height:36px;min-height:36px;padding:8px
  }
  .bd-asset-editor-window .bd-playback-controls button svg{width:18px;height:18px}
  .bd-asset-editor-window .bd-playback-meta{
    display:flex;grid-column:3;grid-row:1;flex-wrap:nowrap;align-items:center;
    justify-content:flex-end;gap:6px;min-width:0
  }
  .bd-asset-editor-window .bd-playback-meta output{
    grid-column:auto;grid-row:auto;flex:0 1 auto;min-width:0;font-size:9px;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right
  }
  .bd-workspace .bd-asset-editor-window .bd-playback-meta .bd-transport-panel-toggle{
    grid-column:auto;grid-row:auto;width:36px;min-width:36px;height:36px;min-height:36px;
    padding:8px;margin:0;flex:none
  }

}
/* Keep the complete readout visible below the single control row on portrait phones. */
@media(max-width:767px) and (orientation:portrait){
  .bd-asset-editor-window .bd-playback{column-gap:6px;row-gap:5px}
  .bd-asset-editor-window .bd-player-actions{gap:4px}
  .bd-asset-editor-window .bd-playback-controls{gap:4px}
  .bd-workspace .bd-asset-editor-window .bd-player-actions button,
  .bd-workspace .bd-asset-editor-window .bd-playback-controls button{
    width:32px;min-width:32px;height:36px;min-height:36px;padding:7px
  }
  .bd-asset-editor-window .bd-playback-meta{display:contents}
  .bd-asset-editor-window .bd-playback-meta output{
    grid-column:1/-1;grid-row:2;justify-self:center;max-width:100%;
    font-size:10px;white-space:normal;overflow:visible;text-overflow:clip;text-align:center
  }
  .bd-workspace .bd-asset-editor-window .bd-playback-meta .bd-transport-panel-toggle{
    grid-column:3;grid-row:1;justify-self:end
  }
}

/* Episode actions share the bottom row, like Script's Input/Download/Edit controls. */
.bd-season-card .bd-stage-overview{
  grid-template-columns:minmax(130px,1.5fr) minmax(110px,.8fr) minmax(192px,1.5fr);
  grid-template-rows:auto auto
}
.bd-season-card .bd-stage-progress{grid-column:1;grid-row:1}
.bd-season-card .bd-stage-status{grid-column:2;grid-row:1}
.bd-season-card .bd-stage-assignee{grid-column:3;grid-row:1}
.bd-season-card .bd-stage-actions{
  grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:stretch;gap:8px;padding:9px 10px;width:100%;max-width:none;min-width:0;
  box-sizing:border-box;border-left:0;border-top:1px solid var(--bd-border)
}
.bd-season-card .bd-stage-actions:empty{display:none}
.bd-workspace .bd-season-card .bd-stage-actions button{
  width:100%;min-width:0;min-height:40px;gap:7px;padding:8px 12px;border-radius:6px;
  font-size:11px;font-weight:750;line-height:1.4
}
.bd-workspace .bd-season-card .bd-stage-actions .bd-open{
  color:#fff;background:#7e22ce;border-color:#9333ea
}
.bd-workspace .bd-season-card .bd-stage-actions .bd-shots-open{
  color:#86efac;background:#23332a;border-color:#3d5949
}
.bd-stage-action-icon{display:block;width:16px;height:16px;flex:none;pointer-events:none}
html[data-theme="light"] .bd-workspace .bd-season-card .bd-stage-actions .bd-shots-open{
  color:#15803d;background:#f0fdf4;border-color:#86efac
}
@media(max-width:1050px) and (min-width:768px){
  .bd-season-card .bd-stage-overview{grid-template-columns:minmax(100px,1fr) minmax(100px,.8fr) minmax(150px,1.2fr)}
}
@media(max-width:767px){
  .bd-season-card .bd-stage-overview{
    grid-template-columns:minmax(0,1fr) minmax(100px,.8fr);grid-template-rows:auto auto auto
  }
  .bd-season-card .bd-stage-progress{grid-column:1;grid-row:1}
  .bd-season-card .bd-stage-status{grid-column:2;grid-row:1}
  .bd-season-card .bd-stage-assignee{
    grid-column:1/-1;grid-row:2;border-left:0;border-top:1px solid var(--bd-border);padding:8px 10px
  }
  .bd-season-card .bd-stage-assignee .bd-assignee-picker{width:100%}
  .bd-season-card .bd-stage-actions{grid-column:1/-1;grid-row:3;padding:9px 10px}
}

/* Match the Asset project's inline action area in the desktop dashboard.
   The application switches to its compact dashboard below 1300px. */
@media(min-width:1300px){
  .bd-season-card .bd-stage-overview{
    grid-template-columns:minmax(130px,440px) minmax(110px,160px) minmax(180px,230px) minmax(180px,1fr);
    grid-template-rows:auto
  }
  .bd-season-card .bd-stage-actions{
    grid-column:4;grid-row:1;display:flex;align-items:center;justify-content:flex-end;
    width:auto;gap:7px;padding:8px 11px;border-top:0;border-left:1px solid var(--bd-border)
  }
  .bd-workspace .bd-season-card .bd-stage-actions button{
    flex:0 0 auto;width:auto;min-height:30px;padding:5px 11px;gap:6px;font-size:10px
  }
}

/* Five Asset transport buttons keep the complete tool row visible on phones. */
.bd-workspace .bd-notification-target{outline:2px solid #3b82f6;outline-offset:2px;box-shadow:0 0 15px rgba(59,130,246,.4)}
@media(max-width:767px) and (orientation:portrait){
  .bd-asset-editor-window .bd-playback{grid-template-columns:minmax(0,1fr) auto 36px}
}
@media(max-width:400px) and (orientation:portrait){
  .bd-asset-editor-window .bd-playback{column-gap:4px;grid-template-columns:minmax(0,1fr) auto 32px}
  .bd-asset-editor-window .bd-playback-controls{gap:2px}
  .bd-asset-editor-window .bd-player-actions{gap:3px}
  .bd-workspace .bd-asset-editor-window .bd-player-actions button,
  .bd-workspace .bd-asset-editor-window .bd-playback-controls button{
    width:28px;min-width:28px;height:36px;min-height:36px;padding:5px
  }
  .bd-workspace .bd-asset-editor-window .bd-playback-meta .bd-transport-panel-toggle{
    width:32px;min-width:32px;padding:6px
  }
}

/* Asset editor reference layout: the video uses remaining height above one control row. */
.bd-editor-window.bd-asset-editor-window .bd-asset-window-content{
  padding:16px 8px 8px;overflow:hidden
}
.bd-editor-window.bd-asset-editor-window .bd-main{
  display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden
}
.bd-editor-window.bd-asset-editor-window .bd-player{
  flex:1 1 0%;height:0;min-height:0;max-height:none;aspect-ratio:auto
}
.bd-editor-window.bd-asset-editor-window .bd-player>video{
  width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center
}
.bd-asset-editor-window .bd-playback{
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-rows:auto;gap:10px 12px
}
.bd-asset-editor-window .bd-player-actions{
  grid-column:1;grid-row:1;flex-wrap:nowrap;white-space:nowrap;padding:0;border:0;
  overflow-x:auto;scrollbar-width:none
}
.bd-asset-editor-window .bd-player-actions::-webkit-scrollbar{display:none}
.bd-asset-editor-window .bd-playback-controls{grid-column:2;grid-row:1}
.bd-asset-editor-window .bd-playback-meta{
  display:flex;grid-column:3;grid-row:1;align-items:center;justify-content:flex-end;
  flex-wrap:nowrap;gap:clamp(12px,7vw,160px);min-width:0
}
.bd-asset-editor-window .bd-playback-meta label{
  display:flex;align-items:center;gap:7px;flex:none;margin:0;font-size:11px;cursor:pointer;white-space:nowrap
}
.bd-asset-editor-window .bd-playback-meta input{width:16px;height:16px;margin:0;accent-color:#2563eb}
.bd-workspace .bd-asset-editor-window .bd-playback-meta .bd-transport-panel-toggle{
  grid-column:auto;grid-row:auto;flex:none;margin:0
}
.bd-asset-editor-window #bd-time{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap}
@media(max-width:767px), (orientation:landscape) and (max-height:650px) and (max-width:1100px){
  .bd-editor-window.bd-asset-editor-window .bd-asset-window-content{
    padding:6px max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))
  }
  .bd-asset-editor-window .bd-playback{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);column-gap:6px;row-gap:0}
  .bd-asset-editor-window .bd-playback-meta{display:flex;gap:6px}
  .bd-asset-editor-window .bd-playback-meta .bd-show-labels-text{display:none}
  .bd-asset-editor-window .bd-playback-meta label{padding:0 2px}
  .bd-workspace .bd-asset-editor-window .bd-playback-meta .bd-transport-panel-toggle{grid-column:auto;grid-row:auto}
}
@container bd-asset-main (max-width:430px){
  .bd-asset-editor-window .bd-playback{grid-template-columns:minmax(0,1fr) auto auto;column-gap:4px}
  .bd-asset-editor-window .bd-playback-meta{gap:4px}
  .bd-asset-editor-window .bd-playback-meta .bd-show-labels-text{display:none}
  .bd-workspace .bd-asset-editor-window .bd-playback-controls button{width:28px;min-width:28px;height:36px;min-height:36px;padding:5px}
  .bd-asset-editor-window .bd-playback-controls{gap:2px}
  .bd-workspace .bd-asset-editor-window .bd-playback-meta .bd-transport-panel-toggle{width:32px;min-width:32px;padding:6px}
}

/* Shots video loading: real buffered duration, separate from analysis progress. */
.bd-player .bd-video-loading{position:absolute;z-index:4;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;gap:10px;width:min(280px,calc(100% - 32px));padding:16px;border:1px solid rgba(148,163,184,.4);border-radius:12px;background:rgba(15,23,42,.92);color:#f8fafc;text-align:center;pointer-events:none;box-sizing:border-box}
.bd-player .bd-video-loading[hidden]{display:none}
.bd-video-loading>span{font-size:14px;font-weight:600}
.bd-video-loading>small{font-size:11px;color:#cbd5e1}
.bd-video-loading>progress{width:100%;height:6px;border:0;border-radius:999px;overflow:hidden;accent-color:#60a5fa}
.bd-video-loading>progress::-webkit-progress-bar{background:#334155;border-radius:999px}
.bd-video-loading>progress::-webkit-progress-value{background:#60a5fa;border-radius:999px}
.bd-video-loading>progress::-moz-progress-bar{background:#60a5fa;border-radius:999px}

/* Current saved shot: readable over bright footage without intercepting taps. */
.bd-shots-player .bd-shot-video-badge{position:absolute;z-index:3;top:12px;left:12px;display:flex;align-items:center;gap:8px;max-width:calc(100% - 24px);box-sizing:border-box;padding:7px 11px;border:1px solid rgba(255,255,255,.2);border-radius:7px;background:rgba(15,23,42,.82);color:#f8fafc;box-shadow:0 2px 8px rgba(0,0,0,.2);font-size:12px;font-weight:600;line-height:1.4;letter-spacing:.03em;pointer-events:none}
.bd-shots-player .bd-shot-video-badge[hidden]{display:none}
.bd-shot-video-badge-dot{width:6px;height:6px;flex:none;border-radius:50%;background:#60a5fa}
#bd-shot-video-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bd-shot-video-badge.is-unassigned{color:#cbd5e1}
.bd-shot-video-badge.is-unassigned .bd-shot-video-badge-dot{background:#94a3b8}
@media(max-width:600px){.bd-shots-player .bd-shot-video-badge{top:8px;left:8px;max-width:calc(100% - 16px);padding:5px 9px;font-size:11px}}

/* Compact landscape Shots workspace. Keep playback visible as edit tools scroll. */
@media (orientation:landscape) and (max-height:650px) and (max-width:1100px){
.bd-editor-window:has(.bd-shots-window-content){position:relative}
.bd-editor-window:has(.bd-shots-window-content) .bd-editor-window-header{box-sizing:border-box;min-height:44px;height:44px;padding:4px max(8px,env(safe-area-inset-right)) 4px max(8px,env(safe-area-inset-left));gap:8px}
.bd-editor-window:has(.bd-shots-window-content) .bd-editor-window-ident{flex-direction:row;align-items:center;gap:8px;max-width:calc(100% - 210px)}
.bd-editor-window:has(.bd-shots-window-content) .bd-editor-window-eyebrow{display:none}
.bd-editor-window:has(.bd-shots-window-content) .bd-editor-window-header h1{font-size:13px;line-height:1.3}
.bd-workspace .bd-editor-window:has(.bd-shots-window-content) .bd-asset-window-close{width:36px;height:36px;min-width:36px;min-height:36px}
.bd-editor-window-content.bd-shots-window-content{padding:0 max(6px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}
.bd-shots-window-content .bd-shots-layout{position:relative;display:block;height:100%}
.bd-shots-window-content .bd-shots-main{height:100%;container-type:normal}
.bd-shots-window-content .bd-shots-heading{position:fixed;z-index:9;top:6px;right:calc(54px + env(safe-area-inset-right));height:32px;margin:0;gap:0}
.bd-shots-window-content .bd-shot-fps-label{flex-direction:row;align-items:center;gap:6px;font-size:10px}
.bd-workspace .bd-shots-window-content .bd-shot-fps-label input{width:68px;height:32px;min-height:32px;padding:4px 6px;font-size:12px;box-sizing:border-box}
.bd-editor-window-content .bd-shots-player{flex:1 1 0;min-height:70px;max-height:none;border-radius:0}
.bd-shots-window-content .bd-shots-player>video{height:100%;width:100%;object-fit:contain}
.bd-shots-window-content .bd-shots-transport{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:3px 10px;padding:5px 7px;border-radius:0 0 8px 8px}
.bd-shots-window-content .bd-shot-readout{margin:0;white-space:nowrap;font-size:10px}
.bd-shots-window-content #bd-shot-total{display:none}
.bd-shots-window-content .bd-shot-seek-label{font-size:0;gap:0;margin:0}
.bd-shots-window-content .bd-shot-seek-label input{height:26px;margin:0}
.bd-shots-window-content .bd-shot-track{grid-column:1/-1;height:24px;margin:0}
.bd-workspace .bd-shots-window-content .bd-shot-segment{top:2px;bottom:2px;padding:0;font-size:0}
.bd-shots-window-content .bd-shot-playback{grid-column:1/-1;display:flex;flex-wrap:nowrap;align-items:center;gap:6px;margin:0;overflow:visible;padding:0}
.bd-shots-window-content .bd-shot-playback .bd-playback-controls{order:0;display:flex;flex:none;gap:4px}
.bd-workspace .bd-shots-window-content .bd-shot-playback .bd-playback-controls button{flex:none;display:inline-flex;align-items:center;justify-content:center;width:38px;height:40px;min-width:38px;min-height:40px;padding:8px}
.bd-workspace .bd-shots-window-content .bd-shot-playback .bd-playback-controls button svg{width:19px;height:19px}
.bd-workspace .bd-shots-window-content .bd-shot-preview{order:1;flex:none;width:auto;min-width:0;padding:6px 8px}
.bd-shots-window-content .bd-shot-actions-right{order:2;flex:1 1 0;min-width:0;display:flex;justify-content:flex-start;gap:5px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
.bd-workspace .bd-shots-window-content .bd-shot-playback button{flex:none;min-height:40px;height:40px;width:auto;white-space:nowrap;padding:6px 8px;font-size:11px}
.bd-workspace .bd-shots-window-content .bd-shot-set-end,.bd-workspace .bd-shots-window-content #bd-shot-save{width:auto;min-width:0}
.bd-workspace .bd-shots-window-content .bd-shot-actions-right .bd-transport-panel-toggle{width:38px;min-width:38px;height:40px;min-height:40px;padding:8px}
.bd-shots-window-content .bd-shot-status{grid-column:1/-1;margin:1px 0 0;font-size:10px;line-height:1.3;max-height:28px;overflow:auto}
.bd-shots-window-content #bd-shot-reload{grid-column:1/-1}
.bd-shots-window-content .bd-shot-sidebar{position:absolute;z-index:10;inset:0 0 0 auto;width:min(320px,80%);max-width:100%;box-sizing:border-box;padding:8px;box-shadow:-10px 0 30px rgba(0,0,0,.42)}
.bd-shots-window-content .bd-shot-video-badge{top:6px;left:6px;padding:4px 8px;font-size:11px}
.bd-shots-window-content .bd-video-loading{padding:10px;gap:6px;width:min(240px,calc(100% - 24px))}
.bd-shots-window-content .bd-video-loading>small{display:none}
}

/* Zoom the existing shot strip without adding another slider. */
.bd-shot-track{touch-action:none;user-select:none;cursor:default}
.bd-shot-track.is-zoomed{cursor:grab}
.bd-shot-track.is-panning{cursor:grabbing}
.bd-shot-track:focus-visible{outline:2px solid var(--bd-accent);outline-offset:2px}
.bd-shot-track-content{position:relative;width:100%;height:100%;min-width:100%}
.bd-shot-track.is-zoomed .bd-shot-segment{cursor:grab}
.bd-workspace .bd-shot-track.is-zoomed .bd-shot-segment{font-size:10px;padding:2px 3px}

/* Balanced icon toolbar: playback stays centered while side tools can scroll. */
.bd-workspace .bd-shots-window-content .bd-shot-playback{
  display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;gap:6px;overflow:visible;padding:4px 0 0
}
.bd-workspace .bd-shots-window-content .bd-shot-playback .bd-playback-controls{
  grid-column:2;grid-row:1;display:flex;justify-content:center;gap:4px;order:0
}
.bd-workspace .bd-shots-window-content .bd-shot-playback .bd-shot-actions-left,
.bd-workspace .bd-shots-window-content .bd-shot-playback .bd-shot-actions-right{
  grid-row:1;display:flex;align-items:center;justify-content:flex-start;gap:4px;
  min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;
  scrollbar-width:none;padding:2px 0
}
.bd-workspace .bd-shots-window-content .bd-shot-playback .bd-shot-actions-left{grid-column:1}
.bd-workspace .bd-shots-window-content .bd-shot-playback .bd-shot-actions-right{grid-column:3}
.bd-shot-actions-left::-webkit-scrollbar,.bd-shot-actions-right::-webkit-scrollbar{display:none}
.bd-workspace .bd-shots-window-content .bd-shot-playback button,
.bd-workspace .bd-shots-window-content .bd-shot-playback .bd-playback-controls button,
.bd-workspace .bd-shots-window-content .bd-shot-playback .bd-transport-panel-toggle{
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;
  width:44px;min-width:44px;max-width:44px;height:44px;min-height:44px;
  margin:0;padding:10px;border-radius:9px
}
.bd-workspace .bd-shots-window-content .bd-shot-playback button svg{width:22px;height:22px;flex:none;pointer-events:none}
.bd-workspace .bd-shots-window-content .bd-shot-playback .bd-shot-panel-control{flex:none}
.bd-workspace .bd-shots-window-content .bd-shot-playback button.is-active{background:#1d4ed8;border-color:#60a5fa;color:#fff}
.bd-workspace .bd-shots-window-content .bd-shot-playback button:focus-visible{outline:2px solid var(--bd-accent);outline-offset:-3px}

/* Reference arrangement: edge tools, separate loop, centered playback. */
@media(min-width:700px){
  .bd-workspace .bd-shots-window-content .bd-shot-playback .bd-shot-actions-left{
    display:grid;grid-template-columns:44px 44px minmax(0,2fr) 44px minmax(0,1fr)
  }
  .bd-workspace .bd-shots-window-content .bd-shot-playback #bd-shot-auto{grid-column:1;grid-row:1}
  .bd-workspace .bd-shots-window-content .bd-shot-playback #bd-shot-remove-splits{grid-column:2;grid-row:1}
  .bd-workspace .bd-shots-window-content .bd-shot-playback .bd-shot-preview{grid-column:4;grid-row:1}
  .bd-workspace .bd-shots-window-content .bd-shot-playback .bd-shot-actions-right>:first-child{margin-left:auto}
  .bd-workspace .bd-shots-window-content .bd-shot-playback #bd-shot-save{
    flex-basis:clamp(64px,5vw,100px);width:clamp(64px,5vw,100px);
    min-width:64px;max-width:100px
  }
  .bd-workspace .bd-shots-window-content .bd-shot-playback .bd-shot-panel-control{
    margin-left:clamp(8px,2.5vw,52px)
  }
}

/* Shots title, FPS and close share one compact header row. */
.bd-editor-window:has(.bd-shots-window-content) .bd-editor-window-header{
  box-sizing:border-box;height:auto;min-height:48px;
  padding:max(4px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 4px max(10px,env(safe-area-inset-left));gap:12px
}
.bd-editor-window:has(.bd-shots-window-content) .bd-editor-window-ident{
  flex:1 1 0;min-width:0;max-width:none;flex-direction:row;align-items:center;gap:12px;overflow:hidden
}
.bd-editor-window:has(.bd-shots-window-content) .bd-editor-window-eyebrow{flex:none;white-space:nowrap}
.bd-editor-window:has(.bd-shots-window-content) .bd-editor-window-header h1{font-size:16px;line-height:1.3;min-width:0}
.bd-editor-window:has(.bd-shots-window-content) .bd-editor-window-actions{
  display:flex;align-items:center;flex:none;gap:12px
}
.bd-editor-window .bd-editor-window-header .bd-shots-heading{
  position:static;inset:auto;z-index:auto;height:auto;margin:0;gap:0
}
.bd-editor-window .bd-editor-window-header .bd-shot-fps-label{
  flex-direction:row;align-items:center;gap:8px;white-space:nowrap;font-size:11px
}
.bd-workspace .bd-editor-window .bd-editor-window-header .bd-shot-fps-label input{
  box-sizing:border-box;width:68px;min-height:34px;height:34px;margin:0;padding:5px 8px;font-size:12px
}
.bd-workspace .bd-editor-window:has(.bd-shots-window-content) .bd-asset-window-close{
  width:36px;min-width:36px;height:36px;min-height:36px
}
.bd-editor-window-content.bd-shots-window-content{padding-top:0}
@media(max-width:600px){
  .bd-editor-window:has(.bd-shots-window-content) .bd-editor-window-eyebrow{display:none}
  .bd-editor-window:has(.bd-shots-window-content) .bd-editor-window-header{gap:8px}
  .bd-editor-window:has(.bd-shots-window-content) .bd-editor-window-actions{gap:8px}
  .bd-editor-window:has(.bd-shots-window-content) .bd-editor-window-header h1{font-size:14px}
}

/* Auto split owns a modal progress surface until analysis and saving finish. */
.bd-analysis-overlay .bd-analysis-dialog{width:min(420px,calc(100vw - 32px));box-sizing:border-box}
.bd-analysis-dialog progress{display:block;width:100%;height:10px;margin:16px 0;border:0;border-radius:999px;overflow:hidden;accent-color:#60a5fa}
.bd-analysis-dialog progress::-webkit-progress-bar{background:#334155;border-radius:999px}
.bd-analysis-dialog progress::-webkit-progress-value{background:#60a5fa;border-radius:999px}
.bd-analysis-dialog progress::-moz-progress-bar{background:#60a5fa;border-radius:999px}
.bd-analysis-dialog .bd-analysis-hint{font-size:12px;opacity:.75}
.bd-analysis-dialog [data-analysis-stop]{min-height:44px;min-width:88px}
.bd-shot-status[hidden]{display:none}

/* Draw and Move replace the former label toggle beside the Assets panel button. */
.bd-playback-meta .bd-asset-tools{display:flex;align-items:center;gap:6px;flex:none}
.bd-workspace .bd-playback-meta .bd-asset-tools button{
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  width:42px;min-width:42px;height:42px;min-height:42px;padding:9px;font-size:0
}
.bd-playback-meta .bd-asset-tools button svg{width:21px;height:21px;pointer-events:none}
.bd-playback-meta .bd-asset-tools button::before{display:none}
.bd-playback-meta .bd-asset-tools button:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:767px){
  .bd-workspace .bd-playback-meta .bd-asset-tools button{
    width:32px;min-width:32px;height:36px;min-height:36px;padding:6px
  }
  .bd-playback-meta .bd-asset-tools{gap:4px}
}
@container bd-asset-main (max-width:600px){
  .bd-asset-editor-window .bd-playback{grid-template-columns:0 minmax(0,1fr) auto;column-gap:4px}
  .bd-asset-editor-window .bd-playback-meta{gap:4px}
}

/* Explicit SVG geometry keeps the relocated tools visible with icon-only text. */
.bd-workspace .bd-asset-editor-window .bd-asset-tools button{
  box-sizing:border-box;flex:0 0 42px;width:42px;min-width:42px;max-width:42px;
  height:42px;min-height:42px;padding:9px;line-height:1;overflow:visible
}
.bd-workspace .bd-asset-editor-window .bd-asset-tools button>svg{
  display:block;flex:0 0 21px;width:21px;min-width:21px;height:21px;
  fill:none;stroke:currentColor;stroke-width:2;visibility:visible;opacity:1
}
@media(max-width:767px){
  .bd-workspace .bd-asset-editor-window .bd-asset-tools button{
    flex-basis:32px;width:32px;min-width:32px;max-width:32px;height:36px;min-height:36px;padding:5px
  }
}

/* Compact asset identities with first-mark crop previews and explicit removal. */
.bd-assets .bd-asset{display:grid;grid-template-columns:48px minmax(0,1fr);gap:8px 10px;align-items:center}
.bd-asset-thumbnail{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border:1px solid var(--bd-border);border-radius:7px;background:var(--bd-input);color:var(--bd-muted);overflow:hidden}
.bd-asset-thumbnail img{display:block;width:100%;height:100%;object-fit:contain}
.bd-asset-info{min-width:0;overflow-wrap:anywhere}
.bd-assets .bd-asset-actions{grid-column:1/-1;justify-content:flex-end;flex-wrap:wrap}
.bd-workspace .bd-asset-actions .bd-asset-remove{color:#f87171;border-color:#9f4343}
html[data-theme="light"] .bd-workspace .bd-asset-actions .bd-asset-remove{color:#b91c1c}

/* Pre-cut episode uploads */
.bd-shots-toggle { display:flex; align-items:center; justify-content:center; gap:10px; cursor:pointer; margin:0 0 18px; font-weight:700; }
.bd-shots-toggle input { appearance:none; width:40px; height:24px; border:1px solid #596575; border-radius:999px; background:#15181d; position:relative; cursor:pointer; flex:none; }
.bd-shots-toggle input::before { content:""; position:absolute; width:16px; height:16px; top:3px; left:3px; border-radius:50%; background:#b8c2d1; transition:transform .15s; }
.bd-shots-toggle input:checked { background:#2d61d7; border-color:#6a97ff; }
.bd-shots-toggle input:checked::before { transform:translateX(16px); background:#fff; }
.bd-shots-toggle input:focus-visible { outline:2px solid #91b9ff; outline-offset:3px; }
.bd-shots-toggle input:disabled { opacity:.6; cursor:wait; }
.bd-shot-upload-list { max-height:180px; overflow:auto; margin:12px 0 0; padding:10px 12px 10px 38px; text-align:left; border:1px solid #424b58; border-radius:10px; }
.bd-shot-upload-list li { padding:4px 0; overflow-wrap:anywhere; }
