/* Studio Cut (Oct 20 2026) — every rule under .sc / .sc- ; colours only through tokens.css variables, so both themes work.
   Two exceptions, on purpose: the viewer's letterbox and the fade layer are plain black, because the export's fade is a dip to
   black and the preview must look the same. Layout: the viewer and the side panel side by side (stacked under 1000 px), the
   timeline under them in its own sideways-scrolling box (the page itself never scrolls sideways); under 768 px the page is
   view only: the viewer, play, a scrub bar and the captions as a list. */
.sc { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* the editor fills the room the app gives #page (studiocut.js fit(): .sc gets that height and --sc-vh, the viewer's height); the timeline
   takes what is left, every track in sight, and scrolls up and down inside itself only when the window is very short */
.sc-fit { overflow: hidden; }
.sc-fit > .sc-main, .sc-fit > #sc-top-box, .sc-fit > #sc-bars, .sc-fit > #sc-tlbar-box { flex: none; }
.sc-fit > .sc-tl { flex: 1 1 auto; min-height: 0; }
.sc-fxnote { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
/* in the fitted editor the header and the transport stay ONE row each (a wrapped row would push the tracks off the bottom); a narrow page
   box (the chat dock open, a small laptop) gets a narrower side panel and drops the two jump buttons (Home / End still do it) */
.sc-fit .sc-top, .sc-fit .sc-transport { flex-wrap: nowrap; }
.sc-fit .sc-top > *, .sc-fit .sc-transport > * { flex-shrink: 0; }
.sc-fit .sc-top > .sc-name, .sc-fit .sc-top > .sc-fxnote { flex-shrink: 1; }
.sc-fit .sc-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; min-width: 0; }
.sc-fit.sc-narrow .sc-main { grid-template-columns: minmax(0, 1fr) 250px; }
.sc-fit.sc-narrower .sc-main { grid-template-columns: minmax(0, 1fr) 210px; }
.sc-fit.sc-narrow [data-sc-go="start"], .sc-fit.sc-narrow [data-sc-go="end"], .sc-fit.sc-narrow .sc-fxnote { display: none; }
.sc-loading, .sc-gone { padding: 24px; text-align: center; }
.sc-skel { display: grid; gap: 12px; padding: 12px; text-align: left; }   /* Oct 24: the first open shows the editor's shape in grey (tokens.css .skel-*) */
.sc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.sc-name { min-width: 0; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.sc-grow { flex: 1 1 auto; }
.sc-ico { min-width: 34px; padding: 0 8px; }
.sc-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; max-width: 52ch; overflow: hidden; text-overflow: ellipsis; }
.sc-pill-saved { color: var(--success); background: var(--success-soft); border-color: transparent; }
.sc-pill-saving, .sc-pill-waiting { color: var(--text-muted); }
.sc-pill-trying { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.sc-pill-offline { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.sc-fit .sc-top > #sc-pill-box { flex-shrink: 1; min-width: min(130px, 100%); display: inline-flex; }
.sc-top #sc-pill-box .sc-pill { max-width: 100%; }
.sc-fit.sc-tight .sc-top .sc-kcs { display: none; }
.sc-fit.sc-tighter .sc-top .sc-bw-ur, .sc-fit.sc-tighter .sc-top > .sc-fxnote { display: none; }
.sc-fit.sc-tighter .sc-top > .sc-name { min-width: 64px; }
.sc-fit.sc-tighter .sc-top { gap: 6px; }
.sc-fit.sc-tighter .sc-top > #sc-pill-box { min-width: 64px; }
.sc-fit.sc-tighter .sc-top .btn-sm { padding-left: 8px; padding-right: 8px; }
.sc-fit.sc-tightest .sc-top .sc-bw { display: none; }
.sc-pill-refused { color: var(--danger); background: var(--danger-soft); border-color: transparent; white-space: normal; }
.sc-pill-watching { color: var(--accent-text); background: var(--info-soft); border-color: transparent; }

.sc-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 12px; margin-bottom: 4px; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--info-soft); font-size: 13px; }
.sc-bar-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); }
.sc-bar-info { background: var(--surface-subtle); color: var(--text-muted); }

.sc-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
.sc-watch { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.sc-viewer { position: relative; height: var(--sc-vh, min(54vh, 600px)); max-width: 100%; background: black; border-radius: var(--radius-small); overflow: hidden; container-type: size; }
.sc-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; visibility: hidden; }
.sc-v.sc-on { visibility: visible; }
.sc-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background-color: var(--surface-subtle); color: var(--text-muted); background-repeat: no-repeat; font-size: 13px; text-align: center; padding: 12px; }
.sc-card b { font-size: 18px; color: var(--foreground); }
.sc-card-wait { background-blend-mode: luminosity; }
.sc-card-fx0 { background-color: color-mix(in srgb, var(--brand-blue) 45%, var(--surface)); }
.sc-card-fx1 { background-color: color-mix(in srgb, var(--success) 40%, var(--surface)); }
.sc-card-fx2 { background-color: color-mix(in srgb, var(--warn) 40%, var(--surface)); }
.sc-card-fx3 { background-color: color-mix(in srgb, var(--danger) 30%, var(--surface)); }
.sc-card-code { font-size: 26px !important; }
.sc-card-f { font-variant-numeric: tabular-nums; color: var(--foreground); }
.sc-black { position: absolute; inset: 0; background: black; opacity: 0; pointer-events: none; }
.sc-hl-img, .sc-cap-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.sc-hl-txt { position: absolute; left: 8%; right: 8%; top: 16%; padding: 4px 8px; text-align: center; font-weight: 800; font-size: clamp(11px, 5cqw, 28px); background: var(--surface); color: var(--foreground); border-radius: 8px; pointer-events: none; }
.sc-hl-txt[data-place="centre"] { top: 40%; }
.sc-hl-txt[data-place="lower"] { top: 63%; }
.sc-capbox { position: absolute; inset: 0; pointer-events: none; }
.sc-cap-txt { position: absolute; left: 8%; right: 8%; bottom: 24%; text-align: center; font-weight: 800; font-size: clamp(12px, 6cqw, 34px); line-height: 1.15; color: var(--ed-text); text-shadow: 0 0 3px var(--ed-bg), 0 0 1px var(--ed-bg); }
.sc-transport { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; width: 100%; }
.sc-play { min-width: 48px; }
.sc-time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-muted); margin-left: 6px; }
.sc-time b { color: var(--foreground); }
.sc-scrub { flex: 1 1 100%; width: 100%; }

