/* THE EDITOR, DENSER (27 Oct 2026). The picture and the timeline are the work; every other strip is as thin as it can be while staying easy to hit.
   Design rules used (8 px grid, 32 px minimum hit height for desktop tools, one line per control group, progressive disclosure: descriptions sit on hover, not in the way).
   - the timeline's tool bar is ONE scrolling row (it used to wrap onto three and took a third of the timeline's height)
   - the media panel's header is one row of buttons and a single scrolling row of filters
   - the edit panel's title and its one-line help share a row; its cards are tighter
   - the side panels never take more than half of the work area between them (editor.js applyWidths), so the preview always has room */

/* ---- timeline tool bar: one row ---- */
.ed-v3 .tl-toolbar { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 6px; padding: 3px 6px; scrollbar-width: thin; scrollbar-color: #2a3350 transparent; }
.ed-v3 .tl-toolbar > * { flex: none; }
.ed-v3 .tl-tools { flex-wrap: nowrap; gap: 4px; row-gap: 0; }
.ed-v3 .tl-zoomgroup { margin-left: auto; }
.ed-v3 .tl-toolbar .icon-btn, .ed-v3 .tl-ib { min-width: 30px; height: 30px; }

/* ---- media panel header ---- */
.ed-v3 .bin-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; }
.ed-v3 .bin-head > b { display: none; }
.ed-v3 .bin-head .grow { display: none; }
.ed-v3 .bin-head .btn.small { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0 8px; height: 30px; white-space: nowrap; }
.ed-v3 .bin-filters { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px; padding: 0 8px 6px; scrollbar-width: none; }
.ed-v3 .bin-filters > * { flex: none; }
.ed-v3 .bin-tabs { padding: 2px 6px; min-height: 36px; }

