/* The audio studio (Pages/Audio) and everything js/audio-ui.js, audio-timeline.js and audio-dialogs.js build inside it.
   It reuses the photo editor's chrome — menus, dialogs, buttons, sliders, toasts are photo.css's .pe-* — and a few of the video
   editor's panel classes (.ve-tab, .ve-pane, .ve-ins, .ve-sec, …, from video.css); .ae-* is what an audio editor adds. Chrome follows
   the app's tokens, so it follows light and dark with the rest of the site. */

.ae {
    --ae-left: 15rem;
    --ae-right: 18.5rem;
    --ae-lane: #1b1e24;
    --ae-lane-sel: #20252e;
    --ae-wave: rgba(255, 255, 255, .92);
    --ae-meter-bg: #14161a;
}
@media (prefers-color-scheme: light) {
    .ae { --ae-lane: #e9ecf1; --ae-lane-sel: #f1f4f8; --ae-wave: rgba(15, 23, 42, .85); --ae-meter-bg: #d7dbe3; }
}
:root[data-theme="light"] .ae { --ae-lane: #e9ecf1; --ae-lane-sel: #f1f4f8; --ae-wave: rgba(15, 23, 42, .85); --ae-meter-bg: #d7dbe3; }
:root[data-theme="dark"] .ae { --ae-lane: #1b1e24; --ae-lane-sel: #20252e; --ae-wave: rgba(255, 255, 255, .92); --ae-meter-bg: #14161a; }

.ae-name { max-width: 16rem; }

/* ---- transport bar ---- */
.ae-bar { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .2rem; padding: .3rem .6rem; border-bottom: 1px solid var(--pe-line); background: var(--rl-surface); }
.ae-bar__grp { display: inline-flex; align-items: center; gap: .1rem; }
.ae-bar .pe-ib { width: 2rem; }
.ae-play.is-on { background: var(--rl-ok); color: #fff; }
.ae-rec { color: var(--rl-danger); }
.ae-rec.is-on { background: var(--rl-danger); color: #fff; animation: ae-pulse 1.2s ease-in-out infinite; }
@keyframes ae-pulse { 50% { opacity: .65; } }
.ae-bar__meters { gap: .35rem; margin: 0 .3rem; color: var(--rl-text-muted); }
.ae-meter { display: block; width: 150px; height: 26px; border-radius: 5px; cursor: pointer; }
.ae-meter--in { width: 90px; }
.ae-vol { width: 5.5rem; accent-color: var(--rl-accent); }
.ae-bar__time { gap: .5rem; }
.ae-tf { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; color: var(--rl-text-muted); }
.ae-time { width: 8.6rem; font: 600 .8rem ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; padding: .22rem .4rem; user-select: text; }
.ae-tfmt { font-size: .74rem; padding: .22rem .3rem; }

/* ---- layout ---- */
.ae-work { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: var(--ae-left) minmax(0, 1fr) var(--ae-right); }
.ae-left, .ae-right { min-height: 0; }
.ae-right { overflow-y: auto; }
.ae-tabs { grid-template-columns: repeat(2, 1fr); }
.ae-status { flex: none; display: flex; gap: 1rem; padding: .2rem .7rem; border-top: 1px solid var(--pe-line); background: var(--rl-surface); font-size: .72rem; color: var(--rl-text-muted); font-variant-numeric: tabular-nums; }
.ae-field { display: grid; grid-template-columns: 5.8rem minmax(0, 1fr); align-items: center; gap: .4rem; }
.ae-field .pe-input { min-width: 0; width: 100%; user-select: text; }
.ae-dl { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; margin: 0; font-size: .78rem; }
.ae-dl dt { color: var(--rl-text-muted); }
.ae-dl dd { margin: 0; font-variant-numeric: tabular-nums; user-select: text; }
.ae-dl--wide { font-size: .84rem; grid-template-columns: 11rem 1fr; }
.ae-swatches { display: flex; flex-wrap: wrap; gap: .3rem; }
.ae-swatch { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.ae-swatch.is-on { border-color: var(--rl-text); }
.ae-lbllist { display: flex; flex-direction: column; gap: .3rem; }
.ae-lblrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .3rem; align-items: center; }
.ae-lbltext { font-size: .78rem; padding: .2rem .4rem; user-select: text; }

/* ---- timeline ---- */
.ae-tl { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--pe-work); }
.ae-ruler-row, .ae-label-row { flex: none; display: flex; }
.ae-ruler-row { height: 28px; border-bottom: 1px solid var(--pe-line); }
.ae-label-row { height: 22px; }
.ae-corner, .ae-labelhead { flex: none; width: 188px; box-sizing: border-box; background: var(--rl-surface); border-right: 1px solid var(--pe-line); }
.ae-labelhead { display: flex; align-items: center; gap: .3rem; padding: 0 .6rem; font-size: .7rem; color: var(--rl-text-muted); border-bottom: 1px solid var(--pe-line); }
.ae-ruler { display: block; cursor: ew-resize; touch-action: none; }
.ae-labelcv { display: block; cursor: pointer; touch-action: none; }
.ae-tracks { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; position: relative; overscroll-behavior: contain; touch-action: pan-y; }
.ae-rows { position: relative; }
.ae-row { display: flex; position: relative; }
.ae-lane { display: block; flex: none; touch-action: pan-y; }
.ae-over { position: absolute; top: 0; left: 188px; pointer-events: none; }
.ae-empty { position: absolute; left: 188px; right: 0; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; color: var(--rl-text-muted); text-align: center; padding: 1rem; pointer-events: none; }
.ae-hscroll { flex: none; height: 14px; position: relative; background: var(--rl-surface); border-top: 1px solid var(--pe-line); cursor: pointer; }
.ae-hthumb { position: absolute; top: 2px; bottom: 2px; border-radius: 5px; background: var(--rl-text-muted); opacity: .45; }
.ae-hscroll:hover .ae-hthumb { opacity: .7; }
.ae-hscroll.is-full .ae-hthumb { opacity: .15; }

/* ---- track header ---- */
.ae-head { position: relative; z-index: 3; flex: none; width: 188px; box-sizing: border-box; padding: .3rem .45rem .5rem; display: flex; flex-direction: column; gap: .2rem; overflow: hidden;
    background: var(--rl-surface); border-right: 1px solid var(--pe-line); border-bottom: 1px solid var(--pe-line); }
.ae-row.is-sel .ae-head { background: var(--rl-surface-raised); box-shadow: inset 3px 0 0 var(--rl-accent); }
.ae-row.is-muted .ae-head__name { opacity: .5; text-decoration: line-through; }
.ae-head__top { display: flex; align-items: center; gap: .3rem; min-width: 0; }
.ae-head__sw { flex: none; width: .8rem; height: .8rem; border-radius: 50%; border: 0; cursor: pointer; padding: 0; }
.ae-head__name { font-weight: 700; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; }
.ae-head__btns { display: flex; align-items: center; gap: .25rem; }
.ae-head__kind { font-size: .66rem; color: var(--rl-text-muted); margin-left: .2rem; }
.ae-hb { min-width: 1.45rem; height: 1.35rem; border: 1px solid var(--pe-line); background: var(--rl-surface-raised); border-radius: 5px; font-size: .68rem; font-weight: 700; cursor: pointer; display: inline-grid; place-items: center; padding: 0 .2rem; color: var(--rl-text-muted); }
.ae-hb:hover { color: var(--rl-text); }
.ae-hb--ico { border-color: transparent; background: transparent; }
.ae-hb--m.is-on { background: var(--rl-danger); border-color: var(--rl-danger); color: #fff; }
.ae-hb--s.is-on { background: #d97706; border-color: #d97706; color: #fff; }
.ae-head__mix { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr) 3.4rem; align-items: center; gap: .25rem; font-size: .66rem; color: var(--rl-text-muted); }
.ae-head__lab { display: inline-flex; justify-content: center; font-size: .6rem; }
.ae-head__rng { width: 100%; min-width: 0; height: 14px; margin: 0; accent-color: var(--rl-accent); }
.ae-head__val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ae-row.is-compact .ae-head__pan, .ae-row.is-compact .ae-head__kind { display: none; }
.ae-row.is-tiny .ae-head__mix { display: none; }
.ae-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; cursor: row-resize; touch-action: none; }
.ae-resize:hover { background: color-mix(in srgb, var(--rl-accent) 40%, transparent); }

/* ---- dialogs and misc ---- */
.ae-busy { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; background: rgba(0, 0, 0, .45); color: #fff; font-weight: 600; backdrop-filter: blur(1.5px); }
.ae-spin { position: static; width: 28px; height: 28px; border-width: 3px; }
.ae-fx .pe-rng { display: grid; grid-template-columns: 7rem minmax(0, 1fr) auto; align-items: center; gap: .4rem; width: 100%; }
.ae-fx .pe-rng__label { font-size: .76rem; color: var(--rl-text-muted); }
.ae-fx .pe-rng input[type=range] { width: 100%; min-width: 0; }
.ae-fx .pe-rng__num { width: 4.2rem; }
.ae-fx .pe-sel { display: grid; grid-template-columns: 7rem minmax(0, 1fr); align-items: center; gap: .4rem; }
.ae-fx .pe-sel select, .ae-fx .pe-input { width: 100%; min-width: 0; }
.ae-fxstatus { min-height: 1.2em; }
.ae-proj { display: grid; grid-template-columns: 1fr auto auto auto; gap: .6rem; align-items: center; padding: .45rem .6rem; border: 1px solid var(--pe-line); border-radius: var(--rl-radius); }
.ae-proj.is-cur { border-color: var(--rl-accent); }
.ae-libfilters { display: flex; gap: .6rem; flex-wrap: wrap; }
.ae-libfilters > * { flex: 1 1 12rem; min-width: 0; }
.ae-liblist { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .4rem; max-height: 50vh; overflow-y: auto; }
.ae-libitem { display: flex; flex-direction: column; gap: .1rem; align-items: flex-start; text-align: left; padding: .45rem .6rem; border: 1px solid var(--pe-line); border-radius: 9px; background: var(--rl-surface-raised); cursor: pointer; min-width: 0; }
.ae-libitem:hover { border-color: var(--rl-accent); }
.ae-libitem.is-on { border-color: var(--rl-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rl-accent) 40%, transparent); }
.ae-libitem__n { font-weight: 600; font-size: .8rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-libitem__m { font-size: .7rem; color: var(--rl-text-muted); }
.ae-spec { display: block; width: 100%; max-width: 620px; height: auto; border-radius: 8px; margin: 0 auto; }
.ae-specread { text-align: center; min-height: 1.3em; font-variant-numeric: tabular-nums; }
.pe-form__h { margin: .4rem 0 0; font-size: .8rem; }

/* ---- edit modes, the window switch, the header's lane and automation pickers ---- */
.ae-viewseg .pe-seg__b, .ae-modeseg .pe-seg__b { padding: .18rem .5rem; font-size: .74rem; }
.ae-viewseg { margin-right: .4rem; }
.ae-gridsel { font-size: .74rem; padding: .18rem .3rem; max-width: 7.5rem; }
.ae:not(.ae--grid) .ae-gridsel { opacity: .55; }
.ae-head__lane, .ae-head__mode { min-width: 0; font-size: .66rem; padding: 0 .15rem; height: 1.35rem; border: 1px solid var(--pe-line); border-radius: 5px; background: var(--rl-surface-raised); color: var(--rl-text); }
.ae-head__lane { flex: 1; margin-left: .2rem; }
.ae-head__autorow { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; align-items: center; gap: .25rem; font-size: .62rem; color: var(--rl-text-muted); }
.ae-head__autorow .ae-head__kind { margin: 0; }
.ae-auto--read { color: #22c55e; } .ae-auto--touch { color: #eab308; } .ae-auto--latch { color: #f97316; } .ae-auto--write { color: #ef4444; } .ae-auto--off { color: var(--rl-text-muted); }
.ae-row.is-compact .ae-head__autorow { display: none; }
.ae-row.is-lane .ae-head__autorow { display: grid; }
.ae-meterrow { display: inline-flex; align-items: center; gap: .3rem; }
.ae-meterin { width: 3.4rem !important; }

/* ---- the Mix window ---- */
.ae-mix { display: none; min-width: 0; min-height: 0; background: var(--pe-work); overflow: auto; }
.ae--mix .ae-work { grid-template-columns: minmax(0, 1fr); }
.ae--mix .ae-left, .ae--mix .ae-tl, .ae--mix .ae-right { display: none !important; }
.ae--mix .ae-mix { display: block; }
.ae-console { display: flex; align-items: stretch; gap: 3px; padding: 6px; min-height: 100%; box-sizing: border-box; width: max-content; }
.ae-mix__empty { align-self: center; max-width: 16rem; padding: 1rem; }
.ae-strip {
    --c: #64748b;
    flex: none; width: 88px; display: flex; flex-direction: column; gap: 4px; padding: 4px 4px 6px; box-sizing: border-box;
    background: var(--rl-surface); border: 1px solid var(--pe-line); border-radius: 8px; font-size: .66rem;
}
.ae-strip.is-sel { border-color: var(--rl-accent); box-shadow: 0 0 0 1px var(--rl-accent); }
.ae-strip--bus { background: color-mix(in srgb, var(--rl-surface) 88%, #a78bfa); }
.ae-strip--master { width: 104px; background: color-mix(in srgb, var(--rl-surface) 90%, #64748b); }
.ae-strip--add { width: auto; background: transparent; border-style: dashed; justify-content: center; gap: .4rem; padding: .5rem; }
.ae-strip__name { border: 0; border-top: 4px solid var(--c); border-radius: 5px; background: var(--rl-surface-raised); padding: .2rem .25rem; font-weight: 700; font-size: .7rem; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ae-strip__sec { display: flex; flex-direction: column; gap: 2px; }
.ae-strip__lab { font-size: .56rem; text-transform: uppercase; letter-spacing: .07em; color: var(--rl-text-muted); }
.ae-strip__slots { display: flex; flex-direction: column; gap: 2px; }
.ae-slot { position: relative; height: 1.15rem; border: 1px solid var(--pe-line); border-radius: 4px; background: var(--rl-surface-sunken); font-size: .62rem; padding: 0 .25rem; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; color: var(--rl-text-muted); }
.ae-slot:hover { border-color: var(--rl-accent); }
.ae-slot.is-full { background: color-mix(in srgb, var(--rl-accent) 22%, var(--rl-surface-raised)); color: var(--rl-text); font-weight: 600; }
.ae-slot.is-off { opacity: .5; text-decoration: line-through; }
.ae-slot--send.is-full { background: color-mix(in srgb, #a78bfa 22%, var(--rl-surface-raised)); }
.ae-slot--send span { position: relative; z-index: 1; }
.ae-slot__lvl { position: absolute; left: 0; bottom: 0; height: 2px; background: #a78bfa; }
.ae-strip__io, .ae-strip__auto { width: 100%; min-width: 0; font-size: .62rem; padding: .05rem .1rem; border: 1px solid var(--pe-line); border-radius: 4px; background: var(--rl-surface-raised); color: var(--rl-text); }
.ae-strip__io--out { text-align: center; color: var(--rl-text-muted); border-style: dashed; }
.ae-strip__auto.ae-auto--read, .ae-strip__auto.ae-auto--touch, .ae-strip__auto.ae-auto--latch, .ae-strip__auto.ae-auto--write { font-weight: 700; }
.ae-strip__pan { display: flex; justify-content: center; min-height: 44px; }
.ae-strip__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 1.3rem; }
.ae-sb { min-width: 1.05rem; height: 1.3rem; border: 1px solid var(--pe-line); border-radius: 4px; background: var(--rl-surface-raised); font-size: .62rem; font-weight: 700; cursor: pointer; color: var(--rl-text-muted); padding: 0 .12rem; }
.ae-win__byp { min-width: 0; padding: 0 .45rem; }
.ae-sb:hover { color: var(--rl-text); }
.ae-sb--s.is-on { background: #d97706; border-color: #d97706; color: #fff; }
.ae-sb--m.is-on { background: var(--rl-danger); border-color: var(--rl-danger); color: #fff; }
.ae-sb--p.is-on, .ae-win__byp.is-on { background: var(--rl-accent); border-color: var(--rl-accent); color: var(--rl-accent-contrast); }
.ae-strip__fm { flex: 1; min-height: 150px; display: flex; gap: 4px; justify-content: center; }
.ae-strip__meter { width: 14px; height: 100%; border-radius: 3px; cursor: pointer; }
.ae-strip__meter.has-gr { width: 20px; }
.ae-strip__vals { display: grid; grid-template-columns: 1fr auto; gap: 2px; align-items: center; }
.ae-strip__db { width: 100%; min-width: 0; font: 600 .66rem ui-monospace, Consolas, monospace; text-align: center; padding: .05rem; border: 1px solid var(--pe-line); border-radius: 4px; background: var(--rl-surface-sunken); color: var(--rl-text); user-select: text; }
.ae-strip__peak { font: .62rem ui-monospace, Consolas, monospace; color: var(--rl-text-muted); min-width: 2.2rem; text-align: right; }
.ae-strip__peak.is-hot { color: #ef4444; font-weight: 700; }
.ae-strip__del { border: 0; background: transparent; color: var(--rl-text-muted); font-size: .62rem; cursor: pointer; text-decoration: underline; }
.ae-lufs { display: flex; flex-direction: column; gap: 3px; font-size: .62rem; }
.ae-lufs dl { display: grid; grid-template-columns: auto 1fr; gap: 0 .3rem; margin: 0; }
.ae-lufs dt { color: var(--rl-text-muted); font-weight: 700; }
.ae-lufs dd { margin: 0; text-align: right; font: .64rem ui-monospace, Consolas, monospace; }
.ae-lufs .pe-btn { padding: .05rem .3rem; font-size: .62rem; }

/* VCA masters */
.ae-strip--vca { background: color-mix(in srgb, var(--rl-surface) 88%, #f59e0b); }
.ae-strip__members { display: flex; flex-direction: column; gap: 2px; min-height: 3rem; }
.ae-strip__member { font-size: .62rem; padding-left: .35rem; border-left: 3px solid var(--c, #888); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-strip__vca { font-style: italic; }

/* fader */
.ae-fader { position: relative; width: 34px; height: 100%; min-height: 140px; touch-action: none; cursor: ns-resize; outline: none; }
.ae-fader__slot { position: absolute; left: 50%; top: 9px; bottom: 9px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--rl-surface-sunken); box-shadow: inset 0 0 0 1px var(--pe-line); }
.ae-fader__marks { position: absolute; left: 0; top: 9px; bottom: 9px; width: 100%; pointer-events: none; }
.ae-fader__marks span { position: absolute; left: 0; transform: translateY(50%); font-size: .5rem; color: var(--rl-text-muted); line-height: 1; }
.ae-fader__cap { position: absolute; left: 50%; width: 26px; height: 18px; margin-left: -13px; border-radius: 4px; background: linear-gradient(#e5e7eb, #9ca3af); box-shadow: 0 1px 3px rgba(0, 0, 0, .5), inset 0 -1px 0 rgba(0, 0, 0, .25); }
.ae-fader__cap::after { content: ''; position: absolute; left: 3px; right: 3px; top: 8px; height: 2px; background: #111827; }
.ae-fader:focus-visible .ae-fader__cap { outline: 2px solid var(--rl-accent); }

/* knob */
.ae-knob { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; cursor: ns-resize; touch-action: none; outline: none; }
.ae-knob svg { display: block; }
.ae-knob__track { fill: none; stroke: var(--rl-surface-sunken); stroke-width: 4; stroke-linecap: round; }
.ae-knob__val { fill: none; stroke: var(--rl-accent); stroke-width: 4; stroke-linecap: round; }
.ae-knob__dot { stroke: var(--rl-text); stroke-width: 2; stroke-linecap: round; }
.ae-knob__txt { font: .6rem ui-monospace, Consolas, monospace; color: var(--rl-text-muted); }
.ae-knob:focus-visible svg { outline: 2px solid var(--rl-accent); border-radius: 50%; }
.ae-sendpop { align-items: stretch; }
.ae-sendpop__knob { display: flex; justify-content: center; }

/* ---- plugin windows ---- */
.ae-win { position: absolute; z-index: 45; min-width: 18rem; max-width: min(36rem, calc(100% - 1rem)); max-height: calc(100% - 1rem); display: flex; flex-direction: column; background: var(--rl-surface); border: 1px solid var(--pe-line); border-radius: var(--rl-radius); box-shadow: var(--pe-shadow); outline: none; }
.ae-win.is-bypassed .ae-win__body { opacity: .55; }
.ae-win__head { display: flex; align-items: center; gap: .35rem; padding: .3rem .4rem .3rem .7rem; border-bottom: 1px solid var(--pe-line); cursor: move; touch-action: none; }
.ae-win__title { font-weight: 700; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ae-win__preset { font-size: .72rem; padding: .1rem .2rem; max-width: 9rem; }
.ae-win__body { overflow-y: auto; padding: .5rem .7rem .7rem; display: flex; flex-direction: column; gap: .5rem; }
.ae-win__params { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .25rem .9rem; }
.ae-win__params .pe-rng { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr) auto; align-items: center; gap: .35rem; width: 100%; }
.ae-win__params .pe-rng input[type=range] { width: 100%; min-width: 0; }
.ae-win__params .pe-rng__num { width: 3.9rem; }
.ae-win__params .pe-sel { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); align-items: center; gap: .35rem; }
.ae-win__params .pe-sel select { width: 100%; min-width: 0; }
.ae-eqcv, .ae-speccv { display: block; width: 100%; max-width: 520px; height: auto; border-radius: 8px; touch-action: none; }
.ae-revcv { display: block; width: 100%; max-width: 360px; height: auto; border-radius: 8px; }
.ae-dyn { display: flex; gap: .7rem; align-items: stretch; }
.ae-dyncv { width: 220px; height: 160px; border-radius: 8px; }
.ae-gr { display: flex; flex-direction: column; align-items: center; gap: .2rem; font-size: .66rem; color: var(--rl-text-muted); }
.ae-gr__track { position: relative; width: 14px; flex: 1; min-height: 90px; border-radius: 3px; background: var(--ae-meter-bg); overflow: hidden; }
.ae-gr__bar { position: absolute; left: 0; right: 0; top: 0; background: #f59e0b; }
.ae-gr__txt { font: .64rem ui-monospace, Consolas, monospace; }
.ae-specwrap { display: flex; flex-direction: column; gap: .3rem; }

/* aux and master rows in the edit window: automation only */
.ae-row--strip .ae-head { background: color-mix(in srgb, var(--rl-surface) 90%, #a78bfa); }
.ae-row--strip[data-strip="master"] .ae-head { background: color-mix(in srgb, var(--rl-surface) 88%, #64748b); }
.ae-row--strip .ae-head__name { cursor: default; }

/* recording */
.ae-hb--r.is-on, .ae-sb--r.is-on { background: var(--rl-danger); border-color: var(--rl-danger); color: #fff; }
.ae-takes { display: flex; flex-direction: column; gap: .35rem; }
.ae-take { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: .35rem; align-items: center; padding: .3rem .4rem; border: 1px solid var(--pe-line); border-radius: 8px; }
.ae-take .pe__hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- dialogs ---- */
.ae-fadecv { display: block; width: 260px; height: 110px; border-radius: 8px; margin: 0 auto; }
.ae-tempo { font-size: 1.3rem; }
.ae-exportrep:empty { display: none; }
.ae-loudrep { margin-bottom: .4rem; }

/* ---- narrower studios ----
   Sized by the studio's own width, not the window's, for the reason the video editor is: the sidebar eats a quarter of a laptop screen. */
.ae-host { container: ae / inline-size; }
.ae .pe-ib--panels { display: none; }
@container ae (max-width: 1260px) { .ae { --ae-left: 13.5rem; --ae-right: 16.5rem; } }
@container ae (max-width: 1060px) { .ae { --ae-left: 12rem; --ae-right: 15rem; } .ae-name { max-width: 9rem; } .ae-vol { display: none; } }
@container ae (max-width: 900px) {
    .ae-work { position: relative; grid-template-columns: minmax(0, 1fr); }
    .ae-left, .ae-right { position: absolute; top: 0; bottom: 0; z-index: 20; width: min(19rem, 86%); box-shadow: var(--pe-shadow); display: none; background: var(--rl-surface); }
    .ae-left { left: 0; } .ae-right { right: 0; }
    .pe--panels .ae-left { display: flex; flex-direction: column; }
    .pe--panels .ae-right { display: block; }
    .ae .pe-ib--panels { display: inline-grid; }
    .ae-only-wide, .ae-bar__meters svg, .ae-meter--in { display: none; }
    .ae-modeseg .pe-seg__b { padding: .18rem .3rem; }
    .ae-strip { width: 80px; }
    .ae-name { max-width: 6rem; }
    .ve-savestate { display: none; }
    .ae-time { width: 6.6rem; }
}