.sc-side { padding: 10px 14px; max-height: calc(var(--sc-vh, 56vh) + 38px); overflow: auto; min-width: 0; }
.sc-panel { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.sc-panel > *, .sc-grid2 .sc-lbl > * { flex: none; }                      /* a column: nothing in it may stretch tall (a select once drew 80 px high) */
.sc-panel .input, .sc-panel select.input { min-height: 34px; padding: 4px 10px; font-size: 13px; }
.sc-panel textarea.input { min-height: 56px; }
.sc-ph-h { font-size: 14px; margin-bottom: 2px; }
.sc-src { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-warnline { color: var(--warn); margin: 4px 0; }
.sc-times { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 8px 0 4px; font-size: 13px; }
.sc-times dt { color: var(--text-muted); }
.sc-times dd { margin: 0; font-variant-numeric: tabular-nums; }
.sc-lbl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; font-size: 13px; font-weight: 600; }
.sc-lbl output { font-weight: 500; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sc-range { width: 100%; }
.sc-sel { min-width: 0; width: 100%; }
.sc-panel .row > .sc-sel { flex: 1 1 140px; width: auto; }
.sc-num { width: 84px; }
.sc-acts { margin-top: 12px; }
.sc-cap-text { width: 100%; resize: vertical; }
.sc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sc-grid2 .sc-lbl { flex-direction: column; align-items: stretch; }

.sc-tlbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-zoom { width: 160px; max-width: 40vw; }
.sc-snap { margin-left: 6px; }
.sc-tl { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-content: start; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); overflow-x: hidden; overflow-y: auto; }
.sc-heads { border-right: 1px solid var(--border); background: var(--surface-subtle); }
.sc-hd { display: flex; align-items: center; padding: 0 8px; font-size: 12px; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); box-sizing: border-box; }
.sc-hd-ruler, .sc-ruler { height: 22px; }
.sc-hd-head, .sc-t-head { height: 22px; }
.sc-hd-cap, .sc-t-cap { height: 26px; }
.sc-hd-vid, .sc-t-vid { height: 48px; }
.sc-hd-voi, .sc-t-voi { height: 28px; }
.sc-hd-mus, .sc-t-mus { height: 32px; }
.sc-scroll { overflow-x: auto; overflow-y: hidden; position: relative; min-width: 0; outline: none; }
.sc-canvas { position: relative; }
.sc-ruler { position: relative; border-bottom: 1px solid var(--border); cursor: pointer; box-sizing: border-box; touch-action: none; }
.sc-tick { position: absolute; top: 0; height: 100%; border-left: 1px solid var(--border); padding: 3px 0 0 3px; font-size: 11px; color: var(--text-muted); white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.sc-track { position: relative; border-bottom: 1px solid var(--border); box-sizing: border-box; }
.sc-t-mus { border-bottom: 0; }

.sc-b { position: absolute; top: 3px; bottom: 3px; box-sizing: border-box; border: 1px solid var(--ed-edge); border-radius: 4px; overflow: hidden; background: var(--surface-subtle); color: var(--foreground); font: inherit; font-size: 11px; padding: 0; cursor: pointer; touch-action: none; user-select: none; text-align: left; }
.sc-b.sel { outline: 2px solid var(--brand-blue); outline-offset: -1px; z-index: 2; }
.sc-b:focus-visible { outline: 2px solid var(--brand-cyan); outline-offset: -1px; z-index: 3; }
.sc-btxt { display: block; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 18px; pointer-events: none; }
.sc-t-head .sc-btxt { line-height: 14px; font-size: 11px; }
.sc-t-cap .sc-btxt { line-height: 18px; }
.sc-t-head .sc-b, .sc-t-cap .sc-b { top: 2px; bottom: 2px; }
.sc-pc { background: color-mix(in srgb, var(--brand-blue) 16%, var(--surface)); }
.sc-tiles { position: absolute; inset: 0; pointer-events: none; }
.sc-tiles i { position: absolute; top: 0; bottom: 0; background-image: var(--sc-sprite); background-repeat: no-repeat; opacity: 0.92; }
.sc-code { position: absolute; left: 4px; top: 2px; padding: 0 4px; border-radius: 4px; font-weight: 700; font-size: 11px; white-space: nowrap; background: color-mix(in srgb, var(--surface) 82%, transparent); pointer-events: none; }
.sc-ready { position: absolute; left: 4px; bottom: 2px; padding: 0 4px; border-radius: 4px; font-size: 10px; white-space: nowrap; color: var(--warn); background: color-mix(in srgb, var(--surface) 85%, transparent); pointer-events: none; }
.sc-notready { background: repeating-linear-gradient(45deg, var(--surface-subtle) 0 6px, var(--border) 6px 12px); }
.sc-ins { border-style: dashed; border-color: var(--brand-blue); }
.sc-gain { position: absolute; right: 10px; top: 2px; padding: 0 4px; border-radius: 4px; font-size: 10px; background: color-mix(in srgb, var(--surface) 85%, transparent); pointer-events: none; }
.sc-edge { position: absolute; top: 0; bottom: 0; width: 8px; z-index: 3; cursor: ew-resize; }
.sc-edge-l { left: 0; }
.sc-edge-r { right: 0; }
.sc-edge:hover, .sc-b.sel .sc-edge { background: color-mix(in srgb, var(--brand-blue) 45%, transparent); }
.sc-fade { position: absolute; top: 50%; z-index: 4; width: 20px; height: 20px; padding: 0; transform: translate(-50%, -50%); border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--foreground); font-size: 13px; line-height: 1; cursor: pointer; }
.sc-fade:focus-visible { outline: 2px solid var(--brand-cyan); }
.sc-end { background: color-mix(in srgb, var(--text-muted) 18%, var(--surface)); cursor: default; }
.sc-up { width: 104px; top: 0; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: center; font-weight: 600; background: var(--warn-soft); color: var(--warn); border-color: var(--warn); cursor: default; }
.sc-cp { background: color-mix(in srgb, var(--success) 15%, var(--surface)); }
.sc-hl { background: color-mix(in srgb, var(--danger) 13%, var(--surface)); }
.sc-off { border-style: dashed; background: transparent; color: var(--text-muted); padding: 0 8px; }
.sc-vo { background: transparent; border-color: transparent; color: var(--brand-blue); cursor: default; }
.sc-vo.sel { outline: 0; color: var(--brand-blue-solid); background: var(--info-soft); }
.sc-vo svg, .sc-mu svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.sc-vo path { stroke: currentColor; stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.sc-vo-end { color: var(--text-muted); }
.sc-mu { background: color-mix(in srgb, var(--warn) 9%, var(--surface)); color: var(--warn); }
.sc-mu path { stroke: currentColor; stroke-width: 2; fill: none; vector-effect: non-scaling-stroke; }
.sc-mlv { position: absolute; left: 6px; top: 2px; font-size: 10px; color: var(--text-muted); pointer-events: none; }
.sc-xf { position: absolute; top: 4px; bottom: 4px; z-index: 1; background: color-mix(in srgb, var(--warn) 22%, transparent); border-radius: 4px; pointer-events: none; }
.sc-mfade { position: absolute; z-index: 4; width: 16px; height: 16px; padding: 0; transform: translateX(-50%); border: 0; background: none; color: var(--warn); font-size: 14px; line-height: 1; cursor: ew-resize; touch-action: none; }
.sc-ph { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; z-index: 6; background: var(--danger); pointer-events: none; }
.sc-drop { position: absolute; top: 22px; bottom: 0; width: 3px; margin-left: -1px; z-index: 7; background: var(--brand-blue); pointer-events: none; }
.sc-ro .sc-edge, .sc-ro .sc-mfade { display: none; }
.sc-ro .sc-b { cursor: default; }

.sc-menu, .sc-pop { position: fixed; z-index: 1000; background: var(--surface); color: var(--foreground); border: 1px solid var(--border); border-radius: var(--radius-small); box-shadow: var(--shadow-floating); }
.sc-menu { padding: 6px; min-width: 210px; }
.sc-mi { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--foreground); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.sc-mi:hover, .sc-mi:focus-visible { background: var(--surface-subtle); outline: none; }
.sc-mi[disabled] { color: var(--text-muted); cursor: default; }
.sc-pop { display: flex; flex-direction: column; gap: 8px; width: 260px; padding: 12px; font-size: 13px; }

.sc-caplist { padding: 12px 14px; }
.sc-caplist ol { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 40vh; overflow: auto; }
.sc-capjump { display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--foreground); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.sc-capjump:hover, .sc-capjump:focus-visible { background: var(--surface-subtle); }

@media (max-width: 1000px) {
  .sc:not(.sc-fit) .sc-main { grid-template-columns: minmax(0, 1fr); }
  .sc:not(.sc-fit) .sc-side { max-height: none; }
}
@media (max-width: 767px) {
  .sc-viewer { height: min(60vh, 560px); }
  .sc-name { max-width: 100%; flex: 1 1 100%; order: 3; }
  .sc-transport .btn { min-height: 40px; }
}

/* the conveniences (Oct 21): the picked edge, mute / solo on the track names, the viewer's two small buttons, the phone cover areas */
.sc-edge.on { background: var(--brand-blue); }
.sc-hd { gap: 2px; }
.sc-hd span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sc-ms { flex: none; width: 20px; height: 20px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 11px; line-height: 1; cursor: pointer; opacity: 0.55; }
.sc-ms.on { opacity: 1; border-color: var(--brand-blue); background: var(--info-soft); }
.sc-ms:focus-visible, .sc-vbtn:focus-visible { outline: 2px solid var(--brand-cyan); opacity: 1; }
.sc-vbtns { position: absolute; top: 6px; right: 6px; z-index: 5; display: flex; gap: 4px; }
.sc-vbtn { width: 26px; height: 26px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--foreground); font-size: 13px; line-height: 1; cursor: pointer; opacity: 0.75; }
.sc-vbtn:hover, .sc-vbtn.on { opacity: 1; }
.sc-vbtn.on { border-color: var(--brand-blue); }
.sc-safe { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.sc-time { border: 0; background: none; padding: 2px 4px; border-radius: 8px; font: inherit; font-size: 13px; color: var(--text-muted); cursor: text; }
.sc-time:hover, .sc-time:focus-visible { background: var(--surface-subtle); }
.sc-time-in { width: 110px; min-height: 30px !important; padding: 2px 8px !important; font-size: 13px; font-variant-numeric: tabular-nums; }
.sc-viewer:fullscreen { height: 100vh; width: 100vw; max-width: none; border-radius: 0; }

/* J/L cuts (Oct 21): the sound handle at every cut on the Voices track; a moved sound shows as the waveform reaching past the cut */
.sc-snd { position: absolute; top: 1px; bottom: 1px; width: 9px; margin-left: -4px; z-index: 4; cursor: ew-resize; touch-action: none; border-radius: 4px; }
.sc-snd::after { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--text-muted); }
.sc-snd.moved::after { width: 2px; left: 3px; background: var(--brand-blue); }
.sc-snd:hover, .sc-snd.on { background: color-mix(in srgb, var(--brand-blue) 35%, transparent); }
.sc-snd:focus-visible { outline: 2px solid var(--brand-cyan); }
.sc-vo-j, .sc-vo-l { border-color: color-mix(in srgb, var(--brand-blue) 40%, transparent); }
.sc-ro .sc-snd { cursor: pointer; }
/* a sound cut inside a word: the red line always; the red tint only while it is neither picked nor hovered, so a picked or hovered
   handle keeps the same look as every other one (the line stays red) */