/* ---- edit panel ---- */
.insp2-head { flex-direction: row; align-items: baseline; flex-wrap: nowrap; gap: 8px; padding: 7px 12px; min-height: 0; }
.insp2-head b { font-size: 14px; white-space: nowrap; }
.insp2-head > span, .insp2-head .muted { font-size: 11.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insp2-list { padding: 6px 8px 14px; gap: 4px; }
.insp2-card-h { padding: 8px 10px; }
.ed-v3 .insp-bar { padding: 3px 6px 3px 10px; }

/* ---- the player's own bar and the top bar ---- */
.ed-v3 .ed-top { height: 42px; }
.ed-v3 .pl-bar { padding: 3px 8px; }

/* ---- a short window: shave the rest ---- */
@media (max-height: 760px) {
  .ed-v3 .ed-top { height: 38px; }
  .ed-v3 .ed-rail .rail-b { padding: 5px 2px 3px; }
  .ed-v3 .tl-toolbar .icon-btn, .ed-v3 .tl-ib { min-width: 28px; height: 28px; }
}

/* ---- the Generations pane floats over the editor instead of squeezing it (it used to take 372 px from the preview) ---- */
body.ed-full #activity { position: fixed; right: 0; top: 0; bottom: 0; z-index: 80; box-shadow: none; }
body.ed-full.act-open #activity { box-shadow: -18px 0 40px rgba(0, 0, 0, .5); }

/* ---- timeline: the ruler stays on top and the track names scroll with their tracks ---- */
.tl-labels { overflow: hidden; }
.tl-scroll { overflow: auto; }
.ed-v3 .tl-ruler { position: sticky; top: 0; z-index: 5; }
.tl-labels { padding-bottom: 14px; box-sizing: border-box; }

/* ---- side by side: the original next to the edited cut (tall video side by side, wide video one above the other) ---- */
.pl-stage .cmp { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: #07090e; }
.cmp[hidden] { display: none; }
.cmp-grid { flex: 1; min-height: 0; display: grid; gap: 6px; padding: 6px; }
.cmp-grid.side { grid-template-columns: 1fr 1fr; }
.cmp-grid.stack { grid-template-rows: 1fr 1fr; }
.cmp-grid.swapped > .cmp-cell:first-child { order: 2; }
.cmp-cell { position: relative; min-width: 0; min-height: 0; display: grid; place-items: center; background: #000; border-radius: 8px; overflow: hidden; }
.cmp-video { max-width: 100%; max-height: 100%; width: auto; height: auto; aspect-ratio: var(--ar, 9 / 16); object-fit: contain; background: #000; }
.cmp-tag { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(9, 12, 20, .7); color: #fff; font-size: 11px; font-weight: 700; }
.cmp-msg { position: absolute; inset: auto 0 10px 0; text-align: center; font-size: 12px; color: #cbd5e1; pointer-events: none; }
.cmp-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #0c0f18; border-top: 1px solid var(--line); }
.cmp-scrub { flex: 1; min-width: 0; }

/* ---- media tiles and effect cards: small type, more per screen, more information on each ---- */
.ed-v3 .bin-list { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; padding: 6px 8px; }
.ed-v3 .bin-item { font-size: 11px; }
.ed-v3 .bin-item .bi-name, .ed-v3 .bin-item b { font-size: 11px; line-height: 1.25; }
.ed-v3 .bin-item .muted { font-size: 10px; }
/* effects: two or three cards per row, a card that is switched on takes the whole row for its slider */
.ed-v3 .fx-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 6px; }
.ed-v3 .fx-group { grid-column: 1 / -1; margin: 8px 0 0; font-size: 10.5px; }
.ed-v3 .fx-card { padding: 6px 8px; border-radius: 9px; font-size: 12px; min-width: 0; }
.ed-v3 .fx-card.on { grid-column: 1 / -1; }
.ed-v3 .fx-head { padding: 0; gap: 6px; font-size: 12.5px; }
.ed-v3 .fx-head b { font-size: 12.5px; font-weight: 650; }
.ed-v3 .fx-card p { margin: 2px 0 0; font-size: 11px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ed-v3 .fx-card.on p { -webkit-line-clamp: unset; }
.ed-v3 .live-tag { font-size: 9.5px; }
/* the cards of the edit panel and their sliders */
.ed-v3 .insp2-card-h { font-size: 13px; }
.ed-v3 .insp2-body { padding: 4px 10px 10px; font-size: 12px; }
.ed-v3 .insp-tab .muted, .ed-v3 .insp2-body .hint { font-size: 11px; }
.ed-v3 .insp2-body .slider-row, .ed-v3 .insp2-body .sl { margin: 3px 0; }

/* ---- extra tracks: layers over the film, extra audio, adjustment layers ---- */
.tl-lane.layers, .tl-lane.audio2, .tl-lane.adjust { position: relative; }
.tk-bar { position: absolute; display: flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 6px; font-size: 11px; line-height: 21px; overflow: hidden; white-space: nowrap; cursor: grab; color: #fff; border: 1px solid transparent; box-sizing: border-box; }
.tk-bar .tk-name { overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.tk-bar .trim.r { position: absolute; right: 0; top: 0; bottom: 0; width: 7px; cursor: ew-resize; background: rgba(255, 255, 255, .28); }
.tk-bar.selected { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.tk-bar.item-off { opacity: .4; }
.tk-layer { background: rgba(236, 72, 153, .55); border-color: rgba(236, 72, 153, .9); }
.tk-atrack { background: rgba(16, 185, 129, .5); border-color: rgba(16, 185, 129, .9); } .tk-atrack.sound { background: rgba(34, 211, 238, .45); border-color: rgba(34, 211, 238, .9); }
.tk-fxlayer { background: rgba(167, 139, 250, .5); border-color: rgba(167, 139, 250, .9); }
.tk-card .insp-sec h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

/* =====================================================================================================================
   Edit panel: find a setting, what is applied, compact layout, jump-to-control highlight; effects lane chips
   ===================================================================================================================== */
.insp2-tools { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 6px 8px 6px; border-bottom: 1px solid var(--line); position: relative; }
.insp-search { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 0 4px 0 9px; min-height: 32px; }
.insp-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg); }
.insp-search > .ic, .insp-search > svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.insp-search-input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-size: 13px; padding: 6px 0; }
.insp-search-input::placeholder { color: var(--muted); }
.insp-density { flex: none; width: 28px; height: 26px; display: grid; place-items: center; border-radius: 7px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.insp-density:hover { background: var(--panel-3); color: var(--text); }
.insp-density[aria-pressed="true"] { color: var(--accent-2); background: var(--accent-bg); }
.insp-results { display: flex; flex-wrap: wrap; gap: 5px; max-height: 150px; overflow: auto; padding: 2px 0; }
.insp-result { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-size: 12px; cursor: pointer; }
.insp-result:hover, .insp-result:focus-visible { border-color: var(--accent); background: var(--accent-bg); }
.insp-result .r-g { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.insp-none { font-size: 12px; padding: 2px 4px; }
.insp-applied { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.insp-applied .ap-l { font-size: 11px; margin-right: 2px; }
.ap-chip, .fx-chip { --chip: 166, 120, 255; }
.ap-chip { padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; cursor: pointer; color: #efe6ff; background: rgba(var(--chip), .22); border: 1px solid rgba(var(--chip), .6); }
.ap-chip:hover, .ap-chip:focus-visible { background: rgba(var(--chip), .45); color: #fff; }
.k-look { --chip: 255, 170, 80; } .k-effect { --chip: 166, 120, 255; } .k-anim, .k-fades, .k-speed { --chip: 90, 170, 255; } .k-transition { --chip: 70, 200, 140; } .k-crop, .k-text { --chip: 220, 120, 190; }

/* the control a click on an applied effect lands on */
@keyframes focus-glow { 0% { box-shadow: 0 0 0 0 rgba(108, 140, 255, .9), 0 0 0 0 rgba(108, 140, 255, .5); } 40% { box-shadow: 0 0 0 4px rgba(108, 140, 255, .85), 0 0 22px 6px rgba(108, 140, 255, .55); } 100% { box-shadow: 0 0 0 2px rgba(108, 140, 255, .0), 0 0 0 0 rgba(108, 140, 255, 0); } }
.focus-flash { animation: focus-glow 1.1s ease-out 2; outline: 2px solid var(--accent-2); outline-offset: 1px; border-radius: 9px; }

/* effects lane: one clickable chip per look / effect / animation / transition */
.fx-bar { padding: 2px; gap: 2px; cursor: default; align-items: stretch; }
.fx-chip { flex: 1 1 0; min-width: 14px; max-width: 150px; height: 100%; padding: 0 6px; border-radius: 4px; border: 0; font: inherit; font-size: 11px; font-weight: 600; color: #f5eeff; background: rgba(var(--chip), .38); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; text-align: left; }
.fx-chip:hover, .fx-chip:focus-visible { background: rgba(var(--chip), .8); color: #fff; outline: 2px solid #fff; outline-offset: -2px; }

/* compact layout: more of every card fits on the screen (the default; the button in the panel switches it off) */
.insp2.compact .insp2-list { padding: 4px 6px 12px; gap: 3px; }
.insp2.compact .insp2-card-h { padding: 5px 8px; min-height: 30px; gap: 7px; font-size: 12.5px; }
.insp2.compact .insp2-card-h .c-sub { font-size: 11px; max-width: 96px; }
.insp2.compact .insp2-body { padding: 2px 8px 8px; }
.insp2.compact .insp-hint { display: none; }
.insp2.compact .insp-sec { padding: 5px 0 4px; } .insp2.compact .insp-sec h4 { margin-bottom: 3px; font-size: 11.5px; }
.insp2.compact .sl-row { margin: 4px 0; } .insp2.compact .sl-label { font-size: 12px; }
.insp2.compact .swatch-grid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 5px; margin: 4px 0; }
.insp2.compact .sw-btn { padding: 2px; border-radius: 7px; } .insp2.compact .swatch .sw-img { aspect-ratio: 16 / 9; } .insp2.compact .swatch span { font-size: 10.5px; margin-top: 2px; }
.insp2.compact .trans-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 5px; margin: 4px 0; }
.insp2.compact .trans-card { padding: 4px; } .insp2.compact .trans-card span { font-size: 10.5px; }
.insp2.compact .fx-list { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 4px; }
.insp2.compact .fx-card { padding: 4px 7px; } .insp2.compact .fx-card p { -webkit-line-clamp: 1; }
.insp2.compact .fx-card.on p { -webkit-line-clamp: 2; }
.insp2.compact .fx-group { margin: 6px 0 2px; font-size: 11px; }
.insp2.compact .anim-presets { gap: 4px; } .insp2.compact .anim-presets .chip { padding: 3px 8px; font-size: 11.5px; }
.insp2.compact .key-row { padding: 6px 8px; }
@media (prefers-reduced-motion: reduce) { .focus-flash { animation: none; } }
