/* Convergence DAW. Studio Dark is the base: the :root token block below.
   Every other theme overrides those tokens: Warm Dark here
   ([data-theme='dark']), the sky themes and their colour variants in
   css/themes.css ([data-theme][data-variant], generated from
   scripts/themes-data.mjs; ADR 2026-11-15_cosmos-themes). The attributes on
   <html> come from themeboot.js before first paint and ui/theme.js after
   (a per-user pref). Amber is the only colour that means sound. Canvas views
   read their colours from these tokens via cssVar(), so retheming here
   retints the playlist, piano roll, rack and devices too. */

@font-face { font-family: 'DM Mono'; font-weight: 400; font-display: swap; src: url('../fonts/dm-mono-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Mono'; font-weight: 400; font-display: swap; src: url('../fonts/dm-mono-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Mono'; font-weight: 500; font-display: swap; src: url('../fonts/dm-mono-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Mono'; font-weight: 500; font-display: swap; src: url('../fonts/dm-mono-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Space Grotesk is a variable font: one file covers 400–600. */
@font-face { font-family: 'Space Grotesk'; font-weight: 300 700; font-display: swap; src: url('../fonts/space-grotesk-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Space Grotesk'; font-weight: 300 700; font-display: swap; src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: 'Michroma'; font-weight: 400; font-display: swap; src: url('../fonts/michroma-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Michroma'; font-weight: 400; font-display: swap; src: url('../fonts/michroma-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Studio Dark: the default theme and the token base (ADR
   2026-11-08_studio-dark-theme; promoted to :root when Warm Light was
   removed, ADR 2026-11-15_cosmos-themes). Neutral near-black surfaces with a
   faint cool cast, stepping lighter from the work area out to the chrome;
   hairline dividers; white ink at a few fixed strengths; colour only for
   state. Amber still means sound only.
   Tokens read by hexA() (--text, --accent, --loop, --marker, --solo, --warn,
   --grid-bg, --row-alt, --row-sel, --ruler-bg) must stay #RRGGBB. Brief: 04-plans/2026-11-08_studio-dark-theme-brief.md
   A theme block (Warm Dark below, css/themes.css) defines every colour token
   here; test/themescss.test.js checks the names match. */
:root {
  --bg: #0F0F11;
  --panel: #16161A;
  --panel-2: #1A1A1E;
  --panel-3: #1E1E22;
  --foot: #131316;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text: #DCDCE1;
  --muted: #808087;
  --muted-2: #A4A4AC;
  --faint: #7A7A82; /* was #64646A; raised for small text (UI vision mockup, Avi OK 2026-11-27) */
  --faint-mixer: #64646A; /* the mixer keeps the old faint (Avi: the mixer stays as it is today) */
  --accent: #E0A126;
  --folder: #8C9BB4;
  --folder-bg: rgba(140, 155, 180, 0.16);
  --accent-ink: #111113;
  --warn: #CF4136;
  --tune-ok: #6FBF73;
  --warn-ink: #F4F4F6;
  --solo: #C9A40E;
  --solo-ink: #111113;
  --rec: #CF4136;
  --rec-dot: #FF4F44;
  --fill: #E8E8EE;
  --on-fill: #111113;
  --input-bg: #111113;

  --chrome: #232327;
  --chrome-2: #2C2C31;
  --on-chrome: #DCDCE1;
  --chrome-muted: #8A8A92;
  --chrome-line: rgba(255, 255, 255, 0.08);
  --chrome-on: #E8E8EE;
  --chrome-on-ink: #111113;
  --tip-bg: #2E2E33;
  --tip-line: rgba(255, 255, 255, 0.14);
  --tip-muted: #A4A4AC;

  --grid-bg: #111113;
  --grid-row-black: #0D0D0F;
  --grid-row-scale: #1A1A20;
  /* quieter grid: bars still lead, beats and steps recede */
  --grid-line: rgba(255, 255, 255, 0.022);
  --grid-beat: rgba(255, 255, 255, 0.05);
  --grid-bar: rgba(255, 255, 255, 0.10);
  --ruler-bg: #1A1A1E;
  --lane-bg: #0D0D0F;
  --row-alt: #131316;
  --row-sel: #222229;
  --key-white: #D8D8DE;
  --key-black: #18181B;
  --key-label: #55555C;
  --playhead: #E0A126;
  --marker: #CF4136;
  --loop: #E0A126;
  --loop-tint: rgba(224, 161, 38, 0.06);
  --select: #E8E8EE;
  --pattern-clip: #7A5C9E; /* placement fallback when its body has no colour */
  /* Articulation hues (piano roll notes, lane, strip; Warm Analog export). Not amber: amber means sound. */
  --art-1: #5E8B3A;
  --art-2: #3D78A8;
  --art-3: #B4507A;
  --art-4: #A0682A;
  --art-5: #7A5C9E;
  --art-6: #C0532B;
  --art-7: #3A8A78;
  --art-8: #9C7A4A;
  --art-9: #4E92B0;
  --art-none: #8A7A6C;
  --art-unknown: #B3A599;
  --clip-ink: #F4F4F6;
  --note-ink: #F4F4F6;
  --on-color: #F4F4F6;
  --ink-on-light: #111113;
  --ink-on-dark: #F4F4F6;
  --clip-end-shade: rgba(0, 0, 0, 0.28);
  --dim: rgba(0, 0, 0, 0.35);
  --meter-bg: #0D0D0F;
  --meter-lo: #62C878;
  --meter-hi: #CF4136;
  --step-off: rgba(118, 118, 130, 0.16);
  --step-alt: rgba(118, 118, 130, 0.28);
  --range-track: rgba(118, 118, 130, 0.22);
  --range-ring: #16161A;

  --shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.8);
  --pop-shadow: 0 14px 32px -12px rgba(0, 0, 0, 0.85);
  --scrim: rgb(0 0 0 / 0.6);
  --push: #4C8DF6; /* the top-bar Push / Asks fill when you have something to send (not amber: amber means sound) */
  --push-ink: #0B1220;
  --dock: #3CC2B4; --dock-ink: #062320; /* drop-zone preview + label fill (teal; not blue = Push, amber = sound, red = record) */
  /* UI vision mockup tokens (04-plans/2026-11-27_ui-mockup). --glass is for floating
     pills and drawers only (transport pill, tool pill, people drawer), never banners or
     toasts. --glow-sound is amber, so only on something making sound right now.
     --ring-brand is the logo pink-to-slate hairline for ONE primary button per screen:
     background: linear-gradient(var(--chrome-2), var(--chrome-2)) padding-box, var(--ring-brand) border-box;
     border: 1px solid transparent. --brand-a/--brand-b appear only in the logo and that ring. */
  --glass: rgba(30, 30, 34, 0.72);
  --line-glass: rgba(255, 255, 255, 0.1);
  --glow-sound: 0 0 0 1px rgba(224, 161, 38, 0.55), 0 0 22px rgba(224, 161, 38, 0.35);
  --brand-a: #FF8FA3;
  --brand-b: #8C9BB4;
  --ring-brand: linear-gradient(115deg, var(--brand-a), var(--brand-b) 70%);

  /* sky (canvas only, ui/sky): neutral defaults, so Studio shows no sky.
     --glass-* is how opaque a surface stays over the sky (100% = solid);
     --wash-* is the static light wash. The sky themes set their own. */
  --sky-0: #0F0F11;
  --sky-1: #0F0F11;
  --scene-a: #808087;
  --scene-b: #808087;
  --scene-c: #808087;
  --scene-d: #808087;
  --sky-star: #DCDCE1;
  --sky-wash: #000000;
  --cosmos-moon: #C6CAD6;
  --cosmos-shade: #5B6178;
  --cosmos-halo: #98A6D0;
  --cosmos-line: #9DB0FF;
  --cosmos-shot: #FFFFFF;
  --glass-panel: 100%;
  --glass-grid: 100%;
  --glass-chrome: 100%;
  --glass-heads: 100%;
  --wash-a: 0%;
  --wash-r: 1px;
  --wash-x: 0px;
  --wash-y: 0px;
  --sky-gutter: 4px;

  /* density: system UI type, tighter corners, a slimmer control bar */
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, Menlo, monospace;
  --radius: 4px;
  --panel-radius: 6px; /* panels (floating, docked zones, dock, inspector): slightly rounded */
  --radius-sm: 3px;
  --header-h: 56px;
  --dock-h: 46vh;
  --dev-h: 220px; /* every Devices card: title bar + body (ui/devicefit.js) */
  --dev-col-w: 220px; /* one column of a card body; crowded cards add columns */
  font-family: var(--sans);
  font-size: 12px;
  color-scheme: dark;
}

/* Warm Analog dark (Theme.h kThemes[0].dark). --solo is a lighter teal so
   it still reads on the dark panels. */
:root[data-theme='dark'] {
  --bg: #0F0907;
  --panel: #1B1210;
  --panel-2: #1E1512;
  --panel-3: #241916;
  --foot: #150E0C;
  --line: rgba(240, 230, 216, 0.2);
  --line-soft: rgba(240, 230, 216, 0.12);
  --text: #F0E6D8;
  --muted: #9A8474;
  --muted-2: #C8B7A5;
  --faint: #786653; /* was #6B5B4E: 2.8:1 on the panel; 3.3:1 now (break-ui #15) */
  --faint-mixer: #786653;
  --accent: #E0A01A;
  --folder: #8C9BB4;
  --folder-bg: rgba(140, 155, 180, 0.16);
  --accent-ink: #1B1210;
  --warn: #E87A30;
  --tune-ok: #7FB069;
  --warn-ink: #1B1210;
  --solo: #4A9AA6;
  --solo-ink: #1B1210;
  --rec: #E5534B; /* record red, apart from amber and the orange --warn */
  --rec-dot: #E87A30;
  --fill: #F0E6D8;
  --on-fill: #1B1210;
  --input-bg: #150E0C;

  --chrome: #140D0B;
  --chrome-2: #1E1512;
  --on-chrome: #F0E6D8;
  --chrome-muted: #9A8474;
  --chrome-line: rgba(240, 230, 216, 0.12);
  --chrome-on: #F0E6D8;
  --chrome-on-ink: #140D0B;
  /* tips sit a step above the dark panels so they don't sink into them */
  --tip-bg: #4A382F;
  --tip-line: rgba(240, 230, 216, 0.24);
  --tip-muted: #C4B2A1;

  --grid-bg: #1B1210;
  --grid-row-black: #160F0D;
  --grid-row-scale: #2F2011;
  --grid-line: rgba(240, 230, 216, 0.05);
  --grid-beat: rgba(240, 230, 216, 0.1);
  --grid-bar: rgba(240, 230, 216, 0.22);
  --ruler-bg: #150E0C;
  --lane-bg: #150E0C;
  --row-alt: #1E1512;
  --row-sel: #2A1E19;
  --key-white: #E8DDCC;
  --key-black: #140D0B;
  --key-label: #5B504A;
  --playhead: #E0A01A;
  --marker: #E87A30;
  --loop: #E0A01A;
  --loop-tint: rgba(224, 160, 26, 0.07);
  --select: #F0E6D8;
  --pattern-clip: #7A5C9E;
  --art-1: #5E8B3A;
  --art-2: #3D78A8;
  --art-3: #B4507A;
  --art-4: #A0682A;
  --art-5: #7A5C9E;
  --art-6: #C0532B;
  --art-7: #3A8A78;
  --art-8: #9C7A4A;
  --art-9: #4E92B0;
  --art-none: #8A7A6C;
  --art-unknown: #B3A599;
  --clip-ink: #F0E6D8;
  --note-ink: #F0E6D8;
  --on-color: #F0E6D8;
  --ink-on-light: #1B1210;
  --ink-on-dark: #F0E6D8;
  --clip-end-shade: rgba(0, 0, 0, 0.25);
  --dim: rgba(0, 0, 0, 0.3);
  --meter-bg: #150E0C;
  --meter-lo: #62C878;
  --meter-hi: #E87A30;
  --step-off: rgba(240, 230, 216, 0.08);
  --step-alt: rgba(232, 122, 48, 0.18);
  --range-track: rgba(240, 230, 216, 0.16);
  --range-ring: #1B1210;

  --shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.7);
  --pop-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.75);
  --scrim: rgb(0 0 0 / 0.6);
  --push: #7FA7D9; /* the top-bar Push / Asks fill when you have something to send (not amber: amber means sound) */
  --push-ink: #140D0B;
  --dock: #5CC4B8; --dock-ink: #0A1E1C;
  --glass: rgba(36, 25, 22, 0.72);
  --line-glass: rgba(240, 230, 216, 0.1);
  --glow-sound: 0 0 0 1px rgba(224, 160, 26, 0.55), 0 0 22px rgba(224, 160, 26, 0.35);
  --brand-a: #FF8FA3;
  --brand-b: #8C9BB4;
  --ring-brand: linear-gradient(115deg, var(--brand-a), var(--brand-b) 70%);

  /* no sky: the scene tokens are neutral, every surface solid */
  --sky-0: #0F0907;
  --sky-1: #0F0907;
  --scene-a: #9A8474;
  --scene-b: #9A8474;
  --scene-c: #9A8474;
  --scene-d: #9A8474;
  --sky-star: #F0E6D8;
  --sky-wash: #000000;
  --cosmos-moon: #C6CAD6;
  --cosmos-shade: #5B6178;
  --cosmos-halo: #98A6D0;
  --cosmos-line: #9DB0FF;
  --cosmos-shot: #FFFFFF;
  --glass-panel: 100%;
  --glass-grid: 100%;
  --glass-chrome: 100%;
  --glass-heads: 100%;
  --wash-a: 0%;
  --wash-r: 1px;
  --wash-x: 0px;
  --wash-y: 0px;
  --sky-gutter: 4px;

  /* Type and density (font, base size, radii, header height) are not set
     here: Warm Dark inherits Studio's from :root, so the two differ in
     colour only. */
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; overscroll-behavior-x: none; } /* a two-finger trackpad swipe must not trigger browser back/forward out of a project */

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  display: grid;
  grid-template-rows: var(--header-h) minmax(120px, 1fr) 6px var(--dock-h);
  grid-template-columns: var(--insp-w, 0px) var(--zl-w, 0px) minmax(0, 1fr) var(--zr-w, 0px); /* --zl-w / --zr-w: the left and right dock zones (main.js; 0px when empty). --insp-w: the inspector column, set by ui/inspector.js (0px when hidden) */
  overflow: hidden;
}

button, input, select { font: inherit; color: inherit; }

button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}
/* C-452: a pressed / lit button keeps its fill under the mouse (its own .on rule wins);
   only unlit buttons get the hover fill. Before, this rule beat .ph-arm.on and
   an armed track went near-black on hover. */
button:hover:not(:disabled):not(.on):not([aria-pressed='true']) { border-color: var(--muted); background: var(--panel-2); }
button:disabled { opacity: 0.4; cursor: default; }
/* C-500: focus rings are near-white --select (amber means sound only). The canvas
   rule only drops the outline for mouse focus, so Tab into the playlist / roll shows it
   (before, `canvas:focus { outline: none }` won over :focus-visible: WCAG 2.4.7). */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, canvas:focus-visible,
[tabindex]:focus-visible, a:focus-visible {
  outline: 2px solid var(--select);
  outline-offset: 1px;
}
canvas:focus:not(:focus-visible) { outline: none; }

select, input[type='number'], input[type='text'] {
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.25rem 0.4rem;
}

.ic { width: 14px; height: 14px; display: block; }
.spacer { flex: 1; }
input[type='number'] { font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* Sliders are drawn from tokens: the native track can't be themed and
   glares near-white in dark mode. The fill uses the element's --c (track
   color) or amber; theme.js keeps --lo/--hi (fill start/end) in step with
   the value, and ranges that span zero (pan) fill out from the center. */
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  height: 14px;
  cursor: pointer;
  --range-fill: var(--c, var(--accent));
  --range-grad: linear-gradient(to right, var(--range-track) var(--lo, 0%), var(--range-fill) var(--lo, 0%), var(--range-fill) var(--hi, 50%), var(--range-track) var(--hi, 50%));
}
input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--range-grad); }
input[type='range']::-moz-range-track { height: 4px; border-radius: 2px; background: var(--range-grad); }
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: var(--range-fill);
  box-shadow: 0 0 0 2px var(--range-ring), 0 0 0 3px var(--line);
}
input[type='range']::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--range-fill);
  box-shadow: 0 0 0 2px var(--range-ring), 0 0 0 3px var(--line);
}
/* Rotary knobs (ui/knob.js): an SVG face over a hidden range input, which
   keeps focus, keyboard arrows and events. The value arc uses --c (the
   track color) or amber; bipolar ranges (pan) turn out from the top. */
.knob { display: inline-grid; justify-items: center; gap: 1px; flex: none; user-select: none; line-height: 1.1; }
.knob-dial { position: relative; display: block; border-radius: 50%; }
.knob-dial svg { display: block; cursor: ns-resize; touch-action: none; }
.knob-dial input[type='range'] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.knob-dial:has(input:focus-visible) { outline: 2px solid var(--select); outline-offset: 1px; }
.knob-track { fill: none; stroke: var(--line); stroke-width: 3.5; stroke-linecap: round; }
.knob-val { fill: none; stroke: var(--c, var(--accent)); stroke-width: 3.5; stroke-linecap: round; }
.knob-face { fill: var(--panel-2); stroke: var(--line); stroke-width: 1; }
.knob-ptr { stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; }
.knob-label { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.knob-text { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; color: var(--text); font-variant-numeric: tabular-nums; }
.knob:has(input:disabled) { opacity: 0.4; }
.knob:has(input:disabled) svg { cursor: default; }
.knob:has(.rk-swing) { --c: var(--muted-2); } /* the rack is never amber (v2) */
kbd {
  font-family: var(--mono);
  font-size: 0.74rem;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 0.35em;
  white-space: nowrap;
}

/* ---------- join overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 30%, var(--panel-2) 0%, var(--bg) 70%);
}
.overlay[hidden] { display: none; }
.join-card {
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 2rem;
  display: grid;
  gap: 1rem;
}
.join-card h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text);
}
.join-card p { margin: 0; color: var(--muted-2); line-height: 1.6; }
.join-card label { display: grid; gap: 0.35rem; color: var(--muted); }
.join-card label[hidden] { display: none; }
.join-card input { padding: 0.6rem 0.75rem; }
.join-card button[type='submit'] {
  background: var(--fill);
  color: var(--on-fill);
  border: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.9rem;
}
.hint { color: var(--muted); font-size: 0.85rem; }
.hint code { color: var(--text); font-family: var(--mono); }

/* Sign-in on the join card + the Share popover (ui/share.js). ADR 2026-10-21_own-accounts. */
.auth { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 0.8rem 1rem 1rem; margin: 0; display: grid; gap: 0.7rem; }
.auth[hidden] { display: none; }
.auth legend { color: var(--text); font-weight: 600; padding: 0 0.3rem; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--text); text-decoration: underline; font: inherit; cursor: pointer; }
.join-card .join-error { color: var(--warn); font-size: 0.9rem; line-height: 1.45; }
.join-error[hidden], #signed-in[hidden], #join-invited[hidden], #new-room[hidden], #join-go[hidden] { display: none; }
#new-room { color: var(--text); }
/* The invite landing (main.js): "Ana invited you to edit Golden Hour as Editor". */
.join-invite { margin: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); color: var(--text); line-height: 1.5; }
.join-invite[hidden] { display: none; }
#join #join-invite:not([hidden]) { display: block; } /* landing.css hides the card's other paragraphs */
.join-role { display: inline-block; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.85em; font-weight: 600; }
/* Refused mid-session (removed): cover the room, solid (landing.css makes #join see-through). */
#join.overlay.over-room { background: radial-gradient(circle at 50% 30%, var(--panel-2) 0%, var(--bg) 70%); }
#join.over-room .join-card { background: var(--panel); backdrop-filter: none; border: 1px solid var(--line); border-radius: 16px; }
.share-pop {
  position: fixed;
  z-index: 160;
  width: 360px;
  max-width: calc(100vw - 16px);
  max-height: min(480px, calc(100vh - 80px));
  overflow-y: auto;
  padding: 10px 12px 12px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--pop-shadow);
  font-size: 12.5px;
}
.share-pop[hidden] { display: none; }
.share-pop h3 { font: 10px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-2); margin: 10px 0 6px; }
.share-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.share-head h3 { margin-top: 0; }
.share-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.share-invite, .share-person { display: flex; align-items: center; gap: 6px; min-width: 0; }
.share-when, .share-email { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); }
.share-invite { flex-wrap: wrap; }
.share-invite .share-when { flex-basis: 100%; }
.share-invite .share-tag:last-of-type { flex: 1; }
.share-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.share-tag { font: 10px var(--mono); color: var(--muted); }
.share-note { color: var(--muted-2); line-height: 1.45; margin: 4px 0; }
.share-acts { display: flex; align-items: center; gap: 6px; }
.share-confirm { display: grid; gap: 2px; font-size: var(--fs-small, 11px); }
.share-revoke { display: flex; align-items: center; gap: 4px; color: var(--muted); cursor: pointer; }
.share-copybox { margin-bottom: 8px; }
.share-copyfield { width: 100%; box-sizing: border-box; font: 11px var(--mono); background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 4px 6px; }
.share-role { font-size: 11px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; }
/* Roles: "Contributor" / "Listener" beside the Live pill (owner/editor show none). */
.role-pill { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.role-pill[hidden] { display: none; }
/* Live state (ui/livebadge.js): calm green dot, never amber (amber = sound). */
.onair-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: 11px; font-weight: 600; white-space: nowrap; }
.onair-chip[hidden] { display: none; }
.onair-chip i, .live-wait i { width: 7px; height: 7px; border-radius: 50%; background: var(--tune-ok); flex: none; }
.live-wait { position: fixed; top: 118px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 13px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5); pointer-events: none; }
.live-wait i { background: var(--muted); }
.share-golive { justify-content: flex-start; }
.golive-sw { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.golive-knob { width: 22px; height: 12px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line); position: relative; flex: none; }
.golive-knob::after { content: ''; position: absolute; top: 1px; left: 1px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.golive-sw[aria-checked='true'] { border-color: var(--tune-ok); }
.golive-sw[aria-checked='true'] .golive-knob::after { left: 11px; background: var(--tune-ok); }
/* Listen-link guests (no account): read-only, nothing to share, chat about or export. */
.is-guest #t-chat, .is-guest #invite, .is-guest #t-push, .is-guest #t-asks { display: none !important; }

/* ---------- transport ---------- */

.transport {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 16px;
  background: var(--chrome);
  color: var(--on-chrome);
  border-bottom: 1px solid var(--chrome);
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.brand { font-weight: 700; letter-spacing: 0.12em; white-space: nowrap; }
.brand .room { color: var(--chrome-muted); font-weight: 400; letter-spacing: 0; font-family: var(--mono); font-size: 12px; }
.transport button { background: var(--chrome-2); border-color: var(--chrome-line); color: var(--on-chrome); }
.transport button:hover:not(:disabled) { border-color: var(--chrome-muted); background: var(--chrome-2); }
.transport input { background: var(--chrome-2); border-color: var(--chrome-line); color: var(--on-chrome); }
#invite { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; background: var(--chrome-on); color: var(--chrome-on-ink); border-color: var(--chrome-on); padding: 0.5rem 0.9rem; }
#invite:hover:not(:disabled) { background: var(--chrome-on); border-color: var(--accent); }
.tgroup { display: flex; align-items: center; gap: 0.3rem; flex: none; }
.tbtn { padding: 0.35rem 0.5rem; line-height: 1; }
.tbtn.play.active, .toggle.on, .transport .tbtn.play.active, .transport .toggle.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.toggle { font-size: 0.85rem; }
.lcd {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  background: var(--chrome-2);
  color: var(--on-chrome);
  border: 1px solid var(--chrome-line);
  border-radius: var(--radius);
  padding: 0.3rem 0.6rem;
  min-width: 7.5rem;
  text-align: center;
  flex: none;
}
.tfield { display: flex; align-items: center; gap: 0.4rem; color: var(--chrome-muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em; flex: none; }
.tfield input { font-size: 12px; letter-spacing: 0; }
.tfield input { width: 4.2rem; }
#users { list-style: none; display: flex; align-items: center; margin: 0; padding: 0 0 0 4px; flex: none; }
#users li { display: flex; margin-left: -4px; }
/* Avatar stack (ui/presence.js): click someone to follow their view. */
.avatar {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--chrome);
  background: var(--user);
  color: var(--ink, var(--on-color)); /* --ink set per avatar by inkOn */
  /* Halo ring in the counter-ink: initials sit on a mid-tone user colour that
     neither ink clears AA against. --ink-halo set per avatar by haloOn. */
  text-shadow:
    -1px 0 var(--ink-halo, transparent), 1px 0 var(--ink-halo, transparent),
    0 -1px var(--ink-halo, transparent), 0 1px var(--ink-halo, transparent);
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.02em;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}
.avatar:hover:not(:disabled) { background: var(--user); border-color: var(--chrome); transform: translateY(-1px); z-index: 1; }
.avatar:focus-visible { outline: 2px solid var(--chrome-on); outline-offset: 1px; z-index: 1; }
.avatar:disabled { cursor: default; opacity: 1; }
.avatar.me { cursor: pointer; } /* opens the People menu (ui/people.js) */
.avatar.me::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px dashed var(--chrome-muted); }
.avatar.host { box-shadow: 0 0 0 1px var(--chrome-on); } /* a pinned host (spectator mode) */
.follow-host { height: 24px; margin-left: 8px; padding: 0 8px; border-radius: 12px; border: 1px solid var(--chrome-muted); background: transparent; color: var(--chrome-on); font: 600 11px var(--sans); white-space: nowrap; }
.follow-host:hover:not(:disabled) { background: var(--chrome-2); }
.avatar.following { box-shadow: 0 0 0 2px var(--chrome), 0 0 0 4px var(--user); z-index: 2; }
.avatar.more { background: var(--chrome-2); color: var(--chrome-muted); cursor: default; }
/* Follow mode: a frame in the followed person's colour + a pill to stop. */
.follow-frame { position: fixed; inset: 0; z-index: 150; pointer-events: none; box-shadow: inset 0 0 0 3px var(--user); }
.follow-frame[hidden] { display: none; }
.follow-pill {
  position: absolute;
  bottom: 3px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 4px 3px 10px;
  border-radius: 8px 8px 0 0;
  background: var(--user);
  color: var(--on-color);
  font: 600 11px var(--sans);
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  pointer-events: auto;
}
.follow-text { overflow: hidden; text-overflow: ellipsis; }
.follow-stop { padding: 1px 8px; font-size: 10px; border-radius: 4px; border: 1px solid var(--on-color); background: transparent; color: var(--on-color); }
.follow-stop:hover:not(:disabled) { background: var(--on-color); color: var(--user); border-color: var(--on-color); }
#invite { flex: none; white-space: nowrap; }
/* Room Play (ui/roomplay.js): the button next to Play, the session chip and
   the join card. The leader's presence colour (--user), never amber. */
/* The slot at the end of the transport (UI vision mockup step 3): one fixed
   width for the idle "Room play" pill and the session chip, so the transport
   never changes width when a Room Play opens (audit 2026-11-26 Bug 6). */
.rp-wrap { display: flex; align-items: center; }
.rp-slot { flex: none; width: 11.5rem; justify-content: center; }
.rp-chip[hidden], .rp-idle[hidden] { display: none; }
.rp-idle, .rp-chip { width: 100%; height: 28px; border-radius: 999px; white-space: nowrap; }
.rp-idle {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 10px; border: 1px dashed var(--line); background: transparent;
  color: var(--muted); font: 500 12px var(--sans);
}
.rp-idle:hover:not(:disabled) { border-style: solid; color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.rp-idle:disabled { opacity: 0.55; }
.rp-idle .rp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.rp-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 3px 0 10px;
  background: var(--user);
  color: var(--on-color);
  font: 600 11px var(--sans);
  min-width: 0;
}
.rp-chip-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rp-chip .rp-chip-btn { flex: none; border-radius: 999px; }
.transport .rp-chip-btn, .rp-chip .rp-chip-btn,
.rp-card button { padding: 2px 8px; font-size: 10px; border-radius: 4px; border: 1px solid var(--on-color); background: transparent; color: var(--on-color); white-space: nowrap; }
.transport .rp-chip-btn:hover:not(:disabled), .rp-chip .rp-chip-btn:hover:not(:disabled),
.rp-card button:hover:not(:disabled) { background: var(--on-color); color: var(--user); border-color: var(--on-color); }
.rp-card {
  position: fixed;
  z-index: 55;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  max-width: min(26rem, calc(100vw - 16px));
  border-radius: var(--radius);
  background: var(--user);
  color: var(--on-color);
  box-shadow: var(--pop-shadow);
  font: 12px var(--sans);
}
.rp-card[hidden] { display: none; }
.rp-msg { margin: 0; overflow-wrap: anywhere; }
.rp-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.rp-card .rp-join { background: var(--on-color); color: var(--user); }
#status { color: var(--chrome-muted); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; white-space: nowrap; }

/* ---------- workspace: browser + playlist ---------- */

.workspace {
  display: grid;
  grid-template-columns: var(--browser-w, 460px) 1fr; /* --browser-w: per-user pref, set by ui/browser.js */
  min-height: 0;
}

.browser {
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 10px 8px;
}

/* ---------- playlist (FL × Ableton) ----------
   Track controls default to the RIGHT (Ableton); .left flips them (FL).
   --head-w is the per-user header width. Both are local preferences. */

.playlist {
  display: grid;
  grid-template-rows: 32px 1fr;
  min-height: 0;
  min-width: 0;
}
.pl-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  min-width: 0;
  overflow-x: auto;
}
.pl-title { font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.pl-toolbar button { font-size: 0.86rem; min-height: 32px; padding: 0.25rem 0.6rem; white-space: nowrap; flex: none; }
.pl-rec .record-icon { color: var(--rec); font-size: 1.1em; }
.pl-rec.on .record-icon { color: inherit; }
.pl-tools { display: flex; gap: 2px; flex: none; }
.pl-tool { padding: 0.25rem 0.4rem !important; }
.pl-tool.on { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.toggle.metro { padding-inline: 0.45rem; }
.toggle.follow { display: inline-flex; align-items: center; gap: 0.3rem; padding-inline: 0.45rem; } /* Follow playhead: icon + word; the word hides on a narrow bar (tb-icons) */
.pl-rec.on { background: var(--rec); color: var(--warn-ink); border-color: var(--rec); }

.pl-body {
  --head-w: 230px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5px var(--head-w);
  min-height: 0;
  min-width: 0;
}
.pl-body.left { grid-template-columns: var(--head-w) 5px minmax(0, 1fr); }
.pl-body.left .pl-heads { order: -2; }
.pl-body.left .pl-handle { order: -1; }
.pl-timeline { position: relative; min-width: 0; min-height: 0; }
#pl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#pl-canvas[data-tool='draw'], #pl-canvas[data-tool='paint'] { cursor: cell; }
/* The Eraser cursor (playlist + piano roll; ui/playlist.js ERASER_CURSOR): the tool-strip icon as a
   black line on a white halo, so it reads on every theme (a cursor image can't use the theme tokens). */
html { --cursor-eraser: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 16 16' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 2.5l4.5 4.5-6 6H4.5L2.5 11z M6 6l4.5 4.5 M7.5 13H14' stroke='white' stroke-width='3'/%3E%3Cpath d='M9 2.5l4.5 4.5-6 6H4.5L2.5 11z M6 6l4.5 4.5 M7.5 13H14' stroke='black' stroke-width='1.3'/%3E%3C/svg%3E") 3 14, crosshair; }
#pl-canvas[data-tool='delete'], #roll-canvas[data-tool='eraser'] { cursor: var(--cursor-eraser); }
.pl-handle { background: var(--line-soft); cursor: col-resize; }
.pl-handle:hover, .pl-handle.drag { background: var(--accent); }

.pl-heads {
  display: grid;
  grid-template-rows: 46px 1fr;
  background: var(--panel);
  min-height: 0;
  min-width: 0;
}
.pl-corner {
  display: grid;
  grid-template-rows: 15px 1fr;
  align-items: center;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}
.pl-corner-pat { font-size: 0.62rem; opacity: 0.7; }
/* "+ Track": the add-track button, top of the header column beside
   Markers/Tracks (mockup 04-plans/2026-11-19_add-track-mockups.html, Q2 B).
   The app's bright neutral fill, never amber (amber means sound). It lives
   inside .pl-heads, so it follows the headers left or right. */
.pl-corner { position: relative; }
.pl-add {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  height: 24px; padding: 0 9px 0 7px; display: inline-flex; align-items: center; gap: 5px;
  font: 600 11.5px/1 var(--sans); letter-spacing: 0; text-transform: none;
  color: var(--on-fill); background: var(--fill);
  border: 0; border-radius: 6px; cursor: pointer;
  box-shadow: 0 2px 6px -2px color-mix(in srgb, var(--bg) 70%, transparent);
  transition: transform var(--t-press) var(--ease-out), box-shadow var(--t-press) ease;
}
.pl-add svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.pl-add:active { transform: translateY(-50%) scale(0.96); }
/* Beats the global button:hover (panel-2), which would grey the fill out. */
.pl-add:hover:not(:disabled) { background: var(--fill); color: var(--on-fill); }
.tp-tile:hover:not(:disabled) { background: var(--panel-3); }
@media (hover: hover) and (pointer: fine) {
  .pl-add:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--fill) 22%, transparent), 0 2px 6px -2px color-mix(in srgb, var(--bg) 70%, transparent); }
}
.pl-add:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
/* Narrow (compact) headers: the + alone. */
.pl-heads.compact .pl-filter { right: 36px; }
.pl-heads.compact .pl-add { width: 24px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
/* "+ Add track" under the last track (Q1 C). */
.pl-addrow {
  position: absolute; left: 6px; right: 6px; height: 30px;
  display: flex; align-items: center; gap: 6px; padding: 0 8px;
  border: 1px dashed color-mix(in srgb, var(--text) 20%, transparent); border-radius: 6px;
  background: transparent; color: var(--muted-2); font: 11.5px/1 var(--sans); text-align: left; cursor: pointer;
  transition: border-color var(--t-press) ease, color var(--t-press) ease, background-color var(--t-press) ease, transform var(--t-press) var(--ease-out);
}
.pl-addrow-plus { font: 500 14px/1 var(--sans); }
@media (hover: hover) and (pointer: fine) { .pl-addrow:hover { border-color: var(--muted-2); color: var(--text); background: var(--panel-2); } }
.pl-addrow:active { transform: scale(0.98); }
.pl-heads.compact .pl-addrow span + span { display: none; }
/* Empty song: the start card over the timeline (Q1 C). */
.pl-empty { position: absolute; inset: 46px 0 0; display: grid; place-items: center; pointer-events: none; }
.pl-empty[hidden] { display: none; }
.pl-empty-card { pointer-events: auto; display: grid; gap: 10px; justify-items: center; text-align: center; padding: 16px; color: var(--muted-2); font-size: 12px; }
.pl-empty-card b { color: var(--text); font-size: 14px; }
.pl-empty-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pl-empty-row .tp-tile { min-width: 84px; }
.pl-empty-hint { color: var(--muted); font: var(--fs-small)/1 var(--mono); }
/* A dashboard import is filling this new project (dawimport.js showImportBusy): the busy card stands in for "Start with a track". */
.pl-empty.is-importing .pl-empty-card:not(.pl-empty-busy) { display: none; }
.pl-empty-busy[hidden] { display: none; }
.pl-empty-busy span { font: var(--fs-small)/1.4 var(--mono); color: var(--muted); }
/* The + Track picker (ui/trackpicker.js, Q3 B lean). */
/* Never narrower than its four tiles, never wider than the window (Windows test: it collapsed to the 190px menu floor). */
.ctx-menu.pop.trk-pick { padding: 6px; box-sizing: border-box; width: 332px; min-width: min(332px, calc(100vw - 8px)); max-width: calc(100vw - 8px); overflow-x: hidden; }
.tp { display: grid; gap: 6px; width: 100%; min-width: 0; }
.tp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.tp-tile {
  display: grid; justify-items: center; gap: 4px; padding: 10px 4px 8px;
  border-radius: 7px; border: 1px solid var(--line); background: var(--panel-3);
  color: var(--text); font: 600 12px/1.1 var(--sans); cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), border-color var(--t-press) ease;
}
.tp-tile svg { width: 18px; height: 18px; color: var(--muted-2); }
.tp-key { font: var(--fs-small)/1 var(--mono); color: var(--muted); min-height: 1em; }
.tp-tile:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .tp-tile:hover { border-color: var(--muted); } }
.tp-tile:focus-visible, .tp-group:focus-visible, .pl-addrow:focus-visible { outline: 2px solid var(--select); outline-offset: 1px; }
.tp-group {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 0; border-top: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--text); font: 12px/1.2 var(--sans); text-align: left; cursor: pointer;
}
.tp-group .tp-key { margin-left: auto; }
.tp-group:disabled { color: var(--faint); cursor: default; }
@media (hover: hover) and (pointer: fine) { .tp-group:not(:disabled):hover { background: var(--panel-3); } }
/* Add track › Recent (track types stage 1): your last instruments/plugins as chips. */
.tp-recent { display: grid; gap: 4px; padding: 2px 0 0; }
.tp-recent-lbl { padding: 0 2px; color: var(--muted); font: 600 11px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.tp-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 8px 4px 6px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--panel-3);
  color: var(--text); font: 12px/1.1 var(--sans); cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), border-color var(--t-press) ease;
}
.tp-chip:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .tp-chip:hover { border-color: var(--muted); } }
.tp-chip:focus-visible { outline: 2px solid var(--select); outline-offset: 1px; }
.tp-sw { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--muted-2); }
.tp-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-hint { margin: 0; padding: 0 8px 2px; color: var(--muted); font-size: 11px; line-height: 1.35; }
/* Plugin instruments in the + Track picker (desktop app only). */
.tp-plugs { display: grid; gap: 4px; padding-top: 6px; border-top: 1px solid var(--line); }
.tp-plug-head { padding: 0 8px; color: var(--muted); font: 600 11px/1.2 var(--sans); }
.tp-plug-q { margin: 0 2px; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-3); color: var(--text); font: 12px/1.2 var(--sans); }
.tp-plug-q:focus-visible { outline: 2px solid var(--select); outline-offset: 0; }
.tp-plug-list { display: grid; max-height: 168px; overflow-y: auto; overscroll-behavior: contain; }
.tp-plug {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px; border: 0; border-radius: 5px;
  background: transparent; color: var(--text); font: 12px/1.2 var(--sans); text-align: left; cursor: pointer;
}
.tp-plug .tp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-plug .tp-key { margin-left: auto; }
.tp-plug:focus-visible { outline: 2px solid var(--select); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .tp-plug:hover { background: var(--panel-3); } }
/* Grows out of the control that opened it (origin set in trackpicker.js). */
.trk-pick.tp-in { animation: tp-in var(--t-pop) var(--ease-out); }
@keyframes tp-in { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
/* A just-added track lights once: a ring on ::after, opacity only. */
.ph.added::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--select); background: color-mix(in srgb, var(--select) 12%, transparent);
  opacity: 0; animation: track-added 600ms var(--ease-out);
}
@keyframes track-added { from { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .trk-pick.tp-in { animation: tp-fade var(--t-pop) ease; }
  .ph.added::after { animation-duration: 250ms; }
  .pl-add:active { transform: translateY(-50%); }
  .tp-tile:active, .pl-addrow:active { transform: none; }
}
@keyframes tp-fade { from { opacity: 0; } }
/* Track filter (roadmap #21): beside "Tracks", left of "+ Track". */
.pl-filter {
  position: absolute; bottom: 3px; right: 76px; width: clamp(56px, 38%, 110px); height: 20px; box-sizing: border-box;
  padding: 0 6px; font: 11px/1 var(--sans); letter-spacing: 0; text-transform: none;
  color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 5px; outline: none;
}
.pl-filter:focus { border-color: var(--muted); }
.pl-filter:not(:placeholder-shown) { border-color: var(--accent2, var(--muted)); }
.pl-head-scroll { overflow: hidden; position: relative; min-height: 0; }
.pl-head-list { position: absolute; left: 0; right: 0; top: 0; }

.ph {
  position: absolute;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr);
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
  overflow: hidden;
}
.pl-body.right .ph { grid-template-columns: minmax(0, 1fr) 5px; }
.pl-body.right .ph .ph-color { order: 2; }
.ph.sel { background: var(--row-sel); }
.ph.child .ph-main { padding-left: 14px; }
.pl-body.right .ph.child .ph-main { padding-left: 6px; padding-right: 14px; }
/* Left mode is the mirror of right mode: the controls (fold, M, S, arm,
   vol, pan) hug the timeline edge and the name/menu sit on the outer edge,
   like FL's left-side headers. Only the layout flips; text stays LTR. */
.pl-body.left .ph-line { flex-direction: row-reverse; }
.ph.group { background: color-mix(in srgb, var(--c) 9%, var(--panel)); }
/* Pattern track (Channel Rack patterns): no sound of its own, so no volume / pan. */
.ph.pattern .ph-vol, .ph.pattern .ph-pan { display: none; }
.ph { transition: box-shadow 0.15s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.15s cubic-bezier(0.23, 1, 0.32, 1); }
.ph.dev-over { box-shadow: inset 0 0 0 1px var(--select), inset 0 0 0 999px color-mix(in srgb, var(--select) 10%, transparent); }
.ph.dev-no { opacity: 0.55; }
/* A Browser instrument/plugin over a header: what the drop does ("Replace with OB-Xd"). */
.ph[data-drop-label]::after {
  content: attr(data-drop-label);
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--select);
  color: var(--panel);
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
  z-index: 3;
}
.ph.dev-no[data-drop-label]::after { background: color-mix(in srgb, var(--text) 25%, var(--panel)); color: var(--text); }
.ph.drop-into { box-shadow: inset 0 0 0 2px var(--select); }
.ph.drop-before { box-shadow: inset 0 3px var(--select); }
.ph.drop-person { box-shadow: inset 0 0 0 2px var(--select); }
.ph-remote-line { display: none; }
.ph.booth .ph-remote-line { display: flex; }
.ph.short .ph-remote-line { display: none; }
/* Input and Output buttons (Avi 2026-11-20, mockup A): Tall tracks only (Compact/Normal use right-click). */
.ph-io-line { display: none; gap: 4px; min-width: 0; }
.ph.tall .ph-io-line { display: flex; }
.ph.tall.booth .ph-remote-line { display: none; } /* Input names the person */
.ph-io { display: inline-flex; align-items: center; gap: 4px; min-width: 0; height: 18px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line); background: var(--panel-3); color: var(--muted-2); font: inherit; font-size: var(--fs-small); cursor: pointer; overflow: hidden; white-space: nowrap; }
.ph-io.ph-in { flex: 0 1 auto; max-width: 62%; }
.ph-io.ph-out { flex: 0 1 auto; max-width: 45%; }
.ph-io .k { flex: none; font-size: var(--fs-small); color: var(--muted); }
.ph-io .v { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ph-io:hover, .ph-io:focus-visible { border-color: var(--select); color: var(--text); }
.ph-io.person { border-style: dashed; color: var(--muted-2); } /* a person's mic: change it with the person button */
.ph-io[hidden] { display: none; }
.ph-remote { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* Remote arm P1 (Avi's pick 2B): the person button, their colour as a tint, live level. */
.ph-person { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; padding: 0; display: grid; place-items: center; cursor: pointer; flex: none; }
.ph-person:hover { color: var(--text); border-color: var(--muted); }
.ph-person.on { background: var(--person, var(--muted-2)); border-color: var(--person, var(--muted-2)); color: var(--accent-ink); }
.ph.remote-wait .ph-person.on { background: transparent; color: var(--person, var(--muted-2)); border-style: dashed; border-width: 1.5px; }
.ph.remote-gone .ph-person.on { background: var(--muted); border-color: var(--muted); }
.ph.remote-live, .ph.remote-wait { box-shadow: inset 3px 0 0 var(--person, var(--muted-2)); background-image: linear-gradient(90deg, color-mix(in srgb, var(--person, var(--muted-2)) 12%, transparent), transparent 60%); }
.ph-plevel { height: 3px; margin: 2px 6px 0; border-radius: 2px; background: var(--line); overflow: hidden; }
.ph-plevel > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 60ms linear; }
.ph.short .ph-plevel { display: none; }
.ph.drop-after { box-shadow: inset 0 -3px var(--select); }
.ph .ph-color { background: var(--c); min-width: 0; }
.ph .ph-color.auto { background: color-mix(in srgb, var(--warn) 35%, transparent); cursor: default; }
.ph-main { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 2px 6px; min-width: 0; }
.ph-line { display: flex; align-items: center; gap: 3px; min-width: 0; }
/* input.ph-name: beats the generic input[type='text'] box, so the name has
   no bubble until it's being renamed. */
input.ph-name {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.05rem 0.25rem;
  font-weight: 600;
  min-width: 0;
  flex: 1;
}
input.ph-name:not([readonly]) { border-color: var(--line); background: var(--input-bg); }
.ph-name:focus { border-color: var(--line); background: var(--input-bg); }
/* Read-only until double-click / Rename: clicks fall through to the header
   (select, Shift/⌘-click to add) instead of starting a text edit. */
.ph-name[readonly] { pointer-events: none; cursor: default; text-overflow: ellipsis; user-select: none; }
/* A double-click on the header (opens the mixer strip / Device view) must not
   leave the browser's word selection on the name (C-460). Rename still
   selects inside the field. */
.ph { user-select: none; -webkit-user-select: none; }
.ph-name:not([readonly]) { user-select: text; -webkit-user-select: text; }
.ph.muted .ph-name { opacity: 0.5; }
.ph button { padding: 0.02rem 0.32rem; font-size: 0.7rem; min-width: 20px; line-height: 1.4; flex: none; }
.ph-fold { border: 0 !important; background: transparent !important; min-width: 14px !important; padding: 0 !important; }
.ph-m { min-width: 20px !important; height: 16px; padding: 0 3px !important; border-radius: 3px !important; font: 600 10px/14px var(--mono) !important; text-align: center; background: var(--step-off) !important; border-color: var(--line) !important; color: var(--muted); }
.ph-m.on { background: var(--accent) !important; border-color: var(--accent) !important; color: var(--accent-ink); }
.ph-m.solo { outline: 2px solid var(--solo); }
.ph-s.on { background: var(--solo); color: var(--solo-ink); border-color: var(--solo); }
.ph-mute.on { background: var(--muted-2); color: var(--accent-ink); border-color: var(--muted-2); } /* grey, not red: red = recording */
.ph:has(.ph-mute.on) .ph-name { color: var(--muted); }
.ph.song-off, .strip.song-off, .rk-row.song-off { background-image: repeating-linear-gradient(135deg, var(--faint) 0 1px, transparent 1px 7px); }
.ph.song-off .ph-m, .rk-row.song-off .rk-led, .strip.song-off .sbtns .m { opacity: 0.45; }
.ph-arm.on { background: var(--rec); color: var(--warn-ink); border-color: var(--rec); }
.ph-kind { font-size: 0.68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-vol { width: 100%; }
/* Feedback 2026-11-19 Q1 pick C (ui/lineslider.js): the header volume is a
   2 px line; the thumb (a 3×10 tick) shows only on hover or while dragging.
   The input takes no pointer events, so a click can't jump the value. */
.line-slider { position: relative; display: flex; align-items: center; height: 14px; cursor: ew-resize; touch-action: none; }
.ph .line-slider { width: 60px; min-width: 30px; flex: 1; }
.line-slider input[type='range'] { pointer-events: none; height: 10px; }
/* The mockup's quiet grey line (an id beats the light-theme --range-fill rule). */
#pl-heads .line-slider input[type='range'] { --range-fill: var(--muted-2); }
.line-slider input[type='range']::-webkit-slider-runnable-track { height: 2px; border-radius: 1px; }
.line-slider input[type='range']::-moz-range-track { height: 2px; border-radius: 1px; }
.line-slider input[type='range']::-webkit-slider-thumb { width: 3px; height: 10px; margin-top: -4px; border-radius: 1px; background: var(--text); box-shadow: none; opacity: 0; transition: opacity 0.12s; }
.line-slider input[type='range']::-moz-range-thumb { width: 3px; height: 10px; border-radius: 1px; background: var(--text); box-shadow: none; opacity: 0; transition: opacity 0.12s; }
.line-slider:hover input[type='range']::-webkit-slider-thumb, .line-slider.dragging input[type='range']::-webkit-slider-thumb, .line-slider input[type='range']:focus-visible::-webkit-slider-thumb { opacity: 1; }
.line-slider:hover input[type='range']::-moz-range-thumb, .line-slider.dragging input[type='range']::-moz-range-thumb, .line-slider input[type='range']:focus-visible::-moz-range-thumb { opacity: 1; }
.ph-pan { width: 34px; flex: none; }
/* Feedback 2026-11-19 Q7 pick A: "Takes N" (shown only when the track has takes). */
.ph button.ph-takes { font-size: var(--fs-small); line-height: 14px; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted-2); white-space: nowrap; }
.ph button.ph-takes.on { background: var(--chrome-2); color: var(--text); border-color: var(--muted-2); }
.ph-more { border: 0 !important; background: transparent !important; color: var(--muted); }
.pl-grid { font: 10px var(--mono); color: var(--muted); letter-spacing: 0.05em; margin: 0 4px; white-space: nowrap; }
.ph-size { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; cursor: row-resize; }
.ph-size:hover { background: var(--accent); }
.ph.short .ph-line.full-only { display: none; }
/* Quieter headers: volume, pan and the ⋯ button stay in place but fade in on
   hover, keyboard focus or selection, so nothing shifts; tall tracks always
   show volume and pan. Right-click opens the same track menu as ⋯. */
.ph-mix, .ph .ph-more { opacity: 0; transition: opacity 0.12s; }
.ph:hover :is(.ph-mix, .ph-more), .ph:focus-within :is(.ph-mix, .ph-more), .ph.sel :is(.ph-mix, .ph-more), .ph.tall .ph-mix { opacity: 1; }
.ph-auto { background: var(--lane-bg); }
.ph-auto-label { font-family: var(--mono); font-size: 9px; color: var(--warn); text-transform: uppercase; letter-spacing: 0.2em; }
.ph-param { font-size: 0.75rem; padding: 0.02rem 0.2rem; min-width: 9ch; flex: 1; } /* audit UX 11: never cut to "Volum…" */
.ph-auto .ph-auto-label { flex: 0 1 auto; min-width: 0; overflow: hidden; }
.ph-mini { font-size: 0.68rem !important; }
/* Song lanes (ui/tempolane.js): Tempo + Signature, or one folded row. */
.ph-song .ph-line { gap: 6px; }
.ph-song-label { color: var(--muted); letter-spacing: 0.05em; text-transform: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sig-edit { position: absolute; z-index: 20; width: 52px; font-family: var(--mono); font-size: 11px; padding: 0 4px; background: var(--panel); color: var(--text); border: 1px solid var(--warn); border-radius: 3px; }
/* Narrow header = FL-style compact: color, numbered activator, name. */
.pl-heads.compact .full-only { display: none !important; }

/* ---------- channel rack ---------- */
/* v2 (2026-11-26, mockup 04-plans/mockups/2026-11-26_channel-rack-redesign.html):
   one-line toolbar, Sequencer | Piano roll switch, slim volume bar (pan on
   hover), insert number, 20 px steps with a 7 px beat gap and velocity fill,
   kit header with Show unused pads, dashed Add channel row, and a Piano roll
   view that borrows the Editor beside a slim channel list. Nothing amber. */

#pane-rack { grid-template-rows: auto 1fr auto; }
#pane-rack.active { display: grid; }
.rack-toolbar { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border-bottom: 1px solid var(--chrome-line); white-space: nowrap; overflow: hidden; }
.rack-toolbar > .rinput, .rack-toolbar > .rbtn, .rk-patchip { height: 26px; }
.rk-patchip { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--chrome-line); background: var(--chrome-2); border-radius: 5px; padding-left: 8px; }
.rk-patchip > .rinput { border: 0; background: transparent; height: 24px; max-width: 170px; }
.rack-swatch { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.rk-swingbox { display: inline-flex; align-items: center; gap: 6px; }
.rk-lbl { font-size: 11px; color: var(--muted-2); }
.rk-swing { width: 72px; }
.rk-view { height: 26px; display: inline-flex; border: 1px solid var(--chrome-line); border-radius: 6px; overflow: hidden; }
.rack-toolbar .rk-view > button { height: 100%; min-height: 0; border: 0; border-radius: 0; background: transparent; color: var(--muted-2); font-weight: 400; }
.rack-toolbar .rk-view > button:hover:not(:disabled):not(.on) { background: var(--chrome-2); color: var(--text); }
.rk-view > button { display: inline-flex; align-items: center; gap: 5px; padding: 0 11px; font-size: 12px; }
.rack-toolbar .rk-view > button.on { background: var(--fill); color: var(--on-fill); font-weight: 600; }
.rk-kb { font: 11px var(--mono); color: var(--muted-2); border: 1px solid var(--chrome-line); border-radius: 3px; padding: 0 4px; }
.rk-info { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rk-info:empty { display: none; }
.rk-sp { flex: 1; }
/* Graph, the filter and ⋯ read as ghost chips (mockup), not bare toolbar text */
.rack-toolbar > #rack-graph-btn, .rack-toolbar > #rack-opts, .rack-toolbar > #rack-filter, .rack-toolbar > #rack-len { height: 26px; padding: 0 9px; border: 1px solid var(--chrome-line); border-radius: 5px; background: transparent; color: var(--muted-2); font-size: 12px; }
.rack-toolbar > #rack-graph-btn:hover:not(:disabled), .rack-toolbar > #rack-opts:hover:not(:disabled) { color: var(--text); background: var(--chrome-2); }
.rack-toolbar > #rack-graph-btn[aria-pressed='true'] { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
#rack-opts { min-width: 30px; }
.rack { overflow: auto; padding: 6px 0 8px; min-height: 0; user-select: none; }
.rack[hidden] { display: none; }
.rack-empty { color: var(--muted); padding: 2rem; text-align: center; }
.rack-empty[hidden] { display: none; }
.rk-group { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; font-size: 12px; color: var(--muted-2); }
.rk-group .rk-group-name { color: var(--text); font-weight: 600; }
.rk-group:not(.plain):not(.rk-kithead) .rk-group-name { border-left: 3px solid var(--c); padding-left: 6px; }
.rk-row + .rk-group { margin-top: 4px; }
.rk-kitinfo { color: var(--muted-2); }
.rk-tog { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; height: 22px; padding: 0 4px; border: 0; background: transparent; color: var(--muted-2); font-size: 11.5px; }
.rk-tog i { width: 22px; height: 12px; border-radius: 6px; background: var(--chrome-2); border: 1px solid var(--chrome-line); position: relative; flex: none; }
.rk-tog i::after { content: ''; position: absolute; left: 1px; top: 1px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transition: transform var(--t-fast, 0.12s); }
.rk-tog[aria-checked='true'] i { background: var(--fill); border-color: var(--fill); }
.rk-tog[aria-checked='true'] i::after { background: var(--on-fill); transform: translateX(10px); }
.rk-row { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; width: max-content; min-width: 100%; box-sizing: border-box; }
.rk-row:hover { background: var(--panel-2); }
.rk-row.sel { background: var(--row-sel); }
.rk-row.child { padding-left: 22px; }
/* Fidelity pass (2026-11-25): the channel light as drawn in 2026-11-22_channel-rack-track-types.html A and
   drum-kit-channel.html A: an 8 px green (--meter-lo, the mockup's --ok) dot when the channel plays, --faint when muted. */
.rk-led { width: 8px; height: 8px; min-height: 0; border-radius: 50%; padding: 0; border: 0; background: var(--chrome-2); box-shadow: inset 0 0 0 1px var(--chrome-line); flex: none; }
.rk-led.on { background: var(--meter-lo); box-shadow: none; }
.rk-led.solo { outline: 2px solid var(--solo); }
.rk-vbar { width: 46px; height: 6px; border-radius: 3px; background: var(--chrome-2); position: relative; flex: none; overflow: hidden; cursor: ew-resize; touch-action: none; }
.rk-vbar > b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--muted-2); border-radius: 3px; }
.rk-vbar:hover > b, .rk-vbar:focus-visible > b { background: var(--text); }
.rk-pan { font: 10.5px var(--mono); color: var(--muted-2); width: 26px; flex: none; visibility: hidden; cursor: ew-resize; touch-action: none; text-align: center; }
.rk-row:hover .rk-pan { visibility: visible; }
.rk-ins { font: 11px var(--mono); color: var(--muted-2); width: 20px; height: 20px; min-height: 0; padding: 0; text-align: center; flex: none; border: 0; background: transparent; border-radius: 3px; }
.rk-ins:hover:not(:disabled) { background: var(--chrome-2); color: var(--text); }
.rk-ins[hidden] { display: inline-block; visibility: hidden; }
.rk-row.sub .rk-vbar, .rk-row.sub .rk-pan { visibility: hidden; }
.rk-pno { display: inline-block; width: 9px; height: 8px; margin-right: 2px; flex: none; border: 1px solid currentColor; border-radius: 1px; background: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 3px); opacity: 0.7; }
.rk-pno[hidden] { display: none; }
.rk-name {
  position: relative;
  width: 132px;
  height: 22px;
  min-height: 0;
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 6px 0 0;
  text-align: left;
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
  background: var(--chrome-2);
  border: 1px solid var(--chrome-line);
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
}
.rk-cbar { width: 3px; align-self: stretch; background: var(--c); flex: none; }
.rk-label { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rk-row.rk-kid .rk-pno { display: none; }
.rk-row.rk-kid .rk-name { width: 120px; margin-left: 12px; background: var(--panel-3); }
.rk-row.sel .rk-name { border-color: var(--fill); }
.rk-row.sel .rk-pan, .rk-row.sel .rk-ins { color: var(--text); }
.rk-av { margin-left: auto; width: 16px; height: 16px; border-radius: 50%; color: var(--on-fill); font-size: 9.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 0 0 1.5px var(--panel); }
.rk-av[hidden] { display: none; }
.rk-steps { display: flex; flex: none; }
.rk-steps[hidden] { display: none; }
.rk-step { position: relative; overflow: hidden; width: 20px; height: 22px; min-height: 0; margin-right: 2px; padding: 0; border: 0; border-radius: 3px; background: var(--chrome-2); flex: none; }
.rk-step:nth-child(4n) { margin-right: 7px; }
.rk-step:hover:not(:disabled) { background: var(--chrome-2); box-shadow: inset 0 0 0 1px var(--line); }
.rk-step.alt, .rk-step.alt:hover:not(:disabled) { background: var(--panel-3); }
/* fill height = velocity (--v, set per step) */
.rk-step.on, .rk-step.on:hover:not(:disabled) { background: color-mix(in srgb, var(--c) 28%, var(--chrome-2)); }
.rk-step.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: var(--v, 100%); background: var(--c); }
.rk-step.ph { box-shadow: inset 0 -2px 0 var(--fill); }
.rk-step.ph.on::after { bottom: 2px; }
.rk-step.rk-erase { opacity: 0.3; } /* in a right-drag erase sweep (ui/channelrack.js eraseStep) */
.rk-mr { position: relative; height: 22px; flex: none; border: 1px solid var(--chrome-line); border-radius: 3px; overflow: hidden; cursor: pointer; background: var(--lane-bg); }
.rk-mr[hidden] { display: none; }
.rk-mr:hover, .rk-mr:focus-visible { border-color: var(--muted); }
.rk-preview { display: block; height: 20px; }
.rk-go { position: absolute; right: 6px; top: 2px; font-size: 11px; color: var(--muted-2); pointer-events: none; }
.rk-addrow { display: flex; align-items: center; gap: 8px; margin: 6px 10px 0; height: 28px; width: calc(100% - 20px); border: 1px dashed var(--chrome-line); border-radius: 5px; background: transparent; color: var(--muted-2); padding: 0 12px; font-size: 12px; text-align: left; }
.rk-addrow:hover:not(:disabled) { border-color: var(--muted); color: var(--text); background: transparent; }
#rack-graph-btn[aria-pressed='true'] { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
#rack-graph-btn[hidden] { display: none; }

/* Piano roll view: channel list + the borrowed Editor contents (same grid as #pane-roll). */
.rk-split { display: flex; min-height: 0; min-width: 0; }
.rk-split[hidden] { display: none; }
.rk-side { width: 188px; flex: none; border-right: 1px solid var(--chrome-line); padding: 6px 0; overflow: auto; user-select: none; }
.rk-side .rk-group { padding: 0 10px; }
.rk-sideitem { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; }
.rk-sideitem:hover { background: var(--panel-2); }
.rk-sideitem.child { padding-left: 18px; }
.rk-sideitem .rk-name { width: 124px; }
.rk-sideitem.sel { background: var(--row-sel); }
.rk-sideitem.sel .rk-name { background: var(--fill); color: var(--on-fill); font-weight: 600; border-color: var(--fill); }
.rk-ghost { width: 14px; height: 14px; min-height: 0; padding: 0; border-radius: 50%; border: 1.5px dashed var(--muted); background: transparent; flex: none; }
.rk-ghost:hover:not(:disabled) { border-color: var(--text); background: transparent; }
.rk-ghost.on, .rk-ghost.on:hover:not(:disabled) { border-style: solid; border-color: var(--c); background: color-mix(in srgb, var(--c) 30%, transparent); }
.rk-ghost[hidden] { display: inline-block; visibility: hidden; }
.rk-rollhost { flex: 1; min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto minmax(120px, 1fr) auto; background: var(--panel); }
.rk-rollhost > .roll-toolbar { grid-row: 1; }
.rk-rollhost > .legendbar { grid-row: 2; }
.rk-rollhost > .roll-stage { grid-row: 3; }
.rk-rollhost > .lane-footer { grid-row: 4; }
.rk-rollhost > #audio-editor[hidden], .rk-rollhost > #kit-steps[hidden] { display: none; }
.rk-rollhost.audio-mode, .rk-rollhost.kit-mode { grid-template-rows: minmax(0, 1fr); }
.rk-rollhost.audio-mode > :is(.roll-toolbar, .legendbar, .roll-stage, .lane-footer),
.rk-rollhost.kit-mode > :is(.roll-toolbar, .legendbar, .roll-stage, .lane-footer) { display: none; }
.rk-rollhost.audio-mode > #audio-editor, .rk-rollhost.kit-mode > #kit-steps { display: grid; }
/* Rack headers fold (▾ caret; local, this session). */
.rk-fold { width: 14px; height: 18px; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 10px; flex: none; }
.rk-fold:hover:not(:disabled) { color: var(--text); background: transparent; }
.rk-fold.folded > span { display: inline-block; transform: rotate(-90deg); }
/* The borrowed roll keeps one line of its toolbar (mockup: Snap / Quantize beside the switch). The
   channel list picks the channel, and Articulations, Scale and Musical Typing stay in the Editor. */
.rk-rollhost #roll-clip-pod, .rk-rollhost #roll-multi, .rk-rollhost #roll-sound, .rk-rollhost #roll-keys, .rk-rollhost #roll-ghost { display: none; }
.rk-rollhost > .roll-toolbar { flex-wrap: nowrap; overflow: hidden; }
/* "Mo is here too" over the borrowed roll (existing presence feed). */
.rk-split { position: relative; }
.rk-who { position: absolute; right: 10px; top: 46px; z-index: 3; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted-2); background: var(--panel-2); border: 1px solid var(--chrome-line); border-radius: 12px; padding: 2px 8px 2px 3px; pointer-events: none; }
.rk-who[hidden] { display: none; }
.rk-who .rk-av { margin: 0; }
/* The Editor's tab while its roll is in the rack (body.roll-in-rack). */
body.roll-in-rack :is(.dock-tabs [data-tab='roll'], [data-panel='roll'])::after { content: ' · in rack'; color: var(--muted); font-weight: 400; }
/* Piano roll with the Editor on screen: the Editor flashes its outline once. */
.rk-flash { animation: rk-flash 0.9s var(--ease-out, ease-out); }
@keyframes rk-flash { 0%, 55% { box-shadow: inset 0 0 0 2px var(--fill); } 100% { box-shadow: inset 0 0 0 2px transparent; } }
@media (prefers-reduced-motion: reduce) { .rk-flash { animation: none; box-shadow: inset 0 0 0 2px var(--fill); } }

/* Graph Editor (under the rack, FL style) */
.rk-graph { border-top: 1px solid var(--line); background: var(--panel); min-width: 0; }
.rk-graph[hidden] { display: none; }
.rk-graph-bar { display: flex; align-items: center; gap: 8px; padding: 4px 10px; flex-wrap: wrap; }
.rk-graph-tabs { display: flex; gap: 2px; }
.rk-graph-tabs button { font-size: 0.72rem; padding: 0.15rem 0.5rem; }
.rk-graph-tabs button[aria-selected='true'] { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
.rk-graph-row { font-size: 0.75rem; color: var(--muted); }
.rk-graph-canvas { display: block; width: 100%; height: 96px; touch-action: none; cursor: crosshair; }

/* ---------- setup + settings ---------- */

#setup-steps { display: grid; gap: 0.8rem; }
#setup-steps[hidden] { display: none; }
.setup-step { border: 0; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.setup-step legend { color: var(--text); font-weight: 600; margin-bottom: 0.4rem; }
.setup-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.setup-cards.three { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.setup-card { display: flex !important; gap: 0.5rem; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.55rem 0.6rem; cursor: pointer; background: var(--panel-2); }
.setup-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.setup-card input { margin-top: 0.2rem; accent-color: var(--accent); }
.setup-card-body { display: grid; gap: 0.15rem; font-size: 0.8rem; color: var(--muted); }
.setup-card-body b { color: var(--text); font-size: 0.9rem; }
.setup-more summary { cursor: pointer; color: var(--muted); font-size: 0.8rem; }
.cheat-table { width: 100%; border-collapse: collapse; font-size: 0.76rem; margin-top: 0.4rem; }
.cheat-table th, .cheat-table td { text-align: left; padding: 0.25rem 0.35rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.cheat-table th { color: var(--muted); font-family: var(--mono); font-size: 9px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; }
.settings-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--pop-shadow); padding: 1rem 1.2rem 1.2rem; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; }
.settings-card h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.settings-card h3 { font-family: var(--mono); font-size: 10px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.26em; color: var(--muted); margin: 1rem 0 0.5rem; }
.set-radios { display: flex; gap: 1rem; flex-wrap: wrap; }
.set-radios label, .set-check { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.set-radios input, .set-check input { accent-color: var(--accent); }
.set-row { display: flex; gap: 0.5rem; margin-top: 0.6rem; }

/* ---------- splitter + dock ---------- */

.splitter {
  background: var(--line-soft);
  cursor: row-resize;
  border-top: 1px solid var(--line);
}
.splitter:hover, .splitter.drag { background: var(--accent); }

.dock {
  display: grid;
  grid-template-rows: 32px 1fr;
  background: var(--panel);
  min-height: 0;
}
.dock-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
}
.dock-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  padding: 0 0.9rem;
}
.dock-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.dock-title { margin-left: auto; align-self: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.dock-tabs button { white-space: nowrap; }
.dock-tabs { overflow-x: auto; scrollbar-width: none; }
@media (max-width: 420px) { .dock-title { display: none; } }
/* Break-ui #16: triple-clicking a setup choice must not select the next button label. */
.setup-cards, .setup-card, #setup-steps button { user-select: none; -webkit-user-select: none; }

.tab-pane { display: none; min-height: 0; }
.tab-pane.active { display: grid; }
.floating-panel {
  position: fixed;
  z-index: 90;
  display: grid;
  grid-template-rows: 32px minmax(0, 1fr);
  min-width: min(320px, 100vw);
  min-height: min(180px, 100vh);
  max-width: 100vw;
  max-height: 100vh;
  resize: both;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--pop-shadow);
}
.floating-panel[hidden] { display: none; }
.floating-panel #rack-float { display: none; }
.floating-panel-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px 0 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  cursor: move;
  touch-action: none;
  user-select: none;
}
.floating-panel-head > span { flex: 1; }
.panel-close { min-width: 28px; text-align: center; }
.dock-tabs .panel-close { padding: 0 8px; font-size: 16px; }
.dock-tabs [data-tab].floating-open { outline: 1px solid var(--select); outline-offset: -2px; }
#pane-roll { grid-template-rows: auto auto 1fr auto; }
/* Fixed rows, so a folded (hidden) articulation row leaves row 2 empty
   instead of shifting the stage and footer up a row. */
#pane-roll > .roll-toolbar { grid-row: 1; }
#pane-roll > .legendbar { grid-row: 2; }
#pane-roll > .roll-stage { grid-row: 3; }
#pane-roll > .lane-footer { grid-row: 4; }
.legendbar[hidden] { display: none; }
#pane-mixer { overflow: auto; }
/* The mixer stays exactly as it was (Avi, 2026-11-27: "the mixer should stay how it is
   tho", "like currently today"), so Studio's raised --faint (#7A7A82) does not reach it:
   --faint-mixer is each theme's faint from before the raise. */
#pane-mixer { --faint: var(--faint-mixer); }

/* ---------- piano roll chrome ---------- */

.roll-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.8rem;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}
.clip-name { font-weight: 700; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glabel { font-family: var(--mono); font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.seg { display: inline-flex; }
.seg .rbtn { border-radius: 0; margin-left: -1px; }
.seg .rbtn:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.seg .rbtn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.rbtn { padding: 0.25rem 0.5rem; font-size: 0.82rem; line-height: 1.2; }
.rbtn.tool.on, .rbtn.on { background: var(--fill); color: var(--on-fill); border-color: var(--fill); position: relative; }
/* keep the on-state fill under the global button:hover (0,2,1), or the --on-fill label vanishes on --panel-2 */
.rbtn.on:hover:not(:disabled) { background: var(--fill); border-color: var(--fill); }
.rinput { font-size: 0.82rem; padding: 0.2rem 0.3rem; }
.art-swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--muted)); flex: none; }
/* Chips (quieter main view, pass 2): show the value, click for the options. */
.roll-chip { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.roll-chip .ic { width: 14px; height: 14px; flex: none; }
.roll-chip .caret { color: var(--muted); font-size: 0.7em; margin-left: 0.05rem; }
.roll-chip.on .caret { color: inherit; opacity: 0.75; }
#art-group[hidden] { display: none; }
/* Popover (util.js showPopover): a menu-sized panel with a few controls. */
.ctx-menu.pop { min-width: 0; padding: 8px 10px; }
.pop-body { display: grid; gap: 0.45rem; max-width: 260px; }
.pop-title { font-weight: 600; font-size: 0.85rem; }
.pop-row { display: flex; align-items: center; gap: 0.4rem; }
.pop-check { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; cursor: pointer; }
.pop-hint { margin: 0; color: var(--muted); font-size: 0.75rem; line-height: 1.35; }
.pop .num { width: 52px; text-align: center; font-family: var(--mono); font-variant-numeric: tabular-nums; cursor: ns-resize; -moz-appearance: textfield; }
.pop .num::-webkit-outer-spin-button, .pop .num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.legendbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 4px 10px;
  border-bottom: 1px solid var(--line);
  min-height: 30px;
  overflow-x: auto;
}
.legend-key-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.legend-chips { display: flex; gap: 0.3rem; flex-wrap: nowrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.chip .sw { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip .num { color: var(--muted); font-family: var(--mono); font-size: 0.7rem; font-variant-numeric: tabular-nums; }
.chip.current { border-color: var(--c); }
.legend-status { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }

.roll-stage { position: relative; min-height: 0; }
#roll-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
/* Middle-button drag pan (ui/middlepan.js); beats the hover cursor the views set inline. */
#pl-canvas.panning, #roll-canvas.panning, .panning, .panning * { cursor: grabbing !important; }
.roll-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  pointer-events: none;
}
.roll-empty[hidden] { display: none; }
.roll-empty-in { display: grid; justify-items: center; gap: 10px; text-align: center; }
.roll-empty-in p { margin: 0; }
.roll-empty #roll-empty-new { pointer-events: auto; }
/* No clip open (audit 2026-11-26 roll U13): the note controls rest (inert, pianoroll.js syncEmpty). */
.roll-toolbar [inert] { opacity: 0.4; }
/* The roll has the keys (audit roll U14): a select-colour line under its bar. */
#pane-roll.roll-keys-on > .roll-toolbar { box-shadow: inset 0 -2px 0 var(--select); }

.overlay-panel {
  position: absolute;
  inset: 12px;
  z-index: 5;
  overflow: auto;
  background: color-mix(in srgb, var(--panel) 97%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--pop-shadow);
  padding: 14px 18px;
}
.overlay-panel[hidden] { display: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-head h2 { margin: 0; font-size: 1rem; }
.cheat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 2rem; }
.cheat-col h3 { font-family: var(--mono); font-size: 10px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.26em; color: var(--muted); margin: 1rem 0 0.4rem; }
.cheat-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.6rem; align-items: center; padding: 0.18rem 0; font-size: 0.85rem; }
.cheat-row kbd { justify-self: start; }

.lane-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 4px 10px;
  border-top: 1px solid var(--line);
  min-height: 32px;
  overflow-x: auto;
}
.lane-footer .num { width: 48px; text-align: center; font-family: var(--mono); font-variant-numeric: tabular-nums; cursor: ns-resize; -moz-appearance: textfield; }
.lane-footer .num::-webkit-outer-spin-button, .lane-footer .num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.foot-sep { align-self: stretch; width: 1px; margin: 3px 0.25em; background: var(--line); }
/* Command search (ui/cmdsearch.js, ⌘K): a wide popover near the top. */
.ctx-menu.pop.cmd-pop { padding: 0; width: min(520px, calc(100vw - 32px)); overflow: hidden; }
.cmd-search { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: min(460px, calc(100vh - 120px)); }
.cmd-input { margin: 8px; padding: 0.5rem 0.65rem; font-size: 0.95rem; border-radius: 7px; }
.cmd-list { overflow-y: auto; padding: 0 4px 4px; display: grid; align-content: start; }
.cmd-row { display: flex; align-items: center; gap: 0.6rem; background: transparent; border: 0; border-radius: 5px; padding: 0.38rem 0.6rem; text-align: left; color: inherit; }
.cmd-row.sel { background: color-mix(in srgb, var(--text) 12%, transparent); }
.cmd-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-group { flex: none; color: var(--muted); font-size: 0.75rem; }
.cmd-row .ctx-hint { flex: none; min-width: 3.2em; text-align: right; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.cmd-empty { padding: 0.6rem; color: var(--muted); font-size: 0.82rem; }
.cmd-foot { border-top: 1px solid var(--line); padding: 0.35rem 0.7rem; color: var(--muted); font-size: 0.72rem; }
.foot-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.foot-hint { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }

/* ---------- context menu ---------- */

.ctx-menu {
  position: fixed;
  z-index: 60;
  min-width: 190px;
  max-height: calc(100vh - 8px);
  overflow-y: auto;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  box-shadow: var(--pop-shadow);
  display: grid;
}
.ctx-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 0;
  border-radius: 5px;
  padding: 0.35rem 0.6rem;
  text-align: left;
}
.ctx-item:hover:not(:disabled) { background: var(--panel-3); }
.ctx-item .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; border: 1px solid var(--line-soft); }
.ctx-item .swatch.blank { visibility: hidden; }
.ctx-item .ctx-hint { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.ctx-item.on:not(:disabled), .ctx-item.open { background: var(--panel-3); }
.ctx-item:focus-visible { outline: none; background: var(--panel-3); box-shadow: inset 2px 0 0 var(--select); }
/* A folder row (showMenu submenu): a clear chevron at the right edge, in
   full text colour so the row reads as "opens more" (Avi: make it apparent). */
.ctx-item .ctx-chev { margin-left: auto; flex: none; width: 7px; height: 7px; margin-right: 3px; border-top: 2px solid var(--text); border-right: 2px solid var(--text); transform: rotate(45deg); }
.ctx-item.ctx-folder { font-weight: 600; }
.ctx-item .ctx-hint + .ctx-chev { margin-left: 0.6rem; }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.ctx-head { padding: 0.45rem 0.6rem 0.15rem; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em; }
.ctx-head:first-child { padding-top: 0.2rem; }
.ask-box { min-width: 220px; gap: 4px; padding: 8px; }
.ask-label { font-size: 0.72rem; color: var(--muted); }
.ask-input { width: 100%; }
/* "+ FX" search picker (ui/fxpicker.js) */
.fx-picker { width: 260px; gap: 4px; padding: 6px; }
.fx-pick-input { width: 100%; }
.fx-pick-list { display: grid; max-height: 320px; overflow-y: auto; }
.fx-pick-list .ctx-item.active:not(:disabled) { background: var(--panel-3); }
.fx-pick-head { padding: 0.4rem 0.6rem 0.15rem; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.fx-pick-empty, .fx-pick-note { padding: 0.6rem; color: var(--muted); text-align: center; font-size: 0.8rem; }

/* ---------- mixer ---------- */

.mixer { display: flex; gap: 8px; padding: 10px; align-items: stretch; min-height: 100%; }
.strip {
  width: 86px;
  flex: none;
  display: grid;
  /* inserts | pan | fader | dB | M/S | name plate (fixed rows: faders line up) */
  grid-template-rows: 87px 52px auto auto auto 1fr; /* 87 = 66 inserts + the IN slot (18) + gap (3) */
  gap: 6px;
  justify-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--c);
  border-radius: 14px;
  padding: 8px 6px;
}
.strip.master { --c: var(--fill); border-top-color: var(--accent); margin-left: auto; }
/* Shared strip selection (ui/devicechain.js): every selected strip, and a
   thin text-coloured edge on the primary one (the Devices panel's). */
.strip.sel { background: var(--panel-3); }
.strip.primary { box-shadow: 0 0 0 1px var(--text); }
.strip .sname { font-size: 0.78rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip .pan { width: 70px; }
.strip .fader-row { display: flex; gap: 4px; align-items: stretch; min-height: 0; }
.strip .fader {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 22px;
  min-height: 80px;
  height: auto;
  --range-grad: linear-gradient(to top, var(--range-track) var(--lo, 0%), var(--range-fill) var(--lo, 0%), var(--range-fill) var(--hi, 50%), var(--range-track) var(--hi, 50%));
}
.strip .fader::-webkit-slider-runnable-track { width: 4px; height: 100%; }
.strip .fader::-moz-range-track { width: 4px; height: 100%; }
.strip .fader::-webkit-slider-thumb { margin-top: 0; margin-left: -4px; }
.strip canvas.meter { width: 10px; height: 100%; min-height: 80px; background: var(--meter-bg); border-radius: 2px; cursor: pointer; }
.strip .sbtns { display: flex; gap: 3px; }
.strip .sbtns button { padding: 0.05rem 0.4rem; font-size: 0.72rem; }
.strip .sbtns .m.on { background: var(--warn); color: var(--warn-ink); border-color: var(--warn); }
.strip .sbtns .s.on { background: var(--solo); color: var(--solo-ink); border-color: var(--solo); }
.strip .db { font-family: var(--mono); font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.strip .fx-area { width: 100%; min-height: 0; display: flex; flex-direction: column; gap: 3px; }
/* Mixer I/O slots (ui/mixer.js ioSlot; Avi 2026-11-20): In tops the
   inserts area, Out sits on the name plate. Rows stay fixed, faders line up. */
.strip .io-slot { display: flex; align-items: center; gap: 3px; width: 100%; height: 18px; flex: none; padding: 0 3px; border-radius: 4px; border: 1px solid var(--line); background: var(--panel-3); color: var(--muted-2); font: inherit; font-size: var(--fs-small); cursor: pointer; overflow: hidden; white-space: nowrap; text-align: left; }
.strip .io-slot .k { flex: none; font-size: var(--fs-small); color: var(--muted); }
.strip .io-slot .v { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.strip .io-slot:hover:not(:disabled) { border-color: var(--select); color: var(--text); }
.strip .io-slot:disabled { cursor: default; opacity: 0.5; }
.strip .io-slot.person { border-color: var(--text); color: var(--text); }
.strip .io-slot.blank { visibility: hidden; }
.strip .s-plate { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; min-width: 0; }
#mixer.narrow .strip .s-plate { align-self: start; }
#mixer.narrow .strip .io-slot { height: 14px; padding: 0; justify-content: center; font-size: var(--fs-small); }
#mixer.narrow .strip .io-slot .k, #mixer.narrow .strip .io-slot .v { display: none; }
#mixer.narrow .strip .io-slot::after { content: attr(data-short); }
/* Record a person beside Input (Avi 2026-11-20, mockup A); same look as the header's .ph-person. */
.strip .io-in-row { display: flex; align-items: center; gap: 3px; width: 100%; flex: none; }
.strip .io-in-row .io-slot { flex: 1 1 auto; min-width: 0; width: auto; }
.strip .io-person { flex: none; width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px dashed var(--muted); background: transparent; color: var(--muted-2); font: inherit; font-size: var(--fs-small); line-height: 1; cursor: pointer; }
.strip .io-person:hover, .strip .io-person:focus-visible { color: var(--text); border-color: var(--text); }
.strip .io-person.on { border-style: solid; border-color: var(--person, var(--muted-2)); background: var(--person, var(--muted-2)); color: var(--accent-ink); font-weight: 700; }
.strip .io-person[hidden] { display: none; }
#mixer.narrow .strip .io-person { width: 14px; height: 14px; font-size: var(--fs-small); }
.strip .fx-slots { display: grid; gap: 3px; align-content: start; width: 100%; min-height: 0; flex: 1; overflow-y: auto; }
.strip .fx-slots button {
  width: 100%;
  padding: 0.05rem 0.3rem;
  font-size: 0.66rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.strip.master { --c: var(--text); }
.strip.master .sname { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.strip.master .master-menu { padding: 0 4px; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.strip.master .master-menu:hover, .strip.master .master-menu:focus-visible { color: var(--text); }
.strip.master .lufs { font-size: 10px; font-variant-numeric: tabular-nums; text-align: center; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap; }
.strip.master .lufs:hover, .strip.master .lufs:focus-visible { color: var(--text); }
.fx-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.strip .fx-row .fx-slot { flex: 1; min-width: 0; text-align: left; color: var(--text); }
.strip .fx-row.off .fx-slot { color: var(--muted); }
.strip .fx-row .fx-dot {
  flex: 0 0 10px; width: 10px; height: 10px; padding: 0;
  border: 1px solid var(--c); border-radius: 50%; background: transparent;
  touch-action: none;
}
.strip .fx-dot[aria-pressed=true], .strip .fx-dot.swiping[data-swipe-on=true] { background: var(--c); }
.strip .fx-dot.swiping[data-swipe-on=false] { background: transparent; }
.strip .fx-dot.swiping { outline: 1px solid var(--text); outline-offset: 2px; }
.strip .fx-add { border-style: dashed; }
/* ---------- Devices panel (ui/devices.js; mockup 3b) ---------- */

/* A dock tab (quieter main view pass 4) or a floating window; .tab-pane.active shows it. */
.devices {
  grid-template-rows: 30px minmax(0, 1fr);
  background: var(--panel);
  min-height: 0;
  overflow: hidden;
}
.dhead { display: flex; align-items: center; gap: 10px; padding: 0 10px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.dhead .sp, .dvh .sp { flex: 1; }
.dev-label { color: var(--faint); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.dev-all {
  width: 12px;
  height: 12px;
  padding: 0;
  flex: none;
  border-radius: 3px;
  border: 1.5px solid var(--c);
  background: transparent;
  transition: background-color 0.12s, transform 0.12s cubic-bezier(0.23, 1, 0.32, 1);
}
.dev-all.on { background: var(--c); }
.dev-all:hover:not(:disabled) { border-color: var(--c); background: transparent; box-shadow: 0 0 0 3px var(--line-soft); }
.dev-all.on:hover:not(:disabled) { background: var(--c); }
.dev-all[hidden] { display: none; }
.dev-strip { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dev-more { font-size: 11px; color: var(--muted-2); background: var(--panel-3); border: 1px solid var(--line); border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.dev-more[hidden] { display: none; }
.dev-insert { font-family: var(--mono); font-size: 11px; color: var(--muted-2); white-space: nowrap; }

/* Cards are one fixed height (--dev-h), top-aligned: a taller dock never stretches them. */
.dchain { position: relative; display: flex; align-items: flex-start; padding: 10px; overflow-x: auto; overflow-y: auto; /* vertical only as a fallback: a zone shorter than a card */ min-height: 0; }
.dchain.chainoff .dev { opacity: 0.45; filter: saturate(0.3); }
.dev {
  flex: none;
  display: flex;
  flex-direction: column;
  height: var(--dev-h);
  align-self: flex-start;
  min-height: 0;
  box-sizing: border-box;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  transition: transform 0.15s cubic-bezier(0.23, 1, 0.32, 1);
}
/* Only the drag lift fades; selection borders and the chain-off grey are instant. */
.dev.moving { opacity: 0.45; transform: scale(0.98); transition: opacity 0.15s, transform 0.15s cubic-bezier(0.23, 1, 0.32, 1); }
.dev.flash { animation: dev-flash 0.4s cubic-bezier(0.23, 1, 0.32, 1); }
@keyframes dev-flash {
  from { border-color: var(--select); box-shadow: 0 0 0 3px var(--select); }
  to { box-shadow: 0 0 0 0 transparent; }
}
.dvh {
  height: 26px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line-soft);
  border-radius: 5px 5px 0 0;
  cursor: grab;
  min-width: 0;
}
.dvh:active { cursor: grabbing; }
.dev-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dev-pwr {
  width: 10px;
  height: 10px;
  padding: 0;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--c);
  background: transparent;
}
.dev-pwr.on { background: var(--c); }
.dev-pwr:hover:not(:disabled) { border-color: var(--c); box-shadow: 0 0 0 3px var(--line-soft); }
.dev-pwr.on:hover:not(:disabled) { background: var(--c); }
.dev-del { border: 0; padding: 0 3px; line-height: 1; color: var(--muted); opacity: 0; transition: opacity 0.12s; }
/* opacity, not visibility: the × stays in the tab order (keyboard users reach it). */
.dev:hover .dev-del, .dev:focus-within .dev-del, .dev-del:focus-visible { opacity: 1; }
.dev-del:hover:not(:disabled) { color: var(--text); background: var(--panel-3); }
.fx-warn { color: var(--warn); cursor: default; }
.fx-warn[hidden] { display: none; }
.dvb { flex: 1; min-height: 0; overflow: hidden; padding: 10px; font-size: 0.78rem; transition: opacity 0.15s; }
/* A body never scrolls: what doesn't fit flows into another column to the
   right (fixed height + column-fill: auto), and ui/devicefit.js widens the
   card to show it. Each block stays whole in one column. */
.dvb { display: block; column-width: var(--dev-col-w); column-fill: auto; column-gap: 10px; }
.dvb > *, .dvb .smp > * { break-inside: avoid; margin-bottom: 8px; }
.dvb > :last-child { margin-bottom: 0; }
.dev.off .dvb { opacity: 0.4; }
/* Folded card: a thin strip with its name running down. */
.dev.folded { width: 28px !important; }
.dev.folded .dvb, .dev.folded .dev-del, .dev.folded .fx-warn { display: none; }
.dev.folded .dvh { height: 100%; flex-direction: column; padding: 8px 0; border-bottom: 0; border-radius: 5px; }
.dev.folded .dev-name { writing-mode: vertical-rl; }
/* The source card (read-only: what makes this strip's sound). */
.dev-src { min-width: var(--dev-h); position: relative; }
.dev-src .dvh { cursor: default; }
.dev-swatch { width: 10px; height: 10px; flex: none; border-radius: 2px; background: var(--c); }
.dev-src .dvb { display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; }
.dev-src-sw { width: 44px; height: 44px; border-radius: 6px; background: var(--c); opacity: 0.85; }
.dev-src-kind { font-family: var(--mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
/* Level between two cards (amber: it's sound). */
.dmeter { position: relative; flex: none; width: 5px; margin: 16px 6px 6px; background: var(--meter-bg); border-radius: 2px; overflow: hidden; }
.dmeter i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--meter-lo); border-radius: 2px; }
.dadd {
  flex: none;
  width: 120px;
  margin-left: 8px;
  border: 1px dashed var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--faint);
  font-size: 18px;
}
.dadd:hover:not(:disabled) { color: var(--muted-2); border-color: var(--muted); background: transparent; }
.dadd[hidden] { display: none; }
/* Where a drop lands: a white bar in the gap. */
.dev-bar { position: absolute; top: 8px; bottom: 8px; width: 2px; border-radius: 1px; background: var(--select); pointer-events: none; }
.dev-bar[hidden] { display: none; }

/* Device bodies (ui/fxpanel.js buildCard): graph on top, knobs below. */
.knob[hidden], .fx-body [hidden] { display: none !important; }
.sc-row { display: grid; grid-template-columns: 64px 1fr 58px; align-items: center; gap: 6px; }
.sc-row select { grid-column: 2 / 4; min-width: 0; }
.sc-check { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.sc-gr { display: grid; grid-template-columns: 64px 1fr 58px; align-items: center; gap: 6px; }
.sc-gr-bar { height: 6px; background: var(--meter-bg); border-radius: 2px; overflow: hidden; }
.sc-gr-fill { height: 100%; width: 0; background: var(--warn); }
.sc-gr-text { color: var(--muted); font-family: var(--mono); font-size: 10px; font-variant-numeric: tabular-nums; text-align: right; }
.fx-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.fx-modes button { font-size: 0.74rem; color: var(--muted); padding: 0.15rem 0.3rem; }
.fx-modes button[aria-selected='true'] { color: var(--text); border-color: var(--c, var(--text)); background: var(--panel-2); }
.fx-key { display: grid; gap: 5px; }
.fx-trig { display: grid; grid-template-columns: 52px 1fr auto; gap: 6px; align-items: center; color: var(--muted); font-size: 0.74rem; }
.fx-trig select { min-width: 0; }
.fx-body canvas { width: 100%; flex: none; display: block; background: var(--lane-bg); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.fx-shape { height: 80px; cursor: grab; touch-action: none; display: none !important; }
.fx-body.shape .fx-shape { display: block !important; }
.fx-scope { height: 72px; }
.fx-eq-curve { height: 72px; cursor: grab; touch-action: none; }
.fx-modes.three { grid-template-columns: 1fr 1fr 1fr; }
.fx-clip-curve { height: 80px; }
.fx-modes.four { grid-template-columns: repeat(4, 1fr); }
.fx-knobs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; }
.fx-knob-x { display: inline-grid; justify-items: center; gap: 2px; }
.fx-auto { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 0.68rem; }

/* ---------- narrow screens ---------- */

@media (max-width: 760px) {
  :root { --dock-h: 52vh; }
  .workspace { grid-template-columns: 1fr; }
  .pl-body { --head-w: 120px !important; }
  .pl-heads .full-only { display: none !important; }
  .setup-cards, .setup-cards.three { grid-template-columns: 1fr; }
  /* #status hides only the all-clear: "Reconnecting…", "Microphone blocked" stay (ui/barmenus.js sets data-ok). */
  .brand .room, #t-perf { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
#settings { background: var(--scrim); }

/* ---------- plugin picker (ui/pluginpicker.js; reuses .settings-card) ---------- */
.plugin-picker { background: var(--scrim); }
.plugin-picker .pp-search { width: 100%; margin: 0.8rem 0 0.5rem; padding: 0.45rem 0.6rem; background: var(--input-bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.plugin-picker .pp-list { display: grid; gap: 2px; max-height: min(52vh, 460px); overflow: auto; }
.plugin-picker .pp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.4rem 0.6rem; background: none; color: var(--text); border: 0; border-radius: 5px; text-align: left; font: inherit; cursor: pointer; }
.plugin-picker .pp-row:hover, .plugin-picker .pp-row:focus-visible { background: var(--line-soft); outline: none; }
.plugin-picker .pp-row.current { color: var(--accent); }
.plugin-picker .pp-row small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plugin-picker .pp-note { margin: 0.6rem 0 0; font-size: 0.76rem; }

/* ---------- browser panel (ui/browser.js): sidebar + tree + preview ----------
   13 px text, 28 px rows. Hover/selection tints mix --text so they show in
   every theme. Folders use --folder / --folder-bg; amber (--accent) = sound. */
.browser { display: grid; grid-template-columns: 156px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; padding: 0; overflow: hidden; font-size: 13px; position: relative; }
.br-side { grid-row: 1 / 4; overflow-y: auto; padding: 2px 0 10px; border-right: 1px solid var(--line-soft); min-width: 0; }
.br-head { color: var(--faint); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; padding: 12px 12px 5px; margin: 0; font-weight: 400; font-family: var(--sans); }
.br-cat { display: flex; align-items: center; gap: 8px; width: calc(100% - 8px); height: 27px; padding: 0 8px; margin: 0 4px; border: 0; border-radius: 5px; background: transparent; color: var(--muted-2); text-align: left; font-size: 13px; min-width: 0; }
.br-cat:hover:not(:disabled) { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.br-cat.on, .br-cat.on:hover { color: var(--text); background: color-mix(in srgb, var(--text) 13%, transparent); }
.br-cat.dim { opacity: 0.55; }
.br-cat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.br-cat .br-meta { margin-left: auto; padding-left: 6px; }
.br-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; grid-column: 2; grid-row: 1 / 3; }
.br-search { display: flex; align-items: center; gap: 7px; flex: none; margin: 8px 10px 6px; padding: 0 9px; height: 30px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line-soft); }
.br-search:focus-within { border-color: var(--select); }
.br-search svg { flex: none; stroke: var(--muted); fill: none; }
.br-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; box-shadow: none; padding: 0; color: var(--text); font: inherit; font-size: 13px; }
.br-search input::placeholder { color: var(--faint); }
.br-tree { flex: 1; min-height: 0; overflow: auto; padding: 4px 6px 10px; outline: none; }
.br-row { display: flex; align-items: center; gap: 7px; height: 28px; padding-right: 8px; border-radius: 5px; white-space: nowrap; position: relative; color: var(--text); }
.br-row:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.br-row.sel { background: color-mix(in srgb, var(--text) 12%, transparent); }
.br-tree:focus .br-row.sel { background: color-mix(in srgb, var(--text) 17%, transparent); }
.br-tree:focus .br-row.sel.focus-edge, .br-row.focus-edge { box-shadow: inset 2px 0 0 var(--select); }
.br-chev { width: 14px; height: 14px; display: grid; place-items: center; color: var(--faint); flex: none; border-radius: 3px; background: transparent; border: 0; padding: 0; }
.br-chev svg { stroke: currentColor; fill: none; }
.br-row.open > .br-chev svg { transform: rotate(90deg); }
.br-chev:hover { color: var(--text); }
.br-ico { flex: none; width: 16px; height: 16px; display: grid; place-items: center; color: var(--muted); }
.br-ico svg { stroke: currentColor; fill: none; }
.br-swatch { flex: none; width: 9px; height: 9px; border-radius: 2px; background: var(--c, var(--muted)); }
.br-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.br-meta { margin-left: auto; padding-left: 10px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.br-path { font-family: var(--mono); font-size: 10px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; margin-left: 6px; }
.br-row.folder .br-ico { color: var(--folder); }
.br-row.folder .br-ico svg { fill: var(--folder-bg); }
.br-row.folder .br-name { color: var(--folder); font-weight: 500; }
.br-row.folder.device .br-name { color: var(--text); }
.br-row.folder .br-meta { color: var(--faint); font-size: 10px; }
.br-mark { background: color-mix(in srgb, var(--text) 18%, transparent); color: var(--text); border-radius: 2px; padding: 0 1px; }
.br-row.playing .br-ico { color: var(--accent); }
.br-preview { grid-column: 2; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px 10px 10px; border-top: 1px solid var(--line-soft); }
.br-preview[hidden] { display: none; }
.brp-bar { display: flex; align-items: center; gap: 8px; min-width: 0; height: 22px; }
.brp-phones { flex: none; width: 24px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--faint); }
.brp-phones svg { stroke: currentColor; fill: none; stroke-width: 1.3; stroke-linejoin: round; }
.brp-phones:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.brp-phones.on { color: var(--accent); }
.brp-seg { display: flex; flex: none; border: 1px solid var(--line-soft); border-radius: 4px; overflow: hidden; }
.brp-mode { height: 20px; padding: 0 8px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 11px; }
.brp-mode + .brp-mode { border-left: 1px solid var(--line-soft); }
.brp-mode:hover:not(:disabled) { color: var(--text); }
.brp-mode.on { color: var(--text); background: color-mix(in srgb, var(--text) 13%, transparent); }
.brp-mode:disabled { opacity: 0.4; cursor: default; }
.brp-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11.5px; margin-left: auto; }
.brp-wave { display: block; width: 100%; height: 38px; border-radius: 4px; cursor: pointer; }
.br-preview.off .brp-wave { opacity: 0.5; }
.br-resize { position: absolute; top: 0; right: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 5; background: transparent; }
.br-resize:hover, .br-resize.on { background: color-mix(in srgb, var(--text) 18%, transparent); }
.br-row[draggable='true'] { cursor: grab; }
.br-row.hit .br-name { flex-shrink: 0; max-width: 65%; } /* search results: the path gives way first */
.br-row.status { color: var(--muted); padding-left: 10px; }
.br-cat svg { flex: none; stroke: currentColor; fill: none; }
.br-cat.fold svg { color: var(--folder); fill: var(--folder-bg); }
.br-main [hidden] { display: none; }
/* The selected patch (Browser › Patches, mockup 3A detail). */
.br-patch { flex: none; display: flex; flex-direction: column; gap: 5px; padding: 10px; border-top: 1px solid var(--line-soft); background: var(--panel-2); font-size: 12px; }
.br-patch-name { font-weight: 600; color: var(--text); }
.br-patch-sub, .br-patch-chain { color: var(--muted-2); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-patch-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.br-patch-tags .pt-chip { margin: 0; }
.br-patch-map { height: 64px; border: 1px solid var(--line-soft); border-radius: 4px; background: var(--grid-bg); }
.br-patch-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
/* Sample folders (data: ui/samples.js): a folder that lost read access after a
   reload shows one Reconnect row; a folder dragged in from Finder outlines the pane. */
.br-row.reconnect { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; color: var(--warn); cursor: pointer; }
.br-row.reconnect:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.br-main.br-drop, .br-side.br-drop { outline: 1px dashed var(--text); outline-offset: -2px; border-radius: 4px; }
@media (max-width: 760px) { .browser { display: none; } } /* after the grid rule above, so it still wins */
/* The Info box (ui/tooltip.js) sits under both columns. */
.browser > .info-view { grid-column: 1 / -1; position: static; margin: 0; }


/* ---------- piano roll: track picker, instrument button, multi-track chips ---------- */
.roll-track { max-width: 10rem; font-weight: 700; }
.roll-multi { display: inline-flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.roll-multi[hidden] { display: none; }
.roll-multi .chip { cursor: pointer; opacity: 0.7; }
.roll-multi .chip.current { opacity: 1; border-color: var(--c); background: var(--panel); font-weight: 700; }

/* ---------- live cursors (ui/presence.js): other people's pointers over the Channel Rack ---------- */
#rack { position: relative; }
.peer-layer { position: absolute; top: 0; left: 0; width: 0; height: 0; z-index: 5; pointer-events: none; }
.peer-cursor { position: absolute; top: 0; left: 0; transition: transform 60ms linear, opacity 0.4s; will-change: transform; }
.peer-cursor svg { display: block; overflow: visible; }
.peer-cursor path { fill: var(--c); stroke: var(--on-color); stroke-width: 1.5; stroke-linejoin: round; }
.peer-tag {
  position: absolute;
  left: 10px;
  top: 15px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--c);
  color: var(--on-color);
  font: 600 10px var(--sans);
  white-space: nowrap;
}
/* `ui` cursors (ui/presence.js): anywhere on the page, above panels and menus,
   under modal backdrops and the tour. .fell = drawn at a coarser anchor
   because the exact spot isn't on this screen: a faded arrow, the tag (still
   readable) says where. .up = tag above the arrow at the window's bottom edge. */
.peer-layer-ui { position: fixed; z-index: 860; }
.peer-cursor.fell svg { opacity: 0.4; }
.peer-cursor.fell .peer-tag { opacity: 0.85; font-weight: 500; }
.peer-cursor.up .peer-tag { top: -17px; }
@media (prefers-reduced-motion: reduce) { .peer-cursor { transition: none; } }

/* ---------- export dialog (ui/exportdialog.js; reuses .settings-card) ---------- */
.export-dialog { background: var(--scrim); }
.export-dialog .set-radios { flex-direction: column; gap: 0.35rem; }
.export-dialog .ex-off { color: var(--muted); cursor: default; }
.export-dialog .ex-grid { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 0.8rem 0 0.6rem; }
.export-dialog .ex-grid label { display: grid; gap: 0.25rem; font-size: 0.76rem; color: var(--muted); }
.export-dialog .ex-grid input { width: 5rem; }
.export-dialog .set-check { margin-top: 0.35rem; }
.export-dialog .ex-warn { margin: 0.6rem 0 0; }
.export-dialog .ex-progress { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; }
.export-dialog .ex-progress[hidden] { display: none; }
.export-dialog progress { flex: 1; accent-color: var(--accent); }
.export-dialog .ex-plugins { margin-top: 0.6rem; }
.export-dialog .ex-plugins > p { margin: 0; }
.export-dialog .ex-plugins .ex-warn { margin: 0.15rem 0 0 1.6rem; }
.export-dialog .ex-cancel[hidden] { display: none; }
/* recording latency dialog (ui/latencydialog.js) */
.latency-dialog .lat-rows { display: grid; gap: 0.3rem; margin-top: 0.6rem; }
.latency-dialog .lat-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.86rem; }
.latency-dialog .lat-row b { font-family: var(--mono); font-weight: 500; }
.latency-dialog .lat-msg:empty { display: none; }
/* Monitoring (ui/recsettings.js showMonitor; ADR 2026-11-18_monitor-latency) */
.latency-dialog .mon-big { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.latency-dialog .mon-big b { font-family: var(--mono); font-weight: 500; font-size: 28px; letter-spacing: -0.02em; }
.latency-dialog .mon-big small { color: var(--muted-2); font-size: 11px; }
.latency-dialog .mon-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 0.6rem 0 0.25rem; background: var(--panel-3); }
.latency-dialog .mon-bar i { display: block; height: 100%; }
.latency-dialog .mon-in { background: var(--muted-2); }
.latency-dialog .mon-buf { background: var(--muted); }
.latency-dialog .mon-fxd { background: repeating-linear-gradient(45deg, var(--muted) 0 3px, transparent 3px 6px); }
.latency-dialog .mon-out { background: var(--text); }
.latency-dialog .mon-legend { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.latency-dialog .mon-ok { color: var(--tune-ok); }
.latency-dialog .mon-bad { color: var(--warn); }
.latency-dialog .mon-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.latency-dialog .mon-seg button { background: none; border: 0; color: var(--muted-2); padding: 0.25rem 0.7rem; font: inherit; font-size: 11px; cursor: pointer; }
.latency-dialog .mon-seg button.on { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--muted); }
.latency-dialog .mon-tip { border-left: 2px solid var(--warn); padding: 0.2rem 0.6rem; margin-top: 0.5rem; }
.latency-dialog .mon-tip:empty { display: none; }
.latency-dialog .ov-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 0.4rem 0.6rem; align-items: center; margin-top: 0.6rem; }
.latency-dialog .ov-col { font-size: 0.8rem; font-weight: 600; }
.latency-dialog .ov-label { font-size: 0.82rem; color: var(--muted); text-align: right; }
.latency-dialog .ov-sel { width: 100%; min-width: 0; }

/* ---------- hover tips (ui/tooltip.js) ---------- */
.tip {
  position: fixed;
  z-index: 200;
  max-width: 280px;
  padding: 7px 9px;
  border-radius: 6px;
  background: var(--tip-bg);
  color: var(--on-chrome);
  border: 1px solid var(--tip-line);
  box-shadow: var(--pop-shadow);
  font: 12px/1.35 var(--sans);
  pointer-events: none;
}
.tip[hidden], .tip [hidden] { display: none; }
.tip-head { display: flex; align-items: baseline; gap: 8px; }
.tip-name { font-weight: 600; }
.tip-key {
  font: 10px var(--mono);
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--tip-line);
  color: var(--tip-muted);
}
.tip-value { margin-left: auto; padding-left: 10px; font: 11px var(--mono); color: var(--on-chrome); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tip-desc { margin-top: 3px; color: var(--on-chrome); opacity: 0.86; }
.tip-head[hidden] + .tip-desc { margin-top: 0; }
.tip-reset { margin-top: 4px; font: 10px var(--mono); letter-spacing: 0.04em; color: var(--tip-muted); }
/* The Info box (pref tipPlace 'box'): docked at the bottom of the left
   panel like Ableton's Info View. Same rows as .tip, panel colours. */
.info-view {
  position: sticky;
  bottom: -10px;
  margin: auto -8px -10px;
  padding: 8px 26px 10px 10px;
  min-height: 92px;
  flex: none;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
  color: var(--text);
  font: 12px/1.35 var(--sans);
}
.info-view[hidden], .info-view [hidden] { display: none; }
.info-view .tip-key { border-color: var(--line); color: var(--muted); }
.info-view .tip-value, .info-view .tip-desc { color: var(--text); }
.info-view .tip-reset { color: var(--muted); }
.info-idle { color: var(--muted); }
.info-close { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; padding: 0; line-height: 1; background: none; border: 0; color: var(--muted); cursor: pointer; }
.info-close:hover { color: var(--text); }

/* ---------- room chat (ui/chat.js): a third workspace column ---------- */
.workspace.chat-open { grid-template-columns: var(--browser-w, 460px) minmax(0, 1fr) 280px; }
.chat-btn { position: relative; flex: none; display: inline-flex; align-items: center; gap: 5px; }
.chat-ico { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.chat-btn .badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--warn);
  color: var(--warn-ink);
  font: 600 10px/16px var(--sans);
  text-align: center;
  box-shadow: 0 0 0 2px var(--chrome);
}
.chat-btn .badge[hidden] { display: none; }
.chat {
  display: grid;
  grid-template-rows: 32px minmax(0, 1fr) auto;
  min-height: 0;
  min-width: 0;
  background: var(--panel);
  border-left: 1px solid var(--line);
}
.chat[hidden] { display: none; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line-soft); background: var(--panel-2); }
.chat-title { font: 10px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-2); }
.chat-x { border: 0; padding: 0 6px; font-size: 16px; line-height: 1; color: var(--muted-2); }
.chat-list { list-style: none; margin: 0; padding: 8px 12px; overflow-y: auto; overscroll-behavior: contain; }
.chat-msg { margin-top: 10px; }
.chat-msg.cont { margin-top: 3px; }
.chat-msg:first-child { margin-top: 0; }
.chat-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; min-width: 0; }
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--user); flex: none; }
.chat-name { font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-time { margin-left: auto; font: 10px var(--mono); color: var(--muted); flex: none; }
.chat-text { padding-left: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.chat-empty { color: var(--muted); font-size: 12px; line-height: 1.45; padding-top: 4px; }
.chat-form { position: relative; display: flex; align-items: flex-end; gap: 6px; padding: 8px; border-top: 1px solid var(--line-soft); }
#chat-input, .dm-input {
  flex: 1;
  min-width: 0;
  resize: none;
  font: inherit;
  line-height: 1.35;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  max-height: 120px;
}
#chat-input:focus-visible, .dm-input:focus-visible { outline: 2px solid var(--select); outline-offset: 0; }
#chat-input.bad, .dm-input.bad { border-color: var(--warn); }
.chat-count { position: absolute; right: 70px; top: -14px; font: 10px var(--mono); color: var(--muted); }
.chat-count[hidden] { display: none; }
.chat-send { flex: none; }

/* ---------- timeline comments (ui/comments.js): flags in the ruler + popover ---------- */
.cm-pop {
  position: fixed;
  z-index: 160;
  width: 340px;
  max-width: calc(100vw - 16px);
  max-height: min(460px, calc(100vh - 80px));
  overflow-y: auto;
  padding: 10px 12px 12px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--pop-shadow);
  font-size: 12.5px;
}
.cm-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; min-width: 0; }
.cm-bar .spacer { flex: 1; }
.cm-nav { display: flex; align-items: center; gap: 2px; margin: -4px 0 6px; }
.cm-nav .spacer { flex: 1; }
.cm-count { font: 10px var(--mono); color: var(--muted); padding: 0 4px; }
.cm-pos { font: 10px var(--mono); letter-spacing: 0.06em; color: var(--muted-2); white-space: nowrap; }
.cm-track { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--c); color: var(--on-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 120px; flex: 0 1 auto; }
.cm-bar .cm-btn, .cm-pos { flex: none; }
.cm-track.all { background: var(--panel-3); color: var(--muted-2); }
.cm-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cm-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cm-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-time { margin-left: auto; font: 10px var(--mono); color: var(--muted); flex: none; }
.cm-text { margin: 3px 0 0 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.cm-pop.resolved > .cm-text { color: var(--muted-2); }
.cm-own { margin: 2px 0 0 14px; }
.cm-replies { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line-soft); display: grid; gap: 8px; }
.cm-reply { margin-top: 10px; }
.cm-input {
  display: block;
  width: 100%;
  margin-top: 8px;
  resize: vertical;
  min-height: 2.6em;
  max-height: 160px;
  font: inherit;
  line-height: 1.35;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
}
.cm-reply .cm-input { margin-top: 0; }
.cm-input:focus-visible { outline: 2px solid var(--select); outline-offset: 0; }
.cm-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.cm-btn { font-size: 11px; padding: 2px 8px; border-radius: var(--radius-sm); white-space: nowrap; }
.cm-btn.primary { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.cm-btn.primary:hover:not(:disabled) { background: var(--fill); border-color: var(--fill); opacity: 0.9; }
.cm-btn.danger:hover:not(:disabled) { border-color: var(--warn); color: var(--warn); background: transparent; }
.cm-btn.ghost { border-color: transparent; }
.cm-btn.x { padding: 0 5px; font-size: 14px; line-height: 1; color: var(--muted-2); }
.cm-head .cm-btn.x { margin-left: 2px; }
.cm-btn.link { border: 0; padding: 0; color: var(--muted-2); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Studio Dark polish (2026-11-08) ----------
   Amber means sound only: under Studio and the sky themes (every theme
   but Warm Dark, which keeps its amber controls), focus rings use the cool --select
   and controls without a track colour fill in neutral grey, so the playhead,
   loop and meters are the only amber on screen. */
:root:not([data-theme='dark']) :is(button, input, select, canvas):focus-visible,
:root:not([data-theme='dark']) .knob-dial:has(input:focus-visible) { outline-color: var(--select); }
:root:not([data-theme='dark']) input[type='range'] { --range-fill: var(--c, var(--muted-2)); }
:root:not([data-theme='dark']) .knob-val { stroke: var(--c, var(--muted-2)); }
/* controls that set --c to amber on purpose (FX rows, swing, rack volume) */
:root:not([data-theme='dark']) :is(.sc-row input[type='range'], .rk-swing, .knob:has(.rk-swing), .rk-ctl .knob:has(.vol)) { --c: var(--muted-2); }
:root:not([data-theme='dark']) #invite:hover:not(:disabled) { border-color: var(--select); }
:root:not([data-theme='dark']) :is(.setup-card, .set-radios, .set-check) input { accent-color: var(--select); }

/* Press feedback (all themes): mouse presses only, since keyboard actions
   never animate (:active also fires on Space/Enter for a focused button, so
   :not(:focus-visible) leaves those out). Transform only, so no layout or
   paint work. Premium D: .96 over --t-press. */
button { transition: transform var(--t-press) var(--ease-out); }
button:not(:disabled):active:not(:focus-visible) { transform: scale(0.96); }

/* Dialog entrance (all themes): settings, plugin picker, export. A short
   fade with a small scale from the centre; closing stays instant ([hidden]
   is display:none), so exit is faster than entry. */
:is(#settings, .plugin-picker, .export-dialog) {
  transition: opacity 180ms cubic-bezier(0.23, 1, 0.32, 1), display 180ms allow-discrete;
  @starting-style { opacity: 0; }
}
:is(#settings, .plugin-picker, .export-dialog) > .settings-card {
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
  @starting-style { transform: scale(0.97); }
}

@media (prefers-reduced-motion: reduce) {
  button, button:not(:disabled):active:not(:focus-visible) { transition: none; transform: none; }
  :is(#settings, .plugin-picker, .export-dialog) > .settings-card { transition: none; }
}

/* "All devices off" tag under a strip's slots (devices bypassed with the Devices-panel square). */
.strip .fx-off {
  width: 100%;
  padding: 0.05rem 0.3rem;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  background: var(--warn);
  color: var(--warn-ink);
  border: 1px solid var(--warn);
}
.strip .fx-off[hidden] { display: none; }

/* Drafts: notice pill (ui/util.js notice), e.g. "That's Ben's draft…". */
.notice {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60;
  max-width: min(560px, calc(100vw - 32px)); padding: 8px 14px; border-radius: 999px;
  background: var(--tip-bg); color: var(--on-chrome); border: 1px solid var(--tip-line);
  font-size: 12px; box-shadow: var(--shadow); pointer-events: none;
}
.notice[hidden] { display: none; }
/* Connection pill (ui/netstatus.js; UI vision mockup step 4, audit 58): beside the avatars, in words.
   Online: quiet, a green dot. Offline: hatched, a hollow dot, the edits waiting; a click retries. Tokens only. */
header.transport > #t-net { order: 20; } /* with the people, Chat and Share (DOM order puts it first) */
/* :not() list: same weight as the top bar's flat-button rule (.transport button:not(.on)…), plus the id, so the pill keeps its border and hatch. */
header.transport button#t-net.net-pill:not(.on):not(.active):not(#invite):not(.avatar) { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 9px; flex: none;
  border: 1px solid var(--line-soft); border-radius: 999px; background: transparent; color: var(--muted-2);
  font: inherit; font-size: 12px; font-weight: 500; white-space: nowrap; cursor: default; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.net-pill .net-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--tune-ok); }
header.transport button#t-net.net-pill[data-state="off"]:not(.on):not(.active):not(#invite):not(.avatar) { cursor: pointer; color: var(--text); border-color: var(--line);
  background: repeating-linear-gradient(135deg, var(--chrome) 0 6px, var(--chrome-2) 6px 12px); }
header.transport button#t-net.net-pill[data-state="off"]:not(.on):not(.active):not(#invite):not(.avatar):hover { border-color: var(--muted); }
.net-pill[data-state="off"] .net-dot { background: transparent; border: 1.5px solid var(--muted-2); }
header.transport button#t-net.net-pill[data-state="back"]:not(.on):not(.active):not(#invite):not(.avatar) { color: var(--text); }
header.transport button#t-net.net-pill:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
/* Narrow bar (ui/topbarfit.js): first (.tb-short, then .tb-icons) Online is just the dot, Offline says "Offline · 2";
   a bar that still overflows (.tb-tight) keeps the hatched pill, the hollow dot and the count (Online goes). The words stay in the tip. */
.net-pill :is(.net-short, .net-tiny) { display: none; }
header.transport:is(.tb-icons, .tb-short) .net-pill .net-label { display: none; }
header.transport:is(.tb-icons, .tb-short) .net-pill:not([data-state="on"]) .net-short { display: inline; }
header.transport.tb-tight .net-pill[data-state] .net-short { display: none; }
header.transport.tb-tight .net-pill .net-tiny:not(:empty) { display: inline; }
header.transport.tb-tight button#t-net.net-pill[data-state="on"]:not(.on):not(.active):not(#invite):not(.avatar) { display: none; } /* all is well: the status dot says so */
header.transport:is(.tb-icons, .tb-short) button#t-net.net-pill[data-state="on"]:not(.on):not(.active):not(#invite):not(.avatar),
header.transport.tb-tight button#t-net.net-pill:not(.on):not(.active):not(#invite):not(.avatar) { padding: 0 9px; }
@media (prefers-reduced-motion: reduce) { header.transport button#t-net.net-pill:not(.on):not(.active):not(#invite):not(.avatar) { transition: none; } }
/* While cut off, everyone else's presence is stale: dim their avatars (mockup .av.away); yours stays. */
body.net-off #users :is(.avatar:not(.me), .follow-host) { filter: grayscale(1) brightness(0.6); transition: filter 0.2s; }
/* Peer cursors drawn as DOM (over panels and other UI) are stale too while cut off, and never sit over the join card. */
body.net-off .peer-layer, body:has(> #join:not([hidden])) .peer-layer { display: none; }
/* The pill says it: the status dot doesn't repeat it (and gives the pill its room). */
body.net-off header.transport > #status:not([data-ok]) { display: none; }
/* Connected: the pill says Online, so the green status dot keeps its slot (the bar holds still) but not its ink,
   except when the bar is so tight that Online goes (.tb-tight): then the dot says it. */
header.transport:not(.tb-tight) > #status[data-ok] { visibility: hidden; }
/* notice(text, ms, action): one button in the pill ("Bass deleted · Restore"). */
.notice-btn { pointer-events: auto; margin-left: 10px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--tip-line); background: transparent; color: var(--on-chrome); font: inherit; font-weight: 600; cursor: pointer; }
.notice-btn:hover { background: var(--panel-3); color: var(--text); }

/* Delete warning (ui/deletetrack.js; reuses .settings-card). */
.del-dialog { background: var(--scrim); }
.del-dialog .settings-card { width: min(440px, calc(100vw - 32px)); }
.del-body p { margin: 0.6rem 0 0; line-height: 1.4; }
.del-foot { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.del-foot button { padding: 0.4rem 1rem; }
.del-foot .del-go { background: var(--warn); color: var(--warn-ink); border-color: var(--warn); }
/* Ask to delete: the mark on an asked track's header (ui/playlist.js). */
.ph-ask { flex: none; font-size: 10px; line-height: 14px; padding: 0 3px; border-radius: 3px; color: var(--warn); border: 1px solid var(--warn); cursor: default; }
.ph-ask[hidden] { display: none; }
/* Recently deleted (ui/trash.js): a popover like Command search. */
.ctx-menu.pop.trash-pop { width: min(380px, calc(100vw - 32px)); max-height: min(480px, calc(100vh - 80px)); overflow-y: auto; padding: 4px 12px 12px; font-size: 12.5px; }
.trash-panel h3 { font: 10px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-2); margin: 10px 0 6px; }
.trash-list { gap: 2px; }
.trash-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 4px 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.trash-row:first-child { border-top: 0; }
.trash-swatch { width: 10px; height: 10px; margin-top: 3px; border-radius: 2px; background: var(--c, var(--muted)); }
.trash-info { display: grid; min-width: 0; }
.trash-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-meta { color: var(--muted-2); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-acts { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.trash-confirm { grid-column: 2; }
.trash-confirm p { margin: 2px 0 6px; line-height: 1.4; }
.trash-acts .trash-forever { background: var(--warn); color: var(--warn-ink); border-color: var(--warn); }
.trash-empty { color: var(--muted-2); padding: 6px 0; }

/* Drafts: "Hear their draft" toggle in the follow pill (ui/presence.js). */
.follow-hear { padding: 1px 8px; font-size: 10px; border-radius: 4px; border: 1px solid var(--on-color); background: transparent; color: var(--on-color); opacity: 0.7; }
.follow-hear[aria-pressed='true'] { background: var(--on-color); color: var(--user); opacity: 1; }
.follow-hear:hover:not(:disabled) { opacity: 1; }

/* Drafts: version selector popover (ui/versions.js). */
.ver-pop { min-width: 250px; gap: 1px; }
.ver-head { padding: 0.3rem 0.6rem 0.2rem; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.ver-item { display: flex; align-items: center; gap: 2px; }
.ver-item .ver-row { flex: 1; min-width: 0; }
.ver-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ver-dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--muted); flex: none; }
.ver-row[aria-pressed='true'] { background: var(--panel-3); }
.ver-row[aria-pressed='true'] .ver-dot { background: var(--text); border-color: var(--text); }
.ver-btn { flex: none; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 11px; }
.ver-btn:hover:not(:disabled) { background: var(--panel-3); color: var(--text); }

/* Drafts: push panel (ui/push.js; reuses .settings-card). */
.push-dialog { background: var(--scrim); }
.push-list { display: grid; gap: 0.3rem; margin: 0.6rem 0; }
.push-chip { width: 10px; height: 10px; border-radius: 3px; flex: none; border: 1px solid var(--line-soft); }
.push-track { font-weight: 600; }
.push-tag { margin-left: 0.4rem; padding: 0 0.35rem; border-radius: 4px; background: var(--panel-3); color: var(--muted-2); font-size: 10px; }
.push-clashes { border-top: 1px solid var(--line); margin-top: 0.4rem; }
.push-clash { display: grid; gap: 0.35rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line-soft); }
.push-clash-head { display: flex; align-items: center; gap: 0.4rem; }
.push-clash-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.push-foot { display: flex; justify-content: flex-end; align-items: center; gap: 0.8rem; margin-top: 0.8rem; }
.push-go { padding: 0.4rem 1rem; }
.push-btn { white-space: nowrap; }

/* Push nudge (04-plans/2026-11-12_push-nudge-plan.md): one pulse when you
   leave a plugin-track clip with unpushed edits, so you find Push at the
   moment it matters. ui/push.js adds .nudge and drops it on animationend.
   Not amber: amber means sound. Reduced motion gets the ring without the
   movement, held until the tip is restored. */
/* Premium D: the pulse itself is the ::after ring in the premium motion block. */
@media (prefers-reduced-motion: reduce) {
  #t-push.nudge { animation: none; border-color: var(--select); box-shadow: 0 0 0 2px var(--select); }
}

/* Obvious Push (ADR 2026-11-14_obvious-push): while you have something to
   push (or asks to accept) the button is a filled --push pill with an up
   arrow, the loudest thing on the bar; at 0 it is hidden, so the bar stays
   quiet. .arrive is one ring pulse when the count leaves 0 (ui/push.js
   arrive()). The :not()s match the calm pass's selector, which has an id in
   it, so this wins. */
.transport :is(#t-push, #t-asks).ready:not(.on):not(.active):not(.avatar) {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--push); color: var(--push-ink); border-color: var(--push); font-weight: 600;
}
.transport :is(#t-push, #t-asks).ready:not(.on):not(.active):not(.avatar):hover:not(:disabled) {
  background: color-mix(in srgb, var(--push) 85%, var(--on-chrome)); border-color: var(--on-chrome);
}
:is(#t-push, #t-asks).ready::before {
  content: ''; width: 9px; height: 9px; flex: none; background: currentColor;
  clip-path: polygon(50% 0, 100% 55%, 68% 55%, 68% 100%, 32% 100%, 32% 55%, 0 55%);
}
@media (prefers-reduced-motion: reduce) {
  :is(#t-push, #t-asks).arrive { animation: none; }
}

/* Drafts: the Live switch (ui/transport.js), always there for owners and
   editors, Off / On. Not amber: amber means sound. */
/* Now a badge in words by the room name (UI vision mockup step 2): Live = green
   (--tune-ok, as the Go live chip), Draft = Push blue with a dashed dot. */
.live-sw { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 9px; border: 0; border-radius: 999px; font: inherit; font-size: 12px; font-weight: 500; white-space: nowrap; cursor: pointer; flex: none;
  background: color-mix(in srgb, var(--push) 14%, transparent); color: var(--push); transition: background-color 0.2s, color 0.2s; }
.live-sw[hidden] { display: none; }
.live-sw .live-sub { color: var(--muted); font-weight: 400; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px dashed var(--push); flex: none; }
.live-sw.on { background: color-mix(in srgb, var(--tune-ok) 13%, transparent); color: var(--tune-ok); }
.live-sw.on .live-dot { border: 0; width: 8px; height: 8px; background: var(--tune-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tune-ok) 18%, transparent); }
.live-sw:hover { background: color-mix(in srgb, var(--push) 22%, transparent); }
.live-sw.on:hover { background: color-mix(in srgb, var(--tune-ok) 20%, transparent); }
.live-sw:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .live-sw { transition: none; } }
/* Draft strip (ui/draftstrip.js): full width at the top of the playlist, solid (not glass). */
.draft-strip { display: flex; align-items: center; gap: 12px; min-height: 36px; padding: 0 8px 0 14px; font-size: 12px; white-space: nowrap; overflow: hidden;
  background: color-mix(in srgb, var(--push) 16%, var(--panel)); border-bottom: 1px solid var(--line); }
.draft-strip[hidden] { display: none; }
.draft-strip .ds-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px dashed var(--push); flex: none; }
.draft-strip .ds-text { margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.draft-strip .ds-sub { color: var(--muted-2); }
.draft-strip .ds-btn { height: 26px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--chrome); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; flex: none; }
.draft-strip .ds-btn:hover { background: var(--chrome-2); }
.draft-strip .ds-btn[hidden] { display: none; }
/* The playlist grid: the strip takes the top row at its own height, the timeline the rest. */
.playlist:has(> .draft-strip:not([hidden])) { grid-template-rows: auto minmax(0, 1fr); }
.playlist > .draft-strip { grid-row: 1; }
.playlist > .draft-strip:not([hidden]) ~ .pl-body { grid-row: 2; }
/* The top bar's flat-button rule (.transport button:not(.on):not(.active):not(#invite)…)
   blanks button backgrounds; same weight plus the id, so the Draft badge keeps its tint. */
.transport button#t-live.live-sw:not(.on):not(.active):not(#invite) { background: color-mix(in srgb, var(--push) 14%, transparent); color: var(--push); border: 0; }
.transport button#t-live.live-sw:not(.on):not(.active):not(#invite):hover { background: color-mix(in srgb, var(--push) 22%, transparent); }
header.transport button#t-live.live-sw.on { background: color-mix(in srgb, var(--tune-ok) 13%, transparent); color: var(--tune-ok); }
header.transport button#t-live.live-sw.on:hover { background: color-mix(in srgb, var(--tune-ok) 20%, transparent); }
.live-skip { margin-top: 0.6rem; }

/* Version history (ui/history.js): Chat | History tabs in the side panel,
   the preview bar + recovered banner over the playlist, the broken-room
   screen. Neutral tokens: amber means sound only. */
.side-tabs { display: flex; gap: 2px; align-self: stretch; }
.side-tab {
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 0 8px;
  font: 10px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-2);
}
.side-tab.on { color: var(--text); border-bottom-color: var(--select); }
.chat.hist-on .chat-list, .chat.hist-on .chat-form { display: none; }
.hist { grid-row: 2 / 4; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; }
.hist[hidden] { display: none; }
.hist-top { padding: 8px; border-bottom: 1px solid var(--line-soft); display: grid; gap: 6px; }
.hist-top button { width: 100%; }
.hist-list { list-style: none; margin: 0; padding: 4px 0 8px; overflow-y: auto; overscroll-behavior: contain; }
.hist-day { padding: 10px 12px 4px; font: 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hist-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; align-items: center; gap: 6px; padding: 4px 12px; cursor: pointer; font-size: 12px; }
.hist-row:hover, .hist-row:focus-visible { background: var(--row-sel); outline: none; }
.hist-row.on { box-shadow: inset 2px 0 0 var(--select); background: var(--row-alt); }
.hist-row.named .hist-title { font-weight: 600; }
.hist-star { color: var(--text); font-size: 11px; }
.hist-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-who { display: inline-flex; gap: 3px; align-items: center; min-width: 0; }
.hist-by { color: var(--muted-2); max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--user, var(--muted)); }
.hist-time { font: 10px var(--mono); color: var(--muted); }
.hist-empty { padding: 8px 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.hist-foot { padding: 6px 12px; border-top: 1px solid var(--line-soft); font: 10px var(--mono); color: var(--muted); min-height: 14px; }
.hist-confirm { max-width: 300px; }
.hist-confirm p { margin: 0 0 6px; line-height: 1.4; }
.hist-confirm-btns { display: flex; justify-content: flex-end; gap: 6px; }

.playlist { position: relative; }
.playlist.has-bar { grid-template-rows: auto 32px 1fr; }
.playlist:not(.has-bar) .pv-wrap { display: none; }
.pv-bar {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 12px;
  background: var(--tip-bg); color: var(--on-chrome); border-bottom: 1px solid var(--tip-line);
  box-shadow: inset 3px 0 0 var(--select); font-size: 12px;
}
.pv-bar[hidden] { display: none; }
.pv-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-bar button { flex: none; }
.pv-x { border: 0; background: none; color: inherit; font-size: 16px; line-height: 1; padding: 0 4px; }

.broken {
  position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; gap: 12px; padding: 24px;
  background: var(--panel); text-align: center;
}
.broken[hidden] { display: none; }
.broken-text { max-width: 440px; margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.broken-btns { display: flex; gap: 8px; justify-content: center; }

/* ---------- track inspector (ui/inspector.js) ---------- */
/* A full-height column at the far left: under the top bar, beside the
   workspace, splitter, dock and Devices panel. Every in-flow body child is
   placed explicitly so the second column doesn't reshuffle them. */
header.transport { grid-column: 1 / -1; grid-row: 1; }
body > .workspace { grid-column: 3; grid-row: 2; }
body > #splitter { grid-column: 3; grid-row: 3; }
body > #dock { grid-column: 3; grid-row: 4; }
.inspector {
  grid-column: 1;
  grid-row: 2 / -1;
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel-2);
  border-right: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  overflow: hidden;
}
.inspector[hidden] { display: none; }
.insp-resize { position: absolute; top: 0; right: 0; width: 5px; height: 100%; cursor: col-resize; z-index: 2; }
.insp-resize:hover, .insp-resize.on { background: var(--line); }
.pl-insp { display: inline-grid; place-items: center; padding: 0.3rem 0.4rem; line-height: 0; }
.pl-insp .ic { width: 14px; height: 14px; }
.pl-insp[aria-pressed="true"] { border-color: var(--muted); background: var(--panel-2); }
.insp-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.insp-head { flex: none; }
.insp-head { padding: 8px 10px 8px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.insp-head-top, .insp-head-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.insp-head [hidden] { display: none; }
.insp-head .sp { flex: 1; }
.insp-label { color: var(--faint); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.insp-name { font-weight: 600; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; border-radius: 3px; }
.insp-name[contenteditable="true"], .insp-name[contenteditable="plaintext-only"] { outline: 1px solid var(--muted); background: var(--bg); text-overflow: clip; padding: 0 3px; }
/* A narrow column with "+N selected" and "▸ Track" showing: the label gives
   way first, then the count; the toggle never shrinks. */
.insp-head-top .insp-label, .insp-head-top .dev-more { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insp-head-top .insp-label { flex-shrink: 4; }
/* "▸ Track" in the header: shows / hides the Track rows above the strips. */
.insp-track-toggle { flex: none; padding: 1px 6px; border-color: transparent; background: transparent; color: var(--muted); font-size: 11px; white-space: nowrap; }
.insp-track-toggle:hover:not(:disabled) { color: var(--text); border-color: var(--line); background: transparent; }
.insp-track-toggle[aria-expanded="true"] { color: var(--text); }
/* Inspector sections (roadmap §16): Track, Clip, Mixer, each folded per user. */
.insp-sec { flex: none; display: flex; flex-direction: column; min-height: 0; border-bottom: 1px solid var(--line); }
.insp-sec-mixer:not(.folded) { flex: 1 1 auto; border-bottom: 0; }
.insp-sec-track:not(.folded) { max-height: 40%; }
.insp-sec > [hidden] { display: none; }
.insp-sec-head { flex: none; display: flex; align-items: center; gap: 4px; width: 100%; padding: 3px 10px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600; text-align: left; }
.insp-sec-head:hover:not(:disabled) { color: var(--text); background: transparent; border: 0; }
.insp-sec-head[aria-expanded="true"] { color: var(--text); }
.insp-sec-caret { width: 10px; color: var(--faint); }
.insp-clip { flex: none; padding: 2px 10px 8px; }
.insp-section-title { color: var(--muted); font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.insp-clip-empty { color: var(--faint); }
.insp-clip [hidden] { display: none; }
.insp-rows { display: grid; gap: 4px; }
.insp-rows + .insp-rows { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line-soft); }
.insp-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 6px; min-height: 24px; }
.insp-key { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insp-row > :last-child { justify-self: start; max-width: 100%; }
.insp-val { font-family: var(--mono); color: var(--muted-2); }
.insp-inst { display: flex; align-items: center; gap: 6px; padding: 2px 8px; max-width: 100%; min-width: 0; }
.insp-inst .swatch { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.insp-inst-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insp-toggle { padding: 1px 10px; font-size: 11px; color: var(--muted); }
.insp-toggle[aria-pressed="true"] { color: var(--text); border-color: var(--muted); background: var(--panel-3); }
.insp-select { max-width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 4px; }
/* Two channel strips side by side (this strip + Master), filling the column
   under the header. The fader, the dB numbers and the meter share one map
   (inspectorview.js dbToPos); the numbers and meter are inset by half the
   fader thumb (6px) so they line up with the cap's travel. */
.insp-rows-block { flex: 0 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 2px 10px 8px; }
.insp-rows-block[hidden] { display: none; }
/* The strips share their rows (subgrid), so slots, pan, level box, fader,
   M / S and name plate line up across both. The slots row grows to its
   content while the fader keeps 120px, then scrolls. */
.insp-strips {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, max-content) auto auto minmax(120px, 1fr) auto auto;
  row-gap: 5px;
  border-top: 1px solid var(--line);
}
.insp-strips.one { grid-template-columns: minmax(0, 1fr); }
.insp-strip { grid-row: 1 / -1; display: grid; grid-template-rows: subgrid; min-width: 0; min-height: 0; padding: 6px 5px 5px; border-right: 1px solid var(--line); }
.insp-strip:last-child { border-right: 0; }
.insp-strip.selected { background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--muted); }
.insp-strip-master { --c: var(--muted-2); }
.insp-slots { min-height: 0; overflow-y: auto; overflow-x: hidden; }
.insp-strip-pan { height: 30px; display: grid; place-items: center; }
.insp-level, .insp-level-edit { justify-self: center; box-sizing: border-box; width: 100%; max-width: 76px; height: 20px; padding: 0 4px; font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; text-align: center; color: var(--muted-2); border-radius: 3px; }
.insp-level { border: 1px solid var(--line); background: var(--bg); }
.insp-level:hover:not(:disabled) { color: var(--text); border-color: var(--muted); background: var(--bg); }
.insp-level-edit { border: 1px solid var(--muted); background: var(--bg); color: var(--text); outline: none; }
/* The fader's top is its real maximum (--fader-top, set from FADER_TOP in
   inspector.js), so its 12px thumb travels only that share of the scale. */
.insp-strip-zone { min-height: 120px; display: flex; justify-content: center; gap: 3px; }
.insp-fader-wrap { flex: none; width: 22px; display: flex; flex-direction: column; justify-content: flex-end; }
.inspector .insp-fader {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 22px;
  height: calc(var(--fader-top, 1) * (100% - 12px) + 12px);
  flex: none;
  --range-grad: linear-gradient(to top, var(--range-track) var(--lo, 0%), var(--range-fill) var(--lo, 0%), var(--range-fill) var(--hi, 50%), var(--range-track) var(--hi, 50%));
}
.inspector .insp-fader::-webkit-slider-runnable-track { width: 4px; height: 100%; }
.inspector .insp-fader::-moz-range-track { width: 4px; height: 100%; }
.inspector .insp-fader::-webkit-slider-thumb { margin-top: 0; margin-left: -4px; }
.insp-scale-wrap, .insp-meter-wrap { flex: none; display: flex; flex-direction: column; padding: 6px 0; }
.insp-scale-wrap { width: 18px; }
.insp-scale { position: relative; flex: 1; min-height: 0; user-select: none; }
.insp-scale span { position: absolute; right: 0; transform: translateY(-50%); font-family: var(--mono); font-size: 8.5px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.insp-meter-wrap { width: 8px; }
.insp-meter { display: block; flex: 1; min-height: 0; width: 8px; background: var(--meter-bg); border-radius: 2px; cursor: pointer; }
.insp-ms { height: 20px; display: flex; justify-content: center; gap: 3px; }
.insp-ms button { padding: 0.05rem 0.45rem; font-size: 0.72rem; }
.insp-ms .m.on { background: var(--warn); color: var(--warn-ink); border-color: var(--warn); }
.insp-ms .s.on { background: var(--solo); color: var(--solo-ink); border-color: var(--solo); }
.insp-strip.song-off .insp-strip-zone { background-image: repeating-linear-gradient(135deg, var(--faint) 0 1px, transparent 1px 7px); }
.insp-strip.song-off .insp-ms .m { opacity: 0.45; }
.insp-plate { min-height: 18px; padding: 2px 4px; border-radius: 3px; font-size: 11px; font-weight: 600; text-align: center; color: var(--ink-on-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insp-strip-master .insp-plate { background: var(--muted-2); color: var(--bg); }
/* Effect slots (Logic style 2): centred name, power button on the left edge
   shown on hover / focus / swipe. Off = pale. No --accent: that's sound. */
.insp-slot-list { display: grid; gap: 2px; }
.insp-slot { display: flex; align-items: stretch; height: 18px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.insp-slot.off { background: var(--panel-2); }
.insp-pow { flex: none; width: 12px; padding: 0; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; font-size: 9px; line-height: 1; color: var(--text); opacity: 0; touch-action: none; }
.insp-slot.off .insp-pow { color: var(--faint); }
.insp-slots:hover .insp-pow, .insp-slots:focus-within .insp-pow, .insp-slots.swiping .insp-pow { opacity: 1; }
.insp-pow:hover:not(:disabled) { background: var(--line-soft); color: var(--text); }
.insp-slot.off .insp-pow:hover:not(:disabled) { color: var(--faint); }
.insp-slot-name { flex: 1; min-width: 0; padding: 0 3px; border: 0; border-radius: 0; background: transparent; font-size: 11px; line-height: 18px; text-align: center; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insp-slot.off .insp-slot-name { color: var(--faint); }
.insp-slot-name:hover:not(:disabled) { background: var(--line-soft); }
.insp-slot.off .insp-slot-name:hover:not(:disabled) { color: var(--faint); }
/* .insp-slot clips overflow, so focus rings sit inside the button. */
.insp-pow:focus-visible, .insp-slot-name:focus-visible { outline: 2px solid var(--select); outline-offset: -2px; }
.insp-slot-add { display: block; box-sizing: border-box; width: 100%; height: 18px; margin-top: 2px; padding: 0; border: 1px dashed var(--line); border-radius: 3px; background: transparent; font-size: 12px; line-height: 1; color: var(--muted); }
.insp-slot-add:hover:not(:disabled) { color: var(--text); border-color: var(--muted); background: transparent; }
/* Playlist toolbar too narrow (e.g. inspector open): it scrolls sideways
   (ui/toolbarscroll.js turns the wheel sideways) and fades the edge that has
   more buttons behind it. The mask only uses alpha, never a colour. */
.pl-toolbar { scrollbar-width: none; }
.pl-toolbar::-webkit-scrollbar { display: none; }
.pl-toolbar.more-r { -webkit-mask-image: linear-gradient(to right, var(--text) calc(100% - 28px), transparent); mask-image: linear-gradient(to right, var(--text) calc(100% - 28px), transparent); }
.pl-toolbar.more-l { -webkit-mask-image: linear-gradient(to left, var(--text) calc(100% - 28px), transparent); mask-image: linear-gradient(to left, var(--text) calc(100% - 28px), transparent); }
.pl-toolbar.more-l.more-r { -webkit-mask-image: linear-gradient(to right, transparent, var(--text) 28px, var(--text) calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, var(--text) 28px, var(--text) calc(100% - 28px), transparent); }

/* ---- audio editor ---- */
/* ui/audioeditor.js: #pane-roll.audio-mode swaps the piano roll for
   #audio-editor (left clip panel + waveform stage). No accent here:
   amber means sound. */
#pane-roll.audio-mode { grid-template-rows: minmax(0, 1fr); }
#pane-roll.audio-mode > .roll-toolbar,
#pane-roll.audio-mode > .legendbar,
#pane-roll.audio-mode > .roll-stage,
#pane-roll.audio-mode > .lane-footer { display: none; }
#pane-roll.audio-mode > #audio-editor { display: grid; }
#pane-roll > #audio-editor[hidden] { display: none; }
#audio-editor { grid-template-columns: 170px minmax(0, 1fr); min-height: 0; outline: none; }
.ae-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  background: var(--panel-2);
  overflow-y: auto;
  min-height: 0;
}
.ae-head { min-width: 0; padding-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.ae-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-file { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ae-row[hidden] { display: none; }
.ae-row > .glabel { flex: 0 0 56px; letter-spacing: 0.06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-num {
  width: 52px;
  min-width: 0;
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.ae-num::-webkit-outer-spin-button, .ae-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ae-strength { width: 44px; }
.ae-gain { cursor: ns-resize; }
.ae-gain:focus { cursor: text; }
.ae-unit { color: var(--muted); font-size: 11px; }
.ae-warp { min-width: 44px; }
.ae-q { min-width: 26px; font-weight: 700; }
.ae-panel .rbtn:disabled, .ae-panel .rinput:disabled { opacity: 0.45; cursor: default; }
.ae-foot { margin-top: auto; padding-top: 6px; }
.ae-reset { width: 100%; }
.ae-stage {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: var(--grid-bg);
}
.ae-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.ae-bar > .glabel { letter-spacing: 0.06em; }
#audio-canvas { display: block; width: 100%; height: 100%; min-height: 0; outline: none; }

/* Mixer device drag insertion: overlays rows without shifting the gap. */
.strip .fx-slots { position: relative; }
.fx-ins { position: absolute; left: 0; right: 0; height: 2px; background: var(--text); pointer-events: none; z-index: 1; }
.strip { transition: box-shadow 0.15s cubic-bezier(0.23, 1, 0.32, 1); }
.strip.drop-ok { box-shadow: inset 0 0 0 1px var(--select), inset 0 0 0 999px color-mix(in srgb, var(--select) 8%, transparent); }
.fx-row { transition: opacity 0.15s cubic-bezier(0.23, 1, 0.32, 1); }
.fx-row.moving { opacity: 0.4; }
/* A device or instrument that just landed: one soft ring that fades out. */
.strip.drop-land, .ph.dev-land { animation: drop-land 0.5s cubic-bezier(0.23, 1, 0.32, 1); }
@keyframes drop-land {
  from { box-shadow: inset 0 0 0 2px var(--select), inset 0 0 0 999px color-mix(in srgb, var(--select) 16%, transparent); }
  to { box-shadow: inset 0 0 0 0 transparent, inset 0 0 0 999px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .strip.drop-land, .ph.dev-land { animation-duration: 0.2s; }
  .dev.moving { transform: none; }
}

/* ---------- panel visibility (main.js: prefs browserOpen / dockOpen) ---------- */
/* The Browser column hides; a closed dock keeps just its tab strip. */
.workspace.no-browser { grid-template-columns: minmax(0, 1fr); }
.workspace.no-browser.chat-open { grid-template-columns: minmax(0, 1fr) 280px; }
.workspace.no-browser > .browser { display: none; }
/* Pre-paint (uiscaleboot.js, perf audit 2026-11-19): a saved-open Browser stays open until main.js applyBrowser clears data-boot-browser. */
html[data-boot-browser] .workspace.no-browser { grid-template-columns: var(--browser-w, 460px) 1fr; }
html[data-boot-browser] .workspace.no-browser > .browser { display: block; }
body.dock-closed .dock > .tab-pane { display: none; }
body.dock-closed .dock-tabs button.active { color: var(--muted); border-bottom-color: transparent; }

/* ---------- calmer pass (2026-11-12, FL-feel step 2; ADR 2026-11-12_fl-feel-quieter) ----------
   Less ink at rest: toolbar buttons lose their idle outline (it comes back
   on hover, and "on" states keep their fill), so a toolbar stops reading as
   a grid of little boxes. Track-header M/S/arm, chips, slots and dialog
   buttons keep their outlines: there the box is the control. */
:is(.pl-toolbar, .tgroup, .seg, .lane-footer, .rack-toolbar, .ae-bar, .ae-row, .panel-head, .dhead) > button:not(.on):not(.active):not(.chip),
.transport button:not(.on):not(.active):not(#invite):not(.avatar) {
  border-color: transparent;
  background: transparent;
}
:is(.pl-toolbar, .tgroup, .seg, .lane-footer, .rack-toolbar, .ae-bar, .ae-row, .panel-head, .dhead) > button:not(.on):not(.active):not(.chip):hover:not(:disabled) {
  border-color: var(--line);
  background: var(--panel-2);
}
.transport button:not(.on):not(.active):not(#invite):not(.avatar):hover:not(:disabled) {
  border-color: var(--chrome-line);
  background: var(--chrome-2);
}

/* Amber means sound only: Loop "on" is lit white (like Follow), not amber.
   Play, metronome and count-in stay amber because they make sound. */
.transport :is(#t-loop, #t-follow).on { background: var(--chrome-on); color: var(--chrome-on-ink, var(--chrome)); border-color: var(--chrome-on); }

/* Fewer caps labels: drop the ones whose control already says what it is
   (tool icons, −/+ zoom, the legend chips, the playlist itself); the rest
   are sentence case, not spaced-out caps. */
.lbl-opt { display: none !important; }
:is(.glabel, .foot-label, .pl-corner, .insp-label, .dev-label) {
  text-transform: none;
  letter-spacing: 0.02em;
  font-family: var(--sans);
  font-size: 11px;
}

.input-chooser { display: flex; flex-direction: column; min-width: 0; width: 100%; gap: 2px; }
.input-chooser meter { width: 100%; height: 6px; }

/* Floating panes retain their own layout. */
.floating-panel .panel-float, .floating-panel .dhead [aria-label="Float Devices"] { display: none; }
.floating-panel .devices { height: 100%; }
#pane-mixer > .panel-float { position: sticky; left: 0; top: 0; z-index: 2; }

/* Compact Settings: keep the category navigation visible while content scrolls. */
#settings .settings-card { display: flex; flex-direction: column; width: min(680px, calc(100vw - 32px)); max-height: min(680px, calc(100vh - 48px)); overflow: hidden; padding: 16px 0 0; }
#settings .panel-head { padding: 0 18px 12px; }
#settings-body { display: flex; flex-direction: column; min-height: 0; }
.settings-tabs { display: flex; overflow-x: auto; flex: none; padding: 0 12px; border-bottom: 1px solid var(--line); gap: 2px; }
.settings-tabs button { white-space: nowrap; border: 0; border-radius: 0; border-bottom: 2px solid transparent; background: transparent; padding: 9px 10px; color: var(--muted); }
.settings-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.settings-content { overflow: auto; padding: 4px 18px 18px; }
.settings-content [hidden] { display: none; }
.settings-shortcuts { overflow-x: auto; margin-top: 10px; }
.settings-shortcuts .cheat-table:not(.show-all)[data-profile="jam"] :is(th, td):nth-child(n+3),
.settings-shortcuts .cheat-table:not(.show-all)[data-profile="ableton"] :is(th, td):is(:nth-child(2), :nth-child(n+4)),
.settings-shortcuts .cheat-table:not(.show-all)[data-profile="fl"] :is(th, td):is(:nth-child(2), :nth-child(3), :nth-child(n+5)),
.settings-shortcuts .cheat-table:not(.show-all)[data-profile="logic"] :is(th, td):is(:nth-child(2), :nth-child(3), :nth-child(4), :nth-child(n+6)),
.settings-shortcuts .cheat-table:not(.show-all)[data-profile="studiopro"] :is(th, td):is(:nth-child(n+2):nth-child(-n+5), :nth-child(7)),
.settings-shortcuts .cheat-table:not(.show-all)[data-profile="cubase"] :is(th, td):is(:nth-child(n+2):nth-child(-n+6)) { display: none; }

/* ---------- quieter main view, pass 3: top bar (ADR 2026-11-13_quieter-main-view) ----------
   ☰ app menu at the left (ui/appmenu.js); Rec joins Play and Stop with a ▾
   (ui/recmenu.js); the view switch (Browser · Inspector · Editor · Mixer)
   sits top right; the audio load is a dot (ui/perfmeter.js); the ▾ beside
   the avatars is the People menu (ui/people.js). */
.app-menu-btn { display: inline-grid; place-items: center; padding: 0.3rem 0.4rem; line-height: 0; margin-left: -6px; }
.app-menu-btn .ic { width: 16px; height: 16px; }
/* Under 1100 px the chip is just its chevron (the aria-label and tip still say Back to Projects). */
@media (max-width: 1100px) {
  .transport .exit-btn .exit-label { display: none; }
  .transport .exit-btn { padding: 0.3rem 0.35rem; }
  .transport .live-sw .live-sub { display: none; } /* just Live / Draft; the tip says who sees your edits */
}
/* Rename in place (ui/roomname.js): the input takes the name's spot and type. */
.transport .brand-rename { font: inherit; font-size: 15px; font-weight: 650; color: var(--on-chrome); background: var(--input-bg); border: 1px solid var(--accent); border-radius: 4px; padding: 1px 4px; margin: -2px -5px; width: 16rem; max-width: 40vw; outline: none; }
/* ‹ Projects (page-flow pass, mockup Q1 A): the one always-visible way out of the room. */
.transport .exit-btn { display: inline-flex; align-items: center; gap: 3px; padding: 0.3rem 0.55rem 0.3rem 0.35rem; line-height: 1; font-size: 12px; white-space: nowrap; flex: none; }
.transport .exit-btn .ic { width: 14px; height: 14px; }
/* Beats the calmer pass's quiet top-bar buttons (1,4,1) without touching that rule: the chip keeps its fill at rest. */
header.transport > #t-exit.exit-btn.tbtn:not(.on):not(.active) { background: var(--chrome-2); border-color: var(--chrome-line); color: var(--on-chrome); }
header.transport > #t-exit.exit-btn.tbtn:not(.on):not(.active):hover { background: color-mix(in srgb, var(--chrome-2) 82%, var(--on-chrome)); }
.transport .t-rec { padding: 0.35rem 0.55rem; font-size: 0.85rem; line-height: 1; }
.transport .rec-more { padding: 0.35rem 0.3rem; margin-left: -0.25rem; font-size: 10px; color: var(--chrome-muted); }
.transport .rec-more:hover:not(:disabled) { color: var(--on-chrome); }
/* Capture (roadmap #31): quiet until there are played notes to keep. */
.transport .t-capture { font-size: 11px; color: var(--chrome-muted); padding: 0.35rem 0.5rem; }
.transport .t-capture.has { color: var(--on-chrome); box-shadow: inset 0 -2px 0 var(--accent); }
/* Any record option on: the caret carries a small dot, so "something is set" shows at a glance. */
.rec-more.set { position: relative; color: var(--on-chrome); }
.rec-more.set::after { content: ''; position: absolute; top: 3px; right: 1px; width: 5px; height: 5px; border-radius: 50%; background: var(--rec-dot); }
.keys-pill[hidden] { display: none; }
.view-switch { gap: 2px; }
.transport .vbtn { padding: 0.3rem 0.45rem; display: inline-flex; align-items: center; gap: 4px; }
/* Labels make the group easy to find (roadmap §2); narrow windows fall back to icons + tips. */
.vbtn .vlabel { font-size: 0.75rem; line-height: 1; }
@media (max-width: 1280px) { .vbtn .vlabel { display: none; } }
/* Beats the calm pass's `.transport button:not(#invite)…` (it has an id in it). */
.transport #t-view > button.vbtn[aria-pressed="true"]:not(.on):not(.active) { border-color: var(--chrome-line); background: var(--chrome-2); color: var(--on-chrome); box-shadow: inset 0 -2px var(--select); }
.transport .vbtn[aria-pressed="false"] { color: var(--chrome-muted); }
.transport .vbtn[aria-pressed="false"]:hover:not(:disabled) { color: var(--on-chrome); }
/* CPU meter (ui/perfmeter.js): a light plus "CPU nn%"; the light warns before the audio glitches. */
.perf-chip { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 2px 6px; border-radius: 999px; color: var(--chrome-muted); font-family: var(--mono); font-size: var(--fs-small, 11px); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: default; }
.perf-chip[hidden] { display: none; }
.perf-chip .perf-text { min-width: 7ch; }
.perf-led { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--chrome-line); }
.perf-chip[data-level="ok"] .perf-led { background: var(--meter-lo); opacity: 0.75; }
.perf-chip[data-level="warm"] .perf-led { background: var(--meter-mid, var(--meter-hi)); }
.perf-chip[data-level="warm"] { color: var(--on-chrome); }
.perf-chip[data-level="hot"] .perf-led { background: var(--rec-dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rec-dot) 30%, transparent); }
.perf-chip[data-level="hot"] { color: var(--rec-dot); }
.perf-chip:focus-visible { outline: 2px solid var(--chrome-on); outline-offset: 2px; }
@media (max-width: 760px) { .perf-chip .perf-text { display: none; } .perf-chip { padding: 2px; } }
.people { display: flex; align-items: center; gap: 2px; flex: none; }
.transport .people-btn { padding: 0.35rem 0.3rem; font-size: 10px; color: var(--chrome-muted); }
.transport .people-btn:hover:not(:disabled) { color: var(--on-chrome); }

/* ---------- Sampler, Simpler-sized card (ui/sampler.js; Devices source card) ---------- */
/* In the fixed-height card the Sampler's rows are column blocks of the body:
   top row + wave + Sample/Pitch in one column, envelopes + filter in the next. */
.dev-smp { --dev-col-w: 548px; min-width: calc(var(--dev-col-w) + 22px); }
.dev-smp .dvb { display: block; }
.dev-smp .smp { display: contents; }
.dev-smp .smp-top, .dev-smp .smp-pair { flex-wrap: wrap; }
.dev-smp .smp-wavebox { height: 36px; } /* card-high: top row + wave + Sample/Pitch in one column */
.dev-smp .dvb { padding: 8px 10px; }
.dev-smp .smp > * { margin-bottom: 6px; }
.dev-smp .smp-pair { flex-wrap: nowrap; }
.dev-smp .smp-group { padding: 4px 8px 2px; }
.dev-smp .smp-knobs .knob { min-width: 44px; }
.dev-src { transition: box-shadow 0.15s cubic-bezier(0.23, 1, 0.32, 1); }
.dev-src.drop-ok { box-shadow: inset 0 0 0 2px var(--select), 0 0 0 3px color-mix(in srgb, var(--select) 20%, transparent); }
.dev-src.drop-no { opacity: 0.55; }
/* A Browser instrument/plugin over the card: what the drop does. */
.dev-src[data-drop-label]::after {
  content: attr(data-drop-label);
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  max-width: calc(100% - 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--select);
  color: var(--panel);
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
  z-index: 3;
}
.smp { display: flex; flex-direction: column; gap: 8px; }
.smp-top { display: flex; align-items: center; gap: 6px; }
.smp-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smp-wavebox { position: relative; height: 72px; flex: none; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.smp-wave { display: block; width: 100%; height: 100%; cursor: ew-resize; touch-action: none; }
.smp-wave[hidden] { display: none; }
.smp-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: 4px; color: var(--muted); font-size: 11px; }
.smp-empty[hidden] { display: none; }
.smp-row { display: flex; align-items: center; gap: 6px; }
.smp-row .toggle { font-size: 11px; padding: 2px 8px; }
.smp-rootl { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 10px; color: var(--muted); text-transform: uppercase; }
.smp-root { font: inherit; font-size: 11px; text-transform: none; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1px 2px; }
.smp-root:disabled { opacity: 0.4; }
.smp-replace { font-size: 11px; padding: 1px 6px; }
.smp-ask .settings-card { width: min(420px, calc(100vw - 32px)); }
.smp-ask-msg { margin: 0.6rem 0; }
.smp-ask-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 0.8rem; }
.smp-tabs { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.smp-tab { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; color: var(--muted); background: var(--panel-2); border: 0; }
.smp-tab + .smp-tab { border-left: 1px solid var(--line); }
.smp-tab:hover { color: var(--text); }
.smp-tab.on { background: var(--fill); color: var(--on-fill); }
.smp-group { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px 4px; border: 1px solid var(--line); border-radius: 4px; }
.smp-gt { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.smp-knobs { display: flex; align-items: flex-end; gap: 6px; }
.smp-knobs .knob { min-width: 50px; }
.smp-pair { display: flex; gap: 8px; }
.smp-pair > .smp-group:first-child { flex: 1; }
.smp-filter { align-self: center; }
/* Amber is for sound only: these switches use the neutral fill. */
.smp-row .toggle.on { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }

/* ---------- readable controls (Avi, 2026-11-14: "a bit too small") ----------
   One place for the bumps, so they read as a set. Studio's root is 12px, so
   1rem = 12px there (13px in the other themes). */
.pl-toolbar button { font-size: 1rem; }
.transport .toggle, .transport .t-rec { font-size: 1rem; }
.transport .ic, .roll-toolbar .ic { width: 16px; height: 16px; }
.pl-insp { padding: 0.35rem 0.45rem; }
#status { font-size: 11px; }
.ph button { font-size: 0.85rem; min-width: 22px; line-height: 1.5; }
.ph .ph-more { font-size: 1.1rem; }
.ph-kind { font-size: 0.8rem; }
.rbtn { font-size: 0.95rem; }
/* Playlist tools: square 32px buttons with a 16px icon (Avi: "maybe squares"). */
.pl-tools { gap: 3px; }
.pl-tool { width: 32px; height: 32px; padding: 0 !important; display: inline-grid; place-items: center; }
.pl-tool .ic { width: 16px; height: 16px; }

/* ---------- usage on the join card (ui/usage.js) ---------- */
#usage-box[hidden] { display: none; }
.usage { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.5rem 0.7rem; display: grid; gap: 0.45rem; font-size: 0.85rem; }
.usage > summary, .usage-room > summary { cursor: pointer; display: flex; gap: 0.6rem; align-items: baseline; color: var(--muted); }
.usage-rsum { color: var(--muted-2); margin-left: auto; text-align: right; }
.usage-row { display: grid; grid-template-columns: 4.5rem minmax(40px, 1fr) auto; gap: 0.6rem; align-items: center; }
.usage-label { color: var(--muted); }
.usage-num { color: var(--muted-2); font-family: var(--mono); font-size: 0.78rem; white-space: nowrap; }
.usage-bar { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.usage-bar > span { display: block; height: 100%; background: var(--select); }
.usage-bar.full > span { background: var(--warn); }
.usage-rooms { display: grid; gap: 0.3rem; max-height: 220px; overflow: auto; }
.usage-room { border-top: 1px solid var(--line-soft); padding-top: 0.3rem; }
.usage-room code { color: var(--text); }
.usage-files { list-style: none; margin: 0.3rem 0; padding: 0; display: grid; gap: 0.15rem; }
.usage-file { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.6rem; color: var(--muted-2); }
.usage-fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.usage-file.deleted .usage-fstate, .usage-file.unused .usage-fstate { color: var(--warn); }
.usage-actions { display: flex; justify-content: flex-end; }
.usage-msg { color: var(--muted-2); }
.usage-msg[hidden] { display: none; }
.admin-tier { font: inherit; padding: 0.15rem 0.3rem; }
.admin-usage { color: var(--muted-2); font-family: var(--mono); font-size: 0.78rem; white-space: nowrap; }

/* ---------- /admin (server.js "site admin"; admin/admin.html) ---------- */
body.admin-page { display: block; height: auto; min-height: 100%; overflow: auto; }
.admin { width: min(760px, 100%); margin: 0 auto; padding: 32px 16px 64px; display: grid; gap: 16px; box-sizing: border-box; }
.admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-head h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: 0.12em; }
.admin-head h1 span { color: var(--muted); font-weight: 400; letter-spacing: 0.04em; font-size: 16px; }
.admin-head a { color: var(--muted-2); }
.admin-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; display: grid; gap: 0.8rem; min-width: 0; }
.admin-card[hidden], .admin-error[hidden] { display: none; }
.admin-card h2 { margin: 0; font-size: 15px; font-weight: 600; }
.admin-card p { margin: 0; line-height: 1.5; }
.admin-form { display: grid; gap: 0.7rem; }
.admin-form label { display: grid; gap: 0.35rem; color: var(--muted); }
.admin-form input:not([type='checkbox']) { padding: 0.55rem 0.7rem; }
.admin-form .admin-check { display: flex; align-items: center; gap: 0.5rem; color: var(--muted-2); }
.admin-form button[type='submit'] { justify-self: start; background: var(--fill); color: var(--on-fill); border: 0; padding: 0.6rem 1.1rem; }
.admin-error { margin: 0; color: var(--warn); font-size: 0.9rem; }
.admin-result { border-color: var(--select); }
.admin-result dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.4rem 1rem; }
.admin-result dt { color: var(--muted); }
.admin-result dd { margin: 0; overflow-wrap: anywhere; }
.admin-result code { font-family: var(--mono); font-size: 15px; color: var(--text); user-select: all; }
.admin-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 400; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.admin-table td:last-child { text-align: right; white-space: nowrap; }
.admin-email { overflow-wrap: anywhere; min-width: 10rem; }
.admin-tag { margin-left: 0.4rem; font-size: 0.75rem; color: var(--muted-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 0.4rem; white-space: nowrap; }
.admin-tag-warn { color: var(--warn); border-color: var(--warn); }
.admin-notice { margin: 0; color: var(--muted); font-size: 0.9rem; }
.admin-notice[hidden] { display: none; }
.admin-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.3rem; min-width: 14rem; }
.admin-act { padding: 0.25rem 0.5rem; font-size: 0.8rem; }
.admin-act-danger { color: var(--warn); }
.admin-search { padding: 0.45rem 0.7rem; max-width: 22rem; }
.admin-table tr[hidden] { display: none; }
.admin-audit { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.3rem; max-height: 18rem; overflow: auto; font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }
.admin-audit time { color: var(--muted-2); font-family: var(--mono); }

/* ---------- track lyrics (ui/lyrics.js; 04-plans/2026-11-14_track-lyrics-plan.md) ----------
   A panel over the right of the playlist timeline. Tokens only. */
.lyrics {
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 5;
  width: var(--lyrics-w, 300px);
  max-width: calc(100% - 16px);
  display: grid;
  grid-template-rows: 32px minmax(0, 1fr) auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.lyrics[hidden] { display: none; }
.lyrics-grip { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; cursor: ew-resize; z-index: 1; }
.lyrics-grip:hover { background: var(--line-soft); }
.lyrics-head { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line-soft); background: var(--panel-2); min-width: 0; }
.lyrics-chip { flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--chip, var(--muted)); }
.lyrics-name { flex: 1; min-width: 0; font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lyrics-ro { flex: none; font: 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.lyrics-ro[hidden] { display: none; }
.lyrics-x { flex: none; border: 0; padding: 0 6px; font-size: 16px; line-height: 1; color: var(--muted-2); background: none; }
.lyrics-text {
  resize: none;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  outline: none;
  background: var(--input-bg);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  white-space: pre-wrap;
  overflow-y: auto;
}
.lyrics-text:focus-visible { box-shadow: inset 0 0 0 1px var(--select); }
.lyrics-text[readonly] { color: var(--muted); }
.lyrics-text::placeholder { color: var(--muted); }
.lyrics-status { min-height: 22px; padding: 3px 12px; font: 10px var(--mono); color: var(--muted); border-top: 1px solid var(--line-soft); }

/* Personal mix is heard only in this browser. */
.personal-mix { position: relative; }
.my-solo { color: var(--on-chrome); font-size: 0.75rem; white-space: nowrap; }
.my-solo[hidden] { display: none; }
.transport .my-solo button { padding: 0.15rem 0.35rem; font-size: inherit; }

/* ---------- type scale (UI overhaul P1) ----------
   Three sizes: 12 (ui), 11 (small/label, the floor for DOM text), 10 (canvas tick labels only).
   Appended, not edited in place: every rule below re-declares an older sub-11 px rule.
   test/uifloor.test.js fails if an old sub-11 px selector is not repeated here. */
:root { --fs-ui: 12px; --fs-small: 11px; --fs-label: 11px; --fs-tick: 10px; }
.knob-text, .strip .db, #status, .insp-scale span, .strip.master .lufs, .sc-gr-text, .tfield, .ph-m { font-variant-numeric: tabular-nums; }
.knob-label { font-size: var(--fs-small); letter-spacing: 0.08em; }
.knob-text { font-size: var(--fs-small); }
.join-card button[type='submit'] { font-size: var(--fs-small); letter-spacing: 0.08em; }
.share-pop h3 { font-size: var(--fs-small); letter-spacing: 0.08em; }
.share-tag { font-size: var(--fs-small); }
#invite { font-size: var(--fs-small); letter-spacing: 0.08em; }
.tfield { font-size: var(--fs-small); letter-spacing: 0.08em; }
.avatar { font-size: var(--fs-small); }
.follow-stop { font-size: var(--fs-small); }
.transport .rp-chip-btn, .rp-chip .rp-chip-btn, .rp-card button { font-size: var(--fs-small); }
#status { font-size: var(--fs-small); }
.pl-title { font-size: var(--fs-small); letter-spacing: 0.08em; }
.pl-corner { font-size: var(--fs-small); letter-spacing: 0.08em; }
.pl-corner-pat { font-size: var(--fs-small); }
.ph-m { font-size: var(--fs-small) !important; }
.ph-kind { font-size: var(--fs-small); }
.pl-grid { font-size: var(--fs-small); }
.ph-auto-label { font-size: var(--fs-small); letter-spacing: 0.08em; }
.ph-mini { font-size: var(--fs-small) !important; }
.cheat-table th { font-size: var(--fs-small); letter-spacing: 0.08em; }
.settings-card h3 { font-size: var(--fs-small); letter-spacing: 0.08em; }
.glabel { font-size: var(--fs-small); letter-spacing: 0.08em; }
.legend-key-label { font-size: var(--fs-small); letter-spacing: 0.08em; }
.legend-status { font-size: var(--fs-small); }
.cheat-col h3 { font-size: var(--fs-small); letter-spacing: 0.08em; }
.cmd-row .ctx-hint { font-size: var(--fs-small); }
.foot-label { font-size: var(--fs-small); letter-spacing: 0.08em; }
.ctx-item .ctx-hint { font-size: var(--fs-small); }
.ctx-head { font-size: var(--fs-small); }
.fx-pick-head { font-size: var(--fs-small); }
.strip .db { font-size: var(--fs-small); }
.strip .fx-slots button { font-size: var(--fs-small); }
.strip.master .lufs { font-size: var(--fs-small); }
.dev-label { font-size: var(--fs-small); }
.dev-src-kind { font-size: var(--fs-small); }
.sc-gr-text { font-size: var(--fs-small); }
.fx-auto { font-size: var(--fs-small); }
.br-head { font-size: var(--fs-small); }
.br-meta { font-size: var(--fs-small); }
.br-path { font-size: var(--fs-small); }
.br-row.folder .br-meta { font-size: var(--fs-small); }
.peer-tag { font-size: var(--fs-small); }
.tip-key { font-size: var(--fs-small); }
.tip-reset { font-size: var(--fs-small); }
.chat-btn .badge { font-size: var(--fs-small); }
.chat-title { font-size: var(--fs-small); letter-spacing: 0.08em; }
.chat-time { font-size: var(--fs-small); }
.chat-count { font-size: var(--fs-small); }
.cm-pos { font-size: var(--fs-small); }
.cm-time { font-size: var(--fs-small); }
.strip .fx-off { font-size: var(--fs-small); }
.follow-hear { font-size: var(--fs-small); }
.ver-head { font-size: var(--fs-small); }
.push-tag { font-size: var(--fs-small); }
.side-tab { font-size: var(--fs-small); letter-spacing: 0.08em; }
.hist-day { font-size: var(--fs-small); }
.hist-time { font-size: var(--fs-small); }
.hist-foot { font-size: var(--fs-small); }
.insp-label { font-size: var(--fs-small); }
.insp-scale span { font-size: var(--fs-small); }
.insp-pow { font-size: var(--fs-small); }
.transport .rec-more { font-size: var(--fs-small); }
.transport .people-btn { font-size: var(--fs-small); }
.smp-rootl { font-size: var(--fs-small); }
.smp-tab { font-size: var(--fs-small); }
.smp-gt { font-size: var(--fs-small); letter-spacing: 0.08em; }
/* rem-sized rules (root is 12px, so these were 8–10.9 px) */
.ask-label { font-size: var(--fs-small); }
.cheat-row { font-size: var(--fs-small); }
.cheat-table { font-size: var(--fs-small); }
.chip .num { font-size: var(--fs-small); }
.chip { font-size: var(--fs-small); }
.cmd-empty { font-size: var(--fs-small); }
.cmd-foot { font-size: var(--fs-small); }
.cmd-group { font-size: var(--fs-small); }
.dvb { font-size: var(--fs-small); }
.export-dialog .ex-grid label { font-size: var(--fs-small); }
.foot-hint { font-size: var(--fs-small); }
.fx-modes button { font-size: var(--fs-small); }
.fx-pick-empty, .fx-pick-note { font-size: var(--fs-small); }
.fx-trig { font-size: var(--fs-small); }
.hint { font-size: var(--fs-small); }
.insp-ms button { font-size: var(--fs-small); }
.join-card .join-error { font-size: var(--fs-small); }
.latency-dialog .lat-row { font-size: var(--fs-small); }
.latency-dialog .ov-col { font-size: var(--fs-small); }
.latency-dialog .ov-label { font-size: var(--fs-small); }
.ph button { font-size: var(--fs-small); }
.ph-param { font-size: var(--fs-small); }
.pl-toolbar button { font-size: var(--fs-small); }
.plugin-picker .pp-note { font-size: var(--fs-small); }
.pop-check { font-size: var(--fs-small); }
.pop-hint { font-size: var(--fs-small); }
.pop-title { font-size: var(--fs-small); }
.rbtn { font-size: var(--fs-small); }
.rinput { font-size: var(--fs-small); }
.rk-graph-row { font-size: var(--fs-small); }
.rk-graph-tabs button { font-size: var(--fs-small); }
.setup-card-body b { font-size: var(--fs-small); }
.setup-card-body { font-size: var(--fs-small); }
.setup-more summary { font-size: var(--fs-small); }
.strip .sbtns button { font-size: var(--fs-small); }
.strip .sname { font-size: var(--fs-small); }
.toggle { font-size: var(--fs-small); }
.transport .t-rec { font-size: var(--fs-small); }
kbd { font-size: var(--fs-small); }
.roll-chip .caret { font-size: var(--fs-small); }

/* ---------- idle outlines, leftovers (UI overhaul P1) ----------
   Copy of the calmer-pass rule (not an edit of it) for the buttons it missed:
   the unselected playlist tools, the Editor/view switch, the roll-toolbar
   Float and the floating panel's Dock/close. On states keep their fill. */
:is(.pl-tools > .pl-tool:not(.on), .view-switch > .pl-insp:not([aria-pressed="true"]), .roll-toolbar > .panel-float, .floating-panel-head > .rbtn) {
  border-color: transparent;
  background: transparent;
}
:is(.pl-tools > .pl-tool:not(.on), .view-switch > .pl-insp:not([aria-pressed="true"]), .roll-toolbar > .panel-float, .floating-panel-head > .rbtn):hover:not(:disabled) {
  border-color: var(--line);
  background: var(--panel-2);
}

/* ---------- type scale, merge additions (UI overhaul P1) ----------
   Selectors that landed on main after the floor pass (usage, admin, lyrics, personal solo,
   view-button labels, trash, ask chip). Same rule: re-declare at the floor, do not edit above. */
.ph-ask { font-size: var(--fs-small); }
.trash-panel h3 { font-size: var(--fs-small); }
.vbtn .vlabel { font-size: var(--fs-small); }
.cm-count { font-size: var(--fs-small); }
.usage { font-size: var(--fs-small); }
.usage-num { font-size: var(--fs-small); }
.admin-usage { font-size: var(--fs-small); }
.admin-error { font-size: var(--fs-small); }
.admin-table { font-size: var(--fs-small); }
.admin-tag { font-size: var(--fs-small); }
.admin-notice { font-size: var(--fs-small); }
.admin-act { font-size: var(--fs-small); }
.admin-audit { font-size: var(--fs-small); }
.lyrics-ro { font-size: var(--fs-small); }
.lyrics-status { font-size: var(--fs-small); }
.my-solo { font-size: var(--fs-small); }

/* ---------- artist booth card (ui/boothcard.js) ---------- */
.booth-card { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: min(360px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--pop-shadow); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.booth-card[hidden] { display: none; }
.booth-pill { position: fixed; right: 16px; bottom: 16px; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--pop-shadow); padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.booth-pill[hidden] { display: none; }
.booth-card p { margin: 0; }
.booth-card .bc-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.booth-card .bc-warn { color: var(--warn); font-size: 0.85rem; }
.booth-card .bc-mic { display: grid; grid-template-columns: 1fr auto; gap: 2px 0.6rem; align-items: stretch; }
.booth-card .bc-mic label { grid-column: 1; }
.booth-card .bc-mic .input-chooser { grid-column: 1; }
.booth-card .bc-meter { grid-column: 2; grid-row: 1 / span 2; width: 12px; height: 56px; background: var(--panel-3); border-radius: 3px; }
.booth-card .bc-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.booth-card .bc-go { justify-content: flex-end; }
.booth-card .bc-give { text-align: left; line-height: 1.3; padding: 0.6rem 0.75rem; }
.booth-card .bc-give b { display: block; font-size: 14px; }
.booth-card .bc-give span { font-size: 12px; color: var(--muted); }
.booth-card .bc-give.bc-last { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.booth-card .bc-give.bc-last span { color: var(--on-fill); opacity: 0.65; }
.booth-card .bc-gives { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.booth-card .bc-ask { margin-bottom: -0.3rem; }
.booth-card .bc-help { font-size: 0.8rem; line-height: 1.45; }
.booth-card .bc-calibrate, .booth-card .bc-talkback { background: none; border: 0; padding: 0; color: var(--muted); font-size: 0.8rem; text-decoration: underline; }
.booth-card .bc-calibrate:hover, .booth-card .bc-talkback:hover { color: var(--text); }
.booth-card .bc-row:has(.bc-calibrate) { gap: 0.9rem; }

/* ---------- booth strip, engineer's inspector section (ui/boothstrip.js) ---------- */
.insp-booth { flex: none; padding: 6px 10px 8px; border-bottom: 1px solid var(--line); }
.insp-booth[hidden] { display: none; }
/* "Remove <name> from track" at the foot of the Booth section (Avi 2026-11-20). */
.insp-booth .bs-remove { display: block; width: 100%; margin-top: 8px; height: 24px; border-radius: 4px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; font-size: var(--fs-small); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insp-booth .bs-remove:hover { border-color: var(--select); }
.insp-booth .bs-remove[hidden] { display: none; }
.insp-booth .bs-state, .insp-booth .bs-upload { color: var(--text); overflow-wrap: anywhere; justify-self: start; }
.insp-booth .bs-meter { width: 10px; height: 34px; background: var(--panel-3); border-radius: 3px; }
.insp-booth .bs-nudge { display: inline-flex; align-items: center; gap: 4px; }
.insp-booth .bs-btn { padding: 0 7px; line-height: 18px; }
.insp-booth .bs-nudge-val { min-width: 54px; padding: 0 4px; text-align: center; border-color: transparent; background: transparent; }

/* ---------- headphone mix, talkback, redo, practice (ui/boothmix.js) ---------- */
.insp-booth .bm-slider { width: 100%; min-width: 0; accent-color: var(--muted-2); }
.insp-booth .bs-talk.on, .insp-booth .bs-latch.on { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.insp-booth .bs-tip { margin: 4px 0 0; color: var(--warn); font-size: var(--fs-small); }
.insp-booth .bs-tip[hidden] { display: none; }
.insp-booth .bs-delay.warn { color: var(--warn); }
.insp-booth .bs-nodelay { margin: 4px 0 0; color: var(--warn); font-size: var(--fs-small); }
.insp-booth .bs-nodelay[hidden] { display: none; }
.booth-artist { position: fixed; left: 16px; bottom: 16px; z-index: 60; width: min(300px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--pop-shadow); padding: 0.7rem 0.9rem; display: flex; flex-direction: column; gap: 0.35rem; }
.booth-artist[hidden] { display: none; }
.booth-artist p { margin: 0; }
.booth-artist .bm-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 0.5rem; }
.booth-artist .bm-slider { width: 100%; min-width: 0; accent-color: var(--muted-2); }
.booth-artist .bm-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem; }
.booth-artist .bm-btn[aria-pressed="true"] { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.booth-artist .bm-redo:not(:disabled) { border-color: var(--warn); color: var(--warn); }

/* ---------- preview player (ui/previewplayer.js) ---------- */
/* Amber is the played part of the waveform and the play button's "sounding" state only. */
.pvw { display: flex; flex-direction: column; gap: 0.6rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 0.9rem; color: var(--text); min-width: 0; }
.pvw [hidden] { display: none !important; }
.pvw-head { display: flex; align-items: center; gap: 0.45rem; min-height: 20px; }
.pvw-title { font-weight: 600; letter-spacing: -0.01em; margin-right: auto; }
.pvw-tag { font-size: var(--fs-small); line-height: 18px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted-2); background: var(--panel-2); }
.pvw-tag-updating { border-style: dashed; }
.pvw-empty { margin: 0; padding: 1.1rem 0.8rem; text-align: center; color: var(--muted); background: var(--panel-2); border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.pvw-wave { position: relative; height: 64px; padding-bottom: 14px; cursor: pointer; }
.pvw-canvas { display: block; width: 100%; height: 50px; background: var(--panel-2); border-radius: var(--radius-sm); }
.pvw-dots { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; }
.pvw-dot { position: absolute; top: 2px; width: 10px; height: 10px; margin-left: -5px; padding: 0; border-radius: 50%; border: 1px solid var(--panel); background: var(--c, var(--muted-2)); cursor: pointer; }
.pvw-dot:hover:not(:disabled) { background: var(--c, var(--muted-2)); border-color: var(--text); }
.pvw-dot.open { box-shadow: 0 0 0 2px var(--text); }
.pvw-dot.resolved { opacity: 0.4; }
.pvw-bar { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.pvw-play { width: 30px; height: 30px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
.pvw-play::before { content: ''; width: 10px; height: 12px; margin-left: 2px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.pvw-play.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pvw-play.on:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.pvw-play.on::before { margin-left: 0; clip-path: none; background: none; border-left: 3px solid currentColor; border-right: 3px solid currentColor; box-sizing: border-box; }
.pvw-time { font-variant-numeric: tabular-nums; color: var(--muted-2); font-size: var(--fs-small); }
.pvw-err { color: var(--warn); font-size: var(--fs-small); overflow-wrap: anywhere; }
.pvw-changes { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 0.55rem 0.7rem; }
.pvw-changes-title { margin: 0 0 0.3rem; font-size: var(--fs-small); font-weight: 600; color: var(--muted-2); }
.pvw-changes ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 2px; }
.pvw-thread { display: flex; flex-direction: column; gap: 0.45rem; border-top: 1px solid var(--line-soft); padding-top: 0.55rem; }
.pvw-thread-head { display: flex; align-items: center; gap: 0.5rem; }
.pvw-thread-title { font-size: var(--fs-small); font-weight: 600; color: var(--muted-2); margin-right: auto; }
.pvw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; max-height: 260px; overflow-y: auto; }
.pvw-none { color: var(--muted); font-size: var(--fs-small); }
.pvw-c { display: flex; flex-direction: column; gap: 2px; }
.pvw-c.resolved .pvw-c-text { color: var(--muted); }
.pvw-c-reply { padding-left: 0.9rem; border-left: 2px solid var(--line); }
.pvw-c-meta { display: flex; align-items: center; gap: 0.4rem; font-size: var(--fs-small); }
.pvw-c-name { font-weight: 600; }
.pvw-c-name::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; background: var(--c, var(--muted-2)); vertical-align: 1px; }
.pvw-c-at, .pvw-c-acts button, .pvw-back { padding: 0 6px; line-height: 18px; font-size: var(--fs-small); }
.pvw-c-resolved { color: var(--muted); }
.pvw-c-at.pvw-old-at { color: var(--muted); cursor: default; }
.pvw-earlier { margin: 0.3rem 0 0; font-size: var(--fs-small); font-weight: 600; color: var(--muted); list-style: none; border-top: 1px dashed var(--line); padding-top: 0.4rem; }
.pvw-old-note { color: var(--muted); font-size: var(--fs-small); }
.pvw-c-text { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.pvw-c-acts { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.pvw-c-acts .pvw-delete:hover:not(:disabled) { border-color: var(--warn); color: var(--warn); }
.pvw-form { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.pvw-input { flex: 1 1 160px; min-width: 0; }
.pvw-at { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-small); color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* Dashboard 2: the player fills the shell's 16:10 card slot and scrolls inside it. */
.pvw-slot { position: absolute; inset: 0; overflow: auto; }

/* ---------- Dashboard 4 (js/dash/servers/): bell rows, visibility + request dialogs, activity feed. Tokens only; amber stays for sound. ---------- */
.dash .d4-muted { margin: 0; color: var(--muted); font-size: 12px; }
.dash .d4-bell { max-height: min(70vh, 520px); overflow: auto; display: grid; gap: 10px; }
.dash .d4-bell-empty { display: grid; place-items: center; min-height: 56px; }
.dash .d4-notes { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.dash .d4-note { position: relative; display: grid; gap: 4px; padding: 8px 8px 8px 18px; border-radius: 10px; }
.dash .d4-note:hover { background: var(--dash-hover); }
.dash .d4-note.is-unread::before { content: ''; position: absolute; left: 6px; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--select); }
.dash .d4-note-text { margin: 0; color: var(--text); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.dash .d4-note-text strong { font-weight: 600; }
.dash .d4-note-msg { margin: 0; color: var(--muted-2); font-size: 12px; font-style: italic; overflow-wrap: anywhere; }
.dash .d4-note-time { margin: 0; color: var(--faint); font-size: 11px; }
.dash .d4-note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.dash .d4-note-done { margin: 0; color: var(--muted); font-size: 12px; }
.dash .d4-note-err { margin: 0; color: var(--warn); font-size: 12px; }
.dash .d4-role { height: 28px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--input-bg); color: var(--text); font: inherit; font-size: 12px; }
.dash .d4-note-link { display: inline-flex; align-items: center; text-decoration: none; }
.dash .d4-note-actions .dash-btn:disabled, .dash .d4-role:disabled { opacity: 0.5; cursor: default; }
.dash .d4-bell-foot { display: flex; justify-content: flex-end; padding-top: 8px; border-top: 1px solid var(--line-soft); }

.dash .d4-fieldset { display: grid; gap: 6px; margin: 14px 0 0; padding: 0; border: 0; min-width: 0; }
.dash .d4-fieldset > legend { padding: 0; margin-bottom: 6px; }
.dash .d4-choice { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-soft); cursor: pointer; }
.dash .d4-choice:hover { background: var(--dash-hover); }
.dash .d4-choice:has(input:checked) { border-color: var(--line); background: var(--dash-on); }
.dash .d4-choice input, .dash .d4-check input { margin: 2px 0 0; accent-color: var(--fill); }
.dash .d4-choice-text { display: grid; gap: 2px; }
.dash .d4-choice-label { color: var(--text); font-weight: 600; font-size: 13px; }
.dash .d4-choice-desc { color: var(--muted); font-size: 12px; line-height: 1.35; }
.dash .d4-check { display: flex; align-items: flex-start; gap: 8px; color: var(--text); font-size: 13px; cursor: pointer; }
.dash .d4-servers { display: grid; gap: 6px; }
.dash .d4-dialog-note { margin: 10px 0 0; color: var(--muted-2); font-size: 12px; }
.dash .d4-paste-ask { margin-left: 6px; vertical-align: middle; }

.dash .d4-feed { display: grid; grid-template-rows: auto auto 1fr; height: 100%; min-height: 0; }
.dash .d4-feed[hidden] { display: none; }
.dash .d4-feed-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 16px 8px; }
.dash .d4-feed-title { margin: 0; color: var(--text); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.dash .d4-feed-close { font-size: 18px; line-height: 1; }
.dash .d4-feed-share { padding: 0 16px 10px; border-bottom: 1px solid var(--line-soft); color: var(--muted-2); font-size: 12px; }
.dash .d4-feed-list { margin: 0; padding: 8px; list-style: none; overflow: auto; min-height: 0; display: grid; align-content: start; gap: 2px; }
.dash .d4-feed-list > .d4-muted { padding: 8px; }
.dash .d4-feed-row { display: grid; gap: 2px; padding: 8px; border-radius: 10px; }
.dash .d4-feed-row:hover { background: var(--dash-hover); }
.dash .d4-feed-text { margin: 0; color: var(--text); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.dash .d4-feed-text strong { font-weight: 600; }
.dash .d4-feed-time { margin: 0; color: var(--faint); font-size: 11px; }
/* ---- snap dock zones (roadmap §14 / §34; main.js layout, ui/layout.js, ui/zones.js) ---- */
.zone { position: relative; display: grid; grid-template-rows: 32px minmax(0, 1fr); min-width: 0; min-height: 0; overflow: hidden; background: var(--panel); border-top: 1px solid var(--line); }
.zone[hidden] { display: none; }
.zone-left { grid-column: 2; grid-row: 2 / -1; border-right: 1px solid var(--line); }
.zone-right { grid-column: 4; grid-row: 2 / -1; border-left: 1px solid var(--line); }
.zone-tabs { display: flex; align-items: stretch; gap: 2px; padding: 0 6px; border-bottom: 1px solid var(--line); min-width: 0; }
.zone-tabs [role='tab'] { background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); padding: 0 0.7rem; white-space: nowrap; }
.zone-tabs [role='tab'].active { color: var(--text); border-bottom-color: var(--accent); }
.zone-body { min-height: 0; min-width: 0; overflow: auto; display: grid; }
.zone-body > .tab-pane.active { height: 100%; min-height: 0; }
.zone-handle { position: absolute; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 3; touch-action: none; }
.zone-left .zone-handle { right: 0; }
.zone-right .zone-handle { left: 0; }
.zone-handle:hover, .zone-handle.drag { background: var(--accent); }
.zone-handle:focus-visible { background: var(--select); }
.drop-preview { position: fixed; z-index: 200; pointer-events: none; display: grid; place-items: center; background: color-mix(in srgb, var(--dock) 22%, transparent); border: 2px dashed var(--dock); }
.drop-preview[hidden] { display: none; }
.drop-label { background: var(--dock); color: var(--dock-ink); border-radius: 999px; padding: 0.15rem 0.8rem; font-size: var(--fs-small); font-weight: 700; }
body.panel-dragging { user-select: none; }
body.dock-empty > #splitter, body.dock-empty > #dock { display: none; }
body.dock-empty { grid-template-rows: var(--header-h) minmax(120px, 1fr) 0 0; }
.dock-tabs [data-tab][hidden] { display: none; }
.floating-panel .zone-handle { display: none; }

/* ---- slightly rounded panels (floating windows round all corners; docked panels only the corners that face the rest of the window) ---- */
.floating-panel { border-radius: var(--panel-radius); }
.floating-panel-head { border-radius: var(--panel-radius) var(--panel-radius) 0 0; }
.drop-preview { border-radius: var(--panel-radius); }
.zone-left { border-radius: 0 var(--panel-radius) var(--panel-radius) 0; }
.zone-right { border-radius: var(--panel-radius) 0 0 var(--panel-radius); }
.inspector { border-radius: 0 var(--panel-radius) var(--panel-radius) 0; }
.dock { border-radius: var(--panel-radius) var(--panel-radius) 0 0; overflow: hidden; }
/* Tuner (ui/tunerview.js) and Key Finder (ui/keyfinder.js). Tuner blocks
   never set a card height; they stack as break-inside: avoid blocks. */
.tn { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.tn-blk { break-inside: avoid; }
.tn-needle { width: 100%; height: 64px; display: block; }
.tn-read { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.tn-note { font-size: 28px; line-height: 1; color: var(--text); }
.tn-note sub { font-size: 12px; color: var(--muted); }
.tn-cents { color: var(--muted-2); min-width: 70px; text-align: center; }
.tn-cents.ok { color: var(--tune-ok); }
.tn-cents.off { color: var(--warn); }
.tn-hz, .tn-src { color: var(--muted); font-size: 11px; }
.tn-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tn-ref { width: 64px; }
.tn-str { padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel-3); color: var(--muted-2); cursor: pointer; font: inherit; font-size: 11px; }
.tn-str.on { border-color: var(--muted-2); color: var(--text); }
.tn-str.hit { border-color: var(--tune-ok); }
.hdr-key { white-space: nowrap; }
.kf-pop, .tn-pop { position: fixed; z-index: 60; width: 300px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); color: var(--text); font-size: 12px; }
.kf-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.kf-tabs button.on { border-color: var(--muted-2); color: var(--text); }
.kf-chroma { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; align-items: end; height: 42px; }
.kf-chroma i { display: block; background: var(--muted); min-height: 2px; }
.kf-chroma i.in { background: var(--muted-2); }
.kf-names { display: grid; grid-template-columns: repeat(12, 1fr); font-size: 10px; color: var(--muted); text-align: center; }
.kf-key { font-size: 20px; margin-top: 6px; }
.kf-sub { color: var(--muted); }
.kf-drop { border: 1px dashed var(--line); border-radius: 6px; padding: 14px; text-align: center; color: var(--muted); }
.kf-drop.over { border-color: var(--muted-2); color: var(--text); }
.kf-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.kf-grid button.on { border-color: var(--muted-2); color: var(--text); }
.kf-bar { height: 4px; background: var(--panel-3); border-radius: 2px; overflow: hidden; }
.kf-bar i { display: block; height: 100%; background: var(--muted-2); }
.kf-ref.off { color: var(--warn); }
.kf-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.kf-pop .pop-x { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.kf-pop .pop-x:hover { color: var(--text); }

/* ---- small UI fixes (roadmap #46) ---- */
/* Play / Stop / Rec sit in the middle of the header; time and BPM stay at the
   left by the room name. When the sides don't fit around it, ui/transport.js
   adds .t-flow and the group goes back in the flow. */
.transport { position: relative; }
.t-transport { position: absolute; left: 50%; transform: translateX(-50%); }
/* Not enough room for the true centre: centre it in the free space between
   the left cluster (brand, time, BPM…) and the right one (view switch,
   people…). The group sits just before .spacer in the DOM, so Tab order
   matches what you see in both modes. */
.transport.t-flow > .t-transport { position: static; transform: none; margin-inline: auto; }
.transport.t-flow > .spacer { display: none; }
/* No sign-in flash: the card shows only its title + "Checking your sign-in…"
   until /api/auth/me answers (main.js renderAuth drops .loading). */
.join-card.loading > :not(h1):not(#join-loading) { display: none; }
.join-card:not(.loading) #join-loading { display: none; }
/* Edit live: a pill you can't miss (--warn, not amber: amber is sound only). */
/* The flat-button rule (.transport button:not(.on):not(.active):not(#invite)…)
   blanks backgrounds, so the pill never showed its colour; this matches its
   weight and comes later. */
.transport button#t-live.live-pill:not(.on):not(.active) { background: var(--warn); border-color: var(--warn); color: var(--warn-ink); }
.live-pill { position: relative; padding: 4px 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; min-height: 26px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 35%, transparent); }
/* Two pulses when Edit live turns on, then a still ring: a ::after ring that
   grows and fades (transform/opacity, no box-shadow paint loop). */
.live-pill::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; border: 2px solid color-mix(in srgb, var(--warn) 60%, transparent); opacity: 0; pointer-events: none; animation: live-ring 1.2s var(--ease-out) 2; }
@keyframes live-ring { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .live-pill::after { animation: none; } }
.del-foot .live-go { background: var(--warn); color: var(--warn-ink); border-color: var(--warn); }

/* Track header Monitor button (audio tracks; playlist.js MON_*): Off plain,
   Auto amber outline, In amber fill. Amber = sound, and monitoring is hearing
   the input. No transition: it's pressed dozens of times a session. */
.ph-mon { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.ph-mon .ic { width: 11px; height: 11px; }
.ph-mon[hidden] { display: none; }
.ph-mon.auto { border-color: var(--accent); color: var(--accent); }
.ph-mon.in { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---- UI scale slider (Settings → Appearance; ui/uiscale.js) ---- */
.set-scale { align-items: center; }
.set-scale input[type='range'] { flex: 1; min-width: 160px; accent-color: var(--text); }
.set-scale-val { font-family: var(--mono); font-size: 11px; min-width: 3.5em; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---- Settings, studio-console look (mockup A, approved 2026-11-16; ui/settings.js polish()) ----
   Left rail of sections, small caps group labels, one card per group,
   name + description on the left and the control on the right. Switches
   and segmented controls are restyled native inputs, so keyboard and
   screen readers keep working. "On" is the white fill; amber stays for sound. */
#settings .settings-card { position: relative; width: min(820px, calc(100vw - 32px)); max-height: min(720px, calc(100vh - 48px)); padding: 0; border-radius: 14px; box-shadow: 0 24px 80px var(--dim), inset 0 1px 0 var(--line-soft); }
#settings .panel-head { position: absolute; top: 14px; right: 16px; padding: 0; z-index: 1; }
#settings .panel-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#settings-body { display: grid; grid-template-columns: 184px 1fr; min-height: min(560px, calc(100vh - 48px)); flex: 1; }
#settings .settings-tabs { flex-direction: column; overflow: auto; padding: 18px 10px; gap: 2px; border-bottom: 0; border-right: 1px solid var(--line-soft); background: var(--panel-2); }
#settings .settings-tabs::before { content: 'Settings'; font-size: 15px; font-weight: 600; color: var(--text); padding: 0 10px 14px; letter-spacing: -0.01em; }
#settings .settings-tabs button { text-align: left; border: 0; border-radius: 8px; padding: 8px 10px; color: var(--muted-2); background: transparent; }
#settings .settings-tabs button:hover { color: var(--text); }
#settings .settings-tabs button[aria-selected="true"] { background: var(--chrome-2); color: var(--text); border: 0; }
#settings .settings-content { padding: 22px 28px 28px; }
#settings .settings-content section { margin: 0 0 22px; }
#settings .settings-content h3 { margin: 0 0 8px 2px; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
#settings .set-card { background: var(--panel-3); border: 1px solid var(--line-soft); border-radius: 10px; }
#settings .set-card > * { margin: 0; padding: 12px 16px; }
#settings .set-card > * + * { border-top: 1px solid var(--line-soft); }
#settings .set-card > .hint { color: var(--muted); font-size: 12px; padding-top: 10px; padding-bottom: 10px; }
#settings .set-sub { font-weight: 500; color: var(--text); padding-bottom: 0 !important; }
#settings .set-sub + .set-radios { border-top: 0; }
/* switch rows */
#settings .set-check { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 56px; cursor: pointer; }
#settings .set-text { display: grid; gap: 2px; min-width: 0; }
#settings .set-text > span:first-child { font-weight: 500; color: var(--text); }
#settings .set-desc { color: var(--muted); font-size: 12px; line-height: 1.45; }
#settings input[role='switch'] { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 36px; height: 20px; margin: 0; border-radius: 999px; background: var(--chrome-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background 180ms; }
#settings input[role='switch']::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted-2); box-shadow: 0 1px 3px var(--dim); transition: transform 180ms cubic-bezier(0.3, 0.7, 0.4, 1), background 180ms; }
#settings input[role='switch']:checked { background: var(--fill); }
#settings input[role='switch']:checked::after { transform: translateX(16px); background: var(--on-fill); }
#settings input[role='switch']:disabled { opacity: 0.4; cursor: not-allowed; }
#settings input[role='switch']:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
/* segmented radios */
#settings .set-radios { display: flex; }
#settings .set-radios:not(.set-themes) { display: flex; flex-wrap: wrap; gap: 0; }
#settings .set-radios:not(.set-themes) { background: none; }
#settings .set-radios:not(.set-themes) > label { position: relative; padding: 6px 12px; font-size: 12px; color: var(--muted-2); background: var(--input-bg); cursor: pointer; white-space: nowrap; border-block: 1px solid var(--line-soft); }
#settings .set-radios:not(.set-themes) > label:first-child { border-radius: 8px 0 0 8px; border-left: 1px solid var(--line-soft); padding-left: 14px; }
#settings .set-radios:not(.set-themes) > label:last-child { border-radius: 0 8px 8px 0; border-right: 1px solid var(--line-soft); padding-right: 14px; }
#settings .set-radios:not(.set-themes) > label:has(:checked) { background: var(--chrome-2); color: var(--text); box-shadow: inset 0 1px 0 var(--line-soft); }
#settings .set-radios:not(.set-themes) > label:hover { color: var(--text); }
#settings .set-radios > label { position: relative; }
#settings .set-radios input[type='radio'] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
#settings .set-radios > label:has(:focus-visible) { outline: 2px solid var(--select); outline-offset: -2px; z-index: 1; }
/* buttons inside cards */
#settings .set-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#settings .set-card button { padding: 6px 12px; border-radius: 7px; background: var(--chrome); border: 1px solid var(--line); color: var(--text); font-size: 12px; }
#settings .set-card button:hover:not(:disabled) { background: var(--chrome-2); }
@media (max-width: 640px) {
  #settings-body { grid-template-columns: 1fr; }
  #settings .settings-tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 10px; }
  #settings .settings-tabs::before { display: none; }
  #settings .set-themes { grid-template-columns: repeat(2, 1fr); }
}
/* ---- top bar, Logic layout (2026-11-16, branch top-bar-logic) ----
   Name far left; transport + position + BPM + key + loop/metro form one
   centred cluster (.t-transport, still centred by ui/transport.js); tools,
   the boxed view panel and the track-side switch sit right of centre. */
.brand { display: flex; flex-direction: column; justify-content: center; gap: 1px; line-height: 1.1; min-width: 0; }
.brand .brand-name { font-size: 15px; font-weight: 650; letter-spacing: 0; color: var(--on-chrome); max-width: 16rem; overflow: hidden; text-overflow: ellipsis; }
.brand .room { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.t-transport { display: flex; align-items: center; gap: 6px; }
.t-transport .tgroup { gap: 4px; }
.transport .lcd { font-size: 14px; padding: 6px 10px; }
/* Record: just a big red circle. Lit = recording armed, with a ring. */
.transport #pl-record.t-rec { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--rec) 55%, transparent) !important; background: var(--rec) !important; display: inline-grid; place-items: center; }
.transport #pl-record.t-rec:hover:not(:disabled) { background: var(--rec-dot) !important; border-color: var(--rec-dot) !important; }
.transport #pl-record.t-rec.on { background: var(--rec-dot) !important; border-color: var(--on-chrome) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--rec-dot) 35%, transparent); }
.transport .t-rec .record-icon { display: none; }
/* Tools in the header: a quiet strip, selected tool gets an inset chip that
   stays clear of the bar edges. */
.transport .t-tools { gap: 2px; padding: 3px; border-radius: var(--radius-sm); align-self: center; }
.transport .t-tools .pl-tool { width: 34px; height: 32px; border-radius: var(--radius-sm); }
.transport .t-tools .pl-tool .ic { width: 17px; height: 17px; }
.transport .t-tools .pl-tool.on { background: var(--chrome-2); color: var(--on-chrome); border-color: var(--chrome-line); box-shadow: inset 0 -2px var(--select); }
/* View buttons: one boxed panel, icon over label, big targets (FL-style). */
.transport .view-switch { gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--chrome-line); border-radius: var(--radius); }
.transport .vbtn { flex-direction: column; justify-content: center; gap: 3px; width: 58px; height: 42px; padding: 0; border-color: transparent; }
.transport .vbtn .ic { width: 18px; height: 18px; }
.vbtn .vlabel { font-size: 10.5px; }
/* Below 2200 px the right side is too wide for a true centre: go icon-only so
   Play/Stop/Rec stays dead-centre down to ~1600 px (Avi, 2026-11-16). */
@media (max-width: 2199px) {
  .transport .vbtn { width: 36px; height: 34px; }
  .transport .vbtn .vlabel { display: none; }
  .transport .t-tools .pl-tool { width: 30px; height: 30px; }
}
/* Track controls side: icon shows which side the headers are on. */
.transport .t-side { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }
.t-side .ic { width: 17px; height: 17px; }
.t-side:not(.left) .side-bar { transform: translateX(7.1px); }
/* Bigger avatars. */
.transport .avatar { width: 30px; height: 30px; font-size: 12px; }
#users li { margin-left: -6px; }

/* Automation lanes (Ableton): on/off LED per lane; off = grey, only for you. */
.ph-auto .ph-size { z-index: 2; }
.ph-auto-led { width: 14px; min-width: 14px; padding: 0 !important; }
.ph-auto-led::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); vertical-align: middle; }
.ph-auto-led.off::before { background: var(--muted-2); }
/* ---------- Device kit (Device RTT redesign, ui/devkit.js; mockup cook/mockups/r03-rtt-themed.html) ----------
   Every color is a theme token: bezel = --bg darkened, screen = --panel,
   tile = --panel-2, knob = --panel-3, text = --text / --muted; the one live
   color is --accent, and only on live things (waveforms, GR, analyzer, LEDs). */
:root { --bezel: color-mix(in srgb, var(--bg) 70%, #000); --rtt-font: 'Michroma', 'Space Grotesk', sans-serif; }
.dev { background: var(--bezel); border: 0; border-radius: 14px; padding: 6px; gap: 6px; }
.dev .dvh { height: 26px; background: var(--panel); border: 0; border-radius: 9px; font-family: var(--rtt-font); font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; gap: 8px; }
.dev .dev-name { font-weight: 400; }
.dev .dev-pwr { width: 7px; height: 7px; border: 0; background: var(--line); }
.dev .dev-pwr.on { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.dev .dev-pwr.on:hover:not(:disabled) { background: var(--accent); }
.dev.folded .dvh { border-radius: 9px; }
.dev .dvb { padding: 0; border-radius: 9px; }
.dev .dvb:not(.rtt) { background: var(--panel); padding: 8px; }
.dmeter { margin-top: 20px; }
.rtt-chips { display: flex; align-items: center; gap: 4px; min-width: 0; }
.rtt-chip, .rtt-sel.chipsel {
  font-family: var(--rtt-font); font-size: 9px; letter-spacing: 0.3px; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px; background: transparent; color: var(--muted-2); cursor: pointer; white-space: nowrap; line-height: 1.4;
}
.rtt-chip:hover:not(:disabled) { background: transparent; color: var(--text); border-color: var(--muted); }
.rtt-chip.on, .rtt-chip.on:hover:not(:disabled) { border-color: var(--text); color: var(--text); }
.rtt-chip.info { cursor: default; border-color: var(--text); color: var(--text); }
.rtt-chiplbl { font-size: 9px; color: var(--muted); }
.rtt-sel.chipsel { padding: 1px 6px; height: auto; max-width: 110px; }
.rtt-sel.chipsel[hidden] { display: none; }
.rtt-sel.chipsel:disabled { opacity: 0.4; }
.rtt-ico { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 0 3px; cursor: pointer; }
.rtt-ico:hover:not(:disabled) { color: var(--text); background: transparent; }
/* Bodies: a row of blocks at the card's fixed height (devicefit widens the card). */
.dvb.rtt { display: flex; gap: 6px; columns: auto; column-width: auto; align-items: stretch; }
.dvb.rtt > * { margin: 0; flex: none; }
.rtt-scr { position: relative; background: var(--panel); border-radius: 9px; overflow: hidden; min-height: 0; }
.rtt-scr .rtt-cv, .fx-body.rtt canvas.rtt-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: transparent; border: 0; border-radius: 0; cursor: crosshair; }
.w86 { width: 86px; } .w90 { width: 90px; } .w190 { width: 190px; } .w200 { width: 200px; } .w240 { width: 240px; } .w250 { width: 250px; } .w340 { width: 340px; } .w520 { width: 520px; }
.rtt-read { position: absolute; font-family: var(--rtt-font); font-size: 16px; color: var(--text); pointer-events: none; line-height: 1; }
.rtt-read small { display: block; font-size: 7px; color: var(--muted); margin-top: 3px; letter-spacing: 0.4px; }
.rtt-read.bl { left: 10px; bottom: 8px; }
.rtt-read.tr { right: 10px; top: 8px; text-align: right; }
.rtt-grid { display: grid; gap: 6px; min-height: 0; }
.rtt-grid.c2 { grid-template-columns: 1fr 1fr; } .rtt-grid.c3 { grid-template-columns: repeat(3, 1fr); } .rtt-grid.c4 { grid-template-columns: repeat(4, 1fr); } .rtt-grid.c5 { grid-template-columns: repeat(5, 1fr); }
.rtt-grid.r2 { grid-template-rows: 1fr 1fr; } .rtt-grid.r3 { grid-template-rows: repeat(3, 1fr); } .rtt-grid.r4 { grid-template-rows: repeat(4, 1fr); }
.rtt-grid.eqg { grid-template-rows: 26px 1fr 1fr; }
.rtt-grid.clg { grid-template-rows: 1fr 1fr 26px; }
.rtt-grid.dkg { grid-template-rows: 26px 1fr 1fr; }
.rtt-grid .span2 { grid-column: 1 / -1; } .rtt-grid .span3 { grid-column: 1 / -1; }
.rtt-tile {
  position: relative; background: var(--panel-2); border-radius: 9px; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-family: var(--rtt-font); font-size: 7.5px; letter-spacing: 0.4px; color: var(--muted); text-transform: uppercase;
}
.rtt-tile[hidden] { display: none; }
.rtt-tile.dim { opacity: 0.4; }
.rtt-led { position: absolute; top: 6px; left: 50%; margin-left: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.rtt-led.on { background: var(--accent); box-shadow: 0 0 5px var(--accent); }
.rtt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); flex: none; }
.rtt-tile .knob { margin-top: 6px; gap: 2px; }
.rtt-tile .knob-label { order: 3; font-family: var(--rtt-font); font-size: 7.5px; color: var(--muted); letter-spacing: 0.4px; }
.rtt-tile .knob-text { order: 2; font-family: var(--rtt-font); font-size: 8px; color: var(--text); }
/* Device polish (2026-11-19): the kit knob is a solid disc inside a thin
   value arc, so the setting reads at a glance. The arc is text-coloured
   (amber stays for sound); hover lightens the disc, mouse only. */
.knob-rtt .knob-disc { fill: var(--panel-3); transition: fill 120ms ease; }
.knob-rtt .knob-hub { fill: var(--panel-2); }
.knob-rtt .knob-ptr { stroke: var(--text); stroke-width: 2.4; stroke-linecap: round; }
:root .knob-rtt .knob-track { stroke: var(--panel-3); stroke-width: 2.5; }
:root .knob-rtt .knob-val { stroke: var(--text); stroke-width: 2.5; }
@media (hover: hover) and (pointer: fine) {
  .knob-rtt .knob-dial:hover .knob-disc { fill: color-mix(in srgb, var(--panel-3) 82%, var(--text)); }
}
.knob-rtt .knob-dial:has(input:focus) .knob-disc { fill: color-mix(in srgb, var(--panel-3) 74%, var(--text)); }
.rtt-ttile { gap: 4px; padding: 4px; }
.rtt-ttile .rtt-led { top: 6px; }
.rtt-tl { font-size: 7px; }
.rtt-stack { display: grid; gap: 2px; width: 100%; }
.rtt-sel { font-family: var(--rtt-font); font-size: 8px; color: var(--text); background: transparent; border: 0; text-transform: uppercase; text-align: center; width: 100%; padding: 0; }
.rtt-sel[hidden] { display: none; }
.rtt-seg { display: flex; gap: 2px; background: var(--panel-2); border-radius: 9px; padding: 3px; min-height: 0; }
.rtt-seg button { flex: 1; min-width: 0; font-family: var(--rtt-font); font-size: 8px; height: auto; min-height: 20px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); padding: 0 2px; white-space: nowrap; }
.rtt-seg button:hover:not(:disabled) { background: transparent; color: var(--text); }
.rtt-seg button.on, .rtt-seg button.on:hover:not(:disabled) { background: var(--panel-3); color: var(--text); }
.rtt-tile .rtt-chip { font-size: 8px; padding: 2px 7px; }
/* The expanded EQ editor (ui/eqbig.js). */
.eqb-back { position: fixed; inset: 0; z-index: 900; background: color-mix(in srgb, var(--bg) 60%, transparent); display: grid; place-items: center; }
.rtt-card { background: var(--bezel); border-radius: 14px; padding: 6px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.rtt-bar { height: 34px; background: var(--panel); border-radius: 9px; display: flex; align-items: center; gap: 8px; padding: 0 10px; font-family: var(--rtt-font); font-size: 10px; letter-spacing: 0.5px; }
.rtt-bar b { font-weight: 400; }
.rtt-bar .sp { flex: 1; }
.eqb-name { color: var(--muted); font-family: var(--sans, inherit); font-size: 11px; text-transform: none; }
.eqb { width: min(1192px, calc(100vw - 32px)); height: min(480px, calc(100vh - 64px)); }
.eqb-scr { flex: 1; }
.eqb-dock { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--bezel); border-radius: 14px; padding: 6px 10px; display: flex; gap: 8px; align-items: center; height: 70px; font-family: var(--rtt-font); font-size: 10px; }
.eqb-dock[hidden] { display: none; }
.eqb-dock .rtt-tile { width: 64px; align-self: stretch; }
.eqb-shapes { width: 220px; }
/* Sampler on the kit (ui/sampler.js). */
.smp.rtt { display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 0; }
.smp.rtt .smp-top { flex: none; height: 22px; }
.smp.rtt .smp-top .sp { flex: 1; }
.smp.rtt .smp-tabs { display: flex; gap: 4px; }
.smp.rtt .smp-name { font-family: var(--sans); font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.smp-main { flex: 1; min-height: 0; display: flex; gap: 6px; }
.smp.rtt .smp-wavebox { width: 330px; flex: none; height: auto; border: 0; }
.smp.rtt .smp-empty { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--rtt-font); font-size: 8px; color: var(--muted); text-transform: uppercase; }
.smp.rtt .smp-empty[hidden] { display: none; }
.smp-tiles { grid-template-columns: repeat(8, 58px); grid-template-rows: 1fr 1fr; }
.smp-rootbox { right: 12px; top: 8px; pointer-events: auto; }
.rtt-rootsel { appearance: none; -webkit-appearance: none; background: transparent; border: 0; padding: 0; font-family: var(--rtt-font); font-size: 16px; color: var(--text); text-align: right; cursor: pointer; height: auto; }
.dev-src:has(.smp.rtt) .dvb { background: transparent; padding: 0; columns: auto; column-width: auto; }

/* ---------- sky themes: background canvas, light wash, glass (ui/sky/engine.js) ----------
   One half-resolution canvas behind everything (z-index -1 paints above the
   body's propagated background) and a static radial wash over the UI; the
   engine shows both only on a sky theme with skyOn. Surfaces mix their own
   token with transparent by a --glass-* amount: Studio's are 100%, so they
   compute to the same colour and Studio is unchanged. The Editor (piano roll,
   audio editor) and floating windows stay opaque. ADR 2026-11-15_cosmos-themes. */
#sky { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; display: none; pointer-events: none; filter: brightness(var(--sky-bright, 1)); } /* Sky brightness (prefs skyBright) */
#sky-wash {
  position: fixed; inset: 0; z-index: 5; display: none; pointer-events: none;
  background: radial-gradient(circle at var(--wash-x) var(--wash-y), color-mix(in srgb, var(--sky-wash) var(--wash-a), transparent) 0, transparent var(--wash-r));
}
header.transport { padding-left: max(16px, var(--sky-gutter)); } /* Cosmos: 112px keeps text off the moon */
.browser, .dock { background: color-mix(in srgb, var(--panel) var(--glass-panel), transparent); }
.inspector { background: color-mix(in srgb, var(--panel-2) var(--glass-panel), transparent); }
.strip { background: color-mix(in srgb, var(--panel-2) var(--glass-panel), transparent); }
.pl-toolbar { background: color-mix(in srgb, var(--panel) var(--glass-chrome), transparent); }
.pl-heads { background: color-mix(in srgb, var(--panel) var(--glass-heads), transparent); }
/* Plain rows show .pl-heads' glass (one layer, not two). The :not() list keeps
   this (0,2,0) rule from beating the state rules it ties with: .sel (--row-sel),
   .group (its tint) and .ph-auto (automation/take/song rows keep --lane-bg like
   their canvas lane); .song-off is listed too, and background-color (not the
   shorthand) leaves its stripes (background-image) alone. */
.ph:not(.ph-auto, .sel, .group, .song-off) { background-color: transparent; }
#pane-roll { background: var(--panel); }

/* ---------- sky themes: the header is bare sky (ui/sky/cosmos.js) ----------
   On a sky theme the transport header paints nothing, so the Cosmos moon
   (fixed top-left, 50 / 24 px, radius 42) shows through, and its text keeps
   to the two inks the plan allows on bare sky: --text and --muted-2. Its
   controls keep their --chrome-2 chips. --sky-gutter (112 px on Cosmos)
   keeps everything off the disc. Studio and Warm Dark are not matched, so
   they are unchanged. */
:root:is([data-theme='cosmos'], [data-theme='aurora'], [data-theme='deepsea'], [data-theme='raincity'], [data-theme='fireflies']) header.transport {
  --on-chrome: var(--text);
  --chrome-muted: var(--muted-2);
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none; /* bare sky means no glass blur either: it smeared the Cosmos moon beside ☰ (audit 2026-11-26) */
}
/* The 112 px gutter costs the header ~96 px, so sky themes drop the view
   buttons' labels (icons + tips stay) and narrow them to the 40 px the
   top bar uses below 1280 px, from 1600 px down; the right end (Chat,
   Share, status) stays on screen. The width matters since the top-bar
   redesign: the boxed view buttons are a fixed 58 px, so hiding a label
   alone frees nothing. */
@media (max-width: 1600px) {
  :root:is([data-theme='cosmos'], [data-theme='aurora'], [data-theme='deepsea'], [data-theme='raincity'], [data-theme='fireflies']) .vbtn .vlabel { display: none; }
  :root:is([data-theme='cosmos'], [data-theme='aurora'], [data-theme='deepsea'], [data-theme='raincity'], [data-theme='fireflies']) header.transport .vbtn { width: 40px; }
}
/* Below 1280 px Studio has already dropped those labels, so the sky themes
   win the gutter back from spacing: tighter header / group gaps and view
   buttons 36 px instead of 40 (the top bar's view buttons are fixed-width,
   so their padding no longer moves anything); every other control keeps
   its size and text. */
@media (max-width: 1280px) {
  :root:is([data-theme='cosmos'], [data-theme='aurora'], [data-theme='deepsea'], [data-theme='raincity'], [data-theme='fireflies']) header.transport { gap: 0.2rem; }
  :root:is([data-theme='cosmos'], [data-theme='aurora'], [data-theme='deepsea'], [data-theme='raincity'], [data-theme='fireflies']) header.transport .tgroup { gap: 0.15rem; }
  :root:is([data-theme='cosmos'], [data-theme='aurora'], [data-theme='deepsea'], [data-theme='raincity'], [data-theme='fireflies']) header.transport .vbtn { width: 36px; }
  /* Transport docked in the bar (the default since 2026-11-17): nothing in
     the bar is flexible, so the gutter would push the right end ~80 px
     further off-screen than Studio's. Drop two labels (the BPM box and the
     Chat icon carry their own tips) and tighten Share, Capture and Loop. The input
     and the unread badge set their own font size, so font-size 0 only hides
     the bare label text. */
  :root:is([data-theme='cosmos'], [data-theme='aurora'], [data-theme='deepsea'], [data-theme='raincity'], [data-theme='fireflies']) body:not(.transport-float) header.transport :is(.tfield, #t-chat) { font-size: 0; gap: 0; }
  :root:is([data-theme='cosmos'], [data-theme='aurora'], [data-theme='deepsea'], [data-theme='raincity'], [data-theme='fireflies']) body:not(.transport-float) header.transport #invite { padding-inline: 0.45rem; }
  :root:is([data-theme='cosmos'], [data-theme='aurora'], [data-theme='deepsea'], [data-theme='raincity'], [data-theme='fireflies']) body:not(.transport-float) header.transport :is(.t-capture, #t-loop) { padding-inline: 0.3rem; }
}
:root:is([data-theme='cosmos'], [data-theme='aurora'], [data-theme='deepsea'], [data-theme='raincity'], [data-theme='fireflies']) header.transport .role-pill { color: var(--muted-2); }

/* Theme picker (Settings → Appearance; ui/settings.js themeSection, model in
   ui/themepicker.js): one row per theme, its colour-variant dots, Sky on/off
   and the Cosmos planet. The dot colours are swatch tokens: each is that
   variant's scene colour from scripts/themes-data.mjs (--cosmos-line for
   Cosmos, --scene-a for the rest; test/settings-themes.test.js keeps them in
   step). The sky blocks are :root-scoped, so a dot can't borrow them. */
:root {
  --swatch-cosmos-midnight: #9DB0FF;
  --swatch-cosmos-nebula: #e99dff;
  --swatch-cosmos-eclipse: #C9CCD8;
  --swatch-aurora-boreal: #2EE6A6;
  --swatch-aurora-violet: #B58CFF;
  --swatch-aurora-ice: #7FD8FF;
  --swatch-deepsea-abyss: #2FB8C8;
  --swatch-deepsea-lagoon: #3FD6B0;
  --swatch-deepsea-midnight: #7A6CFF;
  --swatch-raincity-neon: #FF3D9A;
  --swatch-raincity-cyber: #19E6C1;
  --swatch-raincity-ultraviolet: #7A5CFF;
  --swatch-fireflies-meadow: #C8F27A;
  --swatch-fireflies-moonlit: #BFE8FF;
  --swatch-fireflies-blossom: #FFB3D6;
}
.set-themes { display: flex; flex-direction: column; gap: 0.3rem; }
.set-theme-row { display: flex; align-items: center; gap: 0.75rem; min-height: 28px; }
.set-theme-row > label { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; min-width: 9rem; }
.set-theme-row input { accent-color: var(--accent); } /* Warm Dark, like its other Settings radios */
:root:not([data-theme='dark']) .set-theme-row input { accent-color: var(--select); } /* amber means sound only (as the set-radios rule above) */
.set-theme-dots { display: flex; gap: 0.4rem; }
.set-theme-dot {
  width: 18px; height: 18px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--dot); border: 2px solid var(--panel-3); box-shadow: 0 0 0 1px var(--line);
  transition: border-color 120ms ease-out, box-shadow 120ms ease-out, transform 120ms ease-out;
}
.set-theme-dot[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--select); }
.set-theme-dot:active { transform: scale(.97); }
.set-theme-dot:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
/* The colour variants as named presets under Main colour / Background (mockup 2026-11-18_main-colour-picker.html A). */
.set-presets { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 2px 0 6px; }
.set-presets[hidden] { display: none; }
.set-preset { display: inline-flex; align-items: center; gap: 0.4rem; padding: 3px 9px 3px 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 12px; cursor: pointer; }
.set-preset[aria-pressed='true'] { border-color: var(--select); box-shadow: 0 0 0 1px var(--select); }
.set-preset:disabled { opacity: 0.5; cursor: default; }
.set-preset:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
.set-preset-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 1px var(--line); }
.set-planet { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.set-planet select { background: var(--input-bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.2rem 0.4rem; }
.set-planet-lock { color: var(--muted-2); }
@media (hover: hover) and (pointer: fine) {
  .set-theme-dot:hover { border-color: var(--muted-2); }
}
/* ---- top bar, Logic layout (2026-11-16, branch top-bar-logic) ----
   Name far left; transport + position + BPM + key + loop/metro form one
   centred cluster (.t-transport, still centred by ui/transport.js); tools,
   the boxed view panel and the track-side switch sit right of centre. */
.brand { display: flex; flex-direction: column; justify-content: center; gap: 1px; line-height: 1.1; min-width: 0; }
.brand .brand-name { font-size: 15px; font-weight: 650; letter-spacing: 0; color: var(--on-chrome); max-width: 16rem; overflow: hidden; text-overflow: ellipsis; }
.brand .room { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.t-transport { display: flex; align-items: center; gap: 6px; }
.t-transport .tgroup { gap: 4px; }
.transport .lcd { font-size: 14px; padding: 6px 10px; }
/* Record: just a big red circle. Lit = recording armed, with a ring. */
.transport #pl-record.t-rec { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--rec) 55%, transparent) !important; background: var(--rec) !important; display: inline-grid; place-items: center; }
.transport #pl-record.t-rec:hover:not(:disabled) { background: var(--rec-dot) !important; border-color: var(--rec-dot) !important; }
.transport #pl-record.t-rec.on { background: var(--rec-dot) !important; border-color: var(--on-chrome) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--rec-dot) 35%, transparent); }
.transport .t-rec .record-icon { display: none; }
/* Tools in the header: a quiet strip, selected tool gets an inset chip that
   stays clear of the bar edges. */
.transport .t-tools { gap: 2px; padding: 3px; border-radius: var(--radius-sm); align-self: center; }
.transport .t-tools .pl-tool { width: 34px; height: 32px; border-radius: var(--radius-sm); }
.transport .t-tools .pl-tool .ic { width: 17px; height: 17px; }
.transport .t-tools .pl-tool.on { background: var(--chrome-2); color: var(--on-chrome); border-color: var(--chrome-line); box-shadow: inset 0 -2px var(--select); }
/* View buttons: one boxed panel, icon over label, big targets (FL-style). */
.transport .view-switch { gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--chrome-line); border-radius: var(--radius); }
.transport .vbtn { flex-direction: column; justify-content: center; gap: 3px; width: 58px; height: 42px; padding: 0; border-color: transparent; }
.transport .vbtn .ic { width: 18px; height: 18px; }
.vbtn .vlabel { font-size: 10.5px; }
@media (max-width: 1280px) { .transport .vbtn { width: 40px; } }
/* Track controls side: icon shows which side the headers are on. */
.transport .t-side { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }
.t-side .ic { width: 17px; height: 17px; }
.t-side:not(.left) .side-bar { transform: translateX(7.1px); }
/* Bigger avatars. */
.transport .avatar { width: 30px; height: 30px; font-size: 12px; }
#users li { margin-left: -6px; }

/* Automation lanes (Ableton): on/off LED per lane; off = grey, only for you. */
.ph-auto .ph-size { z-index: 2; }
.ph-auto-led { width: 14px; min-width: 14px; padding: 0 !important; }
.ph-auto-led::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); vertical-align: middle; }
.ph-auto-led.off::before { background: var(--muted-2); }

/* Automation Arm (ui/autorec.js): lane heads read as recording */
body.auto-armed .ph-auto .ph-color.auto { background: var(--rec); }
body.auto-armed .ph-auto-label { color: var(--rec); }
.pvw-c-deleted .pvw-c-text { color: var(--muted); font-style: italic; }

/* First-room tour (ui/tour.js; UI adoption step 10, mockup #tour): a dim wash, one --fill ring,
   one solid card (not glass): "Step 1 of 3", the title, the text, Skip and Next pills. Tokens only. */
.tour { position: fixed; inset: 0; z-index: 9000; pointer-events: none; }
.tour-ring { position: fixed; border: 2px solid var(--fill); border-radius: 14px; box-shadow: 0 0 0 100vmax var(--scrim); transition: left .4s var(--ease-out, cubic-bezier(.2, .8, .2, 1)), top .4s var(--ease-out, cubic-bezier(.2, .8, .2, 1)), width .4s var(--ease-out, cubic-bezier(.2, .8, .2, 1)), height .4s var(--ease-out, cubic-bezier(.2, .8, .2, 1)); }
.tour-card { position: fixed; width: min(300px, calc(100vw - 32px)); box-sizing: border-box; padding: 16px; background: var(--panel-3); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); pointer-events: auto; font: 400 13px / 1.5 var(--sans, system-ui); transition: left .4s var(--ease-out, cubic-bezier(.2, .8, .2, 1)), top .4s var(--ease-out, cubic-bezier(.2, .8, .2, 1)); }
.tour-count { display: block; font: 400 10px / 1.4 'Michroma', var(--sans, system-ui); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.tour-title { display: block; margin: 4px 0 6px; font-size: 15px; font-weight: 600; }
.tour-text { margin: 0 0 12px; color: var(--muted-2); }
.tour-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-btns { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tour-link { all: unset; box-sizing: border-box; cursor: pointer; height: 30px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: 12px; font-weight: 500; }
.tour-link:hover { background: var(--chrome-2, var(--panel-2)); }
.tour-link:focus-visible { outline: 2px solid color-mix(in srgb, var(--fill) 70%, transparent); outline-offset: 2px; }
.tour-back { border-color: transparent; padding: 0 6px; color: var(--muted-2); }
.tour-back[hidden] { display: none; }
.tour-next { all: unset; box-sizing: border-box; cursor: pointer; height: 30px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--fill); color: var(--on-fill); font-weight: 600; font-size: 12px; }
.tour-next:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tour-ring, .tour-card { transition: none; } }

/* ---------- DAW look: glass panels + the floating transport (session D) ----------
   The room takes the dashboard's look (dash-nav.css): panels are glass with 10px
   corners and a 1px --line border, 8px apart, over the sky; labels in mono caps;
   a selected row gets a light wash and a thin accent bar on its inside edge.
   Tokens only: --glass-* (100% in Studio, see-through on the sky themes), --line,
   --panel*. The Transport pref (ui/transportpill.js) floats the transport
   group as a draggable pill or docks it in the top bar. ADR
   2026-11-16_daw-glass-look. */
:root { --panel-radius: 10px; --gap: 8px; }
body { padding: 0 var(--gap) var(--gap); }
header.transport {
  margin: var(--gap) 0;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: color-mix(in srgb, var(--chrome) var(--glass-chrome), transparent);
  backdrop-filter: blur(10px);
}
header.transport.drop-target { box-shadow: inset 0 0 0 2px var(--accent); }
.workspace { gap: var(--gap); }
.browser, .playlist, .dock, .inspector, .zone-left, .zone-right {
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  overflow: hidden;
}
.inspector { margin-right: var(--gap); }
.playlist { background: color-mix(in srgb, var(--panel) var(--glass-panel), transparent); }
.pl-toolbar { border-radius: var(--panel-radius) var(--panel-radius) 0 0; background: color-mix(in srgb, var(--panel) var(--glass-chrome), transparent); }
.pl-title, .br-head { font-family: var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
/* Selected rows: light wash + a thin accent bar on the inside edge (the dashboard menu). */
.br-cat.on, .br-cat.on:hover { box-shadow: inset 2px 0 0 var(--accent); }
.pl-body.right .ph.sel { box-shadow: inset 2px 0 0 var(--select); } /* C-452: white edge; amber = sound only */
.pl-body.left .ph.sel { box-shadow: inset 2px 0 0 var(--select); }

/* The floating transport pill. It carries .transport so every control keeps the
   top bar's styling; only the container differs. */
.tpill {
  position: fixed; z-index: 40;
  display: flex; align-items: center; gap: 0.4rem;
  height: 44px; padding: 0 12px 0 4px;
  border: 1px solid var(--line); border-radius: 22px;
  background: color-mix(in srgb, var(--chrome) var(--glass-chrome), transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  overflow: visible; touch-action: none;
}
.tpill[hidden] { display: none; }
.tpill.dragging { outline: 1px solid var(--select); box-shadow: 0 14px 34px color-mix(in srgb, var(--bg) 60%, transparent); }
.tpill .t-transport, .tpill.t-flow .t-transport { position: static; transform: none; margin: 0; }
.tp-grip { display: grid; place-items: center; width: 16px; height: 28px; border-radius: 6px; color: var(--chrome-muted); cursor: grab; letter-spacing: -2px; font-size: 12px; user-select: none; touch-action: none; }
.tp-grip:hover { color: var(--on-chrome); background: color-mix(in srgb, var(--on-chrome) 8%, transparent); }
.tpill.dragging .tp-grip { cursor: grabbing; }
header.transport .t-transport > .tp-grip { margin-right: 2px; }
/* Tools and panel buttons moved into the playlist toolbar while the transport floats. */
.tbar-tools { display: flex; align-items: center; gap: 0.6rem; flex: none; margin-left: auto; background: none; border: 0; padding: 0; overflow: visible; position: static; min-width: 0; }
.tbar-tools > #pl-tools { order: 0; }
@media (prefers-reduced-motion: reduce) { .tpill { transition: none; } }

/* Header: the session name never gets covered, and the right-hand cluster
   (people, Chat, Share) is pinned to the right edge: everything that comes and
   goes (status, Push, Asks, Live, role pills, the transport) sits to its left. */
header.transport > .brand { flex: 0 1 auto; min-width: 6.5rem; }
header.transport > .brand .room { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
header.transport > #status { order: 19; min-width: 6.5em; text-align: right; }
header.transport > #status:not([data-ok]) { flex-shrink: 0; } /* a problem's words never squeeze under the avatar; the bar scrolls instead */
header.transport > :is(.people, #t-chat, #t-bell, #invite) { order: 20; } /* #t-bell: C-477, beside Chat */
/* Playlist tools and the panel buttons are two groups, not one. */
.tbar-tools { gap: 2rem; }
.tbar-tools > #t-view { padding-left: 1.25rem; border-left: 1px solid var(--line); }
/* Snap spots shown while dragging the pill. */
.tp-ghosts { position: fixed; inset: 0; z-index: 39; pointer-events: none; }
.tp-ghost { position: fixed; border: 1px dashed var(--line); border-radius: 22px; background: color-mix(in srgb, var(--text) 3%, transparent); }
.tp-ghost.on { border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
/* Top-bar mode carries the most controls: below 1720 px drop the status text and tighten the gaps so
   less of it scrolls; the name is never covered, whatever is left scrolls (header overflow-x). */
@media (max-width: 1720px) {
  header.transport { gap: 0.4rem; }
}
@media (max-width: 1500px) {
  header.transport { gap: 0.25rem; }
  header.transport .tgroup { gap: 0.15rem; }
  body:not(.transport-float) header.transport .lcd { min-width: 6rem; padding-inline: 0.4rem; }
}

/* ---------- simplified top bar (ui/barmenus.js, pref topBarSimple) ---------- */
.bar-menus { display: none; }
body.bar-simple .bar-menus { display: flex; }
body.bar-simple :is(#t-v-roll, #t-v-rack, #t-v-mixer, #t-v-devices, #t-rec-more) { display: none; }
.bm-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0.3rem 0.45rem; }
.bm-caret { font-size: 9px; color: var(--chrome-muted); }
body.bar-simple #status[data-ok] { font-size: 0; min-width: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--meter-lo); flex: none; }
.bar-menu {
  position: fixed; z-index: 60; min-width: 200px; padding: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--panel-radius);
  box-shadow: var(--shadow); color: var(--text);
}
.bar-menu button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; height: 30px; padding: 0 8px; border-radius: 6px; color: var(--muted-2); cursor: pointer; }
.bar-menu button:hover, .bar-menu button:focus-visible { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.bar-menu button:focus-visible { outline: 2px solid var(--select); outline-offset: -2px; }
.bar-menu button.on { color: var(--text); box-shadow: inset 2px 0 0 var(--accent); background: linear-gradient(90deg, color-mix(in srgb, var(--text) 14%, transparent), color-mix(in srgb, var(--text) 3%, transparent)); }
.bar-menu svg { width: 16px; height: 16px; flex: none; }
.bm-label { flex: 1; font-size: 12px; }
.bm-hint { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
/* ---------- pop-out arrow on panel tabs + Channel Rack window fit (panel-detach) ----------
   The arrow sits right after its tab (bottom strip and side zones) and floats the
   panel; double-click on the tab does the same. The rack window's max size is set
   by main.js (fitRackWindow), so its rows must not stretch to the window width. */
.dock-tabs .tab-pop, .zone-tabs .tab-pop { display: inline-flex; align-items: center; justify-content: center; align-self: center; flex: none; width: 20px; height: 20px; margin: 0 4px 0 -6px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); opacity: 0.55; cursor: pointer; }
.dock-tabs .tab-pop:hover, .zone-tabs .tab-pop:hover, .dock-tabs .tab-pop:focus-visible, .zone-tabs .tab-pop:focus-visible { opacity: 1; color: var(--text); background: var(--panel-2); }
.dock-tabs .tab-pop[hidden] { display: none; }
.floating-panel .rack .rk-row { min-width: 0; }
/* A right-click menu opens over a floating panel (panels start at z 90 and rise with every click). */
.ctx-menu { z-index: 850; }
/* The notice pill (undo toast) shows over an open context menu (audit playlist UX 9). */
.notice { z-index: 870; }

/* Channel Rack bar pager (one bar of steps at a time). */
.rk-pager { display: inline-flex; align-items: center; gap: 4px; }
.rk-pager[hidden] { display: none; }

/* The Tuner opens from the Key chip (Tuner tab) in the simplified bar. */
body.bar-simple #t-tuner { display: none; }

/* Playlist minimap (roadmap #20): a whole-song overview in the empty middle of the playlist toolbar. */
#pl-minimap { flex: 100 1 120px; min-width: 120px; height: 28px; align-self: center; display: block; touch-action: none; cursor: pointer; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 4px; margin: 0 8px; }
#pl-minimap[hidden] { display: none; }

/* Note Tools panel (roadmap #23, ui/notetools.js). Tokens only. */
.nt-panel { min-width: 240px; }
.nt-row { display: flex; align-items: center; gap: 0.5rem; }
.nt-row .foot-label { width: 5.2rem; flex: none; }
.nt-range { flex: 1; min-width: 0; accent-color: var(--select); }
.nt-read, .nt-seed { font-family: var(--mono); font-size: 11px; color: var(--muted); min-width: 3.6rem; text-align: right; }
.nt-seed { text-align: left; flex: 1; }
.nt-drawrow { align-items: flex-start; }
.nt-draw { width: 100%; max-width: 220px; height: 56px; border: 1px solid var(--line); border-radius: 4px; touch-action: none; cursor: crosshair; }
.nt-count { font-size: 11px; color: var(--muted); }
.nt-actions { justify-content: flex-end; }
/* ---- toolbar customiser (roadmap §38; ui/toolbar.js) ---- */
.tb-off { display: none !important; }
.tb-pop { position: fixed; z-index: 60; width: min(320px, calc(100vw - 16px)); max-height: calc(100vh - 64px); overflow: auto; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; box-shadow: var(--pop-shadow); font-size: var(--fs-small); }
.tb-pop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tb-presets { display: flex; gap: 6px; margin-bottom: 8px; }
.tb-presets button.on { background: var(--select); color: var(--bg); }
.tb-group { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 6px 0 4px; }
.tb-group legend { font-size: var(--fs-small); color: var(--muted-2); padding-right: 6px; }
.tb-group .set-check { display: flex; gap: 6px; align-items: center; padding: 2px 0; }
.transport .toggle.autoarm.on, .toggle.autoarm.on { background: transparent; color: var(--rec); border-color: var(--rec); }

/* Background picker: a premium (locked) sky. */
#settings .set-premium { margin-left: 6px; padding: 0 6px; border: 1px solid var(--line); border-radius: 99px; font-size: 10px; color: var(--muted); }
#settings .set-theme-row:has(input:disabled) { opacity: 0.6; }

/* Settings → Appearance → Fine-tune / My looks (plan 2026-11-18_appearance-customisation.md). */
#settings .set-look-row[hidden] { display: none; }
#settings .set-look-row { display: grid; grid-template-columns: 11em 1fr; align-items: center; gap: 12px; margin: 6px 0; }
#settings .set-look-label { color: var(--muted-2); font-size: 12px; }
/* Motion #2: the sky-only rows ease in when a background is turned on. */
#settings .set-look-sky { transition: opacity 200ms cubic-bezier(0.23, 1, 0.32, 1), transform 200ms cubic-bezier(0.23, 1, 0.32, 1); }
@starting-style { #settings .set-look-sky { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { #settings .set-look-sky { transition-duration: 100ms; } @starting-style { #settings .set-look-sky { transform: none; } } }
#settings .set-looks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
#settings .set-look-item { display: flex; gap: 6px; align-items: center; }
#settings .set-look-use { flex: 1; text-align: left; }
/* Main colour slider: the track shows the colour wheel (a hue gradient is the control itself, not a theme colour). */
:root { --hue-wheel: linear-gradient(90deg, hsl(0 70% 60%), hsl(60 70% 60%), hsl(120 70% 60%), hsl(180 70% 60%), hsl(240 70% 60%), hsl(300 70% 60%), hsl(360 70% 60%)); /* the Main colour slider's track: the colour wheel itself, same in every theme */ }
#settings .set-hue { --range-grad: var(--hue-wheel); } /* the track is the colour wheel, no fill */
#settings .set-hue::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; }
#settings .set-hue::-moz-range-track { height: 8px; border-radius: 99px; }

/* ---------- DAW premium D: materials (plan 04-plans/2026-11-18_daw-premium-d-plan.md) ----------
   Direction D "Mix": the arrange side (top bar, transport, playlist, headers)
   is Hardware; the mix side (Mixer + Devices panes, [data-mat="ink"]) is
   Quiet Ink. Built only from theme tokens (no hex), so Studio, Warm Dark and
   every sky theme follow without new values in css/themes.css. Kept out of
   the first :root block on purpose: test/themescss.test.js makes every theme
   block repeat that block's names. Shadows are --bg mixes (no colour literals here; test/settings-themes scans this file). */
:root {
  --frame-gap: 4px;
  --r-panel: 6px;
  --r-ctl: 4px;
  --edge-hi: inset 0 1px 0 color-mix(in srgb, var(--text) 7%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--bg) 50%, transparent);
  --elev-1: 0 2px 0 color-mix(in srgb, var(--bg) 50%, transparent), 0 10px 30px -10px color-mix(in srgb, var(--bg) 80%, transparent);
  --ctl-bg: linear-gradient(180deg, var(--chrome-2), var(--panel-2));
  --ctl-edge: inset 0 1px 0 color-mix(in srgb, var(--text) 10%, transparent), 0 1px 0 color-mix(in srgb, var(--bg) 60%, transparent), 0 2px 4px color-mix(in srgb, var(--bg) 40%, transparent);
  --knob-cap: radial-gradient(circle at 40% 30%, color-mix(in srgb, var(--chrome-2) 64%, var(--text)), var(--panel-2) 55%, var(--bg) 75%);
  --meter-mid: color-mix(in oklch, var(--meter-lo), var(--meter-hi));
  --seg-gap: 2px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);
  --t-press: 120ms;
  --t-pop: 160ms;
  --t-panel: 220ms;
}
/* Quiet Ink: the mix side always ([data-mat]), the whole DAW when Settings →
   DAW look is Quiet Ink (:root[data-look], beats the :root Hardware block). */
[data-mat="ink"], :root[data-look="ink"] {
  --frame-gap: 0px;
  --r-panel: 0px;
  --edge-hi: none;
  --elev-1: none;
  --ctl-bg: transparent;
  --ctl-edge: inset 0 0 0 1px var(--line);
  --knob-cap: var(--panel);
  --seg-gap: 0px;
}

/* ---------- DAW premium D: Hardware frame + LCD (Task 2) ----------
   A soft top-light (a thin --text wash over the panel's own glass colour, so
   sky themes stay translucent: background-color is untouched) and a machined
   edge on the arrange-side panels. The sky header rule above sets the
   background shorthand at higher specificity, so bare sky keeps no wash. */
header.transport, .tpill, .pl-toolbar {
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--text) 4%, transparent), transparent 120px);
  box-shadow: var(--edge-hi);
}
.playlist, .browser, .inspector { box-shadow: var(--edge-hi), var(--elev-1); }
/* The position LCD: a sunken well, DM Mono, tabular, padding zeros dim. */
.transport .lcd, .tpill .lcd {
  display: inline-flex; align-items: baseline; justify-content: center;
  font: 400 20px/1 var(--mono); letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
  padding: 6px 10px; min-width: 0;
  background: var(--input-bg); color: var(--text);
  border-color: transparent;
  box-shadow: inset 0 1px 3px color-mix(in srgb, var(--bg) 60%, transparent), 0 1px 0 color-mix(in srgb, var(--text) 4%, transparent);
}
.lcd .lcd-lead { color: var(--muted); opacity: 0.55; }
.lcd .lcd-sep { color: var(--faint); margin: 0 1px; }
.transport .tfield input#t-bpm { font-family: var(--mono); font-variant-numeric: tabular-nums; background: var(--input-bg); box-shadow: inset 0 1px 2px color-mix(in srgb, var(--bg) 50%, transparent); }
@media (max-width: 1500px) {
  body:not(.transport-float) header.transport .lcd { font-size: 17px; padding-inline: 0.4rem; }
}

/* ---------- DAW premium D: track headers + calm record (Task 4) ----------
   Amber means sound only, so the on/off number badge goes neutral: on =
   raised (--panel-3, --text), off = flat and faint. M / S / arm that aren't
   pressed sit quieter until the mouse is on the row (mouse devices only). */
.ph-m { font: 500 var(--fs-small)/14px var(--mono) !important; }
.ph-m.on { background: var(--panel-3) !important; border-color: var(--line) !important; color: var(--text); box-shadow: var(--ctl-edge); }
.ph-m:not(.on) { background: transparent !important; color: var(--faint); }
@media (hover: hover) and (pointer: fine) {
  .ph :is(.ph-m, .ph-mute, .ph-s, .ph-arm):not(.on) { opacity: 0.72; transition: opacity var(--t-press) ease; }
  .ph:hover :is(.ph-m, .ph-mute, .ph-s, .ph-arm) { opacity: 1; }
}
/* Record: the size of the other transport buttons, a red dot; armed adds a red
   ring and the dot breathes (1.6 s). The button itself no longer blinks. */
.transport #pl-record.t-rec, .tpill #pl-record.t-rec {
  width: 30px; height: 28px; border-radius: var(--r-ctl);
  background: var(--ctl-bg) !important; border: 1px solid var(--chrome-line) !important;
  box-shadow: var(--ctl-edge); animation: none;
}
.transport #pl-record.t-rec:hover:not(:disabled) { background: var(--chrome-2) !important; border-color: var(--chrome-line) !important; }
.transport #pl-record.t-rec.on { background: var(--ctl-bg) !important; border-color: var(--rec) !important; box-shadow: var(--ctl-edge), 0 0 0 1px var(--rec); }
.transport .t-rec .record-icon { display: block; width: 11px; height: 11px; border-radius: 50%; background: var(--rec); font-size: 0; }
.transport .t-rec.on .record-icon { background: var(--rec-dot); animation: premium-breathe 1.6s ease-in-out infinite; }
@keyframes premium-breathe { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .transport .t-rec.on .record-icon { animation: none; } }

/* ---------- DAW premium D: Quiet Ink mixer strip (Task 5) ----------
   Shorter fader (45% of the strip) on the shared dB map with a scale, a real
   cap (30x16, colour line), a dB bubble while dragging, a name plate at the
   bottom. The fader input spans only FADER_TOP of the scale (+1.9 dB top),
   bottom-aligned, so its 16px cap centre sits at 8px + pos x (H - 16px) like
   the scale numbers and the meter (inset 8px). #pane-mixer is a size
   container so the row can take a share of the strip's height. */
#pane-mixer { container-type: size; }
[data-mat="ink"] .strip {
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: none;
}
[data-mat="ink"] .strip.master { border-color: var(--line); }
[data-mat="ink"] .strip.primary { box-shadow: 0 0 0 1px var(--text); }
[data-mat="ink"] .strip.drop-ok { box-shadow: inset 0 0 0 1px var(--select), inset 0 0 0 999px color-mix(in srgb, var(--select) 8%, transparent); }
/* The fader row grows to 45% of the strip (the pane is a size container;
   the strip is the pane less the mixer's 10px padding) and gives way down to
   80px in a short dock, so the name plate stays in view. */
/* The plate's row floors at its content (.sname clips, so its automatic minimum is 0). */
[data-mat="ink"] .strip { grid-template-rows: 87px 52px minmax(80px, calc(45cqh - 9px)) auto auto minmax(min-content, 1fr); }
[data-mat="ink"] .strip .fader-row { position: relative; min-height: 0; }
[data-mat="ink"] .strip .scale { position: relative; width: 20px; flex: none; user-select: none; container-type: size; }
/* A short fader keeps the numbers readable: -6 goes under ~140px, -24 under ~95px. */
@container (max-height: 140px) { [data-mat="ink"] .strip .scale span[data-db="-6"] { display: none; } }
@container (max-height: 95px) { [data-mat="ink"] .strip .scale span[data-db="-24"] { display: none; } }
[data-mat="ink"] .strip .scale span {
  position: absolute; right: 0;
  top: calc(8px + (1 - var(--p)) * (100% - 16px));
  transform: translateY(-50%);
  font: 400 var(--fs-small)/1 var(--mono); font-variant-numeric: tabular-nums;
  color: var(--faint);
}
[data-mat="ink"] .strip .fader-well { position: relative; width: 30px; flex: none; display: flex; flex-direction: column; justify-content: flex-end; }
[data-mat="ink"] .strip .fader {
  width: 30px; min-height: 0; flex: none;
  height: calc(var(--fader-top, 1) * (100% - 16px) + 16px);
  --range-fill: color-mix(in oklab, var(--c) 75%, var(--text));
}
[data-mat="ink"] .strip .fader::-webkit-slider-runnable-track { width: 4px; height: 100%; margin: 0 13px; }
[data-mat="ink"] .strip .fader::-moz-range-track { width: 4px; height: 100%; }
[data-mat="ink"] .strip .fader::-webkit-slider-thumb {
  width: 30px; height: 16px; margin: 0 0 0 -13px; border-radius: var(--r-ctl, 3px);
  background: linear-gradient(transparent 7px, color-mix(in oklab, var(--c) 80%, var(--text)) 7px 9px, transparent 9px) 6px 0 / calc(100% - 12px) 100% no-repeat, var(--knob-cap);
  box-shadow: inset 0 0 0 1px var(--line), 0 2px 6px color-mix(in srgb, var(--bg) 60%, transparent);
  transition: transform var(--t-press) var(--ease-out);
  cursor: grab;
}
[data-mat="ink"] .strip .fader::-moz-range-thumb {
  width: 30px; height: 16px; border-radius: var(--r-ctl, 3px);
  background: linear-gradient(transparent 7px, color-mix(in oklab, var(--c) 80%, var(--text)) 7px 9px, transparent 9px) 6px 0 / calc(100% - 12px) 100% no-repeat, var(--knob-cap);
  box-shadow: inset 0 0 0 1px var(--line), 0 2px 6px color-mix(in srgb, var(--bg) 60%, transparent);
  cursor: grab;
}
[data-mat="ink"] .strip .fader-row.dragging .fader::-webkit-slider-thumb { cursor: grabbing; }
[data-mat="ink"] .strip canvas.meter { height: auto; min-height: 0; margin: 8px 0; flex: none; }
/* Fixed, placed from the cap by ui/mixer.js (--bx/--by), so the strip's
   overflow: hidden can't cut it off (audit mix bug 3). */
[data-mat="ink"] .strip .fader-bubble {
  position: fixed; z-index: 30; left: var(--bx, -999px); top: var(--by, 0px);
  transform: translateY(-50%) scale(.94); transform-origin: left center;
  opacity: 0; pointer-events: none; white-space: nowrap;
  padding: 3px 6px; border-radius: 5px;
  background: var(--fill); color: var(--on-fill);
  font: 500 var(--fs-small)/1.2 var(--mono); font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--bg) 50%, transparent);
  transition: opacity var(--t-pop) ease, transform var(--t-pop) var(--ease-out);
}
[data-mat="ink"] .strip .fader-row.dragging .fader-bubble { opacity: 1; transform: translateY(-50%) scale(1); }
[data-mat="ink"] .strip .db { font: 500 12px/1 var(--mono); color: var(--muted-2); }
[data-mat="ink"] .strip .sname {
  align-self: end; width: 100%; box-sizing: border-box; text-align: center;
  padding: 4px 4px 3px; font-size: var(--fs-ui); font-weight: 600;
  border-bottom: 2px solid var(--c);
}
[data-mat="ink"] .strip.master .sname { border-bottom-color: var(--muted-2); }
[data-mat="ink"] .strip .ears { align-self: center; font-size: var(--fs-small); color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  [data-mat="ink"] .strip .fader-bubble { transition: opacity var(--t-pop) ease; transform: translateY(-50%); }
}

/* ---------- DAW premium D: ink knobs + device cards (Task 7) ----------
   Inside the Quiet Ink scope (Mixer, Devices): a thin track arc, a value arc
   in the strip colour (bipolar knobs grow out of 12 o'clock, knob.js), a
   plain cap and a 2 px pointer. The RTT device kit's solid donuts (.knob-rtt)
   keep their own look. :root raises these over the Studio .knob-val rule. */
:root [data-mat="ink"] .knob:not(.knob-rtt) .knob-track, :root[data-look="ink"] .knob:not(.knob-rtt) .knob-track { stroke: var(--panel-3); stroke-width: 2.5; }
:root [data-mat="ink"] .knob:not(.knob-rtt) .knob-val, :root[data-look="ink"] .knob:not(.knob-rtt) .knob-val { stroke: var(--c, var(--text)); stroke-width: 2.5; }
:root [data-mat="ink"] .knob:not(.knob-rtt) .knob-face, :root[data-look="ink"] .knob:not(.knob-rtt) .knob-face { fill: var(--knob-cap); stroke: var(--line); }
:root [data-mat="ink"] .knob:not(.knob-rtt) .knob-ptr, :root[data-look="ink"] .knob:not(.knob-rtt) .knob-ptr { stroke-width: 2; }
/* Device cards: a hairline on the kit bezel, a green power LED (on = passing
   sound through; amber stays for sound itself), and an off card that greys
   out (a 160 ms opacity fade; the desaturate is instant). */
[data-mat="ink"] .dev { box-shadow: inset 0 0 0 1px var(--line); }
[data-mat="ink"] .dev .dev-pwr { background: var(--faint); box-shadow: none; }
[data-mat="ink"] .dev .dev-pwr.on,
[data-mat="ink"] .dev .dev-pwr.on:hover:not(:disabled) { background: var(--meter-lo); box-shadow: 0 0 6px color-mix(in srgb, var(--meter-lo) 70%, transparent); }
[data-mat="ink"] .dev .dvb { transition: opacity var(--t-pop) ease; } /* the grey (filter) is instant: transform/opacity only */
[data-mat="ink"] .dev.off .dvb { opacity: 0.45; filter: saturate(0); }
/* A card this person just added scales in once (devices.js adds .enter). */
.dev.enter { transition: opacity 180ms ease, transform 180ms var(--ease-out); }
@starting-style { .dev.enter { opacity: 0; transform: scale(.97) translateY(4px); } }
@media (prefers-reduced-motion: reduce) {
  @starting-style { .dev.enter { transform: none; } }
}

/* ---------- premium motion (DAW premium D, Task 8) ----------
   House rules: transform/opacity only, nothing moves for a keyboard action
   (JS adds .no-anim / leaves .cold, .slide, .tab-fade off for those), hover
   effects behind (hover:hover) and (pointer:fine), and under reduced motion
   movement stops while fades stay. */

/* Play ⇄ pause: two stacked glyphs crossfade (ui/transport.js). The button's
   amber while playing is the .active rule (amber = sound). */
#t-play { display: inline-grid; place-items: center; }
#t-play .ic { grid-area: 1 / 1; transition: opacity var(--t-pop) ease, transform var(--t-pop) var(--ease-out); }
#t-play .ic-pause, #t-play.active .ic-play { opacity: 0; transform: scale(.8); }
#t-play.active .ic-pause { opacity: 1; transform: none; }
#t-play.no-anim .ic { transition: none; }

/* Dock tabs: one underline that slides to the clicked tab (main.js
   placeTabInd sets translateX + scaleX of a 100 px bar), and the new panel
   fades in; a shortcut switch jumps. */
.dock-tabs { position: relative; }
.dock-tabs button.active { border-bottom-color: transparent; }
.dock-tabs .tab-ind { position: absolute; left: 0; bottom: -1px; width: 100px; height: 2px; background: var(--fill); transform-origin: left center; pointer-events: none; }
.dock-tabs .tab-ind[hidden], body.dock-closed .dock-tabs .tab-ind { display: none; }
.dock-tabs .tab-ind.slide { transition: transform 200ms var(--ease-io); }
#dock.tab-fade > .tab-pane.active { transition: opacity 140ms ease; @starting-style { opacity: 0; } }

/* Tooltips: the first one after a pause (pointer only) fades and grows from
   the anchor's edge; warm neighbours, focus and canvas tips show at once.
   Hiding stays instant. */
.tip.cold { transition: opacity 120ms var(--ease-out), transform 120ms var(--ease-out); @starting-style { opacity: 0; transform: scale(.98); } }

/* Notice pill ("Bass deleted · Restore"): rises 8 px into place, leaves by
   fading at the same spot. A text change while it shows doesn't replay. */
.notice { transition: opacity 140ms ease, transform 200ms var(--ease-out), display 140ms allow-discrete; }
@starting-style { .notice { opacity: 0; transform: translate(-50%, 8px); } }
.notice[hidden] { opacity: 0; }

/* Push pill: scales in when there's something to push; .arrive (count left
   0) and .nudge (left a clip with unpushed edits) are one ring that grows
   and fades (transform/opacity on ::after, no box-shadow paint loop). */
.transport :is(#t-push, #t-asks).ready { position: relative; transition: opacity var(--t-pop) ease, transform var(--t-pop) var(--ease-out); }
@starting-style { .transport :is(#t-push, #t-asks).ready { opacity: 0; transform: scale(.94); } }
:is(#t-push, #t-asks).ready::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; border: 2px solid var(--push); opacity: 0; pointer-events: none; }
:is(#t-push, #t-asks).arrive::after { animation: push-ring 450ms var(--ease-out); }
#t-push.nudge::after { border-color: var(--select); animation: push-ring 500ms var(--ease-out); }
@keyframes push-ring { from { opacity: .6; transform: scale(1); } to { opacity: 0; transform: scale(1.25); } }

@media (prefers-reduced-motion: reduce) {
  #t-play .ic, #t-play .ic-pause, #t-play.active .ic-play { transform: none; }
  .dock-tabs .tab-ind.slide { transition: none; }
  .tip.cold { @starting-style { transform: none; } }
  @starting-style { .notice { transform: translateX(-50%); } }
  @starting-style { .transport :is(#t-push, #t-asks).ready { transform: none; } }
  :is(#t-push, #t-asks).arrive::after, #t-push.nudge::after { animation: none; }
}

/* ---------- DAW look: Quiet Ink everywhere (DAW premium Task 9) ----------
   Settings → DAW look → Quiet Ink sets data-look="ink" on <html> (themeboot.js
   before paint, ui/theme.js live). The ink tokens above already drop the
   machined edge, shadows and gradient controls; these flatten what the
   Hardware frame draws itself. Panel colours stay the theme's, so sky
   panels keep their glass. Clips and meters read the look in JS
   (ui/cliplook.js 'ink', ui/meterdraw.js). */
:root[data-look="ink"] :is(header.transport, .tpill, .pl-toolbar) { background-image: none; }
:root[data-look="ink"] :is(.transport, .tpill) .lcd { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
:root[data-look="ink"] .transport .tfield input#t-bpm { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Mixer inserts panel (option D, Avi 2026-11-18; ui/mixer.js) ----------
   Strips no longer scroll their inserts: each shows a count chip and its first
   two names (.fx-peek). The selected strip's whole chain sits in the Inserts
   panel at the right of the Mixer: FX_SLOTS numbered slots, empty ones "+".
   The strips scroll sideways in their own column; the panel stays put. */
/* C-460 pick D: the Inserts panel sits right after Master, not at the far
   right of the dock with empty space between. The strips' column is only as
   wide as the strips; once they outgrow the dock it shrinks and scrolls. */
#pane-mixer { grid-template-columns: minmax(0, max-content) auto; justify-content: start; grid-template-rows: minmax(0, 1fr); } /* a grid only while shown (.tab-pane.active) */
#pane-mixer > .mixer { grid-column: 1; grid-row: 1; overflow: auto; min-width: 0; min-height: 0; }
.strip .fx-peek { display: grid; gap: 2px; align-content: start; width: 100%; min-height: 0; flex: 1; overflow: hidden; cursor: pointer; }
.strip .fx-chip {
  justify-self: start; max-width: 100%; box-sizing: border-box;
  padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line);
  font: 600 var(--fs-small)/1.35 var(--mono); font-variant-numeric: tabular-nums;
  color: var(--text); background: var(--panel-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.strip .fx-chip.empty { color: var(--faint); background: transparent; border-style: dashed; }
.strip .fx-peek-row, .strip .fx-more {
  padding: 0 2px; font-size: var(--fs-small); line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted-2);
}
.strip .fx-peek-row::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; background: var(--c); vertical-align: 1px; }
.strip .fx-peek-row.off { color: var(--faint); }
.strip .fx-peek-row.off::before { background: transparent; box-shadow: inset 0 0 0 1px var(--faint); }
.strip .fx-more { color: var(--faint); }

.fx-panel {
  grid-column: 2; grid-row: 1;
  width: 196px; box-sizing: border-box; min-height: 0;
  display: flex; flex-direction: column; gap: 6px;
  margin: 10px 10px 10px 0; padding: 8px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-panel, 6px);
  overflow-y: auto;
}
.fx-panel .fxp-title { font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.fx-panel .fxp-head { display: flex; align-items: baseline; gap: 6px; padding-bottom: 5px; border-bottom: 2px solid var(--c); }
.fx-panel .fxp-head[hidden] { display: none; }
.fx-panel .fxp-name { flex: 1; min-width: 0; font-size: var(--fs-ui); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-panel .fxp-count { font: 500 var(--fs-small)/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--muted-2); }
.fx-panel .fxp-hint { font-size: var(--fs-small); color: var(--muted); line-height: 1.4; }
.fx-panel .fxp-hint[hidden], .fx-panel .fx-slots[hidden] { display: none; }
.fx-panel .fx-off { width: 100%; padding: 0.05rem 0.3rem; font-size: var(--fs-small); letter-spacing: 0.04em; background: var(--warn); color: var(--warn-ink); border: 1px solid var(--warn); }
.fx-panel .fx-off[hidden] { display: none; }
.fx-panel .fx-slots { position: relative; display: grid; gap: 2px; align-content: start; }
.fx-panel .fx-row, .fx-panel .fx-empty {
  display: flex; align-items: center; gap: 6px; height: 22px; box-sizing: border-box;
  padding: 0 6px 0 4px; border-radius: var(--r-ctl, 4px);
}
.fx-panel .fx-row { background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line); }
.fx-panel .fx-num { flex: none; width: 14px; text-align: right; font: 500 var(--fs-small)/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--faint); }
.fx-panel .fx-row .fx-dot {
  flex: 0 0 10px; width: 10px; height: 10px; padding: 0;
  border: 1px solid var(--c); border-radius: 50%; background: transparent; touch-action: none;
}
.fx-panel .fx-dot[aria-pressed=true], .fx-panel .fx-dot.swiping[data-swipe-on=true] { background: var(--c); }
.fx-panel .fx-dot.swiping[data-swipe-on=false] { background: transparent; }
.fx-panel .fx-dot.swiping { outline: 1px solid var(--text); outline-offset: 2px; }
.fx-panel .fx-row .fx-slot {
  flex: 1; min-width: 0; padding: 0; text-align: left; background: transparent; border: 0;
  font-size: var(--fs-small); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-panel .fx-row.off .fx-slot { color: var(--muted); }
.fx-panel .fx-empty { width: 100%; background: transparent; border: 1px dashed var(--line); color: var(--faint); cursor: pointer; }
.fx-panel .fx-empty .fx-plus { flex: 1; text-align: left; font-size: var(--fs-ui); line-height: 1; }
.fx-panel .fx-empty:hover, .fx-panel .fx-empty:focus-visible { color: var(--text); border-color: var(--muted-2); }
.fx-panel .fx-empty:hover .fx-num { color: var(--muted-2); }
.fx-panel.drop-ok { box-shadow: inset 0 0 0 1px var(--select); }
.fx-panel.master { --c: var(--muted-2); }
/* A strip's peek opens the chain in the panel; the shown strip keeps its edge (.primary). */
.strip .fx-peek:hover .fx-chip { border-color: var(--muted-2); }

/* ---------- Per-panel minimum sizes (ui/layout.js PANEL_MIN) ----------
   The dock and floating windows never go below the shown panel's minimum;
   when the browser window is too short for it, the panel scrolls instead of
   squashing. Each pane's growing row gets the same floor as PANEL_MIN
   (test/panelmin-browser.test.js keeps the two in step):
   Editor stage 181 (ruler, ~8 key rows, a thin velocity lane), Channel
   Rack rows 62 (two channels), Mixer 323 (strips + Inserts panel). */
.dock { grid-template-rows: 32px minmax(0, 1fr); }
.dock > .tab-pane.active, .floating-panel > .tab-pane.active, .zone-body > .tab-pane.active { overflow: auto; }
#pane-roll { grid-template-rows: auto auto minmax(178px, 1fr) auto; } /* toolbar 40 (C-490) + 178 + footer 32 = PANEL_MIN.roll 250 */
#pane-roll.audio-mode { grid-template-rows: minmax(0, 1fr); }
#pane-rack { grid-template-rows: auto minmax(62px, 1fr) auto; }
#pane-mixer { grid-template-rows: minmax(323px, 1fr); }

/* ---------- Dock height per tab (main.js showTab, pref dockPerTab) ----------
   Switching to a tab with its own height glides the dock there. */
body.dock-glide { transition: grid-template-rows 180ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@media (prefers-reduced-motion: reduce) { body.dock-glide { transition: none; } }

/* ---------- Mixer: inserts list, chain power, Wide / Narrow (ui/mixer.js) ----------
   Avi 2026-11-19 (04-plans/ui-overhaul/prototype/feedback-2026-11-19.html):
   the fader stops at 200 px and every extra pixel of a taller Mixer shows
   more insert names (fitPeek trims the rest to "+N more"); no FX count; the
   chain power dot turns red when the chain is off (no FX OFF badge). The
   dot flips the strip's synced fxOff; each device keeps its own on/off.
   Narrow (pref mixerNarrow): ~30 px strips with the dot, fader, meter, M/S
   and a sideways name; the selected strip's pan sits in the Inserts panel. */
[data-mat="ink"] .strip { grid-template-rows: minmax(87px, 1fr) 52px minmax(80px, 200px) auto auto min-content; }
.strip .fx-area { min-height: 0; overflow: hidden; }
.strip .fx-head { display: flex; justify-content: flex-end; height: 12px; flex: none; }
.strip .fx-pw, .fx-panel .fxp-power {
  flex: none; width: 12px; height: 12px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--meter-lo); background: transparent;
  box-shadow: inset 0 0 0 2px var(--panel-2), inset 0 0 0 6px var(--meter-lo);
}
.strip .fx-pw[aria-pressed=false], .fx-panel .fxp-power[aria-pressed=false] { border-color: var(--warn); box-shadow: inset 0 0 0 2px var(--panel-2), inset 0 0 0 6px var(--warn); }
.strip .fx-pw.none { border-color: var(--faint); box-shadow: none; cursor: default; }
.strip .fx-pw:not(.none):hover, .fx-panel .fxp-power:hover { border-color: var(--text); }
.strip .fx-pw.none { visibility: hidden; } /* Wide: no dot without effects (Narrow shows it hollow) */
.fx-panel .fxp-power[hidden] { display: none; }
.fx-panel .fxp-power { align-self: center; }
.strip.chain-off .fx-peek-row, .fx-panel.chain-off .fx-row { opacity: 0.4; }
.strip .fx-peek { position: relative; overflow: hidden; grid-auto-rows: max-content; }
.strip .fx-peek-row { cursor: grab; }
.strip .fx-peek-row[hidden] { display: none; }
.strip .fx-peek-row.moving { opacity: 0.4; }
.strip .fx-add {
  width: 100%; padding: 1px 0; border: 1px dashed var(--line); border-radius: var(--r-ctl, 4px);
  background: transparent; color: var(--faint); font-size: var(--fs-small); line-height: 1.35;
}
.strip .fx-add:hover, .strip .fx-add:focus-visible { color: var(--text); border-color: var(--muted-2); }
.fx-panel .fx-empty .fx-plus { font-size: var(--fs-small); }
.fx-panel .fxp-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.fx-panel .fxp-width { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-ctl, 4px); overflow: hidden; }
.fx-panel .fxp-width button { padding: 0 6px; border: 0; border-radius: 0; font-size: var(--fs-small); line-height: 18px; color: var(--muted); background: transparent; }
.fx-panel .fxp-width button[aria-pressed=true] { background: var(--chrome-2); color: var(--text); }
.fx-panel .fxp-panrow { display: none; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--muted); }
#pane-mixer:has(#mixer.narrow) .fx-panel .fxp-panrow:not([hidden]) { display: flex; }
.fx-panel .fxp-pan { flex: 1; min-width: 0; height: 12px; margin: 0; padding: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: ew-resize; }
.fx-panel .fxp-pan::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--range-track); }
.fx-panel .fxp-pan::-moz-range-track { height: 4px; border-radius: 2px; background: var(--range-track); }
.fx-panel .fxp-pan::-webkit-slider-thumb { -webkit-appearance: none; width: 3px; height: 12px; margin-top: -4px; border: 0; border-radius: 1px; background: var(--text); }
.fx-panel .fxp-pan::-moz-range-thumb { width: 3px; height: 12px; border: 0; border-radius: 1px; background: var(--text); }

#mixer.narrow { gap: 3px; }
#mixer.narrow .strip { width: 30px; padding: 5px 2px; grid-template-rows: 32px minmax(80px, 1fr) auto min-content; gap: 4px; /* dot | fader | M/S | name (the knob and dB are display: none, so out of the grid) */ border-radius: 8px; }
#mixer.narrow .strip .knob, #mixer.narrow .strip .db, #mixer.narrow .strip .scale, #mixer.narrow .strip .fx-peek { display: none; }
#mixer.narrow .strip .fx-head { justify-content: center; }
#mixer.narrow .strip .fx-pw.none { visibility: visible; }
#mixer.narrow .strip .fader-row { gap: 2px; }
#mixer.narrow[data-mat="ink"] .strip .fader-well, [data-mat="ink"] #mixer.narrow .strip .fader-well { width: 14px; }
#mixer.narrow .strip canvas.meter { width: 5px; }
#mixer.narrow .strip .sbtns { flex-direction: column; gap: 2px; }
#mixer.narrow .strip .sbtns button { width: 22px; padding: 0; font-size: 0.62rem; }
#mixer.narrow .strip .sname { writing-mode: vertical-rl; transform: rotate(180deg); max-width: none; max-height: 96px; font-size: 0.7rem; align-self: start; justify-self: center; }
#mixer.narrow .strip.master { width: 52px; grid-template-rows: none; }
#mixer.narrow .strip.master .sname { writing-mode: horizontal-tb; transform: none; font-size: 0.62rem; }

/* ---- Calm mixer (Avi 2026-11-20, mockup Wide B + Narrow B) ----
   Show what makes a strip different, not what every strip shares. */
/* dB numbers only on the selected strip (Avi 2026-11-20); the rest keep the
   space (faders stay in line) but not the ink. */
#mixer > .strip:not(.primary) .scale { visibility: hidden; }
/* Pan: the knob alone; its value is in the tip and the drag readout. */
#mixer .strip .knob .knob-label, #mixer .strip .knob .knob-text { display: none; }
[data-mat="ink"] #mixer .strip { grid-template-rows: minmax(87px, 1fr) 34px minmax(80px, 200px) auto auto min-content; }
/* Colour sits on the cap line and the name tab; the fill goes neutral. */
#mixer .strip .fader { --range-fill: color-mix(in oklab, var(--text) 30%, var(--panel-2)); } /* id-strength: beats the theme's input[type=range] fill */
/* I/O: no IN / OUT words; Out to Master and an instrument's MIDI In are the
   default, so they stay out of sight until the strip is hovered. */
#mixer .strip .io-slot .k { display: none; }
#mixer .strip .io-slot { border-color: transparent; background: transparent; color: var(--muted); justify-content: center; }
#mixer .strip .io-slot:hover:not(:disabled) { border-color: var(--line); background: var(--panel-3); }
#mixer .strip .io-out:not(.dflt) { color: var(--folder); }
#mixer .strip .io-out:not(.dflt) .v::before { content: '\2192\00a0'; }
#mixer .strip .io-slot.dflt { opacity: 0; transition: opacity var(--t-pop, 0.15s) ease; }
#mixer .strip:hover .io-out.dflt, #mixer .strip .io-out.dflt:focus-visible { opacity: 1; }
#mixer .strip .io-in.dflt { visibility: hidden; }

/* Narrow B: every strip has the same rows, so faders, M/S and names line up,
   and names all start on one baseline. I/O and Pan live in the Inserts panel. */
#mixer.narrow .strip, [data-mat="ink"] #mixer.narrow .strip { grid-template-rows: 22px minmax(80px, 1fr) auto 104px; }
/* The fader fits its 14px well: a 30px cap used to slide over the meter. */
[data-mat="ink"] #mixer.narrow .strip .fader { width: 14px; }
[data-mat="ink"] #mixer.narrow .strip .fader::-webkit-slider-runnable-track { margin: 0 5px; }
[data-mat="ink"] #mixer.narrow .strip .fader::-webkit-slider-thumb { width: 14px; margin-left: -5px; background-position: 3px 0; background-size: calc(100% - 6px) 100%; }
[data-mat="ink"] #mixer.narrow .strip .fader::-moz-range-thumb { width: 14px; background-position: 3px 0; background-size: calc(100% - 6px) 100%; }
#mixer.narrow .strip .io-slot { display: none; }
#mixer.narrow .strip .io-person:not(.on) { display: none; }
#mixer.narrow .strip .s-plate { align-self: stretch; justify-content: flex-end; min-height: 0; overflow: hidden; }
#mixer.narrow .strip .sname { align-self: center; max-height: 100%; border-bottom: 0; padding: 0; }
#mixer.narrow .strip.master { grid-template-rows: none; }
#mixer.narrow .strip.master .s-plate { justify-content: flex-start; }
.fx-panel .fxp-iorow { display: none; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--muted); }
#pane-mixer:has(#mixer.narrow) .fx-panel .fxp-iorow:not([hidden]) { display: flex; }
.fx-panel .fxp-iorow > span { width: 28px; flex: none; }
.fx-panel .fxp-io { flex: 1; min-width: 0; padding: 1px 6px; text-align: left; font-size: var(--fs-small); color: var(--muted-2); background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r-ctl, 4px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.fx-panel .fxp-io:hover:not(:disabled) { color: var(--text); border-color: var(--muted-2); }
.fx-panel .fxp-io:disabled { cursor: default; opacity: 0.5; }
/* Round 2 (Avi 2026-11-20, "All of it"). Volume in the panel while Narrow. */
.fx-panel .fxp-iorow > span { width: 44px; }
.fx-panel .fxp-vol { font: 500 var(--fs-small) var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
/* Master sits right after the last strip and pins to the right edge while
   the strips scroll under it (opaque, so they don't show through). */
#mixer .strip.master { margin-left: 0; position: sticky; right: 0; z-index: 2; background: var(--panel-2); }
/* Bigger Narrow M / S: an easier target. */
#mixer.narrow .strip .sbtns button { width: 24px; height: 18px; font-size: 0.66rem; }
/* Clip light: a thin bar over the meter, red once the strip went over 0 dB. */
.strip .fader-row { position: relative; }
.strip .clip-led { position: absolute; top: -5px; right: 0; width: 12px; height: 3px; min-height: 0; padding: 0; border: 0; border-radius: 2px; background: var(--line); cursor: pointer; }
.strip .clip-led::after { content: ''; position: absolute; inset: -4px -2px; } /* a bigger hit area */
.strip .clip-led.on { background: var(--rec); box-shadow: 0 0 5px color-mix(in srgb, var(--rec) 60%, transparent); }
/* One effect in a window over the Mixer (ui/fxwindow.js). */
.fx-window { position: fixed; z-index: 840; display: flex; flex-direction: column; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--pop-shadow); overflow: hidden; }
.fx-window:focus { outline: none; }
.fx-window .fxw-bar { flex: none; height: 30px; display: flex; align-items: center; gap: 4px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line-soft); cursor: grab; user-select: none; touch-action: none; }
.fx-window .fxw-bar:active { cursor: grabbing; }
.fx-window .fxw-title { flex: 1; min-width: 0; font-size: var(--fs-small); color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-window .fxw-btn { width: 22px; height: 22px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.fx-window .fxw-btn:hover, .fx-window .fxw-btn:focus-visible { color: var(--text); background: var(--panel-3); }
.fx-window .fxw-body { min-height: 0; overflow: auto; padding: 8px; }

/* ---------- Retune (pitch correction, Low Latency): ui/retunefx.js ----------
   Main: the pitch screen + Speed / Humanize / Detune. More: key, scale and the
   12 note keys, as plain text. Amber = the note coming out (sound). */
.fx-retune .rt-knobs { display: grid; grid-template-columns: repeat(3, 74px); align-content: center; gap: 4px; padding: 0 4px; flex: none; }
.fx-retune .rt-read { position: absolute; left: 10px; bottom: 8px; pointer-events: none; font: 500 11px var(--sans); color: var(--muted); }
.fx-retune .rt-more { display: flex; flex-direction: column; justify-content: center; gap: 14px; flex: none; padding: 0 10px; width: 360px; }
.fx-retune .rt-keyrow { display: flex; align-items: center; gap: 14px; }
.fx-retune .rt-keyrow .rtt-sel.chipsel { width: auto; max-width: none; flex: none; }
.fx-retune .rtt-chip:disabled { opacity: 0.4; cursor: default; }
.fx-retune .rt-keys { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; }
.fx-retune .rt-key { min-width: 0; height: auto; padding: 4px 0 6px; border: 0; background: transparent; color: var(--muted); font: 500 10.5px var(--sans); cursor: pointer; position: relative; border-radius: 0; }
.fx-retune .rt-key:hover:not(:disabled) { color: var(--text); background: transparent; }
.fx-retune .rt-key.on { color: var(--text); }
.fx-retune .rt-key.on::after { content: ''; position: absolute; left: 3px; right: 3px; bottom: 0; height: 2px; border-radius: 2px; background: var(--muted); }
.fx-retune .rt-key.sung { color: var(--text); }
.fx-retune .rt-key.live { color: var(--accent); }
.fx-retune .rt-key.live::after { content: ''; position: absolute; left: 3px; right: 3px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); }

/* Denoise device (ui/denoisefx.js): state line + Learn on its screen, the latency badge on any device title bar. */
.dn-scr .dn-state { position: absolute; left: 10px; top: 8px; font: 500 10.5px var(--sans); letter-spacing: 0; color: var(--muted); pointer-events: none; }
.dn-scr .dn-state.on { color: var(--text); }
.dn-scr .dn-learn { position: absolute; right: 8px; top: 6px; }
.dn-scr .rtt-cv { cursor: default; }
.dev .dvh .dev-lat { font-family: var(--rtt-font); font-size: 8.5px; letter-spacing: 0.3px; color: var(--muted-2); border: 1px solid var(--line); border-radius: 10px; padding: 1px 6px; white-space: nowrap; text-transform: none; }
.dev .dvh .dev-lat[hidden] { display: none; }

/* Piano roll: "New notes: 1/8 · grid" label beside the Grid menu (feedback 2026-11-19 Q2). */
.roll-newlen { display: inline-flex; align-items: baseline; gap: 0.35rem; white-space: nowrap; }
.roll-newlen .glabel { letter-spacing: 0.08em; }
#roll-newlen-val { font-variant-numeric: tabular-nums; }

/* Share redesign (2026-11-19): Add people, avatars, folds. */
.share-addrow { display: flex; gap: 6px; align-items: center; }
.share-search { flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--panel-3); border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; }
.share-search:focus { outline: none; border-color: var(--select); }
.share-found { margin-top: 6px; }
.share-group { font: 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding: 4px 0 0; }
.share-av { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; color: var(--muted-2); background: var(--panel-3); border: 1px solid var(--line); }
.share-person .share-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-handle { color: var(--muted); margin-left: 4px; }
.share-pending .share-name { color: var(--muted-2); }
.share-rule { border-top: 1px solid var(--line-soft); margin: 10px 0 2px; }
.share-fold { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; background: none; border: 0; color: var(--muted-2); font: inherit; cursor: pointer; text-align: left; }
.share-fold:hover .share-fold-title { color: var(--text); }
.share-fold-info { color: var(--muted); font-size: 12px; }
.share-fold-body { display: grid; gap: 6px; padding: 0 0 6px; }
.share-fold-body[hidden] { display: none; }
/* ---------- Device polish (2026-11-19): preset bar in the card title ----------
   ‹ name › (ui/devpreset.js). Mono, muted; a * after an edited preset. */
.dev .dps { display: inline-flex; align-items: center; gap: 1px; min-width: 0; flex: 0 1 auto; font-family: var(--mono); text-transform: none; letter-spacing: 0; cursor: default; }
.dev .dps-name { font-size: var(--fs-small, 10.5px); color: var(--muted); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.dev .dps-name.dirty::after { content: ' *'; color: var(--text); }
.dev .dps-step { border: 0; background: none; color: var(--muted); padding: 0 4px; line-height: 1; border-radius: var(--radius-sm); font-family: var(--mono); }
.dev .dps-step:hover:not(:disabled) { color: var(--text); background: var(--panel-3); }
.dev.folded .dps { display: none; }
/* Delay, Reverb, Limiter on the kit (Device polish): a screen column; the
   limiter's reduction as a segmented meter (amber = sound), filled from the
   right like a GR meter. */
.rtt-col { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.rtt-col > .grow { flex: 1; }
.rtt-segs { display: flex; flex-direction: row-reverse; gap: 1px; height: 6px; flex: none; padding: 0 2px; }
.rtt-segs i { flex: 1; border-radius: 1px; background: var(--panel-3); }
.rtt-segs i.on { background: var(--accent); }

/* ---------- Device polish (2026-11-19): Tuner + instrument source cards on the kit ----------
   Tuner (ui/tunerview.js): a screen with the needle and a big Michroma note,
   a side column for preset / A= / strings. Source card (ui/devices.js): a
   track-colour LED in the title, one screen with the instrument name. */
.dev .dev-src-led { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px color-mix(in srgb, var(--c) 70%, transparent); }
.dev .dvb.dev-src-body { padding: 0; background: transparent; }
.dev-src-scr { flex: 1 !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.dev-src-scr .dev-src-sw { position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: 3px; border-radius: 0; opacity: 0.85; }
.dev-src-big { font-family: var(--rtt-font); font-size: 18px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text); line-height: 1; text-align: center; padding: 0 12px; }
.dev-src-scr .dev-src-kind { font-family: var(--rtt-font); font-size: 7.5px; letter-spacing: 0.4px; color: var(--muted); }
/* Tuner, shared base (card + header popover). */
.tn-scr { position: relative; height: 112px; flex: none; }
.tn-scr .tn-needle { background: transparent; border: 0; position: absolute; left: 0; right: 0; top: 4px; height: 70px; width: 100%; }
.tn-scr .tn-read { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; align-items: baseline; justify-content: center; gap: 8px; font-family: var(--rtt-font); pointer-events: none; }
.tn-scr .tn-note { font-family: var(--rtt-font); font-size: 26px; }
.tn-scr .tn-note sub { font-size: 10px; vertical-align: baseline; }
.tn-scr .tn-cents { font-size: 8px; letter-spacing: 0.4px; text-transform: uppercase; min-width: 0; text-align: left; }
.tn-scr > .tn-hz { position: absolute; left: 0; right: 0; bottom: 5px; text-align: center; font-family: var(--rtt-font); font-size: 7.5px; letter-spacing: 0.4px; }
.tn-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tn-side .tn-hz, .tn-side .tn-src { font-family: var(--rtt-font); font-size: 8px; letter-spacing: 0.3px; }
.tn-side .tn-src { line-height: 1.5; }
.tn-str { font-family: var(--rtt-font); font-size: 9px; border-radius: 20px; padding: 2px 9px; background: transparent; }
.tn-str.on { border-color: var(--text); color: var(--text); }
.tn-str.hit { border-color: var(--tune-ok); color: var(--tune-ok); }
.tn-ref { width: 64px; font-family: var(--rtt-font); font-size: 9px; }
/* In a device card: a kit row (screen | controls), at the card height. */
.dev .dvb.fx-tuner { padding: 0; background: transparent; display: flex; columns: auto; column-width: auto; }
.dev .fx-tuner .tn { flex: 1; flex-direction: row; gap: 6px; min-width: 0; min-height: 0; margin: 0; }
.dev .fx-tuner .tn > .tn-blk { margin: 0; }
.dev .fx-tuner .tn-scr { width: 220px; height: auto; }
.dev .fx-tuner .tn-scr .tn-needle { height: 58%; top: 8px; }
.dev .fx-tuner .tn-side { flex: 1; min-height: 0; overflow: hidden; background: var(--panel-2); border-radius: 9px; padding: 8px; box-sizing: border-box; }
.dev .fx-tuner .tn-preset { max-width: none; flex: 1 1 100%; min-width: 0; }
/* Device polish: user presets + the ⋯ device menu (ui/devpreset.js) */
.dev-menu { font-size: 13px; letter-spacing: 0; }
.dps-name.mine::before { content: '•'; margin-right: 4px; color: var(--muted); }

/* Settings → Recording → Mic (ui/micsetting.js): one row, a hairline level for a few seconds after a pick, a hint only when it applies. */
.set-mic { display: grid; gap: 6px; }
.set-mic-row { display: flex; align-items: center; gap: 10px; }
.set-mic { --mic-indent: 58px; }
.set-mic-row > span { flex: none; width: 48px; color: var(--muted-2); }
.set-mic-row select { flex: 1 1 auto; min-width: 0; }
.set-mic-lvl { height: 2px; margin-left: var(--mic-indent); border-radius: 1px; background: var(--line-soft); overflow: hidden; }
.set-mic-lvl i { display: block; width: 0; height: 100%; background: var(--accent); transition: width 60ms linear; }
#settings .set-mic .set-mic-hint { margin: 0 0 0 var(--mic-indent); padding: 0; border: 0; }
.set-mic-hint.is-warn { color: var(--solo); }
.set-mic-steps { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
#settings .set-mic .set-link { min-height: 0; height: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--muted-2); font: inherit; text-decoration: underline; cursor: pointer; }
#settings .set-mic .set-link:hover { color: var(--text); background: none; }
#settings .set-mic .set-link:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .set-mic-lvl i { transition: none; } }

/* Booth card: "Listening on" Headphones / Speakers (ui/boothcard.js; Booth ringing thread 2026-11-20). */
/* Plugin windows (2026-11-20): the window button on the Devices plugin card and
   mixer strips, and the lit Channel Rack button. Lit = the window is open
   (neutral --select, not amber: amber means sound). */
.plug-win { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 18px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted-2); cursor: pointer; }
.plug-win[hidden] { display: none; }
.plug-win:hover:not(:disabled), .plug-win:focus-visible { color: var(--text); border-color: var(--muted); background: transparent; }
.plug-win:focus-visible { outline: 2px solid var(--select); outline-offset: 1px; }
.plug-win.win-open, .plug-win.win-open:hover:not(:disabled) { background: var(--select); border-color: var(--select); color: var(--ink-on-light); }
.plug-win.win-open:hover:not(:disabled) { box-shadow: 0 0 0 2px var(--line); }
.plug-win.win-absent { opacity: 0.45; border-style: dashed; }
.dvh .plug-win.dev-win { margin-left: 4px; }
.strip .plug-win.io-win { width: 18px; height: 18px; }
#mixer.narrow .strip .plug-win.io-win { width: 14px; height: 14px; }
#mixer.narrow .strip .plug-win.io-win svg { width: 9px; height: 8px; }
.rk-name.win-open, .rk-name.win-open:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--select); background: color-mix(in srgb, var(--select) 16%, transparent); }
@media (prefers-reduced-motion: no-preference) { .plug-win { transition: background-color 0.1s, color 0.1s, border-color 0.1s; } }

/* Plugin effects, listed but not on inserts yet (PLUGIN_FX_READY in ui/browser.js):
   Browser › My Library › Effects rows and the "+" picker's "coming soon" rows.
   Muted, a dashed "soon" tag; no amber (they make no sound here). */
.br-row.soon { color: var(--muted); cursor: default; }
.br-row.soon .br-ico { opacity: 0.6; }
.br-soon { flex: none; margin-left: 6px; padding: 0 5px; border: 1px dashed var(--faint); border-radius: 3px; color: var(--muted); font-family: var(--mono); font-size: var(--fs-small, 10px); line-height: 14px; text-transform: lowercase; }
.br-row.br-soon-note { white-space: normal; height: auto; padding-top: 8px; padding-bottom: 8px; color: var(--faint); font-size: var(--fs-small, 11px); line-height: 1.4; border-top: 1px solid var(--line); margin-top: 4px; }
.fx-pick-soon { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.6rem; color: var(--muted); cursor: default; }
.fx-pick-soon .ctx-hint { margin-left: auto; color: var(--faint); font-family: var(--mono); font-size: var(--fs-small, 10px); }

/* Quick Denoise · Custom… window (ui/dnwindow.js): a panel on the menu look. */
.dn-win { position: fixed; width: 384px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.dn-win .dn-t { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.dn-win .dn-t small { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: var(--fs-small, 10px); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-win .dn-f { display: grid; grid-template-columns: 86px 1fr 56px; align-items: center; gap: 8px; color: var(--muted-2); }
.dn-win .dn-f output { font-family: var(--mono); font-size: var(--fs-small, 10.5px); color: var(--text); text-align: right; }
.dn-win .dn-hint { color: var(--muted); font-size: var(--fs-small, 10.5px); line-height: 1.4; margin-top: -4px; }
.dn-win .dn-meter { height: 28px; background: var(--meter-bg); border-radius: var(--radius-sm); overflow: hidden; }
.dn-win .dn-strip { width: 100%; height: 100%; display: block; }
.dn-win .dn-btns { display: flex; gap: 6px; align-items: center; }
.dn-win .dn-btns .sp { flex: 1; }
.dn-win .dn-status { color: var(--muted); font-size: var(--fs-small, 10.5px); }
.dn-win .dn-ab { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dn-win .dn-ab button { border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: var(--fs-small, 10.5px); padding: 2px 8px; }
.dn-win .dn-ab button.on { background: var(--panel-3); color: var(--text); }

/* Drum Kit device card (track types stage 2; ui/kitcard.js). Tokens only. */
.dev-kit { min-width: 300px; }
.kit-count { font: var(--fs-small)/1 var(--mono); color: var(--muted-2); }
.kit-body { display: grid; gap: 0; padding: 0; }
.kit-rows { display: grid; }
.kit-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 10px; border-top: 1px solid var(--line); font-size: 12px; }
.kit-row:first-child { border-top: 0; }
@keyframes kit-row-in { from { opacity: 0; transform: translateY(-6px); } }
.kit-row { animation: kit-row-in 180ms var(--ease-out); }
.kit-sw { width: 10px; height: 10px; border-radius: 2px; background: var(--muted-2); }
.kit-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kit-file { font: var(--fs-small)/1 var(--mono); color: var(--muted); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kit-note { min-width: 40px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--text); font: 12px/1 var(--mono); cursor: pointer; transition: transform var(--t-press) var(--ease-out); }
.kit-note:active { transform: scale(0.97); }
.kit-note:focus-visible { outline: 2px solid var(--select); outline-offset: 1px; }
.kit-drop { margin: 8px 10px 10px; padding: 14px 8px; border: 1px dashed var(--faint); border-radius: 6px; display: grid; gap: 3px; justify-items: center; text-align: center; color: var(--muted); font-size: 12px; transition: border-color var(--t-press) ease; }
.kit-drop-main { color: var(--text); }
.kit-drop-sub { font-size: 11px; }
.dev-kit.kit-over .kit-drop { border-color: var(--select); }
@media (prefers-reduced-motion: reduce) { .kit-row { animation: none; } .kit-note { transition: none; } }

/* Drum Kit Steps view (ui/kitsteps.js): #pane-roll.kit-mode swaps the piano roll for it. */
#pane-roll.kit-mode { grid-template-rows: minmax(0, 1fr); }
#pane-roll.kit-mode > .roll-toolbar,
#pane-roll.kit-mode > .legendbar,
#pane-roll.kit-mode > .roll-stage,
#pane-roll.kit-mode > .lane-footer { display: none; }
#pane-roll.kit-mode > #kit-steps { display: grid; }
#kit-steps { grid-template-rows: auto minmax(0, 1fr); min-height: 0; overflow: auto; background: var(--bg); }
#kit-steps.ks-over { outline: 2px dashed var(--select); outline-offset: -4px; }
.ks-bar { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: 12px; position: sticky; top: 0; z-index: 1; }
.ks-title { font-weight: 600; }
.ks-tab { padding: 3px 10px; border-radius: 4px; background: var(--panel-3); }
.ks-where { font: var(--fs-small)/1 var(--mono); color: var(--muted-2); }
.ks-btn { min-width: 28px; height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; }
.ks-btn:disabled { color: var(--faint); cursor: default; }
.ks-btn:focus-visible, .ks-cell:focus-visible { outline: 2px solid var(--select); outline-offset: 1px; }
.ks-grid { display: grid; gap: 4px; padding: 10px 12px; align-content: start; }
.ks-row { display: grid; grid-template-columns: 150px repeat(var(--steps, 16), minmax(14px, 1fr)); gap: 3px; align-items: center; }
.ks-label { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 12px; }
.ks-sw { flex: none; width: 10px; height: 10px; border-radius: 2px; }
.ks-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-note { font: var(--fs-small)/1 var(--mono); color: var(--muted); }
.ks-cell { height: 28px; border: 0; border-radius: 3px; background: var(--panel-3); cursor: pointer; transition: transform 90ms var(--ease-out); }
.ks-cell.beat { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.ks-cell.on { background: var(--accent); box-shadow: none; }
.ks-cell:active { transform: scale(0.94); }
.ks-cell:disabled { opacity: 0.3; cursor: default; }
.ks-empty { display: grid; gap: 4px; justify-items: center; align-content: center; padding: 40px 16px; color: var(--muted); font-size: 12px; text-align: center; }
.ks-empty b { color: var(--text); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .ks-cell { transition: none; } }
/* Mixer: Drum Kit rows fold under the kit strip (ui/mixer.js paintFold). */
.kit-fold { align-self: center; min-width: 28px; height: 20px; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--muted-2); font: var(--fs-small)/1 var(--mono); cursor: pointer; }
.kit-fold:focus-visible { outline: 2px solid var(--select); outline-offset: 1px; }
.strip.kit-row-strip { background: var(--panel-2); animation: kit-strip-in 200ms var(--ease-out); }
@keyframes kit-strip-in { from { opacity: 0; transform: translateX(-8px); } }
@media (prefers-reduced-motion: reduce) { .strip.kit-row-strip { animation: none; } }
.ks-empty[hidden], .ks-grid[hidden] { display: none; }

/* Plugin effects (FX type `plugin`, ui/pluginfxcard.js; mockup
   04-plans/2026-11-20_plugin-effects-mockup.html Q1 A / Q3). Tokens only:
   --folder marks a plugin (as the mockup's blue tag); the status dot uses
   --tune-ok while the plugin runs here. No amber (sound only). */
.fx-plugin .pfx { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; break-inside: avoid; }
.pfx-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pfx-tag { font-size: var(--fs-small, 10px); line-height: 16px; color: var(--muted-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.pfx-tag[hidden] { display: none; }
.plug-win.pfx-open { width: auto; height: 24px; gap: 6px; padding: 0 10px; font-size: var(--fs-small, 11px); color: var(--text); background: var(--panel-3); }
.pfx-stat { display: flex; align-items: center; gap: 6px; font-size: var(--fs-small, 10px); color: var(--muted-2); }
.pfx-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--faint); }
.pfx-stat.on .pfx-dot { background: var(--tune-ok); }
.pfx-stat.absent { color: var(--muted); }
.pfx-stat.absent .pfx-dot { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); }
.fx-row .fx-ptag { flex: none; font-size: 9px; color: var(--folder); margin-left: 2px; }
.fx-panel .fx-row .plug-win.fx-win { width: 18px; height: 16px; margin-left: 2px; }
/* /admin Delete now confirm (admin/admin.js deleteNow; ADR 2026-11-20_handle-required-delete-now.md). */
.admin-confirm { max-width: min(34rem, calc(100vw - 2rem)); padding: 1.1rem 1.2rem; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; gap: 0.6rem; } /* grid only when [open]: a closed dialog stays hidden */
.admin-confirm[open] { display: grid; }
.admin-confirm::backdrop { background: var(--dim); }
.admin-confirm h2 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.admin-confirm ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.2rem; color: var(--muted-2); font-size: 0.85rem; overflow-wrap: anywhere; }
.admin-confirm .admin-row { justify-content: flex-end; }
.admin-hint { margin: 0; color: var(--muted); font-size: 0.8rem; }
.admin-danger-btn { background: var(--warn); color: var(--warn-ink); border-color: transparent; }
.admin-danger-btn:disabled { opacity: 0.45; }

/* ---------- Person card (People map P2, ui/personcard.js; boards 2, 11, 12) ----------
   One popover for any name, DAW and dashboard. Opens scale .96 -> 1 + fade,
   160 ms from the clicked name; out 120 ms; reduced motion: fade only. */
.person-card {
  position: fixed; z-index: 2600; width: 320px; box-sizing: border-box;
  background: var(--panel-3); color: var(--text); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; box-shadow: 0 24px 56px var(--dim); font: 400 13px/1.45 var(--sans);
  opacity: 0; transform: scale(.96);
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.person-card.is-in { opacity: 1; transform: none; }
.person-card.is-out { opacity: 0; transform: scale(.98); transition-duration: 120ms; pointer-events: none; }
.person-card:focus { outline: none; }
.pc-body { display: flex; flex-direction: column; gap: 12px; }
.pc-head { display: flex; align-items: center; gap: 14px; }
.pc-av {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  font: 650 15px var(--sans); color: var(--text);
}
.pc-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--panel-3); background: var(--muted); display: none; transition: background-color 200ms ease; }
.pc-av.is-known .pc-dot { display: block; }
.pc-av.is-live .pc-dot { background: var(--meter-lo); }
.person-card.is-gone .pc-av { color: var(--muted); border: 1px dashed var(--line); background: transparent; }
.person-card.is-gone .pc-name { color: var(--muted-2); }
.pc-who { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.pc-name { font: 650 17px/1.2 var(--sans); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-sub { font: 500 12px var(--mono); color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-sub:empty { display: none; }
.pc-more, .pc-back {
  flex: none; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent;
  color: var(--muted-2); font: 600 16px/1 var(--sans); cursor: pointer;
  transition: background-color var(--t-press) ease, color var(--t-press) ease;
}
.pc-more[hidden] { display: none; }
.pc-ctx { margin: 0; color: var(--muted-2); overflow-wrap: anywhere; }
.pc-ctx.is-err { color: var(--warn); }
.pc-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pc-acts.is-sub { flex-direction: column; align-items: stretch; }
.pc-acts.is-sub > .pc-back { align-self: flex-start; margin: -4px 0 0 -8px; }
.pc-btn {
  height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid transparent; cursor: pointer;
  font: 650 13px var(--sans); display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  transition: transform var(--t-press) var(--ease-out), background-color 150ms ease, border-color 150ms ease;
}
.pc-btn:active:not([disabled]) { transform: scale(.97); }
.pc-btn.is-primary { background: var(--fill); color: var(--on-fill); }
.pc-btn.is-secondary { background: transparent; border-color: var(--line); color: var(--text); }
.pc-btn.is-tertiary { background: transparent; color: var(--muted-2); padding: 0 10px; }
.pc-btn.is-dim { background: transparent; border-color: var(--line); color: var(--muted-2); cursor: default; }
.pc-btn.is-danger { background: var(--warn); color: var(--warn-ink); }
.pc-menu { display: flex; flex-direction: column; gap: 2px; }
.pc-menu-item { height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; color: var(--text); font: 500 13px var(--sans); cursor: pointer; }
.pc-menu-item.is-danger { color: var(--warn); }
.pc-role-wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted-2); font: 500 12px var(--mono); }
.pc-role { background: var(--input-bg); color: var(--text); border: 1px solid var(--line); border-radius: 7px; height: 28px; font: 500 12px var(--sans); }
.pc-list { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
.pc-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 0; border-radius: 10px; background: var(--line-soft); text-align: left; cursor: pointer; color: var(--text); transition: background-color 120ms ease; }
.pc-row[disabled] { cursor: default; }
.pc-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pc-row-t { font: 600 13px var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-row-s { font: 500 11px var(--mono); color: var(--muted-2); }
.pc-row-act { font: 600 12px var(--sans); color: var(--muted-2); flex: none; transition: opacity 150ms ease; }
.pc-row.is-done .pc-row-act { color: var(--text); }
.pc-note { margin: 0; color: var(--muted-2); }
.pc-btn:focus-visible, .pc-more:focus-visible, .pc-back:focus-visible, .pc-row:focus-visible, .pc-menu-item:focus-visible { outline: 2px solid var(--select); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  .pc-more:hover, .pc-back:hover, .pc-menu-item:hover { background: var(--line); color: var(--text); }
  .pc-row:not([disabled]):hover { background: var(--line); }
  .pc-btn.is-secondary:hover { border-color: var(--muted); }
  .pc-btn.is-tertiary:hover { color: var(--text); }
}
/* Names that open the card (chat, Share, bell, DM header). */
.person-name { background: none; border: 0; padding: 0; margin: 0; border-radius: 4px; } /* beats the bare button rule */
:where(.person-name) { font: inherit; color: inherit; text-align: inherit; cursor: pointer; } /* each surface's own name class still sets these */
.person-name:focus-visible { outline: 2px solid var(--select); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) { .person-name:hover { text-decoration: underline; text-underline-offset: 2px; } }
@media (prefers-reduced-motion: reduce) {
  .person-card, .person-card.is-in, .person-card.is-out { transform: none; transition: opacity 150ms ease; }
  .pc-btn:active:not([disabled]) { transform: none; }
}

/* Synth card (built-in synth presets + amp envelope; ui/synthcard.js, 2026-11-21) */
.dev-syn { --dev-col-w: 340px; min-width: calc(var(--dev-col-w) + 22px); }
.dev-syn .dvb { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; columns: auto; }
.syn-head { display: flex; align-items: center; gap: 4px; }
.syn-head .syn-preset { flex: 1; min-width: 0; max-width: none; width: auto; }
.syn-step, .syn-reset { min-width: 24px; justify-content: center; }
.syn-reset:disabled { opacity: 0.35; }
.syn-edited { font-size: 10px; color: var(--muted); letter-spacing: 0.04em; }
.syn { flex: 1; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.syn-head { flex: none; }
.syn-main { flex: 1; min-height: 0; display: flex; gap: 6px; }
.syn-scr { flex: 1; min-width: 0; height: auto; padding: 0; }
.syn-env { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
/* Fidelity pass (2026-11-25): in Devices the Synth's preset row lives in the card's title bar, drawn like the
   effects' ‹ name › (.dps): mono, muted, no box (2026-11-21_device-simple-tabs.html, Synth). */
.dev .dvh .syn-head { gap: 1px; min-width: 0; flex: 0 1 auto; font-family: var(--mono); text-transform: none; letter-spacing: 0; }
.dev .dvh .syn-head .syn-step, .dev .dvh .syn-head .syn-reset { min-width: 0; height: auto; min-height: 0; border: 0; background: none; box-shadow: none; color: var(--muted); padding: 0 4px; line-height: 1; border-radius: var(--radius-sm); font-family: var(--mono); }
.dev .dvh .syn-head .syn-step:hover, .dev .dvh .syn-head .syn-reset:hover:not(:disabled) { color: var(--text); background: var(--panel-3); }
.dev .dvh .syn-head .syn-preset { flex: 0 1 auto; width: auto; max-width: 120px; field-sizing: content; height: auto; min-height: 0; padding: 0 2px; border: 0; background: none; box-shadow: none; color: var(--muted); font: 500 var(--fs-small, 10.5px) var(--mono); text-overflow: ellipsis; text-align: center; appearance: none; -webkit-appearance: none; cursor: pointer; }
.dev .dvh .syn-head .syn-preset:hover, .dev .dvh .syn-head .syn-preset:focus-visible { color: var(--text); }
.dev .dvh .syn-head .syn-reset[hidden], .dev .dvh .syn-head .syn-edited[hidden] { display: none; }
.syn-env:active { cursor: grabbing; }
.syn-knobs { flex: none; grid-template-columns: repeat(2, 58px); grid-template-rows: repeat(2, 1fr); gap: 2px; padding: 0 2px; }

/* DEVICE STYLE ("Amp Envelope" look, 2026-11-21; recipe in
   00-foundation/device-style.md). Every device on the kit (.rtt) gets it:
   a dark inset screen, bare ring knobs with a thick accent arc, the name in
   muted sans over a bold value. Amber still means sound/value only. */
.rtt-scr { background: var(--meter-bg); border-radius: 8px; }
.rtt-tile:has(.knob) { background: transparent; text-transform: none; }
.knob-rtt .knob-disc, .knob-rtt .knob-hub, .knob-rtt .knob-ptr { display: none; }
:root .knob-rtt .knob-track { stroke: var(--panel-3); stroke-width: 4.5; }
:root .knob-rtt .knob-val { stroke: var(--accent); stroke-width: 4.5; }
.rtt-tile .knob-label { order: 2; font-family: var(--sans); font-size: 9.5px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.rtt-tile .knob-text { order: 3; font-family: var(--sans); font-size: 9.5px; font-weight: 700; letter-spacing: 0; color: var(--text); }

/* DEVICE STYLE, simple + tabs (2026-11-21, Avi: "simplicity is key"; recipe in
   00-foundation/device-style.md "Tabs"). The header holds power, name, a
   preset stepper and tabs only; mode choices are plain text with an amber
   underline, never boxed; knobs are 44 px and fill the body; long devices
   keep Main controls on one tab and the rest on More (ui/devtabs.js). */
.dev .dvh { padding: 0 6px 0 10px; }
.dev-tabs { display: flex; align-self: stretch; gap: 2px; }
.dev-tab {
  position: relative; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: 500 10.5px/1 var(--sans); letter-spacing: 0; text-transform: none; padding: 0 8px; height: auto;
}
.dev-tab:hover:not(:disabled) { background: transparent; color: var(--text); }
.dev-tab.on, .dev-tab.on:hover:not(:disabled) { color: var(--text); }
.dev-tab.on::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
/* Pages: Main and More swap the controls, never the screen. */
[data-pg='main'] [data-pg='more'], [data-pg='more'] [data-pg='main'] { display: none; }
.pg-grid { display: grid; grid-template-rows: repeat(var(--pg-rows, 2), 1fr); grid-auto-flow: column; grid-auto-columns: 74px; gap: 6px 4px; align-content: center; padding: 0 4px; }
.pg-grid > .span2, .pg-grid > .span3 { grid-column: auto; }
.pg-more { display: flex; gap: 6px; align-items: stretch; }
.pg-more > .pg-grid { flex: none; }
.rtt-opts { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 0 8px; min-width: 96px; }
.rtt-opts .rtt-chips { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.rtt-opts .rtt-sel.chipsel { max-width: 120px; }
/* No boxes: chips, segments and pickers are plain text, the chosen one underlined. */
.dev .rtt-chip, .dev .rtt-sel.chipsel {
  border: 0; border-radius: 0; padding: 2px 0; font: 500 10.5px/1.3 var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted);
}
.dev .rtt-chip.on, .dev .rtt-chip.on:hover:not(:disabled), .dev .rtt-chip.info { color: var(--text); box-shadow: 0 2px 0 -0.5px var(--accent); border: 0; }
.dev .rtt-chip:hover:not(:disabled) { border: 0; }
.dev .rtt-chiplbl { font: 500 10px var(--sans); color: var(--muted); text-transform: none; }
.dev .rtt-seg { background: transparent; padding: 0; gap: 8px; justify-content: center; }
.dev .rtt-seg button { flex: none; font: 500 10.5px/1.3 var(--sans); text-transform: none; min-height: 0; padding: 2px 0; border-radius: 0; background: transparent; }
.dev .rtt-seg button.on, .dev .rtt-seg button.on:hover:not(:disabled) { background: transparent; color: var(--text); box-shadow: 0 2px 0 -0.5px var(--accent); }
.dev .rtt-sel { font: 500 10.5px var(--sans); text-transform: none; color: var(--text); }
.dev .rtt-tl { font: 500 10px var(--sans); text-transform: none; letter-spacing: 0; color: var(--muted); }
.dev .rtt-tile .rtt-led { display: none; }
.dev .rtt-tile .knob { margin-top: 0; gap: 3px; }
.dev .rtt-tile .knob-dial svg { width: 44px; height: 44px; }
.dev .rtt-read small { font: 500 10px var(--sans); letter-spacing: 0; text-transform: none; }
.dev .rtt-read { font: 600 12px var(--sans); color: var(--text); }
.pg-col { display: flex; flex-direction: column; justify-content: center; gap: 8px; flex: none; }
.pg-col > .rtt-seg { align-self: flex-start; padding: 0 8px; }
.pg-col > .pg-grid { flex: none; }
.dev .rtt-tile { background: transparent; }
.pg-grid > .rtt-ttile:has(.rtt-seg) { grid-column: span 2; }
.rtt-opts .rtt-chips { flex-direction: column; align-items: flex-start; }
.dvb.rtt > .rtt-scr { flex: 1 0 auto; }

/* Tuner (ui/tunerview.js): a faint arc, an amber dot on it, the note above it. */
.dev .tn-scr .tn-needle { top: 0; height: 100%; }
.dev .tn-scr .tn-read { left: 10px; right: auto; bottom: 8px; justify-content: flex-start; gap: 6px; font-family: var(--sans); }
.dev .tn-scr .tn-note { font: 600 12px var(--sans); }
.dev .tn-scr .tn-note sub { font-size: 10px; }
.dev .tn-scr .tn-cents { font: 500 11px var(--sans); text-transform: none; letter-spacing: 0; color: var(--muted); min-width: 0; }
.dev .tn-scr .tn-cents.ok, .dev .tn-scr .tn-cents.off { color: var(--muted); }
.dev .tn-scr > .tn-hz { left: auto; right: 10px; text-align: right; font: 500 11px var(--sans); letter-spacing: 0; }
.dev .fx-tuner .tn-side { background: transparent; padding: 0 6px; justify-content: center; gap: 12px; }
.dev .tn-side .tn-hz, .dev .tn-side .tn-src { font: 500 10.5px var(--sans); letter-spacing: 0; color: var(--muted); }
.dev .tn-str { border: 0; border-radius: 0; padding: 2px 0; font: 500 10.5px var(--sans); color: var(--muted); background: transparent; }
.dev .tn-str.on, .dev .tn-str.hit { color: var(--text); box-shadow: 0 2px 0 -0.5px var(--accent); border: 0; }
.dev .tn-ref { font: 500 10.5px var(--sans); }
.w230 { width: 230px; } .w260 { width: 260px; } .w300 { width: 300px; }
/* Readouts: a live number that repeats a knob adds nothing, so the device screens
   that have a knob for it show none. Gain-reduction style readouts stay, small. */
.dev .fx-saturate .rtt-read, .dev .fx-delay .rtt-read, .dev .fx-reverb .rtt-read, .dev .fx-filter .rtt-read, .dev .fx-chorus .rtt-read, .dev .fx-utility .rtt-read, .dev .fx-clipper .rtt-read { display: none; }
.dev .rtt-read.bl { left: 10px; bottom: 8px; }
.dev .rtt-read.tr { right: 10px; top: 8px; }
.dev .rtt-read { display: flex; gap: 5px; align-items: baseline; }
.dev .rtt-read small { margin: 0; color: var(--muted); }
.dev .dvh .dev-lat { border: 0; padding: 0; background: transparent; color: var(--muted); font: 500 10px var(--sans); letter-spacing: 0; text-transform: none; }
.dev .rtt-ttile .rtt-chip, .dev .rtt-ttile input[type='checkbox'] { margin: 0; }
.pg-stack { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 0 12px; flex: none; }
.pg-stack > .rtt-seg { justify-content: flex-start; }
.pg-col > .rtt-seg, .pg-col > .rtt-seg[role='radiogroup'] { flex-direction: row; flex-wrap: wrap; }
.pg-top { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; max-width: 220px; }
.w280 { width: 280px; }
/* Sampler: Main = screen + six knobs; More = mode / filter / options + the rest. */
.smp.rtt .smp-main { flex: 1; }
.smp.rtt .smp-wavebox { flex: 1 0 auto; width: 300px; }
.smp-wavebox .smp-name { position: absolute; left: 10px; bottom: 8px; max-width: 70%; font: 500 11px var(--sans); color: var(--muted); pointer-events: none; }
.dev .rtt-rootsel { font: 600 12px var(--sans); }
.smp-opts { min-width: 120px; }
.smp-opts .smp-tabs { display: flex; gap: 10px; }
.smp-opts .rtt-chips { flex-direction: row; gap: 12px; }
/* Few-choice devices: the mode chips ride the top-left of the screen, not the header. */
.rtt-modecol { display: flex; flex-direction: column; justify-content: center; flex: none; padding: 0 6px; }
.rtt-modecol .rtt-chips { flex-direction: column; align-items: flex-start; gap: 12px; }
.smp-opts .smp-tabs { border: 0; border-radius: 0; overflow: visible; }
.dev-src:has(.syn-main) .dvb { background: transparent; padding: 0; }

/* ---------- C-449 skeleton DAW (public/sceneboot.js) ----------
   v1: Avi's pick A, 04-plans/mockups/2026-11-22_dash-entry-exit.html §6. v2: Avi's pick C,
   04-plans/mockups/2026-11-27_room-loading.html: the room assembles. data-stage on the cover:
   app = top bar + track headers shimmer; join = they settle (names from the last visit), clips shimmer;
   sounds = clips settle, the mixer fills. A status chip names the step; slow / failed / asking
   turn it into a card with the buttons. */
#scene-in.skel { display: grid; grid-template-rows: 48px 1fr auto; background: var(--bg); color: var(--muted); font-family: var(--sans); }
.skel-top { display: flex; align-items: center; gap: 10px; padding: 0 16px; background: var(--chrome); border-bottom: 1px solid var(--line); }
.skel-title { flex: none; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--chrome-on, var(--text)); font: 600 13px / 1 var(--sans); }
.skel-blk, .skel-head, .skel-clip { display: block; border-radius: 4px; background: linear-gradient(90deg, var(--panel-2) 0, var(--panel-3) 40%, var(--panel-2) 80%); background-size: 200% 100%; animation: skel-sh 1.6s linear infinite; transition: opacity 300ms ease, background-color 300ms ease; }
.skel-blk { height: 18px; width: 64px; }
.skel-b0 { width: 22px; } .skel-b1 { width: 120px; } .skel-b2 { margin-left: auto; width: 34px; } .skel-b3 { width: 34px; } .skel-b4 { width: 90px; margin-right: auto; } .skel-b5 { width: 60px; } .skel-b6 { width: 28px; border-radius: 50%; }
.skel-progress { position: absolute; top: 48px; left: 0; height: 2px; width: 15%; background: var(--text); opacity: 0.7; transition: width 400ms ease; }
.skel-body { display: flex; min-height: 0; }
.skel-col { flex: none; width: 240px; background: var(--panel); border-right: 1px solid var(--line); }
.skel-lanes { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.skel-row { display: flex; height: 64px; border-bottom: 1px solid var(--line-soft, var(--line)); }
#scene-in.skel[data-side="left"] .skel-row { flex-direction: row; }
#scene-in.skel[data-side="right"] .skel-row { flex-direction: row-reverse; }
.skel-head { flex: none; display: flex; align-items: center; width: var(--skel-head-w, 230px); margin: 8px; padding: 0 12px; box-sizing: border-box; border-radius: 6px; opacity: 0.6; }
.skel-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font: 600 12px / 1 var(--sans); opacity: 0; transition: opacity 300ms ease; }
.skel-lane { position: relative; flex: 1; }
.skel-clip { position: absolute; top: 14px; bottom: 14px; opacity: 0; }
.skel-dock { height: var(--skel-dock-h, 300px); background: var(--panel); border-top: 1px solid var(--line); display: flex; align-items: flex-end; padding: 0 16px; box-sizing: border-box; }
.skel-mix { display: flex; align-items: flex-end; gap: 8px; height: 60%; }
.skel-mix i { display: block; width: 14px; border-radius: 3px 3px 0 0; background: var(--panel-3); transform: scaleY(0); transform-origin: bottom; transition: transform 400ms cubic-bezier(.23, 1, .32, 1); }
/* join: the frame settles, the clips start to draw */
#scene-in.skel:not([data-stage="app"]) .skel-top .skel-blk, #scene-in.skel:not([data-stage="app"]) .skel-head { animation: none; background: var(--panel-2); }
#scene-in.skel:not([data-stage="app"]) .skel-top .skel-blk { background: var(--chrome-2, var(--panel-2)); opacity: 0.7; }
#scene-in.skel:not([data-stage="app"]) .skel-name { opacity: 1; }
#scene-in.skel:not([data-stage="app"]) .skel-clip { opacity: 0.35; }
/* sounds: the clips settle, the mixer fills */
#scene-in.skel[data-stage="sounds"] .skel-clip { animation: none; background: var(--panel-3); opacity: 0.55; }
#scene-in.skel[data-stage="sounds"] .skel-mix i { transform: scaleY(1); }
/* the status chip, under the top bar */
.skel-msg { position: absolute; left: 50%; top: 60px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); white-space: nowrap; }
.skel-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text); animation: skel-pulse 1.2s ease-in-out infinite; }
.skel-step { margin: 0; color: var(--text); font: 600 13px / 1.35 var(--sans); }
.skel-count { margin: 0; color: var(--muted); font: 500 11px / 1 var(--mono); letter-spacing: 0.06em; }
.skel-count:empty { display: none; }
.skel-slow { margin: 0; color: var(--muted-2); font: 500 12px / 1.4 var(--sans); }
.skel-slow[hidden] { display: none; }
.skel-acts { display: flex; gap: 8px; margin-top: 6px; }
.skel-acts[hidden] { display: none; }
/* slow, failed or asking: the chip becomes a card with room for a sentence and the buttons */
#scene-in.skel.is-slow .skel-msg, #scene-in.skel.is-failed .skel-msg, #scene-in.skel.is-asking .skel-msg { flex-direction: column; gap: 6px; padding: 14px 22px; border-radius: 12px; white-space: normal; text-align: center; max-width: min(460px, 90vw); }
#scene-in.skel.is-failed .skel-dot, #scene-in.skel.is-asking .skel-dot { display: none; }
.skel-btn { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); font: 600 12.5px / 1 var(--sans); cursor: pointer; }
.skel-btn.is-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.skel-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
#scene-in.skel.is-failed .skel-progress { opacity: 0; }
#scene-in.skel.is-failed .skel-blk, #scene-in.skel.is-failed .skel-head, #scene-in.skel.is-failed .skel-clip { animation: none; }
@keyframes skel-sh { to { background-position: -200% 0; } }
@keyframes skel-pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .skel-blk, .skel-head, .skel-clip, .skel-dot { animation: none; } .skel-progress, .skel-mix i, .skel-name, .skel-blk, .skel-head, .skel-clip { transition: none; } }

/* ---------- C-477 notifications bell in the top bar (ui/notifbell.js; Avi's pick A) ---------- */
.bell-btn { padding-left: 8px; padding-right: 8px; }
.bell-btn .badge { background: var(--push); color: var(--push-ink); } /* blue = something for you, never amber */
.nb-pop { position: fixed; z-index: 400; width: min(340px, calc(100vw - 16px)); max-height: min(70vh, 520px); overflow-y: auto; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--tip-bg, var(--panel-2)); box-shadow: var(--pop-shadow, var(--shadow)); color: var(--text); font: 13px / 1.4 var(--sans); }
.nb-pop[hidden] { display: none; }
.nb-head { padding: 4px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.nb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nb-note { padding: 8px; border-radius: 8px; }
.nb-note.is-unread { background: color-mix(in srgb, var(--push) 10%, transparent); }
.nb-text { margin: 0; overflow-wrap: anywhere; }
.nb-acts { display: flex; gap: 6px; margin-top: 6px; }
.nb-btn { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); font: 600 12px / 1.3 var(--sans); text-decoration: none; cursor: pointer; }
.nb-btn.is-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.nb-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.nb-done, .nb-muted { margin: 6px 0 0; color: var(--muted); font-size: 12px; }

/* ---------- C-459 emoji: ☺ button + grid, ":" matches (ui/emoji.js; Avi's pick C). Loaded on the dashboard too (dash.html). ---------- */
.emo-btn { flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted-2); font: 17px / 1 var(--sans); cursor: pointer; }
.emo-btn:hover, .emo-btn[aria-expanded='true'] { background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text); }
.emo-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.emo-pop { position: fixed; z-index: 2147482000; width: min(320px, calc(100vw - 16px)); max-height: min(360px, 60vh); display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--tip-bg, var(--panel-2)); box-shadow: var(--pop-shadow, var(--shadow)); color: var(--text); font-family: var(--sans); }
.emo-search { width: 100%; box-sizing: border-box; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--input-bg, var(--panel)); color: var(--text); font: 13px / 1.2 var(--sans); }
.emo-search:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.emo-body { overflow-y: auto; min-height: 0; }
.emo-h { margin: 6px 2px 2px; color: var(--muted); font: 600 10.5px / 1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.emo-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emo-cell { aspect-ratio: 1; padding: 0; border: 0; border-radius: 6px; background: transparent; font: 20px / 1 var(--sans); cursor: pointer; }
.emo-cell:hover, .emo-cell:focus-visible { background: color-mix(in srgb, var(--text) 12%, transparent); outline: 0; }
.emo-none { margin: 8px 4px; color: var(--muted); font-size: 12px; }
.emo-colon { position: fixed; z-index: 2147482000; margin: 0; padding: 4px; list-style: none; min-width: 200px; border-radius: 10px; border: 1px solid var(--line); background: var(--tip-bg, var(--panel-2)); box-shadow: var(--pop-shadow, var(--shadow)); color: var(--text); font: 13px / 1.2 var(--sans); }
.emo-opt { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.emo-opt.is-sel { background: color-mix(in srgb, var(--text) 12%, transparent); }
.emo-opt-e { font-size: 17px; }
.emo-opt-n { color: var(--muted-2); font-family: var(--mono); font-size: 12px; }
/* C-459: DM chips on the room chat panel (ui/dmchips.js; Avi's pick A). */
.dm-chips { display: flex; gap: 4px; padding: 6px 10px; overflow-x: auto; border-bottom: 1px solid var(--line); flex: none; }
.chat.hist-on .dm-chips, .chat.hist-on .dm-view { display: none; }
.dm-chip { position: relative; flex: none; display: inline-flex; align-items: center; gap: 5px; max-width: 140px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted-2); font: 600 12px / 1.2 var(--sans); cursor: pointer; }
.dm-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-chip.on { background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.dm-chip:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.dm-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--push); }
.dm-view { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dm-view[hidden] { display: none; }
.dm-view .dm-list { flex: 1; }
.dm-menu { position: fixed; z-index: 400; display: grid; min-width: 200px; max-height: 50vh; overflow-y: auto; padding: 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--tip-bg, var(--panel-2)); box-shadow: var(--pop-shadow, var(--shadow)); }
.dm-menu-item { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: 13px / 1.2 var(--sans); text-align: left; cursor: pointer; }
.dm-menu-item:hover, .dm-menu-item:focus-visible { background: color-mix(in srgb, var(--text) 10%, transparent); outline: 0; }
.dm-menu-sub, .dm-menu-empty { color: var(--muted); font-size: 12px; }
.dm-menu-empty { margin: 6px 8px; }
/* The panel's grid with the chips row: head, chips, list, composer; a DM view takes the list + composer rows; History the rest. */
.chat { grid-template-rows: 32px auto minmax(0, 1fr) auto; }
.chat > .chat-head { grid-row: 1; }
.chat > .dm-chips { grid-row: 2; }
.chat > .chat-list { grid-row: 3; }
.chat > .chat-form { grid-row: 4; }
.chat > .dm-view { grid-row: 3 / 5; }
.chat > .hist { grid-row: 2 / 5; }
.chat > .chat-list[hidden], .chat > .chat-form[hidden] { display: none; }
   C-451 … C-445 tracks + mixer picks (Avi 2026-11-22; mockups
   04-plans/mockups/2026-11-22_{track-headers,mixer-dock,small-controls}.html).
   Tokens only; amber (--accent) only on sound.
   ========================================================================== */

/* ---- C-451 pick A: one header row in FL order: number (mute) · name · arm · input ▾ · Monitor ---- */
.ph .ph-line { gap: 4px; }
.ph button.ph-arm { width: 20px; height: 20px; min-width: 20px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; font-size: 9px; line-height: 1; color: var(--muted); }
.ph button.ph-mon { height: 20px; min-width: 22px; padding: 0 4px; }
.ph .ph-io.ph-in { flex: 0 1 auto; min-width: 34px; max-width: 84px; height: 20px; padding: 0 4px 0 6px; gap: 3px; }
.ph .ph-line > .ph-name { min-width: 44px; }
.ph button.ph-more { min-width: 16px; padding: 0 2px; }
.ph .ph-io.ph-in .k { font-size: 9px; }
.ph.short .ph-io.ph-in { height: 18px; }
.ph.short button.ph-arm { width: 18px; height: 18px; min-width: 18px; }
.ph-mon.in, .ph-mon.in:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pl-heads.compact .ph .ph-io.ph-in, .pl-heads.compact .ph .ph-mon { display: none; }

/* ---- C-452 pick A: fill never changes on hover ---- */
/* Armed: the red dot + a faint --rec wash on the row (a person's tint wins on a booth row). */
.ph.armed:not(.remote-live):not(.remote-wait) { background-image: linear-gradient(90deg, color-mix(in srgb, var(--rec) 13%, transparent), transparent 75%); }
.ph button.ph-arm.on, .ph button.ph-arm.on:hover:not(:disabled) { background: var(--rec); border-color: var(--rec); color: var(--warn-ink); }
/* Hover is a ring, never a colour swap. */
.ph :is(.ph-arm, .ph-mon, .ph-io):hover:not(:disabled) { box-shadow: 0 0 0 1px var(--select); }
.ph .ph-arm:hover:not(:disabled):not(.on) { background: transparent; color: var(--text); }
/* Selected: a white edge (amber is for sound). */
.ph.sel { box-shadow: inset 2px 0 0 var(--select); }

/* ---- C-476 pick A: ⏻, the whole 26×26 header corner is the button ---- */
.dev .dvh { padding-left: 0; }
.dev .dev-pwr, [data-mat="ink"] .dev .dev-pwr {
  width: 26px; height: 26px; flex: none; margin-right: -4px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 9px 0 0 9px; background: transparent; box-shadow: none;
  color: var(--muted);
}
.dev .dev-pwr.on, .dev .dev-pwr.on:hover:not(:disabled), [data-mat="ink"] .dev .dev-pwr.on, [data-mat="ink"] .dev .dev-pwr.on:hover:not(:disabled) { background: transparent; box-shadow: none; color: var(--meter-lo); }
.dev .dev-pwr:hover:not(:disabled) { background: var(--panel-2); box-shadow: none; }
.dev .dev-pwr.on:hover:not(:disabled) { background: var(--panel-2); }
.dev-pwr .pwr-ic { display: block; }
.dev-offtag { flex: none; font: 600 9px/1 var(--mono); letter-spacing: 0.12em; color: var(--muted); }
.dev-offtag[hidden] { display: none; }
.dev-me { flex: none; font: 600 9px/1 var(--mono); letter-spacing: 0.12em; padding: 3px 5px; border-radius: 3px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.dev-me[hidden] { display: none; }
.dev-me:hover { color: var(--text); }
.dev-me[aria-pressed="true"] { color: var(--text); background: var(--panel-2); border-color: var(--muted); }
.dev.off .dev-name { color: var(--muted); }

/* The same glyph on the mixer: chain power (.fx-pw / .fxp-power) and each slot. */
.strip .fx-pw, .fx-panel .fxp-power, .strip .fx-row .fx-dot, .fx-panel .fx-row .fx-dot {
  flex: none; width: 16px; height: 16px; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 4px; background: transparent; box-shadow: none; color: var(--meter-lo);
}
.strip .fx-pw[aria-pressed=false], .fx-panel .fxp-power[aria-pressed=false],
.strip .fx-dot[aria-pressed=false], .fx-panel .fx-dot[aria-pressed=false],
.fx-panel .fx-dot.swiping[data-swipe-on=false], .strip .fx-dot.swiping[data-swipe-on=false] { color: var(--muted); background: transparent; box-shadow: none; }
.strip .fx-dot[aria-pressed=true], .fx-panel .fx-dot[aria-pressed=true], .fx-panel .fx-dot.swiping[data-swipe-on=true], .strip .fx-dot.swiping[data-swipe-on=true] { color: var(--meter-lo); background: transparent; }
.strip .fx-pw.none { color: var(--faint); }
.strip .fx-pw:not(.none):hover, .fx-panel .fxp-power:hover, .fx-panel .fx-dot:hover { border: 0; box-shadow: 0 0 0 1px var(--select); }
.fx-panel .fx-grip { flex: none; color: var(--faint); font-size: 10px; letter-spacing: -2px; cursor: grab; padding: 0 2px; }
.fx-panel .fx-row:hover .fx-grip { color: var(--muted-2); }

/* ---- C-460 pick D: one bottom block on every strip; inserts above, scrolling ---- */
/* inserts (same height everywhere) | pan | fader (one height) | dB | M/S | name plate */
[data-mat="ink"] #mixer:not(.narrow) .strip { grid-template-rows: minmax(87px, 1fr) 34px minmax(80px, 160px) 14px 18px 46px; }
/* The master has no Out slot or M/S: same row heights anyway, so its fader lines up. */
[data-mat="ink"] #mixer:not(.narrow) .strip.master .lufs, [data-mat="ink"] #mixer:not(.narrow) .strip.master .sname { align-self: end; }
.strip .fx-area { overflow: hidden; }
.strip .fx-peek {
  display: grid; grid-auto-rows: 18px; gap: 2px; align-content: start;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; cursor: default;
}
.strip .fx-peek-row { display: flex; align-items: center; gap: 1px; height: 18px; min-width: 0; padding: 0; border-radius: var(--r-ctl, 4px); background: var(--panel-3); overflow: hidden; line-height: 1; }
.strip .fx-peek-row::before { content: none; }
.strip .fx-pdot { flex: none; width: 16px; height: 18px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--meter-lo); display: grid; place-items: center; }
.strip .fx-peek-row.off .fx-pdot { color: var(--muted); }
.strip .fx-pname { flex: 1; min-width: 0; height: 18px; padding: 0 4px 0 1px; border: 0; border-radius: 0; background: transparent; text-align: left; font-size: var(--fs-small); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.strip .fx-peek-row.off .fx-pname { color: var(--faint); }
.strip .fx-peek-row:hover { box-shadow: inset 0 0 0 1px var(--line); }
.strip .fx-pdot:hover:not(:disabled), .strip .fx-pname:hover:not(:disabled) { background: transparent; border: 0; }
.strip .fx-pname:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--muted-2); }
.strip .fx-blank {
  width: 100%; height: 18px; padding: 0 5px; text-align: left;
  border: 1px dashed color-mix(in srgb, var(--line) 75%, transparent); border-radius: var(--r-ctl, 4px);
  background: transparent; color: var(--faint); font-size: var(--fs-small); line-height: 1;
}
.strip .fx-blank:hover:not(:disabled), .strip .fx-blank:focus-visible { background: transparent; border-color: var(--muted-2); color: var(--text); }
#mixer.narrow .strip .fx-peek { display: none; }
/* The name plate: name + ↑ (to the track). */
.strip .sname-row { display: flex; align-items: flex-end; gap: 1px; width: 100%; min-width: 0; }
.strip .sname-row .sname { flex: 1; min-width: 0; }
.strip .strip-up { flex: none; width: 16px; height: 18px; padding: 0; border: 0; background: transparent; color: var(--faint); font-size: 11px; line-height: 1; }
.strip .strip-up:hover:not(:disabled), .strip .strip-up:focus-visible { background: transparent; color: var(--text); }
.strip .strip-up[hidden], #mixer.narrow .strip .strip-up { display: none; }
#mixer.narrow .strip .sname-row { display: contents; }
/* Track → strip (double-click a header): a 600 ms white ring. */
.strip.strip-flash { animation: strip-flash 600ms var(--ease-out); }
@keyframes strip-flash { from { box-shadow: 0 0 0 2px var(--select); } }
@media (prefers-reduced-motion: reduce) { .strip.strip-flash { animation-duration: 250ms; } }
/* The Inserts panel: input at the top, output at the bottom, in every width. */
.fx-panel .fxp-iorow:not([hidden]) { display: flex; }

/* ---- C-462 pick A: the wheel over a fader / pan knob (ui/hoverwheel.js) ---- */
/* The cap keeps its own column: 8 px between the fader well and the meter. */
[data-mat="ink"] #mixer:not(.narrow) .strip:not(.master) .fader-row canvas.meter { margin-left: 4px; }
[data-mat="ink"] .strip .fader-well.wheel-hot .fader::-webkit-slider-thumb { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 1px var(--select); }
[data-mat="ink"] .strip .fader-well.wheel-hot .fader::-moz-range-thumb { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 1px var(--select); }
[data-mat="ink"] .strip .fader-row.hovering .fader-bubble { opacity: 1; transform: translateY(-50%) scale(1); }
.strip .knob { position: relative; }
.strip .knob.wheel-hot .knob-dial { box-shadow: 0 0 0 1px var(--select); }
.strip .wheel-bubble {
  position: absolute; left: 50%; bottom: 100%; z-index: 3; transform: translate(-50%, -2px);
  padding: 2px 5px; border-radius: 4px; white-space: nowrap; pointer-events: none;
  background: var(--fill); color: var(--on-fill); font: 500 var(--fs-small)/1.2 var(--mono); font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity var(--t-pop, 0.15s) ease;
}
.strip .knob.bubble-on .wheel-bubble { opacity: 1; }

/* ---- C-445 Rule 1 pick A: an invisible 24 px hit pad on small controls; looks unchanged ---- */
.hit-pad, .ph-fold, .ph-m, .ph button.ph-arm, .ph-mon, .ph-more, .ph-revert, .ph-person, .ph-auto-led, .ph-mini,
.strip .fx-pw, .fx-panel .fxp-power, .fx-panel .fx-dot, .strip .fx-pdot, .strip .strip-up, .rk-led, .dev-del, .kit-fold { position: relative; }
.hit-pad::after, .ph-fold::after, .ph-m::after, .ph button.ph-arm::after, .ph-mon::after, .ph-more::after, .ph-revert::after, .ph-person::after, .ph-auto-led::after, .ph-mini::after,
.strip .fx-pw::after, .fx-panel .fxp-power::after, .fx-panel .fx-dot::after, .strip .fx-pdot::after, .strip .strip-up::after, .rk-led::after, .dev-del::after, .kit-fold::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: max(100%, 24px); height: max(100%, 24px); transform: translate(-50%, -50%);
}
/* The track-height grip: 4 px to see, 10 px to grab. */
.ph-size::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; }

/* ---- C-445 Rule 2 pick A: closing a panel shows Reopen (ui/reopentoast.js) ---- */
.reopen-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text);
  font-size: var(--fs-ui); box-shadow: 0 6px 24px color-mix(in srgb, var(--bg) 60%, transparent);
  animation: reopen-in var(--t-pop, 0.15s) var(--ease-out);
}
.reopen-toast button { padding: 2px 10px; border-color: var(--muted-2); color: var(--text); }
.reopen-toast button:hover:not(:disabled) { border-color: var(--select); background: transparent; }
@keyframes reopen-in { from { opacity: 0; transform: translate(-50%, 6px); } }
@media (prefers-reduced-motion: reduce) { .reopen-toast { animation: none; } }
.bar-menu .bm-check { flex: none; width: 12px; color: var(--text); }
.ph-person[hidden], .ph-mon[hidden], .ph-io[hidden], .ph-arm[hidden] { display: none !important; } /* C-451: these set display themselves */
/* C-451: the booth line only on a booth row (.ph-line's display: flex came later and always won). */
.ph .ph-line.ph-remote-line { display: none; }
.ph.booth:not(.short) .ph-line.ph-remote-line { display: flex; }
/* C-444: where an overlapping take went (ui/overlapui.js), a chip on the new take. */
.take-chip-wrap { position: fixed; z-index: 60; transition: opacity 0.3s ease; }
.take-chip-wrap.gone { opacity: 0; }
.take-chip { display: inline-flex; align-items: center; gap: 0; background: var(--tip-bg); color: var(--on-chrome, var(--text)); border: 1px solid var(--tip-line, var(--line)); border-radius: 999px; padding: 3px 9px; font: inherit; font-size: 11px; white-space: nowrap; cursor: pointer; box-shadow: var(--shadow); }
.take-chip b { font-weight: 600; margin-left: 0.25em; }
.take-chip:hover, .take-chip:focus-visible { border-color: var(--select); }
.take-chip-caret { color: var(--muted-2); }
.ov-controls { display: grid; gap: 0.35rem; margin-top: 0.4rem; }
.ov-controls .set-sub:first-child { margin-top: 0; }
/* C-443: take lane heads read as a take ("Take 3 · 2:05 PM"), not as an automation lane. */
.ph-take .ph-auto-label, body.auto-armed .ph-take .ph-auto-label { font-family: inherit; font-size: var(--fs-small); letter-spacing: 0; text-transform: none; color: var(--muted-2); }

/* C-475 Settings: search in the title bar, Look › Customize… fold, Details folds. */
#settings .panel-head { gap: 10px; }
#settings-search { margin-left: auto; width: min(220px, 40vw); height: 26px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--input-bg, var(--panel-2)); color: var(--text); font: inherit; font-size: var(--fs-small); }
#settings-search:focus-visible { outline: none; border-color: var(--select); }
#settings-body.searching .settings-tabs [aria-selected="true"] { box-shadow: none; }
/* Searching shows every tab: no tab reads as picked. */
#settings-body.searching .settings-tabs button[aria-selected="true"] { background: transparent; color: var(--muted-2); }
/* One height for every tab, so the dialog doesn't jump when you switch (a short screen still wins). */
@media (min-width: 641px) { #settings .settings-card { height: min(720px, calc(100vh - 48px)); } }
#settings-body.searching .settings-content > [role="tabpanel"]:not([hidden])::before { content: attr(data-category); display: block; margin: 10px 0 4px; font-size: var(--fs-small); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.set-customize { margin-top: 10px; border-top: 1px solid var(--line-soft, var(--line)); padding-top: 8px; }
.set-customize > summary { cursor: pointer; list-style: none; padding: 6px 0; color: var(--text); }
.set-customize > summary::-webkit-details-marker { display: none; }
.set-customize > summary::before { content: '▸ '; color: var(--muted-2); }
.set-customize[open] > summary::before { content: '▾ '; }
.set-details > summary { cursor: pointer; color: var(--muted-2); font-size: var(--fs-small); padding: 4px 0; }
.set-noresult { padding: 12px 0; }

/* C-465 undo history: My edits · Room · Versions in the History tab (ui/edithistory.js). */
.hist { display: flex; flex-direction: column; }
.hist > .hist-list { flex: 1 1 auto; min-height: 0; }
.hist-seg { display: flex; gap: 2px; padding: 8px 8px 0; }
.hist-seg-btn { flex: 1; font: inherit; font-size: 11px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--muted-2); cursor: pointer; }
.hist-seg-btn[aria-pressed="true"] { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.edit-row { grid-template-columns: 14px minmax(0, 1fr) auto; }
.edit-row.redo { color: var(--muted); }
.edit-row.redo .hist-title { font-style: italic; }
.edit-row.fixed { cursor: default; }
.edit-row.fixed:hover { background: transparent; }
.edit-mark { color: var(--muted-2); font-size: 9px; text-align: center; }
.edit-note { grid-column: 2 / -1; font-size: 10.5px; color: var(--muted); }
.edit-now { margin: 2px 12px; padding-top: 2px; border-top: 1px solid var(--select); font: 9px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.edit-face { width: 14px; height: 14px; display: inline-grid; place-items: center; font-size: 8px; font-weight: 700; color: var(--on-color, var(--bg)); }

/* C-470 booth band (ui/boothband.js): slate, red only while a take rolls. */
.ph-booth { background: var(--folder-bg, var(--panel-2)); border-top: 1px solid var(--folder); box-shadow: inset 2px 0 0 var(--folder); }
.ph-booth .ph-line { gap: 6px; font-size: 11px; }
.ph.in-booth { box-shadow: inset 2px 0 0 var(--folder); }
.booth-title { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.booth-faces, .blc-faces { display: inline-flex; }
.booth-face { width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 8.5px; font-weight: 700; background: var(--user, var(--muted)); color: var(--on-color, var(--bg)); box-shadow: 0 0 0 1.5px var(--panel); }
.booth-face + .booth-face { margin-left: -4px; }
.booth-rec { font: 600 9.5px var(--mono); letter-spacing: 0.06em; color: var(--rec-dot, var(--rec)); }
.booth-count { color: var(--muted-2); font-size: 10.5px; white-space: nowrap; }
.booth-listen-card { bottom: 16px; left: 16px; right: auto; width: min(300px, calc(100vw - 32px)); gap: 0.45rem; }
.blc-head { display: flex; align-items: center; gap: 8px; }
.blc-sub { margin: 0; line-height: 1.4; }
.blc-meter { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.blc-meter i { display: block; height: 100%; width: 0; background: var(--muted-2); transition: width 0.25s ease; }
.blc-meter.on.live i { width: 72%; background: var(--rec); }
.blc-btns { display: flex; gap: 6px; justify-content: flex-end; }
.pl-body .ph-booth .ph-line, .pl-body.left .ph-booth .ph-line { flex-direction: row; justify-content: flex-start; }
.ph-booth .booth-title { display: none; } /* the lane strip says it in full; the head keeps faces, REC, count, Listen in */
/* ---------- Browser on the right (C-463: Logic / Studio Pro / Cubase layouts; main.js applyBrowser, pref browserSide) ---------- */
.workspace.browser-right { grid-template-columns: minmax(0, 1fr) var(--browser-w, 460px); }
.workspace.browser-right.chat-open { grid-template-columns: minmax(0, 1fr) var(--browser-w, 460px) 280px; }
.workspace.browser-right.no-browser { grid-template-columns: minmax(0, 1fr); }
.workspace.browser-right.no-browser.chat-open { grid-template-columns: minmax(0, 1fr) 280px; }
.workspace.browser-right > .playlist { order: 0; }
.workspace.browser-right > .browser { order: 1; border-right: 0; border-left: 1px solid var(--line); }
.workspace.browser-right > .chat { order: 2; }
.workspace.browser-right .br-resize { right: auto; left: 0; }
html[data-boot-browser='right'] .workspace.no-browser { grid-template-columns: minmax(0, 1fr) var(--browser-w, 460px); }
html[data-boot-browser='right'] .workspace.no-browser > .browser { order: 1; }
@media (max-width: 760px) { .workspace.browser-right, .workspace.browser-right.chat-open { grid-template-columns: 1fr; } }
/* "Also use <DAW>'s layout?" (ui/layoutask.js): the yes is the plain light button, not a warning. */
.del-foot .lay-go { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
/* Dialogs over floating windows (C-463: FL's layout opens three; main.js raisePanel keeps them under 600). */
#settings.overlay, .overlay.del-dialog { z-index: 800; }
/* The start page (join / sign-in) shows no DAW controls (Avi 2026-11-22): no floating
   windows, no Settings, no dialogs over it until the room is joined. */
body:has(> #join:not([hidden])) > :is(.floating-panel, #settings, .del-dialog) { visibility: hidden; }
/* ---------- top bar + Musical Typing (C-453, C-439, C-464; Avi's picks 2026-11-22) ----------
   Mockups 04-plans/mockups/2026-11-22_top-bar.html (B) and _musical-typing.html.
   2 px inside a group, 12 px between groups. The transport is one raised pod
   in the centre (ui/transport.js keeps it centred; .t-flow when it can't be).
   Tools: an always-visible segmented row after the song name, folding into
   the Tool menu under 1180 px (until UI vision mockup step 5 moved them to the tool pill). */
/* 4 px between neighbours in a group (song name, panels, people), plus 8 px
   at each group's edge = 12 px between groups; 2 px between buttons in a box. */
header.transport { gap: 4px; }
header.transport .tgroup, header.transport .t-transport .tgroup { gap: 2px; }
@media (max-width: 1720px) { header.transport { gap: 4px; } }
@media (max-width: 1500px) { header.transport { gap: 4px; } header.transport .tgroup { gap: 2px; } }
/* (The brand's 8 px right margin went with the tools: they moved to the editing bar, 2026-11-22.) */
/* The pod's neighbours carry no margin: in flow (.t-flow) it centres in the
   free space by equal auto margins, which keep well over 12 px either side. */
/* Simple bar: the panel icons are one quiet outlined box, icons only. */
body.bar-simple .transport .view-switch { padding: 2px; background: transparent; border-color: var(--line); border-radius: 8px; }
body.bar-simple .transport .vbtn { flex-direction: row; width: 30px; height: 28px; }
body.bar-simple .transport .vbtn .ic { width: 15px; height: 15px; }
body.bar-simple .transport .vbtn .vlabel { display: none; }
header.transport > .t-transport {
  gap: 2px; height: 38px; padding: 0 4px;
  background: var(--panel-3); border: 1px solid var(--line); border-radius: 10px;
}
.t-transport > .tsep { width: 1px; height: 20px; margin: 0 6px; background: var(--line); flex: none; }
.tpill .tsep { display: none; }
header.transport > .t-transport .lcd { padding-block: 4px; }
/* Under 1180 px the pod sits after the tools instead of centred in the gap. */
@media (max-width: 1180px) {
  .transport.t-flow > .t-transport { margin-inline: 8px auto; }
  header.transport > .t-transport { padding: 0 2px; }
  .t-transport > .tsep { margin: 0 3px; }
}

/* Segmented tool row: current tool filled. */
header.transport #pl-tools, .tbar-tools #pl-tools { gap: 1px; padding: 2px; height: 32px; align-items: center; background: var(--bg); border: 0; border-radius: 8px; }
:is(header.transport, .tbar-tools) #pl-tools .pl-tool { width: 30px; height: 28px; min-height: 0; padding: 0 !important; border-radius: 6px; border-color: transparent; box-shadow: none; }
:is(header.transport, .tbar-tools) #pl-tools .pl-tool .ic { width: 15px; height: 15px; }
:is(header.transport, .tbar-tools) #pl-tools .pl-tool.on { background: var(--chrome-on); color: var(--chrome-on-ink); border-color: var(--chrome-on); box-shadow: none; }

/* Corner row over the track headers: Snap + the Musical Typing chip. It
   follows the header side (right headers: the row's right end). */
.playlist { grid-template-rows: auto minmax(0, 1fr); }
.pl-toolbar { min-height: 32px; }
.playlist:has(#pl-keys.on) .pl-toolbar { min-height: 46px; }
.pl-cornerrow { display: flex; align-items: center; gap: 8px; flex: none; min-width: calc(var(--head-w, 230px) - 8px); }
.playlist:has(> .pl-body.right) .pl-cornerrow { order: 50; margin-left: auto; justify-content: flex-end; }
#pl-grid.pl-snap { display: inline-flex; align-items: center; gap: 6px; height: 24px; min-height: 0; margin: 0; padding: 0 8px; border-radius: 6px; border: 1px solid transparent; background: var(--panel-3); color: var(--text); font: 500 11.5px var(--sans); letter-spacing: 0; white-space: nowrap; cursor: pointer; }
#pl-grid.pl-snap:hover { border-color: var(--line); }
#pl-grid.pl-snap .ic { width: 13px; height: 13px; }
#pl-grid.pl-snap .caret { font-size: 9px; color: var(--muted); }

/* The chip: off = "Keys" + its toggle key; on = Keys <octave> Esc ✕, the
   octave steps, the strip and velocity. Lit keys are amber (they sound). */
.tk-host { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.pl-cornerrow > .tk-host:not(.on) { margin-left: auto; }
.playlist:has(> .pl-body.right) .pl-cornerrow > .tk-host { margin-left: 0; }
:is(#pl-keys, #roll-keys) .tk-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; min-height: 0; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line-soft); background: var(--panel-3); color: var(--muted-2); font: 500 11.5px var(--sans); white-space: nowrap; cursor: pointer; }
:is(#pl-keys, #roll-keys) .tk-chip:hover { color: var(--text); border-color: var(--line); }
:is(#pl-keys, #roll-keys) .tk-chip.on { background: var(--chrome-on); color: var(--chrome-on-ink); border-color: var(--chrome-on); }
/* Ghost notes toggle (C-497; mockup 2026-11-22_piano-roll-toolbar.html option A): the Keys chip's look, beside it. */
#roll-ghost { display: inline-flex; align-items: center; gap: 6px; height: 24px; min-height: 0; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line-soft); background: var(--panel-3); color: var(--muted-2); font: 500 11.5px var(--sans); white-space: nowrap; box-shadow: none; }
#roll-ghost .ic { width: 14px; height: 14px; flex: none; }
.roll-toolbar.ghost-fold #roll-ghost .ghost-label { display: none; }
.roll-toolbar.ghost-fold #roll-keys .tk-chip:not(.on) .tk-name { display: none; } /* the keyboard icon + M stay */
#roll-ghost:hover { color: var(--text); border-color: var(--line); }
/* On reads as the mockup draws the chip (quiet, text colour); off steps back (transparent, muted). */
#roll-ghost.on { color: var(--text); border-color: var(--line); }
#roll-ghost:not(.on) { background: transparent; color: var(--muted); }
.tk-chip .ic { width: 13px; height: 13px; flex: none; }
.tk-kc { font: 500 10px/1.3 var(--mono); padding: 0 5px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted-2); background: var(--bg); }
.tk-chip.on .tk-kc { border-color: color-mix(in srgb, var(--chrome-on-ink) 25%, transparent); background: transparent; color: var(--chrome-on-ink); }
.tk-x { font-size: 12px; opacity: 0.75; }
:is(#pl-keys, #roll-keys) .tk-step { height: 24px; min-height: 0; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 500 11px var(--mono); white-space: nowrap; }
:is(#pl-keys, #roll-keys) .tk-step:hover { background: var(--panel-2); color: var(--text); }
.tk-vel { display: inline-flex; align-items: center; gap: 3px; font: 500 11px var(--mono); color: var(--muted); white-space: nowrap; }
.tk-piano { --tk-w: 14px; --tk-bw: 9px; position: relative; display: flex; height: 38px; flex: none; user-select: none; }
.tk-w, .tk-b { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; box-sizing: border-box; padding-bottom: 2px; font: 500 9px/1.05 var(--mono); }
.tk-w { width: var(--tk-w); height: 100%; background: var(--key-white); color: var(--key-label); border-right: 1px solid var(--key-black); border-radius: 0 0 3px 3px; }
.tk-b { position: absolute; top: 0; z-index: 1; width: var(--tk-bw); height: 60%; background: var(--key-black); color: var(--muted-2); border-radius: 0 0 2px 2px; box-shadow: inset 0 0 0 1px var(--line-soft); font-size: 8px; }
.tk-piano .lit { background: var(--accent); color: var(--accent-ink); }
@media (prefers-reduced-motion: no-preference) { .tk-w, .tk-b { transition: background-color 60ms linear; } }
.roll-toolbar .tk-host .tk-piano { height: 30px; }
/* ---------- the editing bar + track corner (C-453 follow-up, C-441; Avi's picks 2026-11-22) ----------
   Mockup 04-plans/mockups/2026-11-22_second-bar.html: 1 A, 2 A, 3 B, 4 A, 5 A, 6 A.
   The bar under the top bar: tools left, the panel words centred in the free
   space (quiet segmented box), Snap / Quantize / Keys over the track headers.
   Under 1180 px the tools fold to the Tool menu and the words to Panels. */
.pl-toolbar.editbar { min-height: 40px; gap: 8px; padding: 0 8px; }
.pl-toolbar .sb-gap { flex: 1 1 0; min-width: 8px; }
.pl-toolbar .sb-panels { display: inline-flex; align-items: center; gap: 4px; flex: none; }
/* Panel words: the quiet segmented box; open = raised grey, not white. */
.pl-toolbar #t-view { display: flex; gap: 1px; padding: 2px; height: 32px; align-items: center; background: var(--bg); border: 0; border-radius: 8px; }
.pl-toolbar #t-view > .vbtn { display: inline-flex; align-items: center; height: 28px; min-height: 0; width: auto; padding: 0 10px !important; border-radius: 6px; border: 0; background: transparent; color: var(--muted); font: 500 12px/1 var(--sans); letter-spacing: 0; box-shadow: none; white-space: nowrap; flex-direction: row; }
.pl-toolbar #t-view > .vbtn .ic { display: none; }
.pl-toolbar #t-view > .vbtn .vlabel { display: inline; font: inherit; }
.pl-toolbar #t-view > .vbtn:hover { color: var(--text); background: var(--panel-2); }
.pl-toolbar #t-view > .vbtn[aria-pressed="true"] { background: var(--chrome-2); color: var(--text); }
body.bar-simple .pl-toolbar :is(#t-v-roll, #t-v-rack, #t-v-mixer, #t-v-devices):not(.tb-off) { display: inline-flex; }
.pl-toolbar #pl-side { width: 30px; height: 28px; min-height: 0; padding: 0 !important; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.pl-toolbar #pl-side:hover { color: var(--text); background: var(--panel-2); }
.pl-toolbar #pl-side .ic { width: 15px; height: 15px; }
/* The fold menus: dark chips like Snap. */
body .pl-toolbar .bar-menus { display: none; }
body .pl-toolbar .bar-menus > button.bm-btn:not(.on):not(.active), .pl-toolbar .bm-btn { display: inline-flex; align-items: center; gap: 6px; height: 24px; min-height: 0; padding: 0 8px !important; border-radius: 6px; border: 1px solid transparent; background: var(--panel-3); color: var(--text); font: 500 11.5px var(--sans); white-space: nowrap; }
.pl-toolbar .bm-btn .ic, .pl-toolbar .bm-btn svg { width: 13px; height: 13px; }
body .pl-toolbar .bar-menus > button.bm-btn:hover { border-color: var(--line); background: var(--panel-3); }
@media (max-width: 1180px) {
  .pl-toolbar #t-view { display: none; }
  body .pl-toolbar .bar-menus { display: flex; }
}
/* Fit steps (C-439 Windows, 1280-1536 px at 125/150 %): ui/barmenus.js
   fitEditBar adds them one at a time while the bar overflows. */
.pl-toolbar.fit-panels #t-view { display: none; }
body .pl-toolbar.fit-panels #bar-menus { display: flex; }
.editbar.fit-vel #pl-keys .tk-vel, .editbar.fit-oct #pl-keys .tk-step, .editbar.fit-strip #pl-keys .tk-piano { display: none; }

/* Track corner: one line, "Tracks" + the light + Track pill (pick 3 B),
   centred in the 53 px that lines up with the ruler, 8 px from the edge
   like the Snap / Keys chips above it. Markers is hidden for now. */
.pl-heads .pl-corner { display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.pl-corner .pl-corner-lbl { flex: none; }
.pl-corner .pl-add { position: static; transform: none; margin-left: auto; height: 24px; padding: 0 9px 0 7px; }
.pl-corner .pl-add:active { transform: scale(0.96); }
@media (prefers-reduced-motion: reduce) { .pl-corner .pl-add:active { transform: none; } }
.pl-heads.compact .pl-corner .pl-add { width: 24px; padding: 0; }

/* The dock ✕ only while there's a docked panel open to close (C-441). */
body.dock-x-off .dock-tabs > .panel-close { display: none; }

/* Quantize split chip (pick 4 A): same chip as Snap; Q left, ▾ right (24 px hit). */
.qz-split { display: inline-flex; align-items: stretch; height: 24px; flex: none; border-radius: 6px; background: var(--panel-3); border: 1px solid transparent; }
.qz-split:hover { border-color: var(--line); }
.pl-toolbar .qz-split > button { display: inline-flex; align-items: center; gap: 6px; height: 22px; min-height: 0; margin: 0; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: 500 11.5px var(--sans); white-space: nowrap; box-shadow: none; }
.pl-toolbar .qz-split > .qz-main { padding: 0 6px 0 4px !important; }
.pl-toolbar .qz-split > .qz-more { min-width: 24px; justify-content: center; padding: 0 !important; border-left: 1px solid var(--line-soft); border-radius: 0 6px 6px 0; }
.pl-toolbar .qz-split > button:hover { background: var(--panel-2); }
.qz-split .caret { font-size: 9px; color: var(--muted); }
.qzb { font: 600 10px/1 var(--mono); width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; background: var(--bg); color: var(--muted-2); flex: none; }
.pl-toolbar .qz-split > .qz-main:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) { .pl-toolbar .qz-split > .qz-main:active { transform: none; } }

/* Timeline scrub strip (pick 5 A): the playlist ruler is 53 px now (bar
   numbers 19 → 26 px), so the header corner matches it. The cursor over the
   strip is a small playhead (ui/playlist.js SCRUB_CURSOR), drawn black on a
   white halo so it reads on every theme (a cursor image can't use tokens). */
.playlist .pl-heads { grid-template-rows: 53px 1fr; }
html { --cursor-playhead: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='22' viewBox='0 0 18 22'%3E%3Cpath d='M2 2h14l-7 8z' fill='white' stroke='black' stroke-width='1.3' stroke-linejoin='round'/%3E%3Cpath d='M9 10v10' stroke='black' stroke-width='3.2'/%3E%3Cpath d='M9 10v10' stroke='white' stroke-width='1.4'/%3E%3C/svg%3E") 9 2, col-resize; }

/* Piano roll lower-lane tabs (pick 6 A; ui/lanetabs.js): icon + word, the
   quiet segmented box like the panel words; CC lanes behind CC ▾. */
.lane-footer .lane-tabs { display: inline-flex; gap: 1px; padding: 2px; background: var(--bg); border-radius: 7px; flex: none; }
.lane-footer .lane-tabs > .lt { display: inline-flex; align-items: center; gap: 5px; height: 24px; min-height: 0; padding: 0 8px !important; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font: 500 11.5px/1 var(--sans); white-space: nowrap; box-shadow: none; }
.lane-footer .lane-tabs > .lt .ic { width: 14px; height: 14px; flex: none; }
.lane-footer .lane-tabs > .lt:hover:not(:disabled) { color: var(--text); background: var(--panel-2); }
.lane-footer .lane-tabs > .lt.on { background: var(--chrome-2); color: var(--text); }
/* Lane hidden (click the open tab): the open tab keeps a quiet outline only. */
.lane-footer .lane-tabs.lane-hidden > .lt.on { background: transparent; color: var(--muted-2); box-shadow: inset 0 0 0 1px var(--line); }
.lane-footer .lane-tabs > .lt:disabled { opacity: 0.4; }
.lane-footer .lane-tabs .caret { font-size: 9px; color: var(--muted); }

/* The editing bar runs full width under the top bar (Avi 2026-11-22, mockup
   §8 A): its own body grid row, so the inspector, Browser, side zones,
   playlist and dock all sit below it. Snap · Quantize · Keys at its right end. */
body { grid-template-rows: var(--header-h) auto minmax(120px, 1fr) 6px var(--dock-h); }
body.dock-empty { grid-template-rows: var(--header-h) auto minmax(120px, 1fr) 0 0; }
body > .editbar { grid-column: 1 / -1; grid-row: 2; border-bottom: 1px solid var(--line); border-radius: 0; }
body > .workspace { grid-row: 3; }
body > #splitter { grid-row: 4; }
body > #dock { grid-row: 5; }
body > .inspector, .inspector { grid-row: 3 / -1; }
.zone-left, .zone-right { grid-row: 3 / -1; }
.playlist { grid-template-rows: minmax(0, 1fr); }
.editbar .pl-cornerrow { order: 50; margin-left: 0; min-width: 0; justify-content: flex-end; }
.editbar .pl-cornerrow > .tk-host:not(.on) { margin-left: 0; }
body:has(#pl-keys.on) .editbar { min-height: 46px; }

/* Tool row on top of the playlist / piano-roll right-click menus (pick 9 A):
   the editing bar's segmented look; current tool lit. */
.ctx-tools { display: flex; gap: 1px; padding: 2px; margin: 2px 2px 4px; background: var(--bg); border-radius: 8px; }
.ctx-tools > .ctx-tool { flex: 1 1 0; min-width: 28px; height: 28px; min-height: 0; padding: 0; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted-2); box-shadow: none; }
.ctx-tools > .ctx-tool .ic, .ctx-tools > .ctx-tool svg { width: 15px; height: 15px; }
.ctx-tools > .ctx-tool:hover { color: var(--text); background: var(--panel-2); }
.ctx-tools > .ctx-tool.on { background: var(--chrome-on); color: var(--chrome-on-ink); }
.ctx-tools > .ctx-tool:focus-visible { outline: 2px solid var(--select); outline-offset: 1px; }

/* ============================================================
/* ---------- Device power (Avi 2026-11-22, picks 1A + 2A; 04-plans/mockups/2026-11-22_device-power.html) ----------
   The Devices header's all-devices switch is a "⏻ All" pill (was a 12 px colour square); the instrument
   card's head gets the same ⏻ as the effects (.dev-src-pwr reuses .dev-pwr). */
.dhead .dev-all, .dhead .dev-all.on, .dhead .dev-all:hover:not(:disabled), .dhead .dev-all.on:hover:not(:disabled) {
  width: auto; height: 22px; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px 0 6px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--panel-3); color: var(--muted);
  font: 600 11.5px / 1 var(--sans); box-shadow: none; cursor: pointer;
}
.dhead .dev-all .pwr-ic { display: block; color: var(--muted); }
.dhead .dev-all.on { color: var(--text); }
.dhead .dev-all.on .pwr-ic { color: var(--meter-lo); }
.dhead .dev-all:hover:not(:disabled) { border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.dhead .dev-all:focus-visible { outline: 2px solid var(--select, var(--text)); outline-offset: 2px; }
.dhead .dev-all[hidden] { display: none; }
.dev-src-pwr[hidden] { display: none; }
/* Device power pick 1A: the track header's "⏻ off" chip while the instrument is off (ui/playlist.js refs.ioff). */
.ph-ioff { flex: none; display: inline-flex; align-items: center; gap: 3px; height: 16px; padding: 0 5px 0 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-3); color: var(--muted-2); font: 600 9.5px/1 var(--mono); letter-spacing: 0.06em; cursor: pointer; }
.ph-ioff .pwr-ic { display: block; color: var(--muted); }
.ph-ioff:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.ph-ioff:focus-visible { outline: 2px solid var(--select, var(--text)); outline-offset: 1px; }
.ph-ioff[hidden] { display: none; }
/* Drums card (built-in Drums: kit preset + Tune / Decay; ui/drumscard.js, drums pick 1A 2026-11-22). Reuses the Synth card's head. */
.dev-drm { --dev-col-w: 200px; min-width: calc(var(--dev-col-w) + 22px); }
.dev-drm .dvb { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; columns: auto; background: transparent; padding: 0; }
.drm-knobs { flex: 1; min-height: 0; grid-template-columns: repeat(2, 1fr); align-content: center; gap: 2px; padding: 0 2px; }

/* ============================================================   Piano roll toolbar (Avi 2026-11-22, mockup 04-plans/mockups/2026-11-22_roll-open-questions.html, all A):
   Grid chip like the playlist's Snap chip, one track chip (clip name only when it differs),
   the segmented tool row (folds back to Tool ▾ when the toolbar is narrow). */
.vh-keep { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.roll-toolbar .roll-chip.roll-grid, .roll-toolbar .roll-chip.roll-trackchip { height: 24px; min-height: 0; padding: 0 8px !important; border-radius: 6px; border: 1px solid transparent; background: var(--panel-3); color: var(--text); font: 500 11.5px var(--sans); gap: 6px; box-shadow: none; }
.roll-toolbar .roll-chip.roll-grid:hover:not(:disabled), .roll-toolbar .roll-chip.roll-trackchip:hover:not(:disabled) { border-color: var(--line); background: var(--panel-3); }
.roll-toolbar .roll-chip.roll-grid .ic { width: 13px; height: 13px; }
.roll-trackchip .track-sw { width: 8px; height: 8px; border-radius: 2px; background: var(--c, transparent); flex: none; }
.roll-trackchip .clip-name { font-weight: 500; color: var(--muted-2); max-width: 16ch; overflow: hidden; text-overflow: ellipsis; }
.roll-trackchip .clip-name::before { content: "· "; }
.roll-trackchip #roll-track-name { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; }
.roll-toolbar .roll-toolrow { display: flex; gap: 1px; padding: 2px; height: 28px; margin-block: -2px; align-items: center; background: var(--bg); border-radius: 7px; flex: none; }
.roll-toolrow > .roll-toolbtn { width: 28px; height: 24px; min-height: 0; padding: 0 !important; display: grid; place-items: center; border-radius: 5px; border: 1px solid transparent; background: transparent; color: var(--muted-2); box-shadow: none; }
.roll-toolrow > .roll-toolbtn .ic { width: 14px; height: 14px; }
.roll-toolrow > .roll-toolbtn:hover:not(.on) { color: var(--text); background: var(--panel-2); }
.roll-toolrow > .roll-toolbtn.on { background: var(--chrome-on); color: var(--chrome-on-ink); border-color: var(--chrome-on); }
.roll-toolbar:not(.tools-fold) > .roll-toolfold { display: none; }
.roll-toolbar.tools-fold > .roll-toolrow { display: none; }
/* Side-zone ✕ (C-441, pick 6 A): at the end of the zone's tab strip, like the bottom dock's. */
.zone-tabs > .zone-close { margin-left: auto; align-self: center; flex: none; min-width: 24px; height: 24px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted-2); font-size: 14px; line-height: 1; }
.zone-tabs > .zone-close:hover { color: var(--text); background: var(--panel-2); }
/* C-502 (UI/UX audit F-05): an 11 px text floor on device cards, track headers
   and mixer strips. Knob name 11 px muted, value 11 px bold (the 220 px card
   still fits; checked by test/textfloor-browser.test.js). Header glyphs
   (arm ●, ▾, carets) come up to 11 px too. */
:root .rtt-tile .knob-label { font-size: 11px; line-height: 1.15; }
:root .rtt-tile .knob-text { font-size: 11px; line-height: 1.15; }
:root .rtt-tile .rtt-chip, :root button.rtt-chip { font-size: 11px; }
:root .ph button.ph-arm { font-size: 11px; }
:root .ph .k, :root span.caret, :root span.bm-caret, :root #pl-grid.pl-snap .caret { font-size: 11px; }
:root .strip b.dev-name, :root b.dev-name { font-size: 11px; }
:root button.dps-step { font-size: 11px; }
:root kbd.tk-kc { font-size: 11px; }
:root .devices .dev :is(.dev-tab, .smp-empty, .smp-name, small, .tn-hz, .tn-src, .tn-cents, .tn-str, .tn-ref,
  .rtt-seg button, .dev-lat, .rtt-chiplbl, .rtt-tl, .dn-state, .rtt-sel, .dev-src-kind, .syn-edited) { font-size: 11px; }

/* ---------- C-503: the third DAW look, "Machined" ----------
   Settings → DAW look → Machined sets data-look="machined" on <html>
   (themeboot.js, ui/theme.js). Depth direction C from
   04-plans/mockups/2026-11-22_daw-depth.html: raised = buttons, pods, M/S/arm,
   badges, fader caps, knob caps; sunken = LCD, BPM, fields, insert slots, fader
   tracks, meters, device screens; pressed = pushed in; clips, grid, ruler and
   notes stay flat; floating panels lift. One material over the arrange side AND
   the mix side ([data-mat="ink"] panes follow it here). Built only from --text /
   --bg mixes (no colour literals): every theme follows, and background-color is
   never touched on panels, so sky themes stay translucent. Mix and Quiet Ink are
   unchanged: every rule below sits under :root[data-look="machined"]. */
:root[data-look="machined"], :root[data-look="machined"] [data-mat="ink"] {
  --m-hi: color-mix(in srgb, var(--text) 9%, transparent);
  --m-raise-bg: linear-gradient(180deg, color-mix(in srgb, var(--text) 10%, transparent), transparent);
  --m-raise: inset 0 1px 0 var(--m-hi), 0 1px 0 color-mix(in srgb, var(--bg) 70%, transparent), 0 2px 5px color-mix(in srgb, var(--bg) 45%, transparent);
  --m-press: inset 0 2px 4px color-mix(in srgb, var(--bg) 85%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--bg) 70%, transparent), 0 1px 0 color-mix(in srgb, var(--text) 7%, transparent);
  --m-well: inset 0 2px 5px color-mix(in srgb, var(--bg) 85%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--bg) 60%, transparent), 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent);
  --m-pod: inset 0 1px 0 color-mix(in srgb, var(--text) 8%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--bg) 65%, transparent), 0 1px 2px color-mix(in srgb, var(--bg) 60%, transparent);
  --frame-gap: 4px;
  --r-panel: 6px;
  --r-ctl: 4px;
  --seg-gap: 2px;
  --edge-hi: inset 0 1px 0 color-mix(in srgb, var(--text) 8%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--bg) 65%, transparent);
  --elev-1: 0 1px 0 color-mix(in srgb, var(--bg) 70%, transparent), 0 2px 5px color-mix(in srgb, var(--bg) 45%, transparent);
  --ctl-bg: linear-gradient(180deg, color-mix(in srgb, var(--text) 10%, var(--panel-3)), var(--panel-3));
  --ctl-edge: var(--m-raise);
  --knob-cap: linear-gradient(180deg, color-mix(in srgb, var(--panel-3) 84%, var(--text)), var(--panel-3));
  --pop-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 8%, transparent), 0 1px 0 color-mix(in srgb, var(--bg) 70%, transparent), 0 18px 40px -12px color-mix(in srgb, var(--bg) 92%, transparent);
}
/* Surfaces: the top bar, editing bar and panels get the machined edge + a small drop. */
:root[data-look="machined"] :is(header.transport, .tpill, .pl-toolbar) { box-shadow: var(--edge-hi), var(--elev-1); }
:root[data-look="machined"] :is(.playlist, .browser, .inspector, #dock, .dev) { box-shadow: var(--edge-hi), var(--elev-1); }

/* Pods: the grouped tool / transport / view rows sit on a slightly darker plate. */
:root[data-look="machined"] header.transport .tgroup { box-shadow: var(--m-pod); border-radius: 8px; background-color: color-mix(in srgb, var(--bg) 22%, transparent); }

/* Raised: every resting button in the chrome. background-image only, so each
   button keeps its own colour (and sky glass stays glass). */
:root[data-look="machined"] :is(header.transport, .tpill, .pl-toolbar, .dock-tabs, .roll-toolbar) button:not(.on):not([aria-pressed="true"]):not(.active):not(:disabled) {
  background-image: var(--m-raise-bg) !important; /* the generic toolbar "> button:not(...)" reset outranks this otherwise */
  box-shadow: inset 0 1px 0 var(--m-hi);
}
:root[data-look="machined"] :is(.ph, .strip, .dev .dvh, .fx-panel) button:not(.on):not([aria-pressed="true"]):not(:disabled):not(.dev-pwr):not(.dev-byp):not(.dev-tab):not(.dps-step):not(.syn-step):not(.syn-reset):not(.fx-slot):not(.fx-empty):not(.fx-blank):not(.fx-pdot):not(.fx-pname):not(.fx-pw),
:root[data-look="machined"] .ph .ph-m.on {
  background-image: var(--m-raise-bg);
  box-shadow: var(--m-raise);
}
/* Pressed: lit / on buttons push in; the top bar's toggles go dark with a near-white
   icon (mockup C), the rest keep their own fill (armed red, solo) with the inset. */
:root[data-look="machined"] :is(header.transport, .tpill, .pl-toolbar, .roll-toolbar) :is(button.on, button[aria-pressed="true"]):not(.t-rec):not(.share-btn) {
  background: color-mix(in srgb, var(--bg) 80%, transparent) !important;
  color: var(--select) !important;
  border-color: transparent !important;
  box-shadow: var(--m-press) !important;
}
:root[data-look="machined"] :is(.ph, .strip, .fx-panel) :is(button.on, button[aria-pressed="true"]):not(.ph-m) { box-shadow: var(--m-press); background-image: none; }
:root[data-look="machined"] :is(header.transport, .tpill, .pl-toolbar, .roll-toolbar, .ph, .strip, .dev, .fx-panel, .dock-tabs) button:active:not(:disabled) {
  background-image: none;
  box-shadow: var(--m-press) !important;
  transform: none;
}
:root[data-look="machined"] .dock-tabs button.active { box-shadow: var(--m-press); background-image: none; }

/* Sunken: readouts, fields, slots, tracks, meters and screens. */
:root[data-look="machined"] :is(.transport, .tpill) .lcd,
:root[data-look="machined"] .transport .tfield input#t-bpm,
:root[data-look="machined"] :is(input[type='text'], input[type='number'], input[type='search'], select, textarea):not(.ph *):not(.sname *),
:root[data-look="machined"] .strip .fx-row .fx-slot,
:root[data-look="machined"] .fx-panel .fx-row .fx-slot,
:root[data-look="machined"] canvas.meter,
:root[data-look="machined"] .rtt-scr,
:root[data-look="machined"] .dev-src-scr,
:root[data-look="machined"] .tn-scr {
  box-shadow: var(--m-well);
  border-color: transparent;
}
:root[data-look="machined"] .strip .fx-row .fx-slot,
:root[data-look="machined"] .fx-panel .fx-row .fx-slot { background-color: var(--input-bg); border-radius: 5px; }
:root[data-look="machined"] :is(.strip, .fx-panel) .fx-empty { background-image: none; box-shadow: inset 0 0 0 1px var(--line-soft); }
/* The strip's insert peek: each filled row is one sunken slot; its ⏻ and name sit flat in it. */
:root[data-look="machined"] .strip .fx-peek-row { background-color: var(--input-bg); border-radius: 5px; box-shadow: var(--m-well); }
:root[data-look="machined"] .strip .fx-peek-row button { background: transparent; border-color: transparent; box-shadow: none; }
:root[data-look="machined"] .strip .fx-blank { background-image: none; box-shadow: inset 0 0 0 1px var(--line-soft); }
:root[data-look="machined"] [data-mat="ink"] .strip .fader::-webkit-slider-runnable-track { border-radius: 3px; box-shadow: var(--m-well); }
:root[data-look="machined"] [data-mat="ink"] .strip .fader::-moz-range-track { border-radius: 3px; box-shadow: var(--m-well); }
/* Fader caps: raised, light on top (the track colour line stays). */
:root[data-look="machined"] [data-mat="ink"] .strip .fader::-webkit-slider-thumb {
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 20%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--bg) 40%, transparent), 0 1px 0 color-mix(in srgb, var(--bg) 70%, transparent), 0 2px 5px color-mix(in srgb, var(--bg) 45%, transparent);
}
:root[data-look="machined"] [data-mat="ink"] .strip .fader::-moz-range-thumb {
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 20%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--bg) 40%, transparent), 0 1px 0 color-mix(in srgb, var(--bg) 70%, transparent), 0 2px 5px color-mix(in srgb, var(--bg) 45%, transparent);
}
/* Floating panels lift (menus, popovers, plug-in windows use --pop-shadow above). */
:root[data-look="machined"] :is(.ctx-menu, .fx-window, .plug-win, .dn-win, .tb-pop) { box-shadow: var(--pop-shadow); }

/* Knobs: C · Soft-touch (04-plans/mockups/2026-11-22_daw-depth-knobs.html), Machined only.
   knob.js draws the parts on every knob; they show only here. The ring knob's disc,
   hub and pointer stay hidden; the amber value arc stays outside the cap. */
.knob .knob-soft, .knob-soft-defs { display: none; }
.knob-soft-defs { display: block; overflow: hidden; pointer-events: none; }
.knob-soft-defs .ks-hi { stop-color: var(--text); }
.knob-soft-defs .ks-lo { stop-color: var(--bg); }
:root[data-look="machined"] .knob .knob-soft { display: inline; }
:root[data-look="machined"] .knob:not(.knob-rtt) :is(.knob-face, .knob-ptr) { display: none; }
:root[data-look="machined"] .knob .ks-body { fill: color-mix(in srgb, var(--panel-3) 55%, var(--bg)); filter: drop-shadow(0 1.2px 1px color-mix(in srgb, var(--bg) 90%, transparent)); }
:root[data-look="machined"] .knob .ks-knurl { stroke: color-mix(in srgb, var(--bg) 70%, transparent); stroke-width: 0.45; stroke-linecap: round; }
:root[data-look="machined"] .knob-rtt .ks-knurl { stroke-width: 0.5; }
:root[data-look="machined"] .knob .ks-top { fill: color-mix(in srgb, var(--panel-3) 88%, var(--text)); }
:root[data-look="machined"] .knob .ks-rim { stroke-width: 0.45; }
:root[data-look="machined"] .knob .ks-dot { fill: var(--text); }
:root[data-look="machined"] .knob:has(input:disabled) .ks-dot { fill: var(--muted); }

/* C-501: the top bar never clips (ui/topbarfit.js). Step 1 (.tb-icons):
   labels hide, icons and tips stay. Step 2: low-use controls fold into More ▾
   (.tb-folded keeps the control in layout, invisible at the More button's
   spot, so a popover it opens anchors there). Live and Share never fold. */
header.transport { position: relative; }
header.transport.tb-icons .exit-btn .exit-label,
header.transport.tb-icons .live-sw .live-sub,
header.transport.tb-icons .brand .room,
header.transport.tb-icons .vbtn .vlabel,
header.transport.tb-icons .follow .follow-label { display: none; }
header.transport.tb-icons .exit-btn { padding: 0.3rem 0.35rem; }
header.transport.tb-icons .live-sw { padding-inline: 6px; }
header.transport.tb-icons .onair-n { display: none; } /* narrow bar: green dot + Live; the tip and Share carry the count */
header.transport.tb-icons :is(.tfield, #t-chat) { font-size: 0; gap: 0; }
header.transport.tb-icons > .brand { min-width: 4.5rem; max-width: 9rem; }
header.transport .tb-folded { position: absolute !important; left: var(--tb-more-x, 0); top: 4px; width: 1px !important; min-width: 0 !important; padding: 0 !important; overflow: hidden !important; visibility: hidden !important; pointer-events: none !important; margin: 0 !important; }
header.transport > #t-more { order: 19; flex: none; white-space: nowrap; font-size: 12px; padding: 0.3rem 0.5rem; }
header.transport > #t-more.tb-more-news { position: relative; }
header.transport > #t-more.tb-more-news::after { content: ''; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--push); } /* a folded bell has news (phones) */
header.transport.tb-icons .vbtn { width: 40px; } /* icon-only view buttons, like the ≤1280 px rule */


/* ===================================================================
   Piano roll bar grouped like the editing bar (C-490 pick A, C-494 A, C-495 A; Avi 2026-11-22,
   mockup 04-plans/mockups/2026-11-22_piano-roll-toolbar.html): Clip · Snap + Quantize · tools ·
   Sound (Articulations, Scale) · Tools ▾ · Keys, pods split by thin dividers. */
.roll-toolbar { gap: 6px 8px; min-height: 40px; }
.roll-toolbar > .roll-pod { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.roll-toolbar > .roll-div { width: 1px; height: 18px; background: var(--line); flex: none; }
.roll-toolbar > .roll-spacer { flex: 1 1 0; min-width: 0; }
.roll-toolbar > .roll-sound { padding: 2px; height: 28px; border-radius: 7px; background: var(--bg); gap: 2px; }
.roll-toolbar > .roll-sound #art-group { display: inline-flex; }
.roll-toolbar > .roll-sound #art-group[hidden] { display: none; }
.roll-toolbar > .roll-sound .roll-chip { height: 24px; min-height: 0; padding: 0 8px !important; border-radius: 5px; border: 1px solid transparent; background: transparent; color: var(--muted-2); font: 500 11.5px var(--sans); box-shadow: none; }
.roll-toolbar > .roll-sound .roll-chip:hover:not(:disabled) { color: var(--text); background: var(--panel-2); border-color: transparent; }
.roll-toolbar > .roll-sound .roll-chip.on { color: var(--text); background: var(--chrome-2); border-color: transparent; }
#tools-menu { height: 24px; min-height: 0; padding: 0 9px !important; border-radius: 6px; border: 1px solid transparent; background: var(--panel-3); color: var(--text); font: 500 11.5px var(--sans); box-shadow: none; display: inline-flex; align-items: center; gap: 6px; }
#tools-menu:hover:not(:disabled) { border-color: var(--line); background: var(--panel-3); }
#tools-menu .caret { font-size: 9px; color: var(--muted); }
.roll-toolbar .qz-split > button { display: inline-flex; align-items: center; gap: 6px; height: 22px; min-height: 0; margin: 0; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: 500 11.5px var(--sans); white-space: nowrap; box-shadow: none; }
.roll-toolbar .qz-split > .qz-main { padding: 0 6px 0 4px !important; }
.roll-toolbar .qz-split > .qz-more { min-width: 24px; justify-content: center; padding: 0 !important; border-left: 1px solid var(--line-soft); border-radius: 0 6px 6px 0; }
.roll-toolbar .qz-split > button:hover { background: var(--panel-2); }
.roll-toolbar .qz-split > .qz-main:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) { .roll-toolbar .qz-split > .qz-main:active { transform: none; } }
/* Narrow: the Quantize word goes first, then (tools-fold) the tool row becomes Tool ▾. */
.roll-toolbar.tools-fold .qz-word { display: none; }
/* Articulations switch in the Sound pod (C-491 pick A): the track's channel.artic, for everyone. */
.roll-toolbar > .roll-sound .art-switch { gap: 6px; }
.roll-toolbar > .roll-sound .art-switch[hidden] { display: none; }
.art-switch .sw-track { width: 20px; height: 12px; border-radius: 6px; background: var(--panel-3); border: 1px solid var(--line); position: relative; flex: none; transition: background-color 120ms ease-out; }
.art-switch .sw-knob { position: absolute; top: 1px; left: 1px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); transition: transform 120ms ease-out; }
.art-switch.on .sw-track { background: var(--chrome-on); border-color: var(--chrome-on); }
.art-switch.on .sw-knob { transform: translateX(8px); background: var(--chrome-on-ink); }
.roll-toolbar > .roll-sound .art-switch.on { color: var(--text); background: transparent; }
@media (prefers-reduced-motion: reduce) { .art-switch .sw-track, .art-switch .sw-knob { transition: none; } }
/* Fidelity pass (2026-11-25, editors): the roll bar as drawn in the pick, 2026-11-22_piano-roll-toolbar.html A
   and piano-roll-articulations.html A: Snap + Quantize and Sound sit in raised pods (--panel-3 fill, --line
   edge, 9 px corners, 32 px tall) instead of loose items between dividers; the tool row is the editing bar's
   30 px segment; chips inside a pod are flat; Sound's items are split by short inner dividers. */
.roll-toolbar > .roll-div { display: none; }
.roll-toolbar > #roll-snap-pod, .roll-toolbar > .roll-sound { height: 32px; padding: 0 4px; gap: 4px; background: var(--panel-3); border: 1px solid var(--line); border-radius: 9px; box-sizing: border-box; }
.roll-toolbar > #roll-snap-pod .roll-chip.roll-grid { background: transparent; }
.roll-toolbar > #roll-snap-pod .roll-chip.roll-grid:hover:not(:disabled) { background: var(--panel-2); border-color: transparent; }
.roll-toolbar .roll-toolrow { height: 30px; margin-block: 0; border-radius: 8px; }
.roll-toolrow > .roll-toolbtn { height: 26px; border-radius: 6px; }
.roll-toolbar > .roll-sound .roll-chip { color: var(--text); }
.roll-toolbar > .roll-sound .art-switch:not(.on) { color: var(--muted); }
.roll-toolbar > .roll-sound .pod-div { width: 1px; height: 16px; background: var(--line); flex: none; }
.roll-toolbar > .roll-sound .pod-div:has(+ [hidden]), .roll-toolbar > .roll-sound #art-group[hidden] + .pod-div { display: none; }
.roll-toolbar > .roll-sound #scale-chip .ic, #tools-menu .ic, .roll-toolbar > .roll-sound .arp-tag .ic { width: 13px; height: 13px; flex: none; }
.roll-toolbar > .roll-sound .arp-tag { color: var(--accent); }
/* ---------- C-545 Better DMs (pick A, 04-plans/mockups/2026-11-22_home-dms.html) ----------
   THE message row (dash/msgrows.js) for the drawer, the Social page, the DAW room
   chat and the DAW DMs: a face + name + time on the first of a run, follow-ups
   under it, a day line, a "New" line, Seen, typing dots, a project link card;
   the shared popovers (⋯, + share a project, the Join ask). dash.html loads this
   file too, so these rules are the one look; dash.css only fits them into the
   drawer. Below: the DAW side (faces in the chat panel, chips with presence +
   unread, the one-row DM composer). No amber here: nothing is sound. */
.mr-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 9px; align-items: start; }
.mr-gut { display: flex; justify-content: center; min-height: 1px; }
.mr-main { min-width: 0; }
.mr-meta { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.mr-name { font-weight: 600; font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.mr-name { padding: 0; border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 12.5px; color: var(--text); cursor: pointer; text-align: left; }
button.mr-name:hover { text-decoration: underline; }
.mr-time { flex: none; font: 400 11px / 1.2 var(--sans); color: var(--muted); }
.mr-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; color: var(--text); }
.mr-gone { color: var(--muted-2); font-style: italic; }
.mr-hover-time { visibility: hidden; padding-top: 2px; font: 400 9.5px / 1.4 var(--sans); color: var(--muted); white-space: nowrap; }
.mr-row:hover .mr-hover-time { visibility: visible; }
.mr-day { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; font: 500 11px / 1 var(--sans); color: var(--muted); list-style: none; }
.mr-day::before, .mr-day::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.mr-new { display: flex; align-items: center; gap: 8px; margin: 6px 0; font: 600 10.5px / 1 var(--sans); color: var(--text); list-style: none; }
.mr-new::after { content: ''; flex: 1; height: 1px; background: color-mix(in srgb, var(--fill) 50%, transparent); }
.mr-seen { align-self: flex-end; margin: 2px 0 0; text-align: right; font: 400 10.5px / 1.2 var(--sans); color: var(--muted); list-style: none; }
.mr-typing { display: flex; align-items: center; gap: 6px; padding: 2px 12px 4px 49px; font: 400 11px / 1.3 var(--sans); color: var(--muted); }
.mr-typing[hidden] { display: none; }
.mr-dots { display: inline-flex; gap: 3px; }
.mr-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); animation: mr-blink 1.2s infinite; }
.mr-dots i:nth-child(2) { animation-delay: 0.2s; }
.mr-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes mr-blink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mr-dots i { animation: none; opacity: 0.7; } }
:root[data-motion='off'] .mr-dots i { animation: none; opacity: 0.7; }
/* A project link in a message: a card with the project name and Join. */
.mr-link { display: flex; align-items: center; gap: 10px; max-width: 280px; margin: 5px 0 3px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); }
.mr-link-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; background: var(--panel-3); color: var(--muted-2); font-size: 14px; }
.mr-link-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mr-link-name { font: 600 12.5px / 1.2 var(--sans); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-link-sub { font: 400 11px / 1.2 var(--sans); color: var(--muted); }
/* Buttons the rows and popovers draw (the drawer's own buttons stay .soc-btn). */
.mr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); font: 500 12px / 1 var(--sans); white-space: nowrap; cursor: pointer; }
.mr-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.mr-btn:focus-visible { outline: 2px solid var(--fill); outline-offset: 2px; }
.mr-btn.is-primary { border-color: transparent; background: var(--fill); color: var(--on-fill); font-weight: 600; }
.mr-btn.is-primary:hover { background: color-mix(in srgb, var(--fill) 86%, var(--bg)); }
.mr-btn.is-quiet { border-color: transparent; color: var(--muted-2); }
.mr-btn.is-danger { border-color: transparent; background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); font-weight: 600; }
.mr-btn.is-icon { width: 26px; padding: 0; border-color: transparent; color: var(--muted-2); font-size: 16px; }
.mr-btn.is-icon:hover, .mr-btn.is-icon[aria-expanded='true'] { color: var(--text); }
/* Popovers: the ⋯ menu, + share a project, the Join ask. */
.mr-pop { position: fixed; z-index: 450; display: grid; gap: 2px; min-width: 200px; max-width: min(300px, calc(100vw - 16px)); max-height: 60vh; overflow-y: auto; padding: 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--tip-bg, var(--panel-2)); color: var(--text); box-shadow: var(--shadow); font: 13px / 1.3 var(--sans); }
.mr-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.mr-item:hover, .mr-item:focus-visible { background: color-mix(in srgb, var(--text) 10%, transparent); outline: 0; }
.mr-item.is-danger { color: var(--warn); }
.mr-item-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-item-sub, .mr-check { flex: none; color: var(--muted); font-size: 12px; }
.mr-pop-head { margin: 4px 10px 2px; font: 600 11px / 1.2 var(--sans); color: var(--muted); }
.mr-pop-text { margin: 6px 8px; color: var(--text); overflow-wrap: anywhere; }
.mr-pop-check { display: flex; align-items: center; gap: 6px; margin: 0 8px 4px; color: var(--muted-2); font-size: 12px; cursor: pointer; }
.mr-pop-check input { margin: 0; accent-color: var(--fill); }
.mr-pop-acts { display: flex; justify-content: flex-end; gap: 6px; padding: 4px; }
/* DAW: the faces in the chat panel (index.html has no dash.css), the room colour as the ring. */
.chat .soc-av { --ring: var(--line); position: relative; display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--panel-3); color: var(--text); font: 650 9.5px / 1 var(--sans); letter-spacing: 0.02em; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ring) 55%, var(--panel-3)); }
.chat .soc-av[data-ring='none'] { box-shadow: inset 0 0 0 1px var(--line); }
.chat .soc-av.is-xs { width: 16px; height: 16px; font-size: 7.5px; box-shadow: inset 0 0 0 1px var(--line); }
.chat .soc-dot { position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint), 0 0 0 2px var(--panel); }
.chat .soc-av.is-xs .soc-dot { width: 6px; height: 6px; }
.chat .soc-dot[data-state='online'] { background: var(--presence, var(--meter-lo)); box-shadow: 0 0 0 2px var(--panel); }
.chat .soc-dot[data-state='jam'] { background: var(--presence, var(--meter-lo)); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px color-mix(in srgb, var(--presence, var(--meter-lo)) 45%, transparent); }
.chat .mr-row { grid-template-columns: 24px minmax(0, 1fr); column-gap: 8px; }
.chat .chat-msg.mr-row { margin-top: 8px; }
.chat .chat-msg.mr-row.cont { margin-top: 2px; }
.chat .mr-row .chat-text { padding-left: 0; }
.chat .mr-row .chat-time { margin-left: 0; }
.chat .mr-typing { padding-left: 44px; }
.chat .mr-link { max-width: none; }
/* DM chips: their face with the presence dot, and an unread count. */
.dm-chip .soc-av { margin-left: -4px; }
.dm-count { flex: none; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--fill); color: var(--on-fill); font: 700 10px / 16px var(--sans); text-align: center; }
.dm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 12px; border-bottom: 1px solid var(--line-soft); font-size: 12px; color: var(--muted-2); flex: none; }
.dm-head[hidden] { display: none; }
.dm-head-line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The DM composer: one row, [+][text][emoji][Send]. */
.dm-form { align-items: center; }
.dm-form .mr-plus { flex: none; }

/* Articulation bank editor (C-492, ui/artbanks.js): the floating Banks window, fx-window look. */
.abk-window { width: min(940px, calc(100vw - 16px)); height: min(560px, calc(100vh - 16px)); }
.abk-main { flex: 1; min-height: 0; display: flex; }
.abk-side { flex: none; width: 210px; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-right: 1px solid var(--line-soft); background: var(--panel); overflow: auto; }
.abk-filter { height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-3); color: var(--text); font: inherit; font-size: var(--fs-small); }
.abk-list { display: flex; flex-direction: column; gap: 2px; }
.abk-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 2px 2px; font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.abk-new { border: 0; background: transparent; color: var(--muted-2); font: inherit; font-size: var(--fs-small); text-transform: none; letter-spacing: 0; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.abk-new:hover, .abk-new:focus-visible { color: var(--text); background: var(--panel-3); }
.abk-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted-2); font: inherit; text-align: left; cursor: pointer; }
.abk-item:hover, .abk-item:focus-visible { background: var(--panel-3); color: var(--text); }
.abk-item.on { background: var(--chrome-2); border-color: var(--select); color: var(--text); }
.abk-item-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.abk-item-meta { font-size: var(--fs-small); color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.abk-hint { margin: 4px 2px; font-size: var(--fs-small); color: var(--muted); }
.abk-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; overflow: auto; }
.abk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.abk-btn { height: 24px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-3); color: var(--muted-2); font: inherit; font-size: var(--fs-small); cursor: pointer; white-space: nowrap; }
.abk-btn:hover, .abk-btn:focus-visible { color: var(--text); border-color: var(--muted); }
.abk-btn.primary { color: var(--text); border-color: var(--select); }
.abk-btn.on { color: var(--text); background: var(--chrome-2); cursor: default; }
.abk-btn.add { align-self: flex-start; }
.abk-btn:disabled { opacity: 0.5; cursor: default; }
.abk-file { display: none; }
.abk-bankhead { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr auto auto; gap: 8px; }
.abk-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: var(--fs-small); color: var(--muted); }
.abk-field input, .abk-window select, .abk-window input[type='number'], .abk-rowname { height: 24px; min-width: 0; padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel-3); color: var(--text); font: inherit; font-size: var(--fs-small); }
.abk-window input:disabled, .abk-window select:disabled { color: var(--muted-2); opacity: 0.8; }
.abk-name { font-weight: 600; }
.abk-rows { display: flex; flex-direction: column; gap: 3px; }
.abk-row { display: grid; grid-template-columns: 22px 12px minmax(110px, 1fr) minmax(220px, 2.2fr) 48px 52px auto 26px 22px; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 6px; background: var(--panel); }
.abk-row.abk-rowhead { background: transparent; font-size: var(--fs-small); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.abk-row.learning { outline: 1px solid var(--rec); }
.abk-key { font-size: var(--fs-small); font-family: 'DM Mono', ui-monospace, monospace; color: var(--muted); text-align: center; }
.abk-swatch { width: 10px; height: 10px; border-radius: 3px; }
.abk-msgs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.abk-msg { display: inline-flex; align-items: center; gap: 3px; padding: 1px 3px; border-radius: 5px; background: var(--panel-2); }
.abk-msg .abk-kind { width: 58px; padding: 0 2px; }
.abk-msg .abk-num { width: 50px; padding: 0 4px; }
.abk-pitch { min-width: 22px; font-size: var(--fs-small); font-family: 'DM Mono', ui-monospace, monospace; color: var(--muted-2); }
.abk-none { font-size: var(--fs-small); color: var(--muted); }
.abk-addmsg, .abk-x, .abk-play, .abk-learn, .abk-hold { height: 22px; padding: 0 6px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-small); cursor: pointer; }
.abk-addmsg:hover, .abk-x:hover, .abk-play:hover, .abk-learn:hover, .abk-hold:hover, .abk-addmsg:focus-visible, .abk-x:focus-visible, .abk-play:focus-visible, .abk-learn:focus-visible, .abk-hold:focus-visible { color: var(--text); background: var(--panel-3); }
.abk-hold { border-color: var(--line); }
.abk-hold.on { color: var(--text); background: var(--chrome-2); }
.abk-learn { color: var(--rec-dot); }
.abk-learn.on { color: var(--text); background: var(--rec); white-space: nowrap; }
.abk-cands { display: flex; flex-direction: column; gap: 3px; }
.abk-cand { display: grid; grid-template-columns: 18px 110px 1fr 160px; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; background: var(--panel); font-size: var(--fs-small); color: var(--muted-2); }
.abk-cand-what { color: var(--text); font-family: 'DM Mono', ui-monospace, monospace; }
.abk-cand input[type='text'] { height: 22px; padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel-3); color: var(--text); font: inherit; }
@media (max-width: 720px) { .abk-side { width: 150px; } .abk-bankhead { grid-template-columns: 1fr 1fr; } }
/* Fidelity pass (2026-11-25, editors): the Banks window as drawn in 2026-11-22_piano-roll-banks.html A.
   Mono caps section heads; the bank list is plain rows (name left, meta right), the open one a --panel-3
   fill with no outline; articulations are table rows split by hairlines, not separate cards. */
.abk-head { margin: 10px 4px 4px; font: 500 10px var(--mono); letter-spacing: 0.1em; color: var(--muted); }
.abk-item { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; min-height: 30px; border: 0; color: var(--muted-2); }
.abk-item.on { background: var(--panel-3); border-color: transparent; color: var(--text); }
.abk-item-meta { font: 500 10px var(--mono); color: var(--faint); flex: none; }
.abk-field { font: 500 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.abk-rows { gap: 0; border-top: 1px solid var(--line-soft); }
.abk-row { background: transparent; border-radius: 0; min-height: 34px; padding: 0 6px; border-bottom: 1px solid var(--line-soft); }
.abk-row:hover { background: var(--panel-2); }
.abk-row.abk-rowhead { min-height: 26px; font: 500 10px var(--mono); letter-spacing: 0.1em; border-bottom-color: var(--line-soft); }
.abk-row.abk-rowhead:hover { background: transparent; }
.abk-key { font: 500 11px var(--mono); }
.abk-field input, .abk-field select { font: 500 12px var(--sans); letter-spacing: 0; text-transform: none; }
.abk-head .abk-new { font: 500 11.5px var(--sans); letter-spacing: 0; }
.abk-btn.primary { background: var(--chrome-on); color: var(--chrome-on-ink); border-color: var(--chrome-on); }
.abk-btn.primary:hover, .abk-btn.primary:focus-visible { color: var(--chrome-on-ink); border-color: var(--chrome-on); filter: brightness(0.94); }
/* Banks header in one row + footer bar (pick A): the bank pane is header / scrolling rows / footer,
   each edge to edge; field labels sit inline before their input. */
.abk-body:has(> .abk-foot) { padding: 0; gap: 0; overflow: hidden; }
.abk-bankhead, .abk-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; flex: none; }
.abk-bankhead { border-bottom: 1px solid var(--line-soft); }
.abk-foot { border-top: 1px solid var(--line); background: var(--panel-2); }
.abk-bankhead .abk-name { width: 170px; }
.abk-bankhead .abk-field, .abk-foot .abk-field { flex-direction: row; align-items: center; gap: 6px; }
.abk-bankhead .abk-field input { width: 180px; }
.abk-foot .abk-field input { width: 110px; }
.abk-sp { flex: 1; }
.abk-scroll { flex: 1; min-height: 0; overflow: auto; padding: 0 10px 8px; }
.abk-scroll .abk-rows { border-top: 0; }
.abk-scroll .abk-hint { margin: 8px 2px 0; }
.abk-foot .abk-btn.add { align-self: center; }
/* ---------- C-496 · Arp MIDI device + the chain's MIDI section (Avi 2026-11-22, mockup 2026-11-22_piano-roll-tools-arp.html §3) ----------
   Ableton's order: MIDI effects · instrument · audio effects. The section is a
   dashed outline (no layout height: the card stays --dev-h) at the chain's left. */
.dmidi { position: relative; flex: none; display: flex; gap: 6px; align-self: flex-start; height: var(--dev-h); margin-right: 22px; border-radius: 16px; }
.dmidi:not(.empty) { outline: 1px dashed var(--line); outline-offset: 3px; }
.dmidi::after { content: '→'; position: absolute; right: -17px; top: 50%; transform: translateY(-50%); color: var(--faint); font: 500 12px var(--sans); pointer-events: none; }
.dmidi-add { flex: none; width: 34px; height: var(--dev-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 0; border: 1px dashed var(--line); border-radius: 14px; background: transparent; color: var(--faint); font: 500 10px var(--sans); }
.dmidi-add:hover:not(:disabled) { color: var(--muted-2); border-color: var(--muted); background: transparent; }
.dmidi-add[hidden] { display: none; }
.dmidi-plus { font-size: 16px; line-height: 1; }
.dmidi-word { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: 0.08em; }
.dev-arp { width: 548px; } /* fits More (options + 4 knobs); Main gives the spare width to the screen */
.dev-arp .arp-sum { font: 500 10.5px var(--sans); color: var(--muted); white-space: nowrap; letter-spacing: 0; text-transform: none; }
.dev-arp .syn-step { padding: 0 3px; min-width: 0; }
.dvb.arp-body { display: flex; gap: 8px; align-items: stretch; }
.dvb.arp-body > .arp-scr { flex: 1 0 196px; height: 100%; background: var(--meter-bg); border-radius: 8px; }
.arp-page { display: flex; gap: 8px; align-items: stretch; flex: none; min-height: 0; }
.arp-styles.rtt-seg { flex-direction: column; justify-content: center; width: 74px; padding: 0; gap: 4px; background: transparent; }
.arp-styles.rtt-seg button { flex: none; min-height: 20px; justify-content: flex-start; text-align: left; padding: 0 2px; font: 500 11px var(--sans); color: var(--muted); border-radius: 0; background: transparent; width: max-content; max-width: 100%; }
.arp-styles.rtt-seg button.on, .arp-styles.rtt-seg button.on:hover:not(:disabled) { color: var(--text); background: transparent; box-shadow: 0 2px 0 var(--accent); }
.rtt-grid.arp-knobs { grid-template-columns: repeat(2, 58px); grid-template-rows: 1fr 1fr; }
.arp-opts { display: flex; flex-direction: column; justify-content: center; gap: 6px; width: 150px; font: 500 11px var(--sans); color: var(--muted); }
.arp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.arp-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.arp-rl { width: 36px; flex: none; color: var(--muted); font: 500 10.5px var(--sans); }
.arp-seg.rtt-seg { flex: 1; padding: 0; gap: 2px; background: transparent; }
.arp-seg.rtt-seg button { font: 500 10.5px var(--sans); min-height: 18px; padding: 0 2px; border-radius: 0; background: transparent; }
.arp-seg.rtt-seg button.on, .arp-seg.rtt-seg button.on:hover:not(:disabled) { color: var(--text); background: transparent; box-shadow: 0 2px 0 var(--accent); }
.arp-opts .rtt-chip { font: 500 11px var(--sans); padding: 2px 2px; }
.arp-bake.rtt-chip { align-self: flex-start; color: var(--text); }
.dev-arp.off .arp-scr { opacity: 0.55; }
/* The roll's Sound pod: the Arp tag, a power-on dot before the word. */
.roll-toolbar > .roll-sound .arp-tag { gap: 6px; display: inline-flex; align-items: center; }
.roll-toolbar > .roll-sound .arp-tag[hidden] { display: none; }
.roll-toolbar > .roll-sound .arp-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--meter-lo); flex: none; }
.roll-toolbar > .roll-sound .arp-tag.on { color: var(--text); background: transparent; }
/* The Arpeggiate tool's link to the live device. */
.nt-arplink { align-self: flex-start; border: 0; background: transparent; padding: 0; margin: -2px 0 6px; color: var(--muted-2); font-size: var(--fs-small); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.nt-arplink:hover:not(:disabled) { color: var(--text); background: transparent; }
/* Drum Rack pad window (C-558, ui/padwindow.js): fx-window look, 4x4 pads, the selected pad's Sampler beside it. */
.pad-body { display: flex; gap: 10px; align-items: flex-start; }
.pad-left { display: grid; gap: 8px; flex: none; }
.pad-grid { display: grid; grid-template-columns: repeat(4, 84px); grid-auto-rows: 72px; gap: 6px; }
.pad { position: relative; display: grid; grid-template-rows: auto 1fr auto; align-content: stretch; gap: 2px; padding: 6px 7px; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-3); color: var(--text); cursor: pointer; overflow: hidden; touch-action: none; transition: background 0.08s, border-color 0.08s; }
.pad::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--pad, transparent); }
.pad.empty { background: transparent; border-style: dashed; cursor: default; }
.pad.sel { border-color: var(--text); }
.pad.over { border-color: var(--accent); }
.pad.hit { background: color-mix(in srgb, var(--accent) 38%, var(--panel-3)); border-color: var(--accent); transition: none; }
.pad .pad-name { font-size: var(--fs-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pad .pad-file { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pad .pad-note { font-size: 10px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.pad-banks { display: flex; gap: 4px; }
.pad-bank { padding: 3px 10px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted); font-size: var(--fs-small); cursor: pointer; }
.pad-bank.on { color: var(--text); background: var(--panel-3); }
.pad-empty { font-size: var(--fs-small); color: var(--muted); }
.pad-side { flex: none; min-width: 0; }
.kit-pads { border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted); padding: 2px 8px; font-size: var(--fs-small); cursor: pointer; }
.kit-pads:hover { color: var(--text); background: var(--panel-3); }

/* MIDI learn (ui/midilearn.js; mockup 2026-11-21 badge A): neutral folder tokens, never amber. */
.ml-badge { position: absolute; top: -6px; right: -12px; z-index: 2; font: 600 9px/1.3 ui-monospace, monospace; padding: 0 4px; border-radius: 6px; background: var(--folder-bg); color: var(--folder); border: 1px solid var(--folder); pointer-events: auto; }
.line-slider > .ml-badge { top: -11px; right: 2px; }
.ml-listen { border-radius: 50%; animation: ml-glow 1s ease-in-out infinite alternate; }
.line-slider.ml-listen { border-radius: 4px; }
@keyframes ml-glow { from { box-shadow: 0 0 0 0 var(--folder-bg); } to { box-shadow: 0 0 0 4px var(--folder-bg), 0 0 8px var(--folder); } }
@media (prefers-reduced-motion: reduce) { .ml-listen { animation: none; box-shadow: 0 0 0 2px var(--folder); } }
.ml-hint { position: fixed; z-index: 900; background: var(--tip-bg); border: 1px solid var(--tip-line); color: var(--tip-muted); border-radius: 6px; padding: 3px 8px; font-size: 11px; white-space: nowrap; pointer-events: none; }
.ml-badge.ml-inline { position: static; margin-left: 4px; vertical-align: middle; }

/* ---- C-248 Console mixer (Avi's pick A, 2026-11-25) ----
   Mockup: 04-plans/mockups/2026-11-25_mixer-redesign (A-console.png), built
   from the same values. Colour header per strip, chain LED + big pan knob,
   one send bar per return, fader + meter, M/S, Out. Returns sit after the
   tracks (gap before the first), then the master. */
#mixer.console { gap: 4px; padding: 10px; }
#mixer.console .strip { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 78px; padding: 0 0 8px; border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--c) 7%, var(--panel-2)); }
#mixer.console .strip.sel { background: color-mix(in srgb, var(--c) 12%, var(--panel-3)); }
#mixer.console .strip.primary { box-shadow: 0 0 0 1px var(--text); }
#mixer.console .strip.ret { --c: var(--folder); }
#mixer.console .strip.ret-first, #mixer.console .strip.master { margin-left: 10px; }
#mixer.console .strip.master { --c: var(--fill); margin-left: 10px; }
#mixer.console .strip > .fx-area { display: none; }
#mixer.console .s-head { align-self: stretch; display: flex; flex-direction: column; gap: 0; padding: 4px 6px 5px; line-height: 1.2; background: color-mix(in srgb, var(--c) 72%, var(--panel)); color: var(--on-color); min-width: 0; }
#mixer.console .strip.ret .s-head { background: color-mix(in srgb, var(--folder) 45%, var(--panel)); }
#mixer.console .strip.master .s-head { color: var(--on-fill); }
#mixer.console .s-num { font-family: var(--mono); font-size: 10px; opacity: 0.8; min-height: 12px; }
#mixer.console .s-head .sname-row { display: flex; align-items: center; gap: 2px; min-width: 0; }
#mixer.console .s-head .sname, #mixer.console .strip.master .s-head .sname { font-size: 12px; font-weight: 600; color: inherit; border: 0; padding: 0; margin: 0; max-width: none; flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
#mixer.console .strip.master .s-head .sname { display: flex; }
#mixer.console .s-head .strip-up, #mixer.console .s-head .master-menu { color: inherit; opacity: 0.7; background: transparent; border: 0; padding: 0 2px; font-size: 11px; }
#mixer.console .io-in-row { width: auto; align-self: stretch; padding: 0 6px; }
/* No input (groups, returns, kit rows): the row keeps its height so every fader lines up (audit mix bug 4). */
#mixer.console .io-in-row:has(.io-in.blank):not(:has(.io-person:not([hidden]))):not(:has(.io-win:not([hidden]))) { visibility: hidden; }
#mixer.console .s-panrow { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; }
#mixer.console .s-panrow .ears { font-size: 10px; color: var(--muted); }
#mixer.console .s-panrow .fx-pw { width: 10px; height: 10px; min-width: 0; padding: 0; border-radius: 50%; border: 0; background: var(--faint); font-size: 0; flex: none; }
#mixer.console .s-panrow .fx-pw svg { display: none; }
#mixer.console .s-panrow .fx-pw[aria-pressed=true]:not(.none) { background: var(--meter-lo); box-shadow: 0 0 6px color-mix(in srgb, var(--meter-lo) 60%, transparent); }
#mixer.console .s-panrow .fx-pw.none { background: transparent; box-shadow: inset 0 0 0 1px var(--faint); }
#mixer.console .s-sends { align-self: stretch; display: grid; gap: 3px; padding: 0 6px; min-height: 30px; align-content: start; }
#mixer.console .s-tag { font-size: 10px; color: var(--muted); text-align: center; padding-top: 8px; }
#mixer.console .fader-row { flex: 1; min-height: 110px; }
#mixer.console .strip .db { font-size: 10px; }
#mixer.console .s-plate { align-self: stretch; border-top: 1px solid var(--line); padding: 4px 4px 0; }
#mixer.console .s-plate .io-slot { justify-content: center; border: 0; background: transparent; height: 14px; color: var(--muted); }
#mixer.console .s-plate .io-slot .k { display: none; }
#mixer.console .strip.master .lufs { margin-top: auto; }
#mixer.narrow.console .strip { width: 52px; }
#mixer.narrow.console .s-sends, #mixer.narrow.console .s-panrow .knob { display: none; }
/* The panel's Sends section */
.fx-panel .fxp-sec { font-size: 10px; color: var(--muted); margin-top: 8px; }
.fx-panel .fxp-sends { display: grid; gap: 2px; }
.fx-panel .fxp-send { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px; background: var(--panel-3); border-radius: 3px; color: var(--text); font-size: var(--fs-small); }
.fx-panel .fxp-send .k { color: var(--folder); font-weight: 600; width: 10px; }
.fx-panel .fxp-send .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-panel .fxp-send .knob { --c: var(--folder); }
.fx-panel .fxp-send .knob-label, .fx-panel .fxp-send .knob-text { display: none; }
.fx-panel .fxp-pp { display: flex; }
.fx-panel .fxp-pp button { font: inherit; font-size: 10px; padding: 1px 5px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.fx-panel .fxp-pp button:first-child { border-radius: 3px 0 0 3px; }
.fx-panel .fxp-pp button:last-child { border-radius: 0 3px 3px 0; border-left: 0; }
.fx-panel .fxp-pp button[aria-pressed=true] { background: var(--fill); color: var(--on-fill); }
.fx-panel .fxp-addret { margin-top: 8px; font: inherit; font-size: 11px; border: 1px dashed var(--line); background: transparent; color: var(--muted-2); padding: 5px; border-radius: 3px; cursor: pointer; }
.fx-panel .fxp-addret:hover { color: var(--text); border-color: var(--muted-2); }
.fx-panel .fxp-addret[hidden], .fx-panel .fxp-sec[hidden] { display: none; }
#mixer.console .s-sends { grid-template-columns: minmax(0, 1fr); }
#mixer.console .strip.ret .io-out .v::before { content: none; }
/* Numbered empty insert slots (clear plugin adder, Avi 2026-11-25) */
.fx-panel .fx-slots .fx-empty { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px; border: 1px solid transparent; border-radius: 3px; background: var(--panel-3); color: var(--faint); font: inherit; font-size: var(--fs-small); text-align: left; cursor: pointer; }
.fx-panel .fx-slots .fx-empty .fx-n { font-family: var(--mono); font-size: 10px; color: var(--muted); width: 12px; }
.fx-panel .fx-slots .fx-empty .fx-plus { font-style: italic; }
.fx-panel .fx-slots .fx-empty.next { color: var(--text); border-color: var(--line); border-style: dashed; }
.fx-panel .fx-slots .fx-empty.next .fx-plus { font-style: normal; font-weight: 600; }
.fx-panel .fx-slots .fx-empty:hover, .fx-panel .fx-slots .fx-empty:focus-visible { color: var(--text); border-color: var(--muted-2); border-style: solid; }
/* C-248 Sends fold (Avi's pick): one row per strip, opens to slim send rows */
#mixer.console .s-sends.compact { flex: none; min-height: 0; height: 16px; gap: 2px; }
/* Open: every strip takes the tallest strip's rows (--sends-rows, ui/mixer.js render), so faders stay in line. */
#mixer.console .s-sends.compact.fold.open { height: calc(var(--sends-rows, 1) * 17px - 2px); }
#mixer.console .c-row { position: relative; display: flex; align-items: center; gap: 3px; height: 15px; padding: 0 4px; border-radius: 3px; font-size: 9px; color: var(--text); cursor: ns-resize; background: linear-gradient(to right, color-mix(in srgb, var(--folder) 35%, transparent) var(--v), var(--panel-3) var(--v)); overflow: hidden; }
#mixer.console .c-row .k { color: var(--folder); font-weight: 600; }
#mixer.console .c-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mixer.console .c-row .v { font-family: var(--mono); color: var(--muted-2); }
#mixer.console .c-row.pre .k::after { content: '•'; margin-left: 1px; color: var(--text); } /* pre fader */
#mixer.console .c-fold { height: 15px; border: 0; border-radius: 3px; background: var(--panel-3); color: var(--muted-2); font: inherit; font-size: 9px; text-align: left; padding: 0 5px; cursor: pointer; }
#mixer.console .c-fold:hover { color: var(--text); }
#mixer.console .c-add { height: 15px; border: 1px dashed var(--line); border-radius: 3px; background: transparent; color: var(--muted-2); font: inherit; font-size: 9px; cursor: pointer; }
#mixer.console .c-add:hover { color: var(--text); }
.brp-vol { flex: none; width: 72px; height: 16px; accent-color: var(--accent); }
/* ---------- Fidelity pass, editors + devices (2026-11-25; 04-plans/mockups/fidelity/editors.md) ----------
   The Devices header crumb as drawn in 2026-11-22_device-power.html (1A + 2A): "DEVICES" in mono caps beside
   the track name. Later than the 2026-11-12 sentence-case label rule, so it wins for this label only. */
.dev-label { font: 500 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
/* ---------- Fidelity pass (2026-11-25), dashboard bell: the header and row
   rhythm of the C-477 pick (04-plans/mockups/2026-11-22_notifications-chat.html, A). ---------- */
.dash .d4-bell { gap: 0; padding: 0; }
.dash .d4-bell-head { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dash .d4-bell-head h3 { margin: 0; color: var(--text); font: 600 13px / 1 var(--sans); }
.dash .d4-bell .d4-notes { gap: 0; }
.dash .d4-bell .d4-note { padding: 12px 14px 12px 26px; border-radius: 0; border-bottom: 1px solid var(--line); }
.dash .d4-bell .d4-note.is-unread::before { left: 12px; top: 18px; }
.dash .d4-bell .d4-bell-foot { padding: 10px 14px; }
.dash .d4-bell .d4-bell-empty { padding: 12px 14px; }
.dash .d4-bell .d4-bell-foot { border-top: 0; }
/* Fidelity pass (2026-11-25): the drawer's section heads in the C-542 sentence case, not uppercase mono. */
:root .soc-h { font: 500 12px / 1.2 var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); }
/* Track headers A′ (Avi 2026-11-25, 04-plans/mockups/track-headers.html): green lane switch,
   faint number, arm, monitor dropdown chip. The switch mutes this track's clips only (laneOff). */
.ph button.ph-lane { flex: none; width: 10px; height: 10px; min-width: 10px; padding: 0; border-radius: 50%; border: 1.5px solid var(--faint); background: transparent; cursor: pointer; }
.ph button.ph-lane.on { border-color: var(--meter-lo); background: var(--meter-lo); }
.ph button.ph-lane:hover { border-color: var(--text); }
.ph button.ph-lane[hidden] { display: none; }
.ph .ph-m, .ph .ph-m.on, .ph .ph-m:not(.on) { background: transparent !important; border-color: transparent !important; box-shadow: none; color: var(--faint); min-width: 16px !important; padding: 0 !important; }
.ph.lane-off .ph-name { color: var(--faint); text-decoration: line-through; }
.ph button.ph-mon { gap: 3px; height: 20px; min-width: 0; padding: 0 5px; border-radius: 4px; border: 1px solid var(--line); background: var(--panel-3); color: var(--muted); font: 600 10px var(--mono); }
.ph button.ph-mon .k { font-size: 9px; color: inherit; }
.ph button.ph-mon.auto, .ph button.ph-mon.in { border-color: var(--line); background: var(--panel-3); color: var(--muted); }
.ph button.ph-mon.live { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
.ph .ph-line > .ph-io.ph-in { display: none; } /* Input: right-click ● (A′) */
.pl-body.left .ph-line:not(.ph-remote-line) { flex-direction: row; } /* A′: switch on the outer edge, buttons by the grid, both sides */

/* Pattern bar + Patterns list (C-550, pick A, 04-plans/mockups/2026-11-25_pattern-bar.html) */
.pb { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; flex: none; }
.pb-lbl { color: var(--muted); font-size: 12px; }
.pb-sel { display: inline-flex; align-items: center; height: 24px; border: 1px solid var(--chrome-line); border-radius: 5px; background: var(--panel-3); }
.pb-step, .pb-name, .pb-btn, .pb-ico { font: inherit; font-size: 12px; color: var(--text); background: none; border: 0; cursor: pointer; }
.pb-step { width: 22px; height: 100%; color: var(--muted-2); }
.pb-step:disabled { color: var(--faint); cursor: default; }
.pb-name { display: inline-flex; align-items: center; gap: 7px; height: 100%; min-width: 130px; max-width: 200px; padding: 0 10px; border-left: 1px solid var(--chrome-line); border-right: 1px solid var(--chrome-line); white-space: nowrap; overflow: hidden; }
.pb-caret { margin-left: auto; color: var(--muted); }
.pb-btn { height: 24px; padding: 0 8px; border: 1px solid var(--chrome-line); background: var(--chrome-2); border-radius: 5px; white-space: nowrap; }
.pb-btn:hover, .pb-step:hover:not(:disabled), .pb-name:hover { background: var(--row-sel); }
.pb-btn[aria-pressed="true"] { background: var(--row-sel); border-color: var(--muted); }
.pb-sw { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.playlist.pat-docked .pl-body { margin-right: 250px; }
.pat-list { position: absolute; right: 0; top: 32px; bottom: 0; width: 250px; display: flex; flex-direction: column; background: var(--panel-2); border-left: 1px solid var(--line); z-index: 5; }
.playlist.has-bar .pat-list { top: auto; height: calc(100% - 32px); }
.pat-list[hidden] { display: none; }
.pat-list.floating { position: fixed; right: auto; left: calc(100vw - 280px); top: 140px; bottom: auto; height: auto; max-height: 60vh; width: 240px; border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--pop-shadow, var(--shadow)); z-index: 40; }
.pat-list.floating .pat-h { cursor: move; }
.pat-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 600; flex: none; }
.pat-h-b { display: inline-flex; gap: 2px; }
.pb-ico { color: var(--muted); width: 22px; height: 20px; border-radius: 4px; }
.pb-ico:hover { background: var(--row-sel); color: var(--text); }
.pat-rows { overflow-y: auto; min-height: 0; }
.pat-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.pat-row:hover { background: var(--panel-3); }
.pat-row.on { background: var(--row-sel); }
.pat-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pat-c { font: inherit; font-size: 11px; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.pat-c.none { cursor: default; }
.pat-m { font: inherit; color: var(--faint); background: none; border: 0; cursor: pointer; width: 18px; }
.pat-m:hover { color: var(--text); }
.pat-add { font: inherit; text-align: left; color: var(--muted); background: none; border: 0; padding: 7px 10px; cursor: pointer; }
.pat-add:hover { color: var(--text); background: var(--panel-3); }
/* Console: the sticky master covers the mixer's 10 px right padding too, so strips never peek out past it */
#mixer.console { padding-right: 0; }
#mixer.console .strip.master { margin-right: 10px; box-shadow: 10px 0 0 var(--panel); }
/* Console Narrow: the master keeps its name and LUFS readable (a little wider than a track strip) */
#mixer.narrow.console .strip.master { width: 66px; }
#mixer.narrow.console .strip.master .s-head .sname { font-size: 11px; }
#mixer.narrow.console .strip.master .lufs { font-size: 9px; white-space: nowrap; }
/* Console: a strip fills the mixer's height but never squashes below its
   content: in a short dock it grows and the mixer scrolls up / down. The open
   Sends fold shows up to 6 rows, then scrolls inside the strip. */
#mixer.console { align-items: flex-start; }
#mixer.console .strip { min-height: 100%; }
#mixer.console .strip > :not(.fader-row) { flex-shrink: 0; }
#mixer.console .s-sends.compact.fold.open { max-height: 104px; overflow-y: auto; scrollbar-width: none; }
/* Base 72 px, grown to fill the strip: at the dock's smallest height (323 px,
   a 1280x720 window) the whole strip, M/S and the Out plate included, fits
   without clipping (C-460); a taller dock gives every fader the same extra. */
#mixer.console .fader-row { flex: 1 1 auto; height: 72px; min-height: 72px; }

/* Panel maximize (ui/panelmax.js; mockup 04-plans/mockups/panel-maximize.html, pick A):
   the panel fills the app under the top bar. */
.floating-panel.maximized, .dock.maximized {
  position: fixed !important;
  left: 0 !important; right: 0 !important; bottom: 0 !important;
  top: var(--max-top, 0px) !important;
  width: auto !important; height: auto !important;
  max-height: none; resize: none; border-radius: 0; z-index: 700 !important;
}
.floating-panel.maximized .floating-panel-head { cursor: default; }
.panel-restore.rbtn, .floating-panel-head > .panel-restore.rbtn { border: 1px solid var(--select); background: var(--panel-2); color: var(--text); white-space: nowrap; }
.panel-restore[hidden] { display: none; }
/* Mixer keyboard: the insert slot ↓/↑ walked to (Enter opens it). */
.fx-panel .fx-slots > .kb-slot { outline: 2px solid var(--select); outline-offset: -1px; }
/* Import report drawer (C-588, ui/importreport.js) */
.ir-drawer { position: fixed; top: 56px; right: 12px; bottom: 56px; width: min(380px, calc(100vw - 24px)); z-index: 160; display: flex; flex-direction: column; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--panel-radius); box-shadow: var(--pop-shadow, var(--shadow)); font-size: 13px; }
.ir-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 12px 14px 4px; }
.ir-head h2 { margin: 0; font-size: 14px; }
.ir-sub, .ir-sum { margin: 2px 0 0; color: var(--muted-2); font-size: 12px; overflow-wrap: anywhere; }
.ir-sum { padding: 0 14px 8px; border-bottom: 1px solid var(--line); }
.ir-x { background: none; border: 0; color: var(--muted-2); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.ir-x:hover { color: var(--text); }
.ir-body { flex: 1; overflow: auto; padding: 6px 8px; }
.ir-sec { border-bottom: 1px solid var(--line-soft); padding: 4px 6px; }
.ir-sec summary { cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.ir-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ir-badge { margin-left: auto; color: var(--warn); font-size: 11px; white-space: nowrap; }
.ir-sec ul { list-style: none; margin: 0 0 4px; padding: 0; }
.ir-row { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 2px 0; }
.ir-tag { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 1px; }
.ir-changed .ir-tag { color: var(--muted-2); }
.ir-dropped .ir-tag { color: var(--warn); }
.ir-text { overflow-wrap: anywhere; }
.ir-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.ir-btn { background: var(--panel-3); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 5px 10px; cursor: pointer; }
.ir-btn:hover { border-color: var(--muted); }
/* The top bar holds still: #status is always the same 8 px dot in its slot (green = fine, amber/red = a
   message), and the words float under the bar (::after from the title) instead of taking room in it, so
   nothing else moves when a message comes and goes. */
body header.transport > #status { display: block; flex: none; order: 19; width: 8px; min-width: 0; height: 8px; padding: 0; border-radius: 50%; font-size: 0; position: relative; overflow: visible; background: var(--meter-hi, var(--warn, #d9a441)); }
body header.transport > #status[data-ok] { background: var(--meter-lo); }
header.transport > #status:not([data-ok]):not(:empty)::after {
  content: attr(title); position: fixed; top: 58px; right: 14px; z-index: 40; max-width: min(36em, calc(100vw - 28px));
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font: var(--fs-small)/1.3 var(--mono); letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; box-shadow: var(--pop-shadow);
}

/* ---------- Patcher (ui/patcher.js, mockup 04-plans/mockups/2026-11-26_patcher.html, picks 1A/2A/3A) ----------
   Tokens only. Wires are neutral (amber means sound only); a selected wire or
   node is the white fill. */
.pt-window { position: fixed; z-index: 845; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--pop-shadow); overflow: hidden; min-width: 560px; min-height: 360px; }
.pt-window:focus { outline: none; }
.pt-bar { flex: none; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; background: var(--chrome); border-bottom: 1px solid var(--chrome-line); cursor: grab; user-select: none; touch-action: none; white-space: nowrap; font-size: var(--fs-small); }
.pt-bar:active { cursor: grabbing; }
.pt-bar .sp { flex: 1; }
.pt-title { font-weight: 600; color: var(--text); }
.pt-where { color: var(--muted); overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.pt-presets { min-width: 190px; }
.pt-presets .dps-name { flex: 1; text-align: center; }
.pt-btn { height: 24px; padding: 0 10px; border: 1px solid var(--chrome-line); border-radius: 5px; background: var(--chrome-2); color: var(--text); font: inherit; font-size: var(--fs-small); cursor: pointer; }
.pt-btn:hover, .pt-btn:focus-visible { border-color: var(--muted); }
.pt-btn.fill { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.pt-btn:disabled { opacity: 0.5; cursor: default; }
.pt-auto { position: absolute; right: 12px; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted-2); cursor: pointer; }
.pt-tabs { display: inline-flex; border: 1px solid var(--chrome-line); border-radius: 5px; overflow: hidden; }
.pt-tab { height: 22px; padding: 0 12px; border: 0; background: transparent; color: var(--muted-2); font: inherit; font-size: var(--fs-small); cursor: pointer; }
.pt-tab.on { background: var(--row-sel); color: var(--text); }
.pt-window .fxw-btn { width: 24px; height: 24px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.pt-window .fxw-btn:hover { color: var(--text); background: var(--panel-3); }
.pt-main { flex: 1; min-height: 0; display: flex; }
.pt-mapwrap { position: relative; flex: 1; min-width: 0; display: flex; }
.pt-mapwrap[hidden] { display: none; }
.pt-canvas { position: relative; }
.pt-zoom { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.pt-map { position: relative; flex: 1; min-width: 0; overflow: auto; background-color: var(--grid-bg); background-image: radial-gradient(var(--line-soft) 1px, transparent 1px); background-size: 16px 16px; outline: none; }
.pt-map.wiring { cursor: crosshair; }
.pt-map.moving { cursor: grabbing; user-select: none; }
.pt-wires { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.pt-wire { fill: none; stroke: var(--muted-2); stroke-width: 2; }
.pt-wire.sel { stroke: var(--fill); stroke-width: 2.5; }
.pt-wire.mute { stroke: var(--faint); stroke-dasharray: 4 4; }
.pt-wire.temp { stroke: var(--fill); stroke-dasharray: 5 4; }
.pt-wire-hit { fill: none; stroke: transparent; stroke-width: 12; pointer-events: stroke; cursor: pointer; }
.pt-wchip { position: absolute; translate: -50% -50%; z-index: 1; font-size: 11px; line-height: 16px; padding: 0 5px; border: 1px solid var(--chrome-line); border-radius: 4px; background: var(--chrome-2); color: var(--muted-2); white-space: nowrap; pointer-events: none; }
.pt-wchip.sel { border-color: var(--fill); color: var(--text); }
/* The node layer lies over the wires: only the nodes take the pointer, so a wire's hit path gets its clicks. */
.pt-nodes { position: relative; pointer-events: none; }
.pt-nodes > .pt-node { pointer-events: auto; }
.pt-node { position: absolute; z-index: 2; width: 132px; min-height: 58px; border: 1px solid var(--chrome-line); background: var(--chrome); border-radius: 6px; font-size: var(--fs-small); box-shadow: 0 4px 14px rgb(0 0 0 / 0.35); user-select: none; cursor: grab; }
.pt-node.sel { border-color: var(--muted-2); }
.pt-node.off { opacity: 0.55; }
.pt-node.pt-end { width: 84px; background: var(--panel-3); cursor: default; padding: 4px 8px; }
.pt-end-sub { display: block; color: var(--muted); font-size: 11px; }
.pt-nhead { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 4px 0 7px; border-bottom: 1px solid var(--chrome-line); }
.pt-nhead b { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-pwr { flex: none; width: 11px; height: 11px; padding: 0; border-radius: 50%; border: 1.5px solid var(--faint); background: transparent; cursor: pointer; }
.pt-pwr.on { border-color: var(--fill); }
.pt-del { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.pt-del:hover { color: var(--text); background: var(--panel-3); }
.pt-ndot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--folder); }
.pt-nknob { flex: none; width: 20px; height: 20px; }
.pt-nknob-bg { fill: none; stroke: var(--chrome-2); stroke-width: 2; }
.pt-nknob-v { fill: none; stroke: var(--fill); stroke-width: 2; }
.pt-nbody { display: flex; align-items: center; gap: 6px; padding: 6px 7px; color: var(--muted-2); font-size: 11px; white-space: nowrap; overflow: hidden; }
.pt-chip { display: inline-block; font-size: 11px; line-height: 15px; padding: 0 6px; border-radius: 8px; background: var(--folder-bg); color: var(--folder); white-space: nowrap; }
.pt-port { position: absolute; top: 28px; width: 11px; height: 11px; border-radius: 50%; background: var(--panel); border: 2px solid var(--muted-2); cursor: crosshair; }
.pt-port.i { left: -7px; }
.pt-port.o { right: -7px; }
.pt-port:hover { border-color: var(--fill); }
.pt-end .pt-port { top: 15px; }
.pt-hint { position: absolute; left: 14px; bottom: 10px; right: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; pointer-events: none; }
.pt-empty { position: absolute; left: 50%; top: 40%; translate: -50% -50%; display: flex; flex-direction: column; gap: 4px; max-width: 320px; text-align: center; color: var(--muted-2); font-size: var(--fs-small); pointer-events: none; }
.pt-empty b { color: var(--text); }
.pt-insp { flex: none; width: 300px; overflow: auto; border-left: 1px solid var(--line); background: var(--panel-2); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.pt-insp-head { display: flex; align-items: center; gap: 6px; font-size: var(--fs-small); }
.pt-insp-head .sp { flex: 1; }
.pt-insp-sel { display: block; padding: 0 0 8px; border-bottom: 1px solid var(--line-soft); color: var(--muted-2); font-size: var(--fs-small); line-height: 1.4; }
.pt-insp-sel b { color: var(--text); font-weight: 600; }
.pt-insp-sel[hidden] { display: none; }
.pt-insp-empty { display: flex; flex-direction: column; gap: 4px; color: var(--muted-2); font-size: var(--fs-small); }
.pt-insp-empty b { color: var(--text); }
.pt-insp-card { column-width: auto !important; }
.pt-insp-links { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted-2); }
.pt-insp-lh { color: var(--muted); }
.pt-insp-link b { color: var(--text); font-weight: 600; margin-right: 4px; }
.pt-insp .rtt-tile { position: relative; }
.pt-insp .rtt-tile .pt-chip { display: block; margin: 2px auto 0; width: fit-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pt-insp .pt-linked input { pointer-events: none; }
.pt-linking .pt-insp .pt-linkable { outline: 1.5px dashed var(--fill); outline-offset: 2px; border-radius: 6px; }
.pt-macros { flex: none; display: flex; gap: 6px; padding: 8px 10px; background: var(--panel-2); border-top: 1px solid var(--line); overflow-x: auto; }
.pt-mac { flex: none; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--panel); }
.pt-mac.empty { opacity: 0.45; }
.pt-mac.learn { border-color: var(--fill); opacity: 1; }
.pt-mval { font-size: 12px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.pt-card-macros .pt-mval { display: none; }
.pt-mac.empty:hover { opacity: 1; }
.pt-mname { font-size: 11px; color: var(--muted-2); cursor: grab; padding: 0 4px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-mcount { font-size: 11px; color: var(--muted); }
.pt-mbtn { width: 46px; height: 24px; margin: 6px 0 4px; border: 1px solid var(--chrome-line); border-radius: 5px; background: var(--chrome-2); color: var(--muted-2); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.pt-mbtn.on { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.pt-mactab { flex: 1; overflow: auto; padding: 12px 14px; }
.pt-mactab-help { color: var(--muted-2); font-size: var(--fs-small); margin: 0 0 8px; max-width: 640px; }
.pt-table { border-collapse: collapse; width: 100%; font-size: var(--fs-small); }
.pt-table th, .pt-table td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; }
.pt-table th { background: var(--panel-2); color: var(--muted-2); font-weight: 600; }
.pt-num { width: 76px; height: 22px; border: 1px solid var(--chrome-line); border-radius: 4px; background: var(--input-bg); color: var(--text); font: inherit; padding: 0 6px; font-variant-numeric: tabular-nums; }
.pt-sel { height: 22px; border: 1px solid var(--chrome-line); border-radius: 4px; background: var(--input-bg); color: var(--text); font: inherit; }
.pt-inv { color: var(--muted); font-size: 11px; }
.pt-rng-td { min-width: 160px; }
.pt-rng { position: relative; display: block; height: 8px; min-width: 160px; background: var(--lane-bg); border-radius: 4px; cursor: ew-resize; touch-action: none; }
.pt-rng i { position: absolute; top: 0; bottom: 0; min-width: 2px; background: var(--muted-2); border-radius: 4px; }
.pt-rng:hover i, .pt-rng.drag i { background: var(--text); }
.pt-spread td { text-align: right; }
/* Macro links table (mockup 4A): rows, no column lines; muted 11 px head. */
.pt-links th, .pt-links td { border: 0; border-bottom: 1px solid var(--line-soft); }
.pt-links th { font-size: var(--fs-small); font-weight: 400; color: var(--muted); }
.pt-links td b { font-weight: 600; }
.pt-links .pt-fk-td { color: var(--muted-2); white-space: nowrap; }
.pt-fk-td .pt-sel + .pt-sel { margin-left: 6px; }
.pt-links th:nth-child(4), .pt-links .pt-lohi-td { text-align: right; white-space: nowrap; }
.pt-lohi-td .pt-num { width: 58px; text-align: right; }
.pt-dash { color: var(--muted-2); margin: 0 6px; }
.pt-spread .pt-btn + .pt-btn { margin-left: 6px; }
.pt-btn[aria-disabled='true'] { opacity: 0.5; cursor: default; }
.pt-insp[hidden], .pt-mactab[hidden] { display: none; }
.pt-curve-td { white-space: nowrap; }
.pt-crv { vertical-align: middle; margin-right: 6px; }
.pt-crv path { fill: none; stroke: var(--fill); stroke-width: 1.5; }
.pt-addrow td { background: var(--panel-2); }
.pt-save { display: flex; flex-direction: column; gap: 4px; width: 300px; padding: 4px; font-size: var(--fs-small); }
.pt-save label { color: var(--muted-2); margin-top: 6px; }
.pt-in { height: 26px; border: 1px solid var(--chrome-line); border-radius: 5px; background: var(--input-bg); color: var(--text); font: inherit; padding: 0 8px; }
.pt-colors { display: flex; gap: 6px; }
.pt-color { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 4px; cursor: pointer; }
.pt-color.on { outline: 2px solid var(--fill); outline-offset: 1px; }
.pt-save label.pt-check { display: flex; align-items: center; gap: 6px; color: var(--text); margin-top: 10px; }
.pt-save-btns { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }
/* The Devices card body. */
.fx-patcher { display: flex; flex-direction: column; gap: 5px; }
.pt-mini-wrap { position: relative; }
.pt-mini { display: block; width: 100%; height: 64px; padding: 0; border: 1px solid var(--line-soft); border-radius: 4px; background: var(--grid-bg); cursor: pointer; }
.pt-mini:hover { border-color: var(--muted); }
.pt-mini-count { position: absolute; right: 6px; bottom: 3px; font-size: 11px; color: var(--muted); pointer-events: none; }
.pt-mini-wire { fill: none; stroke: var(--muted-2); stroke-width: 1.3; }
.pt-mini-wire.mute { stroke: var(--faint); stroke-dasharray: 3 3; }
.pt-mini-node { fill: var(--chrome-2); stroke: var(--faint); }
.pt-mini-node.end { fill: var(--panel-3); }
.pt-summary { font-size: 11px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-card-macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; justify-items: center; }
.pt-card-macros .pt-mac { width: 100%; border: 0; background: transparent; padding: 0; }
.pt-card-macros .pt-mcount { display: none; }
/* Devices: Shift/⌘-clicked for Group into Patcher. */
.dev.picked > .dvh { box-shadow: inset 0 -2px 0 var(--fill); }
.br-row.muted { color: var(--muted); font-style: normal; pointer-events: none; }
.pt-empty[hidden], .pt-mbtn[hidden], .pt-mac .knob[hidden] { display: none; }
.pt-card-presets { display: flex; width: 100%; }
.pt-card-presets .dps-name { flex: 1; text-align: center; }
/* Patcher ChainHost ideas (mockup 04-plans/mockups/2026-11-26_patcher-chainhost.html, picks 1A/2A/6A): node Wet, LFOs, macro CC. Neutral tokens only. */
.pt-nhead.wet { gap: 4px; padding: 0 3px 0 5px; }
.pt-wtag { flex: none; font-size: 11px; line-height: 15px; padding: 0 4px; border-radius: 8px; background: var(--folder-bg); color: var(--folder); white-space: nowrap; }
.pt-wet { display: flex; align-items: center; gap: 6px; font-size: 11px; border-radius: 6px; }
.pt-wet-t { display: flex; flex-direction: column; line-height: 1.25; }
.pt-wet-l { color: var(--muted-2); }
.pt-wet-v { font-weight: 600; font-variant-numeric: tabular-nums; }
.pt-wet .pt-chip { margin-top: 1px; }
.pt-wet-v[hidden], .pt-wet .pt-chip[hidden] { display: none; }
.pt-mac { position: relative; }
.pt-mac .knob-dial { position: relative; }
.pt-mring { position: absolute; inset: -5px; width: calc(100% + 10px); height: calc(100% + 10px); pointer-events: none; overflow: visible; }
.pt-mring path { fill: none; stroke-linecap: round; }
.pt-mring-span { stroke: var(--muted-2); stroke-width: 2; opacity: 0.45; }
.pt-mring-now { stroke: var(--text); stroke-width: 2.5; }
.pt-mcc { position: absolute; top: -5px; right: -5px; font-size: 11px; font-weight: 600; line-height: 14px; padding: 0 4px; border-radius: 6px; background: var(--folder-bg); color: var(--folder); border: 1px solid var(--folder); }
.pt-mcc[hidden] { display: none; }
.pt-lfo { flex: none; width: 104px; display: flex; flex-direction: column; gap: 3px; padding: 6px 7px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--panel); font-size: 11px; cursor: pointer; }
.pt-lfo:hover, .pt-lfo:focus-visible { border-color: var(--line); outline: none; }
.pt-lfo.sel { border-color: var(--muted-2); }
.pt-lfo.off { opacity: 0.45; }
.pt-lfo.off:hover, .pt-lfo.off.sel { opacity: 1; }
.pt-lfo-hd { display: flex; align-items: center; gap: 5px; }
.pt-lfo-hd b { flex: 1; font-weight: 600; }
.pt-grip { color: var(--faint); letter-spacing: -2px; cursor: grab; padding: 0 2px 0 0; user-select: none; }
.pt-grip:hover { color: var(--muted-2); }
.pt-lfo-wv { height: 26px; background: var(--lane-bg); border-radius: 3px; overflow: hidden; }
.pt-lfo-w { display: block; width: 100%; height: 100%; }
.pt-lfo-path { fill: none; stroke: var(--muted-2); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.pt-lfo.sel .pt-lfo-path { stroke: var(--fill); }
.pt-lfo-dot { fill: var(--fill); }
.pt-lfo-sub { color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-lfo.off .pt-lfo-sub { color: var(--muted); }
.pt-sepv { flex: none; width: 1px; background: var(--line); margin: 0 4px; align-self: stretch; }
.pt-lfo-linking .pt-macros .pt-mac { opacity: 1; }
.pt-insp-sub { color: var(--muted); font-size: 11px; }
.pt-insp-hint { color: var(--muted-2); font-size: 11px; margin: 4px 0 0; }
.pt-shp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.pt-shp-b { height: 24px; padding: 3px 4px; border: 1px solid var(--chrome-line); border-radius: 4px; background: var(--input-bg); cursor: pointer; }
.pt-shp-b svg { display: block; width: 100%; height: 100%; }
.pt-shp-b path { fill: none; stroke: var(--muted-2); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.pt-shp-b.on { border-color: var(--fill); }
.pt-shp-b.on path { stroke: var(--fill); }
.pt-shp-b:hover { border-color: var(--muted); }
.pt-fld { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; padding: 3px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-small); }
.pt-fld-l { color: var(--muted-2); flex: none; }
.pt-fld-c { display: flex; align-items: center; gap: 6px; }
.pt-fld-h { border: 0; min-height: 0; padding-top: 8px; }
.pt-seg { display: inline-flex; border: 1px solid var(--chrome-line); border-radius: 5px; overflow: hidden; }
.pt-seg button { border: 0; background: transparent; color: var(--muted-2); font: inherit; font-size: 11px; padding: 2px 9px; cursor: pointer; }
.pt-seg button.on { background: var(--row-sel); color: var(--text); }
.pt-unit { display: inline-flex; align-items: center; gap: 4px; color: var(--muted-2); }
.pt-unit .pt-num { width: 62px; }
.pt-lfo-tgt { display: flex; align-items: center; gap: 6px; padding: 3px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-small); }
.pt-lfo-tn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-mactab-h { margin: 18px 0 4px; font-size: var(--fs-small); color: var(--text); }
.pt-lfo-link { border: 0; background: none; padding: 0; color: var(--text); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 2px; }
/* Patcher groups (mockup 04-plans/mockups/2026-11-26_patcher-groups.html, 1): the marquee and the floating selection bar. */
.pt-map.boxing { user-select: none; }
.pt-marq { position: absolute; border: 1px dashed var(--muted-2); background: var(--line-soft); pointer-events: none; }
.pt-selbar { position: absolute; z-index: 4; display: flex; gap: 6px; align-items: center; padding: 4px 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; }
.pt-selbar[hidden] { display: none; }
.pt-selbar-n { font-weight: 600; }
.pt-selbar .pt-btn { height: 22px; padding: 0 9px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.pt-kbd { font: inherit; font-size: 11px; color: var(--muted); margin-left: 2px; padding: 0; border: 0; background: none; }
.pt-btn.fill .pt-kbd { color: var(--on-fill); }
/* Patcher groups (groups mockup 2A: the collapsed box; 3A: open in place, a frame round the members). */
.pt-node.pt-gnode { width: 176px; min-height: 0; }
.pt-gopen { flex: none; height: 18px; padding: 0 3px; border: 0; border-radius: 3px; background: transparent; color: var(--muted-2); font: inherit; font-size: 11px; cursor: pointer; }
.pt-gopen:hover, .pt-gopen:focus-visible { color: var(--text); background: var(--panel-3); }
.pt-pwr.mixed { opacity: 0.5; }
.pt-gbody { display: flex; flex-direction: column; gap: 5px; padding: 6px 7px; }
.pt-pills { display: flex; flex-wrap: wrap; gap: 3px; }
.pt-pills span { font-size: 11px; line-height: 15px; padding: 0 5px; border-radius: 3px; background: var(--panel-3); color: var(--muted-2); white-space: nowrap; }
.pt-gsub { color: var(--muted); font-size: 11px; }
.pt-gframe { position: absolute; z-index: 1; border: 1px solid var(--muted-2); border-radius: 8px; background: var(--line-soft); pointer-events: none; }
.pt-gframe.sel { border-color: var(--fill); }
.pt-gframe-bar { position: absolute; left: 0; right: 0; top: 0; height: 24px; display: flex; align-items: center; gap: 6px; padding: 0 8px; background: var(--panel-3); border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; font-size: 12px; pointer-events: auto; cursor: grab; user-select: none; }
.pt-gframe-bar b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-gframe-bar .sp { flex: 1; }
.pt-gfold, .pt-gcoll { flex: none; padding: 0 2px; border: 0; border-radius: 3px; background: transparent; font: inherit; cursor: pointer; }
.pt-gfold { color: var(--muted-2); font-size: 11px; }
.pt-gcoll { color: var(--muted); font-size: 12px; }
.pt-gfold:hover, .pt-gcoll:hover, .pt-gfold:focus-visible, .pt-gcoll:focus-visible { color: var(--text); }
/* Session replay entry (ui/replayentry.js): the popover of sessions. Person dots are room colours (data). */
.rpe { display: grid; gap: 6px; padding: 6px; width: 300px; max-width: calc(100vw - 32px); }
.rpe-head { color: var(--muted-2); font-size: 11px; font-weight: 600; padding: 2px 4px; }
.rpe-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rpe-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid var(--line-soft); border-radius: 5px; background: var(--panel); color: var(--muted-2); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.rpe-row:hover { border-color: var(--line); color: var(--text); }
.rpe-row b { color: var(--text); font-weight: 600; }
.rpe-dots { display: flex; gap: 3px; flex: none; }
.rpe-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.rpe-note { color: var(--faint); font-size: 11px; margin: 0; padding: 2px 4px; list-style: none; }
.rpe-all { justify-self: start; }

/* Chat: reply, reactions, edit (2026-11-26, kapnoes; mockup
   04-plans/mockups/2026-11-26_chat-reply-react-edit.html, picks A). One look for
   every chat (dash/msgrows.js rows): the hover bar on the row's top-right (no
   layout move), a reply's quote strip, "(edited)", reaction chips, the reply
   bar over a composer, edit in place. No amber: nothing here is sound. */
.mr-row { position: relative; }
.mr-bar { position: absolute; top: -8px; right: 4px; z-index: 2; display: flex; gap: 1px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--tip-bg, var(--panel-2)); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.12s; }
.mr-row:hover > .mr-bar, .mr-row:has(:focus-visible) > .mr-bar, .mr-row:focus-visible > .mr-bar, .mr-bar:has([aria-expanded='true']) { opacity: 1; pointer-events: auto; }
/* Right-click menu (2026-11-26, mockup 2026-11-26_chat-rightclick.html pick A): rows take focus for the Menu key. */
.mr-row:focus { outline: 0; }
.mr-row:focus-visible { outline: 1px solid color-mix(in srgb, var(--fill) 40%, transparent); outline-offset: 1px; border-radius: 6px; }
.mr-ctx { min-width: 220px; }
.mr-qr { display: flex; gap: 2px; padding: 2px; margin-bottom: 2px; border-bottom: 1px solid var(--line-soft); }
.mr-qr-e { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: 16px / 1 var(--sans); cursor: pointer; }
.mr-qr-e:hover, .mr-qr-e:focus-visible { background: color-mix(in srgb, var(--text) 10%, transparent); outline: 0; }
.mr-qr-e.is-on { background: color-mix(in srgb, var(--fill) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fill) 55%, transparent); }
.mr-qr-e.is-more { color: var(--muted-2); font-size: 13px; }
.mr-row.is-editing > .mr-bar { display: none; }
.mr-bar .mr-btn.is-icon, .mr-bar .soc-btn.is-icon { width: 24px; height: 22px; border-radius: 5px; font-size: 13px; }
.mr-bar .mr-btn.is-icon:hover, .mr-bar .soc-btn.is-icon:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
.mr-bar .soc-msg-acts { display: contents; }
.mr-row.is-flash { animation: mr-flash 1.6s ease-out; border-radius: 6px; }
@keyframes mr-flash { 0%, 30% { background: color-mix(in srgb, var(--fill) 14%, transparent); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .mr-row.is-flash { animation: none; outline: 1px solid color-mix(in srgb, var(--fill) 40%, transparent); } }
.mr-quote { display: flex; gap: 6px; align-items: baseline; max-width: 100%; margin: 2px 0 3px; padding: 2px 8px; border: 0; border-left: 2px solid var(--muted); border-radius: 0 6px 6px 0; background: var(--line-soft); color: var(--muted-2); font: 400 11.5px / 1.4 var(--sans); text-align: left; cursor: pointer; overflow: hidden; }
.mr-quote:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.mr-quote:focus-visible { outline: 2px solid var(--fill); outline-offset: 1px; }
.mr-quote.is-miss { border-left-color: var(--warn); }
.mr-quote-name { flex: none; font-weight: 600; color: var(--text); }
.mr-quote-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-quote.is-gone .mr-quote-text { font-style: italic; }
.mr-edited { color: var(--muted); font-size: 11px; white-space: nowrap; }
.mr-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mr-react { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: 500 12px / 1 var(--sans); cursor: pointer; }
.mr-react:hover { border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.mr-react:focus-visible { outline: 2px solid var(--fill); outline-offset: 1px; }
.mr-react.is-mine { border-color: color-mix(in srgb, var(--fill) 55%, transparent); background: color-mix(in srgb, var(--fill) 12%, transparent); }
.mr-react.is-add { color: var(--muted-2); opacity: 0; }
.mr-row:hover .mr-react.is-add, .mr-react.is-add:focus-visible, .mr-react.is-add[aria-expanded='true'] { opacity: 1; }
.mr-react-e { font-size: 13px; line-height: 1; }
.mr-react-n { font-variant-numeric: tabular-nums; color: var(--muted-2); }
.mr-react.is-mine .mr-react-n { color: var(--text); }
.mr-edit { margin: 2px 0; padding: 5px 8px; border: 1px solid var(--fill); border-radius: 8px; background: var(--input-bg, var(--bg)); }
.mr-edit.is-bad { border-color: var(--warn); }
.mr-edit-input { display: block; width: 100%; min-height: 20px; padding: 0; border: 0; resize: none; background: transparent; color: var(--text); font: 400 13px / 1.45 var(--sans); outline: 0; }
.mr-edit-hint { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.mr-replybar { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 4px 4px 9px; border-radius: 8px 8px 0 0; background: var(--line-soft); color: var(--muted-2); font: 400 11.5px / 1.3 var(--sans); }
.mr-replybar[hidden] { display: none; }
.mr-reply-ic { flex: none; color: var(--muted); }
.mr-reply-lead { flex: none; }
.mr-reply-name { flex: none; font-weight: 600; color: var(--text); }
.mr-reply-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-reply-x { flex: none; width: 22px; height: 22px; }
/* The DAW chat panel's ⋯ (Message sound, Desktop notifications). */
.chat-more { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted-2); font-size: 15px; line-height: 1; cursor: pointer; }
.chat-more:hover, .chat-more[aria-expanded='true'] { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
/* ---------- Chat bubbles (2026-11-26, Avi's pick A, 04-plans/mockups/2026-11-26_chat-bubbles.html) ----------
   Two-sided: theirs left with face + name once per run, yours right with only the
   time. A row is as wide as its bubble (max ~80%), so the hover bar sits on the
   bubble's top edge. A run's bubbles hug (small inner corners). Emoji-only: big,
   no bubble. No amber: yours is a tint of --fill, theirs --panel-3. */
.mr-row.mr-row { --mr-mine: color-mix(in srgb, var(--fill) 20%, var(--panel)); --mr-theirs: var(--panel-3); width: fit-content; max-width: 82%; min-width: 0; box-sizing: border-box; }
.mr-row.mr-row.mr-row:hover, .mr-row.mr-row.mr-row:focus-within { background: transparent; }
.mr-row.is-mine.mr-row { grid-template-columns: minmax(0, 1fr); margin-left: auto; }
.mr-row.is-mine > .mr-gut { display: none; }
.mr-row.is-mine > .mr-main { display: flex; flex-direction: column; align-items: flex-end; }
.mr-row.is-mine .mr-meta { display: none; }
.mr-row.mr-first .mr-meta { margin: 0 0 2px 4px; }
/* Their face by the last bubble of a run; a follow-up's own time on hover elsewhere. */
.mr-row:not(.is-mine) > .mr-gut { align-self: end; flex-direction: column; align-items: center; }
.mr-row:has(+ .mr-cont) > .mr-gut > .mr-face { display: none; }
.mr-row:not(:has(+ .mr-cont)) > .mr-gut > .mr-hover-time { display: none; }
.mr-face { display: flex; }
/* Your time under the last bubble of your run. */
.mr-stamp { margin: 2px 6px 0; font: 400 10.5px / 1.2 var(--sans); color: var(--muted); }
.mr-row.is-mine:has(+ .mr-cont) .mr-stamp { display: none; }
.mr-bubble { width: fit-content; max-width: 100%; min-width: 0; box-sizing: border-box; padding: 6px 10px; border-radius: 14px; background: var(--mr-theirs); }
.mr-row.is-mine .mr-bubble { background: var(--mr-mine); }
.mr-bubble .mr-text { line-height: 1.4; }
.mr-bubble .mr-quote { margin: 0 0 4px; background: color-mix(in srgb, var(--bg) 35%, transparent); }
.mr-bubble .mr-link { margin: 6px 0 2px; }
.mr-bubble.is-gone { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.mr-bubble.is-emoji { padding: 0 2px; background: transparent; }
.mr-bubble.is-emoji .mr-text { font-size: 28px; line-height: 1.2; }
.mr-row.is-mine .mr-bubble.is-emoji, .mr-row .mr-bubble.is-emoji { background: transparent; }
.mr-bubble:has(.mr-edit) { padding: 3px; }
.mr-bubble .mr-edit { margin: 0; min-width: min(260px, 100%); }
/* A run hugs: theirs on the left side, yours on the right. */
.mr-row:not(.is-mine):has(+ .mr-cont:not(.is-mine)) .mr-bubble { border-bottom-left-radius: 5px; }
.mr-row.mr-cont:not(.is-mine) .mr-bubble { border-top-left-radius: 5px; }
.mr-row.is-mine:has(+ .mr-cont.is-mine) .mr-bubble { border-bottom-right-radius: 5px; }
.mr-row.mr-cont.is-mine .mr-bubble { border-top-right-radius: 5px; }
.mr-row.is-mine .mr-reacts { justify-content: flex-end; }
.mr-row .mr-reacts { margin-top: 3px; }
/* The hover bar rides the bubble's top corner. */
.mr-row.mr-row > .mr-bar { top: -12px; right: -6px; }
.mr-row.mr-first:not(.is-mine) > .mr-bar { top: 7px; }
.chat .mr-row.mr-row { margin-top: 2px; }
.chat .mr-row.mr-row.mr-first { margin-top: 10px; }

/* C-673 Settings › Audio device (ui/audiodevice.js). Mockup
   04-plans/mockups/2026-11-26_audio-device-native.html, pick A: Output / Input /
   Timing in labelled boxes. No amber: these are settings, not sound. */
#settings .ad-section .set-card { display: grid; gap: 10px; padding: 12px; }
#settings .ad-section .set-card > * { margin: 0; padding: 0; border-top: 0; }
#settings .ad-section .set-card > .set-check { padding: 4px 4px 0; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.ad-status { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.ad-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tune-ok); flex: none; }
.ad-dot.is-mid { background: var(--muted-2); }
.ad-dot.is-bad { background: var(--warn); }
.ad-st { flex: 1; min-width: 0; display: grid; }
.ad-st b { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-st small { color: var(--muted); font-size: 12px; }
.ad-ms { font: 500 18px var(--mono); color: var(--text); flex: none; }
.ad-grp { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); padding: 4px 12px 8px; }
.ad-gh { display: flex; align-items: center; gap: 8px; padding: 8px 0 6px; border-bottom: 1px solid var(--line-soft); margin-bottom: 2px; }
.ad-gh svg { width: 16px; height: 16px; flex: none; color: var(--muted-2); }
.ad-gh b { font: 600 11px var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text); }
.ad-gh small { margin-left: auto; font: 11.5px var(--mono); color: var(--muted); }
.ad-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 3px 0; font-size: 13px; color: var(--text); }
.ad-row > span:first-child { flex: none; }
.ad-row select { max-width: 240px; min-width: 0; padding: 4px 8px; border-radius: 7px; background: var(--input-bg); border: 1px solid var(--line); color: var(--text); font-size: 13px; }
.ad-row.ad-dim { color: var(--muted-2); font-size: 12.5px; }
.ad-lat, .ad-val { font: 12px var(--mono); color: var(--muted-2); text-align: right; }
.ad-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
#settings .ad-seg button { background: none; border: 0; border-radius: 0; color: var(--muted-2); padding: 5px 12px; font-size: 12.5px; }
#settings .ad-seg button.on { background: var(--chrome-2); color: var(--text); }
.ad-inpick { display: flex; align-items: center; gap: 10px; min-width: 0; justify-content: flex-end; flex-wrap: wrap; }
.ad-same { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-2); font-size: 12.5px; cursor: pointer; }
.ad-mic .set-mic-row > span { display: none; }
.ad-mic select { max-width: 220px; }
.ad-foot { display: flex; justify-content: flex-end; }
#settings .ad-section .ad-web { color: var(--muted); font-size: 12px; padding: 0 4px; }

/* ---- Inspector on the right (pref inspectorSide; ui/inspector.js toggles body.insp-right) ----
   A 5th column after the right dock zone holds it; column 1 collapses to 0. The
   margin, corners and resize grip flip to face the playlist. */
body.insp-right { grid-template-columns: 0px var(--zl-w, 0px) minmax(0, 1fr) var(--zr-w, 0px) var(--insp-w, 0px); }
body.insp-right > .inspector { grid-column: 5; margin-right: 0; margin-left: var(--gap, 0px); border-radius: var(--panel-radius) 0 0 var(--panel-radius); }
body.insp-right .insp-resize { right: auto; left: 0; }
/* Audit mix bug 4 (2026-11-27): the master keeps a track strip's row heights
   (head, M/S row holding the loudness), so its fader lines up with theirs. */
#mixer.console .s-head { min-height: 39px; box-sizing: border-box; }
#mixer.console .strip.master .sbtns { min-height: 16px; align-items: center; }
/* Narrow: the sideways names differ in length, so the head is one fixed
   height (long names end in "…") and every fader starts on one line. */
#mixer.narrow.console .s-head { height: 76px; min-height: 76px; overflow: hidden; }
#mixer.narrow.console .s-head .sname { max-height: 58px; text-overflow: ellipsis; }
#mixer.narrow.console .strip.master .sbtns { min-height: var(--narrow-ms-h, 38px); }
/* Kit fold button fits the M/S row (it made the kit's fader 4 px shorter). */
#mixer.console .sbtns .kit-fold { height: 16px; min-width: 22px; padding: 0 4px; }
/* Kit rows read as part of their kit (audit mix UX gap): tucked against the
   kit strip, a tint of the kit colour and a "↳ kit" label in the number slot. */
#mixer.console .strip.kit-row-strip { margin-left: -2px; background: color-mix(in srgb, var(--kit-c, var(--c)) 10%, var(--panel-2)); box-shadow: inset 0 2px 0 var(--kit-c, var(--c)); }
#mixer.console .strip.kit-row-strip .s-head { background: color-mix(in srgb, var(--c) 50%, var(--panel)); }
#mixer.console .strip.kit-row-strip .s-num { opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The dB scale (selected strip): -6 and -12 overlapped on a console fader
   under ~200 px (C-505 / audit mix); -12 gives way first. */
@container (max-height: 200px) { [data-mat="ink"] .strip .scale span[data-db="-12"] { display: none; } }
/* D3: "Muted for you" / "Solo for you" in the dB readout's place (ui/mixer.js). */
#mixer.console .strip .db.you { font-family: var(--sans); font-size: 10px; letter-spacing: 0; white-space: nowrap; color: var(--muted-2); }
/* One-button toggles (Utility Mono / Ø / DC, Ducker presets) read as lit
   chips: an outline when off, filled when on (audit mix UX: "toggles show no state"). */
.dev .rtt-seg.rtt-tog button { padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.dev .rtt-seg.rtt-tog button.on, .dev .rtt-seg.rtt-tog button.on:hover:not(:disabled) { background: var(--fill); border-color: var(--fill); color: var(--on-fill); box-shadow: none; }
/* Empty song: a hint where the strips go (ui/mixer.js, audit mix UX). */
#mixer .mix-empty { align-self: center; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 260px; margin: 0 auto 0 12px; color: var(--muted); font-size: var(--fs-ui); }
#mixer .mix-empty-add { padding: 4px 10px; border: 1px dashed var(--line); border-radius: 4px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
#mixer .mix-empty-add:hover, #mixer .mix-empty-add:focus-visible { border-color: var(--muted-2); border-style: solid; }

/* Recording you can see (audit 2026-11-26, rec 3 + UX 1 to 5; ui/armmeter.js, ui/recvisible.js).
   The Rec ▾ caret shows in every bar while an option is on (its red dot is the sign);
   an armed track shows its input chip and a thin input meter; Punch draws its range on
   the ruler; a count-in or pre-roll shows a big beat count. */
body.bar-simple #t-rec-more.set, #t-rec-more.tb-off.set { display: inline-flex !important; }
.ph.armed .ph-line > .ph-io.ph-in:not([hidden]) { display: inline-flex; flex: 0 0 auto; max-width: 96px; }
.pl-heads.compact .ph.armed .ph-line > .ph-io.ph-in { display: none; }
.ph-inmeter { height: 3px; margin: 2px 6px 0; border-radius: 2px; background: var(--line); overflow: hidden; pointer-events: none; }
.ph-inmeter[hidden] { display: none; }
.ph-inmeter > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 50ms linear; }
.ph-inmeter > i.hot { background: var(--warn); }
.ph.short .ph-inmeter { margin-top: 1px; height: 2px; }
.pl-punch { position: absolute; top: 15px; bottom: 0; pointer-events: none; z-index: 2; border-left: 1px solid color-mix(in srgb, var(--rec) 70%, transparent); border-right: 1px solid color-mix(in srgb, var(--rec) 70%, transparent); background: linear-gradient(to bottom, color-mix(in srgb, var(--rec) 22%, transparent) 0 38px, transparent 38px); }
.pl-punch[hidden] { display: none; }
.pl-punch-bar { position: absolute; left: 0; right: 0; top: 34px; height: 4px; background: var(--rec); }
.pl-countin { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 28px; border-radius: 14px; background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); box-shadow: var(--pop-shadow, var(--shadow)); pointer-events: none; z-index: 6; }
.pl-countin[hidden] { display: none; }
.pl-countin b { font: 700 72px / 1 var(--mono); color: var(--rec-dot); font-variant-numeric: tabular-nums; }
.pl-countin span { font: 500 12px var(--sans); color: var(--muted); }

/* UI vision mockup step 3: the transport pill. Play glows while it is
   playing (amber means sound). The Simple bar hides Key, Loop and the
   metronome (ui/toolbarreg.js), so a separator with nothing after it goes too. */
.transport #t-play.active, .tpill #t-play.active { box-shadow: var(--glow-sound); }
.t-transport:not(:has(> .loop-tools > :not(.tb-off))) > .loop-sep { display: none; } /* :has() cannot nest, so the group test sits on the parent */
.t-transport > .loop-tools:not(:has(> :not(.tb-off))) { display: none; }
@media (max-width: 1180px) {
  .rp-slot { width: 9.5rem; }
  .rp-idle { font-size: 11px; padding: 0 8px; }
}
/* The top bar's flat-button rule (.transport button:not(.on)…) blanks borders;
   same weight plus the id, so the idle Room play pill keeps its dashed outline. */
.transport button#t-room-start.rp-idle:not(.on):not(.active):not(#invite):not(.avatar) { border: 1px dashed color-mix(in srgb, var(--chrome-muted) 55%, transparent); background: transparent; color: var(--chrome-muted); }
.transport button#t-room-start.rp-idle:not(.on):not(.active):not(#invite):not(.avatar):hover:not(:disabled) { border-style: solid; border-color: var(--chrome-line); background: var(--chrome-2); color: var(--on-chrome); }
/* Narrow windows: the slot keeps one fixed width but drops the words (the dot
   when idle, the Join / Leave / End button in a session); the tip still names it. */
@media (max-width: 960px) {
  .rp-slot { width: 3.6rem; }
  .rp-idle .rp-idle-text, .rp-chip .rp-chip-text, .rp-chip .rp-chip-auto { display: none; }
  .rp-idle { padding: 0; }
  .rp-chip { justify-content: center; padding: 0 3px; }
}

/* ---------- UI adoption step 8: device cards (mockup 2026-11-27_ui-mockup, #p-devices) ----------
   Gear styling: each card is a lit piece of kit, a soft top-down sheen with a
   1 px edge, a top highlight and a drop shadow. Tokens only, so every theme
   follows. The Amp Envelope look inside (screens, ring knobs, sans readouts)
   stays as it is. The mixer is not touched: these rules are scoped to
   Devices and the Mixer's floating effect window. */
:is(#devices, .fx-window) .dev {
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-3) 94%, var(--text)), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent), var(--shadow);
}
:is(#devices, .fx-window) .dev .dvh { background: transparent; }
:is(#devices, .fx-window) .dev:not(.folded) .dvh { padding-left: 10px; }
/* Bypass (Audit 40 · D2): a pill at the right of the title bar, an LED and a
   word. On = the LED lit in the meter green; Bypassed = a grey LED and the
   card's body dims (the .dev.off rules above). */
.dev .dev-byp {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  height: 20px; min-height: 0; padding: 0 8px; margin-left: 4px;
  border: 0; border-radius: 999px; background: var(--bg); box-shadow: none;
  color: var(--muted-2); font: 500 11px/1 var(--sans); letter-spacing: 0; text-transform: none; cursor: pointer;
}
.dev .dev-byp:hover:not(:disabled) { background: var(--bg); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.dev .dev-byp .byp-led { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.dev .dev-byp.on .byp-led { background: var(--meter-lo); box-shadow: 0 0 6px var(--meter-lo); }
.dev:not(.off) .dev-byp { color: var(--muted-2); }
.dev.off .dev-byp { color: var(--text); }
.dev.folded .dev-byp { order: -1; margin: 0; padding: 0; width: 20px; justify-content: center; }
.dev.folded .dev-byp .byp-text { display: none; }
/* Type a value: double-click the number under a knob (ui/knob.js). */
.knob-text.knob-typable { cursor: text; border-radius: 3px; }
.knob-text.knob-typable:hover { box-shadow: 0 0 0 1px var(--line); }
.knob-text.knob-bad { color: var(--warn); }
.knob-text[hidden] { display: none; }
.knob .knob-type {
  order: 3; width: 58px; height: 18px; min-height: 0; padding: 0 2px; box-sizing: border-box;
  font: 500 11px/1 var(--mono); text-align: center; color: var(--text);
  background: var(--bg); border: 1px solid var(--fill); border-radius: 4px; outline: none;
}
/* UI vision mockup step 5: the tool pill. The playlist tools float in a glass
   pill at the bottom centre of the timeline, with the brush chip: the clip that
   Draw and Paint place (ui/playlist.js renderBrush). The playlist already
   scrolls 80 px past the last track (clampScroll), so the last lane can always
   be lifted clear of the pill (44 px tall, 8 px up). The tool row is #pl-tools
   as before, so keys, the customiser and the tool tests keep working. */
.pl-timeline { container: pl-timeline / inline-size; }
.pl-toolpill { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: 2px; height: 44px; padding: 0 6px; max-width: calc(100% - 16px); box-sizing: border-box; border-radius: 999px; border: 1px solid var(--line-glass, var(--line)); background: var(--glass, color-mix(in srgb, var(--chrome) var(--glass-chrome, 92%), transparent)); backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2); box-shadow: var(--shadow); }
.pl-toolpill :is(#pl-tools, .pl-tools) { display: flex; align-items: center; gap: 2px; height: auto; padding: 0; background: none; border: 0; border-radius: 0; }
.pl-toolpill :is(#pl-tools, .pl-tools) .pl-tool { width: 34px; height: 34px; min-height: 0; padding: 0 !important; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--muted-2); box-shadow: none; }
.pl-toolpill :is(#pl-tools, .pl-tools) .pl-tool .ic { width: 15px; height: 15px; }
.pl-toolpill :is(#pl-tools, .pl-tools) .pl-tool:hover:not(.on) { color: var(--text); background: var(--chrome-2); }
.pl-toolpill :is(#pl-tools, .pl-tools) .pl-tool.on { background: var(--chrome-on); color: var(--chrome-on-ink); }
.pl-toolpill .tp-sep { width: 1px; height: 20px; margin: 0 6px; background: var(--line); flex: none; }
.pl-toolpill .pl-brush { display: flex; align-items: center; gap: 8px; height: 32px; min-height: 0; min-width: 0; margin: 0 0 0 4px; padding: 0 12px 0 6px; border-radius: 999px; border: 0; background: var(--panel-3); color: var(--text); font: 500 12px var(--sans); box-shadow: none; white-space: nowrap; cursor: pointer; }
.pl-toolpill .pl-brush:hover { background: var(--chrome-2); }
.pl-brush .brush-sw { width: 20px; height: 20px; border-radius: 5px; flex: none; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-soft); }
.pl-brush .brush-k { color: var(--faint); font: 400 10px var(--rtt-font, var(--sans)); letter-spacing: 0.14em; }
.pl-brush .brush-name { min-width: 0; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; }
.pl-brush.none .brush-name { color: var(--muted); }
/* A narrow timeline keeps every tool: the chip drops its "Brush" word first, then the name. */
@container pl-timeline (max-width: 560px) { .pl-brush .brush-k { display: none; } .pl-brush .brush-name { max-width: 9ch; } }
/* Phone-narrow lanes: smaller round tools, the swatch alone, and the row scrolls sideways rather than spill out of the pill. */
@container pl-timeline (max-width: 400px) { .pl-brush .brush-name { display: none; } .pl-toolpill .pl-brush { padding: 0 6px; } .pl-toolpill :is(#pl-tools, .pl-tools) .pl-tool { width: 28px; height: 28px; } .pl-toolpill { overflow-x: auto; scrollbar-width: none; } .pl-toolpill .tp-sep { margin: 0 3px; } }

/* Tool dock (pref toolsDock, ui/tooldock.js; mockup tool-dock-mockup.html):
   the same #pl-tools row and brush chip, floating in the pill or docked at the
   left of the editing bar as before step 5 (the old square buttons, the chip
   shrunk to swatch + name). Each host has a grip, the only drag target. While
   a grip is dragged a ghost copy follows the pointer and a dashed spot shows
   where a drop lands. Docked tools fold into the Tool menu on narrow windows. */
.pl-tgrip { display: grid; place-items: center; width: 14px; height: 28px; flex: none; border-radius: 5px; color: var(--faint); cursor: grab; touch-action: none; user-select: none; }
.pl-tgrip:hover { color: var(--text); background: var(--chrome-2); }
.pl-tgrip .ic { width: 8px; height: 14px; }
.tools-dragging, .tools-dragging * { cursor: grabbing !important; }
.pl-toolpill .pl-tgrip { margin-right: 2px; }
.pl-tooldock { display: none; align-items: center; gap: 4px; flex: none; }
body.tools-docked .pl-toolpill { display: none; }
body.tools-docked .pl-toolbar .pl-tooldock { display: inline-flex; }
.pl-tooldock :is(#pl-tools, .pl-tools) { display: flex; gap: 1px; padding: 2px; height: 32px; align-items: center; background: var(--bg); border: 0; border-radius: 8px; }
.pl-tooldock :is(#pl-tools, .pl-tools) .pl-tool { width: 30px; height: 28px; min-height: 0; padding: 0 !important; display: grid; place-items: center; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--muted-2); box-shadow: none; }
.pl-tooldock :is(#pl-tools, .pl-tools) .pl-tool .ic { width: 15px; height: 15px; }
.pl-tooldock :is(#pl-tools, .pl-tools) .pl-tool:hover:not(.on) { color: var(--text); background: var(--panel-2); }
.pl-tooldock :is(#pl-tools, .pl-tools) .pl-tool.on { background: var(--chrome-on); color: var(--chrome-on-ink); border-color: var(--chrome-on); }
.pl-tooldock .pl-brush { display: flex; align-items: center; gap: 6px; height: 24px; min-height: 0; margin: 0; padding: 0 8px 0 4px; border-radius: 999px; border: 0; background: var(--panel-3); color: var(--text); font: 500 11.5px var(--sans); box-shadow: none; white-space: nowrap; cursor: pointer; }
.pl-tooldock .pl-brush:hover { background: var(--chrome-2); }
.pl-tooldock .pl-brush .brush-sw { width: 16px; height: 16px; border-radius: 4px; }
.pl-tooldock .pl-brush .brush-k { display: none; }
.pl-tooldock .pl-brush .brush-name { max-width: 12ch; }
/* Docked tools fold into the Tool menu under 1180 px or when the bar overflows (barmenus.js fit-tools), as before step 5. */
.bar-toolmenu, body .pl-toolbar .bar-menus.bar-toolmenu { display: none; }
@media (max-width: 1180px) {
  body.tools-docked .pl-toolbar .pl-tooldock { display: none; }
  body.tools-docked .pl-toolbar .bar-menus.bar-toolmenu { display: flex; }
}
body.tools-docked .pl-toolbar.fit-tools .pl-tooldock { display: none; }
body.tools-docked .pl-toolbar.fit-tools .bar-menus.bar-toolmenu { display: flex; }
#bar-toolmenu.tb-off, body.tools-docked #pl-tooldock.tb-off { display: none !important; }
/* Drop spots: the dashed slot in the editing bar (dragging the pill), the dashed pill shape in the playlist (dragging the docked row). */
.pl-dockslot { display: none; align-items: center; justify-content: center; flex: none; height: 32px; min-width: 210px; padding: 0 10px; border-radius: 8px; border: 1px dashed var(--muted); color: var(--muted-2); font: 500 12px var(--sans); white-space: nowrap; }
body.tools-dragging:not(.tools-docked) .pl-dockslot { display: inline-flex; }
.pl-floatzone { display: none; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 6; height: 44px; width: min(360px, calc(100% - 16px)); box-sizing: border-box; align-items: center; justify-content: center; border-radius: 999px; border: 1px dashed var(--muted); color: var(--muted-2); font: 500 12px var(--sans); pointer-events: none; }
body.tools-dragging.tools-docked .pl-floatzone { display: flex; }
:is(.pl-dockslot, .pl-floatzone).hot { border-color: var(--fill, var(--chrome-on)); color: var(--text); background: color-mix(in srgb, var(--fill, var(--chrome-on)) 8%, transparent); }
:is(.pl-toolpill, .pl-tooldock).lifting { opacity: 0.35; }
.pl-tool-ghost { position: fixed !important; z-index: 60; bottom: auto !important; transform: none !important; margin: 0; pointer-events: none; opacity: 0.92; box-shadow: var(--shadow); }
.pl-toolpill.pl-tool-ghost.snapped { box-shadow: 0 0 0 1px var(--fill, var(--chrome-on)), var(--shadow); } /* the drop snaps to a spot (ui/tooldock.js) */
.pl-tooldock.pl-tool-ghost { display: inline-flex !important; padding: 2px 4px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }

/* ===================================================================
   Phones and touch (audit 2026-11-26 mob B4, B6, U1 to U5; decision D4,
   2026-11-27: a small-screen note + a pointer: coarse size pass; a real phone
   DAW stays in the native iOS app). Last in the file so it wins. */

/* The small-screen note (ui/phonebanner.js). */
.phone-banner {
  position: fixed; left: 8px; right: 8px; bottom: calc(48px + env(safe-area-inset-bottom, 0px)); z-index: 880;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 12px;
  background: var(--tip-bg); color: var(--on-chrome); border: 1px solid var(--tip-line); box-shadow: var(--shadow);
  font-size: 13px; line-height: 1.35;
}
.phone-banner .phone-text { flex: 1; min-width: 0; }
.phone-banner .phone-ok { flex: none; min-width: 56px; min-height: 44px; border-radius: 10px; border: 1px solid var(--tip-line); background: var(--panel-3); color: var(--text); font: inherit; font-weight: 600; }

/* U2: the top bar wraps onto rows instead of hiding 11 controls in a
   sideways scroll with no cue (phones), or pushing Chat, the bell and Share
   off the edge once targets are finger-sized (tablets). The transport gets a
   row of its own; the low-use controls fold into More ▾ (ui/topbarfit.js,
   same query). The rows size to their content. */
@media (max-width: 760px), (pointer: coarse) and (max-width: 1100px) {
  /* The playlist gives way to 60 px (not 120) so a 450 px tall window (200%
     zoom) still fits the wrapped bars and an open dock. */
  body { grid-template-rows: auto auto minmax(60px, 1fr) 6px var(--dock-h); }
  body.dock-empty { grid-template-rows: auto auto minmax(60px, 1fr) 0 0; }
  header.transport { flex-wrap: wrap; height: auto; min-height: min-content; row-gap: 4px; padding-block: 4px; overflow: visible; overflow-x: clip; } /* clip, not hidden: no scroll box, so the row keeps its height */
  header.transport > .t-transport { order: 99; flex: 1 0 100%; max-width: 100%; justify-content: center; margin: 0 !important; position: static; transform: none; left: auto; } /* in the flow even when ui/transport.js would centre it absolutely */
  header.transport > .t-transport > .tp-grip { display: none; } /* the pod can't float off a wrapped bar */
  #t-people { display: none; } /* the avatar opens the same People menu: one target, not two */
  /* An auto grid row whose item scrolls can shrink to nothing: the edit bar keeps its height. */
  body > .pl-toolbar.editbar { min-height: 44px; flex-shrink: 0; }
  /* The edit bar stays one row that scrolls sideways, with a fade at the right
     edge as the cue that there is more (it holds editing tools, D4). */
  body > .pl-toolbar.editbar { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, var(--bg) calc(100% - 28px), transparent); mask-image: linear-gradient(to right, var(--bg) calc(100% - 28px), transparent); }
  body > .pl-toolbar.editbar > * { flex: none; }
}

@media (max-width: 760px) {
  :root { --dock-h: 45vh; }
  /* Two rows (Avi 2026-11-27: the bell and the people fold into More ▾ on
     phones, ui/topbarfold.js PHONE_FOLD): row 1 menu, back, name, Chat, Live,
     More ▾, Share; row 2 the transport. The name gives way first; More ▾ is
     an icon (its aria-label says More). The smallest phones (≤ 360 px) may
     still take a second control row. */
  header.transport > :is(#t-menu, #t-exit, .brand, #status) { order: 1; }
  header.transport > :not(#t-menu, #t-exit, .brand, #status, #t-more, #invite, .t-transport) { order: 2; }
  header.transport > #t-more { order: 3; font-size: 0; padding-inline: 0; }
  header.transport > #t-more::before { content: '⋯'; font-size: 20px; line-height: 1; }
  header.transport > #invite { order: 4; padding-inline: 10px; }
  header.transport > .brand, header.transport.tb-icons > .brand { flex: 1 1 2rem; min-width: 2rem; max-width: none; }
  header.transport > .spacer { display: none; }
  header.transport { column-gap: 4px; }
  header.transport > .t-transport { justify-content: space-between; }
  header.transport > .t-transport > .tsep { display: none; }
  /* Seven controls in one 340 px row: tighter gaps, a smaller LCD and BPM. */
  header.transport > .t-transport { gap: 2px; padding-inline: 2px; }
  header.transport > .t-transport #t-pos { font-size: 0.82rem; padding-inline: 4px; min-width: 0; }
  header.transport > .t-transport .tfield input { box-sizing: content-box; width: 4ch; padding-inline: 4px; } /* three digits (and the spin arrows where a browser draws them) */
  header.transport > .t-transport #t-loop { padding-inline: 6px; }
  /* B4: the Inserts panel took half the phone mixer, so one strip showed
     under the pinned Master. The strips get the width; each track's inserts
     are still in the Devices tab. Also 200% zoom (B5). */
  #pane-mixer { grid-template-columns: minmax(0, 1fr); }
  #pane-mixer > .fx-panel { display: none; }
  /* B6: dock tab labels never wrap; the pop-out arrows (floating windows) go,
     so all four tabs fit, and the clip line gives way first. */
  .dock-tabs .tab-pop { display: none; }
  .dock-tabs button, .dock-title { white-space: nowrap; }
  .dock-title { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
@media (max-width: 480px) { .dock-title { display: none; } }
@media (max-width: 360px) { header.transport > .t-transport { flex-wrap: wrap; row-gap: 4px; } } /* the smallest phones: Loop and the metronome take a second line */

/* U3: finger-sized targets where the pointer is a finger. Bar controls grow
   to 44 px (Apple HIG, WCAG 2.5.5); the small track-header buttons keep
   their look and get a 44 px invisible hit area around them instead. */
@media (pointer: coarse) {
  :root { --header-h: 64px; }
  header.transport :is(button, .tfield, .lcd), .dock-tabs > button:not(.tab-pop), .phone-banner .phone-ok { min-height: 44px; }
  header.transport button:not(.live-sw), .dock-tabs > button:not(.tab-pop) { min-width: 44px; }
  body > .editbar :is(button, .pb-sel) { min-height: 40px; min-width: 40px; }
  .dock-tabs .tab-pop { min-width: 32px; min-height: 32px; }
  #mixer .strip .sbtns button { min-width: 32px; min-height: 32px; } /* M / S (mob B4) */
  /* The C-445 hit pads (24 px, above) grow: 44 px tall (rows have room), 32 px
     wide so neighbours in a header row don't steal each other's taps. */
  .hit-pad::after, .ph-fold::after, .ph-m::after, .ph button.ph-arm::after, .ph-mon::after, .ph-more::after, .ph-revert::after, .ph-person::after, .ph-auto-led::after, .ph-mini::after,
  .strip .fx-pw::after, .fx-panel .fxp-power::after, .fx-panel .fx-dot::after, .strip .fx-pdot::after, .strip .strip-up::after, .rk-led::after, .dev-del::after, .kit-fold::after { width: max(100%, 32px); height: max(100%, 44px); }
  .pl-heads input.ph-name { min-height: 32px; } /* an input: no ::after pad, so it grows a little instead */
  .pl-heads .ph-lane { position: relative; }
  .pl-heads .ph-lane::after { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 32px); height: max(100%, 44px); transform: translate(-50%, -50%); }
  /* U4: 16 px text in fields so iOS doesn't zoom the page on focus. */
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: max(16px, 1em); }
}
/* U5: key hints mean nothing without a keyboard. */
@media (hover: none) and (pointer: coarse) { kbd, .kbd, .key-hint { display: none !important; } }

/* U12 (C-500 follow-up): the playlist and roll canvases fill a clipping box,
   so a ring drawn outside them showed as a thin edge line. Draw it inside. */
:is(#pl-canvas, #roll-canvas, .rk-graph-canvas):focus-visible { outline: 2px solid var(--select); outline-offset: -2px; }

/* Phones (two bar rows, mob U2): the connection pill shows only when there is
   news (Offline, Back online). Online is already said by the status dot, and
   the pill would push Share onto a third row. Same selector as the
   .tb-tight rule, which a wrapped bar never gets (ui/topbarfit.js). */
@media (max-width: 760px) { header.transport button#t-net.net-pill[data-state="on"]:not(.on):not(.active):not(#invite):not(.avatar) { display: none; } }

/* Keys focus (UI adoption step 6, ui/keysfocus.js; mockup 04-plans/2026-11-27_ui-mockup):
   a thin light line along the top of the panel your shortcuts go to, and
   "Shortcuts act on: ..." in the dock's tab bar. Light, not amber: it isn't sound. */
.playlist.keys-on::before, .zone.keys-on::before, .floating-panel.keys-on::before, .dock.keys-on > .dock-tabs::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--fill); opacity: .7; z-index: 4; pointer-events: none;
}
.dock-tabs .keys-tag { align-self: center; display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.dock-tabs .keys-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fill); flex: none; }
@media (max-width: 900px) { .dock-tabs .keys-tag { display: none; } }
/* One line, not two: the roll's own cue under its toolbar (audit U14) gives way to the top line. */
.keys-on #pane-roll.roll-keys-on > .roll-toolbar { box-shadow: none; }

/* ---------- room voice (ui/voicebar.js; mockup 04-plans/mockups/2026-11-27_room-voice.html, option A) ----------
   A voice button beside the people, a mic button while you are in voice, a
   dot on everyone in voice and a ring while they talk. The ring and the dot
   are --tune-ok green, not amber: amber on a person would read as "their part
   is playing" (Avi's pick, 2026-11-27). */
header.transport > :is(#t-voice, #t-voice-mic) { order: 20; } /* with the people, Chat and Share */
/* Phones and tablets (the wrapped bar, same query as "Phones and touch"): the mic sits with Chat, before More and Share. */
@media (max-width: 760px), (pointer: coarse) and (max-width: 1100px) { header.transport > :is(#t-voice, #t-voice-mic) { order: 2; } }
.voice-btn, .voice-mic { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 26px; min-width: 26px; padding: 0 6px; line-height: 1; }
.voice-btn[hidden], .voice-mic[hidden] { display: none; }
.voice-ico { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.voice-n { font: 11px var(--mono); }
.voice-n[hidden] { display: none; }
/* Nobody in voice: the icon sits back. */
header.transport button#t-voice.quiet:not(.on) { color: var(--chrome-muted); }
/* You are in voice: lit white, like Loop and Follow (amber means sound from the song). */
.transport button#t-voice.on { background: var(--chrome-on); color: var(--chrome-on-ink, var(--chrome)); border-color: var(--chrome-on); }
.voice-btn[aria-busy='true'] .voice-ico { opacity: 0.55; }
/* The mic is a boxed button: muted = grey with a slash, live = a green line inside the box. */
header.transport button#t-voice-mic:not(.on):not(.active):not(#invite):not(.avatar) { border-color: var(--chrome-line); background: var(--chrome-2); color: var(--chrome-muted); }
header.transport button#t-voice-mic.live:not(.on):not(.active):not(#invite):not(.avatar) { color: var(--on-chrome); box-shadow: inset 0 0 0 1px var(--tune-ok); }
#t-voice-mic.live .voice-slash { display: none; }
#t-voice-mic.held { opacity: 0.55; }
/* On the chips (ui/presence.js builds them). */
.avatar .vc-mk { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--chrome); display: grid; place-items: center; pointer-events: none; }
.avatar .vc-mk i { width: 5px; height: 5px; border-radius: 50%; background: var(--chrome-muted); }
.avatar .vc-mk.in i { background: var(--tune-ok); }
.avatar .vc-mk.rec i { background: var(--rec-dot); }
.avatar.talk { box-shadow: 0 0 0 2px var(--tune-ok); z-index: 1; }
.avatar.following.talk { box-shadow: 0 0 0 2px var(--tune-ok), 0 0 0 4px var(--user); }
.avatar.vc-held { opacity: 0.45; }
/* The voice popover (util.js showPopover). */
.ctx-menu.pop:has(> .vc-pop) { width: 250px; padding: 10px 12px; box-sizing: border-box; }
.vc-pop .vc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 7px 0; }
.vc-pop .vc-row:first-child { margin-top: 0; }
.vc-pop .vc-lab { color: var(--muted-2); }
.vc-pop .vc-vol { flex: 1; min-width: 0; height: 16px; accent-color: var(--fill); }
.vc-pop .vc-dev { max-width: 130px; padding: 0; border: 0; background: none; color: var(--text); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-pop .vc-dev:hover:not(:disabled):not(.on):not([aria-pressed='true']) { background: none; text-decoration: underline; }
.vc-pop .vc-sw, .vc-pop .vc-sw:hover:not(:disabled):not(.on):not([aria-pressed='true']) { width: 26px; height: 14px; min-height: 0; padding: 0; border: 0; border-radius: 7px; background: var(--line); position: relative; flex: none; }
.vc-pop .vc-sw::after { content: ''; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted-2); transition: left 0.12s var(--ease-out, ease-out); }
.vc-pop .vc-sw[aria-checked='true'], .vc-pop .vc-sw[aria-checked='true']:hover:not(:disabled):not(.on):not([aria-pressed='true']) { background: var(--fill); }
.vc-pop .vc-sw[aria-checked='true']::after { left: 14px; background: var(--on-fill); }
.vc-pop .vc-leave { display: flex; align-items: center; justify-content: center; width: 100%; height: 26px; margin-top: 10px; padding: 0 6px; border-color: var(--tip-line); font-weight: 400; }
@media (prefers-reduced-motion: reduce) { .vc-pop .vc-sw::after { transition: none; } }