.sc-snd.warn::after { width: 3px; left: 3px; background: var(--danger); }
.sc-snd.warn:not(.on):not(:hover) { background: color-mix(in srgb, var(--danger) 22%, transparent); }
.sc-snd.warn.on { box-shadow: inset 0 0 0 1px var(--danger); }
.sc-snd-warn { color: var(--danger); }

/* keys you can see (Oct 21, Mit: "have these shortcuts always show and SUPER clear, like a keyboard icon with that specific letter"):
   a keycap drawn like a keyboard key, inside every toolbar button, in one line under the timeline and in the Keys sheet */
.sc-kc { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box;
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); color: var(--foreground);
  font: 700 11px/1 var(--mono); white-space: nowrap; vertical-align: middle; }
.sc .sc-kc { border-color: color-mix(in srgb, var(--text-muted) 55%, var(--border)); background: var(--surface-subtle); }
.sc-kcs { display: inline-flex; gap: 2px; margin-left: 6px; flex: none; }
.sc .btn .sc-kc { background: var(--surface-subtle); }
.sc .btn-primary .sc-kc { background: color-mix(in srgb, var(--brand-navy) 10%, transparent); color: var(--brand-navy); border-color: color-mix(in srgb, var(--brand-navy) 45%, transparent); }
.sc-capbtn .sc-kcs, .sc-ico .sc-kcs { margin-left: 4px; }
.sc-capbtn .sc-kcs { margin-left: 0; }
.sc-snap .sc-kcs { margin-left: 2px; }
.sc-keybar { display: flex; align-items: center; gap: 8px; height: 20px; white-space: nowrap; overflow: hidden; font-size: 12px; color: var(--text-muted); }
.sc-kb-i { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.sc-kb-i .sc-kc { margin-right: 1px; }
.sc-kb-dot { flex: none; opacity: 0.6; }
.sc-fit > #sc-keybar-box { flex: none; }
.sc-fit { gap: 4px; }
.sc-keys { width: min(560px, calc(100vw - 16px)); max-height: calc(100vh - 120px); overflow: auto; padding: 12px 14px; gap: 10px; font-size: 13px; box-sizing: border-box; }
.sc-keys-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sc-keys-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.sc-keys-grid h4 { margin: 0 0 4px; font-size: 12px; font-weight: 700; color: var(--text-muted); }
.sc-keys-r { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.sc-keys-k { display: inline-flex; gap: 2px; min-width: 66px; flex: none; }
.sc-keys-snd { border-top: 1px solid var(--border); padding-top: 8px; }
@media (max-width: 600px) { .sc-keys-grid { grid-template-columns: minmax(0, 1fr); } }

/* the version's name in the header (Oct 21, Mit): big enough to read, a click renames it */
.sc-vname { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; padding: 2px 6px; border: 1px solid transparent; border-radius: 8px;
  background: none; color: var(--foreground); font: inherit; font-size: 16px; cursor: text; overflow: hidden; }
.sc-vname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-vname:hover, .sc-vname:focus-visible { border-color: var(--border); background: var(--surface-subtle); }
.sc-pen { color: var(--text-muted); font-size: 12px; flex: none; }
.sc-app { flex: none; }
.sc-name { display: flex; align-items: center; gap: 2px; }
.sc-rename-in { min-height: 30px !important; padding: 2px 8px !important; font-size: 14px; width: 30ch; max-width: 100%; }
.sc-copy { width: 320px; }
.sc-fit .sc-top > .sc-name { flex: 1 1 auto; min-width: 180px; }
.sc-fit .sc-app { display: none; }                                   /* the app's own top bar already says "Video editor" */
.sc-fit.sc-narrow .sc-top .sc-kcs { display: none; }
.sc-fit.sc-narrow .sc-top > .sc-name { min-width: 100px; }

/* History (Oct 21): every kept save, newest first */
.sc-hist { width: min(380px, calc(100vw - 16px)); max-height: min(70vh, 560px); overflow: auto; box-sizing: border-box; }
.sc-hv-tip { margin: 0; }
.sc-hv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sc-hv { padding: 8px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; }
.sc-hv.now { background: var(--info-soft); margin: 0 -12px; padding: 8px 12px; }
.sc-hv-h { display: flex; align-items: center; gap: 6px; min-height: 26px; }
.sc-hv-who { color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12ch; }
.sc-hv-k { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-subtle); color: var(--text-muted); white-space: nowrap; }
.sc-hv-export { background: var(--success-soft); color: var(--success); }
.sc-hv-checkpoint { background: var(--info-soft); color: var(--accent-text); }
.sc-hv-before { background: var(--warn-soft); color: var(--warn); }
.sc-hv-now { background: var(--accent-text); color: var(--surface); }
.sc-hv-what { font-size: 13px; overflow-wrap: anywhere; }
.sc-hv-n { font-size: 12px; margin: 0; }
.sc-clock { font-size: 12px; }

/* Stage 1 (Oct 21): a clip from a film — its newer take, and the sheet that uses it */
.sc-newtake { position: absolute; left: 4px; bottom: 3px; z-index: 2; padding: 1px 6px; border-radius: 999px; border: 0; font: inherit; font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; color: var(--surface); background: var(--success); max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; }
.sc-newtake:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.sc-take { width: min(320px, calc(100vw - 16px)); box-sizing: border-box; }
.sc-take-price { margin: 0; font-weight: 600; }

/* Filters (Oct 21, FILTERS.md): Mit's Vintage as an adjustment layer above the Video track */
.sc-hd-flt, .sc-t-flt { height: 22px; }
.sc-t-flt .sc-b { top: 2px; bottom: 2px; }
.sc-t-flt .sc-btxt { line-height: 14px; font-size: 11px; font-weight: 600; }
.sc-flt { background: color-mix(in srgb, var(--warn) 22%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); }
.sc-flt.sc-flt-off { background: var(--surface-subtle); color: var(--text-muted); border-style: dashed; }
.sc-ftint { position: absolute; bottom: 0; height: 2px; background: color-mix(in srgb, var(--warn) 70%, transparent); pointer-events: none; }
.sc-hd-add { flex: 1 1 auto; min-width: 0; height: 18px; padding: 0 6px; border: 1px dashed color-mix(in srgb, var(--warn) 55%, var(--border)); border-radius: 4px; background: none; color: var(--warn);
  font: inherit; font-size: 11px; font-weight: 600; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.sc-hd-add:hover, .sc-hd-add:focus-visible { background: var(--warn-soft); border-style: solid; outline: none; }

/* Layers (Oct 21, stage 2): pictures over the clips, sounds under the voices; drop targets; the bin; Auto-Captions; the cuts page */
.sc-hd-ly, .sc-t-ly { height: 30px; }
.sc-hd-ly { gap: 2px; }
.sc-lyname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-li { background: color-mix(in srgb, var(--brand-cyan) 18%, var(--surface)); }
.sc-li-sound { background: color-mix(in srgb, var(--success) 18%, var(--surface)); }
.sc-li .sc-btxt { position: relative; z-index: 1; line-height: 22px; font-size: 11px; }
.sc-lthumb { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.55; pointer-events: none; }
.sc-lfd { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sc-lfd path { fill: none; stroke: var(--foreground); stroke-width: 1; opacity: 0.55; vector-effect: non-scaling-stroke; }
.sc-lfh { position: absolute; top: 1px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-blue); border: 1px solid var(--surface); cursor: ew-resize; z-index: 3; }
.sc-li-up { background: repeating-linear-gradient(45deg, var(--info-soft) 0 6px, var(--surface-subtle) 6px 12px); border-style: dashed; border-color: var(--brand-blue); cursor: default; }
.sc-track.sc-drop-on { background: color-mix(in srgb, var(--brand-blue) 14%, transparent); box-shadow: inset 0 0 0 2px var(--brand-blue); }
.sc-viewer.sc-drop-on { box-shadow: 0 0 0 3px var(--brand-blue); }
.sc-ghost { position: absolute; z-index: 6; border: 2px dashed var(--brand-blue); border-radius: 8px; background: color-mix(in srgb, var(--brand-blue) 22%, transparent); pointer-events: none; box-sizing: border-box; }
.sc-ghost.sc-ghost-new { border-style: dotted; }
.sc-lays { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sc-lyi, .sc-lyv { position: absolute; object-fit: cover; display: block; }
.sc-lyfx { position: absolute; display: flex; align-items: center; justify-content: center; color: white; font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px var(--foreground); background-size: cover; }
.sc-lframe { position: absolute; z-index: 99; box-sizing: border-box; border: 2px solid var(--brand-cyan); cursor: move; pointer-events: auto; touch-action: none; }
.sc-lframe-k { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; border-radius: 4px; background: var(--brand-cyan); cursor: nwse-resize; }
.sc-bin { border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 6px; }
.sc-bin-h { display: flex; align-items: center; gap: 6px; }
.sc-bin-t { flex: 1 1 auto; min-width: 0; text-align: left; border: 0; background: none; color: var(--foreground); font: inherit; font-size: 12px; font-weight: 600; padding: 2px 0; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-bin-add { white-space: nowrap; }
.sc-bin-row { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 2px; }
.sc-bin-empty { margin: 4px 0 0; font-size: 12px; }
.sc-bt { position: relative; flex: none; width: 64px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--surface-subtle); color: var(--foreground); font: inherit; font-size: 10px; cursor: grab; text-align: left; overflow: hidden; }
.sc-bt-pic { display: flex; align-items: center; justify-content: center; height: 40px; background-size: cover; background-position: center; font-size: 16px; }
.sc-bt-k { position: absolute; left: 3px; top: 2px; font-size: 10px; }
.sc-bt-len { position: absolute; right: 3px; top: 26px; padding: 0 3px; border-radius: 4px; background: color-mix(in srgb, var(--surface) 80%, transparent); font-variant-numeric: tabular-nums; }
.sc-bt-dot { position: absolute; right: 4px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.sc-bt-n { display: block; padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-ac { width: min(320px, calc(100vw - 16px)); box-sizing: border-box; }
.sc-acbtn { white-space: nowrap; }
.sc-list { display: flex; flex-direction: column; gap: 12px; }
.sc-list-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-list-h h2 { margin: 0; }
.sc-list-h .help { margin: 2px 0 0; }
.sc-list-q { width: min(260px, 100%); }
.sc-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sc-lt { display: flex; flex-direction: column; gap: 8px; padding: 10px; min-width: 0; }
.sc-lt-pic { height: 120px; border: 0; border-radius: var(--radius-small); background: var(--surface-subtle) center / cover no-repeat; font-size: 28px; cursor: pointer; color: var(--text-muted); }
.sc-lt-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-lt-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-lt-acts { gap: 6px; flex-wrap: wrap; }
.sc-new { display: flex; flex-direction: column; gap: 8px; padding: 12px; max-width: 560px; }
.sc-new-drop { border: 2px dashed var(--border); border-radius: var(--radius-card); padding: 22px 12px; text-align: center; color: var(--text-muted); cursor: pointer; }
.sc-new-drop.on { border-color: var(--brand-blue); background: color-mix(in srgb, var(--brand-blue) 12%, transparent); color: var(--foreground); }
.sc-new-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sc-new-list li span { margin-right: 6px; }

/* ==== the editor's own surface (Oct 23, Mit: "should feel like a real video-editing app") ====
   Dark in BOTH themes, the way Premiere, DaVinci and CapCut are: the app's tokens are mapped to the editor's deep greys (tokens.css
   --ed-*) inside .sc only, so every rule above — and the app's own buttons and inputs — take them; the rest of the app keeps its theme. */
.sc { --background: var(--ed-bg); --surface: var(--ed-panel); --surface-subtle: var(--ed-panel-2); --surface-sidebar: var(--ed-bg); --border: var(--ed-border);
  --foreground: var(--ed-text); --text: var(--ed-text); --text-muted: var(--ed-muted); --danger: var(--ed-danger); --danger-soft: var(--ed-danger-soft);
  --success: var(--ed-success); --success-soft: var(--ed-success-soft); --warn: var(--ed-warn); --warn-soft: var(--ed-warn-soft); --info-soft: var(--ed-info-soft);
  --accent-text: var(--ed-accent); --shadow-floating: var(--ed-shadow); --shadow-card: none; --brand-blue-solid: var(--brand-blue);
  color-scheme: dark; color: var(--ed-text); background: var(--ed-bg); padding: 8px; border-radius: var(--radius-card); box-sizing: border-box; }
.sc.sc-fit { gap: 8px; }
.sc .card { background: var(--ed-panel); border-color: var(--ed-border); box-shadow: none; }
.sc .help { color: var(--ed-muted); }
.sc .btn-outline, .sc .btn-secondary { background: var(--ed-raised); border-color: var(--ed-line); color: var(--ed-text); }
.sc .btn-outline:hover:not([disabled]), .sc .btn-secondary:hover:not([disabled]) { background: color-mix(in srgb, var(--ed-raised) 70%, var(--ed-line)); border-color: color-mix(in srgb, var(--ed-line) 60%, var(--ed-muted)); }
.sc .btn-outline:active:not([disabled]) { transform: translateY(1px); }
.sc .btn[disabled] { opacity: 0.45; }
.sc .btn-sm { min-height: 30px; border-radius: 8px; }
.sc .input, .sc select.input, .sc textarea.input { background: var(--ed-bg); border-color: var(--ed-line); color: var(--ed-text); }
.sc .sc-top { min-height: 40px; padding: 0 0 8px; border-bottom: 1px solid var(--ed-border); }
.sc .sc-side { background: var(--ed-panel); border: 1px solid var(--ed-border); border-radius: 8px; }
.sc .sc-viewer { border-radius: 4px; box-shadow: 0 0 0 1px var(--ed-border); }
.sc .sc-watch { position: relative; }
/* the timeline: track headers with their icons, a ruler like a pro editor's, crisp 4 px blocks with a glow when picked */
.sc .sc-tl { grid-template-columns: 148px minmax(0, 1fr); background: var(--ed-bg); border-color: var(--ed-border); border-radius: 8px; }
.sc .sc-heads { background: var(--ed-panel); border-right-color: var(--ed-border); }
.sc .sc-hd { gap: 6px; padding: 0 8px; color: var(--ed-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.01em; border-bottom-color: var(--ed-border); }
.sc .sc-hd-ic { flex: none; display: inline-flex; width: 14px; height: 14px; color: var(--ed-muted); }
.sc .sc-hd-ic svg { width: 14px; height: 14px; }
.sc .sc-hd-ruler { background: var(--ed-panel-2); }
.sc .sc-ruler { background: var(--ed-panel-2); border-bottom-color: var(--ed-line); }
.sc .sc-tick { border-left-color: var(--ed-line); color: var(--ed-muted); font-size: 10px; padding-top: 4px; }
.sc .sc-track { border-bottom-color: color-mix(in srgb, var(--ed-border) 70%, transparent); }
.sc .sc-b:hover { border-color: var(--ed-edge-hi); }
.sc .sc-b.sel { outline: 0; box-shadow: var(--ed-glow); z-index: 2; }
.sc .sc-pc { background: color-mix(in srgb, var(--brand-blue) 28%, var(--ed-panel)); }
.sc .sc-cp { background: color-mix(in srgb, var(--ed-success) 22%, var(--ed-panel)); }
.sc .sc-hl { background: color-mix(in srgb, var(--ed-danger) 22%, var(--ed-panel)); }
.sc .sc-flt { background: color-mix(in srgb, var(--ed-warn) 24%, var(--ed-panel)); border-color: color-mix(in srgb, var(--ed-warn) 50%, transparent); }
.sc .sc-code { background: var(--ed-code-bg); color: var(--ed-text); border-radius: 4px; }
.sc .sc-ph { width: 2px; background: var(--ed-danger); box-shadow: 0 0 6px color-mix(in srgb, var(--ed-danger) 60%, transparent); }
.sc .sc-ph::before { content: ""; position: absolute; top: 0; left: -5px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 9px solid var(--ed-danger); }
.sc .sc-ms { background: var(--ed-raised); border-color: var(--ed-line); }
.sc .sc-vbtn { background: color-mix(in srgb, var(--ed-bg) 70%, transparent); border-color: var(--ed-line); color: var(--ed-text); }
.sc .sc-vbtn-sz { width: auto; min-width: 26px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.sc .sc-vbtn-t:empty { display: none; }
.sc .sc-ico-svg { width: 14px; height: 14px; flex: none; }
.sc .sc-pill-saved { background: var(--ed-success-soft); }
.sc .sc-keybar { color: var(--ed-muted); }
.sc .sc-menu, .sc .sc-pop { background: var(--ed-panel); border-color: var(--ed-line); }
.sc .sc-mi:hover, .sc .sc-mi:focus-visible { background: var(--ed-raised); }
/* the phone view (Oct 23): the app drawn over the viewer; amber = seen but under the app's buttons and text, red = cut off in Feed */
.sc-sz { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-sz-amber { fill: color-mix(in srgb, var(--ed-warn) 34%, transparent); }
.sc-sz-red { fill: color-mix(in srgb, var(--ed-danger) 46%, transparent); }
.sc-sz-edge { stroke: var(--ed-danger); stroke-width: 3; stroke-dasharray: 14 10; }
.sc-sz-ui { fill: none; stroke: white; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.92; }
.sc-sz-ui .sc-sz-txt, .sc-sz-txt { fill: white; stroke: none; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.sc-sz-b { font-weight: 700; }
.sc-sz-s { opacity: 0.85; }
.sc-sz-cta { fill: color-mix(in srgb, white 22%, transparent); stroke: none; }
.sc-sz-disc { fill: color-mix(in srgb, white 25%, transparent); stroke-width: 3; }
.sc-sz-av { fill: color-mix(in srgb, white 30%, transparent); stroke-width: 3; }
.sc-sz-legend { position: absolute; left: 0; top: 0; z-index: 3; display: flex; flex-direction: column; gap: 4px; max-width: 168px; padding: 8px 10px; border: 1px solid var(--ed-border);
  border-radius: 8px; background: color-mix(in srgb, var(--ed-panel) 92%, transparent); font-size: 11px; color: var(--ed-muted); }
.sc-sz-legend b { color: var(--ed-text); font-size: 12px; }
.sc-sz-legend span { display: flex; align-items: center; gap: 6px; }
.sc-sw { flex: none; width: 10px; height: 10px; border-radius: 2px; border: 1px solid var(--ed-line); }
.sc-sw-clear { background: transparent; }
.sc-sw-amber { background: color-mix(in srgb, var(--ed-warn) 60%, transparent); }
.sc-sw-red { background: color-mix(in srgb, var(--ed-danger) 65%, transparent); }
.sc.sc-fit.sc-short { gap: 4px; padding: 4px 8px; }
.sc.sc-short .sc-top { min-height: 34px; padding-bottom: 4px; }
.sc-fit .sc-tlbar { flex-wrap: nowrap; min-width: 0; }
.sc-fit .sc-tlbar > * { flex-shrink: 0; }
.sc-fit.sc-narrow .sc-tlbar :not(.sc-capbtn) > .sc-kcs { display: none; }   /* the zoom − / + buttons ARE their keycaps: they stay
.sc-fit.sc-narrow .sc-zoom { width: 90px; }
.sc-sz-on .sc-vbtns { right: auto; left: 50%; transform: translateX(-50%); }

/* Regenerate (Oct 23): Movie Maker's review window, inside the editor — the takes side by side, make another, Replace */
.sc-rg-back { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 24px; background: color-mix(in srgb, var(--ed-bg) 72%, transparent); }
.sc-rg { display: flex; flex-direction: column; gap: 12px; width: min(1180px, 100%); max-height: 100%; padding: 16px; box-sizing: border-box; overflow: hidden;
  background: var(--ed-panel); color: var(--ed-text); border: 1px solid var(--ed-line); border-radius: 10px; box-shadow: var(--ed-shadow); }
.sc-rg-h { display: flex; align-items: flex-start; gap: 8px; }
.sc-rg-ttl b { font-size: 16px; }
.sc-rg-ttl .help { margin: 2px 0 0; }
.sc-rg-x { min-width: 32px; }
.sc-rg-msg { padding: 24px 0; text-align: center; }
.sc-rg-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; min-height: 0; overflow: hidden; }
.sc-rg-takes { display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; align-items: flex-start; min-height: 0; }
.sc-rg-take { flex: none; width: 200px; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--ed-border); border-radius: 8px; background: var(--ed-panel-2); }
.sc-rg-take.incut { border-color: var(--brand-blue); box-shadow: var(--ed-glow); }
.sc-rg-vid { position: relative; aspect-ratio: 9 / 16; max-height: 46vh; border-radius: 4px; overflow: hidden; background: var(--ed-bg); }
.sc-rg-vid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.sc-rg-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; text-align: center; color: var(--ed-muted); font-size: 12px; background: var(--ed-raised); }
.sc-rg-wait.busy { background: repeating-linear-gradient(45deg, var(--ed-raised) 0 10px, var(--ed-panel-2) 10px 20px); background-size: 28px 28px; animation: sc-rg-run 1.2s linear infinite; color: var(--ed-text); }
@keyframes sc-rg-run { from { background-position: 0 0; } to { background-position: 28px 0; } }
.sc-rg-badges { position: absolute; left: 6px; top: 6px; display: flex; gap: 4px; }
.sc-rg-b { padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--ed-bg); color: var(--ed-text); }
.sc-rg-b.cut { background: var(--brand-blue); color: var(--brand-navy); }
.sc-rg-th { font-size: 12px; color: var(--ed-muted); }
.sc-rg-th b { color: var(--ed-text); }
.sc-rg-note { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-rg-rep { width: 100%; justify-content: center; }
.sc-rg-make { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: auto; padding: 12px; border: 1px solid var(--ed-border); border-radius: 8px; background: var(--ed-panel-2); }
.sc-rg-mh { font-size: 14px; }
.sc-rg-ta { width: 100%; resize: vertical; box-sizing: border-box; }
.sc-rg-opts { display: flex; flex-direction: column; gap: 6px; }
.sc-rg-eng { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sc-rg-eng label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.sc-rg-n select { width: auto; min-height: 30px; padding: 2px 8px; }
.sc-rg-go { gap: 8px; margin-top: 4px; }
@media (max-width: 900px) { .sc-rg-body { grid-template-columns: minmax(0, 1fr); overflow: auto; } .sc-rg-take { width: 160px; } }
/* Regenerate, full control (Oct 29): pictures Keep · Replace · Remove, + Add (a small sheet over the window), length, the prompt, the model */
.sc-rg { position: relative; }
.sc-rg-body.full { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); }
.sc-rg-make.full { gap: 10px; }
.sc-rg-sec { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sc-rg-sh { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sc-rg-cnt { font-size: 12px; font-weight: 700; color: var(--ed-muted); }
.sc-rg-cnt.over { color: var(--danger); }
.sc-rg-pics { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sc-rg-pic { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--ed-border); border-radius: 8px; background: var(--ed-panel); }
.sc-rg-pic.off .sc-rg-pt { opacity: 0.4; }
.sc-rg-pic.off .sc-rg-nm { text-decoration: line-through; color: var(--ed-muted); }
.sc-rg-pic.add { border-style: dashed; }
.sc-rg-pt { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--ed-raised); display: flex; align-items: center; justify-content: center; flex: none; }
.sc-rg-pt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-rg-tile { font-size: 20px; }
.sc-rg-pn { display: flex; flex-direction: column; min-width: 0; font-size: 12px; }
.sc-rg-nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-rg-rp { font-size: 11px; }
.sc-rg-seg { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.sc-rg-seg .btn { padding: 0 8px; }
.sc-rg-seg .btn.on, .sc-rg-tabs .btn.on { background: var(--brand-blue); color: var(--brand-navy); border-color: var(--brand-blue); }
.sc-rg-addb { align-self: flex-start; }
.sc-rg-warn { margin: 0; color: var(--warn); }
.sc-rg-len { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sc-rg-len input[type="number"] { width: 72px; min-height: 30px; padding: 2px 8px; }
.sc-rg-len input[type="range"] { flex: 1; min-width: 0; }
.sc-rg-pr { min-height: 160px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.45; }
.sc-rg-q { display: flex; align-items: center; gap: 4px; }
.sc-rg-hl { display: flex; align-items: center; gap: 4px; }
.sc-rg-link { align-self: flex-start; border-color: transparent; background: none; color: var(--ed-accent); padding: 0 4px; }
.sc-rg-why, .sc-rg-pv { margin: 0; }
.sc-rg-why { color: var(--danger); }
.sc-rg-gom { display: flex; flex-direction: column; gap: 4px; }
.sc-rg-pick { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 16px; background: color-mix(in srgb, var(--ed-bg) 60%, transparent); }
.sc-rg-pk { display: flex; flex-direction: column; gap: 10px; width: min(560px, 100%); max-height: 100%; padding: 14px; box-sizing: border-box; background: var(--ed-panel); border: 1px solid var(--ed-line); border-radius: 10px; box-shadow: var(--ed-shadow); }
.sc-rg-tabs { gap: 6px; flex-wrap: wrap; }
.sc-rg-pb { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
.sc-rg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.sc-rg-cell { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px; min-width: 0; text-align: left; font: inherit; font-size: 12px; color: var(--ed-text); background: var(--ed-panel-2); border: 1px solid var(--ed-border); border-radius: 8px; cursor: pointer; }
.sc-rg-cell:hover, .sc-rg-cell:focus-visible { border-color: var(--brand-blue); }
.sc-rg-cell .sc-rg-pt { width: 100%; height: auto; aspect-ratio: 1; }
.sc-rg-cell .help { font-size: 11px; }
/* a phone (375 px): one column, the window the whole screen, the Make button stuck to the bottom, nothing scrolls sideways */
@media (max-width: 767px) {
  .sc-rg-back { padding: 0; align-items: stretch; }
  .sc-rg { width: 100%; max-height: none; height: 100%; border-radius: 0; overflow-x: hidden; overflow-y: auto; padding: 12px; }
  .sc-rg-body, .sc-rg-body.full { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .sc-rg-make { overflow: visible; }
  .sc-rg-takes { max-width: 100%; }
  .sc-rg-gom { position: sticky; bottom: 0; z-index: 1; margin: 0 -12px -12px; padding: 8px 12px 12px; background: var(--ed-panel-2); border-top: 1px solid var(--ed-border); }
  .sc-rg-go .btn-primary { flex: 1; justify-content: center; }
  .sc-rg-pic { grid-template-columns: 40px minmax(0, 1fr); }
  .sc-rg-pic .sc-rg-seg { grid-column: 1 / -1; justify-content: flex-start; }
  .sc-rg-pt { width: 40px; height: 40px; }
  .sc-rg-pick { padding: 8px; align-items: flex-end; }
}
.sc-cap-wait { position: sticky; left: 0; z-index: 4; display: inline-flex; align-items: center; height: 20px; margin-top: 3px; padding: 0 10px; border-radius: 4px; font-size: 11px; font-weight: 600;
  color: var(--ed-accent); background: var(--ed-info-soft); border: 1px solid color-mix(in srgb, var(--ed-accent) 40%, transparent); pointer-events: none; white-space: nowrap; }

/* the export workflow (Oct 23): the two choices, the slim progress bar in the header, the made videos */
.sc-ex { width: min(560px, calc(100vw - 16px)); box-sizing: border-box; }
.sc-ex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sc-ex-c { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--ed-border); border-radius: 8px; background: var(--ed-panel-2); }
.sc-ex-c .help { margin: 0; }
.sc-ex-c.off { opacity: 0.8; }
.sc-ex-c .btn { margin-top: auto; }
.sc-ex-why { margin: 0; font-size: 12px; color: var(--ed-warn); }
.sc-job { display: inline-flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 120px; max-width: 200px; flex: 0 1 auto; }
.sc-job-t { font-size: 11px; font-weight: 600; color: var(--ed-accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-job-bar { position: relative; height: 3px; border-radius: 2px; background: var(--ed-raised); overflow: hidden; }
.sc-job-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--gradient-primary); transform-origin: left center; transition: transform 300ms var(--ease-out); }   /* Oct 24: grows by transform, no layout per step */
.sc-fit .sc-top > .sc-job { flex-shrink: 1; min-width: 90px; }
.sc-made-n { margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--ed-raised); color: var(--ed-text); }
.sc-made { width: min(620px, calc(100vw - 16px)); max-height: min(78vh, 680px); overflow: auto; box-sizing: border-box; }
.sc-mv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sc-mv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding: 8px; border: 1px solid var(--ed-border); border-radius: 8px; background: var(--ed-panel-2); }
.sc-mv.newest { border-color: color-mix(in srgb, var(--brand-blue) 60%, var(--ed-border)); }
.sc-mv video { width: 120px; aspect-ratio: 9 / 16; max-height: 214px; object-fit: contain; background: var(--ed-bg); border-radius: 4px; }
.sc-mv-b { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sc-mv-h { display: flex; align-items: center; gap: 8px; }
.sc-mv-k { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--ed-raised); color: var(--ed-text); }
.sc-mv-k.final { background: var(--ed-success-soft); color: var(--ed-success); }
.sc-mv-acts { gap: 6px; flex-wrap: wrap; margin-top: auto; }
.sc a.btn { text-decoration: none; }
.sc-list-ic { display: inline-flex; vertical-align: -0.1em; margin-right: 8px; color: var(--accent-text); }
/* the frame (review 7): everything drawn over the picture — the dip to black, picture layers, headline, captions, the phone view — sits in
   ONE box with the frame's own shape, centred where the video is drawn (object-fit: contain), so nothing stretches in fullscreen */
.sc-frame { position: absolute; inset: 0; margin: auto; width: min(100cqw, calc(100cqh * var(--sc-ar, 0.5625))); height: min(100cqh, calc(100cqw / var(--sc-ar, 0.5625)));
  container-type: size; pointer-events: none; }
.sc-frame .sc-lframe, .sc-frame .sc-card { pointer-events: auto; }

/* Scene split (Oct 23) */
.sc-ss { width: min(300px, calc(100vw - 16px)); box-sizing: border-box; }
.sc-ss-say { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ed-muted); }
.sc-ss-spin { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ed-line); border-top-color: var(--brand-blue); animation: sc-ss-turn 0.8s linear infinite; }
@keyframes sc-ss-turn { to { transform: rotate(360deg); } }
.sc-rg-resplit { margin: 0; }

/* Clip speed (Oct 23) */
.sc-spbtn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sc-spbtn.on { border-color: var(--brand-blue); color: var(--ed-accent); }
.sc-sp { width: min(420px, calc(100vw - 16px)); box-sizing: border-box; }
.sc-sp .help { margin: 0; }
.sc-sp-row { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-sp-row .btn { flex: 1 1 0; flex-direction: column; min-width: 64px; min-height: 40px; }
.sc-sp-pick { border-color: var(--brand-blue); }
.sc-sp-hint { display: block; font-size: 10px; font-weight: 600; color: var(--ed-accent); }
.sc-sp-row .btn-primary .sc-sp-hint { color: var(--brand-navy); }
.sc-ex-note { margin: 0; color: var(--ed-warn); }
.sc-sp-ic { font-size: 11px; }
.sc-fit.sc-tlb-tight .sc-tlbar :not(.sc-capbtn) > .sc-kcs { display: none; }
.sc-fit.sc-tlb-tight .sc-zoom { width: 90px; }
.sc-fit.sc-tlb-tighter .sc-tlbar .sc-bw { display: none; }
.sc-fit.sc-tlb-tighter .sc-zoom { width: 64px; }
.sc-tlb-ic { display: none; }
.sc-fit.sc-tlb-tightest .sc-tlbar .sc-tlw { display: none; }
.sc-fit.sc-tlb-tightest .sc-tlbar .sc-tlb-ic { display: inline; }
.sc-fit.sc-tlb-tightest .sc-tlbar :not(.sc-capbtn) > .sc-kcs { display: none; }
.sc-fit.sc-tlb-tightest .sc-zoom { width: 48px; }
.sc-fit.sc-tlb-tightest .sc-tlbar { gap: 4px; }

/* Oct 23 (Mit): FULL SCREEN for the whole editor (⇧F). The editor covers the window (above the app's menu, top bar, jobs bar and chat);
   the browser's own full screen, when allowed, is on the page so the app's notes and dialogs still come over it. */
.sc.sc-wfull { position: fixed; inset: 0; z-index: 900; margin: 0; padding: 8px 12px; background: var(--ed-bg); border-radius: 0; max-width: none; }
html.sc-wfull-on, html.sc-wfull-on body { overflow: hidden; }
html.sc-wfull-on .toast-wrap { z-index: 1300; }
html.sc-wfull-on #modal-root > * { z-index: 1250; }
.sc-logo { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--brand-cyan); font-weight: 700; font-size: 13px; letter-spacing: .01em; }
.sc-logo-mark { width: 22px; height: 22px; flex: none; }
.sc-logo-wm { color: var(--ed-text, var(--foreground)); }
.sc-wfull-btn.on { border-color: var(--brand-cyan); color: var(--brand-cyan); }
.sc.sc-fit .sc-top .sc-kcs.sc-kcs-keep { display: inline-flex; }   /* the way out keeps its [Esc] at every width */
.sc-wf-short { display: none; }
.sc-fit.sc-wfull.sc-tightest .sc-top .sc-wf-long { display: none; }   /* a narrow full screen: "⛶ Exit [Esc]" — still the way out, in plain words */
.sc-fit.sc-wfull.sc-tightest .sc-top .sc-wf-short { display: inline; }
.sc-fit.sc-wfull.sc-tighter .sc-top .sc-logo-wm { display: none; }    /* the logo shrinks to the emblem */
.sc-pop.sc-ss { z-index: 1250; }                                       /* the scene split sheet and its Cancel stay above the Regenerate window */
html.sc-rg-on .toast-wrap { z-index: 1300; }
html.sc-rg-on #modal-root > * { z-index: 1250; }
.sc-spwrap { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.sc-spbtn.sc-spfail { border-color: var(--warn); color: var(--warn); }
.sc-sp-retry { white-space: nowrap; border-color: var(--warn); color: var(--warn); }
/* Round 9: the pick box and the slip readout */
.sc-marquee { position: absolute; z-index: 8; border: 1px dashed var(--brand-cyan); background: color-mix(in srgb, var(--brand-cyan) 12%, transparent); border-radius: 4px; pointer-events: none; }
.sc-slipnote { position: absolute; top: 2px; z-index: 9; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--surface); background: var(--brand-cyan); pointer-events: none; }
/* Round 9: punch-in zoom — the picture follows the hand; the zoomed clip says so on its tile */
.sc-viewer.sc-pan-ok { cursor: grab; }
.sc-viewer.sc-pan-ok:active { cursor: grabbing; }
.sc-panchip { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 6; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--ed-text, var(--foreground)); background: color-mix(in srgb, var(--ed-bg, var(--background)) 78%, transparent); border: 1px solid var(--ed-border, var(--border)); pointer-events: none; }
.sc-pztag { position: absolute; right: 4px; bottom: 3px; z-index: 2; padding: 0 5px; border-radius: 999px; font-size: 10px; font-weight: 700; color: var(--surface); background: var(--brand-cyan); pointer-events: none; }
.sc-pz-btns { flex-wrap: wrap; gap: 4px; }
/* Round 9: review notes — pins on the ruler, the Notes window */
.sc-npin { position: absolute; top: 2px; z-index: 3; width: 12px; height: 16px; margin-left: -6px; padding: 0; border: 0; border-radius: 3px 3px 6px 6px; background: var(--warn); box-shadow: 0 0 0 1px var(--ed-bg, var(--background)); cursor: pointer; }
.sc-npin::after { content: ""; position: absolute; left: 5px; top: 16px; width: 2px; height: 4px; background: var(--warn); }
.sc-npin.done { background: var(--ed-muted, var(--text-muted)); opacity: .7; }
.sc-npin:focus-visible { outline: 2px solid var(--brand-cyan); outline-offset: 1px; }
.sc-notes { width: min(380px, calc(100vw - 16px)); max-height: min(70vh, 560px); overflow: auto; box-sizing: border-box; padding: 12px; }
.sc-notes .sc-keys-h { gap: 8px; }
.sc-note-show { margin-left: auto; font-size: 12px; }
.sc-note-add { display: grid; gap: 6px; margin: 8px 0 10px; }
.sc-note-add textarea, .sc-note-edit { width: 100%; box-sizing: border-box; resize: vertical; min-height: 44px; font: inherit; font-size: 13px; }
.sc-note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sc-note { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-small); }
.sc-note.on { border-color: var(--brand-cyan); }
.sc-note.done .sc-note-t { color: var(--text-muted); text-decoration: line-through; }
.sc-note-at { border: 0; padding: 2px 6px; border-radius: 4px; background: var(--surface-subtle); color: var(--foreground); font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; cursor: pointer; }
.sc-note-t { margin: 0 0 2px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-note-acts { display: inline-flex; gap: 2px; margin-left: 4px; }
.sc-note-done { font-size: 12px; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.sc-note-none { margin: 4px 0; }
/* Round 9: the music under the voices; the caption look picker */
.sc-duck { margin-top: 8px; }
.sc-cl { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.sc-cl-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 4px 0 8px; }
.sc-cl-tile { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--surface-subtle); color: var(--foreground); font: inherit; cursor: pointer; }
.sc-cl-tile.on { border-color: var(--brand-cyan); box-shadow: 0 0 0 1px var(--brand-cyan); }
.sc-cl-tile:disabled { cursor: default; opacity: .7; }
.sc-cl-img { display: flex; align-items: center; justify-content: center; height: 44px; overflow: hidden; border-radius: 4px; background: color-mix(in srgb, var(--ed-bg, var(--background)) 70%, var(--brand-blue)); }
.sc-cl-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sc-cl-words { font-weight: 800; font-size: 10px; line-height: 1.1; text-align: center; color: var(--ed-text, var(--foreground)); padding: 2px; }
.sc-cl-house_big { font-size: 12px; }
.sc-cl-house_box { background: color-mix(in srgb, var(--ed-bg, var(--background)) 85%, transparent); border-radius: 4px; padding: 2px 4px; }
.sc-cl-name { font-size: 11px; font-weight: 600; text-align: center; }
/* the zoomed picture never shows what the export crops: the videos sit in a box the size of the ad frame */
.sc-vclip { position: absolute; inset: 0; margin: auto; width: min(100cqw, calc(100cqh * var(--sc-ar, 0.5625))); height: min(100cqh, calc(100cqw / var(--sc-ar, 0.5625))); overflow: hidden; }
.sc-frame.sc-zoomed { overflow: hidden; }

/* ---- round 10 (Oct 24): text callouts — on the video (the server's picture, or the same words in the same look while it is drawn),
   on their own layer above the pictures, and the "＋ Text" picker ---- */
.sc-lays { container-type: size; }
.sc-lytx { position: absolute; display: block; pointer-events: none; user-select: none; }
.sc-lytx-pic img { display: block; width: 100%; height: 100%; }
.sc-lytx-plain { transform: translate(-50%, -50%); white-space: nowrap; font-weight: 800; line-height: 1.22; color: white; text-align: center; --k: 1; }
.sc-lytx-plain span { display: inline-block; }
.sc-lytx-edit { pointer-events: auto; cursor: move; touch-action: none; }
.sc-lytx-edit:hover, .sc-lytx.sel { outline: 2px dashed var(--brand-cyan); outline-offset: 2px; }
.sc-tx-sz-s { --k: 0.8; } .sc-tx-sz-m { --k: 1; } .sc-tx-sz-l { --k: 1.25; }
.sc-lytx-plain.sc-tx-price_tag span { font-size: calc(7.5cqw * var(--k)); background: var(--danger); padding: 0.24em 0.38em; border-radius: 0.2em; }
.sc-lytx-plain.sc-tx-bullet span { font-size: calc(4.5cqw * var(--k)); background: color-mix(in srgb, var(--ed-bg) 65%, transparent); padding: 0.28em 0.4em; border-radius: 0.14em; text-align: left; }
.sc-lytx-plain.sc-tx-bullet span::before { content: "✔ "; }
.sc-lytx-plain.sc-tx-lower_third span { font-size: calc(4.5cqw * var(--k)); background: color-mix(in srgb, var(--ed-bg) 65%, transparent); padding: 0.3em 0.45em; border-radius: 0.1em; text-align: left; }
.sc-lytx-plain.sc-tx-big_number span { font-size: calc(11cqw * var(--k)); -webkit-text-stroke: 0.06em var(--ed-bg); paint-order: stroke fill; }
.sc-lytx .sc-red, .sc-txp-ex .sc-red { color: var(--danger); }
.sc-lytx-plain.sc-tx-price_tag .sc-red { color: white; text-decoration: underline; }
.sc-txed { position: absolute; z-index: 1200; min-width: 40%; transform: translate(0, 0); font: 700 14px/1.3 inherit; padding: 6px 8px; border: 2px solid var(--brand-cyan); border-radius: 8px; background: var(--ed-panel); color: var(--ed-text); resize: none; pointer-events: auto; }
.sc-txed.sc-txed-c { transform: translate(-50%, -50%); }
.sc-li-text { background: color-mix(in srgb, var(--brand-blue) 22%, var(--ed-panel)); }
.sc-tx-k { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 4px; background: var(--ed-raised); font-size: 10px; }
.sc-hd-ly-text .sc-lyname { font-weight: 700; }
.sc-txpick { width: 340px; }
.sc-txpick-g { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.sc-txp { display: grid; gap: 6px; justify-items: center; padding: 10px 6px; border: 1px solid var(--ed-border); border-radius: var(--radius-small); background: var(--ed-raised); color: var(--ed-text); cursor: pointer; font: inherit; }
.sc-txp:hover, .sc-txp:focus-visible { border-color: var(--brand-cyan); }
.sc-txp-ex { font-weight: 800; color: white; line-height: 1.2; white-space: pre-line; }
.sc-txp-ex.sc-tx-price_tag { background: var(--danger); padding: 2px 8px; border-radius: 4px; font-size: 16px; }
.sc-txp-ex.sc-tx-bullet, .sc-txp-ex.sc-tx-lower_third { background: color-mix(in srgb, var(--ed-bg) 70%, transparent); padding: 2px 8px; border-radius: 4px; font-size: 11px; text-align: left; }
.sc-txp-ex.sc-tx-bullet::before { content: "✔ "; }
.sc-txp-ex.sc-tx-big_number { font-size: 20px; -webkit-text-stroke: 1px var(--ed-bg); paint-order: stroke fill; }
.sc-txp-n { font-size: 12px; color: var(--ed-muted); }
.sc-tx-words { width: 100%; resize: vertical; }
.sc-tx-note { color: var(--ed-warn); }
.sc-bin-tx { margin-left: auto; }

/* ---- round 10 b: the 4:5 / 1:1 window on the video, "Also make" in Export, the shapes and openings of a make ---- */
.sc-crop { position: absolute; inset: 0; z-index: 1100; pointer-events: none; display: grid; grid-template-rows: var(--top, 0%) var(--h, 100%) 1fr; }
.sc-crop[hidden] { display: none; }
.sc-crop-a, .sc-crop-b { display: block; background: color-mix(in srgb, var(--ed-bg) 64%, transparent); }
.sc-crop-w { position: relative; box-sizing: border-box; border: 2px solid var(--brand-cyan); }
.sc-crop-edit .sc-crop-w { pointer-events: auto; cursor: ns-resize; touch-action: none; }
.sc-crop-t { position: absolute; left: 4px; top: 4px; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--brand-cyan); color: var(--ed-bg); }
.sc-vbtn-shp .sc-vbtn-t { font-weight: 700; }
.sc-ex-also { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ed-border); display: grid; gap: 6px; }
.sc-ex-also .row { gap: 14px; }
.sc-mv-shapes, .sc-mv-hooks li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.sc-mv-hooks { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; }
.sc-mv-shape { display: inline-flex; gap: 2px; }

/* ---- round 10 c: hook videos — the openings' tabs over the tracks and where the body starts ---- */
.sc-hooks { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 6px; border: 1px solid var(--ed-border); border-radius: var(--radius-small); background: var(--ed-panel-2); }
.sc-hk-t { display: inline-flex; align-items: stretch; border: 1px solid var(--ed-border); border-radius: var(--radius-small); background: var(--ed-raised); }
.sc-hk-t.on { border-color: var(--brand-cyan); background: color-mix(in srgb, var(--brand-cyan) 18%, var(--ed-raised)); }
.sc-hk-tab { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; border: 0; background: none; color: var(--ed-text); font: inherit; font-size: 12px; cursor: pointer; }
.sc-hk-n { color: var(--ed-muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-hk-x { border: 0; border-left: 1px solid var(--ed-border); background: none; color: var(--ed-muted); padding: 0 8px; cursor: pointer; font-size: 14px; }
.sc-hk-x:hover { color: var(--ed-danger); }
.sc-hk-in { width: 180px; font-size: 12px; padding: 3px 8px; }
.sc-hk-only { color: var(--ed-warn); }
.sc-hk-line { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--ed-warn); z-index: 6; pointer-events: none; }
.sc-hk-line span { position: absolute; top: 1px; left: 4px; white-space: nowrap; font-size: 10px; font-weight: 700; color: var(--ed-bg); background: var(--ed-warn); padding: 0 5px; border-radius: 4px; }
.sc-hk-note { color: var(--ed-warn); }

/* ---- sound effects: the Sounds tab of the bin, its windows, the suggested (ghost) sounds on the Sound effects layer ---- */
.sc-bin-t.on { color: var(--ed-text); font-weight: 700; } .sc-bin-t:not(.on) { color: var(--ed-muted); font-weight: 600; }
.sc-bin-h .sc-bin-t + .sc-bin-t { flex: none; margin-left: 4px; }
.sc-sfx { display: grid; gap: 6px; max-height: 200px; overflow-y: auto; padding-right: 2px; }
.sc-sfx-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; position: sticky; top: 0; background: var(--ed-panel); padding-bottom: 4px; z-index: 1; }
.sc-sfx-q { flex: 1 1 140px; min-width: 120px; font-size: 12px; padding: 4px 8px; }
.sc-sfx-g h5 { margin: 6px 0 2px; font-size: 11px; color: var(--ed-muted); font-weight: 700; }
.sc-sfx-r { display: grid; grid-template-columns: auto 1fr auto auto; grid-template-areas: "p t l add" "p c c add"; gap: 0 6px; align-items: center; padding: 4px 6px; border: 1px solid var(--ed-border); border-radius: var(--radius-small); background: var(--ed-raised); cursor: grab; }
.sc-sfx-p { grid-area: p; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--ed-line); background: var(--ed-panel); color: var(--ed-text); cursor: pointer; font-size: 11px; }
.sc-sfx-p.on { border-color: var(--brand-cyan); color: var(--brand-cyan); }
.sc-sfx-t { grid-area: t; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-sfx-l { grid-area: l; font-size: 11px; color: var(--ed-muted); font-variant-numeric: tabular-nums; }
.sc-sfx-cc { grid-area: c; font-size: 10px; color: var(--ed-success); }
.sc-sfx-add { grid-area: add; }
.sc-sfxmk, .sc-sfxsg { width: 320px; }
.sc-sfxmk textarea { width: 100%; resize: vertical; }
.sc-ghosts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; padding: 4px 8px; border: 1px dashed var(--brand-cyan); border-radius: var(--radius-small); font-size: 12px; }
.sc-li-ghost { background: transparent; border: 1px dashed var(--brand-cyan); opacity: 0.85; display: flex; align-items: center; gap: 2px; padding-right: 2px; }
.sc-li-ghost .sc-btxt { flex: 1 1 auto; }
.sc-gh-b { flex: none; width: 18px; height: 18px; padding: 0; border: 1px solid var(--ed-line); border-radius: 4px; background: var(--ed-panel); color: var(--ed-text); font-size: 11px; line-height: 1; cursor: pointer; }
.sc-gh-b:hover { border-color: var(--brand-cyan); }
.sc-bin-h { flex-wrap: wrap; row-gap: 4px; }
.sc-bin-h .sc-bin-t:first-child { flex: 0 1 auto; min-width: 84px; }
/* round 10 review: the 4:5 / 1:1 window is moved by its edges and its label only — a callout under it stays reachable */
.sc-crop-edit .sc-crop-w { pointer-events: none; cursor: default; }
.sc-crop-e { position: absolute; left: 0; right: 0; height: 12px; display: block; }
.sc-crop-e1 { top: -6px; } .sc-crop-e2 { bottom: -6px; }
.sc-crop-edit .sc-crop-e, .sc-crop-edit .sc-crop-t { pointer-events: auto; cursor: ns-resize; touch-action: none; }
/* round 10 review: a narrow bin (1024 wide) — the header and the Sounds row on one line each, the list scrolls in its own box */
.sc-bin { container-type: inline-size; }
.sc-bin-h.sc-bin-hs { flex-wrap: nowrap; }   /* the Sounds tab: one row (the Files tab may wrap "Add from my files") */
.sc-bin-h .sc-bin-t:first-child { flex: 0 1 auto; min-width: 56px; }
.sc-sfx-top { flex-wrap: nowrap; }
.sc-sfx-top .btn { flex: none; white-space: nowrap; }
.sc-sfx-q { flex: 1 1 80px; min-width: 64px; }
.sc-sh { display: none; }
.sc-sfx { max-height: max(120px, min(320px, calc(var(--sc-vh, 56vh) - 16px))); }   /* it fits the side panel: the list scrolls in its own box */
@container (max-width: 380px) {
  .sc-lg { display: none; } .sc-sh { display: inline; }
  .sc-sfx-top .btn { padding-left: 8px; padding-right: 8px; }
}
/* the hooks bar (round 10 review 2): one row when it fits, else it wraps — every control stays in reach; inactive tabs show their
   letter only (the name is in the tip), the help line gives way first, the suggestions ride in it as a chip */
.sc #sc-hooks-box { container-type: inline-size; }
.sc-hooks { flex-wrap: wrap; row-gap: 4px; min-width: 0; padding: 3px 6px; }
.sc-hooks > * { flex: none; }
.sc-hooks > .sc-hk-only { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-hooks > .sc-grow { flex: 1 1 0; min-width: 0; }
.sc-hk-t:not(.on) .sc-hk-n { display: none; }
.sc-hk-t.on .sc-hk-n { max-width: 160px; }
.sc-hk-in { width: 140px; }
.sc-ghchip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 2px 1px 8px; border: 1px dashed var(--brand-cyan); border-radius: var(--radius-small); }
.sc-ghchip .btn { padding-top: 2px; padding-bottom: 2px; }
@container (max-width: 820px) {
  .sc-hooks .sc-lg { display: none; } .sc-hooks .sc-sh { display: inline; }
  .sc-hk-t.on .sc-hk-n { max-width: 90px; }
}
@container (max-width: 380px) {
  .sc-sfx-r { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "p t l" "p c add"; }
  .sc-sfx-top .btn, .sc-sfx-add { font-size: 12px; }
}
@container (max-width: 260px) { .sc-bin-tx .sc-kcs { display: none; } }   /* the T keycap goes only when the bin is very narrow */
.sc-dis { display: inline-flex; }   /* a disabled button's tip (opening B–D: layers are edited on opening A) */
.sc-bin-h .sc-dis { margin-left: auto; }
