/*
 * Theme palettes and materials build on the base styles in styles.css.
 * The Settings cards use the same tokens as their mixer surfaces. Fader tracks can use --p
 * (0 at minimum, 1 at maximum) to fill up to the cap.
 */

/* The backdrop stays pinned to the window. Only the soft light above it moves. */
:is(.glass-aurora, .theme-light) {
  display: none; position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: clip;
}
:is(.glass-aurora, .theme-light)::before {
  content: ""; position: absolute; inset: -10%;
  background: var(--ambient-accent);
  mask-image: radial-gradient(ellipse closest-side, #000 28%, transparent 100%);
}
@media (prefers-reduced-motion: no-preference) {
  [data-theme-motion="subtle"] :is(.glass-aurora, .theme-light) {
    --ambient-time: 46s; --ambient-x: 2%; --ambient-y: 1%; --ambient-scale: 1.025;
  }
  [data-theme-motion="full"] :is(.glass-aurora, .theme-light) {
    --ambient-time: 26s; --ambient-x: 7%; --ambient-y: 4%; --ambient-scale: 1.08;
  }
  body:is([data-theme-motion="subtle"], [data-theme-motion="full"]):not(.is-mini, .is-panel, .is-mixwin) .glass-aurora::before, body:is([data-theme-motion="subtle"], [data-theme-motion="full"]):is([data-theme="neon"], [data-theme="arcade"]) .theme-light::before {
    animation: ambient-drift var(--ambient-time) ease-in-out infinite alternate;
  }
}
@keyframes ambient-drift {
  from { transform: translate3d(calc(-1 * var(--ambient-x)), var(--ambient-y), 0); opacity: .6; }
  to { transform: translate3d(var(--ambient-x), calc(-1 * var(--ambient-y)), 0) scale(var(--ambient-scale)); opacity: 1; }
}

/* ====================================================================== Glass */
[data-theme="glass"] {
  --bg: #0b0d1c; --bay: transparent; --bay-edge: transparent; --bay-shadow: none;
  --mod-a: rgba(216, 232, 255, .16); --mod-b: rgba(155, 187, 255, .055); --mod-edge: rgba(238, 249, 255, .42);
  --mod-shadow: 0 7px 18px #04081950;
  --key: rgba(255, 255, 255, .1); --key-hi: rgba(255, 255, 255, .18); --key-edge: rgba(255, 255, 255, .16); --key-ink: #d3d6f0;
  --key-shadow: none;
  --well: rgba(10, 12, 32, .5); --flyout: rgba(30, 33, 66, .86); --line: rgba(255, 255, 255, .16);
  --ink: #f6f7ff; --ink-2: #cdd1ee; --muted: #c3c9ed;
  --amber: #ffc66d; --cyan: #69e6d6; --red: #ff6b8a; --solo: #c9a2ff; --on-ink: #151733;
  --focus: #ffffff; --panel-hi: rgba(255, 255, 255, .2); --track: rgba(10, 12, 32, .6);
  --led-g: #6df0b0; --led-y: #ffe07a; --led-r: #ff6b8a;
  --led-g-off: rgba(255, 255, 255, .08); --led-y-off: rgba(255, 255, 255, .08); --led-r-off: rgba(255, 255, 255, .08);
  --scroll: rgba(255, 255, 255, .2); --scroll-hi: rgba(255, 255, 255, .32);
  --field: rgba(10, 12, 32, .45); --rail: rgba(10, 12, 32, .5); --switch: rgba(255, 255, 255, .16);
  --cap-w: 36px; --cap-h: 36px;
  --pop-shadow: 0 18px 44px rgba(4, 6, 24, .5);
  --cap-metal: radial-gradient(ellipse at 31% 22%, #fff 0 9%, #eef9ff 32%, #b0c8e8 74%, #f1f9ff);
  --cap-ridge: transparent;
  --cap-shadow: 0 6px 16px rgba(6, 8, 36, .5), 0 0 0 1px rgba(255, 255, 255, .7);
  --cap-ink: #1b1e45;
  --c-slate: #b7bbd8; --c-amber: #ffc66d; --c-coral: #ff9a76; --c-rose: #ff7eb3;
  --c-violet: #b79bff; --c-blue: #7aa8ff; --c-cyan: #5fe0ee; --c-green: #62e69a;
  --r: 22px;
  --warning-ink: #ffafbe;
}
body[data-theme="glass"] {
  isolation: isolate;
  background: #0b1021;
}
body[data-theme="glass"] .glass-aurora {
  display: block;
  background: radial-gradient(ellipse at 8% 3%, #5638a6, transparent 60%),
    radial-gradient(ellipse at 100% 21%, #086776, transparent 58%),
    radial-gradient(ellipse at 60% 112%, #7e245f, transparent 59%);
  --ambient-accent: radial-gradient(ellipse 60% 26% at 35% 34%, #a17aff71, transparent),
    radial-gradient(ellipse 53% 28% at 75% 64%, #4bf0d65c, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  body[data-theme="glass"][data-theme-motion="full"]:not(.is-mini, .is-panel, .is-mixwin) .glass-aurora::after {
    content: ""; position: absolute; inset: -25%;
    background: radial-gradient(ellipse 16% 46% at 50% 50%, #e2cfff31, #93efff12 50%, transparent 100%);
    animation: glass-reflection 32s ease-in-out infinite alternate;
  }
  @keyframes glass-reflection {
    from { transform: translate3d(-25%, 0, 0) rotate(24deg); opacity: .35; }
    to { transform: translate3d(25%, 0, 0) rotate(32deg); opacity: .8; }
  }
}
[data-theme="glass"] .strip, [data-theme="glass"] .mini-row {
  border-radius: 22px;
  background: radial-gradient(135% 48% at 12% -14%, #effaff36, transparent 75%),
    linear-gradient(145deg, var(--mod-a), var(--mod-b) 54%, #afd5ff12);
  box-shadow: inset 0 1px 0 var(--mod-edge), inset 0 0 0 1px #e8f6ff26,
    inset 0 -1px 0 #a2c6ff26, var(--mod-shadow);
}
[data-theme="glass"] .mini-row { border-radius: 18px; }
[data-theme="glass"] .mini-list { background: transparent; box-shadow: none; padding: 0; gap: 6px; }
[data-theme="glass"] .group-head h2 { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; }
[data-theme="glass"] .chip { border-radius: 50%; background: color-mix(in srgb, var(--acc) 30%, rgba(255, 255, 255, .08)); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22), 0 0 16px color-mix(in srgb, var(--acc) 50%, transparent); }
[data-theme="glass"] .chip.small { border-radius: 50%; }
[data-theme="glass"] .chip.big { border-radius: 50%; }
/* buttons are pills; the lit ones glow in their colour */
[data-theme="glass"] .btn, [data-theme="glass"] .route, [data-theme="glass"] .tog,
[data-theme="glass"] .keys, [data-theme="glass"] select, [data-theme="glass"] .scene-list .load { border-radius: 999px; box-shadow: inset 0 0 0 1px var(--key-edge); }
[data-theme="glass"] .route[aria-pressed="true"], [data-theme="glass"] .modes .tog[aria-pressed="true"], [data-theme="glass"] .tog.mono[aria-pressed="true"] {
  background: linear-gradient(180deg, color-mix(in srgb, var(--c, var(--amber)) 92%, #fff), var(--c, var(--amber)));
  box-shadow: 0 4px 16px color-mix(in srgb, var(--c, var(--amber)) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, .6);
}
[data-theme="glass"] .tog.mute {
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff29, #ffffff08 50%, #b8d8ff1a);
}
[data-theme="glass"] .tog.mute[aria-pressed="false"]:is(:hover, :focus-visible) {
  box-shadow: 0 0 13px color-mix(in srgb, var(--acc) 56%, transparent), inset 0 0 0 1px var(--acc);
}
[data-theme="glass"] .tog.mute[aria-pressed="true"] {
  color: #420e2a;
  background: linear-gradient(180deg, #ffc2db, #ff77a9 52%, #ff5595);
  box-shadow: 0 0 18px #ff4d9b9c, inset 0 1px #fff9, inset 0 -1px #ffc0df80;
}
[data-theme="glass"] .btn.primary, [data-theme="glass"] .btn[aria-pressed="true"], [data-theme="glass"] .update-btn { background: linear-gradient(180deg, #ffe0a3, var(--amber)); box-shadow: 0 4px 16px rgba(255, 198, 109, .4), inset 0 1px 0 rgba(255, 255, 255, .7); }
[data-theme="glass"] .readout { font-size: 22px; font-weight: 500; border-radius: 999px; }
/* the fader: meters are a slim glowing strip; the track is a capsule filled up to the pearl */
[data-theme="glass"] .fader { grid-template-columns: 14px 24px 46px; gap: 4px; }
[data-theme="glass"] .well { background: transparent; box-shadow: none; padding: calc(var(--cap-h) / 2) 0; gap: 3px; }
[data-theme="glass"] .meter { -webkit-mask: none; mask: none; border-radius: 99px; }
[data-theme="glass"] .meter .unlit { background: rgba(255, 255, 255, .1); }
[data-theme="glass"] .meter .lit b { background: linear-gradient(to top, var(--led-g) 0, var(--led-g) var(--p-yellow), var(--led-y) var(--p-yellow), var(--led-y) var(--p-zero), var(--led-r) var(--p-zero)); }
[data-theme="glass"] .slot { overflow: clip; overflow-clip-margin: 12px; }
[data-theme="glass"] .groove {
  top: 0; bottom: 0; left: 50%; width: 30px; margin-left: -15px; border-radius: 15px;
  background: #0913298c;
  box-shadow: inset 0 1px 5px #050b1c8c, 0 0 0 1px #ebf7ff29;
}
[data-theme="glass"] :is(.groove, .fader.h .track)::before {
  content: ""; position: absolute; inset: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 58%, #243453), var(--acc) 52%, color-mix(in srgb, var(--acc) 78%, #fff));
  transform-origin: center bottom;
  transform: scaleY(var(--p, 0));
}
[data-theme="glass"] .fader.h .track::before {
  background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 70%, #fff), var(--acc) 58%, color-mix(in srgb, var(--acc) 60%, #243453));
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
}
[data-theme="glass"] .unity { left: 50%; right: auto; width: 30px; margin-left: -15px; background: #fff; opacity: .35; height: 2px; border-radius: 1px; }
[data-theme="glass"] .thumb { border-radius: 50%; left: 50%; }
[data-theme="glass"] .thumb::after { left: 50%; right: auto; width: 8px; height: 8px; top: calc(50% - 4px); margin-left: -4px; border-radius: 50%; box-shadow: 0 0 10px var(--acc); }
[data-theme="glass"] .fader.dragging .thumb { box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 60%, transparent), 0 10px 20px rgba(6, 8, 36, .5); }
[data-theme="glass"] .scale span { font-size: 10px; color: var(--ink-2); opacity: .75; }
/* mini and tray rows: a capsule track */
[data-theme="glass"] .fader.h { height: 28px; --cap-w: 28px; }
[data-theme="glass"] .fader.h .track {
  border-radius: 14px;
  background: #0913298c;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .12);
}
[data-theme="glass"] .fader.h .meter { height: 2px; opacity: .8; border-radius: 2px; -webkit-mask: none; mask: none; left: 12px; right: 12px; }
[data-theme="glass"] .fader.h .meter.l { top: 5px; } [data-theme="glass"] .fader.h .meter.r { bottom: 5px; }
[data-theme="glass"] .fader.h .meter .unlit { background: transparent; }
[data-theme="glass"] .fader.h .meter .lit b { background: rgba(255, 255, 255, .85); }
[data-theme="glass"] .fader.h .thumb { top: 0; bottom: 0; border-radius: 50%; width: var(--cap-w); left: calc(var(--cap-w) / -2); }
[data-theme="glass"] .fader.h .db { background: none; font-size: 0; }
[data-theme="glass"] .fader.h .unity { display: none; }
[data-theme="glass"] :is(.dlg, .menu, .offline-card, .app-chips) {
  background: linear-gradient(145deg, #35486be8, #171e38f5);
  backdrop-filter: blur(12px) saturate(1.15);
}
[data-theme="glass"] .dlg { border-radius: 24px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .2), inset 0 1px 0 rgba(255, 255, 255, .25), 0 30px 70px rgba(4, 6, 24, .6); }
[data-theme="glass"] .dlg::backdrop { background: #080e2485; }
[data-theme="glass"] .menu { border-radius: 16px; }
.theme-card[data-theme="glass"] { border-radius: 16px; background: #0b0d1c; }
.theme-card[data-theme="glass"] .tc-desk { background: radial-gradient(70% 70% at 20% 10%, rgba(116, 82, 255, .6), transparent), radial-gradient(70% 70% at 90% 90%, rgba(255, 78, 160, .5), transparent), #0b0d1c; border-radius: 12px; }
.theme-card[data-theme="glass"] .tc-mod { border-radius: 10px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.theme-card[data-theme="glass"] .tc-keys i, .theme-card[data-theme="glass"] .tc-mute { border-radius: 99px; }
.theme-card[data-theme="glass"] .tc-cap { border-radius: 50%; height: 12px; width: 12px; margin-left: -6px; background: #fff; }
.theme-card[data-theme="glass"] .tc-slot::before { width: 8px; margin-left: -4px; border-radius: 4px; background: rgba(255, 255, 255, .25); }
.theme-card[data-theme="glass"] .tc-well { border-radius: 4px; }

/* ========================================================================= Neon */
[data-theme="neon"] {
  --bg: #07050f; --bay: transparent; --bay-edge: transparent; --bay-shadow: none;
  --mod-a: #0d0a1c; --mod-b: #0a0716; --mod-edge: transparent; --mod-shadow: none;
  --key: #130f26; --key-hi: #1c1638; --key-edge: transparent; --key-ink: #b9a9e8; --key-shadow: none;
  --well: #05030b; --flyout: #0f0b20; --line: #2a1f55;
  --ink: #f4eeff; --ink-2: #cabcf0; --muted: #8573b8;
  --amber: #ff2e97; --cyan: #19e3ff; --red: #ff3860; --solo: #b26bff; --on-ink: #0a0716;
  --focus: #19e3ff; --panel-hi: #1c1638; --track: #05030b;
  --led-g: #19e3ff; --led-y: #ffe14d; --led-r: #ff2e97;
  --led-g-off: #0d1830; --led-y-off: #261f12; --led-r-off: #2a0e24;
  --glow: 1.5; --scroll: #2a1f55; --scroll-hi: #3d2e7a;
  --field: #05030b; --rail: #05030b; --switch: #05030b;
  --cap-w: 44px; --cap-h: 16px;
  --pop-shadow: 0 0 40px rgba(255, 46, 151, .18);
  --cap-metal: #ffffff; --cap-ridge: transparent;
  --cap-shadow: 0 0 14px var(--acc), 0 0 2px #fff; --cap-ink: #0a0716;
  --c-slate: #a89fd0; --c-amber: #ffb02e; --c-coral: #ff6a4d; --c-rose: #ff2e97;
  --c-violet: #b26bff; --c-blue: #4d7cff; --c-cyan: #19e3ff; --c-green: #39ff88;
  --font: "Saira SC", "Segoe UI", system-ui, sans-serif;
}
body[data-theme="neon"] {
  background:
    linear-gradient(to bottom, transparent 60%, rgba(255, 46, 151, .13) 100%),
    repeating-linear-gradient(90deg, rgba(120, 80, 255, .07) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(120, 80, 255, .07) 0 1px, transparent 1px 48px),
    #07050f;
}
[data-theme="neon"] .strip, [data-theme="neon"] .mini-row {
  border-radius: 3px; background: linear-gradient(180deg, #0e0a1f, #090614);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc) 62%, transparent), 0 0 22px color-mix(in srgb, var(--acc) 20%, transparent), inset 0 0 28px color-mix(in srgb, var(--acc) 9%, transparent);
}
[data-theme="neon"] .strip.bus { --acc: var(--busc, var(--amber)); }
[data-theme="neon"] .group-head h2 { text-transform: uppercase; letter-spacing: .3em; color: var(--cyan); text-shadow: 0 0 10px var(--cyan); font-size: 11px; }
[data-theme="neon"] .mini-list { background: none; box-shadow: none; padding: 0; gap: 8px; }
[data-theme="neon"] .brand-name { text-transform: uppercase; letter-spacing: .24em; font-size: 16px; text-shadow: 0 0 12px var(--amber); }
[data-theme="neon"] .name, [data-theme="neon"] .mini-name { text-transform: uppercase; letter-spacing: .1em; font-size: 13px; text-shadow: 0 0 8px color-mix(in srgb, var(--acc) 60%, transparent); }
[data-theme="neon"] .chip { border-radius: 2px; background: transparent; color: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 0 12px color-mix(in srgb, var(--acc) 50%, transparent), inset 0 0 10px color-mix(in srgb, var(--acc) 25%, transparent); }
[data-theme="neon"] button.chip:hover { background: color-mix(in srgb, var(--acc) 22%, transparent); }
[data-theme="neon"] .btn, [data-theme="neon"] .route, [data-theme="neon"] .tog, [data-theme="neon"] .keys, [data-theme="neon"] select, [data-theme="neon"] .scene-list .load {
  border-radius: 2px; background: transparent; box-shadow: inset 0 0 0 1px #3a2c78; text-transform: uppercase; letter-spacing: .12em;
}
[data-theme="neon"] .btn:hover, [data-theme="neon"] .route:hover, [data-theme="neon"] .tog:hover { background: #1c1638; box-shadow: inset 0 0 0 1px var(--cyan); color: var(--cyan); }
[data-theme="neon"] .route[aria-pressed="true"], [data-theme="neon"] .modes .tog[aria-pressed="true"], [data-theme="neon"] .tog.mono[aria-pressed="true"] {
  background: var(--c, var(--amber)); color: #0a0716; box-shadow: 0 0 16px var(--c, var(--amber)), 0 0 2px #fff inset;
}
[data-theme="neon"] .tog.mute[aria-pressed="true"] { background: var(--red); color: #220815; box-shadow: 0 0 18px var(--red); }
[data-theme="neon"] .tog.solo[aria-pressed="true"] { background: var(--solo); color: var(--on-ink); box-shadow: 0 0 18px var(--solo); }
[data-theme="neon"] .btn.primary, [data-theme="neon"] .btn[aria-pressed="true"], [data-theme="neon"] .update-btn { background: var(--amber); color: var(--on-ink); box-shadow: 0 0 18px var(--amber); }
[data-theme="neon"] .readout { font-weight: 700; font-size: 22px; color: var(--acc); text-shadow: 0 0 12px var(--acc); letter-spacing: .04em; border-radius: 2px; }
[data-theme="neon"] .muted .readout { color: var(--muted); text-shadow: none; }
/* chunky blocks for meters, a laser line for the track, a flat light bar for the cap */
[data-theme="neon"] .fader { grid-template-columns: 34px 20px 44px; }
[data-theme="neon"] .well { background: #05030b; border-radius: 2px; box-shadow: 0 0 0 1px #2a1f55; gap: 4px; padding: calc(var(--cap-h) / 2) 4px; }
[data-theme="neon"] .meter { border-radius: 0; -webkit-mask: repeating-linear-gradient(to top, #000 0 5px, transparent 5px 7px); mask: repeating-linear-gradient(to top, #000 0 5px, transparent 5px 7px); }
[data-theme="neon"] .groove {
  width: 3px; margin-left: -1.5px; border-radius: 0; top: 0; bottom: 0;
  background: linear-gradient(to top, var(--acc) calc(var(--cap-h) / 2 + (100% - var(--cap-h)) * var(--p, .8)), #2a1f55 0);
  box-shadow: 0 0 10px color-mix(in srgb, var(--acc) 70%, transparent);
}
[data-theme="neon"] .slot { overflow: clip; overflow-clip-margin: 14px; }
[data-theme="neon"] .unity { background: var(--cyan); opacity: .8; height: 1px; box-shadow: 0 0 6px var(--cyan); }
[data-theme="neon"] .thumb { border-radius: 2px; background: var(--acc); box-shadow: 0 0 18px var(--acc), 0 0 4px #fff inset; }
[data-theme="neon"] .thumb::after { left: 4px; right: 4px; top: calc(50% - 1px); height: 2px; background: #fff; box-shadow: none; }
[data-theme="neon"] .fader.dragging .thumb { box-shadow: 0 0 28px var(--acc), 0 0 6px #fff inset; }
[data-theme="neon"] .scale span { color: var(--muted); font-size: 10px; }
[data-theme="neon"] .scale span.zero { color: var(--cyan); text-shadow: 0 0 6px var(--cyan); }
[data-theme="neon"] .fader.h { height: 28px; --cap-w: 34px; }
[data-theme="neon"] .fader.h .track {
  border-radius: 2px; background: linear-gradient(to right, color-mix(in srgb, var(--acc) 38%, transparent) calc(var(--cap-w) / 2 + (100% - var(--cap-w)) * var(--p, .8)), transparent 0), #05030b;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 55%, transparent);
}
[data-theme="neon"] .fader.h .meter { -webkit-mask: repeating-linear-gradient(to right, #000 0 5px, transparent 5px 7px); mask: repeating-linear-gradient(to right, #000 0 5px, transparent 5px 7px); height: 5px; }
[data-theme="neon"] .fader.h .meter.l { top: 5px; } [data-theme="neon"] .fader.h .meter.r { bottom: 5px; }
[data-theme="neon"] .fader.h .thumb { background: var(--acc); border-radius: 2px; color: #0a0716; top: 0; bottom: 0; }
[data-theme="neon"] .fader.h .db { background: none; font-weight: 700; }
[data-theme="neon"] .dlg { border-radius: 4px; box-shadow: 0 0 0 1px var(--amber), 0 0 40px rgba(255, 46, 151, .28); }
[data-theme="neon"] .dlg::backdrop { background: rgba(4, 2, 12, .7); }
[data-theme="neon"] .dlg-head h2 { text-transform: uppercase; letter-spacing: .18em; }
[data-theme="neon"] .menu { border-radius: 3px; }
.theme-card[data-theme="neon"] { border-radius: 3px; }
.theme-card[data-theme="neon"] .tc-desk { border-radius: 2px; background: repeating-linear-gradient(90deg, rgba(120, 80, 255, .12) 0 1px, transparent 1px 12px), #07050f; }
.theme-card[data-theme="neon"] .tc-mod { border-radius: 2px; background: #0d0a1c; box-shadow: 0 0 0 1px var(--amber), 0 0 8px rgba(255, 46, 151, .4); }
.theme-card[data-theme="neon"] .tc-keys i, .theme-card[data-theme="neon"] .tc-mute, .theme-card[data-theme="neon"] .tc-well, .theme-card[data-theme="neon"] .tc-cap { border-radius: 0; }
.theme-card[data-theme="neon"] .tc-cap { background: var(--amber); box-shadow: 0 0 8px var(--amber); height: 5px; }
.theme-card[data-theme="neon"] .tc-slot::before { width: 2px; margin-left: -1px; background: var(--amber); }

/* ====================================================================== Terminal */
[data-theme="terminal"] {
  --bg: #020b05; --bay: #020b05; --bay-edge: transparent; --bay-shadow: none;
  --mod-a: #04120a; --mod-b: #04120a; --mod-edge: transparent; --mod-shadow: none;
  --key: #04120a; --key-hi: #0a2814; --key-edge: transparent; --key-ink: #76d991; --key-shadow: none;
  --well: #010603; --flyout: #031009; --line: #0f4a22;
  --ink: #8dffa8; --ink-2: #5fd67f; --muted: #60b876;
  --amber: #b6ff5c; --cyan: #44e8c4; --red: #ff5f56; --solo: #ffd24a; --on-ink: #021a0a;
  --focus: #b6ff5c; --panel-hi: #0a2814; --track: #010603;
  --led-g: #3dff7a; --led-y: #e8ff5c; --led-r: #ff5f56;
  --led-g-off: #05190c; --led-y-off: #12190a; --led-r-off: #1a0a09;
  --glow: .7; --scroll: #0f4a22; --scroll-hi: #1a7a38;
  --field: #010603; --rail: #010603; --switch: #010603;
  --cap-w: 34px; --cap-h: 14px;
  --pop-shadow: 0 0 0 1px #0f4a22;
  --cap-metal: #8dffa8; --cap-ridge: transparent; --cap-shadow: 0 0 10px rgba(61, 255, 122, .5); --cap-ink: #021a0a;
  --c-slate: #5fd67f; --c-amber: #e8ff5c; --c-coral: #ffb35c; --c-rose: #ff7a9c;
  --c-violet: #b99cff; --c-blue: #6ab4ff; --c-cyan: #44e8c4; --c-green: #3dff7a;
  --font: "Cascadia Mono", "Cascadia Code", Consolas, "Lucida Console", "DejaVu Sans Mono", monospace;
  --s-1: 11px; --s0: 13px; --s1: 15px; --s2: 18px;
}
body[data-theme="terminal"]::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 99;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px);
}
body[data-theme="terminal"] { letter-spacing: 0; }
[data-theme="terminal"] .strip, [data-theme="terminal"] .mini-row, [data-theme="terminal"] .group, [data-theme="terminal"] .mini-list,
[data-theme="terminal"] .btn, [data-theme="terminal"] .route, [data-theme="terminal"] .tog, [data-theme="terminal"] .keys, [data-theme="terminal"] select,
[data-theme="terminal"] .chip, [data-theme="terminal"] .readout, [data-theme="terminal"] .dlg, [data-theme="terminal"] .menu, [data-theme="terminal"] .well,
[data-theme="terminal"] .fader, [data-theme="terminal"] .fader.h .track, [data-theme="terminal"] .thumb, .theme-card[data-theme="terminal"], [data-theme="terminal"] .offline-card,
[data-theme="terminal"] .scene-list .load, [data-theme="terminal"] .icon-pick, [data-theme="terminal"] input, [data-theme="terminal"] .toast { border-radius: 0; }
[data-theme="terminal"] .strip, [data-theme="terminal"] .mini-row { box-shadow: 0 0 0 1px #0f4a22; background: #04120a; }
[data-theme="terminal"] .group { box-shadow: 0 0 0 1px #0a3318; padding: 8px; }
[data-theme="terminal"] .mini-list { box-shadow: none; padding: 0; gap: 5px; background: none; }
[data-theme="terminal"] .group-head h2::before { content: "┌─ "; } [data-theme="terminal"] .group-head h2::after { content: " ─"; }
[data-theme="terminal"] .group h2, [data-theme="terminal"] .name, [data-theme="terminal"] .mini-name, [data-theme="terminal"] .brand-name { text-transform: uppercase; letter-spacing: .06em; }
[data-theme="terminal"] .brand-name::before { content: "> "; color: var(--amber); }
[data-theme="terminal"] .brand-name::after { content: "_"; color: var(--amber); }
@media (prefers-reduced-motion: no-preference) {
  body[data-theme="terminal"]:not([data-theme-motion="off"]) .brand-name::after { animation: blink 1.1s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }
[data-theme="terminal"] .name { font-size: 13px; }
[data-theme="terminal"] .chip { background: none; box-shadow: 0 0 0 1px var(--acc); color: var(--acc); }
[data-theme="terminal"] button.chip:hover { background: color-mix(in srgb, var(--acc) 22%, transparent); }
[data-theme="terminal"] .btn, [data-theme="terminal"] .route, [data-theme="terminal"] .tog, [data-theme="terminal"] .keys, [data-theme="terminal"] select, [data-theme="terminal"] .scene-list .load {
  background: none; box-shadow: inset 0 0 0 1px #0f4a22; letter-spacing: 0; font-weight: 400; text-transform: uppercase;
}
[data-theme="terminal"] .route::before, [data-theme="terminal"] .tog::before { content: "["; margin-right: 2px; opacity: .6; }
[data-theme="terminal"] .route::after, [data-theme="terminal"] .tog::after { content: "]"; margin-left: 2px; opacity: .6; }
[data-theme="terminal"] .btn:hover, [data-theme="terminal"] .route:hover, [data-theme="terminal"] .tog:hover { background: #0a2814; box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
[data-theme="terminal"] .route[aria-pressed="true"], [data-theme="terminal"] .modes .tog[aria-pressed="true"], [data-theme="terminal"] .tog.mono[aria-pressed="true"] {
  background: var(--c, var(--amber)); color: #021a0a; font-weight: 700; box-shadow: 0 0 10px color-mix(in srgb, var(--c, var(--amber)) 50%, transparent);
}
[data-theme="terminal"] .route[aria-pressed="true"]:hover { background: var(--c, var(--amber)); color: #021a0a; }
[data-theme="terminal"] .tog.mute[aria-pressed="true"] { background: var(--red); color: #1a0504; box-shadow: 0 0 10px rgba(255, 95, 86, .5); }
[data-theme="terminal"] .tog.solo[aria-pressed="true"] { background: var(--solo); color: #1a1204; }
[data-theme="terminal"] .btn.primary, [data-theme="terminal"] .btn[aria-pressed="true"], [data-theme="terminal"] .update-btn { background: var(--ink); color: #021a0a; box-shadow: none; }
[data-theme="terminal"] .readout { font-size: 18px; font-weight: 700; letter-spacing: 0; }
[data-theme="terminal"] .readout::after { content: " dB"; font-size: 11px; font-weight: 400; color: var(--muted); }
[data-theme="terminal"] .readout:hover { background: #0a2814; }
[data-theme="terminal"] .fader { grid-template-columns: 30px 22px 40px; }
[data-theme="terminal"] .well { background: #010603; box-shadow: 0 0 0 1px #0f4a22; gap: 3px; padding: calc(var(--cap-h) / 2) 4px; }
[data-theme="terminal"] .meter { border-radius: 0; -webkit-mask: repeating-linear-gradient(to top, #000 0 4px, transparent 4px 6px); mask: repeating-linear-gradient(to top, #000 0 4px, transparent 4px 6px); }
[data-theme="terminal"] .groove {
  width: 0; margin-left: 0; border-radius: 0; background: none; box-shadow: none; top: 0; bottom: 0;
  border-left: 1px dashed #1a7a38;
}
[data-theme="terminal"] .thumb { background: var(--ink); box-shadow: 0 0 10px rgba(61, 255, 122, .45); }
[data-theme="terminal"] .thumb::after { background: #021a0a; box-shadow: none; left: 4px; right: 4px; height: 2px; }
[data-theme="terminal"] .fader.dragging .thumb { box-shadow: 0 0 0 2px var(--amber), 0 0 14px rgba(61, 255, 122, .6); }
[data-theme="terminal"] .unity { background: var(--amber); opacity: .6; }
[data-theme="terminal"] .scale span { font-size: 10px; }
[data-theme="terminal"] .fader.h { height: 26px; --cap-w: 40px; }
[data-theme="terminal"] .fader.h .track { box-shadow: inset 0 0 0 1px #0f4a22; background: #010603; }
[data-theme="terminal"] .fader.h .meter { -webkit-mask: repeating-linear-gradient(to right, #000 0 4px, transparent 4px 6px); mask: repeating-linear-gradient(to right, #000 0 4px, transparent 4px 6px); height: 5px; }
[data-theme="terminal"] .fader.h .meter.l { top: 5px; } [data-theme="terminal"] .fader.h .meter.r { bottom: 5px; }
[data-theme="terminal"] .fader.h .thumb { top: 0; bottom: 0; background: var(--ink); color: #021a0a; }
[data-theme="terminal"] .fader.h .db { background: none; font-weight: 700; font-size: 12px; }
[data-theme="terminal"] .dlg { box-shadow: 0 0 0 1px var(--ink), 0 0 30px rgba(61, 255, 122, .15); }
[data-theme="terminal"] .dlg::backdrop { background: rgba(0, 6, 2, .75); }
[data-theme="terminal"] .dlg-head h2 { text-transform: uppercase; }
.theme-card[data-theme="terminal"] .tc-desk { background: #020b05; border-radius: 0; box-shadow: 0 0 0 1px #0f4a22; }
.theme-card[data-theme="terminal"] .tc-mod, .theme-card[data-theme="terminal"] .tc-keys i, .theme-card[data-theme="terminal"] .tc-mute, .theme-card[data-theme="terminal"] .tc-well, .theme-card[data-theme="terminal"] .tc-cap { border-radius: 0; }
.theme-card[data-theme="terminal"] .tc-mod { background: #04120a; box-shadow: 0 0 0 1px #0f4a22; }
.theme-card[data-theme="terminal"] .tc-cap { background: var(--ink); box-shadow: none; height: 5px; }
.theme-card[data-theme="terminal"] .tc-slot::before { width: 0; margin-left: 0; background: none; border-left: 1px dashed #1a7a38; }

/* ================================================================== Bubblegum */
[data-theme="bubblegum"] {
  --bg: #ffe6f1; --bay: transparent; --bay-edge: transparent; --bay-shadow: none;
  --mod-a: #ffffff; --mod-b: #ffedf7; --mod-edge: rgba(255, 255, 255, .9);
  --mod-shadow: 0 8px 22px rgba(255, 79, 154, .2);
  --key: #ffd7ec; --key-hi: #ffcde4; --key-edge: transparent; --key-ink: #9c2860; --key-shadow: none;
  --well: #ffd3e6; --flyout: #fff7fb; --line: #ffc2de;
  --ink: #5a1d41; --ink-2: #8a3a66; --muted: #8f506f;
  --amber: #ff4f9a; --cyan: #9d6bff; --red: #ff3d7f; --solo: #9d6bff; --on-ink: #351025;
  --focus: #ff4f9a; --panel-hi: #ffc2de; --track: #ffd3e6;
  --led-g: #ff8fc2; --led-y: #ffc65c; --led-r: #ff3d7f;
  --led-g-off: #ffe3ef; --led-y-off: #ffe3ef; --led-r-off: #ffe3ef;
  --glow: .5; --scroll: #ffb8d7; --scroll-hi: #ff9cc8;
  --field: #ffffff; --rail: #ffd3e6; --switch: #ffc2de;
  --cap-w: 40px; --cap-h: 40px;
  --pop-shadow: 0 14px 34px rgba(255, 79, 154, .28);
  --cap-metal: linear-gradient(180deg, #ffffff, #ffe3f0); --cap-ridge: transparent;
  --cap-shadow: 0 5px 12px rgba(255, 79, 154, .45), 0 0 0 3px #ff4f9a; --cap-ink: #ff4f9a;
  --c-slate: #c28fb0; --c-amber: #ffa94d; --c-coral: #ff7f7f; --c-rose: #ff3f93;
  --c-violet: #a35cff; --c-blue: #6f9cff; --c-cyan: #2fd0d2; --c-green: #5fd994;
  --font: "Nunito", "Varela Round", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
  --warning-ink: #9c2850;
}
body[data-theme="bubblegum"] {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .8) 0 2px, transparent 3px) 0 0 / 38px 38px,
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, .6) 0 3px, transparent 4px) 0 0 / 54px 54px,
    linear-gradient(160deg, #ffd9ea, #ffeef6 45%, #f3e1ff);
  background-attachment: fixed;
}
[data-theme="bubblegum"] .strip, [data-theme="bubblegum"] .mini-row {
  border-radius: 26px; box-shadow: 0 0 0 2px #ffc2de, var(--mod-shadow), inset 0 2px 0 #fff;
}
[data-theme="bubblegum"] .mini-row { border-radius: 22px; }
[data-theme="bubblegum"] .mini-list { background: none; box-shadow: none; padding: 0; gap: 8px; }
[data-theme="bubblegum"] .group-head h2 { color: #9c2860; font-size: 13px; letter-spacing: .06em; text-transform: lowercase; }
[data-theme="bubblegum"] .group-head h2::before { content: "✿ "; } [data-theme="bubblegum"] .group-head h2::after { content: " ✿"; }
[data-theme="bubblegum"] .brand-name { color: #9c2860; font-weight: 800; letter-spacing: .01em; }
[data-theme="bubblegum"] .brand-name::after { content: " ♡"; }
[data-theme="bubblegum"] .name { font-weight: 800; }
[data-theme="bubblegum"] .btn, [data-theme="bubblegum"] .route, [data-theme="bubblegum"] .tog,
[data-theme="bubblegum"] .keys, [data-theme="bubblegum"] select, [data-theme="bubblegum"] .scene-list .load { border-radius: 999px; font-weight: 700; }
[data-theme="bubblegum"] .route[aria-pressed="true"], [data-theme="bubblegum"] .modes .tog[aria-pressed="true"], [data-theme="bubblegum"] .tog.mono[aria-pressed="true"] {
  background: linear-gradient(180deg, color-mix(in srgb, var(--c, var(--amber)) 75%, #fff), var(--c, var(--amber))); color: var(--on-ink);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--c, var(--amber)) 50%, transparent), inset 0 2px 0 rgba(255, 255, 255, .5);
}
[data-theme="bubblegum"] .route.b { --c: var(--cyan); }
[data-theme="bubblegum"] .tog.mute::before { content: "♡ "; }
[data-theme="bubblegum"] .tog.mute[aria-pressed="true"]::before { content: "♥ "; }
[data-theme="bubblegum"] .tog.mute[aria-pressed="true"] { background: linear-gradient(180deg, #ffa5c9, #ff5e9a); color: #49122e; box-shadow: 0 4px 12px rgba(255, 61, 127, .45), inset 0 2px 0 rgba(255, 255, 255, .5); }
[data-theme="bubblegum"] .tog.solo[aria-pressed="true"] { color: var(--on-ink); }
[data-theme="bubblegum"] .btn.primary, [data-theme="bubblegum"] .btn[aria-pressed="true"], [data-theme="bubblegum"] .update-btn { background: linear-gradient(180deg, #ff86bb, #ff4f9a); color: var(--on-ink); box-shadow: 0 4px 12px rgba(255, 79, 154, .4), inset 0 2px 0 rgba(255, 255, 255, .5); }
[data-theme="bubblegum"] .readout { font-weight: 800; font-size: 22px; color: #9c2860; border-radius: 999px; }
[data-theme="bubblegum"] .readout:hover { background: #ffe0ee; }
/* cute icons: each channel's icon becomes an emoji (set as data-icon in app.js) */
[data-theme="bubblegum"] .chip { border-radius: 50%; background: #ffe0ee; box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 55%, #fff), 0 3px 8px color-mix(in srgb, var(--acc) 30%, transparent); color: var(--acc); font-size: 18px; line-height: 1; }
[data-theme="bubblegum"] .chip.small { font-size: 14px; }
[data-theme="bubblegum"] button.chip:hover { background: #ffcde4; }
[data-theme="bubblegum"] .chip svg { display: none; }
[data-theme="bubblegum"] .chip::before { content: "🎀"; }
[data-theme="bubblegum"] .chip[data-icon="mic"]::before { content: "🎤"; }
[data-theme="bubblegum"] .chip[data-icon="wave"]::before { content: "✨"; }
[data-theme="bubblegum"] .chip[data-icon="headphones"]::before { content: "🎧"; }
[data-theme="bubblegum"] .chip[data-icon="speaker"]::before { content: "🔔"; }
[data-theme="bubblegum"] .chip[data-icon="desktop"]::before { content: "💻"; }
[data-theme="bubblegum"] .chip[data-icon="music"]::before { content: "🎵"; }
[data-theme="bubblegum"] .chip[data-icon="chat"]::before { content: "💬"; }
[data-theme="bubblegum"] .chip[data-icon="game"]::before { content: "🎮"; }
[data-theme="bubblegum"] .chip[data-icon="browser"]::before { content: "🌸"; }
[data-theme="bubblegum"] .chip[data-icon="stream"]::before { content: "📡"; }
[data-theme="bubblegum"] .chip[data-icon="phone"]::before { content: "📱"; }
[data-theme="bubblegum"] .chip[data-icon="record"]::before { content: "💖"; }
/* the fader: a fat candy capsule with a heart on the cap */
[data-theme="bubblegum"] .fader { grid-template-columns: 14px 24px 48px; gap: 4px; }
[data-theme="bubblegum"] .well { background: none; box-shadow: none; padding: calc(var(--cap-h) / 2) 0; gap: 3px; }
[data-theme="bubblegum"] .meter { -webkit-mask: none; mask: none; border-radius: 99px; }
[data-theme="bubblegum"] .meter .unlit { background: #ffd3e6; }
[data-theme="bubblegum"] .meter .lit b { background: linear-gradient(to top, #ff8fc2 0, #ff8fc2 var(--p-yellow), #ffc65c var(--p-yellow), #ffc65c var(--p-zero), #ff3d7f var(--p-zero)); }
[data-theme="bubblegum"] .slot { overflow: clip; overflow-clip-margin: 12px; }
[data-theme="bubblegum"] .groove {
  top: 0; bottom: 0; width: 34px; margin-left: -17px; border-radius: 17px;
  background: linear-gradient(to top, var(--acc) calc(var(--cap-h) / 2 + (100% - var(--cap-h)) * var(--p, .8)), transparent 0), #ffd3e6;
  box-shadow: inset 0 2px 3px rgba(255, 79, 154, .25), 0 0 0 2px #fff;
}
[data-theme="bubblegum"] .unity { display: none; }
[data-theme="bubblegum"] .thumb { border-radius: 50%; }
[data-theme="bubblegum"] .thumb::after { content: "♥"; background: none; box-shadow: none; left: 0; right: 0; top: 0; height: 100%; display: grid; place-items: center; font-size: 20px; color: var(--acc); line-height: 1; }
[data-theme="bubblegum"] .fader.dragging .thumb { box-shadow: 0 6px 16px rgba(255, 79, 154, .5), 0 0 0 4px #ff9cc8; }
[data-theme="bubblegum"] .scale span { font-size: 10px; color: var(--muted); }
[data-theme="bubblegum"] .scale span.zero { color: #9c2860; }
[data-theme="bubblegum"] .fader.h { height: 30px; --cap-w: 30px; }
[data-theme="bubblegum"] .fader.h .track {
  border-radius: 15px; box-shadow: inset 0 2px 3px rgba(255, 79, 154, .25), 0 0 0 2px #fff;
  background: linear-gradient(to right, var(--acc) calc(var(--cap-w) / 2 + (100% - var(--cap-w)) * var(--p, .8)), transparent 0), #ffd3e6;
}
[data-theme="bubblegum"] .fader.h .meter { height: 2px; border-radius: 2px; -webkit-mask: none; mask: none; left: 14px; right: 14px; opacity: .9; }
[data-theme="bubblegum"] .fader.h .meter.l { top: 5px; } [data-theme="bubblegum"] .fader.h .meter.r { bottom: 5px; }
[data-theme="bubblegum"] .fader.h .meter .unlit { background: transparent; }
[data-theme="bubblegum"] .fader.h .meter .lit b { background: #fff; }
[data-theme="bubblegum"] .fader.h .thumb { top: 0; bottom: 0; border-radius: 50%; width: var(--cap-w); left: calc(var(--cap-w) / -2); }
[data-theme="bubblegum"] .fader.h .thumb::after { display: grid; content: "♥"; font-size: 15px; }
[data-theme="bubblegum"] .fader.h .db { display: none; }
[data-theme="bubblegum"] .fader.h .unity { display: none; }
[data-theme="bubblegum"] .dlg { border-radius: 28px; box-shadow: 0 0 0 3px #ffc2de, 0 24px 60px rgba(255, 79, 154, .35); }
[data-theme="bubblegum"] .dlg::backdrop { background: rgba(255, 150, 200, .35); backdrop-filter: blur(4px); }
[data-theme="bubblegum"] .dlg-head h2::after { content: " ♡"; color: #ff4f9a; }
[data-theme="bubblegum"] .menu { border-radius: 18px; }
.theme-card[data-theme="bubblegum"] { border-radius: 18px; background: #ffe6f1; }
.theme-card[data-theme="bubblegum"] .tc-desk { background: linear-gradient(160deg, #ffd9ea, #f3e1ff); border-radius: 14px; box-shadow: none; }
.theme-card[data-theme="bubblegum"] .tc-mod { border-radius: 14px; background: #fff; box-shadow: 0 0 0 2px #ffc2de; }
.theme-card[data-theme="bubblegum"] .tc-keys i, .theme-card[data-theme="bubblegum"] .tc-mute { border-radius: 99px; }
.theme-card[data-theme="bubblegum"] .tc-cap { border-radius: 50%; width: 13px; height: 13px; margin-left: -6.5px; background: #fff; box-shadow: 0 0 0 2px #ff4f9a; }
.theme-card[data-theme="bubblegum"] .tc-slot::before { width: 9px; margin-left: -4.5px; border-radius: 5px; background: #ff9cc8; }
.theme-card[data-theme="bubblegum"] .tc-well { border-radius: 4px; background: #ffd3e6; }

/* ========================================================================= Block */
[data-theme="block"] {
  --bg: #ffe9a8; --bay: transparent; --bay-edge: transparent; --bay-shadow: none;
  --mod-a: #ffffff; --mod-b: #ffffff; --mod-edge: transparent; --mod-shadow: none;
  --key: #ffffff; --key-hi: #fff4c9; --key-edge: transparent; --key-ink: #111111; --key-shadow: none;
  --well: #111111; --flyout: #ffffff; --line: #111111;
  --ink: #111111; --ink-2: #2b2b2b; --muted: #5a5646;
  --amber: #ffb703; --cyan: #25c7e8; --red: #ff3d5a; --solo: #9b5cff; --on-ink: #111111;
  --focus: #111111; --panel-hi: #fff4c9; --track: #111111;
  --led-g: #25d366; --led-y: #ffd60a; --led-r: #ff3d5a;
  --led-g-off: #2b2b2b; --led-y-off: #2b2b2b; --led-r-off: #2b2b2b;
  --glow: 0; --scroll: #111111; --scroll-hi: #444444;
  --field: #ffffff; --rail: #111111; --switch: #111111;
  --cap-w: 36px; --cap-h: 22px;
  --pop-shadow: 6px 6px 0 #111111;
  --cap-metal: #ff6b9a; --cap-ridge: transparent; --cap-shadow: 0 0 0 3px #111111, 3px 3px 0 3px #111111; --cap-ink: #111111;
  --c-slate: #5a6b7a; --c-amber: #ffb703; --c-coral: #ff6a3d; --c-rose: #ff4f9a;
  --c-violet: #9b5cff; --c-blue: #3d7bff; --c-cyan: #25c7e8; --c-green: #1fbf63;
  --r: 0px;
  color-scheme: light;
  --warning-ink: #9c2040;
}
[data-theme="block"] .strip, [data-theme="block"] .mini-row, [data-theme="block"] .group, [data-theme="block"] .mini-list,
[data-theme="block"] .btn, [data-theme="block"] .route, [data-theme="block"] .tog, [data-theme="block"] .keys, [data-theme="block"] select,
[data-theme="block"] .chip, [data-theme="block"] .readout, [data-theme="block"] .dlg, [data-theme="block"] .menu, [data-theme="block"] .well,
[data-theme="block"] .fader.h .track, [data-theme="block"] .thumb, [data-theme="block"] .offline-card, [data-theme="block"] .scene-list .load,
[data-theme="block"] .icon-pick, [data-theme="block"] input, [data-theme="block"] .toast { border-radius: 0; }
/* thick outlines and hard offset shadows */
[data-theme="block"] .strip, [data-theme="block"] .mini-row { box-shadow: 0 0 0 3px #111, 5px 5px 0 3px #111; }
[data-theme="block"] .strips { gap: 14px; }
[data-theme="block"] .dense .strips, [data-theme="block"].dense .strips { gap: 12px; }
[data-theme="block"] .strip { background: #ffffff; }
[data-theme="block"] .group { padding: 8px 10px 10px; }
[data-theme="block"] .mini-list { background: none; box-shadow: none; padding: 0 6px 0 0; gap: 8px; }
[data-theme="block"] .group-head h2 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; background: #111; color: #ffe9a8; padding: 3px 8px; }
[data-theme="block"] .name, [data-theme="block"] .mini-name, [data-theme="block"] .brand-name { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
[data-theme="block"] .sub { color: var(--muted); font-weight: 600; }
[data-theme="block"] .chip { background: var(--acc); color: #111; box-shadow: 0 0 0 2px #111; }
[data-theme="block"] button.chip:hover { background: #111; color: var(--acc); }
[data-theme="block"] .btn, [data-theme="block"] .route, [data-theme="block"] .tog, [data-theme="block"] .keys, [data-theme="block"] select, [data-theme="block"] .scene-list .load {
  background: #fff; color: #111; box-shadow: 0 0 0 2px #111; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
[data-theme="block"] .btn:hover, [data-theme="block"] .route:hover, [data-theme="block"] .tog:hover { background: #fff4c9; box-shadow: 0 0 0 2px #111, 3px 3px 0 2px #111; transform: translate(-1px, -1px); }
[data-theme="block"] .btn:active, [data-theme="block"] .route:active, [data-theme="block"] .tog:active { transform: translate(1px, 1px); box-shadow: 0 0 0 2px #111; }
[data-theme="block"] .route[aria-pressed="true"], [data-theme="block"] .modes .tog[aria-pressed="true"], [data-theme="block"] .tog.mono[aria-pressed="true"] {
  background: var(--c, var(--amber)); color: #111; box-shadow: 0 0 0 2px #111;
}
[data-theme="block"] .route[aria-pressed="true"]:hover { background: var(--c, var(--amber)); color: #111; }
[data-theme="block"] .tog.mute[aria-pressed="true"] { background: var(--red); color: #111; }
[data-theme="block"] .tog.solo[aria-pressed="true"] { background: var(--solo); color: var(--on-ink); }
[data-theme="block"] .btn.primary, [data-theme="block"] .btn[aria-pressed="true"], [data-theme="block"] .update-btn { background: #111; color: #ffe9a8; box-shadow: 0 0 0 2px #111; }
[data-theme="block"] .btn.primary:hover, [data-theme="block"] .update-btn:hover { background: #ff6b9a; color: #111; }
[data-theme="block"] .readout { font-weight: 800; font-size: 20px; background: #111; color: #ffe9a8; padding: 2px 4px; }
[data-theme="block"] .readout:hover { background: var(--c-rose); color: #111; }
[data-theme="block"] .well { background: #111; box-shadow: none; padding: calc(var(--cap-h) / 2) 4px; }
[data-theme="block"] .meter { border-radius: 0; -webkit-mask: repeating-linear-gradient(to top, #000 0 5px, transparent 5px 7px); mask: repeating-linear-gradient(to top, #000 0 5px, transparent 5px 7px); }
[data-theme="block"] .groove { width: 8px; margin-left: -4px; border-radius: 0; background: #111; box-shadow: none; }
[data-theme="block"] .thumb { background: var(--acc, var(--c-rose)); box-shadow: 0 0 0 3px #111, 3px 3px 0 3px #111; }
[data-theme="block"] .thumb::after { background: #111; box-shadow: none; left: 6px; right: 6px; height: 3px; }
[data-theme="block"] .fader.dragging .thumb { box-shadow: 0 0 0 3px #111, 5px 5px 0 3px #111; }
[data-theme="block"] .scale span { color: #111; font-weight: 700; }
[data-theme="block"] .unity { background: #111; height: 2px; opacity: 1; }
[data-theme="block"] .fader.h .track { background: #111; box-shadow: none; }
[data-theme="block"] .fader.h .thumb { color: #111; background: var(--acc, var(--c-rose)); }
[data-theme="block"] .dlg { box-shadow: 0 0 0 3px #111, 8px 8px 0 3px #111; background: #fff; }
[data-theme="block"] .dlg::backdrop { background: rgba(17, 17, 17, .45); }
[data-theme="block"] .check { border-radius: 0; }
[data-theme="block"] .check input {
  background: #fff; box-shadow: inset 0 0 0 2px #111, 2px 2px 0 #111;
}
[data-theme="block"] .check input:checked { background: var(--amber); }
[data-theme="block"] .check input::after { background: #111; box-shadow: none; }
.theme-card[data-theme="block"] .tc-desk { background: #ffe9a8; border-radius: 0; box-shadow: 0 0 0 2px #111; }
.theme-card[data-theme="block"] .tc-mod, .theme-card[data-theme="block"] .tc-keys i, .theme-card[data-theme="block"] .tc-mute, .theme-card[data-theme="block"] .tc-well, .theme-card[data-theme="block"] .tc-cap { border-radius: 0; }
.theme-card[data-theme="block"] .tc-mod { background: #fff; box-shadow: 0 0 0 2px #111, 3px 3px 0 2px #111; margin: 0 3px 3px 0; }
.theme-card[data-theme="block"] .tc-keys i { box-shadow: inset 0 0 0 1px #111; background: #fff; }
.theme-card[data-theme="block"] .tc-keys i.on { box-shadow: inset 0 0 0 1px #111; }
.theme-card[data-theme="block"] .tc-well { background: #111; }
.theme-card[data-theme="block"] .tc-cap { background: var(--c-rose); box-shadow: 0 0 0 1.5px #111; }
.theme-card[data-theme="block"] .tc-slot::before { background: #111; }
[data-theme="block"] [data-reveal] { color: #111; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================ window buttons */
[data-theme="glass"] .wc:hover { background: rgba(255, 255, 255, .16); }
[data-theme="glass"] .winctl { margin-right: 6px; }
[data-theme="glass"] .wc { border-radius: 0 0 12px 12px; width: 40px; margin-left: 2px; }
[data-theme="bubblegum"] .winctl { margin: -4px 10px 0 6px; gap: 4px; }
[data-theme="bubblegum"] .wc { width: 32px; height: 28px; border-radius: 0 0 14px 14px; background: var(--key); color: var(--ink); }
[data-theme="bubblegum"] .wc:hover { background: var(--key-hi); }
[data-theme="bubblegum"] .wc.close:hover { background: #ff3d7f; }
[data-theme="neon"] .wc:hover { background: none; color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan), 0 0 12px color-mix(in srgb, var(--cyan) 50%, transparent); }
[data-theme="neon"] .wc.close:hover { background: none; color: var(--red); box-shadow: inset 0 0 0 1px var(--red), 0 0 12px color-mix(in srgb, var(--red) 55%, transparent); }
[data-theme="terminal"] .wc { color: var(--muted); }
[data-theme="terminal"] .wc:hover { background: var(--ink); color: #021a0a; }
[data-theme="terminal"] .wc.close:hover { background: var(--red); color: #1a0504; }
[data-theme="block"] .winctl { margin-top: -12px; box-shadow: -3px 0 0 #111, 0 3px 0 #111; background: #fff; }
[data-theme="block"] .is-mini .winctl { margin-top: -9px; }
[data-theme="block"] .wc { color: #111; box-shadow: inset 3px 0 0 #111; }
[data-theme="block"] .wc:first-child { box-shadow: none; }
[data-theme="block"] .wc:hover { background: #ffb703; color: #111; }
[data-theme="block"] .wc.close:hover { background: #ff3d5a; color: #111; }

/* ======================================================================= Arcade */
/* 8-bit cabinet: deep purple, pixel-stepped corners, chunky blocks, hot primary colours. */
[data-theme="arcade"] {
  --bg: #170a35; --bay: transparent; --bay-edge: transparent; --bay-shadow: none;
  --mod-a: #3d1b7f; --mod-b: #241149; --mod-edge: transparent; --mod-shadow: none;
  --key: #170a35; --key-hi: #3a1c80; --key-edge: transparent; --key-ink: #cbb8ff; --key-shadow: none;
  --well: #0a0420; --flyout: #2a1260; --line: #ffffff;
  --ink: #ffffff; --ink-2: #d9ccff; --muted: #9a85d8;
  --amber: #ffd400; --cyan: #00e5ff; --red: #ff3b3b; --solo: #ff4fd8; --on-ink: #170a35;
  --focus: #ffd400; --panel-hi: #3a1c80; --track: #0a0420;
  --led-g: #39ff14; --led-y: #ffd400; --led-r: #ff3b3b;
  --led-g-off: #14301a; --led-y-off: #2e2a0a; --led-r-off: #2e0f14;
  --glow: .4; --scroll: #5a3aa8; --scroll-hi: #7a58d0;
  --field: #0a0420; --rail: #0a0420; --switch: #0a0420;
  --cap-w: 34px; --cap-h: 22px;
  --pop-shadow: 0 0 0 4px #fff, 8px 8px 0 4px #000;
  --cap-metal: #ffffff; --cap-ridge: transparent; --cap-shadow: 0 0 0 3px #000, 4px 4px 0 3px #000; --cap-ink: #170a35;
  --c-slate: #b9a8ff; --c-amber: #ffd400; --c-coral: #ff7a2e; --c-rose: #ff4fd8;
  --c-violet: #a06bff; --c-blue: #3d8bff; --c-cyan: #00e5ff; --c-green: #39ff14;
  --font: "Cascadia Mono", "Cascadia Code", Consolas, "Lucida Console", "DejaVu Sans Mono", monospace;
  --s-1: 11px; --s0: 13px; --s1: 15px; --s2: 18px;
  --r: 0px;
}
body[data-theme="arcade"] {
  background:
    conic-gradient(rgba(255, 255, 255, .035) 25%, transparent 0 50%, rgba(255, 255, 255, .035) 0 75%, transparent 0) 0 0 / 16px 16px,
    #170a35;
  letter-spacing: 0; font-weight: 700;
}
[data-theme="arcade"] .strip, [data-theme="arcade"] .mini-row, [data-theme="arcade"] .group, [data-theme="arcade"] .mini-list,
[data-theme="arcade"] .btn, [data-theme="arcade"] .route, [data-theme="arcade"] .tog, [data-theme="arcade"] .keys, [data-theme="arcade"] select,
[data-theme="arcade"] .chip, [data-theme="arcade"] .readout, [data-theme="arcade"] .dlg, [data-theme="arcade"] .menu, [data-theme="arcade"] .well,
[data-theme="arcade"] .fader.h .track, [data-theme="arcade"] .thumb, [data-theme="arcade"] .offline-card, [data-theme="arcade"] .scene-list .load,
[data-theme="arcade"] .icon-pick, [data-theme="arcade"] input, [data-theme="arcade"] .toast { border-radius: 0; }
/* pixel-stepped outlines: four bars that leave the corners notched */
[data-theme="arcade"] .strip, [data-theme="arcade"] .mini-row { box-shadow: 0 -4px 0 0 #fff, 0 4px 0 0 #fff, -4px 0 0 0 #fff, 4px 0 0 0 #fff, 8px 8px 0 0 rgba(0, 0, 0, .55); }
[data-theme="arcade"] .strips, [data-theme="arcade"].dense .strips { gap: 14px; }
[data-theme="arcade"] .strip { padding: 14px 11px; }
[data-theme="arcade"].dense .strip { padding: 10px 8px; }
[data-theme="arcade"] .mini-list { background: none; box-shadow: none; padding: 0; gap: 10px; }
[data-theme="arcade"] .group { padding: 6px 12px; }
[data-theme="arcade"] .group-head h2 { color: #ffd400; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; text-shadow: 2px 2px 0 #ff3b3b; }
[data-theme="arcade"] .group-head h2::before { content: "► "; }
[data-theme="arcade"] .name, [data-theme="arcade"] .mini-name, [data-theme="arcade"] .brand-name { text-transform: uppercase; letter-spacing: .04em; }
[data-theme="arcade"] .brand-name { color: #ffd400; text-shadow: 2px 2px 0 #ff3b3b; }
[data-theme="arcade"] .name { font-size: 13px; }
[data-theme="arcade"] .sub { color: var(--muted); font-weight: 400; }
[data-theme="arcade"] .chip { background: var(--acc); color: #170a35; box-shadow: inset 0 0 0 2px #fff; clip-path: polygon(0 3px, 3px 3px, 3px 0, calc(100% - 3px) 0, calc(100% - 3px) 3px, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 3px calc(100% - 3px), 0 calc(100% - 3px)); }
[data-theme="arcade"] button.chip:hover { background: #fff; color: var(--acc); }
[data-theme="arcade"] .btn, [data-theme="arcade"] .route, [data-theme="arcade"] .tog, [data-theme="arcade"] .keys, [data-theme="arcade"] select, [data-theme="arcade"] .scene-list .load {
  background: #170a35; color: #fff; text-transform: uppercase; font-weight: 700; letter-spacing: .04em;
  box-shadow: inset 0 0 0 2px #9a85d8; clip-path: polygon(0 3px, 3px 3px, 3px 0, calc(100% - 3px) 0, calc(100% - 3px) 3px, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 3px calc(100% - 3px), 0 calc(100% - 3px));
}
[data-theme="arcade"] .btn:hover, [data-theme="arcade"] .route:hover, [data-theme="arcade"] .tog:hover { background: #3a1c80; box-shadow: inset 0 0 0 2px #fff; }
[data-theme="arcade"] .btn:active, [data-theme="arcade"] .route:active, [data-theme="arcade"] .tog:active { transform: translate(2px, 2px); }
[data-theme="arcade"] .route[aria-pressed="true"], [data-theme="arcade"] .modes .tog[aria-pressed="true"], [data-theme="arcade"] .tog.mono[aria-pressed="true"] {
  background: var(--c, var(--amber)); color: #170a35; box-shadow: inset 0 0 0 2px #fff;
}
[data-theme="arcade"] .route[aria-pressed="true"]:hover { background: var(--c, var(--amber)); color: #170a35; }
[data-theme="arcade"] .tog.mute[aria-pressed="true"] { background: var(--red); color: #220815; box-shadow: inset 0 0 0 2px #fff; }
[data-theme="arcade"] .tog.solo[aria-pressed="true"] { background: var(--solo); color: #170a35; }
[data-theme="arcade"] .btn.primary, [data-theme="arcade"] .btn[aria-pressed="true"], [data-theme="arcade"] .update-btn { background: #ffd400; color: #170a35; box-shadow: inset 0 0 0 2px #fff; }
[data-theme="arcade"] .btn.primary:hover, [data-theme="arcade"] .update-btn:hover { background: #fff; }
[data-theme="arcade"] .readout { color: #ffd400; font-size: 20px; font-weight: 700; letter-spacing: 0; text-shadow: 2px 2px 0 #ff3b3b; }
[data-theme="arcade"] .readout:hover { background: #3a1c80; }
[data-theme="arcade"] .well { background: #0a0420; box-shadow: inset 0 0 0 2px #5a3aa8; }
[data-theme="arcade"] .meter { border-radius: 0; -webkit-mask: repeating-linear-gradient(to top, #000 0 6px, transparent 6px 9px); mask: repeating-linear-gradient(to top, #000 0 6px, transparent 6px 9px); }
[data-theme="arcade"] .groove { width: 8px; margin-left: -4px; border-radius: 0; background: repeating-linear-gradient(to top, #5a3aa8 0 4px, transparent 4px 8px); box-shadow: none; }
[data-theme="arcade"] .thumb { background: #fff; box-shadow: 0 0 0 3px #000, 4px 4px 0 3px #000; }
[data-theme="arcade"] .thumb::after { left: 0; right: 0; top: 0; bottom: 0; height: auto; background: none; box-shadow: none; border-top: 6px solid var(--acc); border-bottom: 0; }
[data-theme="arcade"] .fader.dragging .thumb { box-shadow: 0 0 0 3px #ffd400, 4px 4px 0 3px #000; }
[data-theme="arcade"] .unity { background: #ffd400; opacity: .8; height: 2px; }
[data-theme="arcade"] .scale span { color: #b9a8eb; font-weight: 400; }
[data-theme="arcade"] .scale span.zero { color: #ffd400; font-weight: 700; }
[data-theme="arcade"] .fader.h .track { background: #0a0420; box-shadow: inset 0 0 0 2px #5a3aa8; }
[data-theme="arcade"] .fader.h .thumb { background: #fff; color: #170a35; }
[data-theme="arcade"] .fader.h .thumb::after { display: none; }
[data-theme="arcade"] .dlg { background: #2a1260; box-shadow: 0 -4px 0 0 #fff, 0 4px 0 0 #fff, -4px 0 0 0 #fff, 4px 0 0 0 #fff, 10px 10px 0 0 rgba(0, 0, 0, .6); }
[data-theme="arcade"] .dlg::backdrop { background: rgba(10, 4, 32, .75); }
[data-theme="arcade"] .wc { color: #cbb8ff; }
[data-theme="arcade"] .wc:hover { background: #ffd400; color: #170a35; }
[data-theme="arcade"] .wc.close:hover { background: #ff3b3b; color: #fff; }
.theme-card[data-theme="arcade"] .tc-desk { background: #170a35; border-radius: 0; }
.theme-card[data-theme="arcade"] .tc-mod, .theme-card[data-theme="arcade"] .tc-keys i, .theme-card[data-theme="arcade"] .tc-mute, .theme-card[data-theme="arcade"] .tc-well, .theme-card[data-theme="arcade"] .tc-cap { border-radius: 0; }
.theme-card[data-theme="arcade"] .tc-mod { background: #2a1260; box-shadow: inset 0 0 0 2px #fff; clip-path: polygon(0 3px, 3px 3px, 3px 0, calc(100% - 3px) 0, calc(100% - 3px) 3px, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 3px calc(100% - 3px), 0 calc(100% - 3px)); }
.theme-card[data-theme="arcade"] .tc-keys i { background: #170a35; box-shadow: none; }
.theme-card[data-theme="arcade"] .tc-cap { background: #fff; box-shadow: 0 0 0 1.5px #000; }
.theme-card[data-theme="arcade"] .tc-slot::before { width: 3px; margin-left: -1.5px; border-radius: 0; background: #5a3aa8; }

/* Surface finishes. Keep each theme's control shapes and layouts. */
[data-theme="oled"] {
  --mod-shadow: 0 0 0 1px #303037;
  --line: #383840; --key-edge: #33333b; --key: #0a0a0c; --muted: #a4a4ae; --glow: .45;
}
[data-theme="oled"] :is(.strip, .mini-row):focus-within { --mod-shadow: 0 0 0 1px #65656f; }
[data-theme="glass"] :is(.strip, .mini-row) {
  box-shadow: inset 0 1px 0 #effbff8c, inset 0 0 0 1px #e8f6ff26,
    inset 0 -1px 0 #a2c6ff44, var(--mod-shadow);
}
[data-theme="neon"] :is(.strip, .mini-row) {
  background: linear-gradient(155deg, color-mix(in srgb, var(--acc) 13%, #120c26), #0a0717 54%);
}
body[data-theme="terminal"]::after {
  background: repeating-linear-gradient(0deg, #0002 0 1px, transparent 1px 4px);
}
[data-theme="terminal"] :is(.strip, .mini-row) {
  background: radial-gradient(ellipse at 20% 0%, #0d301a, #031009 72%);
}
[data-theme="bubblegum"] :is(.strip, .mini-row) {
  background: linear-gradient(145deg, #fff 14%, #fff4fa 48%, #fbe6ff);
}
[data-theme="block"] :is(.strip, .mini-row) {
  background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 30%, #fff) 4px, #fff 4px);
}
[data-theme="arcade"] :is(.strip, .mini-row) {
  background: linear-gradient(180deg, #b691ff2e 0 4px, transparent 4px), linear-gradient(var(--mod-a), var(--mod-b));
}
:is([data-theme="bubblegum"]) .chip[data-icon="camera"]::before { content: "📹"; }
:is([data-theme="bubblegum"]) .chip[data-icon="film"]::before { content: "🎞️"; }
:is([data-theme="bubblegum"]) .chip[data-icon="keyboard"]::before { content: "⌨️"; }
:is([data-theme="bubblegum"]) .chip[data-icon="soundboard"]::before { content: "🔊"; }
:is([data-theme="bubblegum"]) .chip[data-icon="guitar"]::before { content: "🎸"; }
:is([data-theme="bubblegum"]) .chip[data-icon="bell"]::before { content: "🔔"; }
:is([data-theme="bubblegum"]) .chip[data-icon="people"]::before { content: "👥"; }
:is([data-theme="bubblegum"]) .chip[data-icon="sliders"]::before { content: "🎛️"; }

/* Lit and idle controls keep their original shapes. Partially muted buttons retain their own outline. */
:is([data-theme="neon"]) .tog.mute[aria-pressed="true"] {
  background-image: linear-gradient(#ffffff3b, transparent 48%, #4d0e2633);
}
:is([data-theme="block"], [data-theme="arcade"]) :is(.btn, .route, .tog):enabled:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
:is([data-theme="block"], [data-theme="arcade"], [data-theme="terminal"]) .check input::after { border-radius: inherit; }

/* A fixed canvas keeps the edges covered while the individual light accents move. */
body:is([data-theme="neon"], [data-theme="arcade"]) { isolation: isolate; }
body:is([data-theme="neon"], [data-theme="arcade"]):not(.is-mini, .is-panel, .is-mixwin) .theme-light {
  display: block;
  background: var(--ambient-base);
}
body[data-theme="neon"] .theme-light {
  --ambient-base: radial-gradient(ellipse at 19% 4%, #49229e80, transparent 55%),
    radial-gradient(ellipse at 99% 104%, #c321715e, transparent 59%);
  --ambient-accent: radial-gradient(ellipse 52% 33% at 31% 39%, #933dff60, transparent),
    radial-gradient(ellipse 46% 33% at 72% 73%, #08d0fa4d, transparent);
}
body[data-theme="arcade"] .theme-light {
  --ambient-base: radial-gradient(ellipse at 48% -12%, #684bd275, transparent 58%),
    radial-gradient(ellipse at 90% 105%, #5a269761, transparent 60%);
  --ambient-accent: radial-gradient(ellipse 60% 26% at 50% 36%, #9570ff77, transparent),
    radial-gradient(ellipse 46% 26% at 30% 74%, #ff3e7754, transparent);
}

/* The underwater light has no hard stripe edges, even at the limits of its drift. */
@media (prefers-reduced-motion: no-preference) {
  [data-theme-motion="subtle"] .theme-light { --pulse-time: 27s; --pulse-scale: 1.14; }
  [data-theme-motion="full"] .theme-light { --pulse-time: 16s; --pulse-scale: 1.36; }
}

/* Preserve readable controls across the theme's own surface colours. */
[data-theme].is-panel #dockBtn[aria-pressed="true"] { color: var(--on-ink); }
[data-theme="block"].is-panel #dockBtn[aria-pressed="true"] { color: #ffe9a8; }
[data-theme] .check input:checked::after { background: var(--on-ink); }

[data-theme] .route.part-muted,
[data-theme] .route.part-muted:is(:hover, :focus-visible),
[data-theme] .tog.mute.part:not([aria-pressed="true"]) {
  background: var(--key);
  color: var(--warning-ink, var(--red));
  box-shadow: inset 0 0 0 1.5px var(--warning-ink, var(--red));
}
[data-theme] .route.part-muted:is(:hover, :focus-visible) { text-decoration: line-through; }
[data-theme] :is(.strip.clipped .readout, .mini-row.clipped .mini-db) { color: var(--warning-ink, var(--red)); }
[data-theme="arcade"] :is(.btn, .route, .tog):focus-visible { outline-offset: -4px; }
[data-theme="arcade"] :is(.btn.primary, .btn[aria-pressed="true"], .route[aria-pressed="true"]:not(.part-muted), .tog[aria-pressed="true"]):focus-visible {
  outline-color: var(--on-ink);
}

/* Keep the selected radio visible alongside the individual theme previews. */
.theme-card { position: relative; min-width: 0; }
.theme-card[aria-checked="true"]::after {
  content: "✓" / "";
  position: absolute; top: 12px; right: 12px;
  display: grid; place-items: center; width: 19px; height: 19px;
  border-radius: inherit; background: var(--amber); color: var(--on-ink);
  font: 700 13px/1 system-ui, sans-serif; pointer-events: none;
}
.theme-card[data-theme="bubblegum"] .tc-cap::after {
  content: "♥" / "";
  display: grid; place-items: center; height: 100%;
  color: #9c2860; font: 10px/1 system-ui, sans-serif;
}

/* ===================================================================== Finishing touches */
/* Keys, chips and caps ease between states instead of snapping. Meters are left alone so they keep up with the audio. */
[data-theme] :is(.btn, .route, .tog, .keys, select, .scene-list .load, .chip, .readout, .wc) {
  transition: background-color .14s ease, color .14s ease, box-shadow .18s ease, transform .16s cubic-bezier(.2, .9, .3, 1), filter .18s ease;
}
[data-theme] .thumb { transition: box-shadow .18s ease, filter .18s ease; }
[data-theme] :is(.strip, .mini-row) { transition: box-shadow .22s ease, transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.theme-card { transition: box-shadow .16s ease, transform .2s cubic-bezier(.2, .9, .3, 1); }
.theme-card:hover { transform: translateY(-2px); }

/* OLED black: a faint bloom on lit keys reads clearly against pure black. */

/* Glass: panels catch more light under the pointer. */
[data-theme="glass"] :is(.strip, .mini-row):hover {
  box-shadow: inset 0 1px 0 #ffffffbf, inset 0 0 0 1px #e8f6ff40, inset 0 -1px 0 #a2c6ff55, var(--mod-shadow);
}
[data-theme="glass"] .readout { text-shadow: 0 0 14px color-mix(in srgb, var(--acc) 45%, transparent); }

/* Neon: the sign flickers now and then. */
@media (prefers-reduced-motion: no-preference) {
  body[data-theme="neon"][data-theme-motion="full"] .brand-name { animation: neon-flicker 9s linear infinite; }
}
@keyframes neon-flicker {
  0%, 90%, 92.5%, 96%, 100% { opacity: 1; }
  91% { opacity: .45; }
  94.5% { opacity: .7; }
}
[data-theme="neon"] :is(.strip, .mini-row):hover {
  box-shadow: 0 0 0 1px var(--acc), 0 0 30px color-mix(in srgb, var(--acc) 32%, transparent), inset 0 0 32px color-mix(in srgb, var(--acc) 13%, transparent);
}

/* Terminal: phosphor bloom on the text and a darker tube edge. */
body[data-theme="terminal"] {
  background: radial-gradient(ellipse at 50% 40%, #052012, #020b05 62%, #000301);
  background-attachment: fixed;
}
[data-theme="terminal"] :is(.name, .mini-name, .brand-name, .readout, .group-head h2) { text-shadow: 0 0 6px #3dff7a66; }
[data-theme="terminal"] :is(.btn, .route, .tog, .keys, select, .scene-list .load, .chip, .readout, .wc) { transition-timing-function: steps(2, end); }

/* Arcade: moves in 8-bit steps; a cabinet lights up yellow under the pointer. */
[data-theme="arcade"] :is(.btn, .route, .tog, .keys, select, .scene-list .load, .chip, .readout, .wc, .strip, .mini-row) { transition-timing-function: steps(3, end); }
[data-theme="arcade"] :is(.strip, .mini-row):hover {
  box-shadow: 0 -4px 0 0 #ffd400, 0 4px 0 0 #ffd400, -4px 0 0 0 #ffd400, 4px 0 0 0 #ffd400, 8px 8px 0 0 rgba(0, 0, 0, .55);
}

/* Block: comic-print halftone behind the bold colour blocks. */
body[data-theme="block"] {
  background: radial-gradient(circle, #11111117 1.2px, transparent 1.7px) 0 0 / 14px 14px, #ffe9a8;
  background-attachment: fixed;
}

@media (prefers-reduced-motion: no-preference) {
  body:is([data-theme="bubblegum"]):not([data-theme-motion="off"]) .tog.mute[aria-pressed="true"] {
    animation: theme-boing .42s cubic-bezier(.3, 1.7, .5, 1);
  }
}
@keyframes theme-boing { from { transform: scale(.86); } }

/* ====================================================================== Theme makeover (0.21)
 * Every theme, polished: the shiny ones shine harder, the matte ones get deeper and punchier,
 * and every theme moves. Motion follows Settings → Appearance → Theme motion (Off stops it,
 * Subtle keeps the calm parts, Full adds the rest) and Windows reduced motion.
 * Fonts are bundled in fonts/theme-fonts.css. The themed logos are drawn by app.js (THEME_LOGOS).
 * This block comes last, so it builds on the older rules above. */

/* Every theme has its ambient light layer now (Graphite's light, Neon's wall...). */
body[data-theme]:not(.is-mini, .is-panel, .is-mixwin) .theme-light { display: block; background: var(--ambient-base, transparent); }
body[data-theme] { isolation: isolate; }
/* Particles (bubbles, stars, droplets, sparkles): app.js fills .theme-fx for the themes that use them. */
.theme-fx { display: none; position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: clip; }
body:not(.is-mini, .is-panel, .is-mixwin, [data-theme-motion="off"]) .theme-fx { display: block; }
.theme-fx b { position: absolute; left: var(--x); top: var(--y); display: block; }
.brand-mark { overflow: visible; }
/* Keys spring back after a press. */
body:not([data-theme-motion="off"]) :is(.btn, .route, .tog, .chip) { transition: transform .22s cubic-bezier(.3, 1.5, .5, 1), background-color .25s, box-shadow .25s, color .25s, filter .25s; }
body:not([data-theme-motion="off"]) :is(.btn, .route, .tog):active { transform: scale(.95); }

/* ---------------------------------------------------------------- Each theme, matched to the approved mock-ups */

/* console */

/* oled */
:root body[data-theme="oled"] { --mod-a: #000; --mod-b: #000; --key: #000; --key-ink: #8a8a94; --ink: #fff; --muted: #74747e; --amber: #ffb000; --cyan: #00d5ff; --red: #ff2d55; --on-ink: #000; --well: #000; --led-g: #00ff6a; --led-y: #ffe100; --led-r: #ff2d55; --led-g-off: #031408; --led-y-off: #141202; --led-r-off: #170409; --cap-w: 30px; --cap-h: 30px; --c-amber: #ffb000; --c-violet: #9b7bff; --c-green: #00ff6a; --c-cyan: #00d5ff; --font: "Inter", "Segoe UI", sans-serif; background: #000; }
:root body[data-theme="oled"] :is(.strip, .mini-row) { background: linear-gradient(180deg, var(--mod-a), var(--mod-b)); border-radius: 12px; box-shadow: inset 0 0 0 1px #1c1c22; }
:root body[data-theme="oled"] :is(.strip .name, .mini-name, .brand-name) { font-family: "Inter", sans-serif; }
:root body[data-theme="oled"] .strip .name { font-size: 15px;  }
:root body[data-theme="oled"] .strip .sub { color: var(--muted); }
:root body[data-theme="oled"] .strip .head .chip { background: #000; color: var(--acc); border-radius: 8px; box-shadow: inset 0 0 0 1px #2a2a31; }
:root body[data-theme="oled"] :is(.strip-routes .route, .strip .tog, .bar .btn, .bar .keys, .route-expand) { border-radius: 6px; background: #000; color: var(--key-ink); box-shadow: inset 0 0 0 1px #2a2a31; }
:root body[data-theme="oled"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="oled"] .strip :is(.modes .tog, .tog.mono, .tog.solo)[aria-pressed="true"] { background: #ffb000; color: #000; box-shadow: 0 0 16px #ffb000b0; }
:root body[data-theme="oled"] .strip-routes .route.b[aria-pressed="true"] { background: #00d5ff; color: #000; box-shadow: 0 0 16px #00d5ffaa; }
:root body[data-theme="oled"] .strip .tog.mute[aria-pressed="true"] { background: #ff2d55; color: #000; box-shadow: 0 0 18px #ff2d55aa; }
:root body[data-theme="oled"] .strip .well { background: var(--well); border-radius: 4px; box-shadow: none; }
:root body[data-theme="oled"] .fader .groove { width: 6px; margin-left: calc(6px / -2); border-radius: 4px; background: #0b0b0e; box-shadow: inset 0 0 0 1px #1c1c22; border: 0; }
:root body[data-theme="oled"] .fader .groove::before { display: none; }
:root body[data-theme="oled"] .fader .thumb { border-radius: 8px; background: #000; box-shadow: inset 0 0 0 2px var(--acc), 0 0 12px color-mix(in srgb, var(--acc) 55%, transparent); filter: none; clip-path: none; }
:root body[data-theme="oled"] .fader .thumb::before { content: none; }
:root body[data-theme="oled"] .fader .thumb::after { content: ""; display: block; position: absolute; left: 4px; right: 4px; width: auto; top: calc(50% - 1px); height: 2px; margin: 0; border-radius: 1px; background: var(--acc); box-shadow: none; font-size: 0; transform: none; }
:root body[data-theme="oled"] .strip .readout { font-family: "Inter", "Segoe UI", sans-serif; color: var(--ink); background: transparent; }
:root body[data-theme="oled"] .theme-light { --ambient-base: none, #000; --ambient-accent: none; }
:root body[data-theme="oled"] .strip { position: relative; overflow: hidden; }
:root body[data-theme="oled"] .strip::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 1px; background: linear-gradient(90deg, transparent, var(--acc), transparent); pointer-events: none; }

/* glass: vivid light that keeps moving behind real frosted panes. Five colour blobs drift on their own
   paths and blend; each pane has a slowly turning rainbow rim and a reflection that sweeps across it now
   and then; caps are clear glass beads. Theme motion: Full moves everything, Subtle slows the light and
   drops the sweeps, Off holds still. The tray panel, mini mode and mix window keep the light still. */
@property --glass-rim { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
:root body[data-theme="glass"] { --bay: #ffffff08; --bay-edge: #ffffff1f; --bay-shadow: inset 0 1px 0 #ffffff26; --mod-a: rgba(255, 255, 255, .17); --mod-b: rgba(255, 255, 255, .06); --key: rgba(0, 0, 0, .18); --key-hi: rgba(255, 255, 255, .16); --key-ink: #ffffff; --ink: #ffffff; --ink-2: #ffffffd9; --muted: #ffffffcc; --amber: #7cf3ff; --cyan: #ff9ad5; --red: #ff4f7a; --solo: #d6ff7a; --on-ink: #120a3a; --well: rgba(0, 0, 0, .25); --track: rgba(0, 0, 0, .28); --flyout: #1a1446e8; --led-g: #3dffb0; --led-y: #ffe45a; --led-r: #ff4f8b; --led-g-off: rgba(255, 255, 255, .1); --led-y-off: rgba(255, 255, 255, .1); --led-r-off: rgba(255, 255, 255, .1); --cap-w: 30px; --cap-h: 30px; --c-amber: #ffb36b; --c-violet: #b18bff; --c-green: #3dffb0; --c-cyan: #7cf3ff; --c-rose: #ff7ad9; --c-blue: #6f9dff; --c-coral: #ff8a6b; --c-slate: #c9cbe8; --font: "Inter", "Segoe UI", sans-serif; background: #060820; }
/* The light: five blobs blurred into one moving mesh. */
:root body[data-theme="glass"] .glass-aurora { display: block; background: #060820; filter: blur(60px) saturate(1.2) brightness(.52); }
:root body[data-theme="glass"] .glass-aurora::before, :root body[data-theme="glass"] .glass-aurora::after { display: none; content: none; animation: none; }
.glass-aurora b { display: none; }
:root body[data-theme="glass"] .glass-aurora b { display: block; position: absolute; border-radius: 50%; mix-blend-mode: screen; }
:root body[data-theme="glass"] .glass-aurora b:nth-child(1) { width: 75%; height: 60%; left: -15%; top: -15%; background: #7c3aff; }
:root body[data-theme="glass"] .glass-aurora b:nth-child(2) { width: 60%; height: 55%; right: -15%; top: 5%; background: #00c8ff; }
:root body[data-theme="glass"] .glass-aurora b:nth-child(3) { width: 60%; height: 30%; left: 20%; bottom: -20%; background: #a8136a; opacity: .8; }
:root body[data-theme="glass"] .glass-aurora b:nth-child(4) { width: 40%; height: 35%; left: 40%; top: 30%; background: #2bffc6; opacity: .5; }
:root body[data-theme="glass"] .glass-aurora b:nth-child(5) { width: 35%; height: 30%; right: 0; bottom: 5%; background: #3a6bff; opacity: .5; }
:root body[data-theme="glass"] .theme-light { display: none; }
/* Panes. */
:root body[data-theme="glass"] :is(.strip, .mini-row) { background: linear-gradient(180deg, var(--mod-a), var(--mod-b)); border-radius: 26px; box-shadow: inset 0 1px 0 #ffffffe0, inset 0 -1px 0 #ffffff40, 0 18px 40px #05061e70; }
:root body[data-theme="glass"] :is(.strip, .mini-row):hover { box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 #ffffff55, 0 18px 40px #05061e70; }
:root body[data-theme="glass"] .strip::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 0;
  background: conic-gradient(from var(--glass-rim), #7cf3ff, #b18bff, #ff7ad9, #ffb36b, #d6ff7a, #7cf3ff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: .8; }
:root body[data-theme="glass"] .strip::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .26) 45%, rgba(255, 255, 255, .07) 52%, transparent 60%) 140% 0 / 300% 100% no-repeat; }
:root body[data-theme="glass"] .strip.muted::before { filter: grayscale(.6) brightness(.8); }
:root body[data-theme="glass"] :is(.strip .name, .mini-name, .brand-name) { font-family: "Inter", sans-serif; }
:root body[data-theme="glass"] .strip .name { font-size: 15px; }
:root body[data-theme="glass"] .strip .sub { color: var(--muted); }
:root body[data-theme="glass"] .strip .head .chip { color: #fff; border-radius: 50%; background: linear-gradient(145deg, color-mix(in srgb, var(--acc) 85%, #fff), color-mix(in srgb, var(--acc) 60%, #3a1aa0)); box-shadow: inset 0 1px 0 #ffffffb0, 0 0 16px color-mix(in srgb, var(--acc) 70%, transparent); }
/* Keys. */
:root body[data-theme="glass"] :is(.strip-routes .route, .strip .tog, .bar .btn, .bar .keys, .route-expand) { border-radius: 999px; background: var(--key); color: var(--key-ink); box-shadow: inset 0 1px 0 #ffffff70, inset 0 -1px 0 #ffffff20; }
:root body[data-theme="glass"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="glass"] .strip :is(.modes .tog, .tog.mono)[aria-pressed="true"] { background: linear-gradient(135deg, #7cf3ff, #b18bff); color: #120a3a; box-shadow: inset 0 1px 0 #ffffffd0, 0 0 14px #9ad8ffaa; }
:root body[data-theme="glass"] .strip-routes .route.b[aria-pressed="true"] { background: linear-gradient(135deg, #ff9ad5, #ffb36b); color: #3a0a24; box-shadow: inset 0 1px 0 #ffffffd0, 0 0 14px #ffa3c8aa; }
:root body[data-theme="glass"] .strip .tog.solo[aria-pressed="true"] { background: linear-gradient(135deg, #d6ff7a, #7cf3ff); color: #0d2a1a; box-shadow: inset 0 1px 0 #ffffffd0, 0 0 14px #d6ff7a99; }
:root body[data-theme="glass"] .strip .tog.mute[aria-pressed="true"] { background: linear-gradient(135deg, #ff5f9e, #ff3d5a); color: #fff; box-shadow: inset 0 1px 0 #ffffffb0, 0 0 18px #ff4f7aaa; }
:root body[data-theme="glass"] :is(.btn.primary, .btn[aria-pressed="true"], .update-btn) { background: linear-gradient(135deg, #7cf3ff, #b18bff); color: #120a3a; box-shadow: inset 0 1px 0 #ffffffd0, 0 4px 16px #9ad8ff66; }
/* Meters and faders. */
:root body[data-theme="glass"] .strip .well { background: var(--well); border-radius: 999px; box-shadow: inset 0 1px 2px #0004, inset 0 -1px 0 #ffffff26; }
:root body[data-theme="glass"] .strip .meter { -webkit-mask: none; mask: none; border-radius: 999px; }
:root body[data-theme="glass"] .fader .groove { width: 8px; margin-left: -4px; border-radius: 999px; border: 0;
  background: linear-gradient(to top, var(--acc), color-mix(in srgb, var(--acc) 45%, #fff) calc(var(--p, 0) * 100%), var(--track) 0);
  box-shadow: inset 0 1px 2px #0006, inset 0 -1px 0 #ffffff30, 0 0 12px color-mix(in srgb, var(--acc) 45%, transparent); }
:root body[data-theme="glass"] .fader .groove::before { display: none; }
:root body[data-theme="glass"] .fader .thumb { border-radius: 50%; clip-path: none; filter: none;
  background: radial-gradient(circle at 34% 26%, #fff 0 12%, transparent 30%), conic-gradient(from 200deg, #7cf3ff99, #b18bff99, #ff7ad999, #ffb36b99, #7cf3ff99), rgba(255, 255, 255, .35);
  box-shadow: inset 0 1px 1px #fff, inset 0 -3px 6px #ffffff50, 0 6px 16px #05061e80, 0 0 0 1.5px #ffffffd0, 0 0 18px color-mix(in srgb, var(--acc) 60%, transparent); }
:root body[data-theme="glass"] .fader .thumb::before { content: none; }
:root body[data-theme="glass"] .fader .thumb::after { display: none; }
:root body[data-theme="glass"] .fader.dragging .thumb { box-shadow: inset 0 1px 1px #fff, 0 0 0 3px color-mix(in srgb, var(--acc) 70%, #fff), 0 0 26px var(--acc), 0 8px 18px #05061e90; }
:root body[data-theme="glass"] .strip .readout { font-family: "Inter", "Segoe UI", sans-serif; color: var(--ink); background: transparent; text-shadow: 0 0 14px color-mix(in srgb, var(--acc) 80%, transparent), 0 1px 2px #0006; }
:root body[data-theme="glass"] :is(.strip .name, .strip .sub, .brand-name, .scale span, .strip .route:not([aria-pressed="true"]), .strip .tog:not([aria-pressed="true"]), .group-head h2, .bar .btn) { text-shadow: 0 1px 2px #0006; }
:root body[data-theme="glass"] :is(.strip .name, .brand-name, .strip .readout) { letter-spacing: -.01em; }
/* The toolbar pill, window buttons and dialogs. */
/* The pill's blur makes it its own layer, so it is lifted above the strips or its menus would open behind them,
   but kept under the channel panel (25) and the offline cover (30), which open over the toolbar in every theme. */
:root body[data-theme="glass"] .bar { position: relative; z-index: 24; }
:root body[data-theme="glass"] .bar { margin: 8px 12px 4px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(18px) saturate(180%); box-shadow: inset 0 1px 0 #ffffffc0, inset 0 -1px 0 #ffffff30, 0 10px 26px #05061e66; }
:root body[data-theme="glass"].custom-chrome:not(.is-mini, .is-panel) .bar { padding-right: 140px; }
:root body[data-theme="glass"].custom-chrome:not(.is-mini, .is-panel) .winctl { top: 50%; right: 10px; transform: translateY(-50%); gap: 2px; margin: 0; }
:root body[data-theme="glass"] .wc { width: 38px; height: 30px; border-radius: 999px; margin: 0; }
:root body[data-theme="glass"] .dlg { background: #1a1446e0; backdrop-filter: blur(28px) saturate(180%); box-shadow: inset 0 1px 0 #ffffff70, 0 0 0 1px #ffffff2a, 0 30px 70px #05061e99; }
:root body[data-theme="glass"]:not([data-theme-motion="off"]) :is(.btn, .route, .tog):active { transform: scale(.92, .86); }
:root body[data-theme="glass"] .strip-routes .route[aria-pressed="true"] { position: relative; overflow: hidden; }
.theme-card[data-theme="glass"] .tc-desk { background: radial-gradient(60% 70% at 15% 10%, #7c3affcc, transparent 70%), radial-gradient(55% 60% at 95% 30%, #00c8ffb0, transparent 70%), radial-gradient(50% 35% at 50% 115%, #a8136a99, transparent 70%), #060820; }
.theme-card[data-theme="glass"] .tc-mod { background: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 #ffffffd0, 0 0 0 1px #ffffff40; }
/* Motion. */
@media (prefers-reduced-motion: no-preference) {
  body[data-theme="glass"]:is([data-theme-motion="subtle"], [data-theme-motion="full"]):not(.is-mini, .is-panel, .is-mixwin) .glass-aurora b { animation: var(--glass-path) var(--glass-time) ease-in-out infinite alternate; }
  body[data-theme="glass"] .glass-aurora b:nth-child(1) { --glass-path: glass-b1; --glass-time: 17s; }
  body[data-theme="glass"] .glass-aurora b:nth-child(2) { --glass-path: glass-b2; --glass-time: 21s; }
  body[data-theme="glass"] .glass-aurora b:nth-child(3) { --glass-path: glass-b3; --glass-time: 19s; }
  body[data-theme="glass"] .glass-aurora b:nth-child(4) { --glass-path: glass-b4; --glass-time: 15s; }
  body[data-theme="glass"] .glass-aurora b:nth-child(5) { --glass-path: glass-b5; --glass-time: 23s; }
  body[data-theme="glass"][data-theme-motion="subtle"] .glass-aurora b { animation-duration: 45s !important; }
  /* The rim and the sheen move on the GPU: see "Effect layers" at the end of this file. */
  body[data-theme="glass"][data-theme-motion="full"] .strip.muted .tog.mute[aria-pressed="true"] { animation: glass-pulse 1.8s ease-in-out infinite; }
  body[data-theme="glass"] .strip.muted::before { animation-play-state: paused; }
}
@keyframes glass-b1 { to { transform: translate(28%, 22%) scale(1.15); } }
@keyframes glass-b2 { to { transform: translate(-30%, 30%) scale(.9); } }
@keyframes glass-b3 { to { transform: translate(-25%, -6%) scale(1.15); } }
@keyframes glass-b4 { to { transform: translate(-60%, 40%) scale(1.3); } }
@keyframes glass-b5 { to { transform: translate(-90%, -40%) scale(1.1); } }
@keyframes glass-rim { to { --glass-rim: 360deg; } }
@keyframes glass-sweep { 0%, 62% { background-position: 140% 0; } 100% { background-position: -40% 0; } }
@keyframes glass-pulse { 50% { box-shadow: inset 0 1px 0 #ffffffb0, 0 0 6px #ff4f7a66; } }

/* neon */
:root body[data-theme="neon"] { --mod-a: #120a2e; --mod-b: #0a0620; --key: #150d33; --key-ink: #c9b6ff; --ink: #fff1ff; --muted: #9a86d8; --amber: #ff2e97; --cyan: #19f0ff; --red: #ff3860; --on-ink: #20001a; --well: #040112; --led-g: #19f0ff; --led-y: #ff2e97; --led-r: #ffe14a; --led-g-off: #061a2a; --led-y-off: #22061a; --led-r-off: #221e08; --cap-w: 38px; --cap-h: 18px; --c-amber: #ffd23a; --c-violet: #b46bff; --c-green: #3dff9a; --c-cyan: #19f0ff; --font: "Rajdhani", "Saira SC", sans-serif; background: radial-gradient(ellipse 55% 45% at 14% 6%, #6a2bd040, transparent 70%),
    radial-gradient(ellipse 60% 50% at 96% 104%, #ff2e9738, transparent 70%),
    radial-gradient(ellipse 40% 35% at 62% 22%, #19f0ff12, transparent 70%),
    var(--nn-brick),
    linear-gradient(180deg, #0b0522, #07031a);
  --nn-brick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='44'%3E%3Cg fill='none'%3E%3Cpath d='M0 .5H72M0 22.5H72M.5 0V22M36.5 22V44' stroke='%23c7b3ff' stroke-opacity='.07'/%3E%3Cpath d='M0 21.5H72M0 43.5H72' stroke='%23000' stroke-opacity='.45'/%3E%3C/g%3E%3C/svg%3E"); background-attachment: fixed;
}
:root body[data-theme="neon"] :is(.strip, .mini-row) { background: linear-gradient(180deg, var(--mod-a), var(--mod-b)); border-radius: 4px; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--acc) 85%, #fff), 0 0 14px color-mix(in srgb, var(--acc) 45%, transparent), inset 0 0 18px color-mix(in srgb, var(--acc) 22%, transparent); }
:root body[data-theme="neon"] :is(.strip .name, .mini-name, .brand-name) { font-family: "Orbitron", sans-serif; }
:root body[data-theme="neon"] .strip .name { font-size: 12px; color: var(--acc); text-shadow: 0 0 8px var(--acc); letter-spacing: .08em; text-transform: uppercase; }
:root body[data-theme="neon"] .strip .sub { color: var(--muted); }
:root body[data-theme="neon"] .strip .head .chip { background: #150d33; color: var(--acc); border-radius: 8px; box-shadow: inset 0 0 0 1px #3b2a7a; }
:root body[data-theme="neon"] :is(.strip-routes .route, .strip .tog, .bar .btn, .bar .keys, .route-expand) { border-radius: 3px; background: #150d33; color: var(--key-ink); box-shadow: inset 0 0 0 1px #3b2a7a; }
:root body[data-theme="neon"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="neon"] .strip :is(.modes .tog, .tog.mono, .tog.solo)[aria-pressed="true"] { background: #ff2e97; color: #20001a; box-shadow: 0 0 6px #ff2e97, 0 0 16px #ff2e97; }
:root body[data-theme="neon"] .strip-routes .route.b[aria-pressed="true"] { background: #19f0ff; color: #001c22; box-shadow: 0 0 6px #19f0ff, 0 0 16px #19f0ff; }
:root body[data-theme="neon"] .strip .tog.mute[aria-pressed="true"] { background: #ff3860; color: #22000a; box-shadow: 0 0 6px #ff3860, 0 0 16px #ff3860; }
:root body[data-theme="neon"] .strip .well { background: var(--well); border-radius: 4px; box-shadow: none; }
:root body[data-theme="neon"] .fader .groove { width: 2px; margin-left: calc(2px / -2); border-radius: 4px; background: color-mix(in srgb, var(--acc) 60%, transparent); box-shadow: 0 0 8px var(--acc); border: 0; }
:root body[data-theme="neon"] .fader .groove::before { display: none; }
:root body[data-theme="neon"] .fader .thumb { border-radius: 2px; background: var(--acc); box-shadow: 0 0 6px var(--acc), 0 0 18px var(--acc); filter: none; clip-path: none; }
:root body[data-theme="neon"] .fader .thumb::before { content: none; }
:root body[data-theme="neon"] .fader .thumb::after { content: ""; display: block; position: absolute; left: 4px; right: 4px; width: auto; top: calc(50% - 1px); height: 2px; margin: 0; border-radius: 1px; background: var(--acc); box-shadow: none; font-size: 0; transform: none; }
:root body[data-theme="neon"] .strip .readout { font-family: "Rajdhani", "Saira SC", sans-serif; color: var(--ink); background: transparent; }
:root body[data-theme="neon"] .theme-light { --ambient-base: radial-gradient(ellipse at 20% 0%, #49229e88, transparent 55%), radial-gradient(ellipse at 100% 100%, #c3217155, transparent 60%), #07031a; --ambient-accent: none; }
:root body[data-theme="neon"] .fader .thumb::after { display: none; }
:root body[data-theme="neon"] .brand-name { font-weight: 800; font-size: 16px; color: #ff2e97; text-shadow: 0 0 6px #ff2e97, 0 0 20px #ff2e97; }
:root body[data-theme="neon"] .theme-light::after { content: ""; position: absolute; left: -50%; right: -50%; bottom: -8%; height: 42%; transform: perspective(300px) rotateX(64deg); transform-origin: bottom;
  background: linear-gradient(transparent 0 92%, #ff2e9766 92%) 0 0 / 100% 26px, linear-gradient(90deg, transparent 0 96%, #19f0ff55 96%) 0 0 / 44px 100%;
  -webkit-mask: linear-gradient(transparent, #000 60%); mask: linear-gradient(transparent, #000 60%); }

/* terminal */
:root body[data-theme="terminal"] { --mod-a: #031409; --mod-b: #031409; --key: #031409; --key-ink: #5fd67f; --ink: #9dffb4; --muted: #3fa45a; --amber: #b6ff5c; --cyan: #44e8c4; --red: #ff5f56; --on-ink: #021a0a; --well: #010603; --led-g: #3dff7a; --led-y: #e8ff5c; --led-r: #ff5f56; --led-g-off: #05190c; --led-y-off: #12190a; --led-r-off: #1a0a09; --cap-w: 34px; --cap-h: 12px; --font: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace; background: #010a04; }
:root body[data-theme="terminal"] :is(.strip, .mini-row) { background: linear-gradient(180deg, var(--mod-a), var(--mod-b)); border-radius: 0; box-shadow: 0 0 0 1px #13602b, inset 0 0 22px #3dff7a12; }
:root body[data-theme="terminal"] :is(.strip .name, .mini-name, .brand-name) { font-family: "VT323", Consolas, monospace; }
:root body[data-theme="terminal"] .strip .name { font-size: 20px; font-weight: 400; text-shadow: 0 0 6px #3dff7aaa; text-transform: uppercase; }
:root body[data-theme="terminal"] .strip .sub { color: var(--muted); }
:root body[data-theme="terminal"] .strip .head .chip { background: transparent; color: var(--acc); border-radius: 8px; box-shadow: inset 0 0 0 1px #13602b; }
:root body[data-theme="terminal"] :is(.strip-routes .route, .strip .tog, .bar .btn, .bar .keys, .route-expand) { border-radius: 0; background: transparent; color: var(--key-ink); box-shadow: inset 0 0 0 1px #13602b; }
:root body[data-theme="terminal"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="terminal"] .strip :is(.modes .tog, .tog.mono, .tog.solo)[aria-pressed="true"] { background: #b6ff5c; color: #021a0a; box-shadow: 0 0 12px #b6ff5c88; }
:root body[data-theme="terminal"] .strip-routes .route.b[aria-pressed="true"] { background: #44e8c4; color: #021a14; box-shadow: 0 0 12px #44e8c488; }
:root body[data-theme="terminal"] .strip .tog.mute[aria-pressed="true"] { background: #ff5f56; color: #1a0504; box-shadow: none; }
:root body[data-theme="terminal"] .strip .well { background: var(--well); border-radius: 4px; box-shadow: none; }
:root body[data-theme="terminal"] .fader .groove { width: 1px; margin-left: calc(1px / -2); border-radius: 4px; background: transparent; box-shadow: none; border: 0; }
:root body[data-theme="terminal"] .fader .groove::before { display: none; }
:root body[data-theme="terminal"] .fader .thumb { border-radius: 0; background: #9dffb4; box-shadow: 0 0 12px #3dff7a99; filter: none; clip-path: none; }
:root body[data-theme="terminal"] .fader .thumb::before { content: none; }
:root body[data-theme="terminal"] .fader .thumb::after { content: ""; display: block; position: absolute; left: 4px; right: 4px; width: auto; top: calc(50% - 1px); height: 2px; margin: 0; border-radius: 1px; background: var(--acc); box-shadow: none; font-size: 0; transform: none; }
:root body[data-theme="terminal"] .strip .readout { font-family: "VT323", Consolas, monospace; color: var(--ink); background: transparent; }
:root body[data-theme="terminal"] .theme-light { --ambient-base: radial-gradient(ellipse at 50% 50%, transparent 58%, #000b), #010a04; --ambient-accent: none; }
:root body[data-theme="terminal"] .fader .groove { border-left: 1px dashed #1a7a38; }
:root body[data-theme="terminal"] .fader .thumb::after { background: #021a0a; }
:root body[data-theme="terminal"] .strip .readout { font-size: 26px; font-weight: 400; text-shadow: 0 0 6px #3dff7aaa; }
:root body[data-theme="terminal"] .theme-light::after { content: ""; position: absolute; left: 0; right: 0; height: 30%; top: -30%; background: linear-gradient(transparent, #3dff7a10, transparent); }

/* arcade */
:root body[data-theme="arcade"] { --mod-a: #2c1268; --mod-b: #1d0a48; --key: #170a35; --key-ink: #c8b8ff; --ink: #fff; --muted: #a48ee8; --amber: #ffe14a; --cyan: #3df0ff; --red: #ff3b3b; --on-ink: #1a0d00; --well: #08021a; --led-g: #3dff6a; --led-y: #ffe14a; --led-r: #ff3b3b; --led-g-off: #0a2214; --led-y-off: #221e08; --led-r-off: #220a0a; --cap-w: 30px; --cap-h: 18px; --c-amber: #ffe14a; --c-violet: #ff6af0; --c-green: #3dff6a; --c-cyan: #3df0ff; --font: "Silkscreen", "Saira SC", monospace; background: #12062e; }
:root body[data-theme="arcade"] :is(.strip, .mini-row) { background: linear-gradient(180deg, var(--mod-a), var(--mod-b)); border-radius: 0; box-shadow: 0 0 0 3px #fff, 6px 6px 0 3px #000, inset 0 0 0 3px #7a4aff; }
:root body[data-theme="arcade"] :is(.strip .name, .mini-name, .brand-name) { font-family: "Press Start 2P", monospace; }
:root body[data-theme="arcade"] .strip .name { font-size: 10px; font-weight: 400; line-height: 18px; }
/* Silkscreen draws B and D almost alike (B1 read as D1), so routes and bus tags use Press Start 2P, at its 8px grid. */
:root body[data-theme="arcade"] :is(.route, .bus-tag) { font-family: "Press Start 2P", monospace; font-size: 8px; letter-spacing: 0; }
:root body[data-theme="arcade"] .strip .sub { color: var(--muted); }
:root body[data-theme="arcade"] .strip .head .chip { background: #170a35; color: var(--acc); border-radius: 0; box-shadow: inset 0 0 0 2px #7a4aff; }
:root body[data-theme="arcade"] :is(.strip-routes .route, .strip .tog, .bar .btn, .bar .keys, .route-expand) { border-radius: 0; background: #170a35; color: var(--key-ink); box-shadow: inset 0 0 0 2px #7a4aff; }
:root body[data-theme="arcade"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="arcade"] .strip :is(.modes .tog, .tog.mono, .tog.solo)[aria-pressed="true"] { background: #ffe14a; color: #1a0d00; box-shadow: inset -3px -3px 0 #0005, inset 3px 3px 0 #fff8; }
:root body[data-theme="arcade"] .strip-routes .route.b[aria-pressed="true"] { background: #3df0ff; color: #001a22; box-shadow: inset -3px -3px 0 #0005, inset 3px 3px 0 #fff8; }
:root body[data-theme="arcade"] .strip .tog.mute[aria-pressed="true"] { background: #ff3b3b; color: #fff; box-shadow: none; }
:root body[data-theme="arcade"] .strip .well { background: var(--well); border-radius: 4px; box-shadow: none; }
:root body[data-theme="arcade"] .fader .groove { width: 4px; margin-left: calc(4px / -2); border-radius: 0; background: repeating-linear-gradient(to bottom, #7a4aff 0 4px, transparent 4px 8px); box-shadow: none; border: 0; }
:root body[data-theme="arcade"] .fader .groove::before { display: none; }
:root body[data-theme="arcade"] .fader .thumb { border-radius: 0; background: linear-gradient(#fff 0 25%, #e0e0ff 25% 75%, #9a8ae0 75%); box-shadow: 3px 3px 0 #000; filter: none; clip-path: none; }
:root body[data-theme="arcade"] .fader .thumb::before { content: none; }
:root body[data-theme="arcade"] .fader .thumb::after { content: ""; display: block; position: absolute; left: 4px; right: 4px; width: auto; top: calc(50% - 1px); height: 2px; margin: 0; border-radius: 1px; background: var(--acc); box-shadow: none; font-size: 0; transform: none; }
:root body[data-theme="arcade"] .strip .readout { font-family: "Silkscreen", "Saira SC", monospace; color: var(--ink); background: transparent; }
:root body[data-theme="arcade"] .theme-light { --ambient-base: radial-gradient(ellipse at 48% -12%, #684bd275, transparent 58%), #12062e; --ambient-accent: none; }
:root body[data-theme="arcade"] .strip .meter { -webkit-mask: repeating-linear-gradient(to top, #000 0 5px, transparent 5px 7px); mask: repeating-linear-gradient(to top, #000 0 5px, transparent 5px 7px); }
:root body[data-theme="arcade"] .brand-name { font-weight: 400; font-size: 13px; color: #ffe14a; text-shadow: 2px 2px 0 #ff3bd0; }
:root body[data-theme="arcade"] .theme-fx b { width: 3px; height: 3px; background: #fff; }

/* block */
:root body[data-theme="block"] { --mod-a: #fff; --mod-b: #fff; --key: #fff; --key-ink: #111; --ink: #111; --muted: #4a4636; --amber: #ff6b1a; --cyan: #2ad1ff; --red: #ff2d55; --on-ink: #111; --well: #111; --led-g: #2bff7a; --led-y: #ffe24a; --led-r: #ff2d55; --led-g-off: #1e2a20; --led-y-off: #2a2818; --led-r-off: #2a1418; --cap-w: 32px; --cap-h: 24px; --c-amber: #ff6b1a; --c-violet: #8a5cff; --c-green: #18c964; --c-cyan: #2ad1ff; --font: "Space Grotesk", "Segoe UI", sans-serif; background: #ffe24a; }
:root body[data-theme="block"] :is(.strip, .mini-row) { background: linear-gradient(180deg, var(--mod-a), var(--mod-b)); border-radius: 4px; box-shadow: 0 0 0 3px #111, 6px 6px 0 3px #111; }
:root body[data-theme="block"] :is(.strip .name, .mini-name, .brand-name) { font-family: "Archivo Black", "Arial Black", sans-serif; }
:root body[data-theme="block"] .strip .name { font-size: 13px; font-weight: 400; }
:root body[data-theme="block"] .strip .sub { color: var(--muted); }
:root body[data-theme="block"] .strip .head .chip { background: #fff; color: var(--acc); border-radius: 8px; box-shadow: 0 0 0 2px #111, 3px 3px 0 2px #111; }
:root body[data-theme="block"] :is(.strip-routes .route, .strip .tog, .bar .btn, .bar .keys, .route-expand) { border-radius: 4px; background: #fff; color: var(--key-ink); box-shadow: 0 0 0 2px #111, 3px 3px 0 2px #111; }
:root body[data-theme="block"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="block"] .strip :is(.modes .tog, .tog.mono, .tog.solo)[aria-pressed="true"] { background: #ff6b1a; color: #111; box-shadow: 0 0 0 2px #111; }
:root body[data-theme="block"] .strip-routes .route.b[aria-pressed="true"] { background: #2ad1ff; color: #111; box-shadow: 0 0 0 2px #111; }
:root body[data-theme="block"] .strip .tog.mute[aria-pressed="true"] { background: #ff2d55; color: #fff; box-shadow: 0 0 0 2px #111; }
:root body[data-theme="block"] .strip .well { background: var(--well); border-radius: 4px; box-shadow: none; }
:root body[data-theme="block"] .fader .groove { width: 8px; margin-left: calc(8px / -2); border-radius: 0; background: #fff; box-shadow: 0 0 0 2px #111; border: 0; }
:root body[data-theme="block"] .fader .groove::before { display: none; }
:root body[data-theme="block"] .fader .thumb { border-radius: 4px; background: var(--acc); box-shadow: 0 0 0 3px #111, 3px 3px 0 3px #111; filter: none; clip-path: none; }
:root body[data-theme="block"] .fader .thumb::before { content: none; }
:root body[data-theme="block"] .fader .thumb::after { content: ""; display: block; position: absolute; left: 4px; right: 4px; width: auto; top: calc(50% - 1px); height: 2px; margin: 0; border-radius: 1px; background: var(--acc); box-shadow: none; font-size: 0; transform: none; }
:root body[data-theme="block"] .strip .readout { font-family: "Space Grotesk", "Segoe UI", sans-serif; color: var(--ink); background: transparent; }
:root body[data-theme="block"] .theme-light { --ambient-base: radial-gradient(#0000001a 1.2px, transparent 1.5px) 0 0 / 10px 10px, #ffe24a; --ambient-accent: none; }
:root body[data-theme="block"] .strip .head { margin: -12px -11px 0; padding: 8px 11px; height: auto; min-height: 46px; background: var(--acc); border-bottom: 3px solid #111; border-radius: 4px 4px 0 0; }
:root body[data-theme="block"] .strip .head .sub { color: #111; opacity: .78; }
/* The bus tag (A1, B2...) is printed in the header colour, so it vanished on a header of the same colour. */
:root body[data-theme="block"] .strip .head .bus-tag { color: #111; font-weight: 800; }
:root body[data-theme="block"] .strip .head .chip { background: #fff; box-shadow: 0 0 0 2px #111; }
:root body[data-theme="block"] :is(.strip-routes .route, .strip .tog)[aria-pressed="true"] { transform: translate(3px, 3px); }
:root body[data-theme="block"] .fader .thumb::after { background: #111; }
:root body[data-theme="block"] .brand-name { font-weight: 400; }
:root body[data-theme="block"] .theme-light::after { content: ""; position: absolute; inset: -20px; background: radial-gradient(#0000000f 1.4px, transparent 1.7px) 0 0 / 14px 14px; }

/* bubblegum */
:root body[data-theme="bubblegum"] { --mod-a: #ffffff; --mod-b: #ffeef7; --key: #ffe2f0; --key-ink: #a2266a; --ink: #5a1040; --muted: #b0538a; --amber: #ff3d9a; --cyan: #8a5cff; --red: #e8165a; --on-ink: #fff; --well: #ffd0e6; --led-g: #ff7ac0; --led-y: #b98aff; --led-r: #ff2d6a; --led-g-off: #ffe4f1; --led-y-off: #f0e4ff; --led-r-off: #ffe0e8; --cap-w: 34px; --cap-h: 30px; --c-amber: #ff9e3d; --c-violet: #a96bff; --c-green: #3dd99a; --c-cyan: #3dbaff; --font: "Fredoka", "Segoe UI", sans-serif; background: #ffd6ea; }
:root body[data-theme="bubblegum"] :is(.strip, .mini-row) { background: linear-gradient(180deg, var(--mod-a), var(--mod-b)); border-radius: 22px; box-shadow: 0 10px 22px #ff3d9a33, inset 0 2px 0 #fff, inset 0 0 0 2px #ffd0e6; }
:root body[data-theme="bubblegum"] :is(.strip .name, .mini-name, .brand-name) { font-family: "Fredoka", sans-serif; }
:root body[data-theme="bubblegum"] .strip .name { font-size: 16px; font-weight: 600; }
:root body[data-theme="bubblegum"] .strip .sub { color: var(--muted); }
:root body[data-theme="bubblegum"] .strip .head .chip { background: linear-gradient(#fff, #ffe2f0); color: var(--acc); border-radius: 8px; box-shadow: inset 0 2px 0 #fff, 0 3px 6px #ff3d9a26; }
:root body[data-theme="bubblegum"] :is(.strip-routes .route, .strip .tog, .bar .btn, .bar .keys, .route-expand) { border-radius: 999px; background: linear-gradient(#fff, #ffe2f0); color: var(--key-ink); box-shadow: inset 0 2px 0 #fff, 0 3px 6px #ff3d9a26; }
:root body[data-theme="bubblegum"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="bubblegum"] .strip :is(.modes .tog, .tog.mono, .tog.solo)[aria-pressed="true"] { background: linear-gradient(#ff9ed2, #ff3d9a); color: #fff; box-shadow: inset 0 2px 1px #ffffffaa, inset 0 -2px 3px #0002, 0 4px 12px #ff3d9a66; }
:root body[data-theme="bubblegum"] .strip-routes .route.b[aria-pressed="true"] { background: linear-gradient(#c9b0ff, #8a5cff); color: #fff; box-shadow: inset 0 2px 1px #ffffffaa, inset 0 -2px 3px #0002, 0 4px 12px #ff3d9a66; }
:root body[data-theme="bubblegum"] .strip .tog.mute[aria-pressed="true"] { background: linear-gradient(#ff7aa0, #e8165a); color: #fff; box-shadow: inset 0 2px 1px #ffffffaa, inset 0 -2px 3px #0002, 0 4px 12px #ff3d9a66; }
:root body[data-theme="bubblegum"] .strip .well { background: var(--well); border-radius: 4px; box-shadow: none; }
:root body[data-theme="bubblegum"] .fader .groove { width: 10px; margin-left: calc(10px / -2); border-radius: 999px; background: linear-gradient(to top, var(--acc) calc(var(--p, 0) * 100%), #ffd0e6 0); box-shadow: none; border: 0; }
:root body[data-theme="bubblegum"] .fader .groove::before { display: none; }
:root body[data-theme="bubblegum"] .fader .thumb { border-radius: 0; background: radial-gradient(circle at 35% 28%, #fff 0 12%, transparent 13%), linear-gradient(#ff9ed2, #ff3d9a); box-shadow: none; filter: none; clip-path: none; }
:root body[data-theme="bubblegum"] .fader .thumb::before { content: none; }
:root body[data-theme="bubblegum"] .fader .thumb::after { content: ""; display: block; position: absolute; left: 4px; right: 4px; width: auto; top: calc(50% - 1px); height: 2px; margin: 0; border-radius: 1px; background: var(--acc); box-shadow: none; font-size: 0; transform: none; }
:root body[data-theme="bubblegum"] .strip .readout { font-family: "Fredoka", "Segoe UI", sans-serif; color: var(--ink); background: transparent; }
:root body[data-theme="bubblegum"] .theme-light { --ambient-base: radial-gradient(circle at 10% 10%, #fff8, transparent 30%), radial-gradient(circle at 90% 80%, #ffb8dc, transparent 40%), #ffd6ea; --ambient-accent: none; }
:root body[data-theme="bubblegum"] .fader .thumb { clip-path: path("M17 30 C 4 21, 0 13, 4 7 C 8 1, 15 3, 17 8 C 19 3, 26 1, 30 7 C 34 13, 30 21, 17 30 Z"); filter: drop-shadow(0 4px 6px #ff3d9a66); }
:root body[data-theme="bubblegum"] .fader .thumb::after { display: none; }
:root body[data-theme="bubblegum"] .brand-name { color: #ff3d9a; font-weight: 700; }
:root body[data-theme="bubblegum"] .theme-fx b { width: 10px; height: 10px; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; }

/* ---------------------------------------------------------------- Overclock */
/* A modern gaming PC: carbon-fibre panels with angled corners, an RGB light strip down each
   channel in its own colour, HUD brackets on the headers and angled fader caps. */
[data-theme="overclock"] {
  --bg: #06070a; --bay: transparent; --bay-edge: transparent; --bay-shadow: none;
  --mod-a: #14161d; --mod-b: #0e1015; --mod-edge: transparent; --mod-shadow: none;
  --key: #1c2029; --key-hi: #262b37; --key-edge: #2c3240; --key-ink: #b4bccd; --key-shadow: none;
  --well: #0a0b10; --flyout: #12141b; --line: #262a36;
  --ink: #eef1f7; --ink-2: #c3c9d6; --muted: #8b93a7;
  --amber: #00e5ff; --cyan: #7b5cff; --red: #ff3b5c; --solo: #ff2bd6; --on-ink: #06070a;
  --focus: #00e5ff; --panel-hi: #1c2029; --track: #1a1d26;
  --led-g: #2bff9a; --led-y: #ffe14d; --led-r: #ff3b5c;
  --led-g-off: #0d2119; --led-y-off: #231f0d; --led-r-off: #2a0d14;
  --scroll: #262a36; --scroll-hi: #3a4050;
  --field: #0a0b10; --rail: #0a0b10; --switch: #1a1d26;
  --cap-w: 34px; --cap-h: 16px;
  --pop-shadow: 0 0 0 1px #262a36, 0 18px 40px rgba(0, 0, 0, .6), 0 0 30px rgba(0, 229, 255, .08);
  --cap-metal: linear-gradient(180deg, #f3f6fb, #9aa3b5); --cap-ridge: transparent;
  --cap-shadow: none; --cap-ink: #06070a;
  --c-slate: #a3abc0; --c-amber: #ffb02e; --c-coral: #ff6a4d; --c-rose: #ff2bd6;
  --c-violet: #7b5cff; --c-blue: #3d7bff; --c-cyan: #00e5ff; --c-green: #2bff9a;
  --font: "Rajdhani", "Saira SC", "Segoe UI", system-ui, sans-serif;
  --r: 3px;
  --oc-cut: 10px;
}
body[data-theme="overclock"] {
  background-color: #06070a;
  background-image: linear-gradient(45deg, #101218 25%, transparent 25% 75%, #101218 75%), linear-gradient(45deg, #101218 25%, transparent 25% 75%, #101218 75%);
  background-size: 6px 6px; background-position: 0 0, 3px 3px;
}
:root body[data-theme="overclock"] .theme-light { --ambient-base: radial-gradient(ellipse at 18% -10%, #7b5cff40, transparent 55%), radial-gradient(ellipse at 100% 110%, #00e5ff2e, transparent 55%); --ambient-accent: none; }
/* Angled panels: two corners cut off, drawn with the background so anything that pops out beside a strip still shows. */
:root body[data-theme="overclock"] :is(.strip, .mini-row) {
  --oc-face: #12141b;
  border-radius: 0; box-shadow: none;
  background:
    linear-gradient(135deg, transparent var(--oc-cut), var(--oc-face) calc(var(--oc-cut) + .5px)) top left / 51% 51% no-repeat,
    linear-gradient(var(--oc-face), var(--oc-face)) top right / 50% 51% no-repeat,
    linear-gradient(-45deg, transparent var(--oc-cut), var(--oc-face) calc(var(--oc-cut) + .5px)) bottom right / 51% 50% no-repeat,
    linear-gradient(var(--oc-face), var(--oc-face)) bottom left / 50% 50% no-repeat;
}
:root body[data-theme="overclock"] :is(.strip, .mini-row):hover { --oc-face: #161922; }
/* The RGB strip down the left edge, in the channel's colour; a fainter one on the right. */
:root body[data-theme="overclock"] .strip::before {
  content: ""; position: absolute; left: 0; top: var(--oc-cut); bottom: 0; width: 3px; pointer-events: none;
  background: linear-gradient(180deg, var(--acc), color-mix(in srgb, var(--acc) 25%, transparent));
  box-shadow: 0 0 10px var(--acc), 0 0 2px var(--acc);
}
:root body[data-theme="overclock"] .strip::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: var(--oc-cut); width: 1px; pointer-events: none;
  background: color-mix(in srgb, var(--acc) 45%, transparent);
}
:root body[data-theme="overclock"] .strip.muted { --acc: var(--red); }
/* HUD brackets on the header corners, drawn as backgrounds so the header stays unpositioned and the app badge keeps its corner spot. */
:root body[data-theme="overclock"] .strip .head {
  --oc-br: color-mix(in srgb, var(--acc) 90%, transparent);
  background: linear-gradient(var(--oc-br), var(--oc-br)) left top / 8px 1.5px no-repeat, linear-gradient(var(--oc-br), var(--oc-br)) left top / 1.5px 8px no-repeat,
    linear-gradient(var(--oc-br), var(--oc-br)) right bottom / 8px 1.5px no-repeat, linear-gradient(var(--oc-br), var(--oc-br)) right bottom / 1.5px 8px no-repeat;
  padding-block: 4px;
}
:root body[data-theme="overclock"] :is(.strip .name, .mini-name, .brand-name, .group-head h2) { font-family: "Rajdhani", "Saira SC", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
:root body[data-theme="overclock"] .strip .name { font-size: 15px; }
:root body[data-theme="overclock"] .strip .sub { color: var(--muted); }
:root body[data-theme="overclock"] .group-head h2 { font-size: 12px; letter-spacing: .2em; color: var(--amber); }
:root body[data-theme="overclock"] .brand-name { letter-spacing: .1em; }
:root body[data-theme="overclock"] .app-stack { border-radius: 0; }
:root body[data-theme="overclock"] .strip { padding-top: 20px; }
:root body[data-theme="overclock"] .strip .head .chip { border-radius: 0; color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, #0e1015); box-shadow: none; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
/* Keys: small angled plates. */
:root body[data-theme="overclock"] :is(.btn, .route, .tog, .keys, select, .scene-list .load, .route-expand) {
  border-radius: 0; background: var(--key); color: var(--key-ink); box-shadow: none; text-transform: uppercase; letter-spacing: .06em;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
:root body[data-theme="overclock"] :is(.btn, .route, .tog):hover { background: var(--key-hi); color: var(--ink); }
:root body[data-theme="overclock"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="overclock"] .strip :is(.modes .tog, .tog.mono)[aria-pressed="true"] { background: var(--acc); color: var(--on-ink); }
:root body[data-theme="overclock"] .strip-routes .route.b[aria-pressed="true"] { background: #e8ecf4; color: var(--on-ink); }
:root body[data-theme="overclock"] .strip .tog.solo[aria-pressed="true"] { background: var(--solo); color: var(--on-ink); }
:root body[data-theme="overclock"] .strip .tog.mute[aria-pressed="true"] { background: var(--red); color: var(--on-ink); }
:root body[data-theme="overclock"] :is(.btn.primary, .btn[aria-pressed="true"], .update-btn) { background: var(--amber); color: var(--on-ink); }
:root body[data-theme="overclock"] .bar { background: #0f1117e6; box-shadow: inset 0 -1px 0 #262a36; }
/* Meters: thin bars like a performance monitor. */
:root body[data-theme="overclock"] .strip .well { background: var(--well); border-radius: 0; box-shadow: inset 0 0 0 1px #1a1d26; }
:root body[data-theme="overclock"] .meter { -webkit-mask: none; mask: none; border-radius: 0; }
:root body[data-theme="overclock"] .meter .unlit { background: #1a1d26; }
/* Fader: a hairline in the channel colour over fine tick marks, with an angled cap. */
:root body[data-theme="overclock"] .fader .groove {
  width: 2px; margin-left: -1px; border: 0; border-radius: 0;
  background: linear-gradient(to top, var(--acc) calc(var(--p, 0) * 100%), #2a2f3c 0);
  box-shadow: 0 0 8px color-mix(in srgb, var(--acc) 60%, transparent);
}
:root body[data-theme="overclock"] .fader .groove::before {
  content: ""; display: block; position: absolute; top: 0; bottom: 0; left: -8px; right: -8px; width: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; opacity: 1;
  background: repeating-linear-gradient(to bottom, #3a4050 0 1px, transparent 1px 12px) left / 5px 100% no-repeat, repeating-linear-gradient(to bottom, #3a4050 0 1px, transparent 1px 12px) right / 5px 100% no-repeat;
}
:root body[data-theme="overclock"] .fader .thumb {
  border-radius: 0; background: var(--cap-metal); box-shadow: none; filter: drop-shadow(0 3px 4px #000c);
  clip-path: polygon(0 50%, 22% 0, 78% 0, 100% 50%, 78% 100%, 22% 100%);
}
:root body[data-theme="overclock"] .fader .thumb::before { content: none; }
:root body[data-theme="overclock"] .fader .thumb::after { content: ""; display: block; position: absolute; left: 22%; right: 22%; width: auto; top: calc(50% - 1px); height: 2px; margin: 0; border-radius: 0; background: var(--acc); box-shadow: none; font-size: 0; transform: none; }
:root body[data-theme="overclock"] .fader.dragging .thumb { filter: drop-shadow(0 0 6px var(--acc)) drop-shadow(0 3px 4px #000c); box-shadow: none; }
:root body[data-theme="overclock"] .unity { background: var(--amber); opacity: .7; height: 1px; }
:root body[data-theme="overclock"] .scale span { color: var(--muted); font-size: 10px; }
:root body[data-theme="overclock"] .strip .readout { font-family: "Rajdhani", "Saira SC", sans-serif; font-weight: 700; font-size: 22px; color: var(--acc); background: transparent; text-shadow: 0 0 10px color-mix(in srgb, var(--acc) 55%, transparent); }
:root body[data-theme="overclock"] .muted .readout { color: var(--muted); text-shadow: none; }
:root body[data-theme="overclock"] .fader.h .track { border-radius: 0; background: linear-gradient(to right, color-mix(in srgb, var(--acc) 40%, transparent) calc(var(--cap-w) / 2 + (100% - var(--cap-w)) * var(--p, .8)), transparent 0), #0a0b10; box-shadow: inset 0 0 0 1px #262a36; }
:root body[data-theme="overclock"] .fader.h .thumb { border-radius: 0; clip-path: polygon(0 50%, 22% 0, 78% 0, 100% 50%, 78% 100%, 22% 100%); }
:root body[data-theme="overclock"] :is(.dlg, .menu) { border-radius: 0; box-shadow: var(--pop-shadow); }
:root body[data-theme="overclock"] .dlg-head h2 { font-family: "Rajdhani", "Saira SC", sans-serif; text-transform: uppercase; letter-spacing: .12em; }
:root body[data-theme="overclock"] .dlg::backdrop { background: rgba(3, 4, 8, .72); }
:root body[data-theme="overclock"] .wc { border-radius: 0; }
:root body[data-theme="overclock"] .wc:hover { background: var(--key-hi); color: var(--amber); }
:root body[data-theme="overclock"] .wc.close:hover { background: var(--red); color: var(--on-ink); }
:root body[data-theme="overclock"]:not([data-theme-motion="off"]) :is(.btn, .route, .tog):active { transform: scale(.94); }
/* Theme-picker sample. */
.theme-card[data-theme="overclock"] { border-radius: 2px; }
.theme-card[data-theme="overclock"] .tc-desk { border-radius: 0; background: linear-gradient(45deg, #101218 25%, transparent 25% 75%, #101218 75%) 0 0 / 6px 6px, linear-gradient(45deg, #101218 25%, transparent 25% 75%, #101218 75%) 3px 3px / 6px 6px, #06070a; }
.theme-card[data-theme="overclock"] .tc-mod { border-radius: 0; background: #12141b; box-shadow: inset 2px 0 0 #00e5ff; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.theme-card[data-theme="overclock"] .tc-mod + .tc-mod { box-shadow: inset 2px 0 0 #7b5cff; }
.theme-card[data-theme="overclock"] :is(.tc-keys i, .tc-mute, .tc-well) { border-radius: 0; }
.theme-card[data-theme="overclock"] .tc-cap { border-radius: 0; height: 6px; background: linear-gradient(180deg, #f3f6fb, #9aa3b5); clip-path: polygon(0 50%, 22% 0, 78% 0, 100% 50%, 78% 100%, 22% 100%); }
.theme-card[data-theme="overclock"] .tc-slot::before { width: 2px; margin-left: -1px; background: #00e5ff; }
/* Motion: the RGB strips slowly cycle colour (faster in Full). A muted strip's lights hold still. */
@media (prefers-reduced-motion: no-preference) {
  body[data-theme="overclock"]:not([data-theme-motion="off"]) .strip:not(.muted)::before,
  body[data-theme="overclock"]:not([data-theme-motion="off"]) .strip:not(.muted)::after { animation: oc-rgb 12s linear infinite; }
  body[data-theme="overclock"][data-theme-motion="full"] .strip:not(.muted)::before,
  body[data-theme="overclock"][data-theme-motion="full"] .strip:not(.muted)::after { animation-duration: 7s; }
}
@keyframes oc-rgb { to { filter: hue-rotate(360deg); } }

/* ---------------------------------------------------------------- Transit */
/* Station signage: white enamel signs on a tiled wall, each channel topped with its line colour.
   The fader is the line itself, with station dots up to the cap (an interchange marker) and a dashed
   line above it; a little train runs up to the cap. The toolbar is a black station sign. */
[data-theme="transit"] {
  --bg: #eceae4; --bay: transparent; --bay-edge: transparent; --bay-shadow: none;
  --mod-a: #ffffff; --mod-b: #ffffff; --mod-edge: transparent; --mod-shadow: 0 0 0 1px #d0cdc5, 0 6px 14px rgba(30, 30, 25, .12);
  --key: #efeee9; --key-hi: #e4e2dc; --key-edge: #d6d3cb; --key-ink: #3a3935; --key-shadow: none;
  --well: #e6e4de; --flyout: #ffffff; --line: #d6d3cb;
  --ink: #1b1b1b; --ink-2: #3a3935; --muted: #6b6a66;
  --amber: #e8502e; --cyan: #0a7ad1; --red: #d62d20; --solo: #8e4fc2; --on-ink: #ffffff;
  --focus: #0a7ad1; --panel-hi: #e4e2dc; --track: #e6e4de;
  --led-g: #00985f; --led-y: #f2a900; --led-r: #d62d20;
  --led-g-off: #e9e7e1; --led-y-off: #e9e7e1; --led-r-off: #e9e7e1;
  --glow: 0; --scroll: #c9c7c0; --scroll-hi: #a9a7a0;
  --field: #ffffff; --rail: #e6e4de; --switch: #d6d3cb;
  --cap-w: 24px; --cap-h: 24px;
  --pop-shadow: 0 0 0 1px #d0cdc5, 0 14px 32px rgba(30, 30, 25, .2);
  --cap-metal: #ffffff; --cap-ridge: transparent; --cap-shadow: 0 2px 5px rgba(0, 0, 0, .25); --cap-ink: #1b1b1b;
  --c-slate: #8a8984; --c-amber: #f2a900; --c-coral: #e8502e; --c-rose: #d6337f;
  --c-violet: #8e4fc2; --c-blue: #0a7ad1; --c-cyan: #00a3b4; --c-green: #00985f;
  --font: "Bahnschrift", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --warning-ink: #a3251b;
  color-scheme: light;
}
body[data-theme="transit"] {
  background-color: #eceae4;
  background-image: linear-gradient(#d6d3cb 1px, transparent 1px), linear-gradient(90deg, #d6d3cb 1px, transparent 1px);
  background-size: 30px 15px;
}
:root body[data-theme="transit"] .theme-light { --ambient-base: linear-gradient(180deg, rgba(255, 255, 255, .6), transparent 45%); --ambient-accent: none; }
:root body[data-theme="transit"] :is(.strip, .mini-row) { background: #fff; border-radius: 10px; box-shadow: var(--mod-shadow); }
:root body[data-theme="transit"] .strip { padding-top: 18px; }
:root body[data-theme="transit"] .strip::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 10px 10px 0 0; background: var(--acc); pointer-events: none; }
:root body[data-theme="transit"] .strip.muted { --acc: #9a9893; }
:root body[data-theme="transit"] :is(.strip .name, .mini-name, .brand-name) { font-family: var(--font); font-weight: 700; letter-spacing: -.01em; }
:root body[data-theme="transit"] .strip .name { font-size: 15px; }
:root body[data-theme="transit"] .strip .sub { color: var(--muted); }
:root body[data-theme="transit"] .group-head h2 { font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
:root body[data-theme="transit"] .strip .head .chip { border-radius: 50%; background: var(--acc); color: #fff; box-shadow: none; }
:root body[data-theme="transit"] :is(.strip-routes .route, .strip .tog, .route-expand) { border-radius: 999px; background: var(--key); color: var(--key-ink); box-shadow: none; font-weight: 700; }
:root body[data-theme="transit"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="transit"] .strip :is(.modes .tog, .tog.mono)[aria-pressed="true"] { background: var(--acc); color: #fff; }
/* White on a pale line colour (amber, lemon, mint...) was unreadable: pick black or white from the colour itself. */
:root body[data-theme="transit"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="transit"] .strip :is(.modes .tog, .tog.mono, .tog.eq)[aria-pressed="true"] { color: oklch(from var(--acc) clamp(0, (0.72 - l) * 1000, 1) 0 0); }
:root body[data-theme="transit"] .strip-routes .route.b[aria-pressed="true"] { background: var(--ink); color: #fff; }
:root body[data-theme="transit"] .strip .tog.solo[aria-pressed="true"] { background: var(--solo); color: #fff; }
:root body[data-theme="transit"] .strip .tog.mute[aria-pressed="true"] { background: var(--red); color: #fff; }
:root body[data-theme="transit"] .strip .tog.mute:not([aria-pressed="true"]) { background: var(--ink); color: #fff; }
:root body[data-theme="transit"] :is(.btn.primary, .btn[aria-pressed="true"], .update-btn) { background: var(--ink); color: #fff; box-shadow: none; }
/* The toolbar: a black station sign with white labels. */
:root body[data-theme="transit"] .bar { background: #1b1b1b; color: #fff; box-shadow: 0 2px 0 #00000026; }
:root body[data-theme="transit"] .bar .brand-name { color: #fff; }
:root body[data-theme="transit"] .bar .status { color: #ffffffcc; }
:root body[data-theme="transit"] .bar .status:is(:hover, :focus-visible) { color: #fff; background: #ffffff1f; border-color: #ffffff33; }
:root body[data-theme="transit"] .bar :is(.btn, .keys) { border-radius: 999px; background: #fff; color: #1b1b1b; box-shadow: none; font-weight: 700; }
:root body[data-theme="transit"] .bar :is(.btn, .keys):hover { background: #e4e2dc; }
:root body[data-theme="transit"] .bar .btn[aria-pressed="true"] { background: var(--amber); color: #fff; }
:root body[data-theme="transit"] .wc { color: #fff; border-radius: 6px; }
:root body[data-theme="transit"] .wc:hover { background: #ffffff26; }
:root body[data-theme="transit"] .wc.close:hover { background: var(--red); }
/* Meters: flat, like a departures board. */
:root body[data-theme="transit"] .strip .well { background: transparent; box-shadow: none; }
:root body[data-theme="transit"] .meter { -webkit-mask: none; mask: none; border-radius: 0; }
:root body[data-theme="transit"] .meter .unlit { background: var(--well); }
/* The line: coloured with white station dots up to the cap, dashed (not in service) above it. */
:root body[data-theme="transit"] .fader .groove {
  width: 6px; margin-left: -3px; border-radius: 3px; border: 0; box-shadow: none;
  background: linear-gradient(to top, var(--acc) calc(var(--p, 0) * 100%), transparent 0), repeating-linear-gradient(to bottom, #cfccc4 0 6px, transparent 6px 10px);
}
:root body[data-theme="transit"] .fader .groove::before {
  content: ""; display: block; position: absolute; left: 0; right: 0; bottom: 0; top: auto; width: auto; margin: 0; border: 0; box-shadow: none; opacity: 1; border-radius: 3px;
  height: calc(var(--p, 0) * 100%);
  background: radial-gradient(circle 2.5px at 50% 50%, #fff 0 1.7px, transparent 2.2px) center bottom / 6px 22px repeat-y;
}
:root body[data-theme="transit"] .strip.muted .fader .groove { background: repeating-linear-gradient(to bottom, #b9b7b0 0 6px, transparent 6px 10px); }
:root body[data-theme="transit"] .strip.muted .fader .groove::before { display: none; }
/* The cap: an interchange marker. */
:root body[data-theme="transit"] .fader .thumb { border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 4px #1b1b1b, 0 2px 5px rgba(0, 0, 0, .25); filter: none; clip-path: none; }
:root body[data-theme="transit"] .fader .thumb::before { content: none; }
:root body[data-theme="transit"] .fader .thumb::after { display: none; }
:root body[data-theme="transit"] .fader.dragging .thumb { box-shadow: inset 0 0 0 4px #1b1b1b, 0 0 0 4px color-mix(in srgb, var(--acc) 45%, transparent), 0 4px 10px rgba(0, 0, 0, .3); }
:root body[data-theme="transit"] .unity { background: var(--ink); opacity: .35; }
:root body[data-theme="transit"] .scale span { color: var(--muted); }
:root body[data-theme="transit"] .strip .readout { font-family: var(--font); font-weight: 700; color: var(--ink); background: transparent; }
:root body[data-theme="transit"] .fader.h .track { border-radius: 3px; background: linear-gradient(to right, var(--acc) calc(var(--cap-w) / 2 + (100% - var(--cap-w)) * var(--p, .8)), #e6e4de 0); box-shadow: none; }
:root body[data-theme="transit"] .fader.h .thumb { border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 4px #1b1b1b, 0 2px 5px rgba(0, 0, 0, .25); color: transparent; }
:root body[data-theme="transit"] :is(.dlg, .menu) { border-radius: 12px; box-shadow: var(--pop-shadow); }
:root body[data-theme="transit"] .dlg { border-top: 6px solid var(--amber); }
:root body[data-theme="transit"] .dlg::backdrop { background: rgba(40, 38, 34, .35); }
.theme-card[data-theme="transit"] { border-radius: 10px; background: #fff; }
.theme-card[data-theme="transit"] .tc-desk { border-radius: 8px; background: linear-gradient(#d6d3cb 1px, transparent 1px) 0 0 / 14px 7px, linear-gradient(90deg, #d6d3cb 1px, transparent 1px) 0 0 / 14px 7px, #eceae4; }
.theme-card[data-theme="transit"] .tc-mod { border-radius: 6px; background: #fff; box-shadow: inset 0 3px 0 #e8502e, 0 0 0 1px #d0cdc5; }
.theme-card[data-theme="transit"] .tc-mod + .tc-mod { box-shadow: inset 0 3px 0 #0a7ad1, 0 0 0 1px #d0cdc5; }
.theme-card[data-theme="transit"] .tc-cap { border-radius: 50%; width: 9px; height: 9px; margin-left: -4.5px; background: #fff; box-shadow: inset 0 0 0 2px #1b1b1b; }
.theme-card[data-theme="transit"] .tc-slot::before { width: 3px; margin-left: -1.5px; background: #e8502e; border-radius: 2px; }
.theme-card[data-theme="transit"] :is(.tc-keys i, .tc-mute) { border-radius: 99px; }

/* An old spellbook: tooled leather panels with a brass border line and corner studs, names on
   parchment labels, glowing rune meters in each channel's colour and red wax-seal fader caps.
   Embers drift up behind the book. Mute stamps the key in wax and the page goes dark. */
/* Rune meters: glowing segments in the channel's colour, red past 0 dB. */
/* A carved groove with a glowing thread, and a red wax seal for the cap. */
/* Embers rising behind the book (app.js fills .theme-fx). */

/* Motion for Transit: the little train runs up each line (slower in Subtle). */
@media (prefers-reduced-motion: no-preference) {
  body[data-theme="transit"][data-theme-motion="full"] .strip:not(.muted) .fader .groove::after {
    content: ""; position: absolute; left: -1px; width: 8px; height: 14px; bottom: 0; border-radius: 4px 4px 2px 2px; pointer-events: none;
    background: #1b1b1b; box-shadow: inset 0 3px 0 #ffffff55, 0 0 0 1.5px #fff; animation: transit-train 9s ease-in-out infinite;
  }
  body[data-theme="transit"][data-theme-motion="full"] .strip:not(.muted) .fader .groove::after { animation-duration: 6s; }
  body[data-theme="transit"][data-theme-motion="full"] .strip:nth-child(3n + 2) .fader .groove::after { animation-delay: -2s; }
  body[data-theme="transit"][data-theme-motion="full"] .strip:nth-child(3n + 3) .fader .groove::after { animation-delay: -4s; }
}
@keyframes transit-train {
  0% { bottom: 0; opacity: 0; } 8% { opacity: 1; }
  80% { bottom: max(0px, calc(var(--p, 0) * 100% - 20px)); opacity: 1; }
  92%, 100% { bottom: max(0px, calc(var(--p, 0) * 100% - 20px)); opacity: 0; }
}

/* ------------------------------------------------------------------ Motion */
@media (prefers-reduced-motion: no-preference) {
  /* Subtle and Full */
  body:not([data-theme-motion="off"])[data-theme="glass"] :is(.theme-light, .glass-aurora)::before { animation: ambient-drift 30s ease-in-out infinite alternate; }
  body[data-theme="oled"][data-theme-motion="full"] .strip::after { animation: fx-oled-sweep 5s linear infinite; }
  body[data-theme="neon"][data-theme-motion="full"] .theme-light::after { animation: fx-neon-floor 2.6s linear infinite; }
  body[data-theme="terminal"][data-theme-motion="full"] .theme-light::after { animation: fx-scanline 6s linear infinite; }
  body[data-theme="arcade"]:not([data-theme-motion="off"]) .route[aria-pressed="true"] { animation: mk-coin 1.4s steps(2) infinite; }
  body[data-theme="arcade"]:not([data-theme-motion="off"]) .theme-fx b { animation: mk-fall var(--d) steps(24) infinite; animation-delay: var(--dl); }
  body[data-theme="block"]:not([data-theme-motion="off"]) .strip:hover { animation: mk-wobble .5s ease; }
  body[data-theme="bubblegum"]:not([data-theme-motion="off"]) .theme-fx b { animation: mk-twinkle var(--d) ease-in-out infinite; animation-delay: var(--dl); }
  body[data-theme="bubblegum"]:not([data-theme-motion="off"]) .tog.mute[aria-pressed="true"] { animation: mk-pop 1.6s ease-in-out infinite; }
  body[data-theme="glass"]:not([data-theme-motion="off"]) .route[aria-pressed="true"]::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, #ffffff9a 50%, transparent 70%); animation: mk-sheen 5s ease-in-out infinite; pointer-events: none; }
  /* Full only */
  body[data-theme="neon"][data-theme-motion="full"] .brand-name { animation: mk-flicker 6s steps(1) infinite; }
  body[data-theme="block"][data-theme-motion="full"] .theme-light::after { animation: mk-halftone 16s linear infinite; }
}
/* Particles only show in the themes and motion levels that animate them. */
body:not([data-theme="arcade"], [data-theme="bubblegum"], [data-theme="abyss"], [data-theme="aero"]) .theme-fx { display: none; }
@media (prefers-reduced-motion: reduce) { .theme-fx { display: none !important; } }

@keyframes mk-sweep { from { left: -40%; } to { left: 100%; } }
@keyframes mk-breathe { from { opacity: .7; } to { opacity: 1; } }
@keyframes mk-grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-1px, 1px); } 66% { transform: translate(1px, -1px); } }
@keyframes mk-floor { to { background-position: 0 26px, 0 0; } }
@keyframes mk-roll { from { top: -30%; } to { top: 100%; } }
@keyframes mk-coin { 50% { filter: brightness(1.35); } }
@keyframes mk-fall { from { transform: translateY(0); } to { transform: translateY(110vh); } }
@keyframes mk-wobble { 30% { transform: rotate(-1.2deg); } 60% { transform: rotate(.8deg); } }
@keyframes mk-twinkle { 0%, 100% { transform: scale(.2); opacity: 0; } 50% { transform: scale(1); opacity: 1; } }
@keyframes mk-pop { 50% { transform: scale(1.06); } }
@keyframes mk-sheen { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes mk-flicker { 0%, 92%, 96%, 100% { opacity: 1; } 93%, 95% { opacity: .35; } }
@keyframes mk-rise { from { transform: translateY(0); } to { transform: translate(14px, -110vh); } }
@keyframes mk-halftone { to { transform: translate(14px, 14px); } }

/* ---------------------------------------------------------------- Mini mode and the tray panel
 * The makeover's cap rules above were written for the upright fader. On the sideways fader the
 * level is printed on the cap, so their index line and the old pale label chip struck it through.
 * Keys that stay pressed (Keep on top, Docked) also lost their fill to the themed bar keys. */
:root body[data-theme] .fader.h .thumb::after { display: none; }
:root body[data-theme] .fader.h .db { background: none; }
:root body[data-theme="oled"] .fader.h .db { color: var(--ink); }
/* Round caps stay round: the sideways track is 30px tall. */
:root body[data-theme="transit"] .fader.h { --cap-w: 30px; }
:root body[data-theme="transit"] .fader.h .thumb { top: 0; bottom: 0; }
/* No headroom above a sideways pot for its seedling. */
:root body[data-theme] .bar :is(#pinBtn, #dockBtn)[aria-pressed="true"] { background: var(--amber); color: var(--on-ink); }
/* Themes without a bay around the rows: leave room above the first row for its outline, scallops or glow. */
:root body:is([data-theme="neon"], [data-theme="terminal"], [data-theme="arcade"], [data-theme="block"], [data-theme="bubblegum"]) .mini-view { padding-top: 6px; }

/* ====================================================================== Premium themes (0.22)
 * Graphite, Halo and Nordic, matched to the approved mock-ups (preview/theme-concepts.html).
 * Each block sets the theme's tokens first (they also colour its Settings card and dialogs),
 * then the materials. Motion follows Theme motion and Windows reduced motion like the others. */
:root {
  --sm-noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------------------------------------------------------------- Graphite */
/* The default, kept calm and current: flat charcoal cards with a hairline edge, tinted icon tiles,
   soft keys that take a wash of the channel's colour when on, smooth meters, pill-shaped fader caps
   with the channel's colour across them, and one periwinkle accent. No textures and no glow, so it
   is cheap to draw and easy to sit next to all day. Type is Segoe UI Variable, which Windows 11 has;
   Windows 10 falls back to Segoe UI. */
[data-theme="graphite"] {
  --bg: #111215; --bay: #ffffff05; --bay-edge: #ffffff0a; --bay-shadow: none;
  --mod-a: #1d1e23; --mod-b: #18191d; --mod-edge: #ffffff0f; --mod-shadow: 0 10px 24px -14px #000;
  --key: #24252b; --key-hi: #2c2d34; --key-edge: transparent; --key-ink: #a4a6b2; --key-shadow: none;
  --well: #0e0f12; --flyout: #1b1c21fa; --line: #ffffff12;
  --ink: #ececf1; --ink-2: #c5c7d0; --muted: #868895;
  --amber: #7b93ff; --cyan: #3ddc97; --red: #ff5c6c; --solo: #ffb455; --on-ink: #0b0d18;
  --focus: #8ea3ff; --panel-hi: #24252b; --track: #26272d;
  --led-g: #3ddc97; --led-y: #f5c451; --led-r: #ff5c6c;
  --led-g-off: #26272d; --led-y-off: #26272d; --led-r-off: #2e2629;
  --glow: .15; --scroll: #2a2b31; --scroll-hi: #3a3b43;
  --field: #16171b; --rail: #26272d; --switch: #2c2d34;
  --cap-w: 34px; --cap-h: 18px;
  --pop-shadow: 0 0 0 1px #ffffff14, 0 24px 50px #000c;
  --cap-metal: #f4f4f7; --cap-ridge: transparent; --cap-shadow: 0 2px 8px #000b, 0 0 0 1px #0006; --cap-ink: #15161a;
  --c-slate: #a4a9b8; --c-amber: #ffb455; --c-coral: #ff8a65; --c-rose: #ff7a8a;
  --c-violet: #a98bff; --c-blue: #7b93ff; --c-cyan: #4fd1e8; --c-green: #3ddc97;
  --font: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, sans-serif;
  --gr-display: "Segoe UI Variable Display", "Segoe UI", Inter, system-ui, sans-serif;
  --warning-ink: #ffd27a;
}
:root body[data-theme="graphite"] { background: #111215; }
:root body[data-theme="graphite"] .theme-light {
  --ambient-base: radial-gradient(ellipse 60% 40% at 50% -12%, #7b93ff17, transparent 70%), linear-gradient(180deg, #131418, #0f1013);
  --ambient-accent: none;
}
/* Cards: flat charcoal with a hairline edge and the faintest top light. */
:root body[data-theme="graphite"] :is(.strip, .mini-row) {
  border-radius: 16px; background: linear-gradient(180deg, var(--mod-a), var(--mod-b));
  box-shadow: inset 0 0 0 1px #ffffff0f, inset 0 1px 0 #ffffff0d, var(--mod-shadow);
}
:root body[data-theme="graphite"] .mini-row { border-radius: 12px; }
:root body[data-theme="graphite"] :is(.strip, .mini-row):hover { background: linear-gradient(180deg, #202127, #1a1b20); box-shadow: inset 0 0 0 1px #ffffff1a, inset 0 1px 0 #ffffff12, var(--mod-shadow); }
:root body[data-theme="graphite"] .group { border-radius: 20px; }
:root body[data-theme="graphite"] .group-head h2 { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
:root body[data-theme="graphite"] :is(.strip .name, .mini-name, .brand-name, .dlg-head h2) { font-family: var(--gr-display); font-weight: 600; letter-spacing: -.01em; }
:root body[data-theme="graphite"] .strip .name { font-size: 15px; }
:root body[data-theme="graphite"] .strip .sub { color: var(--muted); }
:root body[data-theme="graphite"] .strip.muted :is(.name, .readout) { color: #6d6f7a; }
/* The channel icon: a tile tinted with the channel's colour. */
:root body[data-theme="graphite"] :is(.strip .head .chip, .mini-row .chip) {
  border-radius: 9px; color: var(--acc); background: color-mix(in srgb, var(--acc) 15%, transparent); box-shadow: none;
}
:root body[data-theme="graphite"] button.chip:hover { background: color-mix(in srgb, var(--acc) 24%, transparent); }
:root body[data-theme="graphite"] .strip.muted .head .chip { color: #868895; background: #ffffff0d; }
/* Keys: soft and flat. An on key takes a wash of its colour with a matching edge. */
:root body[data-theme="graphite"] :is(.btn, .route, .tog, .keys, select, .scene-list .load, .route-expand) {
  border-radius: 8px; background: var(--key); color: var(--key-ink); box-shadow: none; font-weight: 600;
}
:root body[data-theme="graphite"] :is(.btn, .route, .tog, .keys):not([aria-pressed="true"]):hover { background: var(--key-hi); color: var(--ink); }
:root body[data-theme="graphite"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="graphite"] :is(.strip, .mini-row) :is(.modes .tog, .tog.mono, .tog.eq)[aria-pressed="true"] {
  --lp: var(--amber); color: color-mix(in srgb, var(--lp) 45%, #fff); background: color-mix(in srgb, var(--lp) 22%, var(--key)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lp) 50%, transparent);
}
:root body[data-theme="graphite"] .strip-routes .route.b[aria-pressed="true"] {
  --lp: var(--cyan); color: color-mix(in srgb, var(--lp) 45%, #fff); background: color-mix(in srgb, var(--lp) 18%, var(--key)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lp) 45%, transparent);
}
:root body[data-theme="graphite"] :is(.strip, .mini-row) .tog.solo[aria-pressed="true"] { color: #ffd29a; background: color-mix(in srgb, var(--solo) 20%, var(--key)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--solo) 50%, transparent); }
:root body[data-theme="graphite"] :is(.strip, .mini-row) .tog.mute[aria-pressed="true"] { color: #ff9aa4; background: color-mix(in srgb, var(--red) 18%, var(--key)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 50%, transparent); }
:root body[data-theme="graphite"] :is(.btn.primary, .btn[aria-pressed="true"], .update-btn) { color: var(--on-ink); background: var(--amber); box-shadow: none; }
:root body[data-theme="graphite"] :is(.btn.primary, .update-btn):hover { background: #96a9ff; }
:root body[data-theme="graphite"] .bar { background: #111215e6; box-shadow: inset 0 -1px 0 #ffffff0d; }
/* Meters: smooth, rounded bars with a quiet track. */
:root body[data-theme="graphite"] .strip .well { border-radius: 8px; background: var(--well); box-shadow: inset 0 0 0 1px #ffffff0a; }
:root body[data-theme="graphite"] .meter { -webkit-mask: none; mask: none; border-radius: 3px; }
:root body[data-theme="graphite"] .meter .pk i { background: #ffffffd9; height: 2px; border-radius: 1px; box-shadow: none; }
/* Fader: a thin track filled in the channel's colour up to a white pill cap with a colour bar across it. */
:root body[data-theme="graphite"] .fader .groove {
  width: 4px; margin-left: -2px; border: 0; border-radius: 2px; box-shadow: none;
  background: linear-gradient(to top, var(--acc) calc(var(--p, 0) * 100%), var(--track) 0);
}
:root body[data-theme="graphite"] .fader .groove::before { display: none; }
:root body[data-theme="graphite"] .muted .fader .groove { background: linear-gradient(to top, #4a4b54 calc(var(--p, 0) * 100%), var(--track) 0); }
:root body[data-theme="graphite"] .fader .thumb { border-radius: 999px; clip-path: none; filter: none; background: var(--cap-metal); box-shadow: var(--cap-shadow); }
:root body[data-theme="graphite"] .fader .thumb::before { content: none; }
:root body[data-theme="graphite"] .fader:not(.h) .thumb::after { left: 11px; right: 11px; width: auto; top: calc(50% - 1.5px); height: 3px; margin: 0; border-radius: 2px; background: var(--acc); box-shadow: none; transform: none; font-size: 0; }
:root body[data-theme="graphite"] .muted .fader .thumb { background: #b9bac2; }
:root body[data-theme="graphite"] .muted .fader .thumb::after { background: #6d6f7a; }
:root body[data-theme="graphite"] .fader.dragging .thumb { box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 45%, transparent), 0 4px 12px #000c; }
:root body[data-theme="graphite"] .unity { background: #ffffff; opacity: .18; }
:root body[data-theme="graphite"] .scale span { color: #6d6f7a; font-size: 10px; }
:root body[data-theme="graphite"] .scale span.zero { color: var(--ink-2); }
:root body[data-theme="graphite"] .strip .readout { font-family: var(--gr-display); font-weight: 600; font-size: 21px; color: var(--ink); background: transparent; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
:root body[data-theme="graphite"] .strip .readout:hover { background: #ffffff0d; }
/* Mini mode and the tray panel: a soft track and a pill that carries the level. */
:root body[data-theme="graphite"] .fader.h .track { border-radius: 8px; background: linear-gradient(to right, color-mix(in srgb, var(--acc) 28%, transparent) calc(var(--cap-w) / 2 + (100% - var(--cap-w)) * var(--p, .8)), transparent 0), var(--well); box-shadow: inset 0 0 0 1px #ffffff0d; }
:root body[data-theme="graphite"] .fader.h .thumb { border-radius: 999px; background: var(--cap-metal); box-shadow: var(--cap-shadow); color: var(--cap-ink); }
:root body[data-theme="graphite"] .fader.h .db { color: var(--cap-ink); font-weight: 600; }
/* Dialogs, menus and window buttons. */
:root body[data-theme="graphite"] :is(.dlg, .menu) { border-radius: 16px; background: var(--flyout); box-shadow: var(--pop-shadow); }
:root body[data-theme="graphite"] .dlg::backdrop { background: rgba(5, 6, 9, .65); backdrop-filter: blur(3px); }
:root body[data-theme="graphite"] .wc:hover { background: var(--key-hi); color: var(--ink); }
:root body[data-theme="graphite"] .wc.close:hover { background: #e5404f; color: #fff; }
/* Theme-picker sample. */
.theme-card[data-theme="graphite"] .tc-desk { background: radial-gradient(ellipse 80% 60% at 50% -20%, #7b93ff26, transparent 70%), #111215; }
.theme-card[data-theme="graphite"] .tc-mod { border-radius: 7px; background: #1d1e23; box-shadow: inset 0 0 0 1px #ffffff14; }
.theme-card[data-theme="graphite"] :is(.tc-keys i, .tc-mute) { border-radius: 3px; background: #2c2d34; box-shadow: none; }
.theme-card[data-theme="graphite"] .tc-keys i.on.a { background: #7b93ff66; }
.theme-card[data-theme="graphite"] .tc-keys i.on.b { background: #3ddc9759; }
.theme-card[data-theme="graphite"] .tc-mute.on { background: #ff5c6c59; }
.theme-card[data-theme="graphite"] .tc-cap { height: 5px; border-radius: 3px; background: #f4f4f7; box-shadow: none; }
.theme-card[data-theme="graphite"] .tc-slot::before { width: 2px; margin-left: -1px; background: #7b93ff; }

/* ---------------------------------------------------------------- Halo */
/* An eclipse: near-black, with one ring of light arcing over the window. Smoked-glass cards, a beam
   that keeps tracing each card's edge, and fader caps that are halos ringed in the channel's
   colour. The overhaul block at the end of the file finishes the look. Theme motion: Full moves the
   beams faster, Subtle slows them, Off holds still. */
@property --halo-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
[data-theme="halo"] {
  --bg: #07070b; --bay: transparent; --bay-edge: transparent; --bay-shadow: none;
  --mod-a: #ffffff14; --mod-b: #ffffff05; --mod-edge: #ffffff24; --mod-shadow: 0 24px 44px -18px #000c;
  --key: #ffffff0d; --key-hi: #ffffff1c; --key-edge: #ffffff14; --key-ink: #b4b8cc; --key-shadow: none;
  --well: #ffffff0a; --flyout: #15121fe8; --line: #ffffff1a;
  --ink: #f4f5fa; --ink-2: #d6d8e6; --muted: #9195ab;
  --amber: #8b6cff; --cyan: #2fa6ff; --red: #ff4f7b; --solo: #3da9ff; --on-ink: #ffffff;
  --focus: #a993ff; --panel-hi: #ffffff14; --track: #ffffff12;
  --led-g: #3aa8ff; --led-y: #9b7bff; --led-r: #ff4fd8;
  --led-g-off: #ffffff0d; --led-y-off: #ffffff0d; --led-r-off: #ffffff0d;
  --glow: 1; --scroll: #ffffff1f; --scroll-hi: #ffffff33;
  --field: #ffffff0a; --rail: #ffffff0f; --switch: #ffffff1a;
  --cap-w: 24px; --cap-h: 24px;
  --pop-shadow: 0 0 0 1px #ffffff17, 0 30px 70px #000000b0;
  --cap-metal: radial-gradient(circle at 38% 30%, #fff, #eae6ff 70%); --cap-ridge: transparent;
  --cap-shadow: 0 6px 12px #000a; --cap-ink: #1a1430;
  --c-slate: #b9bdd6; --c-amber: #ffb86b; --c-coral: #ff7a8a; --c-rose: #ff4fd8;
  --c-violet: #8b6cff; --c-blue: #2fa6ff; --c-cyan: #3de0ff; --c-green: #3dffb0;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --warning-ink: #ffd27a;
}
:root body[data-theme="halo"] { background: #06060a; }
/* The light: the Glass mesh, retuned to deep violet, blue and magenta and kept low so cards read cleanly. */
:root body[data-theme="halo"] .theme-light { display: block; background: none; }
:root body[data-theme="halo"] .theme-light::before { display: none; }
:root body[data-theme="halo"] .theme-light::after { content: ""; position: absolute; inset: 0; background: var(--sm-noise); opacity: .18; mix-blend-mode: overlay; }
/* Cards. */
:root body[data-theme="halo"] :is(.strip, .mini-row) {
  border-radius: 18px; background: linear-gradient(180deg, var(--mod-a), var(--mod-b));
  box-shadow: inset 0 1px 0 #ffffff24, 0 0 0 1px #ffffff12, var(--mod-shadow);
}
:root body[data-theme="halo"] .mini-row { border-radius: 12px; }
:root body[data-theme="halo"] :is(.strip, .mini-row):hover { background: linear-gradient(180deg, #ffffff1c, #ffffff08); }
:root body[data-theme="halo"] .strip::before {
  content: ""; position: absolute; inset: -1px; border-radius: 19px; padding: 1.2px; pointer-events: none; z-index: 0;
  background: conic-gradient(from var(--halo-a), transparent 0 66%, #7c5cff 76%, #2fa6ff 85%, #ff4fd8 93%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
:root body[data-theme="halo"] .strip:nth-child(4n + 2)::before { --halo-a: 90deg; }
:root body[data-theme="halo"] .strip:nth-child(4n + 3)::before { --halo-a: 180deg; }
:root body[data-theme="halo"] .strip:nth-child(4n + 4)::before { --halo-a: 270deg; }
:root body[data-theme="halo"] .strip.muted::before { background: conic-gradient(from var(--halo-a), transparent 0 70%, #ff4f7b 84%, #ff4fd8 92%, transparent 100%); opacity: .7; }
:root body[data-theme="halo"] .strip.muted { background: linear-gradient(180deg, #ffffff0d, #ffffff03); }
:root body[data-theme="halo"] .group-head h2 { color: #c6b8ff; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 11px; }
:root body[data-theme="halo"] :is(.strip .name, .mini-name, .brand-name, .dlg-head h2) { font-family: var(--font); font-weight: 600; letter-spacing: -.01em; }
:root body[data-theme="halo"] .strip .name { font-size: 15px; }
:root body[data-theme="halo"] .strip .sub { color: var(--muted); }
:root body[data-theme="halo"] .brand-name { background: linear-gradient(90deg, #fff, #c6b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root body[data-theme="halo"] .brand-mark { filter: drop-shadow(0 0 8px #8b6cffcc); }
/* The channel icon: a small gradient tile in the channel's colour. */
:root body[data-theme="halo"] .strip .head .chip, :root body[data-theme="halo"] .mini-row .chip {
  border-radius: 9px; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--acc) 90%, #fff), color-mix(in srgb, var(--acc) 70%, #3a1aa0));
  box-shadow: inset 0 1px 0 #ffffff59, 0 6px 16px color-mix(in srgb, var(--acc) 45%, transparent);
}
/* Keys. */
:root body[data-theme="halo"] :is(.btn, .route, .tog, .keys, select, .scene-list .load, .route-expand) {
  border-radius: 10px; background: var(--key); color: var(--key-ink); box-shadow: inset 0 0 0 1px #ffffff17;
}
:root body[data-theme="halo"] :is(.btn, .route, .tog, .keys):hover { background: var(--key-hi); color: var(--ink); }
:root body[data-theme="halo"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="halo"] :is(.strip, .mini-row) :is(.modes .tog, .tog.mono)[aria-pressed="true"] {
  color: #fff; background: linear-gradient(135deg, #8b6cff, #5a7bff); box-shadow: inset 0 1px 0 #ffffff4d, 0 6px 18px #7c5cff66;
}
:root body[data-theme="halo"] .strip-routes .route.b[aria-pressed="true"] { color: #fff; background: linear-gradient(135deg, #1f7fe0, #1592c0); box-shadow: inset 0 1px 0 #ffffff4d, 0 6px 18px #2fa6ff59; }
:root body[data-theme="halo"] :is(.strip, .mini-row) .tog.solo[aria-pressed="true"] { color: #fff; background: linear-gradient(135deg, #8b6cff, #2fa6ff); box-shadow: inset 0 1px 0 #ffffff4d, 0 8px 20px #7c5cff80; }
:root body[data-theme="halo"] :is(.strip, .mini-row) .tog.mute[aria-pressed="true"] { color: #fff; background: linear-gradient(135deg, #ff4f7b, #ff4fd8); box-shadow: inset 0 1px 0 #ffffff4d, 0 8px 20px #ff4fa080; }
:root body[data-theme="halo"] :is(.btn.primary, .btn[aria-pressed="true"], .update-btn) { color: #fff; background: linear-gradient(135deg, #8b6cff, #2fa6ff); box-shadow: inset 0 1px 0 #ffffff4d, 0 6px 18px #7c5cff59; }
:root body[data-theme="halo"] .bar { position: relative; z-index: 24; background: #0b0a12a6; backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); box-shadow: inset 0 -1px 0 #ffffff12; }
:root body[data-theme="halo"] .bar .status:hover { background: var(--key-hi); }
/* Meters: smooth glowing gradients, blue to violet to magenta. */
:root body[data-theme="halo"] .strip .well { border-radius: 999px; background: #ffffff08; box-shadow: inset 0 1px 2px #0006, inset 0 0 0 1px #ffffff0d; }
:root body[data-theme="halo"] .meter { -webkit-mask: none; mask: none; border-radius: 999px; }
:root body[data-theme="halo"] .meter .unlit { background: #ffffff0a; }
:root body[data-theme="halo"] .meter .lit b { background: linear-gradient(to top, #2fa6ff, #7c5cff var(--p-zero), #ff4fd8); }
:root body[data-theme="halo"] .fader.h .meter .lit b { background: linear-gradient(to right, #2fa6ff, #7c5cff var(--p-zero), #ff4fd8); }
:root body[data-theme="halo"] .meter .pk i { background: #fff; box-shadow: 0 0 8px #fff; height: 2px; border-radius: 1px; }
/* Fader: a glowing line in the channel's colour, and a bright bead with a halo. */
:root body[data-theme="halo"] .fader .groove {
  width: 6px; margin-left: -3px; border: 0; border-radius: 999px;
  background: linear-gradient(to top, color-mix(in srgb, var(--acc) 60%, #2fa6ff), var(--acc) calc(var(--p, 0) * 100%), var(--track) 0);
  box-shadow: 0 0 14px color-mix(in srgb, var(--acc) 55%, transparent);
}
:root body[data-theme="halo"] .fader .groove::before { display: none; }
:root body[data-theme="halo"] .muted .fader .groove { background: linear-gradient(to top, #ffffff26, #ffffff40 calc(var(--p, 0) * 100%), var(--track) 0); box-shadow: none; }
:root body[data-theme="halo"] .fader .thumb {
  border-radius: 50%; clip-path: none; filter: none; background: var(--cap-metal);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--acc) 32%, transparent), 0 0 24px color-mix(in srgb, var(--acc) 90%, transparent), var(--cap-shadow);
}
:root body[data-theme="halo"] .muted .fader .thumb { box-shadow: 0 0 0 5px #ffffff14, var(--cap-shadow); }
:root body[data-theme="halo"] .fader .thumb::before { content: none; }
:root body[data-theme="halo"] .fader:not(.h) .thumb::after { display: none; }
:root body[data-theme="halo"] .fader.dragging .thumb { box-shadow: 0 0 0 7px color-mix(in srgb, var(--acc) 45%, transparent), 0 0 34px var(--acc), var(--cap-shadow); }
:root body[data-theme="halo"] .unity { background: #fff; opacity: .3; }
:root body[data-theme="halo"] .scale span { color: #7d8198; font-size: 10px; }
:root body[data-theme="halo"] .scale span.zero { color: var(--ink); }
:root body[data-theme="halo"] .strip .readout { font-family: var(--font); font-weight: 600; font-size: 19px; letter-spacing: -.01em; color: var(--ink); background: transparent; text-shadow: 0 0 16px color-mix(in srgb, var(--acc) 70%, transparent); }
:root body[data-theme="halo"] .muted .readout { text-shadow: none; }
:root body[data-theme="halo"] .fader.h .track { border-radius: 999px; background: linear-gradient(to right, color-mix(in srgb, var(--acc) 45%, transparent) calc(var(--cap-w) / 2 + (100% - var(--cap-w)) * var(--p, .8)), transparent 0), #ffffff0a; box-shadow: inset 0 0 0 1px #ffffff12; }
:root body[data-theme="halo"] .fader.h { --cap-w: 44px; }
:root body[data-theme="halo"] .fader.h .thumb { border-radius: 999px; background: #fff; color: var(--cap-ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 30%, transparent), 0 0 18px color-mix(in srgb, var(--acc) 70%, transparent); }
:root body[data-theme="halo"] .fader.h .db { color: var(--cap-ink); }
/* Dialogs, menus and window buttons: frosted glass. */
:root body[data-theme="halo"] :is(.dlg, .menu) { border-radius: 20px; background: var(--flyout); backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5); box-shadow: inset 0 1px 0 #ffffff1f, var(--pop-shadow); }
:root body[data-theme="halo"] .dlg::backdrop { background: rgba(5, 4, 12, .6); backdrop-filter: blur(6px); }
:root body[data-theme="halo"] .wc { border-radius: 10px; }
:root body[data-theme="halo"] .wc:hover { background: var(--key-hi); }
:root body[data-theme="halo"] .wc.close:hover { background: linear-gradient(135deg, #ff4f7b, #ff4fd8); color: #fff; }
/* Theme-picker sample. */
.theme-card[data-theme="halo"] .tc-desk { background: radial-gradient(60% 70% at 10% 0%, #7c5cff88, transparent 70%), radial-gradient(55% 60% at 100% 40%, #1f9dff70, transparent 70%), radial-gradient(50% 40% at 50% 120%, #ff4fd870, transparent 70%), #07070b; }
.theme-card[data-theme="halo"] .tc-mod { border-radius: 7px; background: #ffffff14; box-shadow: inset 0 1px 0 #ffffff30, 0 0 0 1px #ffffff1a; }
.theme-card[data-theme="halo"] .tc-cap { width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #8b6cff66, 0 0 6px #8b6cff; }
.theme-card[data-theme="halo"] .tc-slot::before { width: 2px; margin-left: -1px; background: linear-gradient(to top, #2fa6ff, #8b6cff); border-radius: 2px; }
.theme-card[data-theme="halo"] :is(.tc-keys i, .tc-mute) { border-radius: 3px; }

/* ---------------------------------------------------------------- Nordic */
/* Warm Scandinavian materials: sage wool-felt channels on a soft linen-white room, linen keys,
   solid oak fader knobs and an oak shelf under each group. Calm and light; mute and solo use
   terracotta and charcoal. Morning light drifts across the room (Subtle and Full). */
[data-theme="nordic"] {
  --bg: #ebe6de; --bay: #f7f4ef8c; --bay-edge: #ffffffb3; --bay-shadow: inset 0 1px 0 #ffffffcc, 0 1px 3px #6b5a4214;
  --mod-a: #fdfbf8; --mod-b: #f3efe8; --mod-edge: #ffffff; --mod-shadow: 0 2px 6px #3c2d1e1a;
  --no-felt-a: #71807a; --no-felt-b: #4b5853; --no-felt-shadow: 0 18px 30px -12px #3c2d1e8c;
  --key: #f5f2ec; --key-hi: #ffffff; --key-edge: transparent; --key-ink: #4b5853; --key-shadow: 0 3px 6px #0000002e, inset 0 -2px 0 #00000012;
  --well: #3c4743; --flyout: #faf8f4; --line: #dbd4c9;
  --ink: #2b322f; --ink-2: #46504c; --muted: #77796f;
  --amber: #d9774b; --cyan: #4b5853; --red: #b8323f; --solo: #2f3a36; --on-ink: #ffffff;
  --focus: #d9774b; --panel-hi: #f1ede6; --track: #3c4743;
  --led-g: #f5f2ec; --led-y: #f3c3a6; --led-r: #e06f3f;
  --led-g-off: #47524e; --led-y-off: #4d524c; --led-r-off: #524d48;
  --glow: .3; --scroll: #cfc6b8; --scroll-hi: #b8ad9c;
  --field: #fffdf9; --rail: #ddd6cb; --switch: #cfc6b8;
  --cap-w: 34px; --cap-h: 34px;
  --pop-shadow: 0 0 0 1px #00000010, 0 24px 60px #3c2d1e40;
  --cap-metal: radial-gradient(circle at 34% 28%, #ffffff80, transparent 45%), repeating-radial-gradient(ellipse at 70% 130%, #c99a62 0 2px, #b6844c 2px 3.5px, #d6aa76 3.5px 6px);
  --cap-ridge: transparent; --cap-shadow: 0 10px 16px #19140f80, inset 0 -2px 4px #00000040, inset 0 1px 1px #ffffff80; --cap-ink: #3a2a18;
  --c-slate: #a6b3ae; --c-amber: #e8b35c; --c-coral: #e58a5e; --c-rose: #e48aa0;
  --c-violet: #b3a1dc; --c-blue: #8fb1d9; --c-cyan: #8ccaca; --c-green: #a9cc9a;
  --font: "Nunito", "Segoe UI", system-ui, sans-serif;
  --warning-ink: #8a4b12;
  color-scheme: light;
}
:root body[data-theme="nordic"] { background: #ebe6de; }
:root body[data-theme="nordic"] .theme-light {
  --ambient-base: radial-gradient(ellipse 80% 70% at 12% -10%, #fffaf0, transparent 70%), linear-gradient(180deg, #f2eee7, #e5dfd5);
  --ambient-accent: radial-gradient(ellipse 50% 40% at 30% 10%, #fff3d6b3, transparent);
}
:root body[data-theme="nordic"] .theme-light::after { content: ""; position: absolute; inset: 0; background: var(--sm-noise); opacity: .35; mix-blend-mode: multiply; }
/* Groups stand on an oak shelf. */
:root body[data-theme="nordic"] .group { position: relative; border-radius: 22px; padding-bottom: 22px; }
:root body[data-theme="nordic"] .group::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; border-radius: 0 0 22px 22px; pointer-events: none;
  background: linear-gradient(180deg, #ffffff59, transparent 35%, #00000020), repeating-linear-gradient(91deg, #d8b688 0 3px, #cba673 3px 5px, #e2c59b 5px 10px, #d1ae7e 10px 16px);
  box-shadow: 0 4px 8px #6b5a4226;
}
:root body[data-theme="nordic"] .linkish { color: #a8522a; }
:root body[data-theme="nordic"] .group-head h2 { color: #6b6f66; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; }
/* Channels: sage wool felt. */
:root body[data-theme="nordic"] :is(.strip, .mini-row) {
  border-radius: 22px; color: #f5f2ec;
  background: var(--sm-noise), radial-gradient(130% 80% at 50% 0%, var(--no-felt-a), var(--no-felt-b));
  background-blend-mode: soft-light, normal;
  box-shadow: inset 0 2px 3px #ffffff2e, inset 0 -4px 10px #00000038, var(--no-felt-shadow);
}
:root body[data-theme="nordic"] .mini-row { border-radius: 14px; }
:root body[data-theme="nordic"] :is(.strip, .mini-row):hover { background: var(--sm-noise), radial-gradient(130% 80% at 50% 0%, #77877f, #4f5d57); background-blend-mode: soft-light, normal; }
:root body[data-theme="nordic"] .strip.muted { background: var(--sm-noise), radial-gradient(130% 80% at 50% 0%, #868a85, #5e625e); background-blend-mode: soft-light, normal; }
:root body[data-theme="nordic"] :is(.strip .name, .mini-name, .brand-name, .dlg-head h2) { font-family: var(--font); font-weight: 800; letter-spacing: 0; }
:root body[data-theme="nordic"] :is(.strip .name, .mini-name, .strip .readout, .scale span.zero) { color: #f5f2ec; }
:root body[data-theme="nordic"] .strip .name { font-size: 15px; }
:root body[data-theme="nordic"] :is(.strip .sub, .scale span) { color: #cdd6d1; }
:root body[data-theme="nordic"] .strip .bus-tag { color: #ffd2b8; }
:root body[data-theme="nordic"] .brand-name { font-size: 16px; }
:root body[data-theme="nordic"] .strip .head .chip, :root body[data-theme="nordic"] .mini-row .chip {
  border-radius: 50%; background: #f5f2ec; color: color-mix(in srgb, var(--acc) 55%, #2b322f); box-shadow: 0 2px 5px #00000033;
}
/* Keys: linen pills. Pressed: terracotta or charcoal. */
:root body[data-theme="nordic"] :is(.btn, .route, .tog, .keys, select, .scene-list .load, .route-expand) { border-radius: 999px; font-weight: 700; background: var(--key); color: var(--key-ink); box-shadow: var(--key-shadow); }
:root body[data-theme="nordic"] :is(.btn, .route, .tog, .keys):hover { background: #fff; color: #2b322f; }
:root body[data-theme="nordic"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="nordic"] :is(.strip, .mini-row) :is(.modes .tog, .tog.mono)[aria-pressed="true"] { background: #d9774b; color: #fff; box-shadow: 0 4px 12px #d9774b73, inset 0 -2px 0 #0000001f; }
:root body[data-theme="nordic"] .strip-routes .route.b[aria-pressed="true"] { background: #2f3a36; color: #f5f2ec; box-shadow: 0 4px 10px #00000052, inset 0 -2px 0 #00000033; }
:root body[data-theme="nordic"] :is(.strip, .mini-row) .tog.solo[aria-pressed="true"] { background: #2f3a36; color: #f5f2ec; box-shadow: 0 4px 10px #00000052; }
:root body[data-theme="nordic"] :is(.strip, .mini-row) .tog.mute[aria-pressed="true"] { background: var(--red); color: #fff; box-shadow: 0 4px 12px #b8323f80, inset 0 -2px 0 #0000001f; }
:root body[data-theme="nordic"] :is(.btn.primary, .btn[aria-pressed="true"], .update-btn) { background: #2f3a36; color: #f5f2ec; box-shadow: 0 4px 10px #0000003d; }
:root body[data-theme="nordic"] .bar { background: #f6f3eee6; box-shadow: inset 0 -1px 0 #e0d9ce, 0 1px 0 #fff; }
:root body[data-theme="nordic"] .bar :is(.btn, .keys) { box-shadow: 0 1px 3px #3c2d1e26, inset 0 0 0 1px #00000010; }
/* Meters: soft linen bars warming to terracotta at the top, in a felt recess. */
:root body[data-theme="nordic"] .strip .well { border-radius: 999px; background: #00000033; box-shadow: inset 0 1px 3px #00000059; }
:root body[data-theme="nordic"] .meter { -webkit-mask: none; mask: none; border-radius: 999px; }
:root body[data-theme="nordic"] .meter .unlit { background: #ffffff12; }
:root body[data-theme="nordic"] .meter .lit b { background: linear-gradient(to top, #f5f2ec 0 var(--p-yellow), #f3c3a6 var(--p-zero), #e06f3f); }
:root body[data-theme="nordic"] .fader.h .meter .lit b { background: linear-gradient(to right, #f5f2ec 0 var(--p-yellow), #f3c3a6 var(--p-zero), #e06f3f); }
:root body[data-theme="nordic"] .meter .pk i { background: #ffd9c4; height: 2px; }
/* Fader: a felt slot filled in linen up to an oak knob. */
:root body[data-theme="nordic"] .fader .groove { width: 6px; margin-left: -3px; border: 0; border-radius: 999px; background: linear-gradient(to top, #f5f2ecd9 calc(var(--p, 0) * 100%), #00000038 0); box-shadow: inset 0 1px 2px #00000066; }
:root body[data-theme="nordic"] .fader .groove::before { display: none; }
:root body[data-theme="nordic"] .fader .thumb { border-radius: 50%; clip-path: none; filter: none; background: var(--cap-metal); box-shadow: var(--cap-shadow); }
:root body[data-theme="nordic"] .fader .thumb::before { content: none; }
:root body[data-theme="nordic"] .fader:not(.h) .thumb::after { left: calc(50% - 3px); right: auto; width: 6px; height: 6px; top: calc(50% - 3px); margin: 0; border-radius: 50%; background: #f5f2ec; box-shadow: inset 0 1px 1px #0000004d; transform: none; font-size: 0; }
:root body[data-theme="nordic"] .muted .fader .thumb::after { background: var(--red); }
:root body[data-theme="nordic"] .fader.dragging .thumb { box-shadow: 0 0 0 3px #f5f2ec, 0 14px 22px #19140f8c, inset 0 -2px 4px #00000040; }
:root body[data-theme="nordic"] .unity { background: #f5f2ec; opacity: .45; }
:root body[data-theme="nordic"] .scale span { font-size: 10px; }
:root body[data-theme="nordic"] .strip .readout { font-family: var(--font); font-weight: 800; font-size: 19px; background: transparent; }
:root body[data-theme="nordic"] .strip .readout:hover { background: #ffffff1f; }
:root body[data-theme="nordic"] .muted .readout { color: #f2b5bb; }
:root body[data-theme="nordic"] .fader.h { --cap-w: 48px; }
:root body[data-theme="nordic"] .fader.h .track { border-radius: 999px; background: linear-gradient(to right, #ffffff1f calc(var(--cap-w) / 2 + (100% - var(--cap-w)) * var(--p, .8)), transparent 0), #00000033; box-shadow: inset 0 1px 3px #00000059; }
:root body[data-theme="nordic"] .fader.h .thumb { top: 0; bottom: 0; border-radius: 999px; background: var(--cap-metal); box-shadow: var(--cap-shadow); color: #3a2a18; }
:root body[data-theme="nordic"] .fader.h .db { color: #2b1d0c; font-size: 11px; padding: 0; }
:root body[data-theme="nordic"] .duck-tag { color: #fff; }
/* Dialogs, menus and window buttons. */
:root body[data-theme="nordic"] :is(.dlg, .menu) { border-radius: 22px; background: var(--flyout); box-shadow: var(--pop-shadow); }
:root body[data-theme="nordic"] .dlg::backdrop { background: rgba(60, 50, 40, .28); backdrop-filter: blur(4px); }
:root body[data-theme="nordic"] .wc { border-radius: 999px; }
:root body[data-theme="nordic"] .wc:hover { background: #e9e3d9; }
:root body[data-theme="nordic"] .wc.close:hover { background: #d9774b; color: #fff; }
/* Theme-picker sample. */
.theme-card[data-theme="nordic"] .tc-desk { background: linear-gradient(180deg, transparent 86%, #d8b688 86%), #efebe4; }
.theme-card[data-theme="nordic"] .tc-mod { border-radius: 8px; background: radial-gradient(130% 80% at 50% 0%, #71807a, #4b5853); box-shadow: 0 3px 6px #3c2d1e40; }
.theme-card[data-theme="nordic"] :is(.tc-keys i, .tc-mute) { border-radius: 99px; background: #f5f2ec; }
.theme-card[data-theme="nordic"] .tc-keys i.on, .theme-card[data-theme="nordic"] .tc-mute.on { background: #d9774b; }
.theme-card[data-theme="nordic"] .tc-well { background: #0003; border-radius: 99px; }
.theme-card[data-theme="nordic"] .tc-well b { background: #f5f2ec; border-radius: 99px; }
.theme-card[data-theme="nordic"] .tc-cap { width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f0d2a6, #b6844c); }
.theme-card[data-theme="nordic"] .tc-slot::before { width: 3px; margin-left: -1.5px; background: #f5f2ecaa; border-radius: 2px; }

/* ---------------------------------------------------------------- Motion for Halo and Nordic */
@media (prefers-reduced-motion: no-preference) {
  /* Halo: the light drifts, and the beams trace each card. */
  /* The beam itself turns on the GPU: see "Effect layers" at the end of this file. */
  body[data-theme="halo"][data-theme-motion="full"] .tog.mute[aria-pressed="true"] { animation: halo-pulse 2s ease-in-out infinite; }
  /* Nordic: morning light drifts slowly across the room. */
  body[data-theme="nordic"]:not([data-theme-motion="off"]) .theme-light::before { animation: ambient-drift 40s ease-in-out infinite alternate; }
}
@keyframes halo-beam { from { --halo-a: 0deg; } to { --halo-a: 360deg; } }
@keyframes halo-pulse { 50% { box-shadow: inset 0 1px 0 #ffffff4d, 0 4px 10px #ff4fa040; } }

/* ====================================================================== Theme overhaul (0.22)
 * Each theme, pushed further from its neighbours and polished. These blocks come last, so they
 * build on the rules above. */


/* ---------------------------------------------------------------- OLED black */
/* A pure-black display: nothing is lit unless it carries information. Channels are drawn with a
   single hairline that glows in the channel's colour at the top and fades away, meters and the
   fader track light up in the channel's colour, keys are outlines that light their rim when on,
   and the only solid light is a white primary button. */
[data-theme="oled"], :root body[data-theme="oled"] {
  --bg: #000; --bay: #000; --bay-edge: transparent; --bay-shadow: none;
  --mod-a: #000; --mod-b: #000; --mod-edge: transparent; --mod-shadow: none;
  --key: #000; --key-hi: #0d0d10; --key-edge: transparent; --key-ink: #a9a9b3;
  --well: #000; --flyout: #000; --field: #000; --line: #26262c; --track: #000; --panel-hi: #0d0d10; --rail: #000; --switch: #1a1a1f;
  --ink: #fff; --ink-2: #c9c9d1; --muted: #8b8b95; --on-ink: #000;
  --amber: #ffb000; --cyan: #00d5ff; --red: #ff2d55; --solo: #ffb000; --focus: #fff;
  --led-g: #00ff6a; --led-y: #ffe100; --led-r: #ff2d55; --led-g-off: #04100a; --led-y-off: #100e02; --led-r-off: #12040a;
  --cap-w: 34px; --cap-h: 20px; --glow: .6;
  --c-slate: #b9b9c4; --c-amber: #ffb000; --c-coral: #ff7a4d; --c-rose: #ff4f8b;
  --c-violet: #9b7bff; --c-blue: #4d8dff; --c-cyan: #00d5ff; --c-green: #00ff6a;
  --font: "Inter", "Segoe UI", sans-serif;
  --pop-shadow: 0 0 0 1px #2a2a30, 0 0 60px #000;
  --scroll: #1f1f24; --scroll-hi: #33333a;
}
:root body[data-theme="oled"] .group { background: transparent; box-shadow: none; }
:root body[data-theme="oled"] .group-head h2 { color: #6c6c76; font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
/* Channels: black, outlined by a hairline that is lit in the channel's colour at the top. */
:root body[data-theme="oled"] :is(.strip, .mini-row) { border-radius: 18px; background: #000; box-shadow: none; }
:root body[data-theme="oled"] .mini-row { border-radius: 12px; box-shadow: inset 0 0 0 1px #1c1c21; }
:root body[data-theme="oled"] .strip::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 75%, transparent), #2a2a30 22%, #16161a 60%, #1f1f24);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
:root body[data-theme="oled"] .strip.muted::before { background: linear-gradient(180deg, #ff2d5599, #2a2a30 22%, #16161a 60%, #1f1f24); }
:root body[data-theme="oled"] .strip:hover::before { background: linear-gradient(180deg, var(--acc), #3a3a42 26%, #1c1c21 60%, #2a2a30); }
:root body[data-theme="oled"] .strip::after { left: -40%; width: 40%; height: 1px; top: 0; background: linear-gradient(90deg, transparent, #fff, transparent); opacity: .7; }
:root body[data-theme="oled"] :is(.strip .name, .mini-name, .brand-name, .dlg-head h2) { font-family: var(--font); font-weight: 600; letter-spacing: -.01em; }
:root body[data-theme="oled"] .strip .name { font-size: 15px; color: #fff; }
:root body[data-theme="oled"] .strip .sub { color: var(--muted); }
/* The channel icon is just its glyph, lit in the channel's colour. */
:root body[data-theme="oled"] :is(.strip .head .chip, .mini-row .chip) { border-radius: 10px; color: var(--acc); background: color-mix(in srgb, var(--acc) 12%, #000); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 30%, transparent); }
:root body[data-theme="oled"] .strip .head .chip svg { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--acc) 80%, transparent)); }
:root body[data-theme="oled"] .strip.muted .head .chip { color: #6c6c76; background: #0b0b0d; box-shadow: inset 0 0 0 1px #222227; }
:root body[data-theme="oled"] .strip.muted .head .chip svg { filter: none; }
/* Keys: outlines. A key that is on lights its rim and label in its colour, with a soft bloom. */
:root body[data-theme="oled"] :is(.btn, .route, .tog, .keys, select, .scene-list .load, .route-expand) {
  border-radius: 9px; color: var(--key-ink); background: #000; box-shadow: inset 0 0 0 1px #2c2c33;
}
:root body[data-theme="oled"] :is(.btn, .route, .tog, .keys):not([aria-pressed="true"]):hover { color: #fff; background: #0b0b0d; box-shadow: inset 0 0 0 1px #4a4a53; }
:root body[data-theme="oled"] :is(.route, .tog) { font-weight: 600; letter-spacing: .04em; }
:root body[data-theme="oled"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="oled"] :is(.strip, .mini-row) :is(.modes .tog, .tog.mono, .tog.solo, .tog.eq)[aria-pressed="true"] {
  color: #ffc23d; background: radial-gradient(ellipse 90% 120% at 50% 100%, #ffb0002e, #000 70%); box-shadow: inset 0 0 0 1.5px #ffb000, 0 0 14px #ffb00059;
}
:root body[data-theme="oled"] .strip-routes .route.b[aria-pressed="true"] {
  color: #5fe3ff; background: radial-gradient(ellipse 90% 120% at 50% 100%, #00d5ff2e, #000 70%); box-shadow: inset 0 0 0 1.5px #00d5ff, 0 0 14px #00d5ff59;
}
:root body[data-theme="oled"] :is(.strip, .mini-row) .tog.mute[aria-pressed="true"] {
  color: #ff6b88; background: radial-gradient(ellipse 90% 120% at 50% 100%, #ff2d5533, #000 70%); box-shadow: inset 0 0 0 1.5px #ff2d55, 0 0 16px #ff2d5566;
}
/* The one solid light: primary actions are white. */
:root body[data-theme="oled"] :is(.btn.primary, .btn[aria-pressed="true"], .update-btn) { color: #000; background: #fff; box-shadow: 0 0 18px #ffffff33; }
:root body[data-theme="oled"] :is(.btn.primary, .update-btn):hover { background: #e6e6ea; }
:root body[data-theme="oled"] .bar { background: #000; box-shadow: inset 0 -1px 0 #1a1a1f; }
:root body[data-theme="oled"] .wc:hover { background: #111114; color: #fff; }
/* Meters: fine pixel rows lit in the channel's colour, turning white then red at the top. */
:root body[data-theme="oled"] .strip .well { border-radius: 4px; background: #000; box-shadow: none; }
:root body[data-theme="oled"] :is(.strip, .mini-row) {
  --led-g: var(--acc); --led-y: color-mix(in srgb, var(--acc) 35%, #fff); --led-r: #ff2d55;
  --led-g-off: color-mix(in srgb, var(--acc) 9%, #000); --led-y-off: color-mix(in srgb, var(--acc) 6%, #0c0c0c); --led-r-off: #14040a;
}
:root body[data-theme="oled"] .strip .meter { -webkit-mask: repeating-linear-gradient(to top, #000 0 2px, transparent 2px 3px); mask: repeating-linear-gradient(to top, #000 0 2px, transparent 2px 3px); border-radius: 1px; }
:root body[data-theme="oled"] .strip .meter .glow { display: block; --glow-c: color-mix(in srgb, var(--acc) 70%, transparent); --glow-r: 3px; }
:root body[data-theme="oled"] .strip.muted { --led-g: #5a5a63; --led-y: #8a8a93; --led-g-off: #0a0a0c; --led-y-off: #0d0d0f; }
:root body[data-theme="oled"] .muted .meter .lit b { filter: none; }
/* Fader: a hairline track that lights up in the channel's colour below the cap. */
:root body[data-theme="oled"] .fader:not(.h) .groove { width: 2px; margin-left: -1px; border-radius: 1px; background: #1c1c21; box-shadow: none; overflow: visible; }
:root body[data-theme="oled"] .fader:not(.h) .groove::before { display: none; }
:root body[data-theme="oled"] .fader:not(.h) .groove::after {
  content: ""; position: absolute; left: -.5px; right: -.5px; bottom: 0; border-radius: 2px;
  height: clamp(0px, calc(var(--cap-h) / 2 - 4px + var(--p, 0) * (100% + 8px - var(--cap-h))), 100%);
  background: linear-gradient(0deg, color-mix(in srgb, var(--acc) 35%, transparent), var(--acc)); box-shadow: 0 0 8px color-mix(in srgb, var(--acc) 60%, transparent);
}
:root body[data-theme="oled"] .muted .fader:not(.h) .groove::after { background: #4a4a52; box-shadow: none; }
:root body[data-theme="oled"] .fader .thumb {
  border-radius: 10px; background: #000; filter: none; clip-path: none;
  box-shadow: inset 0 0 0 1.5px var(--acc), 0 0 14px color-mix(in srgb, var(--acc) 45%, transparent), 0 0 0 4px #000;
}
:root body[data-theme="oled"] .fader:not(.h) .thumb::after { left: 50%; right: auto; width: 12px; margin-left: -6px; top: calc(50% - 1px); height: 2px; border-radius: 1px; background: #fff; box-shadow: 0 0 6px #fff9; }
:root body[data-theme="oled"] .muted .fader .thumb { box-shadow: inset 0 0 0 1.5px #55555d, 0 0 0 4px #000; }
:root body[data-theme="oled"] .muted .fader:not(.h) .thumb::after { background: #77777f; box-shadow: none; }
:root body[data-theme="oled"] .fader.dragging .thumb { background: color-mix(in srgb, var(--acc) 18%, #000); box-shadow: inset 0 0 0 2px var(--acc), 0 0 24px color-mix(in srgb, var(--acc) 70%, transparent), 0 0 0 4px #000; }
:root body[data-theme="oled"] .unity { left: 10px; right: 10px; background: #fff; opacity: .28; }
:root body[data-theme="oled"] .scale span { color: #5c5c66; font-size: 10px; font-variant-numeric: tabular-nums; }
:root body[data-theme="oled"] .scale span.zero { color: #fff; }
:root body[data-theme="oled"] .strip .readout { font-family: var(--font); font-size: 21px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #fff; background: transparent; }
:root body[data-theme="oled"] .strip .readout:hover { color: var(--acc); }
:root body[data-theme="oled"] .strip.muted .readout { color: #77777f; }
/* Mini mode and the tray panel. */
:root body[data-theme="oled"] .fader.h .track { background: #000; box-shadow: inset 0 0 0 1px #222227; }
:root body[data-theme="oled"] .fader.h .thumb { color: #fff; border-radius: 9px; background: #000; box-shadow: inset 0 0 0 1.5px var(--acc), 0 0 12px color-mix(in srgb, var(--acc) 40%, transparent); }
:root body[data-theme="oled"] .fader.h .db { color: #fff; }
/* Dialogs and menus: black glass with a hairline. */
:root body[data-theme="oled"] :is(.dlg, .menu) { border-radius: 18px; background: #000; box-shadow: inset 0 0 0 1px #26262c, var(--pop-shadow); }
:root body[data-theme="oled"] :is(input[type="text"], input[type="number"], input[type="search"], textarea) { background: #000; box-shadow: inset 0 0 0 1px #2c2c33; }
/* Theme-picker sample. */
.theme-card[data-theme="oled"] .tc-desk { background: #000; box-shadow: inset 0 0 0 1px #1c1c21; }
.theme-card[data-theme="oled"] .tc-mod { border-radius: 7px; background: #000; box-shadow: inset 0 1px 0 #ffb000a6, inset 0 0 0 1px #24242a; }
.theme-card[data-theme="oled"] .tc-slot::before { width: 2px; margin-left: -1px; background: linear-gradient(0deg, #ffb000 55%, #1c1c21 55%); }
.theme-card[data-theme="oled"] .tc-cap { height: 7px; border-radius: 4px; background: #000; box-shadow: inset 0 0 0 1px #ffb000, 0 0 6px #ffb00080; }
.theme-card[data-theme="oled"] :is(.tc-keys i:not(.on), .tc-mute) { background: #000; box-shadow: inset 0 0 0 1px #3a3a42; }

/* ---------------------------------------------------------------- Halo */
/* Dark and restrained, so it stays well apart from Glass: an eclipse ring over near-black, smoked
   cards traced by a white-lilac beam, pastel keys, and fader caps that are rings of light. */
[data-theme="halo"], :root body[data-theme="halo"] {
  --bg: #06060a; --mod-a: #15151ee0; --mod-b: #0b0b11eb; --mod-edge: #ffffff17; --mod-shadow: 0 28px 50px -20px #000;
  --key: #ffffff08; --key-hi: #ffffff12; --key-edge: #ffffff12; --key-ink: #b3b2c6;
  --well: #ffffff06; --flyout: #101017f5; --line: #ffffff17; --field: #ffffff08;
  --ink: #f3f2fa; --ink-2: #d4d2e4; --muted: #8e8ca3;
  --amber: #b6a8ff; --cyan: #9fd8ff; --red: #ff5d86; --solo: #b6a8ff; --on-ink: #17112e; --focus: #c9bfff;
  --led-g: #6e5ff0; --led-y: #c4b9ff; --led-r: #ff5d86;
  --led-g-off: #ffffff0a; --led-y-off: #ffffff0a; --led-r-off: #ffffff0a;
  --cap-w: 26px; --cap-h: 26px;
  --c-slate: #b9b8cc; --c-amber: #ffc98a; --c-coral: #ff9a8a; --c-rose: #ff8ac0;
  --c-violet: #b6a8ff; --c-blue: #8fb4ff; --c-cyan: #9fd8ff; --c-green: #8ff0c4;
  --pop-shadow: 0 0 0 1px #ffffff14, 0 30px 70px #000;
}
/* The eclipse: a thin bright ring arcing over the top of the window, with a faint corona. */
:root body[data-theme="halo"] .theme-light {
  background:
    radial-gradient(ellipse 58% 52% at 50% -16%, transparent 70%, #ece8ff8c 71.2%, #b6a8ff40 72.6%, #6e5ff014 76%, transparent 82%),
    radial-gradient(ellipse 80% 70% at 50% -16%, transparent 58%, #6e5ff01f 72%, transparent 92%),
    radial-gradient(ellipse 70% 40% at 50% 115%, #1b1530, transparent 70%),
    #06060a;
}
:root body[data-theme="halo"] .glass-aurora { display: none; }
:root body[data-theme="halo"] .group { background: transparent; box-shadow: none; }
:root body[data-theme="halo"] .group-head h2 { color: #a69ad6; letter-spacing: .22em; }
:root body[data-theme="halo"] .brand-name { background: linear-gradient(90deg, #fff, #c9bfff); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root body[data-theme="halo"] .brand-mark { filter: drop-shadow(0 0 6px #b6a8ff99); }
/* Smoked-glass cards with a single white-lilac beam running round the edge. */
:root body[data-theme="halo"] :is(.strip, .mini-row) {
  background: linear-gradient(180deg, var(--mod-a), var(--mod-b));
  box-shadow: inset 0 1px 0 #ffffff17, 0 0 0 1px #ffffff0d, var(--mod-shadow);
}
:root body[data-theme="halo"] :is(.strip, .mini-row):hover { background: linear-gradient(180deg, #1a1a25e6, #0e0e15ee); }
:root body[data-theme="halo"] .strip::before { background: conic-gradient(from var(--halo-a), transparent 0 72%, #b6a8ff66 84%, #fff 92%, transparent 97%); }
:root body[data-theme="halo"] .strip.muted::before { background: conic-gradient(from var(--halo-a), transparent 0 76%, #ff5d8655 88%, #ffb3c4 94%, transparent 98%); opacity: .6; }
:root body[data-theme="halo"] .strip.muted { background: linear-gradient(180deg, #111118d9, #09090ee6); }
/* The channel icon: a small dark disc ringed in the channel's colour. */
:root body[data-theme="halo"] :is(.strip .head .chip, .mini-row .chip) {
  border-radius: 50%; color: color-mix(in srgb, var(--acc) 80%, #fff); background: radial-gradient(circle at 50% 35%, #1d1d28, #0c0c12);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--acc) 70%, transparent), 0 0 14px color-mix(in srgb, var(--acc) 30%, transparent);
}
:root body[data-theme="halo"] .strip.muted .head .chip { color: #77768a; box-shadow: inset 0 0 0 1.5px #ffffff1f; }
/* Keys: smoked glass; switched-on keys are soft pastel light with dark labels. */
:root body[data-theme="halo"] :is(.btn, .route, .tog, .keys, select, .scene-list .load, .route-expand) { border-radius: 10px; background: var(--key); color: var(--key-ink); box-shadow: inset 0 0 0 1px #ffffff14; }
:root body[data-theme="halo"] :is(.btn, .route, .tog, .keys):not([aria-pressed="true"]):hover { background: var(--key-hi); color: var(--ink); box-shadow: inset 0 0 0 1px #ffffff24; }
:root body[data-theme="halo"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="halo"] :is(.strip, .mini-row) :is(.modes .tog, .tog.mono, .tog.solo, .tog.eq)[aria-pressed="true"] {
  color: #17112e; background: linear-gradient(180deg, #ddd6ff, #b0a2ff); box-shadow: inset 0 1px 0 #fff9, 0 0 16px #b6a8ff59;
}
:root body[data-theme="halo"] .strip-routes .route.b[aria-pressed="true"] { color: #06223a; background: linear-gradient(180deg, #d6f0ff, #96d2ff); box-shadow: inset 0 1px 0 #fff9, 0 0 16px #9fd8ff59; }
:root body[data-theme="halo"] :is(.strip, .mini-row) .tog.mute[aria-pressed="true"] { color: #33040f; background: linear-gradient(180deg, #ffb3c4, #ff6f93); box-shadow: inset 0 1px 0 #fff8, 0 0 18px #ff5d8666; }
:root body[data-theme="halo"] :is(.btn.primary, .btn[aria-pressed="true"], .update-btn) { color: #17112e; background: linear-gradient(180deg, #fff, #cfc6ff); box-shadow: inset 0 1px 0 #fff, 0 0 18px #b6a8ff4d; }
:root body[data-theme="halo"] .wc.close:hover { background: #ff6f93; color: #33040f; }
:root body[data-theme="halo"] .bar { background: #08080dcc; box-shadow: inset 0 -1px 0 #ffffff0f; }
/* Meters: smooth pills of light, deep violet to lilac to white, and rose past 0 dB. */
:root body[data-theme="halo"] .strip .well { background: #ffffff05; box-shadow: inset 0 0 0 1px #ffffff0a; }
/* Every channel's meter is the eclipse's light (blue, violet, white at the rim, pink over 0 dB), unlike Abyss, where each channel glows its own colour. */
:root body[data-theme="halo"] .meter .lit b { background: linear-gradient(to top, #2c6fd6, #2fa6ff 30%, #8c7dff var(--p-yellow), #ece8ff var(--p-zero), #ff4fd8 var(--p-zero)); }
:root body[data-theme="halo"] .fader.h .meter .lit b { background: linear-gradient(to right, #2c6fd6, #2fa6ff 30%, #8c7dff var(--p-yellow), #ece8ff var(--p-zero), #ff4fd8 var(--p-zero)); }
:root body[data-theme="halo"] .meter .glow { display: block; --glow-c: #6f8cff80; --glow-r: 4px; }
:root body[data-theme="halo"] .muted .meter .lit b { filter: saturate(0) brightness(.7); }
/* Fader: a fine line lit softly in the channel's colour, and a cap that is a ring of light. */
:root body[data-theme="halo"] .fader:not(.h) .groove {
  width: 3px; margin-left: -1.5px;
  background: linear-gradient(to top, color-mix(in srgb, var(--acc) 25%, transparent), color-mix(in srgb, var(--acc) 80%, #fff) calc(var(--cap-h) / 2 - 4px + var(--p, 0) * (100% + 8px - var(--cap-h))), #ffffff12 0);
  box-shadow: 0 0 10px color-mix(in srgb, var(--acc) 30%, transparent);
}
:root body[data-theme="halo"] .muted .fader:not(.h) .groove { background: linear-gradient(to top, #ffffff14, #ffffff3d calc(var(--cap-h) / 2 - 4px + var(--p, 0) * (100% + 8px - var(--cap-h))), #ffffff10 0); box-shadow: none; }
:root body[data-theme="halo"] .fader .thumb {
  border-radius: 50%; background: radial-gradient(circle at 50% 40%, #1f1f2b, #0a0a10);
  box-shadow: inset 0 0 0 2.5px color-mix(in srgb, var(--acc) 85%, #fff), 0 0 0 5px color-mix(in srgb, var(--acc) 14%, transparent), 0 0 20px color-mix(in srgb, var(--acc) 55%, transparent), 0 6px 12px #000c;
}
:root body[data-theme="halo"] .fader:not(.h) .thumb::after {
  display: block; content: ""; position: absolute; left: calc(50% - 3px); right: auto; top: calc(50% - 3px); width: 6px; height: 6px; margin: 0;
  border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff;
}
:root body[data-theme="halo"] .muted .fader .thumb { box-shadow: inset 0 0 0 2px #ffffff40, 0 0 0 5px #ffffff0a, 0 6px 12px #000c; }
:root body[data-theme="halo"] .muted .fader:not(.h) .thumb::after { background: #8e8ca3; box-shadow: none; }
:root body[data-theme="halo"] .fader.dragging .thumb { box-shadow: inset 0 0 0 3px #fff, 0 0 0 7px color-mix(in srgb, var(--acc) 30%, transparent), 0 0 30px var(--acc), 0 6px 12px #000c; }
:root body[data-theme="halo"] .unity { background: #fff; opacity: .25; }
:root body[data-theme="halo"] .scale span { color: #6f6d84; }
:root body[data-theme="halo"] .strip .readout { font-size: 20px; text-shadow: 0 0 14px color-mix(in srgb, var(--acc) 40%, transparent); }
/* Mini mode and the tray panel. */
:root body[data-theme="halo"] .fader.h .track { background: linear-gradient(to right, color-mix(in srgb, var(--acc) 35%, transparent) calc(var(--cap-w) / 2 + (100% - var(--cap-w)) * var(--p, .8)), transparent 0), #ffffff08; }
:root body[data-theme="halo"] .fader.h .thumb { color: #fff; background: #0e0e15; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--acc) 85%, #fff), 0 0 14px color-mix(in srgb, var(--acc) 50%, transparent); }
:root body[data-theme="halo"] .fader.h .db { color: #fff; }
:root body[data-theme="halo"] :is(.dlg, .menu) { background: var(--flyout); box-shadow: inset 0 1px 0 #ffffff14, var(--pop-shadow); }
@keyframes halo-pulse { 50% { box-shadow: inset 0 1px 0 #fff8, 0 0 6px #ff5d8640; } }
/* Theme-picker sample. */
.theme-card[data-theme="halo"] .tc-desk { background: radial-gradient(ellipse 70% 60% at 50% -20%, transparent 68%, #ece8ffb0 71%, #b6a8ff33 75%, transparent 82%), #06060a; }
.theme-card[data-theme="halo"] .tc-mod { border-radius: 7px; background: linear-gradient(180deg, #17171f, #0b0b11); box-shadow: inset 0 1px 0 #ffffff1f, 0 0 0 1px #ffffff12; }
.theme-card[data-theme="halo"] .tc-cap { width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #0c0c12; box-shadow: inset 0 0 0 1.5px #d9d2ff, 0 0 6px #b6a8ff; }
.theme-card[data-theme="halo"] .tc-slot::before { width: 2px; margin-left: -1px; background: linear-gradient(to top, #6e5ff0, #d9d2ff); }

/* ---------------------------------------------------------------- Glass */
/* The bright, colourful one (Halo is the dark one): a full spectrum of light keeps moving behind
   clear panes. Each pane has a prism rim, a highlight where the light catches it, and a soft tint
   so white text stays readable. Meters run through the spectrum and caps are prism beads. */
[data-theme="glass"], :root body[data-theme="glass"] {
  --mod-a: #ffffff2e; --mod-b: #ffffff0f; --key: #0d0a3040; --key-hi: #ffffff2e; --well: #0a083033; --track: #0a083040;
  --amber: #7cf3ff; --cyan: #ffa0dc; --red: #ff4f7a; --solo: #d6ff7a; --on-ink: #120a3a;
  --led-g: #3dffb0; --led-y: #7cf3ff; --led-r: #ff4f8b;
  --flyout: #24185ce8; --pop-shadow: 0 0 0 1px #ffffff33, 0 30px 70px #05061e99;
}
/* A brighter, wider spectrum: magenta, cyan, amber, lime and violet. */
:root body[data-theme="glass"] .glass-aurora { background: #120c48; filter: blur(64px) saturate(1.45) brightness(.78); }
:root body[data-theme="glass"] .glass-aurora b:nth-child(1) { width: 70%; height: 62%; left: -14%; top: -18%; background: #8a3cff; opacity: 1; }
:root body[data-theme="glass"] .glass-aurora b:nth-child(2) { width: 58%; height: 58%; right: -14%; top: -4%; background: #00d4ff; opacity: 1; }
:root body[data-theme="glass"] .glass-aurora b:nth-child(3) { width: 62%; height: 42%; left: 16%; bottom: -22%; background: #ff2fb4; opacity: .95; }
:root body[data-theme="glass"] .glass-aurora b:nth-child(4) { width: 38%; height: 36%; left: 38%; top: 24%; background: #2bffb0; opacity: .55; }
:root body[data-theme="glass"] .glass-aurora b:nth-child(5) { width: 36%; height: 34%; right: -4%; bottom: -6%; background: #ffb020; opacity: .75; }
/* Panes: clear glass with a soft indigo tint behind the text, and a highlight where the light hits. */
:root body[data-theme="glass"] :is(.strip, .mini-row) {
  background: radial-gradient(120% 50% at 20% 0%, #ffffff33, transparent 60%), linear-gradient(180deg, #ffffff24, #ffffff08 45%, #ffffff0d), #140c4a66;
  box-shadow: inset 0 1px 0 #fffffff0, inset 0 -1px 0 #ffffff47, inset 0 0 24px #ffffff12, 0 20px 44px #05061e80;
}
:root body[data-theme="glass"] :is(.strip, .mini-row):hover { background: radial-gradient(120% 50% at 20% 0%, #ffffff40, transparent 60%), linear-gradient(180deg, #ffffff2e, #ffffff0d 45%, #ffffff14), #140c4a4d; }
:root body[data-theme="glass"] .strip::before { padding: 2px; opacity: 1; background: conic-gradient(from var(--glass-rim), #7cf3ff, #8a7dff, #ff7ad9, #ffb36b, #fff27a, #6dffb6, #7cf3ff); }
:root body[data-theme="glass"] .strip.muted::before { filter: grayscale(.85) brightness(.85); opacity: .7; }
:root body[data-theme="glass"] .strip.muted { background: linear-gradient(180deg, #ffffff17, #ffffff08), #0a083066; }
:root body[data-theme="glass"] .group { background: #ffffff0d; box-shadow: inset 0 1px 0 #ffffff40, inset 0 0 0 1px #ffffff1f; border-radius: 32px; }
:root body[data-theme="glass"] .group-head h2 { color: #fff; text-shadow: 0 1px 2px #0008, 0 0 12px #ffffff66; }
/* The channel icon is a prism bead in the channel's colour. */
:root body[data-theme="glass"] .strip .head .chip {
  background: radial-gradient(circle at 32% 24%, #ffffffe6 0 10%, transparent 34%), conic-gradient(from 210deg, color-mix(in srgb, var(--acc) 90%, #fff), color-mix(in srgb, var(--acc) 70%, #8a3cff), color-mix(in srgb, var(--acc) 70%, #ff2fb4), color-mix(in srgb, var(--acc) 90%, #fff));
  box-shadow: inset 0 1px 0 #ffffffcc, inset 0 -2px 4px #0003, 0 0 0 1px #ffffff80, 0 0 18px color-mix(in srgb, var(--acc) 75%, transparent);
}
:root body[data-theme="glass"] .strip .head .chip svg { filter: drop-shadow(0 1px 1px #0007); }
/* Keys: clear capsules; lit keys are bright pastel glass. */
:root body[data-theme="glass"] :is(.strip-routes .route, .strip .tog, .bar .btn, .bar .keys, .route-expand) { background: #0d0a3047; box-shadow: inset 0 1px 0 #ffffff80, inset 0 -1px 0 #ffffff26, 0 0 0 1px #ffffff1f; }
:root body[data-theme="glass"] :is(.strip-routes .route, .strip .tog, .bar .btn, .bar .keys):not([aria-pressed="true"]):hover { background: #ffffff2e; }
:root body[data-theme="glass"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="glass"] .strip :is(.modes .tog, .tog.mono, .tog.eq)[aria-pressed="true"] { background: linear-gradient(135deg, #a6f7ff, #7cf3ff 40%, #b9a4ff); color: #120a3a; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #ffffffb0, 0 0 16px #7cf3ffaa; }
:root body[data-theme="glass"] .strip-routes .route.b[aria-pressed="true"] { background: linear-gradient(135deg, #ffc2e6, #ff9ad5 40%, #ffc08a); color: #3a0a24; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #ffffffb0, 0 0 16px #ff9ad5aa; }
:root body[data-theme="glass"] .strip .tog.mute[aria-pressed="true"] { background: linear-gradient(135deg, #f2407a, #d01848); color: #fff; box-shadow: inset 0 1px 0 #ffffffc0, 0 0 0 1px #ffffff80, 0 0 20px #ff4f7acc; }
/* Meters: the spectrum, from mint through cyan and violet to pink past 0 dB. */
:root body[data-theme="glass"] .meter .lit b { background: linear-gradient(to top, #3dffb0, #7cf3ff var(--p-yellow), #a98bff calc(var(--p-zero) - 6%), #ff7ad9 var(--p-zero), #ff3d6a var(--p-zero)); }
:root body[data-theme="glass"] .meter .glow { display: block; --glow-c: #7cf3ff99; --glow-r: 5px; }
:root body[data-theme="glass"] .meter .unlit { background: #ffffff1a; }
:root body[data-theme="glass"] .meter .pk i { background: #fff; box-shadow: 0 0 6px #fff; }
/* Fader: the lit part of the track meets the cap exactly. */
:root body[data-theme="glass"] .fader:not(.h) .groove {
  background: linear-gradient(to top, var(--acc), color-mix(in srgb, var(--acc) 40%, #fff) calc(var(--cap-h) / 2 - 4px + var(--p, 0) * (100% + 8px - var(--cap-h))), var(--track) 0);
}
:root body[data-theme="glass"] .fader .thumb {
  background: radial-gradient(circle at 34% 26%, #fff 0 12%, transparent 30%), conic-gradient(from 200deg, #7cf3ffb3, #a98bffb3, #ff7ad9b3, #ffb36bb3, #fff27ab3, #7cf3ffb3), #ffffff4d;
}
:root body[data-theme="glass"] .unity { opacity: .5; }
:root body[data-theme="glass"] .bar { background: #ffffff1f; }
:root body[data-theme="glass"] .dlg { background: #24185ce8; }
/* Theme-picker sample. */
.theme-card[data-theme="glass"] .tc-desk { background: radial-gradient(60% 70% at 10% 0%, #8a3cff, transparent 70%), radial-gradient(55% 60% at 100% 10%, #00d4ff, transparent 70%), radial-gradient(60% 45% at 45% 115%, #ff2fb4, transparent 70%), radial-gradient(40% 40% at 95% 100%, #ffb020cc, transparent 70%), #120c48; }
.theme-card[data-theme="glass"] .tc-mod { background: linear-gradient(180deg, #ffffff40, #ffffff14); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #ffffff66; }
.theme-card[data-theme="glass"] .tc-cap { background: radial-gradient(circle at 34% 26%, #fff 0 15%, transparent 35%), conic-gradient(#7cf3ff, #a98bff, #ff7ad9, #ffb36b, #7cf3ff); }
:root body[data-theme="glass"] .strip .head .bus-tag { color: #fff; font-weight: 700; text-shadow: 0 1px 2px #0009, 0 0 8px #ffffff59; }
:root body[data-theme="glass"] .scale span { opacity: 1; color: #ffffffd9; text-shadow: 0 1px 2px #0009; }

/* ---------------------------------------------------------------- Overclock */
/* A tuned gaming rig: carbon-fibre panels behind a tempered-glass sheen, an RGB light pipe along the
   left edge and the foot of each channel, RGB meters like a performance overlay, HUD brackets round
   the readout, and an RGB line under the top bar. */
[data-theme="overclock"], :root body[data-theme="overclock"] {
  --led-g: #00e5ff; --led-y: #9b6cff; --led-r: #ff2b6a;
  --led-g-off: #0b1a20; --led-y-off: #17122a; --led-r-off: #2a0d18;
}
/* Carbon twill and a glass sheen across the middle of each angled panel (the cut corners stay clear). */
:root body[data-theme="overclock"] :is(.strip, .mini-row) {
  background:
    linear-gradient(112deg, transparent 28%, #ffffff0b 38%, #ffffff03 46%, transparent 56%) left 0 top var(--oc-cut) / 100% calc(100% - 2 * var(--oc-cut)) no-repeat,
    repeating-linear-gradient(45deg, #ffffff07 0 2px, transparent 2px 4px) left 0 top var(--oc-cut) / 100% calc(100% - 2 * var(--oc-cut)) no-repeat,
    repeating-linear-gradient(-45deg, #0000004d 0 2px, transparent 2px 4px) left 0 top var(--oc-cut) / 100% calc(100% - 2 * var(--oc-cut)) no-repeat,
    linear-gradient(135deg, transparent var(--oc-cut), var(--oc-face) calc(var(--oc-cut) + .5px)) top left / 51% 51% no-repeat,
    linear-gradient(var(--oc-face), var(--oc-face)) top right / 50% 51% no-repeat,
    linear-gradient(-45deg, transparent var(--oc-cut), var(--oc-face) calc(var(--oc-cut) + .5px)) bottom right / 51% 50% no-repeat,
    linear-gradient(var(--oc-face), var(--oc-face)) bottom left / 50% 50% no-repeat;
}
:root body[data-theme="overclock"] .strip::before { width: 3px; background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 60%, #fff), var(--acc) 12%, color-mix(in srgb, var(--acc) 40%, transparent)); box-shadow: 0 0 12px var(--acc), 0 0 3px var(--acc), 6px 0 18px color-mix(in srgb, var(--acc) 22%, transparent); }
/* The light pipe continues along the foot of the panel. */
:root body[data-theme="overclock"] .strip::after {
  top: auto; right: var(--oc-cut); bottom: 0; left: 0; width: auto; height: 2px;
  background: linear-gradient(90deg, var(--acc), color-mix(in srgb, var(--acc) 30%, transparent));
  box-shadow: 0 0 10px var(--acc), 0 -6px 16px color-mix(in srgb, var(--acc) 20%, transparent);
}
:root body[data-theme="overclock"] .group-head h2 { text-shadow: 0 0 10px #00e5ff80; }
/* The top bar: dark smoked glass with an RGB line along its foot. */
:root body[data-theme="overclock"] .bar { background: linear-gradient(90deg, #00e5ff, #7b5cff 35%, #ff2bd6 65%, #ff6a4d) bottom / 100% 1px no-repeat, #0b0d12f0; box-shadow: 0 1px 14px #7b5cff26; }
/* Keys: lit plates glow in their colour. */
:root body[data-theme="overclock"] :is(.btn, .route, .tog, .keys, select, .scene-list .load, .route-expand) { background: linear-gradient(180deg, #232836, #191d27); }
:root body[data-theme="overclock"] :is(.btn, .route, .tog):not([aria-pressed="true"]):hover { background: linear-gradient(180deg, #2c3243, #1f2430); }
:root body[data-theme="overclock"] :is(.strip-routes .route, .strip .tog, .btn.primary, .update-btn)[aria-pressed="true"], :root body[data-theme="overclock"] :is(.btn.primary, .update-btn) { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--acc, #00e5ff) 70%, transparent)); }
:root body[data-theme="overclock"] .strip-routes .route.b[aria-pressed="true"] { background: linear-gradient(180deg, #ffffff, #cfd6e4); filter: drop-shadow(0 0 6px #ffffff80); }
:root body[data-theme="overclock"] .strip .tog.mute[aria-pressed="true"] { filter: drop-shadow(0 0 8px #ff3b5ccc); }
/* Meters: segmented RGB, cyan to violet to hot pink. */
:root body[data-theme="overclock"] .strip .meter { -webkit-mask: repeating-linear-gradient(to top, #000 0 2px, transparent 2px 3px); mask: repeating-linear-gradient(to top, #000 0 2px, transparent 2px 3px); }
:root body[data-theme="overclock"] .meter .lit b { background: linear-gradient(to top, #00e5ff, #3d7bff calc(var(--p-yellow) - 10%), #9b6cff var(--p-yellow), #ff2bd6 var(--p-zero), #ff2b6a var(--p-zero)); }
:root body[data-theme="overclock"] .fader.h .meter .lit b { background: linear-gradient(to right, #00e5ff, #3d7bff calc(var(--p-yellow) - 10%), #9b6cff var(--p-yellow), #ff2bd6 var(--p-zero), #ff2b6a var(--p-zero)); }
:root body[data-theme="overclock"] .meter .glow { display: block; --glow-c: #7b5cffaa; --glow-r: 3px; }
:root body[data-theme="overclock"] .strip .well { background: linear-gradient(90deg, transparent 0 calc(50% - .5px), #1a1d26 0 calc(50% + .5px), transparent 0), #07080c; }
/* Fader: the lit hairline now meets the cap exactly; the cap has a soft glow under it. */
:root body[data-theme="overclock"] .fader:not(.h) .groove { background: linear-gradient(to top, var(--acc) calc(var(--cap-h) / 2 - 4px + var(--p, 0) * (100% + 8px - var(--cap-h))), #2a2f3c 0); }
:root body[data-theme="overclock"] .fader .thumb { background: linear-gradient(180deg, #ffffff, #c9d0dd 45%, #8d96a8 55%, #d5dbe6); filter: drop-shadow(0 3px 4px #000c) drop-shadow(0 0 6px color-mix(in srgb, var(--acc) 45%, transparent)); }
/* The readout sits in a HUD frame. */
:root body[data-theme="overclock"] .strip .readout {
  --oc-br: color-mix(in srgb, var(--acc) 70%, transparent);
  background: linear-gradient(var(--oc-br), var(--oc-br)) left top / 6px 1.5px no-repeat, linear-gradient(var(--oc-br), var(--oc-br)) left top / 1.5px 6px no-repeat,
    linear-gradient(var(--oc-br), var(--oc-br)) right bottom / 6px 1.5px no-repeat, linear-gradient(var(--oc-br), var(--oc-br)) right bottom / 1.5px 6px no-repeat,
    color-mix(in srgb, var(--acc) 6%, transparent);
}
:root body[data-theme="overclock"] .strip.muted .readout { --oc-br: #3a4050; }
/* Theme-picker sample. */
.theme-card[data-theme="overclock"] .tc-mod { background: repeating-linear-gradient(45deg, #ffffff08 0 2px, transparent 2px 4px), #12141b; box-shadow: inset 2px 0 0 #00e5ff, inset 0 -2px 0 #00e5ff99; }
.theme-card[data-theme="overclock"] .tc-mod + .tc-mod { box-shadow: inset 2px 0 0 #ff2bd6, inset 0 -2px 0 #ff2bd699; }

/* ---------------------------------------------------------------- Neon */
/* A wall of neon signs: each channel is a sign on a dark acrylic backboard, outlined by a glass tube
   with a white-hot core, held on by little clips, and mounted on a dark brick wall washed in pink and
   cyan spill. Fader caps are hollow tube capsules, the track is a tube that lights up to the cap,
   meters run pink to orange to yellow, and a muted channel's sign is switched off. */
/* The wall shows through the moving light; the grid floor stays. */
:root body[data-theme="neon"] .theme-light {
  --ambient-base: none;
  --ambient-accent: radial-gradient(ellipse 46% 30% at 30% 38%, #933dff30, transparent), radial-gradient(ellipse 42% 30% at 74% 70%, #19f0ff22, transparent);
}
/* The sign: dark acrylic with a faint reflection; the tube and its glow sit on ::after, the clips on ::before. */
:root body[data-theme="neon"] :is(.strip, .mini-row) {
  --nn-core: color-mix(in srgb, var(--acc) 42%, #fff);
  position: relative; border-radius: 12px;
  background:
    linear-gradient(115deg, transparent 32%, #ffffff09 42%, transparent 52%),
    radial-gradient(ellipse 110% 45% at 50% 0%, color-mix(in srgb, var(--acc) 13%, transparent), transparent 72%),
    linear-gradient(180deg, #130b31f0, #0a0620f2);
  box-shadow: inset 0 0 0 1px #ffffff14, 0 10px 22px #000b;
}
:root body[data-theme="neon"] .mini-row { border-radius: 9px; }
:root body[data-theme="neon"] :is(.strip, .mini-row)::after {
  content: ""; position: absolute; inset: 5px; border-radius: 8px; pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--nn-core), 0 0 0 1px var(--acc), inset 0 0 0 2px var(--acc),
    0 0 6px var(--acc), 0 0 18px color-mix(in srgb, var(--acc) 50%, transparent), inset 0 0 16px color-mix(in srgb, var(--acc) 28%, transparent);
}
:root body[data-theme="neon"] .mini-row::after { inset: 3px; border-radius: 7px; }
:root body[data-theme="neon"] :is(.strip, .mini-row):hover { box-shadow: inset 0 0 0 1px #ffffff1f, 0 10px 22px #000b, 0 0 34px color-mix(in srgb, var(--acc) 22%, transparent); }
:root body[data-theme="neon"] :is(.strip, .mini-row):hover::after {
  box-shadow: inset 0 0 0 1px #fff, 0 0 0 1px var(--acc), inset 0 0 0 2px var(--acc),
    0 0 8px var(--acc), 0 0 26px color-mix(in srgb, var(--acc) 65%, transparent), inset 0 0 20px color-mix(in srgb, var(--acc) 36%, transparent);
}
/* Clips holding the tube to the board, two on each side. */
:root body[data-theme="neon"] .strip::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  --nn-clip: linear-gradient(180deg, #5d5478, #2b2540);
  background: var(--nn-clip) left 2px top 26% / 7px 4px no-repeat, var(--nn-clip) left 2px top 74% / 7px 4px no-repeat,
    var(--nn-clip) right 2px top 26% / 7px 4px no-repeat, var(--nn-clip) right 2px top 74% / 7px 4px no-repeat;
}
/* Switched off: the bare glass tube, no glow. */
:root body[data-theme="neon"] :is(.strip, .mini-row).muted { background: linear-gradient(180deg, #100b24f0, #0a0718f2); }
:root body[data-theme="neon"] :is(.strip, .mini-row).muted::after {
  box-shadow: inset 0 0 0 1px #ffffff26, 0 0 0 1px color-mix(in srgb, var(--acc) 34%, #2a2045), inset 0 0 0 2px color-mix(in srgb, var(--acc) 22%, #1a1430);
}
/* Names and headings are tube lettering: a pale core with the colour glowing round it. */
:root body[data-theme="neon"] :is(.strip .name, .mini-name) { color: var(--nn-core); text-shadow: 0 0 2px var(--acc), 0 0 8px var(--acc), 0 0 20px color-mix(in srgb, var(--acc) 55%, transparent); }
:root body[data-theme="neon"] .muted :is(.name, .mini-name) { color: #c2b6e6; text-shadow: none; }
:root body[data-theme="neon"] .group-head h2 { font-family: "Orbitron", sans-serif; color: #dcfdff; text-shadow: 0 0 2px #19f0ff, 0 0 9px #19f0ff, 0 0 20px #19f0ff99; }
:root body[data-theme="neon"] .group-head .linkish { color: #ff8fca; text-shadow: 0 0 8px #ff2e9799; }
:root body[data-theme="neon"] :is(.strip .head .chip, .mini-row .chip) {
  border-radius: 8px; background: #0c0720; color: var(--nn-core);
  box-shadow: inset 0 0 0 1px var(--nn-core), 0 0 0 1px var(--acc), 0 0 8px color-mix(in srgb, var(--acc) 70%, transparent), inset 0 0 8px color-mix(in srgb, var(--acc) 35%, transparent);
}
:root body[data-theme="neon"] :is(.strip .head .chip, .mini-row .chip) svg { filter: drop-shadow(0 0 3px var(--acc)); }
:root body[data-theme="neon"] .muted :is(.head .chip, .chip) { color: #a597cf; box-shadow: inset 0 0 0 1px #ffffff26, 0 0 0 1px color-mix(in srgb, var(--acc) 34%, #2a2045); }
:root body[data-theme="neon"] .muted .chip svg { filter: none; }
/* The top bar: smoked glass with a pink-violet-cyan tube along its foot. */
:root body[data-theme="neon"] .bar {
  background: linear-gradient(90deg, transparent, #ff2e97 14%, #b46bff 50%, #19f0ff 86%, transparent) bottom / 100% 2px no-repeat, linear-gradient(180deg, #0d0628f0, #09041ce0);
  box-shadow: 0 1px 0 #ffffff10, 0 2px 14px #b46bff40;
}
/* Keys: dark glass with a violet edge; lit keys are filled tubes with a white-hot rim. */
:root body[data-theme="neon"] :is(.strip-routes .route, .strip .tog, .mini-row .tog, .bar .btn, .bar .keys, .route-expand) {
  border-radius: 5px; background: linear-gradient(180deg, #1b1242, #120b2d); color: #d6c9ff; box-shadow: inset 0 0 0 1px #4a3796, inset 0 1px 0 #ffffff14;
}
:root body[data-theme="neon"] :is(.strip-routes .route, .strip .tog, .mini-row .tog, .bar .btn, .bar .keys):not([aria-pressed="true"]):hover { color: #c8fbff; box-shadow: inset 0 0 0 1px #19f0ff, 0 0 10px #19f0ff66; }
:root body[data-theme="neon"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="neon"] .strip :is(.modes .tog, .tog.mono, .tog.solo, .tog.eq)[aria-pressed="true"] {
  background: linear-gradient(180deg, #ff8cc6, #ff2e97 60%); color: #20001a; box-shadow: inset 0 0 0 1px #ffffffb8, 0 0 6px #ff2e97, 0 0 18px #ff2e97aa;
}
:root body[data-theme="neon"] .strip-routes .route.b[aria-pressed="true"] { background: linear-gradient(180deg, #a6f9ff, #19f0ff 60%); color: #001c22; box-shadow: inset 0 0 0 1px #ffffffc8, 0 0 6px #19f0ff, 0 0 18px #19f0ffaa; }
:root body[data-theme="neon"] :is(.strip, .mini-row) .tog.mute[aria-pressed="true"] { background: linear-gradient(180deg, #ff93a8, #ff3860 60%); color: #22000a; box-shadow: inset 0 0 0 1px #ffffffb8, 0 0 6px #ff3860, 0 0 18px #ff3860aa; }
/* Meters: thin tube segments running cyan, violet, pink, with yellow overs. */
:root body[data-theme="neon"] .strip .well { background: #05020f; border-radius: 5px; box-shadow: inset 0 0 0 1px #2c1f5c, inset 0 0 14px #000; }
:root body[data-theme="neon"] .strip .meter { border-radius: 1px; -webkit-mask: repeating-linear-gradient(to top, #000 0 3px, transparent 3px 5px); mask: repeating-linear-gradient(to top, #000 0 3px, transparent 3px 5px); }
/* Warm sign colours, pink to orange to yellow and red over 0 dB, so Neon doesn't look like Overclock's cyan and blue. */
:root body[data-theme="neon"] .meter :is(.lit b, .unlit) { background: linear-gradient(to top, #d4147a, #ff2e97 calc(var(--p-yellow) - 14%), #ff7a3d var(--p-yellow), #ffd23f var(--p-zero), #ff2b2b var(--p-zero)); }
:root body[data-theme="neon"] .fader.h .meter :is(.lit b, .unlit) { background: linear-gradient(to right, #d4147a, #ff2e97 calc(var(--p-yellow) - 14%), #ff7a3d var(--p-yellow), #ffd23f var(--p-zero), #ff2b2b var(--p-zero)); }
:root body[data-theme="neon"] .meter .unlit { opacity: .14; }
:root body[data-theme="neon"] .meter .glow { display: block; --glow-c: #ff2e97; --glow-r: 3px; }
:root body[data-theme="neon"] .meter .pk i { background: #fff; box-shadow: 0 0 4px #fff; }
/* The track is a glass tube lit from the bottom up to the cap, with a pale core. */
:root body[data-theme="neon"] .fader:not(.h) .groove {
  --nn-h: calc(var(--cap-h) / 2 + (100% - var(--cap-h)) * var(--p, .8));
  width: 6px; margin-left: -3px; top: 0; bottom: 0; border-radius: 3px; border: 0;
  background:
    linear-gradient(90deg, transparent 2px, color-mix(in srgb, var(--acc) 35%, #fff) 2px 4px, transparent 4px) bottom / 100% var(--nn-h) no-repeat,
    linear-gradient(var(--acc), var(--acc)) bottom / 100% var(--nn-h) no-repeat,
    linear-gradient(90deg, #ffffff0d, #ffffff26 50%, #ffffff0d);
  box-shadow: none; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--acc) 80%, transparent)) drop-shadow(0 0 9px color-mix(in srgb, var(--acc) 40%, transparent));
}
:root body[data-theme="neon"] .muted .fader:not(.h) .groove { filter: none; background: linear-gradient(90deg, #ffffff0d, #ffffff26 50%, #ffffff0d); }
/* Fader caps: hollow tube capsules with a lit bar across the middle. */
:root body[data-theme="neon"] .fader:not(.h) .thumb {
  border-radius: 9px;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, color-mix(in srgb, var(--acc) 30%, #0a0620), #0a0620 75%);
  box-shadow: inset 0 0 0 1px var(--nn-core), 0 0 0 1px var(--acc), inset 0 0 0 2.5px var(--acc), inset 0 0 7px var(--acc),
    0 0 10px var(--acc), 0 0 22px color-mix(in srgb, var(--acc) 45%, transparent), 0 4px 8px #000c;
}
:root body[data-theme="neon"] .fader:not(.h) .thumb::after {
  content: ""; display: block; position: absolute; left: 10px; right: 10px; top: calc(50% - 1px); height: 2px; border-radius: 1px;
  background: var(--nn-core); box-shadow: 0 0 4px var(--acc), 0 0 8px var(--acc);
}
:root body[data-theme="neon"] .fader.dragging:not(.h) .thumb {
  box-shadow: inset 0 0 0 1px #fff, 0 0 0 1px var(--acc), inset 0 0 0 2.5px var(--acc), inset 0 0 10px var(--acc),
    0 0 16px var(--acc), 0 0 34px color-mix(in srgb, var(--acc) 60%, transparent), 0 4px 8px #000c;
}
:root body[data-theme="neon"] .muted .fader:not(.h) .thumb { background: #0d0a1e; box-shadow: inset 0 0 0 1px #ffffff40, 0 0 0 1px color-mix(in srgb, var(--acc) 40%, #2a2045), 0 4px 8px #000c; }
:root body[data-theme="neon"] .muted .fader:not(.h) .thumb::after { background: #6d6290; box-shadow: none; }
:root body[data-theme="neon"] .strip .readout { font-size: 22px; font-weight: 700; color: var(--nn-core); text-shadow: 0 0 3px var(--acc), 0 0 12px var(--acc); }
:root body[data-theme="neon"] .strip.muted .readout { color: #9d90c8; text-shadow: none; }
/* Mini mode and the tray panel: a tube track and a lit capsule that carries the level. */
:root body[data-theme="neon"] .fader.h .track {
  border-radius: 6px; background: linear-gradient(to right, color-mix(in srgb, var(--acc) 26%, transparent) calc(var(--cap-w) / 2 + (100% - var(--cap-w)) * var(--p, .8)), transparent 0), #05020f;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 55%, transparent), inset 0 0 10px #000;
}
:root body[data-theme="neon"] .fader.h .thumb {
  border-radius: 6px; background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 55%, #fff), var(--acc) 60%); color: #12051e;
  box-shadow: inset 0 0 0 1px #ffffffb8, 0 0 7px var(--acc), 0 0 18px color-mix(in srgb, var(--acc) 50%, transparent);
}
:root body[data-theme="neon"] .muted .fader.h .thumb { background: #3a3156; color: #e6e0ff; box-shadow: inset 0 0 0 1px #ffffff33; }
/* Standby: while Sleekmeeter isn't the window in front (on a second monitor, say), the signs dim to
   their bare tubes so the glow doesn't pull your eye. Colours stay, so you can still tell channels
   apart, and they light up again as soon as you click back in. Dropping the glow is cheaper, too. */
:root body[data-theme="neon"].is-idle :is(.strip, .mini-row):not(.muted)::after {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 45%, transparent), 0 0 0 1px color-mix(in srgb, var(--acc) 40%, transparent);
}
:root body[data-theme="neon"].is-idle :is(.strip, .mini-row):not(.muted) :is(.name, .mini-name, .readout) { color: color-mix(in srgb, var(--acc) 35%, #b9b0d6); text-shadow: none; }
:root body[data-theme="neon"].is-idle :is(.group-head h2, .group-head .linkish) { text-shadow: none; opacity: .75; }
:root body[data-theme="neon"].is-idle :is(.strip .head .chip, .mini-row .chip) { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 50%, transparent); }
:root body[data-theme="neon"].is-idle :is(.chip svg, .meter .lit, .fader:not(.h) .groove) { filter: none; }
:root body[data-theme="neon"].is-idle .meter .glow { display: none; }
:root body[data-theme="neon"].is-idle .fader:not(.h) .groove { opacity: .55; }
:root body[data-theme="neon"].is-idle .strip:not(.muted) .fader:not(.h) .thumb { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--acc) 70%, transparent), 0 4px 8px #000c; }
:root body[data-theme="neon"].is-idle .fader:not(.h) .thumb::after { box-shadow: none; opacity: .7; }
:root body[data-theme="neon"].is-idle :is(.strip-routes .route, .strip .tog, .mini-row .tog)[aria-pressed="true"] { box-shadow: inset 0 0 0 1px #ffffff66; filter: saturate(.7) brightness(.8); }
:root body[data-theme="neon"].is-idle .fader.h .thumb { box-shadow: inset 0 0 0 1px #ffffff66; }
:root body[data-theme="neon"].is-idle .bar { box-shadow: 0 1px 0 #ffffff10; }
:root body[data-theme="neon"].is-idle .brand-name { text-shadow: none; }
/* Theme-picker sample. */
.theme-card[data-theme="neon"] .tc-desk { background: radial-gradient(ellipse at 90% 100%, #ff2e9733, transparent 70%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='14'%3E%3Cpath d='M0 .5H24M0 7.5H24M.5 0V7M12.5 7V14' stroke='%23c7b3ff' stroke-opacity='.12' fill='none'/%3E%3C/svg%3E"), #07031a; }
.theme-card[data-theme="neon"] .tc-mod { border-radius: 5px; background: #0d0820; box-shadow: inset 0 0 0 1px #ffd0ec, inset 0 0 0 2px #ff2e97, 0 0 7px #ff2e97, inset 0 0 8px #ff2e9766; }
.theme-card[data-theme="neon"] .tc-mod + .tc-mod { box-shadow: inset 0 0 0 1px #d4fcff, inset 0 0 0 2px #19f0ff, 0 0 7px #19f0ff, inset 0 0 8px #19f0ff66; }
.theme-card[data-theme="neon"] .tc-cap { height: 6px; border-radius: 3px; background: #0a0620; box-shadow: inset 0 0 0 1.5px #ff2e97, 0 0 6px #ff2e97; }
/* Theme motion: the tubes hum softly; in Full, a couple of signs buzz now and then. */
@media (prefers-reduced-motion: no-preference) {
  body[data-theme="neon"]:not([data-theme-motion="off"]) :is(.strip, .mini-row):not(.muted)::after { animation: nn-hum 5s ease-in-out infinite alternate; }
  body[data-theme="neon"][data-theme-motion="full"] .strip:nth-child(3n+2):not(.muted)::after { animation: nn-buzz 9s steps(1) infinite; }
  body[data-theme="neon"][data-theme-motion="full"] .strip:nth-child(4n+3):not(.muted)::after { animation: nn-buzz 13s steps(1) -5s infinite; }
}
@keyframes nn-hum { from { opacity: .82; } to { opacity: 1; } }
@keyframes nn-buzz { 0%, 88%, 89.5%, 92%, 100% { opacity: 1; } 88.5% { opacity: .25; } 90.5% { opacity: .55; } 91.2% { opacity: .2; } }

/* ---------------------------------------------------------------- Abyss */
/* The deep sea at night: ink-blue water fading to black, faint shafts of light from far above and
   marine snow drifting down through them. Channels are dark pressure-glass panels with a
   bioluminescent rim lit in the channel's colour, meters are columns of glowing plankton, readouts
   are depth gauges, and fader caps are glowing lures. Theme motion: the rims pulse slowly and the
   light shafts sway (Subtle and Full); marine snow falls (Full, slower in Subtle). */
[data-theme="abyss"] {
  --bg: #020812; --bay: #04101c66; --bay-edge: #7fe9ff0d; --bay-shadow: inset 0 1px 0 #7fe9ff0a;
  --mod-a: #0c2133e6; --mod-b: #040b14f2; --mod-edge: #7fe9ff1f; --mod-shadow: 0 26px 46px -18px #000;
  --key: #0b1d2ecc; --key-hi: #12304a; --key-edge: #7fe9ff1a; --key-ink: #8fb3c9; --key-shadow: none;
  --well: #01060c; --flyout: #061220f5; --line: #7fe9ff17;
  --ink: #e3f6ff; --ink-2: #b8d4e3; --muted: #6f8ea3;
  --amber: #3ff2d6; --cyan: #5fa8ff; --red: #ff5f7e; --solo: #7cf7ff; --on-ink: #01201c;
  --focus: #3ff2d6; --panel-hi: #0f2537; --track: #ffffff0d;
  --led-g: #1fb8c9; --led-y: #7df9e3; --led-r: #ff6a7d;
  --led-g-off: #06202a; --led-y-off: #08262a; --led-r-off: #2a0c14;
  --glow: 1; --scroll: #12304a; --scroll-hi: #1b4564;
  --field: #030c17; --rail: #0b1d2e; --switch: #12304a;
  --cap-w: 26px; --cap-h: 26px;
  --pop-shadow: 0 0 0 1px #7fe9ff1a, 0 30px 70px #000, 0 0 50px #3ff2d612;
  --cap-metal: radial-gradient(circle, #fff, #7df9e3 60%); --cap-ridge: transparent;
  --cap-shadow: 0 6px 12px #000c; --cap-ink: #01201c;
  --c-slate: #9db6c8; --c-amber: #ffcf6e; --c-coral: #ff8a6e; --c-rose: #ff7fc8;
  --c-violet: #a68bff; --c-blue: #5fa8ff; --c-cyan: #3ff2d6; --c-green: #8bff9e;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --ab-gauge: "IBM Plex Mono", Consolas, monospace;
  --warning-ink: #ffd27a;
}
:root body[data-theme="abyss"] { background: #020812; }
/* The water: a faint glow far above, fading to black; shafts of light sway in it (::before). */
:root body[data-theme="abyss"] .theme-light {
  --ambient-base: radial-gradient(ellipse 75% 45% at 50% -12%, #0f4a6699, transparent 72%), radial-gradient(ellipse 60% 40% at 15% 115%, #3ff2d60d, transparent 70%), linear-gradient(180deg, #06182a, #030c18 45%, #01040a);
  --ambient-accent: repeating-linear-gradient(104deg, transparent 0 6%, #8fe9ff1c 8%, transparent 11%, transparent 15%, #8fe9ff12 16.5%, transparent 19%);
}
:root body[data-theme="abyss"] .theme-light::before { inset: -20% -10% 25%; }
:root body[data-theme="abyss"] .theme-light::after { content: ""; position: absolute; inset: 0; background: var(--sm-noise); opacity: .16; mix-blend-mode: overlay; }
:root body[data-theme="abyss"] .glass-aurora { display: none; }
:root body[data-theme="abyss"] .theme-fx b { width: 2px; height: 2px; border-radius: 50%; background: #cfefff; opacity: .45; }
:root body[data-theme="abyss"] .theme-fx b:nth-child(3n) { width: 3px; height: 3px; opacity: .25; filter: blur(.5px); }
:root body[data-theme="abyss"] .theme-fx b:nth-child(7n) { background: #7df9e3; opacity: .8; box-shadow: 0 0 6px #3ff2d6; }
:root body[data-theme="abyss"] .group-head h2 { color: #5fd9c8; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; font-size: 11px; }
:root body[data-theme="abyss"] .linkish { color: #7df9e3; }
:root body[data-theme="abyss"] :is(.strip .name, .mini-name, .brand-name, .dlg-head h2) { font-family: var(--font); font-weight: 600; letter-spacing: -.01em; }
:root body[data-theme="abyss"] .strip .name { font-size: 15px; }
:root body[data-theme="abyss"] .brand-name { background: linear-gradient(90deg, #e3f6ff, #7df9e3); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root body[data-theme="abyss"] .brand-mark { filter: drop-shadow(0 0 6px #3ff2d680); }
/* Pressure glass: a dark, slightly clear panel with a glow pooling under the rim. */
:root body[data-theme="abyss"] :is(.strip, .mini-row) {
  border-radius: 20px;
  background: radial-gradient(120% 34% at 50% 0%, color-mix(in srgb, var(--acc) 13%, transparent), transparent 72%), linear-gradient(180deg, var(--mod-a), var(--mod-b));
  box-shadow: inset 0 0 0 1px #7fe9ff0f, 0 -10px 34px -22px var(--acc), var(--mod-shadow);
}
:root body[data-theme="abyss"] .mini-row { border-radius: 14px; }
:root body[data-theme="abyss"] :is(.strip, .mini-row):hover { background: radial-gradient(120% 34% at 50% 0%, color-mix(in srgb, var(--acc) 20%, transparent), transparent 72%), linear-gradient(180deg, #0f283de8, #050d17f2); }
/* The bioluminescent rim: bright in the channel's colour along the top, fading down the sides. */
:root body[data-theme="abyss"] .strip::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.3px; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 85%, #fff), color-mix(in srgb, var(--acc) 35%, transparent) 14%, transparent 40%, transparent 85%, #7fe9ff14);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--acc) 70%, transparent));
}
:root body[data-theme="abyss"] .strip.muted::before { background: linear-gradient(180deg, #ff5f7e99, #ff5f7e1f 14%, transparent 40%, transparent 85%, #7fe9ff0d); filter: none; opacity: .7; }
:root body[data-theme="abyss"] .strip.muted { background: linear-gradient(180deg, #0a1826e0, #03080ff2); box-shadow: inset 0 0 0 1px #7fe9ff0a, var(--mod-shadow); }
/* The channel icon: a dark bulb with its glyph glowing in the channel's colour. */
:root body[data-theme="abyss"] :is(.strip .head .chip, .mini-row .chip) {
  border-radius: 50%; color: color-mix(in srgb, var(--acc) 70%, #fff);
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--acc) 30%, #04101c), #04101c 72%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 45%, transparent), 0 0 14px color-mix(in srgb, var(--acc) 35%, transparent);
}
:root body[data-theme="abyss"] .strip.muted .head .chip { color: #6f8ea3; background: #04101c; box-shadow: inset 0 0 0 1px #7fe9ff1a; }
:root body[data-theme="abyss"] .strip .sub { color: var(--muted); }
:root body[data-theme="abyss"] .strip .bus-tag { color: #7df9e3; }
/* Keys: dark water glass; switched-on keys glow like bioluminescence, with dark labels. */
:root body[data-theme="abyss"] :is(.btn, .route, .tog, .keys, select, .scene-list .load, .route-expand) { border-radius: 9px; background: var(--key); color: var(--key-ink); box-shadow: inset 0 0 0 1px var(--key-edge); }
:root body[data-theme="abyss"] :is(.btn, .route, .tog, .keys):not([aria-pressed="true"]):hover { background: var(--key-hi); color: var(--ink); box-shadow: inset 0 0 0 1px #7fe9ff33; }
:root body[data-theme="abyss"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="abyss"] :is(.strip, .mini-row) :is(.modes .tog, .tog.mono, .tog.eq)[aria-pressed="true"] {
  color: #01201c; background: linear-gradient(180deg, #a6fff0, #3ff2d6); box-shadow: inset 0 1px 0 #fffa, 0 0 14px #3ff2d673;
}
:root body[data-theme="abyss"] .strip-routes .route.b[aria-pressed="true"] { color: #031a33; background: linear-gradient(180deg, #cfe6ff, #6fb2ff); box-shadow: inset 0 1px 0 #fffa, 0 0 14px #5fa8ff73; }
:root body[data-theme="abyss"] :is(.strip, .mini-row) .tog.solo[aria-pressed="true"] { color: #032128; background: linear-gradient(180deg, #e6ffff, #7cf7ff); box-shadow: inset 0 1px 0 #fff, 0 0 16px #7cf7ff80; }
:root body[data-theme="abyss"] :is(.strip, .mini-row) .tog.mute[aria-pressed="true"] { color: #33040f; background: linear-gradient(180deg, #ffb3b0, #ff5f7e); box-shadow: inset 0 1px 0 #fff8, 0 0 16px #ff5f7e66; }
:root body[data-theme="abyss"] :is(.btn.primary, .btn[aria-pressed="true"], .update-btn) { color: #01201c; background: linear-gradient(180deg, #a6fff0, #3ff2d6); box-shadow: inset 0 1px 0 #fff, 0 0 16px #3ff2d659; }
:root body[data-theme="abyss"] .bar { background: #030b15e6; box-shadow: inset 0 -1px 0 #7fe9ff14; }
/* Meters: columns of glowing plankton, deep teal rising to aqua and white, and coral past 0 dB. */
:root body[data-theme="abyss"] .strip .well { border-radius: 999px; background: #01060c; box-shadow: inset 0 1px 3px #000, inset 0 0 0 1px #7fe9ff0d; }
:root body[data-theme="abyss"] .meter { -webkit-mask: repeating-linear-gradient(to top, #000 0 3px, #0006 3px 4px); mask: repeating-linear-gradient(to top, #000 0 3px, #0006 3px 4px); border-radius: 999px; }
:root body[data-theme="abyss"] .fader.h .meter { -webkit-mask: repeating-linear-gradient(to right, #000 0 3px, #0006 3px 4px); mask: repeating-linear-gradient(to right, #000 0 3px, #0006 3px 4px); }
:root body[data-theme="abyss"] .meter .unlit { background: color-mix(in srgb, var(--acc, #3ff2d6) 6%, transparent); }
/* Bioluminescence: each channel's meter glows in its own colour (Halo's are all one light). */
:root body[data-theme="abyss"] .meter .lit b { background: linear-gradient(to top, color-mix(in srgb, var(--acc, #3ff2d6) 35%, #04202c), color-mix(in srgb, var(--acc, #3ff2d6) 80%, #04202c) 30%, var(--acc, #3ff2d6) var(--p-yellow), color-mix(in srgb, var(--acc, #3ff2d6) 30%, #e6fffb) var(--p-zero), #ff6a7d var(--p-zero)); }
:root body[data-theme="abyss"] .fader.h .meter .lit b { background: linear-gradient(to right, color-mix(in srgb, var(--acc, #3ff2d6) 35%, #04202c), color-mix(in srgb, var(--acc, #3ff2d6) 80%, #04202c) 30%, var(--acc, #3ff2d6) var(--p-yellow), color-mix(in srgb, var(--acc, #3ff2d6) 30%, #e6fffb) var(--p-zero), #ff6a7d var(--p-zero)); }
:root body[data-theme="abyss"] .meter .glow { display: block; --glow-c: color-mix(in srgb, var(--acc, #3ff2d6) 60%, transparent); --glow-r: 4px; }
:root body[data-theme="abyss"] .muted .meter .lit b { filter: saturate(.15) brightness(.6); }
:root body[data-theme="abyss"] .fader:not(.h) .meter .pk i { background: #e6fffb; box-shadow: 0 0 6px #7df9e3; height: 2px; border-radius: 1px; }
/* Fader: a fine stalk lit in the channel's colour up to the cap, and a cap that is a glowing lure. */
:root body[data-theme="abyss"] .fader .groove::before { display: none; }
:root body[data-theme="abyss"] .fader:not(.h) .groove {
  width: 2px; margin-left: -1px; border: 0; border-radius: 2px;
  background: linear-gradient(to top, color-mix(in srgb, var(--acc) 20%, transparent), color-mix(in srgb, var(--acc) 85%, #fff) calc(var(--cap-h) / 2 + var(--p, 0) * (100% - var(--cap-h))), #7fe9ff12 0);
  box-shadow: 0 0 8px color-mix(in srgb, var(--acc) 35%, transparent);
}
:root body[data-theme="abyss"] .muted .fader:not(.h) .groove { background: linear-gradient(to top, #ffffff0d, #ffffff33 calc(var(--cap-h) / 2 + var(--p, 0) * (100% - var(--cap-h))), #7fe9ff0d 0); box-shadow: none; }
:root body[data-theme="abyss"] .fader .thumb {
  border-radius: 50%; clip-path: none; filter: none;
  background: radial-gradient(circle, #fff 0 13%, color-mix(in srgb, var(--acc) 80%, #fff) 24%, color-mix(in srgb, var(--acc) 50%, transparent) 44%, #06121e 66%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--acc) 45%, #ffffff30), 0 0 16px color-mix(in srgb, var(--acc) 60%, transparent), 0 0 38px color-mix(in srgb, var(--acc) 22%, transparent), 0 6px 12px #000c;
}
:root body[data-theme="abyss"] .fader .thumb::before { content: none; }
:root body[data-theme="abyss"] .fader:not(.h) .thumb::after { display: none; }
:root body[data-theme="abyss"] .muted .fader .thumb { background: radial-gradient(circle, #8aa3b4 0 12%, #3a5366 30%, #06121e 64%); box-shadow: inset 0 0 0 1.5px #ffffff1f, 0 6px 12px #000c; }
:root body[data-theme="abyss"] .fader.dragging .thumb { box-shadow: inset 0 0 0 2px #fff, 0 0 0 6px color-mix(in srgb, var(--acc) 22%, transparent), 0 0 30px var(--acc), 0 6px 12px #000c; }
:root body[data-theme="abyss"] .unity { background: #7df9e3; opacity: .3; }
:root body[data-theme="abyss"] .scale span { color: #4f6d82; font-size: 10px; }
:root body[data-theme="abyss"] .scale span.zero { color: #b8d4e3; }
/* The level readout: a depth gauge. */
:root body[data-theme="abyss"] .strip .readout { font-family: var(--ab-gauge); font-weight: 600; font-size: 18px; letter-spacing: -.02em; color: #e3f6ff; background: transparent; text-shadow: 0 0 12px color-mix(in srgb, var(--acc) 45%, transparent); }
:root body[data-theme="abyss"] .strip .readout:hover { background: #7fe9ff12; }
:root body[data-theme="abyss"] .muted .readout { color: #ff9aab; text-shadow: none; }
/* Mini mode and the tray panel. */
:root body[data-theme="abyss"] .fader.h { --cap-w: 44px; }
:root body[data-theme="abyss"] .fader.h .track { border-radius: 999px; background: linear-gradient(to right, color-mix(in srgb, var(--acc) 18%, transparent) calc(var(--cap-w) / 2 + (100% - var(--cap-w)) * var(--p, .8)), transparent 0), #01060c; box-shadow: inset 0 0 0 1px #7fe9ff12; }
:root body[data-theme="abyss"] .fader.h .thumb { border-radius: 999px; color: #fff; background: radial-gradient(60% 90% at 50% 50%, color-mix(in srgb, var(--acc) 35%, #06121e), #06121e); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--acc) 75%, #fff), 0 0 14px color-mix(in srgb, var(--acc) 50%, transparent); }
:root body[data-theme="abyss"] .muted .fader.h .thumb { background: #06121e; box-shadow: inset 0 0 0 1.5px #ffffff26; }
:root body[data-theme="abyss"] .fader.h .db { color: #fff; font-family: var(--ab-gauge); }
/* Dialogs, menus and window buttons. */
:root body[data-theme="abyss"] :is(.dlg, .menu) { border-radius: 18px; background: var(--flyout); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 1px 0 #7fe9ff1a, var(--pop-shadow); }
:root body[data-theme="abyss"] .dlg::backdrop { background: rgba(1, 6, 14, .6); backdrop-filter: blur(6px); }
:root body[data-theme="abyss"] .wc { border-radius: 9px; }
:root body[data-theme="abyss"] .wc:hover { background: var(--key-hi); }
:root body[data-theme="abyss"] .wc.close:hover { background: #ff5f7e; color: #33040f; }
/* Theme-picker sample. */
.theme-card[data-theme="abyss"] .tc-desk { background: repeating-linear-gradient(104deg, transparent 0 14%, #8fe9ff12 17%, transparent 21%), radial-gradient(ellipse 80% 50% at 50% -10%, #0f4a66, transparent 75%), linear-gradient(180deg, #06182a, #01040a); }
.theme-card[data-theme="abyss"] .tc-mod { border-radius: 8px; background: linear-gradient(180deg, #0c2133, #040b14); box-shadow: inset 0 1px 0 #3ff2d6, inset 0 0 0 1px #7fe9ff1a, 0 -3px 10px -4px #3ff2d6; }
.theme-card[data-theme="abyss"] :is(.tc-keys i, .tc-mute) { border-radius: 3px; background: #12304a; }
.theme-card[data-theme="abyss"] .tc-keys i.on.a { background: #3ff2d6; box-shadow: 0 0 5px #3ff2d6; }
.theme-card[data-theme="abyss"] .tc-keys i.on.b { background: #6fb2ff; box-shadow: 0 0 5px #5fa8ff; }
.theme-card[data-theme="abyss"] .tc-mute.on { background: #ff5f7e; }
.theme-card[data-theme="abyss"] .tc-well { background: #01060c; border-radius: 99px; }
.theme-card[data-theme="abyss"] .tc-well b { background: linear-gradient(to top, #0a6f8a, #3ff2d6); border-radius: 99px; box-shadow: 0 0 4px #3ff2d6; }
.theme-card[data-theme="abyss"] .tc-cap { width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: radial-gradient(circle, #fff 0 20%, #7df9e3 40%, #06121e 75%); box-shadow: 0 0 7px #3ff2d6; }
.theme-card[data-theme="abyss"] .tc-slot::before { width: 2px; margin-left: -1px; background: linear-gradient(to top, #0a6f8a, #7df9e3); }
/* Theme motion: the rims pulse slowly, each in its own time, and the light shafts sway.
   Marine snow falls through the water (Full; slower in Subtle). */
@media (prefers-reduced-motion: no-preference) {
  body[data-theme="abyss"]:not([data-theme-motion="off"]) .strip:not(.muted)::before { animation: ab-pulse 6s ease-in-out infinite alternate; }
  body[data-theme="abyss"]:not([data-theme-motion="off"]) .strip:nth-child(3n + 2)::before { animation-delay: -2s; animation-duration: 7.5s; }
  body[data-theme="abyss"]:not([data-theme-motion="off"]) .strip:nth-child(3n + 3)::before { animation-delay: -4s; animation-duration: 5.2s; }
  body[data-theme="abyss"]:not([data-theme-motion="off"]) .theme-light::before { animation: ab-sway var(--ambient-time, 30s) ease-in-out infinite alternate; }
  body[data-theme="abyss"][data-theme-motion="full"] .theme-fx b { animation: ab-snow var(--d) linear infinite; animation-delay: var(--dl); }
  body[data-theme="abyss"][data-theme-motion="subtle"] .theme-fx b { animation: ab-snow calc(var(--d) * 1.8) linear infinite; animation-delay: var(--dl); }
  body[data-theme="abyss"][data-theme-motion="full"] .tog.mute[aria-pressed="true"] { animation: ab-mute 2.4s ease-in-out infinite; }
}
@keyframes ab-pulse { from { opacity: .55; } to { opacity: 1; } }
@keyframes ab-sway { from { transform: translateX(-3%) skewX(-2deg); opacity: .7; } to { transform: translateX(3%) skewX(2deg); opacity: 1; } }
@keyframes ab-snow { from { transform: translate(0, 0); } 50% { transform: translate(10px, 55vh); } to { transform: translate(-4px, 112vh); } }
@keyframes ab-mute { 50% { box-shadow: inset 0 1px 0 #fff8, 0 0 4px #ff5f7e33; } }

/* ---------------------------------------------------------------- Riso */
/* A risograph-printed zine: off-white paper with a grainy tooth, printed in fluoro pink and riso
   blue that never quite line up. Each channel is a card outlined in blue ink with its own colour
   printed slightly off-register behind it and a halftone band across the top; meters are rows of
   halftone dots, fader caps are yellow stickers, and pressed keys are filled with ink. Names and
   levels are set in Archivo Black. Theme motion: the halftone in the corner drifts (Subtle and Full). */
[data-theme="riso"] {
  --bg: #f3eee2; --bay: transparent; --bay-edge: transparent; --bay-shadow: none;
  --mod-a: #f8f4eb; --mod-b: #f8f4eb; --mod-edge: #0078bf; --mod-shadow: none;
  --key: #f8f4eb; --key-hi: #ffffff; --key-edge: transparent; --key-ink: #0b5c99; --key-shadow: inset 0 0 0 1.5px #0078bf;
  --well: #0078bf0f; --flyout: #f8f4ebfa; --line: #0078bf4d;
  --ink: #0b4f86; --ink-2: #0b5c99; --muted: #4c6c8a;
  --amber: #ff48b0; --cyan: #00a95c; --red: #e8364f; --solo: #ffe800; --on-ink: #0b3d66;
  --focus: #ff48b0; --panel-hi: #ece5d6; --track: #0078bf26;
  --led-g: #0078bf; --led-y: #ff48b0; --led-r: #ff6c2f;
  --led-g-off: #0078bf1a; --led-y-off: #ff48b01f; --led-r-off: #ff6c2f1f;
  --glow: 0; --scroll: #cfc5b1; --scroll-hi: #b5a98f;
  --field: #fbf8f1; --rail: #0078bf33; --switch: #d8cfbf;
  --cap-w: 40px; --cap-h: 22px;
  --pop-shadow: 0 0 0 2px #0078bf, 5px 5px 0 #ff48b0;
  --cap-metal: #ffe800; --cap-ridge: transparent; --cap-shadow: inset 0 0 0 2px #0078bf, 3px 3px 0 #ff48b0; --cap-ink: #0b4f86;
  --c-slate: #6c7a89; --c-amber: #f5a800; --c-coral: #ff6c2f; --c-rose: #ff48b0;
  --c-violet: #765ba7; --c-blue: #0078bf; --c-cyan: #00a0b8; --c-green: #00a95c;
  --font: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --rs-display: "Archivo Black", "Arial Black", "Segoe UI", sans-serif;
  --rs-mono: "IBM Plex Mono", Consolas, monospace;
  --rs-blue: #0078bf; --rs-pink: #ff48b0; --rs-yellow: #ffe800;
  --rs-off: 1.5px 1px 0 #ff48b08c;
  --warning-ink: #8a3b00;
  color-scheme: light;
}
:root body[data-theme="riso"] { background: #f3eee2; }
/* The paper, with a pink halftone circle top right and a yellow blot bottom left. */
:root body[data-theme="riso"] .theme-light {
  --ambient-base: radial-gradient(ellipse 22% 26% at 4% 104%, #ffe800c0, #ffe80000 100%), radial-gradient(ellipse 16% 20% at 12% 98%, #ffe800, transparent 100%), linear-gradient(180deg, #f6f2e8, #f0eadc);
  --ambient-accent: radial-gradient(circle, #ff48b0 0 2.4px, transparent 2.8px) 0 0 / 9px 9px;
}
:root body[data-theme="riso"] .theme-light::before { inset: -12% -12% auto auto; width: 460px; height: 460px; border-radius: 50%; mask-image: radial-gradient(circle closest-side, #000 55%, transparent 100%); opacity: .5; mix-blend-mode: multiply; }
:root body[data-theme="riso"] .theme-light::after { content: ""; position: absolute; inset: 0; background: var(--sm-noise); opacity: .6; mix-blend-mode: multiply; }
:root body[data-theme="riso"] .glass-aurora { display: none; }
:root body[data-theme="riso"] .group { border-radius: 0; background: transparent; box-shadow: none; }
:root body[data-theme="riso"] .group-head [data-reveal] { position: relative; z-index: 1; padding: 1px 5px; background: var(--bg); color: var(--rs-blue); }
:root body[data-theme="riso"] .group-head h2 { font-family: var(--rs-display); font-weight: 400; font-size: 14px; letter-spacing: .02em; text-transform: uppercase; color: var(--rs-blue); text-shadow: var(--rs-off); }
:root body[data-theme="riso"] .linkish { color: #c2187f; }
:root body[data-theme="riso"] :is(.strip .name, .mini-name, .brand-name, .dlg-head h2) { font-family: var(--rs-display); font-weight: 400; letter-spacing: .01em; color: var(--ink); text-shadow: var(--rs-off); }
:root body[data-theme="riso"] :is(.strip .name, .mini-name, .brand-name) { text-transform: uppercase; }
:root body[data-theme="riso"] .strip .name { font-size: 14px; }
:root body[data-theme="riso"] .brand-name { font-size: 19px; }
:root body[data-theme="riso"] .strip .sub { color: var(--muted); font-family: var(--rs-mono); font-size: 11px; }
:root body[data-theme="riso"] .strip .bus-tag { color: color-mix(in srgb, var(--acc) 70%, #0b3d66); }
/* Channels: a card outlined in blue ink, its colour printed off-register behind, a halftone band on top. */
:root body[data-theme="riso"] :is(.strip, .mini-row) {
  position: relative; isolation: isolate; border-radius: 2px; background: var(--mod-a);
  box-shadow: inset 0 0 0 2px var(--rs-blue), 4px 4px 0 color-mix(in srgb, var(--acc) 80%, #ff48b0);
}
:root body[data-theme="riso"] .strip::before {
  content: ""; position: absolute; left: 2px; right: 2px; top: 2px; height: 64px; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, var(--acc) 0 1.6px, transparent 2px) 0 0 / 6px 6px; opacity: .38; mix-blend-mode: multiply;
  -webkit-mask: linear-gradient(#000 40%, transparent); mask: linear-gradient(#000 40%, transparent);
}
:root body[data-theme="riso"] .mini-row { box-shadow: inset 0 0 0 2px var(--rs-blue), 3px 3px 0 color-mix(in srgb, var(--acc) 80%, #ff48b0); }
:root body[data-theme="riso"] :is(.strip, .mini-row):hover { box-shadow: inset 0 0 0 2px var(--rs-blue), 6px 6px 0 color-mix(in srgb, var(--acc) 80%, #ff48b0); }
/* Muted: the colour plate is left off; only a faint blue proof remains. */
:root body[data-theme="riso"] :is(.strip, .mini-row).muted { box-shadow: inset 0 0 0 2px #0078bf73, 4px 4px 0 #0078bf26; }
:root body[data-theme="riso"] .strip.muted::before { opacity: .12; }
:root body[data-theme="riso"] .strip.muted :is(.name, .readout) { color: #6a86a3; text-shadow: none; }
/* The channel icon: a dot of the channel's colour with the glyph knocked out of it. */
:root body[data-theme="riso"] :is(.strip .head .chip, .mini-row .chip) {
  border-radius: 50%; color: #f8f4eb; background: var(--acc); box-shadow: 2px 1.5px 0 var(--rs-blue);
}
:root body[data-theme="riso"] .strip.muted .head .chip { color: #f8f4eb; background: #9fb1c3; box-shadow: none; }
/* Keys: blue-outlined boxes. Pressed keys are filled with ink. */
:root body[data-theme="riso"] :is(.btn, .route, .tog, .keys, select, .scene-list .load, .route-expand) {
  border-radius: 0; background: var(--key); color: var(--key-ink); font-weight: 600; box-shadow: var(--key-shadow);
}
:root body[data-theme="riso"] :is(.route, .tog) { font-family: var(--rs-mono); }
:root body[data-theme="riso"] :is(.btn, .route, .tog, .keys):not([aria-pressed="true"]):hover { background: #fff; box-shadow: inset 0 0 0 2px var(--rs-blue), 2px 2px 0 var(--rs-pink); }
:root body[data-theme="riso"] .strip-routes .route.a[aria-pressed="true"], :root body[data-theme="riso"] :is(.strip, .mini-row) :is(.modes .tog, .tog.mono, .tog.eq)[aria-pressed="true"] {
  color: #f8f4eb; background: var(--rs-blue); box-shadow: inset 0 0 0 1.5px var(--rs-blue), 2px 2px 0 var(--rs-pink);
}
:root body[data-theme="riso"] .strip-routes .route.b[aria-pressed="true"] { color: #0b3d66; background: var(--rs-pink); box-shadow: inset 0 0 0 1.5px var(--rs-blue), 2px 2px 0 var(--rs-blue); }
:root body[data-theme="riso"] :is(.strip, .mini-row) .tog.solo[aria-pressed="true"] { color: #0b3d66; background: var(--rs-yellow); box-shadow: inset 0 0 0 1.5px var(--rs-blue), 2px 2px 0 var(--rs-pink); }
:root body[data-theme="riso"] :is(.strip, .mini-row) .tog.mute[aria-pressed="true"] { color: #fff; background: var(--red); box-shadow: inset 0 0 0 1.5px var(--rs-blue), 2px 2px 0 var(--rs-blue); }
:root body[data-theme="riso"] :is(.btn.primary, .btn[aria-pressed="true"], .update-btn) { color: #f8f4eb; background: var(--rs-blue); box-shadow: 3px 3px 0 var(--rs-pink); }
:root body[data-theme="riso"] .bar { background: #f3eee2f0; box-shadow: inset 0 -2px 0 var(--rs-blue); }
:root body[data-theme="riso"] .bar :is(.btn, .keys) { box-shadow: inset 0 0 0 1.5px var(--rs-blue); text-transform: uppercase; letter-spacing: .05em; }
:root body[data-theme="riso"] .bar :is(#pinBtn, #dockBtn)[aria-pressed="true"] { background: var(--rs-blue); color: #f8f4eb; }
/* Meters: rows of halftone dots in the channel's colour, pink near 0 dB and orange past it. */
:root body[data-theme="riso"] .strip .well { border-radius: 0; background: transparent; box-shadow: inset 0 0 0 1.5px #0078bf59; }
:root body[data-theme="riso"] .meter { border-radius: 0; -webkit-mask: radial-gradient(circle, #000 0 2.1px, transparent 2.5px) 50% 100% / 100% 5px; mask: radial-gradient(circle, #000 0 2.1px, transparent 2.5px) 50% 100% / 100% 5px; }
:root body[data-theme="riso"] .fader.h .meter { -webkit-mask: radial-gradient(circle, #000 0 1.8px, transparent 2.2px) 0 50% / 5px 100%; mask: radial-gradient(circle, #000 0 1.8px, transparent 2.2px) 0 50% / 5px 100%; }
:root body[data-theme="riso"] .meter .unlit { background: #0078bf24; }
:root body[data-theme="riso"] .meter .lit b { background: linear-gradient(to top, var(--acc), var(--acc) var(--p-yellow), var(--rs-pink) var(--p-yellow), var(--rs-pink) var(--p-zero), #ff6c2f var(--p-zero)); }
:root body[data-theme="riso"] .fader.h .meter .lit b { background: linear-gradient(to right, var(--acc), var(--acc) var(--p-yellow), var(--rs-pink) var(--p-yellow), var(--rs-pink) var(--p-zero), #ff6c2f var(--p-zero)); }
:root body[data-theme="riso"] .muted .meter .lit b { filter: saturate(0); opacity: .5; }
:root body[data-theme="riso"] .meter .pk i { background: var(--rs-pink); height: 3px; }
:root body[data-theme="riso"] .fader.h .meter .pk i { width: 3px; height: auto; }
/* Fader: a blue ink rule, overprinted in the channel's colour up to a yellow sticker cap. */
:root body[data-theme="riso"] .fader .groove::before { display: none; }
:root body[data-theme="riso"] .fader:not(.h) .groove {
  width: 8px; margin-left: -4px; border: 0; border-radius: 0; box-shadow: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--acc) 85%, transparent) calc(var(--p, 0) * 100%), transparent 0) center / 6px 100% no-repeat, linear-gradient(var(--rs-blue), var(--rs-blue)) center / 2px 100% no-repeat;
}
:root body[data-theme="riso"] .muted .fader:not(.h) .groove { background: linear-gradient(#0078bf80, #0078bf80) center / 2px 100% no-repeat; }
:root body[data-theme="riso"] .fader .thumb { border-radius: 0; clip-path: none; filter: none; background: var(--cap-metal); box-shadow: var(--cap-shadow); }
:root body[data-theme="riso"] .fader .thumb::before { content: none; }
:root body[data-theme="riso"] .fader:not(.h) .thumb::after { left: 7px; right: 7px; width: auto; top: calc(50% - 1.5px); height: 3px; margin: 0; border-radius: 0; background: var(--rs-blue); box-shadow: none; transform: none; font-size: 0; }
:root body[data-theme="riso"] .muted .fader .thumb { background: #e8e2d3; box-shadow: inset 0 0 0 2px #0078bf80; }
:root body[data-theme="riso"] .fader.dragging .thumb { box-shadow: inset 0 0 0 2px var(--rs-blue), 5px 5px 0 var(--rs-pink); }
:root body[data-theme="riso"] .unity { background: var(--rs-pink); opacity: .9; height: 2px; }
:root body[data-theme="riso"] .scale span { color: #0078bfb3; font-size: 10px; font-family: var(--rs-mono); }
:root body[data-theme="riso"] .scale span.zero { color: #c2187f; font-weight: 700; }
/* The level readout: big block type with the pink plate slightly off. */
:root body[data-theme="riso"] .strip .readout { font-family: var(--rs-display); font-weight: 400; font-size: 21px; color: var(--ink); background: transparent; letter-spacing: 0; text-shadow: 2px 1px 0 #ff48b08c; }
:root body[data-theme="riso"] .strip .readout:hover { background: color-mix(in srgb, var(--acc) 14%, transparent); }
/* Mini mode and the tray panel: an outlined track and a yellow sticker that carries the level. */
:root body[data-theme="riso"] .fader.h { --cap-w: 46px; }
:root body[data-theme="riso"] .fader.h .track { border-radius: 0; background: linear-gradient(to right, color-mix(in srgb, var(--acc) 26%, transparent) calc(var(--cap-w) / 2 + (100% - var(--cap-w)) * var(--p, .8)), transparent 0), #0078bf0a; box-shadow: inset 0 0 0 1.5px var(--rs-blue); }
:root body[data-theme="riso"] .fader.h .thumb { top: 0; bottom: 0; border-radius: 0; color: var(--cap-ink); background: var(--cap-metal); box-shadow: inset 0 0 0 2px var(--rs-blue), 2px 2px 0 var(--rs-pink); }
:root body[data-theme="riso"] .muted .fader.h .thumb { background: #e8e2d3; }
:root body[data-theme="riso"] .fader.h .db { color: var(--cap-ink); font-family: var(--rs-mono); font-weight: 600; font-size: 11px; padding: 0; }
:root body[data-theme="riso"] .duck-tag { color: #0b3d66; }
/* Dialogs, menus and window buttons. */
:root body[data-theme="riso"] :is(.dlg, .menu) { border-radius: 2px; background: var(--sm-noise), var(--flyout); background-blend-mode: multiply, normal; box-shadow: var(--pop-shadow); }
:root body[data-theme="riso"] .dlg::backdrop { background: rgba(243, 238, 226, .55); backdrop-filter: blur(2px); }
:root body[data-theme="riso"] .wc { border-radius: 0; }
:root body[data-theme="riso"] .wc:hover { background: #0078bf1a; }
:root body[data-theme="riso"] .wc.close:hover { background: var(--red); color: #fff; }
/* Theme-picker sample. */
.theme-card[data-theme="riso"] .tc-desk { border-radius: 2px; background: radial-gradient(circle at 92% 8%, #ff48b04d 0 16px, transparent 17px), radial-gradient(ellipse 30% 40% at 6% 100%, #ffe800, transparent 100%), #f3eee2; }
.theme-card[data-theme="riso"] .tc-mod { border-radius: 1px; background: #f8f4eb; box-shadow: inset 0 0 0 1.2px #0078bf, 2px 2px 0 #ff48b0; }
.theme-card[data-theme="riso"] .tc-mod:nth-child(2) { box-shadow: inset 0 0 0 1.2px #0078bf, 2px 2px 0 #00a95c; }
.theme-card[data-theme="riso"] :is(.tc-keys i, .tc-mute) { border-radius: 0; background: #f8f4eb; box-shadow: inset 0 0 0 .8px #0078bf; }
.theme-card[data-theme="riso"] .tc-keys i.on.a { background: #0078bf; }
.theme-card[data-theme="riso"] .tc-keys i.on.b { background: #ff48b0; }
.theme-card[data-theme="riso"] .tc-mute.on { background: #e8364f; }
.theme-card[data-theme="riso"] .tc-well { background: #0078bf14; border-radius: 0; }
.theme-card[data-theme="riso"] .tc-well b { background: #0078bf; border-radius: 0; }
.theme-card[data-theme="riso"] .tc-cap { height: 6px; border-radius: 0; background: #ffe800; box-shadow: inset 0 0 0 .8px #0078bf; }
.theme-card[data-theme="riso"] .tc-slot::before { width: 1.5px; margin-left: -.75px; background: #0078bf; }
/* Theme motion: the pink halftone drifts in its corner (Subtle and Full). */
@media (prefers-reduced-motion: no-preference) {
  body[data-theme="riso"]:not([data-theme-motion="off"]) .theme-light::before { animation: rs-drift 30s ease-in-out infinite alternate; }
}
@keyframes rs-drift { to { transform: translate(-18px, 14px) rotate(6deg); } }

/* ---------------------------------------------------------------- Aero */
/* Glossy and optimistic: a bright sky over rolling green hills with a soft sun and a few glass
   bubbles. Channels are frosted white glass with a shine across the top half, keys are glossy gel
   pills that fill with the channel's colour, meters are polished bars, and fader caps are gel orbs.
   No blur behind the channels (it costs a redraw every frame); the glass look comes from gradients.
   Theme motion: bubbles rise slowly (Subtle and Full). */
[data-theme="aero"] {
  --bg: #a9e1fb; --bay: transparent; --bay-edge: transparent; --bay-shadow: none;
  --mod-a: #ffffffe6; --mod-b: #eef9ffd9; --mod-edge: #ffffff; --mod-shadow: 0 0 0 1px #6fb3dd66, 0 14px 26px -12px #0a4a7aa0;
  --key: #f5fbff; --key-hi: #ffffff; --key-edge: transparent; --key-ink: #2f6688; --key-shadow: inset 0 0 0 1px #9fcbe6;
  --well: #0a4a7a17; --flyout: #f6fbfffa; --line: #6fb3dd59;
  --ink: #0b3a5a; --ink-2: #155178; --muted: #4a7a99;
  --amber: #1590d6; --cyan: #2fae4a; --red: #d9302a; --solo: #ff9a1a; --on-ink: #ffffff;
  --focus: #1590d6; --panel-hi: #e3f3fd; --track: #0a4a7a1f;
  --led-g: #3cc45a; --led-y: #ffc21f; --led-r: #ff5a3a;
  --led-g-off: #0a4a7a14; --led-y-off: #0a4a7a14; --led-r-off: #0a4a7a14;
  --glow: .3; --scroll: #a9cde4; --scroll-hi: #7fb3d6;
  --field: #ffffff; --rail: #0a4a7a26; --switch: #c9e3f3;
  --cap-w: 40px; --cap-h: 22px;
  --pop-shadow: 0 0 0 1px #6fb3dd80, 0 20px 44px #0a4a7a40;
  --cap-metal: #1aa7e8; --cap-ridge: transparent; --cap-shadow: none; --cap-ink: #ffffff;
  --c-slate: #6f8aa3; --c-amber: #ff9a1a; --c-coral: #ff6f4f; --c-rose: #f0559a;
  --c-violet: #7b6cf6; --c-blue: #1aa7e8; --c-cyan: #0fb3ad; --c-green: #2fbf4f;
  --font: "Nunito", "Segoe UI", system-ui, sans-serif;
  --ae-gloss: linear-gradient(180deg, #ffffffb3 0, #ffffff38 48%, transparent 52%);
  --warning-ink: #8a4b00;
  color-scheme: light;
}
:root body[data-theme="aero"] { background: #a9e1fb; }
/* The sky: a soft sun top left, green hills along the bottom and a few glass bubbles. */
:root body[data-theme="aero"] .theme-light {
  --ambient-base:
    radial-gradient(circle at 88% 18%, #ffffffe0 0 3%, #ffffff70 4%, #ffffff00 6.5%),
    radial-gradient(circle at 93% 30%, #ffffffd0 0 1.4%, #ffffff50 2%, #ffffff00 3%),
    radial-gradient(circle at 6% 70%, #ffffffc0 0 2%, #ffffff40 3%, #ffffff00 4.5%),
    radial-gradient(ellipse 70% 28% at 25% 112%, #5cc23e 0, #84d65a 55%, #84d65a00 100%),
    radial-gradient(ellipse 80% 30% at 85% 116%, #4bb43a 0, #7ccf55 55%, #7ccf5500 100%),
    radial-gradient(ellipse 55% 50% at 8% -6%, #ffffff, #ffffffb0 30%, #ffffff00 70%),
    linear-gradient(180deg, #4dbcf2 0%, #9fdcfa 42%, #dff4ff 72%, #e2f6d2 100%);
  --ambient-accent: radial-gradient(ellipse 40% 30% at 30% 30%, #ffffff60, transparent);
}
:root body[data-theme="aero"] .glass-aurora { display: none; }
:root body[data-theme="aero"] .group { background: #ffffff26; box-shadow: inset 0 0 0 1px #ffffff66; border-radius: 26px; }
:root body[data-theme="aero"] .group-head h2 { font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #0b4a73; text-shadow: 0 1px 0 #ffffffb0; }
:root body[data-theme="aero"] .linkish { color: #0d6fb0; }
:root body[data-theme="aero"] :is(.strip .name, .mini-name, .brand-name, .dlg-head h2) { font-weight: 800; letter-spacing: 0; color: var(--ink); }
:root body[data-theme="aero"] .brand-name { text-shadow: 0 1px 0 #fff; }
:root body[data-theme="aero"] .strip .name { font-size: 15px; }
:root body[data-theme="aero"] .strip .sub { color: var(--muted); }
:root body[data-theme="aero"] .strip .bus-tag { color: color-mix(in srgb, var(--acc) 70%, #0b3a5a); }
/* Channels: frosted white glass with a shine across the top half. */
:root body[data-theme="aero"] :is(.strip, .mini-row) {
  position: relative; isolation: isolate; border-radius: 20px;
  background: linear-gradient(180deg, var(--mod-a), #ffffffa6 55%, var(--mod-b));
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px #ffffffb0, var(--mod-shadow);
}
:root body[data-theme="aero"] .strip::before {
  content: ""; position: absolute; left: 3px; right: 3px; top: 3px; height: 40%; pointer-events: none; z-index: -1;
  border-radius: 17px 17px 40% 40% / 17px 17px 24px 24px; background: linear-gradient(180deg, #ffffffd9, #ffffff00);
}
:root body[data-theme="aero"] .mini-row { border-radius: 14px; }
:root body[data-theme="aero"] :is(.strip, .mini-row):hover { box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px #fff, 0 0 0 1px color-mix(in srgb, var(--acc) 55%, #6fb3dd), 0 16px 30px -12px #0a4a7ab0; }
:root body[data-theme="aero"] :is(.strip, .mini-row).muted { background: linear-gradient(180deg, #ffffffc0, #eef3f6b3); }
:root body[data-theme="aero"] .strip.muted :is(.name, .readout) { color: #6f8aa3; }
/* The channel icon: a glossy gel orb in the channel's colour. */
:root body[data-theme="aero"] :is(.strip .head .chip, .mini-row .chip) {
  border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 34% 24%, #ffffffe6 0 14%, #ffffff00 42%), radial-gradient(circle at 50% 115%, color-mix(in srgb, var(--acc) 45%, #fff), var(--acc) 55%, color-mix(in srgb, var(--acc) 72%, #002040));
  box-shadow: 0 2px 6px color-mix(in srgb, var(--acc) 50%, transparent), inset 0 -1px 0 #0003, inset 0 0 0 1px color-mix(in srgb, var(--acc) 70%, #003);
}
:root body[data-theme="aero"] .strip .head .chip svg { filter: drop-shadow(0 1px 1px #0005); }
:root body[data-theme="aero"] .strip.muted .head .chip { background: radial-gradient(circle at 34% 24%, #ffffffe6 0 14%, #ffffff00 42%), radial-gradient(circle at 50% 115%, #dbe4ea, #9aacb9 55%, #7d8f9c); box-shadow: inset 0 0 0 1px #7d8f9c; }
/* Keys: glossy pills. On keys fill with coloured gel. */
:root body[data-theme="aero"] :is(.btn, .route, .tog, .keys, select, .scene-list .load, .route-expand) {
  border-radius: 999px; color: var(--key-ink); font-weight: 700;
  background: linear-gradient(180deg, #ffffff 0 48%, #e6f3fb 52%, #f7fcff); box-shadow: var(--key-shadow), 0 1px 2px #0a4a7a1a;
}
:root body[data-theme="aero"] :is(.btn, .route, .tog, .keys):not([aria-pressed="true"]):hover { background: linear-gradient(180deg, #ffffff 0 48%, #d8eefc 52%, #eef8ff); box-shadow: inset 0 0 0 1px #5fb0e3, 0 0 8px #5fb0e355; }
:root body[data-theme="aero"] :is(.strip-routes .route, .strip .tog, .mini-row .tog)[aria-pressed="true"], :root body[data-theme="aero"] :is(.btn.primary, .btn[aria-pressed="true"], .update-btn) {
  --gel: var(--amber); color: #fff; text-shadow: 0 1px 1px #0006;
  background: var(--ae-gloss), linear-gradient(180deg, color-mix(in srgb, var(--gel) 55%, #fff), var(--gel) 60%, color-mix(in srgb, var(--gel) 78%, #001830));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gel) 70%, #001830), 0 2px 6px color-mix(in srgb, var(--gel) 45%, transparent);
}
:root body[data-theme="aero"] .strip-routes .route.a[aria-pressed="true"] { --gel: var(--acc); }
:root body[data-theme="aero"] .strip-routes .route.b[aria-pressed="true"] { --gel: #2fae4a; }
:root body[data-theme="aero"] :is(.strip, .mini-row) .tog.solo[aria-pressed="true"] { --gel: #f08a00; }
:root body[data-theme="aero"] :is(.strip, .mini-row) .tog.mute[aria-pressed="true"] { --gel: #e0302a; }
:root body[data-theme="aero"] .bar { background: linear-gradient(180deg, #ffffffd9, #e8f6ffcc); box-shadow: inset 0 -1px 0 #ffffff, 0 1px 0 #6fb3dd66, 0 4px 12px #0a4a7a1a; }
:root body[data-theme="aero"] .bar :is(#pinBtn, #dockBtn)[aria-pressed="true"] { --gel: var(--amber); }
/* Meters: polished bars with a highlight down one side. */
:root body[data-theme="aero"] .strip .well { border-radius: 8px; background: #0a4a7a12; box-shadow: inset 0 1px 3px #0a4a7a33, 0 1px 0 #fff; }
:root body[data-theme="aero"] .meter { -webkit-mask: none; mask: none; border-radius: 3px; }
:root body[data-theme="aero"] .meter .lit b { background: linear-gradient(90deg, #ffffff70, #ffffff00 60%), linear-gradient(to top, var(--led-g), #8ee04a var(--p-yellow), var(--led-y) var(--p-zero), var(--led-r) var(--p-zero)); }
:root body[data-theme="aero"] .fader.h .meter .lit b { background: linear-gradient(180deg, #ffffff70, #ffffff00 60%), linear-gradient(to right, var(--led-g), #8ee04a var(--p-yellow), var(--led-y) var(--p-zero), var(--led-r) var(--p-zero)); }
:root body[data-theme="aero"] .muted .meter .lit b { filter: saturate(0) brightness(1.1); opacity: .6; }
:root body[data-theme="aero"] .meter .pk i { background: #0b4a73; height: 2px; }
:root body[data-theme="aero"] .fader.h .meter .pk i { width: 2px; height: auto; }
/* Fader: a sunken glass tube filled with the channel's gel up to an orb cap. */
:root body[data-theme="aero"] .fader .groove::before { display: none; }
:root body[data-theme="aero"] .fader:not(.h) .groove {
  width: 8px; margin-left: -4px; border: 0; border-radius: 4px;
  background: linear-gradient(90deg, #ffffff80, #ffffff00 55%) 0 100% / 100% calc(var(--p, 0) * 100%) no-repeat, linear-gradient(to top, var(--acc), color-mix(in srgb, var(--acc) 45%, #fff)) 0 100% / 100% calc(var(--p, 0) * 100%) no-repeat, #0a4a7a1f;
  box-shadow: inset 0 1px 3px #0a4a7a40, 0 1px 0 #fff;
}
:root body[data-theme="aero"] .muted .fader:not(.h) .groove { background: #0a4a7a1f; }
:root body[data-theme="aero"] .fader .thumb {
  border-radius: 999px; clip-path: none; filter: none;
  background: radial-gradient(70% 60% at 40% 22%, #ffffff 0, #ffffffb0 35%, #ffffff00 60%), linear-gradient(180deg, color-mix(in srgb, var(--acc) 35%, #fff), var(--acc) 70%, color-mix(in srgb, var(--acc) 75%, #001830));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 60%, #001830), 0 4px 10px color-mix(in srgb, var(--acc) 45%, #0a4a7a66);
}
:root body[data-theme="aero"] .fader .thumb::before { content: none; }
:root body[data-theme="aero"] .fader:not(.h) .thumb::after { left: 12px; right: 12px; width: auto; top: calc(50% - 1px); height: 2px; margin: 0; border-radius: 1px; background: #ffffffe6; box-shadow: none; transform: none; font-size: 0; }
:root body[data-theme="aero"] .muted .fader .thumb { background: radial-gradient(70% 60% at 40% 22%, #fff 0, #ffffffb0 35%, #ffffff00 60%), linear-gradient(180deg, #e3e9ee, #9aacb9 70%, #7d8f9c); box-shadow: inset 0 0 0 1px #7d8f9c, 0 3px 8px #0a4a7a33; }
:root body[data-theme="aero"] .fader.dragging .thumb { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 60%, #001830), 0 0 0 4px color-mix(in srgb, var(--acc) 30%, transparent), 0 6px 14px color-mix(in srgb, var(--acc) 50%, transparent); }
:root body[data-theme="aero"] .unity { background: #0b4a73; opacity: .3; }
:root body[data-theme="aero"] .scale span { color: #4a7a99; font-size: 10px; }
:root body[data-theme="aero"] .scale span.zero { color: var(--ink); font-weight: 800; }
:root body[data-theme="aero"] .strip .readout { font-weight: 800; font-size: 21px; color: #0b4a73; background: transparent; text-shadow: 0 1px 0 #fff; font-variant-numeric: tabular-nums; }
:root body[data-theme="aero"] .strip .readout:hover { background: color-mix(in srgb, var(--acc) 14%, transparent); }
/* Mini mode and the tray panel: a glass track and a gel pill that carries the level. */
:root body[data-theme="aero"] .fader.h { --cap-w: 46px; }
:root body[data-theme="aero"] .fader.h .track { border-radius: 999px; background: linear-gradient(to right, color-mix(in srgb, var(--acc) 30%, transparent) calc(var(--cap-w) / 2 + (100% - var(--cap-w)) * var(--p, .8)), transparent 0), #0a4a7a14; box-shadow: inset 0 1px 3px #0a4a7a33, 0 1px 0 #fff; }
:root body[data-theme="aero"] .fader.h .thumb { top: 0; bottom: 0; border-radius: 999px; color: #fff; text-shadow: 0 1px 1px #0006; background: var(--ae-gloss), linear-gradient(180deg, color-mix(in srgb, var(--acc) 50%, #fff), var(--acc) 60%, color-mix(in srgb, var(--acc) 78%, #001830)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 70%, #001830); }
:root body[data-theme="aero"] .muted .fader.h .thumb { background: var(--ae-gloss), linear-gradient(180deg, #dbe4ea, #9aacb9); }
:root body[data-theme="aero"] .fader.h .db { color: #fff; font-weight: 800; font-size: 12px; padding: 0; }
:root body[data-theme="aero"] .duck-tag { color: #fff; }
/* Dialogs, menus and window buttons. */
:root body[data-theme="aero"] :is(.dlg, .menu) { border-radius: 18px; background: linear-gradient(180deg, #ffffff, var(--flyout) 40%, #eef8ff); box-shadow: inset 0 1px 0 #fff, var(--pop-shadow); }
:root body[data-theme="aero"] .dlg::backdrop { background: rgba(40, 110, 160, .25); backdrop-filter: blur(3px); }
:root body[data-theme="aero"] .wc { border-radius: 8px; }
:root body[data-theme="aero"] .wc:hover { background: #ffffffb0; }
:root body[data-theme="aero"] .wc.close:hover { background: linear-gradient(180deg, #ff8a7a, #e0302a 60%); color: #fff; }
/* Bubbles that rise slowly when Theme motion is on (app.js fills .theme-fx). */
body[data-theme="aero"] .theme-fx b { width: var(--s, 18px); height: var(--s, 18px); border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff 0 9%, #ffffffa0 16%, #ffffff22 42%, #bfe9ff33 70%, #ffffffb0 100%); box-shadow: inset 0 0 0 1px #ffffffb0; opacity: .8; }
/* Theme-picker sample. */
.theme-card[data-theme="aero"] .tc-desk { background: radial-gradient(ellipse 80% 30% at 50% 112%, #6fd04a, transparent 100%), linear-gradient(180deg, #5cc4f5, #c9ecfc 70%, #e2f6d2); }
.theme-card[data-theme="aero"] .tc-mod { border-radius: 8px; background: linear-gradient(180deg, #ffffffee, #ffffffaa 50%, #eaf8ffcc); box-shadow: inset 0 0 0 1px #fff, 0 0 0 .8px #6fb3dd99, 0 3px 6px #0a4a7a33; }
.theme-card[data-theme="aero"] :is(.tc-keys i, .tc-mute) { border-radius: 99px; background: #f5fbff; box-shadow: inset 0 0 0 .8px #9fcbe6; }
.theme-card[data-theme="aero"] .tc-keys i.on.a { background: linear-gradient(180deg, #8fdcff, #1aa7e8); box-shadow: none; }
.theme-card[data-theme="aero"] .tc-keys i.on.b { background: linear-gradient(180deg, #9ae6a6, #2fbf4f); box-shadow: none; }
.theme-card[data-theme="aero"] .tc-mute.on { background: linear-gradient(180deg, #ff8a7a, #e0302a); box-shadow: none; }
.theme-card[data-theme="aero"] .tc-well { background: #0a4a7a17; border-radius: 3px; }
.theme-card[data-theme="aero"] .tc-well b { background: linear-gradient(to top, #3cc45a, #8ee04a); border-radius: 2px; }
.theme-card[data-theme="aero"] .tc-cap { height: 7px; border-radius: 99px; background: radial-gradient(circle at 40% 25%, #fff, #1aa7e8 70%); box-shadow: 0 1px 2px #0a4a7a66; }
.theme-card[data-theme="aero"] .tc-slot::before { width: 3px; margin-left: -1.5px; border-radius: 2px; background: #1aa7e8; }
@media (prefers-reduced-motion: no-preference) {
  body[data-theme="aero"]:not([data-theme-motion="off"]) .theme-fx b { animation: mk-rise var(--d) linear infinite; animation-delay: var(--dl); }
}

/* Performance comes first: while Sleekmeeter isn't the window in front, every looping theme
   effect stops, so a game or stream in front gets the GPU. One-shot entrances (the drawer, dialogs)
   still play so they don't freeze half-drawn. */
body.is-idle :not(.drawer, .dlg), body.is-idle ::before, body.is-idle ::after { animation-play-state: paused !important; }
/* A modal dialog is open over the mixer: its effects pause too, but not the dialog's own content. */
body.dlg-open :not(dialog, dialog *), body.dlg-open :not(dialog, dialog *)::before, body.dlg-open :not(dialog, dialog *)::after { animation-play-state: paused !important; }

/* ====================================================================== Effect layers (0.23)
 * Lights that run round a channel card (Halo's beam, Glass's rainbow rim) and Glass's sheen.
 * Each is a layer the GPU turns or slides by itself, so nothing is redrawn while it moves.
 * Before 0.23 these animated a gradient's angle or position, and every card was redrawn on the
 * CPU about 60 times a second.
 * .fx-rim is the ring (a mask: only its border shows). Inside it, ::before is a square as wide as
 * the card's diagonal holding the light, turned with transform. .fx-sheen clips a band that
 * slides across the card. */
.fx-rim, .fx-sheen { display: none; }
.fx-rim {
  position: absolute; inset: var(--rim-inset, 0); border-radius: var(--rim-radius, 10px); padding: var(--rim-w, 1.5px);
  pointer-events: none; z-index: 0; overflow: hidden; container-type: size; opacity: var(--rim-opacity, 1);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.fx-rim::before {
  content: ""; position: absolute; left: 50%; top: 50%; aspect-ratio: 1;
  width: calc(100cqw + 100cqh + 8px); width: calc(hypot(100cqw, 100cqh) + 8px);
  translate: -50% -50%; rotate: var(--rim-a, 0deg); background: var(--rim-light, none);
}
.fx-sheen { position: absolute; inset: 0; border-radius: var(--rim-radius, 10px); overflow: hidden; pointer-events: none; z-index: 0; }
.fx-sheen::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 300%;
  background: var(--sheen, none); transform: translateX(-93.333%);
}
@keyframes fx-spin { to { transform: rotate(360deg); } }
/* The band starts off the left edge, waits, then crosses to off the right edge. */
@keyframes fx-sheen { 0%, 62% { transform: translateX(-93.333%); } 100% { transform: translateX(26.667%); } }

/* Halo: one white-lilac beam running round each card; a muted card's beam is rose and stands still. */
:root body[data-theme="halo"] .strip::before { content: none; }
:root body[data-theme="halo"] .strip .fx-rim {
  display: block; --rim-inset: -1px; --rim-radius: 19px; --rim-w: 1.2px;
  --rim-light: conic-gradient(transparent 0 72%, #b6a8ff66 84%, #fff 92%, transparent 97%);
}
:root body[data-theme="halo"] .strip:nth-child(4n + 2) .fx-rim { --rim-a: 90deg; }
:root body[data-theme="halo"] .strip:nth-child(4n + 3) .fx-rim { --rim-a: 180deg; }
:root body[data-theme="halo"] .strip:nth-child(4n + 4) .fx-rim { --rim-a: 270deg; }
:root body[data-theme="halo"] .strip.muted .fx-rim {
  --rim-opacity: .6; --rim-light: conic-gradient(transparent 0 76%, #ff5d8655 88%, #ffb3c4 94%, transparent 98%);
}

/* Glass: a rainbow rim round each pane, and a sheen of light crossing it now and then. */
:root body[data-theme="glass"] .strip::before, :root body[data-theme="glass"] .strip::after { content: none; }
:root body[data-theme="glass"] .strip .fx-rim {
  display: block; --rim-radius: 26px; --rim-w: 2px;
  --rim-light: conic-gradient(#7cf3ff, #8a7dff, #ff7ad9, #ffb36b, #fff27a, #6dffb6, #7cf3ff);
}
:root body[data-theme="glass"] .strip.muted .fx-rim { --rim-opacity: .7; filter: grayscale(.85) brightness(.85); }
:root body[data-theme="glass"] .strip .fx-sheen {
  --rim-radius: 26px;
  --sheen: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .26) 45%, rgba(255, 255, 255, .07) 52%, transparent 60%);
}

@media (prefers-reduced-motion: no-preference) {
  body[data-theme="halo"][data-theme-motion="full"] .strip .fx-rim::before { animation: fx-spin 7s linear infinite; }
  body[data-theme="glass"][data-theme-motion="full"] .strip .fx-rim::before { animation: fx-spin 8s linear infinite; }
  body:is([data-theme="halo"], [data-theme="glass"]) .strip.muted .fx-rim::before { animation-play-state: paused; }
  body[data-theme="glass"][data-theme-motion="full"] .strip .fx-sheen { display: block; }
  body[data-theme="glass"][data-theme-motion="full"] .strip .fx-sheen::before { animation: fx-sheen 7s ease-in-out infinite; }
  body[data-theme="glass"][data-theme-motion="full"] .strip:nth-child(3n + 2) .fx-sheen::before { animation-delay: -2.3s; }
  body[data-theme="glass"][data-theme-motion="full"] .strip:nth-child(3n + 3) .fx-sheen::before { animation-delay: -4.6s; }
}

/* OLED's sweep, Neon's floor and Terminal's scanline move with transform too: they used to move
   with left, top and background-position, which lays out or redraws on every frame. */
@keyframes fx-oled-sweep { from { transform: translateX(0); } to { transform: translateX(350%); } }
@keyframes fx-neon-floor {
  from { transform: perspective(300px) rotateX(64deg) translateY(0); }
  to { transform: perspective(300px) rotateX(64deg) translateY(26px); }
}
@keyframes fx-scanline { from { transform: translateY(0); } to { transform: translateY(433.333%); } }

/* A muted Mute button breathes in Halo, Glass and Abyss. It used to animate its glow
   (box-shadow), which redraws the button on every frame; fading the whole button a little
   (opacity) looks much the same, and the GPU does it without redrawing anything. */
@keyframes fx-breathe { from, to { opacity: 1; } 50% { opacity: .8; } }
@media (prefers-reduced-motion: no-preference) {
  :root body[data-theme="halo"][data-theme-motion="full"] :is(.strip, .mini-row) .tog.mute[aria-pressed="true"] { animation: fx-breathe 2s ease-in-out infinite; }
  :root body[data-theme="glass"][data-theme-motion="full"] .strip.muted .tog.mute[aria-pressed="true"] { animation: fx-breathe 1.8s ease-in-out infinite; }
  :root body[data-theme="abyss"][data-theme-motion="full"] :is(.strip, .mini-row) .tog.mute[aria-pressed="true"] { animation: fx-breathe 2.4s ease-in-out infinite; }
}

/* Muted channels never glow, as before (their meters get a muted filter instead). Last, so it wins. */
:root body[data-theme] .muted .meter .glow { display: none; }
