/* Mixer Lab — same family as Sound Lab / Camera Lab: dark navy, cyan accent,
   Space Grotesk headings, pill buttons, rounded cards. */

:root {
  --bg: #0f1220;
  --bg-raised: #171b2e;
  --bg-sunken: #0b0e19;
  --text: #f3f4fb;
  --text-dim: #a6acc8;
  --accent-default: #7ce0ff;
  --accent: var(--accent-default);
  --ok: #6bffb0;
  --warn: #ffd166;
  --bad: #ff6b81;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --font-display: "Space Grotesk", "Avenir Next", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --listen-h: 76px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100%;
  touch-action: manipulation;
}

body {
  background-image: radial-gradient(circle at 15% 10%, #1c2140 0%, transparent 45%), radial-gradient(circle at 85% 0%, #241a3a 0%, transparent 40%);
  background-attachment: fixed;
  padding-bottom: calc(var(--listen-h) + 1.25rem + env(safe-area-inset-bottom));
}

button {
  font-family: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 200;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 700;
}
.skip-link:focus {
  top: 0.5rem;
}

/* ---------- shared buttons (from Sound Lab / Camera Lab) ---------- */

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.3rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.btn-start {
  background: linear-gradient(135deg, #7ce0ff, #7c9bff);
  color: #0f1220;
  box-shadow: 0 0 18px rgba(124, 224, 255, 0.35);
}
.btn-stop {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  min-height: 40px;
  cursor: pointer;
}
.chip:hover {
  border-color: var(--accent);
}
.chip.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 25%, transparent);
  box-shadow: 0 0 12px -4px var(--accent);
}

.linkish {
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  padding: 0.25rem;
}

/* ---------- top bar ---------- */

/* Branch previews (js/deploy-context.js): a banner on top, and the sticky
   top bar keeps a warning edge after the banner scrolls away. */
.preview-banner {
  position: relative;
  z-index: 150; /* above the start overlay (100), below the skip link (200) */
  padding: 0.45rem clamp(1rem, 3vw, 1.5rem);
  background: var(--warn);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.preview-banner a {
  color: inherit;
}

.is-preview .topbar {
  box-shadow: inset 0 -3px 0 var(--warn);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 3vw, 1.5rem);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 18, 32, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  min-width: 0;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}
.topbar-note {
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.skin-switch {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.skin-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 0.35rem 1rem;
  min-height: 44px;
  justify-content: center;
  cursor: pointer;
}
.skin-btn strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
}
.skin-btn small {
  color: var(--text-dim);
  font-size: 0.7rem;
}
.skin-btn.active {
  background: linear-gradient(135deg, #7ce0ff, #7c9bff);
  color: var(--bg);
}
.skin-btn.active small {
  color: rgba(15, 18, 32, 0.75);
}

/* ---------- layout ---------- */

.tabs {
  display: none;
}

/* Wide screens: the scenario brief on the left (folds to a rail), and one
   view of the rig beside it: the console (front) or the stage and patch (back). */
.lab {
  max-width: 1760px;
  margin: 0 auto;
  padding: 0.75rem clamp(0.75rem, 2vw, 1.5rem) 2rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
.workspace {
  min-width: 0;
  display: grid;
  gap: 0.75rem;
}
.lab[data-view="console"] .region-patch,
.lab[data-view="patch"] .region-mixer,
.lab:not([data-view="mix5"]) .region-mix5,
.lab[data-view="mix5"] .region-mixer,
.lab[data-view="mix5"] .region-patch {
  display: none;
}

.region {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  min-width: 0;
}
.region-scenario {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 76px - var(--listen-h) - 1.5rem);
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 0.75rem;
}
.lab[data-brief="closed"] .region-scenario {
  padding: 0.4rem;
  overflow: visible;
}

/* The view switch: two big tabs and a turn-around button. */
.view-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.view-switch {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.view-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 0.3rem 1.1rem;
  min-height: 38px;
  justify-content: center;
  cursor: pointer;
  text-align: left;
}
/* A view the rig doesn't have (Console: Mix5 outside CME): hidden, whatever display says. */
.view-btn[hidden],
[data-tab-btn][hidden] {
  display: none;
}
.view-btn strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
}
.view-btn small {
  display: none;
}
.view-btn.active {
  background: linear-gradient(135deg, #7ce0ff, #7c9bff);
  color: var(--bg);
}
.view-btn.active small {
  color: rgba(15, 18, 32, 0.75);
}
.turn-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  min-height: 44px;
  cursor: pointer;
  font-size: 0.9rem;
}
.turn-btn:hover {
  border-color: var(--accent);
}
.turn-btn svg {
  transition: transform 0.35s ease;
}
.turn-btn:hover svg {
  transform: rotate(180deg);
}
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75em;
  padding: 0.05rem 0.35rem;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.region-title {
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin: 0 0 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.region-title small {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8rem;
}
.flow-step {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Stage & patch: the diagram, then inputs and outputs side by side. */
.patch-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.patch-col {
  min-width: 0;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}
.patch-col-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 0 0 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.patch-col-title small {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.78rem;
}

@media (max-width: 1099px) {
  .patch-lists {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Phones & small tablets: one region at a time. */
@media (max-width: 899px) {
  .topbar {
    padding: 0.5rem 0.75rem;
  }
  .topbar-note {
    display: none;
  }
  .brand {
    font-size: 1.15rem;
  }
  .skin-btn {
    padding: 0.3rem 0.7rem;
  }
  .skin-btn small {
    display: none;
  }
  .tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    z-index: 15;
    background: rgba(15, 18, 32, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  .tabs button {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.7rem 0.25rem;
    min-height: 46px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dim);
    cursor: pointer;
  }
  .tabs button.active {
    color: var(--text);
    border-bottom-color: var(--accent);
  }
  .tabs button[data-progress]:not([data-progress=""])::after {
    content: attr(data-progress);
    margin-left: 0.3rem;
    font-size: 0.7rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
  }
  .tabs button[data-progress="✓"]::after {
    background: var(--ok);
    color: var(--bg);
  }
  .lab {
    display: block;
    padding: 0.75rem 0.75rem 1.5rem;
  }
  /* Phones switch views with the tabs; only the track-name switch stays. */
  .view-bar > :not(.names-switch) {
    display: none;
  }
  .view-bar {
    margin-bottom: 0.6rem;
  }
  .region {
    padding: 0.85rem;
  }
  .patch-col {
    padding: 0.65rem;
  }
}

/* ---------- start overlay (Sound Lab pattern) ---------- */

.start-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 35%, #232a4d 0%, var(--bg) 65%);
  transition: opacity 0.3s ease;
}
.start-overlay.dismissed {
  opacity: 0;
  pointer-events: none;
}
.start-overlay-inner {
  text-align: center;
  max-width: 30rem;
  padding: 2rem 1.25rem;
}
.start-overlay-kicker {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}
.start-overlay-inner h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  margin: 0 0 0.75rem;
}
.start-overlay-sub {
  color: var(--text-dim);
  margin: 0 0 2rem;
  line-height: 1.55;
}
.btn-overlay {
  font-size: 1.15rem;
  padding: 1rem 2rem;
  animation: overlay-pulse 2.4s ease-in-out infinite;
}
.start-overlay-note {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 1.5rem 0 0;
  line-height: 1.5;
}
@keyframes overlay-pulse {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(124, 224, 255, 0.35);
  }
  50% {
    box-shadow: 0 0 30px rgba(124, 224, 255, 0.65);
  }
}

/* ---------- scenario panel ---------- */

/* The brief: a picker (with previous / next), the scenario card, and notes.
   Folded, it is a narrow rail with the number and progress. */
.brief-rail {
  display: none;
}
.lab[data-brief="closed"] .brief {
  display: none;
}
.lab[data-brief="closed"] .brief-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.2rem;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-md);
}
.brief-rail:hover {
  background: rgba(255, 255, 255, 0.05);
}
.rail-arrow {
  color: var(--accent);
  font-size: 1.2rem;
}
.rail-num {
  display: grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
  font-size: 0.8rem;
}
.rail-progress {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.rail-progress.done {
  color: var(--ok);
  font-weight: 700;
}
.rail-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.72rem;
  color: var(--text-dim);
}
.brief-head {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.scn-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.scn-pick {
  flex: 1;
  min-width: 0;
}
.scn-select {
  width: 100%;
  min-height: 40px;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-sunken);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
}
.scn-step,
.brief-fold {
  flex: none;
  width: 36px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}
.scn-step:disabled {
  opacity: 0.35;
  cursor: default;
}
.scn-step:not(:disabled):hover,
.brief-fold:hover {
  border-color: var(--accent);
}
.brief-foot {
  margin-top: 0.9rem;
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
}
.brief-foot .scenario-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0 0 0.5rem;
}
.brief-links {
  font-size: 0.85rem;
  margin: 0;
  color: var(--text-dim);
}
@media (max-width: 1099px) {
  .brief-fold {
    display: none;
  }
  .lab[data-brief="closed"] .brief {
    display: block;
  }
  .lab[data-brief="closed"] .brief-rail {
    display: none;
  }
}
.kicker {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.78rem;
  margin: 0 0 0.3rem;
}
.scenario-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  margin: 0 0 0.6rem;
  line-height: 1.2;
}
.scenario-prompt {
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 0.6rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: rgba(124, 224, 255, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.scenario-goal {
  color: var(--text-dim);
  margin: 0 0 0.9rem;
  line-height: 1.45;
  font-size: 0.95rem;
}
.checklist {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.35;
  font-size: 0.93rem;
}
.check-box {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 6px;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.check.met .check-box {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--bg);
}
.check.unmet.kind-keep .check-box {
  border-color: var(--bad);
  color: var(--bad);
}
.check.unmet.kind-keep {
  background: rgba(255, 107, 129, 0.1);
}
.check em {
  font-style: normal;
  color: var(--text-dim);
  font-weight: 600;
}
.check small {
  display: block;
  color: var(--text-dim);
  font-size: 0.8rem;
}
.complete-banner {
  border: 1px solid var(--ok);
  background: rgba(107, 255, 176, 0.08);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 0.9rem;
  line-height: 1.5;
  animation: pop 0.35s ease;
}
.complete-banner p {
  margin: 0 0 0.6rem;
}
.complete-note {
  color: var(--text-dim);
  font-size: 0.85rem;
}
.complete-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ok);
  font-size: 1.15rem;
}
/* The optional one-question check after a solve. */
.concept-check {
  margin-top: 0.4rem;
}
.concept-check .cc-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.3rem 0;
}
.concept-check .chip.is-right {
  border-color: var(--ok);
  color: var(--ok);
}
.concept-check .chip.is-wrong {
  border-color: var(--warn);
  color: var(--warn);
}
.concept-check .cc-why {
  font-size: 0.9rem;
}
/* First visit to a big digital console: where its knobs went. */
.console-tip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
  line-height: 1.45;
}
.console-tip[hidden] {
  display: none;
}
.console-tip p {
  margin: 0;
  flex: 1 1 22rem;
}
@keyframes pop {
  from {
    transform: scale(0.97);
    opacity: 0;
  }
}
.hints {
  margin-bottom: 0.9rem;
}
.hint-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  display: grid;
  gap: 0.4rem;
}
.hint-list li {
  background: rgba(255, 209, 102, 0.08);
  border: 1px solid rgba(255, 209, 102, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  line-height: 1.45;
  font-size: 0.93rem;
}
.hint-num {
  font-weight: 700;
  color: var(--warn);
  margin-right: 0.25rem;
}
.scenario-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.music {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.5rem;
}
.music-title {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 700;
}
.music-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.music-chip small {
  color: var(--text-dim);
  margin-left: 0.2rem;
}
.music-pos {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.music-pos[hidden] {
  display: none;
}
.music-pos .seek {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
  height: 32px;
}
.music-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.music-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ---------- sources & outputs ---------- */

.source-list,
.device-list,
.out-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.source-card,
.device-card,
.out-row {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.7rem;
  display: grid;
  gap: 0.45rem;
}
.out-row {
  padding: 0.55rem;
}
.source-card.status-ok,
.device-card.status-ok {
  border-color: rgba(107, 255, 176, 0.35);
}
.source-card.status-warn,
.device-card.status-warn {
  border-color: rgba(255, 209, 102, 0.45);
}
.source-card.status-bad,
.device-card.status-bad {
  border-color: var(--bad);
}
.source-top,
.device-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.source-order {
  flex: none;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
}
.source-names {
  display: grid;
  min-width: 0;
  flex: 1;
  line-height: 1.25;
}
.source-names span,
.amp-where {
  color: var(--text-dim);
  font-size: 0.82rem;
}
.device-top strong {
  flex: 1;
}
.status-pill {
  flex: none;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  white-space: nowrap;
}
.status-pill.status-ok {
  background: rgba(107, 255, 176, 0.15);
  color: var(--ok);
}
.status-pill.status-warn {
  background: rgba(255, 209, 102, 0.15);
  color: var(--warn);
}
.status-pill.status-bad {
  background: rgba(255, 107, 129, 0.18);
  color: var(--bad);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
}
.tag-level[data-level="mic"] {
  border-color: #7c9bff;
  color: #aebdff;
}
.tag-level[data-level="line"] {
  border-color: #6bffb0;
  color: #9dffcb;
}
.tag-stereo {
  border-color: #c58bff;
  color: #dcb8ff;
}
.tag-phantom {
  border-color: #ff8a5b;
  color: #ffb08f;
}

.port-btn {
  display: grid;
  gap: 0.2rem;
  text-align: left;
  width: 100%;
  min-height: 48px;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  font-size: 0.9rem;
}
.port-btn:hover {
  border-color: var(--accent);
}
.port-btn.is-connected {
  border-style: solid;
  background: rgba(124, 224, 255, 0.07);
}
.port-name {
  font-weight: 600;
}
.port-name small {
  font-weight: 400;
  color: var(--text-dim);
  font-size: 0.75rem;
}
.port-state {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem 0.4rem;
  font-size: 0.85rem;
}
.port-empty {
  color: var(--accent);
}
.port-empty::before {
  content: "+ ";
}
.port-link {
  font-weight: 600;
}
.port-cable {
  color: var(--text-dim);
  font-size: 0.75rem;
}
.cable-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: hsl(var(--hue) 85% 62%);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4);
  flex: none;
}
.port-msg {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--warn);
}
.port-msg.ok {
  color: var(--ok);
}
.status-bad .port-msg {
  color: var(--bad);
}
.source-note,
.panel-foot {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.4;
}
.panel-foot {
  margin-top: 0.75rem;
}
.group-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 1rem 0 0.5rem;
}
.group-title:first-child {
  margin-top: 0;
}
.port-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

/* ---------- dialogs ---------- */

dialog {
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: min(560px, calc(100vw - 1.5rem));
  width: 100%;
  max-height: calc(100dvh - 2rem);
  box-shadow: 0 30px 80px -20px #000;
}
dialog::backdrop {
  background: rgba(5, 7, 14, 0.65);
  backdrop-filter: blur(2px);
}
@media (max-width: 899px) {
  dialog {
    margin: auto auto 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100vw;
    max-height: 88dvh;
  }
}
.patch-inner,
.fine-inner {
  padding: 1rem 1.1rem 1.25rem;
}
.patch-head {
  position: relative;
  padding-right: 2.5rem;
  margin-bottom: 0.9rem;
}
.patch-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.patch-head h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0.2rem 0;
}
.patch-sub {
  margin: 0 0 0.6rem;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.patch-x {
  position: absolute;
  right: -0.25rem;
  top: -0.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 1rem;
}
.patch-current {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 1rem;
  line-height: 1.4;
}
.patch-actions,
.fine-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
.cable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.5rem;
}
.cable-card {
  display: grid;
  gap: 0.2rem;
  text-align: left;
  padding: 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  min-height: 48px;
}
.cable-card:hover,
.cable-card:focus-visible {
  border-color: var(--accent);
}
.cable-plugs {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}
.cable-blurb {
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.35;
}
.nofit {
  margin-top: 0.8rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.nofit summary {
  cursor: pointer;
  padding: 0.4rem 0;
}
.nofit ul {
  margin: 0.3rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.6;
}
.target-group h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0.9rem 0 0.4rem;
}
.target-btn {
  display: grid;
  width: 100%;
  text-align: left;
  gap: 0.1rem;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  min-height: 48px;
  font-weight: 600;
}
.target-btn small {
  font-weight: 400;
  color: var(--text-dim);
}
.target-btn:hover:not([disabled]) {
  border-color: var(--accent);
}
.target-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.patch-empty {
  color: var(--text-dim);
}

.fine-label {
  margin: 0;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}
.fine-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0.2rem 0 0.4rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.fine-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.btn-round {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.4rem;
  cursor: pointer;
}
.big-slider {
  flex: 1;
  height: 3rem;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.big-slider::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}
.big-slider::-moz-range-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}
.big-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 34px;
  height: 34px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid #0f1220;
  box-shadow: 0 0 0 2px var(--accent);
}
.big-slider::-moz-range-thumb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid #0f1220;
  box-shadow: 0 0 0 2px var(--accent);
}

/* ---------- signal flow explainer ---------- */

.flow {
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
}
.flow summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  padding: 0.35rem 0;
}
.flow-body {
  padding: 0.75rem 0 0.25rem;
}
.flow-trunk,
.flow-branch {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.flow-node {
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line-strong);
  font-weight: 600;
  font-size: 0.82rem;
}
.flow-node small {
  font-weight: 400;
  color: var(--text-dim);
}
.flow-node + .flow-node::before,
.flow-trunk .flow-split::before {
  content: "→";
  margin-right: 0.35rem;
  margin-left: -0.35rem;
  color: var(--text-dim);
  position: relative;
  left: -0.25rem;
}
.flow-split {
  color: var(--text-dim);
  font-style: italic;
}
.flow-end {
  border-color: var(--accent);
}
.flow-branches {
  display: grid;
  gap: 0.35rem;
  margin: 0.45rem 0 0 1.2rem;
  padding-left: 0.8rem;
  border-left: 2px solid var(--line-strong);
}
.branch-main .flow-node:first-child {
  border-color: var(--bad);
}
.branch-aux .flow-node:first-child {
  border-color: var(--warn);
}
.flow-notes {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.flow-notes strong {
  color: var(--text);
}

/* ---------- controls ---------- */

.ctl {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  user-select: none;
  -webkit-user-select: none;
}
.ctl-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.ctl-value {
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  min-height: 1em;
  white-space: nowrap;
}
.knob {
  width: 46px;
  height: 46px;
  cursor: ns-resize;
  border-radius: 50%;
  --knob-color: #fff;
}
.ctl-big .knob {
  width: 58px;
  height: 58px;
}
.knob svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.knob-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 4;
  stroke-linecap: round;
}
.knob-arc {
  fill: none;
  stroke: var(--knob-color);
  stroke-width: 4;
  stroke-linecap: round;
}
.knob-cap {
  fill: #2a3050;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 1;
}
.knob-pointer {
  stroke: var(--knob-color);
  stroke-width: 3;
  stroke-linecap: round;
}
.ctl.active .knob-cap {
  fill: #353c62;
}
.tone-gain .knob {
  --knob-color: #ffd166;
}
.tone-aux1 .knob {
  --knob-color: #7ce0ff;
}
.tone-aux2 .knob {
  --knob-color: #6bffb0;
}
.tone-pan .knob {
  --knob-color: #c3a6ff;
}
.tone-level .knob {
  --knob-color: #ffffff;
}
.tone-phones .knob {
  --knob-color: #a6acc8;
}

.fader {
  position: relative;
  width: 46px;
  height: var(--fader-h, 190px);
  cursor: ns-resize;
  border-radius: 8px;
}
.fader-slot {
  position: absolute;
  left: 50%;
  top: 14px;
  bottom: 14px;
  width: 6px;
  transform: translateX(-50%);
  background: #05070d;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.fader-marks {
  position: absolute;
  inset: 14px 0;
  pointer-events: none;
}
.fader-mark {
  position: absolute;
  right: calc(50% + 7px);
  bottom: calc(var(--pos) * 100%);
  transform: translateY(50%);
  font-size: 0.55rem;
  color: var(--text-dim);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fader-mark::after {
  content: "";
  position: absolute;
  left: calc(100% + 2px);
  top: 50%;
  width: 4px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}
.fader-cap {
  position: absolute;
  left: 50%;
  width: 34px;
  height: 26px;
  bottom: calc(14px + var(--pos) * (100% - 28px));
  transform: translate(-50%, 50%);
  border-radius: 5px;
  background: linear-gradient(#e8ebf5, #9aa1bb 45%, #cfd4e6 55%, #8d94ad);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.fader-cap span {
  position: absolute;
  left: 3px;
  right: 3px;
  top: 50%;
  height: 2px;
  background: #0f1220;
  transform: translateY(-50%);
}
.ctl-fader .ctl-label {
  margin-top: 0.15rem;
}
.ctl-fader.active .fader-cap {
  background: linear-gradient(#ffffff, #b6d9ff 45%, #e1f1ff 55%, #9fb9da);
}

/* lit buttons */
.lit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 52px;
  min-height: 36px;
  padding: 0.3rem 0.5rem;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(#2b3150, #1c2038);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  --lit: #ffffff;
}
.lit-btn.small {
  min-height: 30px;
  font-size: 0.66rem;
}
.lit-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.lit-btn.lit {
  border-color: var(--lit);
  background: color-mix(in srgb, var(--lit) 30%, #1c2038);
  box-shadow: 0 0 14px -3px var(--lit);
  color: #fff;
}
.lit-btn.lit .lit-led {
  background: var(--lit);
  box-shadow: 0 0 8px var(--lit);
}
.tone-mute {
  --lit: #ff6b81;
}
.tone-on {
  --lit: #6bffb0;
}
.tone-pfl {
  --lit: #ffd166;
}
.tone-phantom {
  --lit: #ff8a5b;
}
.tone-lowcut {
  --lit: #8fa8ff;
}

/* ---------- meters ---------- */

.meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  --meter-len: 150px;
}
.meter-body {
  position: relative;
  display: flex;
  gap: 2px;
}
.meter-track {
  position: relative;
  width: 10px;
  height: var(--meter-len);
  border-radius: 3px;
  overflow: hidden;
  background: #05070d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.meter-fill {
  position: absolute;
  inset: 0;
  /* bands line up with INPUT_BANDS: good from −22, hot from −4, clip at 0 (floor −48) */
  background: linear-gradient(to top, #2f8f65 0%, #6bffb0 54%, #6bffb0 88%, #ffd166 91.5%, #ff9b54 97%, #ff4d6d 100%);
}
.meter-cover {
  position: absolute;
  inset: 0;
  background: #05070d;
  transform-origin: top;
  transform: scaleY(1);
}
.meter-hold {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  bottom: calc(var(--pos, 0) * 100%);
  background: #fff;
  opacity: 0.85;
}
.meter-hold.off {
  opacity: 0;
}
.meter-leds .meter-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to top, transparent 0 5px, #05070d 5px 7px);
  pointer-events: none;
}
.meter-marks {
  position: relative;
  width: 24px;
  height: var(--meter-len);
}
.meter-mark {
  position: absolute;
  left: 0;
  bottom: calc(var(--pos) * 100%);
  transform: translateY(50%);
  font-size: 0.52rem;
  color: var(--text-dim);
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.meter-mark.is-clip {
  color: var(--bad);
  font-weight: 800;
}
.meter-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}
.meter-clip {
  font-size: 0.55rem;
  font-weight: 800;
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.meter.clipping .meter-clip {
  background: var(--bad);
  color: #fff;
  border-color: var(--bad);
  box-shadow: 0 0 10px var(--bad);
}
.meter-text {
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  min-width: 2.2em;
  text-align: center;
}
.meter[data-band="good"] .meter-text {
  color: var(--ok);
}
.meter[data-band="hot"] .meter-text {
  color: var(--warn);
}
.meter[data-band="clip"] .meter-text {
  color: var(--bad);
}

/* horizontal meters */
.meter-horizontal {
  flex-direction: row;
  align-items: center;
  width: 100%;
  --meter-len: 100%;
}
.meter-horizontal .meter-body {
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.meter-horizontal .meter-track {
  width: 100%;
  height: 10px;
}
.meter-horizontal .meter-fill {
  background: linear-gradient(to right, #2f8f65 0%, #6bffb0 54%, #6bffb0 88%, #ffd166 91.5%, #ff9b54 97%, #ff4d6d 100%);
}
.meter-horizontal .meter-cover {
  transform-origin: right;
  transform: scaleX(1);
}
.meter-horizontal .meter-hold {
  top: 0;
  bottom: 0;
  width: 2px;
  height: auto;
  left: calc(var(--pos, 0) * 100%);
  right: auto;
}
.meter-horizontal.meter-leds .meter-track::after {
  background: repeating-linear-gradient(to right, transparent 0 6px, #05070d 6px 8px);
}
.meter-horizontal .meter-marks {
  width: 100%;
  height: 11px;
}
.meter-horizontal .meter-mark {
  bottom: auto;
  top: 0;
  left: calc(var(--pos) * 100%);
  transform: translateX(-50%);
}
.meter-horizontal .meter-mark.is-clip {
  transform: translateX(-100%);
}
.meter-horizontal .meter-foot {
  flex-direction: row;
  gap: 0.3rem;
}

/* ---------- mixer: shared ---------- */

.mixer-surface {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}
.mixer-strips {
  display: flex;
  gap: 0;
  min-width: 0;
}
.strip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.strip-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  min-height: 44px;
  padding: 0.25rem 0.3rem;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: #0b0e19;
  cursor: pointer;
  font-family: var(--font-display);
}
.strip-head:hover {
  border-color: var(--accent);
}
.strip-num {
  font-size: 0.7rem;
  color: var(--text-dim);
}
.strip-name {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.strip-head.empty .strip-name {
  color: var(--text-dim);
}
.strip-head.warn {
  border-color: var(--warn);
}
.strip-warn {
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--warn);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 800;
}
.strip-status {
  margin: 0;
  min-height: 1.1em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--bad);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.strip-kind {
  margin: 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted, #9aa7ad);
  text-align: center;
}
.master {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}
.master-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.master-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.master-meter-label {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* ---------- Skin A: analog console ---------- */

.skin-analog .mixer-surface {
  background: linear-gradient(180deg, #232840 0%, #1a1e33 100%);
  border: 1px solid #2e3456;
  border-radius: var(--radius-md);
  padding: 0.6rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.skin-analog .mixer-strips {
  flex: 1 0 auto;
}
.skin-analog .strip {
  width: 92px;
  flex: 1 0 92px;
  max-width: 112px;
  padding: 0 0.3rem 0.3rem;
  border-right: 1px solid rgba(0, 0, 0, 0.45);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.05);
  scroll-snap-align: start;
}
.skin-analog .strip-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.skin-analog .strip-switches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
}
.skin-analog .strip-eq {
  display: flex;
  justify-content: center;
  gap: 0;
}
.skin-analog .strip-eq .ctl-xs .knob {
  width: 27px;
  height: 27px;
}
/* Three knobs across one narrow strip: the dB reading shows only while a knob is being turned. */
.strip-eq .ctl {
  position: relative;
}
.strip-eq .ctl-value {
  visibility: hidden;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2;
}
.strip-eq .ctl.active .ctl-value {
  visibility: visible;
}
.skin-analog .strip-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(0, 0, 0, 0.4);
  width: 100%;
}
.skin-analog .fader-row {
  display: flex;
  align-items: flex-start;
  gap: 0.1rem;
}
.skin-analog .fader-row .meter {
  --meter-len: 170px;
  margin-top: 16px;
}
.skin-analog .fader-row .meter-marks {
  display: none;
}
.skin-analog .fader {
  --fader-h: 200px;
}
.skin-analog .strip.is-muted .ctl-fader .fader-cap {
  filter: saturate(0) brightness(0.7);
}
.skin-analog .master {
  padding: 0 0.4rem 0.3rem 0.6rem;
  border-left: 2px solid rgba(0, 0, 0, 0.45);
}
.skin-analog .master-knobs {
  display: grid;
  gap: 0.35rem;
}
.skin-analog .master-knob-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.skin-analog .master-knob-row .master-meter-label {
  display: none;
}
.skin-analog .master-knob-row .meter {
  --meter-len: 64px;
}
.skin-analog .master-knob-row .meter-marks {
  display: none;
}
.skin-analog .master-main {
  margin-top: auto;
}
.skin-analog .master .fader-row {
  display: flex;
  align-items: flex-start;
  gap: 0.2rem;
}
.skin-analog .master .fader-row .meter {
  --meter-len: 170px;
}
.skin-analog .master .master-meter {
  margin-top: 0;
}
.skin-analog .meter-pair {
  display: flex;
  gap: 0.1rem;
}
.skin-analog .meter-pair .meter-marks {
  display: none;
}
.skin-analog .meter-pair .master-meter:last-child .meter-marks {
  display: block;
}

@media (max-width: 1599px) {
  .skin-analog .strip {
    width: 84px;
    flex-basis: 84px;
  }
}

/* ---------- Skin B: compact mixer ---------- */

.skin-compact .mixer-surface {
  flex-direction: column;
}
.skin-compact .mixer-strips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}
.skin-compact .strip,
.skin-compact .master {
  background: linear-gradient(160deg, #1f3239 0%, #172429 100%);
  border: 1px solid #2c4850;
  border-radius: var(--radius-md);
  padding: 0.55rem;
  gap: 0.45rem;
  align-items: stretch;
}
.skin-compact .strip-head {
  background: #0d171a;
  border-color: #2c4850;
}
.skin-compact .tile-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.skin-compact .tile-body > .lit-btn {
  align-self: stretch;
}
.skin-compact .tile-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.35rem;
}
.skin-compact .tile-meter .meter {
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
}
.skin-compact .tile-meter .meter-body {
  width: 100%;
}
.skin-compact .tile-meter .meter-foot {
  justify-content: space-between;
}
.skin-compact .tile-meter .meter-marks {
  height: 10px;
}
.skin-compact .tile-foot {
  justify-content: stretch;
}
.skin-compact .tile-foot .lit-btn {
  flex: 1;
}
.skin-compact .strip-status {
  text-align: center;
  min-height: 0;
}
.skin-compact .strip.is-muted {
  border-color: rgba(255, 255, 255, 0.07);
}
/* Off only removes the channel from Main: dim the level knob, not the meter or MON. */
.skin-compact .strip.is-muted .tile-level .ctl-knob:first-child {
  opacity: 0.5;
}
.skin-compact .tone-aux1 .knob {
  --knob-color: #ffb86b;
}
.skin-compact .tone-aux2 .knob {
  --knob-color: #ff8fc8;
}
.skin-compact .knob-cap {
  fill: #25383f;
}
.skin-compact .master {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 1rem;
  align-items: center;
}
.skin-compact .master-title {
  grid-column: 1 / -1;
}
.skin-compact .master .tile-knobs {
  justify-content: flex-start;
  gap: 1rem;
}
.skin-compact .master-meters-h {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1rem;
}
.skin-compact .master-meters-h .master-meter {
  flex-direction: row;
  gap: 0.5rem;
  width: 100%;
}
.skin-compact .master-meter-label {
  width: 3.8rem;
  flex: none;
  text-align: right;
}
.phantom-all {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}
.phantom-state {
  font-size: 0.72rem;
  color: var(--text-dim);
  max-width: 11rem;
  line-height: 1.3;
}

@media (max-width: 1250px) {
  .skin-compact .mixer-strips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 899px) {
  .skin-compact .mixer-strips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .skin-compact .master {
    grid-template-columns: 1fr;
  }
  .skin-compact .master-meters-h {
    grid-template-columns: 1fr;
  }
  .skin-analog .mixer-surface {
    margin: 0 -0.35rem;
  }
  .skin-analog .strip {
    width: 88px;
    gap: 0.25rem;
  }
  .skin-analog .strip-top {
    gap: 0.25rem;
  }
  .skin-analog .knob {
    width: 40px;
    height: 40px;
  }
  .skin-analog .strip .fader {
    --fader-h: 170px;
  }
  .skin-analog .strip .fader-row .meter {
    --meter-len: 142px;
  }
  .mixer-hint::after {
    content: " Swipe sideways for more channels.";
  }
  body[data-skin="compact"] .mixer-hint::after {
    content: "";
  }
}

/* ---------- listen bar ---------- */

.listen-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem clamp(0.5rem, 2vw, 1.25rem) calc(0.5rem + env(safe-area-inset-bottom));
  background: rgba(12, 14, 26, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-strong);
  min-height: var(--listen-h);
}
.ears {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}
.listen-label {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--text-dim);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.ears-map {
  width: 300px;
  height: 75px;
  display: block;
  overflow: visible;
}
.map-stage {
  fill: rgba(124, 224, 255, 0.07);
  stroke: rgba(124, 224, 255, 0.35);
}
.map-desk {
  fill: rgba(255, 255, 255, 0.08);
  stroke: var(--line-strong);
}
.map-word {
  font-size: 6.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  fill: var(--text-dim);
}
.map-wedge,
.map-spk {
  fill: #3b4360;
  stroke: #8f98ba;
  stroke-width: 0.8;
}
.map-wedge.off,
.map-spk.off {
  opacity: 0.45;
}
.ear-spot {
  cursor: pointer;
  outline: none;
}
.spot-hit {
  fill: transparent;
}
.spot-dot {
  fill: rgba(255, 255, 255, 0.12);
  stroke: var(--text-dim);
  stroke-width: 1.4;
}
.ear-spot:hover .spot-dot,
.ear-spot:focus-visible .spot-dot {
  stroke: var(--accent);
  fill: rgba(124, 224, 255, 0.3);
}
.ear-spot:focus-visible .spot-hit {
  stroke: #fff;
  stroke-width: 1.5;
}
.ear-spot.dead .spot-dot {
  stroke: var(--bad);
  stroke-dasharray: 2 2;
}
.ear-figure circle,
.ear-figure path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
}
.ear-figure circle {
  fill: rgba(124, 224, 255, 0.25);
}
.ear-spot.dead .ear-figure circle,
.ear-spot.dead .ear-figure path {
  stroke: var(--bad);
}
.ear-figure .ear-cup {
  fill: var(--accent);
  stroke: none;
}
.ears-where {
  margin: 0;
  font-weight: 700;
  font-size: 0.92rem;
}
/* the diagram's figure and ear buttons */
.ear-here .ear-figure circle,
.ear-here .ear-figure path {
  stroke-width: 2.6;
}
.ear-btn {
  cursor: pointer;
  outline: none;
}
.ear-btn-hit {
  fill: rgba(255, 255, 255, 0.03);
  stroke: transparent;
}
.ear-ghost circle,
.ear-ghost path {
  stroke: #6f7798 !important;
  stroke-dasharray: 3 2;
}
.ear-ghost circle {
  fill: transparent !important;
}
.ear-btn:hover .ear-btn-hit,
.ear-btn:focus-visible .ear-btn-hit {
  stroke: var(--accent);
  fill: rgba(124, 224, 255, 0.1);
}
.ear-btn:hover .ear-ghost circle,
.ear-btn:hover .ear-ghost path,
.ear-btn:focus-visible .ear-ghost path {
  stroke: var(--accent) !important;
}

.listen-now {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}
.listen-meter {
  max-width: 320px;
}
.listen-meter .meter-foot,
.listen-meter .meter-marks {
  display: none;
}
.listen-msg {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.3;
}
.transport {
  flex: none;
  min-width: 96px;
}
/* A wedge scenario heard from somewhere else: the bar lights up, the wedge's
   spot pulses, and a nudge offers the switch (js/ears.js). The page leaves
   room for the taller bar. */
:root:has(.listen-bar.ears-nudge) {
  --listen-h: 132px;
}
.listen-bar.ears-nudge {
  border-top: 2px solid var(--accent);
  box-shadow: 0 -6px 24px rgba(124, 224, 255, 0.18);
}
.listen-bar.ears-nudge .listen-label {
  color: var(--accent);
  font-weight: 700;
}
.ears-nudge-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(124, 224, 255, 0.45);
  border-radius: 8px;
  background: rgba(124, 224, 255, 0.1);
}
.ears-nudge-box[hidden],
.ears-switch[hidden] {
  display: none;
}
.ears-nudge-text {
  margin: 0;
  flex: 1 1 16rem;
  font-size: 0.85rem;
  line-height: 1.3;
}
.ears-switch {
  flex: none;
  min-height: 34px;
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
}
.ear-spot.target .spot-dot {
  stroke: var(--accent);
  fill: rgba(124, 224, 255, 0.35);
  animation: ears-pulse 1.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes ears-pulse {
  50% {
    transform: scale(1.45);
    fill: rgba(124, 224, 255, 0.6);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ear-spot.target .spot-dot {
    animation: none;
    stroke-width: 2.4;
  }
}

@media (max-width: 899px) {
  :root {
    --listen-h: 118px;
  }
  .listen-bar {
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
  }
  .ears {
    flex: 1 1 100%;
    order: 1;
    justify-content: center;
  }
  .listen-label {
    display: none;
  }
  .ears-map {
    width: min(100%, 300px);
    height: auto;
  }
  .listen-now {
    order: 2;
  }
  .listen-meter {
    display: none;
  }
  .listen-msg {
    font-size: 0.75rem;
  }
  :root:has(.listen-bar.ears-nudge) {
    --listen-h: 228px;
  }
  .ears-nudge-box {
    flex-wrap: nowrap;
    padding: 0.3rem 0.45rem;
  }
  .ears-nudge-text {
    flex: 1 1 auto;
    font-size: 0.75rem;
  }
  .ears-switch {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }
  /* the nudge already says what you're hearing */
  .listen-bar.ears-nudge .listen-msg {
    display: none;
  }
  .transport {
    order: 3;
    min-width: 80px;
    min-height: 40px;
    padding: 0.4rem 0.9rem;
  }
}

/* ---------- toast & errors ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--listen-h) + 1rem + env(safe-area-inset-bottom));
  transform: translate(-50%, 1rem);
  opacity: 0;
  pointer-events: none;
  z-index: 60;
  background: #252b48;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  max-width: calc(100vw - 2rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 30px -10px #000;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.ok {
  border-color: var(--ok);
}
.toast.bad {
  border-color: var(--bad);
}
.load-errors {
  position: fixed;
  top: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(560px, calc(100vw - 1.5rem));
  background: #3a1e2a;
  border: 1px solid var(--bad);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
}
.load-errors ul {
  margin: 0.4rem 0;
  padding-left: 1.2rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- credits ---------- */

.credits-link {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.credits-block h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0.8rem 0 0.4rem;
}
.credits-block dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.9rem;
  margin: 0;
  font-size: 0.9rem;
}
.credits-block dt {
  color: var(--text-dim);
}
.credits-block dd {
  margin: 0;
}
.credits-note {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

/* ---------- Canvas submission ---------- */

.canvas-chip {
  border-style: dashed;
  color: var(--text-dim);
}
.canvas-dialog {
  max-width: min(620px, calc(100vw - 1.5rem));
}
.canvas-inner {
  display: grid;
  gap: 0.8rem;
}
.canvas-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}
.canvas-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-dim);
}
.canvas-list li.done {
  color: var(--text);
}
.canvas-mark {
  width: 1.3rem;
  height: 1.3rem;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}
.canvas-list li.done .canvas-mark {
  color: var(--ok);
  border-color: var(--ok);
}
.canvas-note {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.canvas-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
}
.canvas-field input,
.canvas-field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem; /* 16px+ stops iOS zooming on focus */
  color: var(--text);
  background: var(--bg-sunken);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
}
.canvas-field input:focus-visible,
.canvas-field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.canvas-field [aria-invalid="true"] {
  border-color: var(--bad);
}
.canvas-preview {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8rem !important;
  color: var(--text-dim) !important;
  resize: vertical;
}
.canvas-error,
.canvas-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: var(--bad);
}
.canvas-status[data-tone="ok"] {
  color: var(--ok);
}
.canvas-status[data-tone="warn"] {
  color: var(--warn);
}
.canvas-copy {
  width: 100%;
  min-height: 52px;
  font-size: 1.05rem;
}
.canvas-stat {
  margin-left: auto;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- icons and gear pictures ---------- */

.ico {
  flex: none;
  display: inline-block;
  vertical-align: middle;
  color: var(--text);
}
.ico .acc {
  stroke: var(--accent);
}
.ico .badge {
  fill: var(--bg-raised);
  stroke: var(--warn);
}
.ico .ico-power path {
  fill: var(--warn);
}
.ico .ico-amp {
  stroke: var(--warn);
}
.dev-ico,
.port-ico {
  flex: none;
  display: grid;
  place-items: center;
  color: var(--text-dim);
}
.dev-ico .ico {
  color: var(--text);
}
.tag-ico {
  margin: -4px 2px -4px -4px;
}
.role-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.group-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.group-title small {
  color: var(--text-dim);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.port-btn {
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.6rem;
  align-items: center;
}
.port-btn .port-ico {
  grid-row: span 2;
}
.port-btn .port-name,
.port-btn .port-state {
  grid-column: 2;
}
.amp-sides {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.amp-side {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}
.amp-out {
  border-style: double;
  border-width: 3px;
  border-color: var(--line-strong);
}
.amp-side-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.amp-side-title small {
  display: block;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
}
.cable-art {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.cable-kind {
  color: var(--warn);
  font-size: 0.8rem;
  font-weight: 600;
}
.patch-sub .ico,
.target-group h3 .ico {
  margin-right: 0.4rem;
}
.target-btn {
  align-items: center;
}
.conn-guide {
  margin-top: 0.8rem;
  font-size: 0.9rem;
}
.conn-guide summary {
  cursor: pointer;
  color: var(--accent);
}
.conn-guide ul {
  list-style: none;
  margin: 0.6rem 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.conn-guide li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.conn-guide-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.target-btn {
  grid-template-columns: auto 1fr;
  column-gap: 0.6rem;
}
.target-btn .port-ico {
  grid-row: span 2;
}
.target-btn small {
  grid-column: 2;
}
.target-btn > span:first-child:not(.port-ico) {
  grid-column: 1 / -1;
}
.port-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
}
.port-state .cable-dot {
  align-self: center;
}
.port-state .port-empty {
  grid-column: 1 / -1;
}
.port-state .port-cable {
  grid-column: 2;
}
.conn-guide-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.6rem;
}

/* ---------- Mackie CR1604-VLZ (js/ui/mixer-1604-view.js) ---------- */

.scenario-note {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.tone-eq .knob {
  --knob-color: #ffb38a;
}
.tone-aux3 .knob,
.tone-aux4 .knob {
  --knob-color: #c3a6ff;
}
.tone-assign {
  --lit: #7ce0ff;
}
.ctl-xs .knob {
  width: 34px;
  height: 34px;
}
.ctl-xs .ctl-label {
  font-size: 0.58rem;
}
.ctl-xs .ctl-value {
  font-size: 0.6rem;
}

.skin-mackie1604 .mixer-surface {
  background: linear-gradient(180deg, #2a2d36 0%, #20232b 100%);
  border: 1px solid #383c48;
  border-radius: var(--radius-md);
  padding: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.skin-mackie1604 .mixer-strips {
  flex: none;
}
.c16-strip {
  width: 84px;
  flex: none;
  padding: 0 0.25rem 0.3rem;
  gap: 0.25rem;
  border-right: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.05);
  scroll-snap-align: start;
}
.c16-strip .strip-head {
  min-height: 38px;
  flex-direction: column;
  gap: 0;
}
.c16-sec {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.35);
}
.c16-pair {
  display: flex;
  justify-content: center;
  gap: 0.15rem;
}
.c16-strip .lit-btn {
  min-width: 0;
  width: 100%;
  min-height: 26px;
  padding: 0.15rem 0.2rem;
  font-size: 0.58rem;
  letter-spacing: 0.03em;
}
.c16-strip .lit-btn .lit-led {
  width: 6px;
  height: 6px;
}
.c16-mute {
  flex-direction: row;
  justify-content: space-between;
}
.c16-mute .lit-btn {
  width: auto;
  flex: 1;
}
.c16-leds {
  display: flex;
  gap: 0.25rem;
}
.c16-led {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.5rem;
  font-weight: 800;
  color: var(--text-dim);
}
.c16-led i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.c16-led.led-ol i.on {
  background: var(--bad);
  box-shadow: 0 0 6px var(--bad);
}
.c16-led.led-sig i.on,
.c16-led.led-levelset i.on {
  background: var(--ok);
  box-shadow: 0 0 6px var(--ok);
}
.c16-led i.on:not(.steady) {
  opacity: 0.75;
}
.c16-led.led-rude i.on {
  background: var(--warn);
  box-shadow: 0 0 10px var(--warn);
}
.c16-fader {
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
}
.skin-mackie1604 .fader {
  --fader-h: 180px;
  width: 38px;
}
.c16-assign {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 36px;
  margin-top: 1.2rem;
}
.c16-strip .c16-assign .lit-btn {
  min-height: 24px;
  padding: 0.1rem;
  font-size: 0.55rem;
}
.c16-strip.is-muted .fader-cap {
  filter: saturate(0) brightness(0.7);
}

.c16-master {
  flex: none;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0 0.3rem 0.3rem 0.6rem;
  border-left: 2px solid rgba(0, 0, 0, 0.5);
}
.c16-master-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  width: 330px;
}
.c16-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}
.c16-block h4 {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-align: center;
}
.c16-block .lit-btn {
  min-width: 0;
  width: 100%;
  min-height: 26px;
  padding: 0.15rem 0.25rem;
  font-size: 0.56rem;
}
.c16-note {
  margin: 0;
  font-size: 0.55rem;
  color: var(--text-dim);
  text-align: center;
}
.c16-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
  width: 100%;
}
.c16-tape-head {
  min-height: 34px;
  flex-direction: column;
  gap: 0;
}
.c16-meters {
  grid-row: span 2;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 8px;
  background: #121318;
}
.c16-meter {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.c16-meter .seg {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.5rem;
  color: var(--text-dim);
}
.c16-meter .seg i {
  width: 14px;
  height: 7px;
  border-radius: 2px;
  background: rgba(107, 255, 176, 0.12);
}
.c16-meter .seg.on i {
  background: var(--ok);
  box-shadow: 0 0 5px var(--ok);
}
.c16-meter .seg-hot.on i {
  background: var(--warn);
  box-shadow: 0 0 5px var(--warn);
}
.c16-meter .seg-clip i {
  background: rgba(255, 107, 129, 0.15);
}
.c16-meter .seg-clip.on i {
  background: var(--bad);
  box-shadow: 0 0 6px var(--bad);
}
.c16-meter .seg small {
  width: 1.6rem;
  text-align: right;
}
.c16-meter b {
  font-size: 0.5rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.c16-faders {
  display: flex;
  justify-content: space-between;
  gap: 0.2rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(0, 0, 0, 0.4);
}
.c16-sub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.c16-tomain {
  flex-direction: row;
  margin-top: 0;
  width: auto;
}
.c16-tomain .lit-btn {
  min-width: 0;
  min-height: 24px;
  padding: 0.1rem 0.3rem;
  font-size: 0.55rem;
}
.c16-main {
  justify-content: flex-end;
  padding-left: 0.3rem;
  border-left: 1px solid rgba(0, 0, 0, 0.4);
}
/* Paired knobs keep a fixed width, so a growing readout can't push the neighbour. */
.c16-pair > .ctl {
  width: 38px;
  flex: none;
}
.c16-pair > .ctl .ctl-value,
.c16-eq .ctl .ctl-value {
  overflow: visible;
  text-align: center;
}
/* EQ: one band per row, like the real strip: label, knob, value. */
.c16-eq .ctl {
  display: grid;
  grid-template-columns: 24px 30px 26px;
  align-items: center;
  column-gap: 1px;
  width: 81px;
}
.c16-eq .ctl .ctl-label {
  text-align: right;
  font-size: 0.52rem;
  letter-spacing: 0.02em;
}
.c16-eq .ctl .knob {
  width: 30px;
  height: 30px;
}
.c16-eq .ctl .ctl-value {
  text-align: left;
  font-size: 0.55rem;
  white-space: normal;
  line-height: 1.1;
}
.c16-subs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.c16-subs-title {
  margin: 0;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.c16-subs-title small {
  font-size: inherit;
  opacity: 0.7;
}
.c16-sub-faders {
  display: flex;
  gap: 0.2rem;
}
.c16-quad > .ctl {
  width: 34px;
}
.c16-master-top > .c16-block:last-child {
  grid-column: span 2;
}

/* ---------- outboard gear: device settings, recorder ---------- */

.dev-settings {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.dev-settings label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 0.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.dev-settings input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--accent);
}
.dev-settings output {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
/* A wireless handheld's one button (tap = mute, press and hold = power). */
.mic-display {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.mic-display strong {
  color: var(--text);
}
.mic-press {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.dev-technique {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.dev-technique strong {
  color: var(--ok);
}
.out-more summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0.5rem 0;
}
.rec-jacks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.rec-dialog {
  max-width: min(760px, calc(100vw - 32px));
}
.rec-status {
  font-variant-numeric: tabular-nums;
}
.rec-status.is-rec {
  color: var(--bad);
  font-weight: 800;
}
.rec-card,
.rec-note {
  margin: 0.25rem 0 0.6rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.rec-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
  margin-bottom: 0.4rem;
}
.rec-tracks {
  display: grid;
  grid-template-columns: repeat(8, minmax(58px, 1fr));
  gap: 0.3rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
}
.rec-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.2rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.rec-track.is-linked {
  border-color: rgba(124, 224, 255, 0.35);
}
.rec-track.is-dual {
  background: rgba(124, 224, 255, 0.06);
}
.rec-track.warn {
  border-color: var(--warn);
}
.rec-track .lit-btn {
  min-width: 0;
  width: 100%;
  min-height: 26px;
  padding: 0.1rem;
  font-size: 0.56rem;
}
.rec-num {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
}
.rec-src {
  margin: 0;
  min-height: 2.2em;
  font-size: 0.56rem;
  color: var(--text-dim);
  text-align: center;
  overflow-wrap: anywhere;
}
.rec-meter {
  --meter-len: 90px;
}
.rec-meter .meter-marks {
  display: none;
}
.rec-transport {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.6rem 0;
  flex-wrap: wrap;
}
.rec-btn.lit {
  background: var(--bad);
  color: #fff;
}
.rec-takes {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
}
.rec-takes span {
  color: var(--text-dim);
  margin-right: 0.4rem;
}

/* ---------- real-mixer menu in the skin switch ---------- */

.skin-real {
  display: flex;
  align-items: center;
  border-radius: 999px;
}
.skin-select {
  min-height: 44px;
  max-width: 12rem;
  padding: 0.35rem 2rem 0.35rem 1rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.skin-select option {
  color: #111;
}
.skin-real.active .skin-select {
  background-color: #7ce0ff;
  color: var(--bg);
}
@media (max-width: 899px) {
  .skin-select {
    max-width: 8.5rem;
    font-size: 0.85rem;
    padding-left: 0.7rem;
  }
}

/* ---------- compact mixers ---------- */

.skin-vlz1202 .mixer-surface,
.skin-mix8 .mixer-surface,
.skin-mg102 .mixer-surface,
.skin-stagepas400bt .mixer-surface,
.skin-x1204usb .mixer-surface,
.skin-sd442 .mixer-surface {
  background: linear-gradient(180deg, #2a2d36 0%, #20232b 100%);
  border: 1px solid #383c48;
  border-radius: var(--radius-md);
  padding: 0.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.skin-mg102 .mixer-surface,
.skin-stagepas400bt .mixer-surface {
  background: linear-gradient(180deg, #2b3038 0%, #1f242c 100%);
}
.cm-strip .c16-sec:has(.ctl-big) {
  border-top: none;
}
.cm-strip .ctl-big {
  margin-top: auto;
}
.cm-eq .ctl {
  width: 81px;
}
.cm-master-top {
  width: 360px;
}
.skin-vlz1202 .mixer-strips,
.skin-mix8 .mixer-strips,
.skin-mg102 .mixer-strips,
.skin-stagepas400bt .mixer-strips,
.skin-x1204usb .mixer-strips,
.skin-sd442 .mixer-strips {
  flex: none;
}
/* Sound Devices 442: a black field-mixer face. */
.skin-sd442 .mixer-surface {
  background: linear-gradient(180deg, #24252a 0%, #141518 100%);
}
.skin-sd442 .c16-strip {
  width: 96px;
}
.cm-strip.is-linked .c16-sec:has(.ctl-big),
.cm-strip.is-linked .c16-sec:has(.tone-pan) {
  opacity: 0.35;
}
.cm-strip .strip-head {
  position: relative;
}
.cm-strip.is-linked .strip-head::after {
  content: "LINKED";
  position: absolute;
  bottom: 1px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.45rem;
  font-weight: 800;
  color: var(--accent, #7ce0ff);
}
.cm-hp-src {
  flex-wrap: wrap;
}
/* Behringer Xenyx: a cooler, steel-blue panel. */
.skin-x1204usb .mixer-surface {
  background: linear-gradient(180deg, #2c323d 0%, #1e232c 100%);
}
.c16-led.led-comp i.on {
  background: #ffb547;
  box-shadow: 0 0 8px #ffb547;
}
.cm-comp,
.cm-send-pre {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 100%;
}
.cm-send-pre .lit-btn {
  width: auto !important;
  flex: none;
  padding-inline: 0.3rem !important;
}
.cm-strip .cm-level {
  margin-top: auto;
  border-top: none;
}
.skin-x1204usb .fader {
  --fader-h: 150px;
  width: 36px;
}
.cm-master-faders {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.cm-fx-name {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #ff6b5e;
  background: #120d0d;
  border-radius: 4px;
  padding: 0.15rem 0.35rem;
}
/* ---------- digital mixer (Soundcraft Ui16): mix bar, fader bank, SEL panel ---------- */

.skin-ui16 .mixer-surface.dg-surface,
.skin-l20 .mixer-surface.dg-surface {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 0.75rem;
  align-items: start;
  background: #15171c;
  border: 1px solid #2c303a;
  border-radius: var(--radius-md);
  padding: 0.6rem;
}
.dg-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.dg-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.dg-tab {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.7rem;
  min-height: 34px;
  border-radius: 6px;
  border: 1px solid #353a46;
  background: #1f232b;
  color: var(--text-dim);
  cursor: pointer;
}
.dg-tab.is-aux {
  color: #ffb547;
}
.dg-tab.is-fx {
  color: #b48cff;
}
.dg-tab[aria-selected="true"] {
  background: #7ce0ff;
  border-color: #7ce0ff;
  color: #0d1117;
}
.dg-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.dg-bank {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 0.3rem;
}
.dg-strip {
  width: 66px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0 0.2rem 0.3rem;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.dg-strip.is-sel {
  background: rgba(124, 224, 255, 0.08);
  border-radius: 6px;
}
.dg-strip .strip-head {
  min-height: 38px;
  width: 100%;
  flex-direction: column;
  gap: 0;
}
.dg-sel {
  font: inherit;
  font-size: 0.62rem;
  font-weight: 800;
  width: 100%;
  min-height: 28px;
  border-radius: 5px;
  border: 1px solid #353a46;
  background: #1f232b;
  color: var(--text-dim);
  cursor: pointer;
}
.dg-sel.on {
  background: #7ce0ff;
  border-color: #7ce0ff;
  color: #0d1117;
}
.dg-extra {
  min-height: 28px;
  width: 100%;
  display: flex;
  justify-content: center;
}
.dg-extra .lit-btn,
.dg-btns .lit-btn {
  min-width: 0;
  width: 100%;
  min-height: 28px;
  padding: 0.15rem 0.2rem;
  font-size: 0.58rem;
}
.dg-fader {
  display: flex;
  align-items: stretch;
  gap: 4px;
}
.skin-ui16 .fader,
.skin-l20 .fader {
  --fader-h: 190px;
  width: 34px;
}
.dg-meter {
  position: relative;
  width: 7px;
  margin: 0.6rem 0 1.6rem;
  background: #0b0d10;
  border-radius: 3px;
  overflow: hidden;
}
.dg-meter i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: linear-gradient(0deg, #3ddc84 0%, #3ddc84 70%, #ffd23f 88%, #ff5a4e 100%);
  background-size: 100% 190px;
  background-position: bottom;
}
.dg-meter b {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #3a1210;
}
.dg-meter b.on {
  background: #ff5a4e;
}
.dg-master-meters {
  display: flex;
  gap: 3px;
}
.dg-btns {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}
.dg-strip.is-muted .fader-cap {
  filter: grayscale(1) brightness(0.7);
}
.dg-master {
  width: 92px;
  margin-left: 0.4rem;
  border-left: 2px solid #353a46;
  border-right: none;
}
.dg-master-name {
  min-height: 38px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
  color: #7ce0ff;
}
.dg-note {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-align: center;
}
.dg-panel {
  background: #1b1e25;
  border: 1px solid #2c303a;
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dg-panel-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.dg-panel-title {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: #7ce0ff;
}
.dg-step {
  font: inherit;
  font-size: 1.1rem;
  min-width: 36px;
  min-height: 34px;
  border-radius: 6px;
  border: 1px solid #353a46;
  background: #1f232b;
  color: var(--text);
  cursor: pointer;
}
.dg-sec {
  border-top: 1px solid #2c303a;
  padding-top: 0.35rem;
}
.dg-sec h5 {
  margin: 0 0 0.25rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.dg-sec-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.dg-sec-body > .lit-btn {
  min-width: 0;
  min-height: 30px;
  padding: 0.2rem 0.45rem;
  font-size: 0.62rem;
}
.dg-band {
  display: grid;
  grid-template-columns: 3.4rem repeat(3, 1fr);
  align-items: center;
  gap: 0.2rem;
  width: 100%;
}
.dg-band-name {
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--text-dim);
}
.dg-q-blank {
  font-size: 0.55rem;
  color: var(--text-dim);
  text-align: center;
}
.dg-flat {
  font: inherit;
  font-size: 0.6rem;
  font-weight: 800;
  min-height: 28px;
  padding: 0 0.6rem;
  border-radius: 5px;
  border: 1px solid #353a46;
  background: #1f232b;
  color: var(--text-dim);
  cursor: pointer;
}
.dg-send {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.dg-send .lit-btn {
  min-width: 0;
  min-height: 26px;
  padding: 0.1rem 0.3rem;
  font-size: 0.55rem;
}
@media (max-width: 899px) {
  .skin-ui16 .mixer-surface.dg-surface,
  .skin-l20 .mixer-surface.dg-surface {
    grid-template-columns: minmax(0, 1fr);
  }
  .skin-ui16 .fader,
  .skin-l20 .fader {
    --fader-h: 150px;
  }
}

/* ---------- Behringer X32 Compact: channel strip | inputs | display | groups ---------- */

.skin-x32c .mixer-surface.x32-surface,
.skin-gdig .mixer-surface.x32-surface {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
  background: linear-gradient(180deg, #1d2026 0%, #131519 100%);
  border: 1px solid #2c303a;
  border-radius: var(--radius-md);
  padding: 0.6rem;
}
.skin-x32c .fader,
.skin-gdig .fader {
  --fader-h: 170px;
  width: 32px;
}
.x32-desk {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  min-width: 0;
}
.x32-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
  background: #181a20;
  border: 1px solid #2a2e37;
  border-radius: 8px;
  padding: 0.4rem;
}
.x32-title {
  margin: 0;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.x32-layers,
.x32-mgrp {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.x32-layer,
.x32-group {
  font: inherit;
  font-size: 0.66rem;
  font-weight: 800;
  min-height: 32px;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  border: 1px solid #3a3f4b;
  background: #23262e;
  color: var(--text-dim);
  cursor: pointer;
}
.x32-layer.on,
.x32-group.on {
  background: #ffb547;
  border-color: #ffb547;
  color: #111;
}
/* SENDS ON FADERS: a lit key and what the faders are right now. */
.x32-sof-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 0.15rem 0 0.4rem;
}
.lit-btn.x32-sof {
  --lit: #7ce0ff;
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
/* On, it flashes like the desk's key (steady with reduced motion: see the global rule). */
.lit-btn.x32-sof.lit {
  animation: sof-flash 1s step-end infinite;
}
.lit-btn.x32-sof.lit .lit-led {
  animation: sof-flash-led 1s step-end infinite;
}
@keyframes sof-flash {
  50% {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(#2b3150, #1c2038);
    box-shadow: none;
  }
}
@keyframes sof-flash-led {
  50% {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
  }
}
.x32-sof-note {
  flex: 1 1 14rem;
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-dim);
}
.x32-sof-note.on {
  color: #7ce0ff;
}
.x32-bank {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 0.3rem;
}
.x32-strip,
.x32-empty {
  width: 62px;
}
.x32-empty {
  flex: none;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.x32-tag {
  font-size: 0.55rem;
  font-weight: 800;
  color: #ffb547;
  text-align: center;
  line-height: 1.2;
}
.dg-sel.assigning {
  border-style: dashed;
  border-color: #ffb547;
}
.dg-sel.assigning.on {
  background: #ffb547;
  color: #111;
}
.x32-display {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 320px;
  background: #0f1a24;
  border: 2px solid #2e4a63;
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #cfe9ff;
}
.x32-lines p {
  margin: 0 0 0.35rem;
}
.x32-big {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}
.x32-warn {
  color: #ffd27a;
}
.x32-main {
  width: 80px;
}
@media (max-width: 899px) {
  .skin-x32c .mixer-surface.x32-surface,
.skin-gdig .mixer-surface.x32-surface {
    grid-template-columns: minmax(0, 1fr);
  }
  .skin-x32c .fader,
.skin-gdig .fader {
    --fader-h: 140px;
  }
  .x32-display {
    max-width: none;
  }
}

/* ---------- Yamaha 01V96i: input row, selected channel + display, faders ---------- */

.skin-yam01v96 .mixer-surface.y96-surface {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: linear-gradient(180deg, #2a2d33 0%, #1b1d22 100%);
  border: 1px solid #3a3d45;
  border-radius: var(--radius-md);
  padding: 0.6rem;
}
.skin-yam01v96 .fader {
  --fader-h: 160px;
  width: 30px;
}
.y96-top,
.y96-mid,
.y96-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
  min-width: 0;
}
.y96-box {
  background: #202329;
  border: 1px solid #383c45;
  border-radius: 8px;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  max-width: 100%;
}
.y96-inputs,
.y96-faders {
  flex: 1 1 520px;
}
.y96-gains {
  display: flex;
  overflow-x: auto;
  gap: 0.15rem;
  scrollbar-width: thin;
}
.y96-gain {
  flex: none;
  width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.y96-gain .lit-btn,
.y96-row .lit-btn {
  min-width: 0;
  min-height: 28px;
  padding: 0.15rem 0.4rem;
  font-size: 0.58rem;
}
.y96-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.y96-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.y96-selch {
  flex: 0 1 300px;
}
.y96-keys {
  flex: 1 1 260px;
}
.y96-lcd {
  flex: 1 1 300px;
  min-width: 240px;
  background: #0d1c13;
  border: 3px solid #3c4a40;
  border-radius: 6px;
  padding: 0.5rem;
  color: #b8f5c6;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.y96-lcd-title {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 700;
  color: #e6ffe9;
  border-bottom: 1px solid #2c4434;
  padding-bottom: 0.25rem;
}
.y96-lcd .x32-lines p {
  margin: 0 0 0.3rem;
}
.y96-aux {
  gap: 0.15rem;
}
.y96-stin,
.y96-stereo {
  flex: none;
}
.lit-btn.tone-on.lit,
.lit-btn.tone-on[aria-pressed="true"] {
  background: #3ddc84;
  border-color: #3ddc84;
  color: #0d1117;
}
@media (max-width: 899px) {
  .skin-yam01v96 .fader {
    --fader-h: 130px;
  }
}

/* Full-size X32: wider banks, ROUTING and SCENES pages on the main display */
.skin-x32 .mixer-surface.x32-surface {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
  background: linear-gradient(180deg, #1d2026 0%, #131519 100%);
  border: 1px solid #2c303a;
  border-radius: var(--radius-md);
  padding: 0.6rem;
}
.skin-x32 .fader {
  --fader-h: 170px;
  width: 30px;
}
.x32-full .x32-inputs {
  flex: 1 1 100%;
}
.x32-full .x32-strip,
.x32-full .x32-empty {
  width: 58px;
}
.x32-routing,
.x32-scenes {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 340px;
  overflow-y: auto;
}
.x32-route,
.x32-scene {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: space-between;
}
.x32-route select {
  font: inherit;
  font-size: 0.72rem;
  background: #0b141c;
  color: #cfe9ff;
  border: 1px solid #2e4a63;
  border-radius: 4px;
  padding: 0.2rem;
  min-height: 30px;
}
.x32-scene-name {
  flex: 1;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.x32-scene .x32-layer:disabled {
  opacity: 0.4;
  cursor: default;
}
@media (max-width: 899px) {
  .skin-x32 .mixer-surface.x32-surface {
    grid-template-columns: minmax(0, 1fr);
  }
  .skin-x32 .fader {
    --fader-h: 140px;
  }
}

/* ---------- processing graphs (js/ui/viz.js) ---------- */

.dg-proc h5 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.dg-proc h5 .lit-btn {
  min-width: 0;
  min-height: 26px;
  padding: 0.15rem 0.5rem;
  font-size: 0.6rem;
}
.viz {
  position: relative;
  margin: 0 0 0.35rem;
  border-radius: 6px;
  overflow: hidden;
  --viz-bg: #10141b;
  --viz-grid: rgba(255, 255, 255, 0.07);
  --viz-grid-major: rgba(255, 255, 255, 0.16);
  --viz-curve: #5fd3ff;
  --viz-fill: rgba(95, 211, 255, 0.16);
  --viz-text: rgba(255, 255, 255, 0.45);
  --viz-dot: #ffcf5a;
  --viz-gr: #ff9b3d;
  background: var(--viz-bg);
  border: 1px solid #2a303b;
}
.viz svg {
  display: block;
  width: 100%;
  height: auto;
}
.viz-eq {
  max-width: 420px;
}
.viz-comp svg {
  width: 126px;
}
.viz-comp.viz-small svg {
  width: 86px;
}
.viz .grid {
  stroke: var(--viz-grid);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.viz .grid.major,
.viz .grid.zero,
.viz .grid.unity {
  stroke: var(--viz-grid-major);
}
.viz .grid.unity {
  stroke-dasharray: 3 3;
}
.viz .lbl {
  fill: var(--viz-text);
  font-size: 8px;
  font-family: inherit;
}
.viz .curve {
  fill: none;
  stroke: var(--viz-curve);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.viz .fill {
  fill: var(--viz-fill);
}
.viz .thr {
  stroke: var(--viz-dot);
  stroke-dasharray: 2 3;
  vector-effect: non-scaling-stroke;
}
.viz .band circle {
  fill: var(--viz-bg);
  stroke: var(--viz-dot);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.viz .band.sel circle {
  fill: var(--viz-dot);
}
.viz .band text {
  fill: var(--viz-dot);
  font-size: 8px;
  font-weight: 700;
}
.viz .band.sel text {
  fill: var(--viz-bg);
}
.viz .gr-bg {
  fill: rgba(255, 255, 255, 0.06);
}
.viz .gr {
  fill: var(--viz-gr);
}
.viz-comp {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}
.viz-gr {
  font-size: 0.6rem;
  color: var(--viz-text);
  padding: 0 0.3rem 0.15rem;
  font-variant-numeric: tabular-nums;
}
.viz-tag {
  position: absolute;
  top: 3px;
  right: 4px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ff6b6b;
}
.viz-tag:empty {
  display: none;
}
/* Switched off: the curve goes grey and flat, the settings stay visible. */
.viz.is-off .curve {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-dasharray: 4 3;
}
.viz.is-off .fill {
  fill: transparent;
}
.viz.is-off .band circle {
  stroke: rgba(255, 255, 255, 0.35);
}
.viz.is-off .band text {
  fill: rgba(255, 255, 255, 0.45);
}
/* Behringer X32: the dark blue screen with a cyan curve. */
.viz-x32 {
  --viz-bg: #08131f;
  --viz-curve: #3fd0ff;
  --viz-fill: rgba(63, 208, 255, 0.2);
  --viz-dot: #ffe066;
  border-color: #2e4a63;
}
.x32-viz {
  display: flex;
  gap: 0.35rem;
  align-items: stretch;
}
.x32-viz .viz-eq {
  flex: 1;
  min-width: 0;
}
.x32-viz .viz {
  margin: 0;
}
/* Soundcraft Ui16: the tablet app's green EQ. */
.viz-ui16 {
  --viz-curve: #7ee07a;
  --viz-fill: rgba(126, 224, 122, 0.16);
  --viz-dot: #f2f2f2;
}
/* Yamaha 01V96: the display's monochrome LCD (matches .y96-lcd). */
.viz-lcd {
  --viz-bg: #0d1c13;
  --viz-grid: rgba(184, 245, 198, 0.1);
  --viz-grid-major: rgba(184, 245, 198, 0.24);
  --viz-curve: #b8f5c6;
  --viz-fill: rgba(184, 245, 198, 0.12);
  --viz-text: rgba(184, 245, 198, 0.6);
  --viz-dot: #e6ffe9;
  --viz-gr: #b8f5c6;
  border-radius: 2px;
  border-color: #2c4434;
}

/* ---------- Yamaha CL3: SELECTED CHANNEL + touch screen on top, INPUT / Centralogic / master below ---------- */

.skin-cl3 .mixer-surface.cl-surface {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: linear-gradient(180deg, #2a2c30 0%, #1a1b1e 100%);
  border: 1px solid #3a3c42;
  border-radius: var(--radius-md);
  padding: 0.6rem;
}
.skin-cl3 .fader {
  --fader-h: 160px;
  width: 30px;
}
.cl-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: stretch;
}
.cl-selch {
  flex: 0 1 300px;
  min-width: 0;
  background: #202124;
  border: 1px solid #3a3c42;
  border-radius: 8px;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.cl-selch-row,
.cl-eqband {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}
.cl-eqknobs {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-top: 1px solid #34363c;
  padding-top: 0.3rem;
}
.cl-eqband .dg-band-name {
  width: 4.2em;
}
.cl-warn {
  margin: 0;
  min-height: 1em;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ff8a65;
}
.cl-screen {
  flex: 1 1 420px;
  min-width: 0;
  background: #0e1726;
  border: 3px solid #3b3e45;
  border-radius: 6px;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: #dbe7f5;
}
.cl-access {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  justify-content: space-between;
  border-bottom: 1px solid #23324a;
  padding-bottom: 0.3rem;
}
.cl-selname {
  font-weight: 800;
  font-size: 0.8rem;
  color: #ffffff;
  background: #24569a;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}
.cl-screen .x32-layer.on {
  background: #4c8ee8;
  border-color: #4c8ee8;
  color: #fff;
}
.cl-screen .dg-panel {
  background: transparent;
  border: 0;
  padding: 0;
}
.cl-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.35rem;
}
.cl-ovch {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: #142036;
  border: 1px solid #23324a;
  border-radius: 5px;
  padding: 0.25rem;
  min-width: 0;
}
.cl-ovch.is-sel {
  border-color: #4c8ee8;
  box-shadow: 0 0 0 1px #4c8ee8 inset;
}
.cl-ovch.is-off {
  opacity: 0.55;
}
.cl-ovname {
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  text-align: left;
  min-height: 30px;
  color: #fff;
  background: #1d3354;
  border: 0;
  border-radius: 3px;
  padding: 0.2rem 0.3rem;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cl-ovinfo {
  margin: 0;
  font-size: 0.6rem;
  color: #a9bdd6;
}
.cl-ovch .viz {
  margin: 0;
}
.cl-ovch .viz-comp svg {
  width: 100%;
}
.cl-centralogic .x32-bank {
  max-width: 100%;
}
.cl-master {
  flex: 0 0 auto;
}
.cl-udk {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
}
.cl-desk .x32-inputs {
  flex: 1 1 100%;
}
.cl-desk .x32-strip,
.cl-desk .x32-empty {
  width: 58px;
}
/* The CL's touch screen: white curve on dark blue. */
.viz-cl {
  --viz-bg: #0b1322;
  --viz-grid: rgba(150, 190, 255, 0.1);
  --viz-grid-major: rgba(150, 190, 255, 0.24);
  --viz-curve: #f2f6ff;
  --viz-fill: rgba(90, 150, 255, 0.22);
  --viz-dot: #ffc04d;
  --viz-gr: #ff9b3d;
  border-color: #23324a;
}
@media (max-width: 899px) {
  .skin-cl3 .fader {
    --fader-h: 130px;
  }
  .cl-selch,
  .cl-screen {
    flex-basis: 100%;
  }
}

/* ---------- Yamaha DM2000 ---------- */

.skin-dm2000 .mixer-surface.dm-surface {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: linear-gradient(180deg, #2b2f36 0%, #1b1d22 100%);
  border: 1px solid #3a3d45;
  border-radius: var(--radius-md);
  padding: 0.6rem;
}
.dm-keys {
  flex-direction: row;
}
.dm-faders {
  flex: 1 1 400px;
}
.skin-dm2000 .fader {
  --fader-h: 150px;
  width: 30px;
}
.dm-inputs .y96-gains {
  overflow-x: auto;
  scrollbar-width: thin;
}
.dm-mid {
  align-items: stretch;
}
.dm-selch {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.dm-block {
  border-top: 1px solid #34373e;
  padding-top: 0.3rem;
}
.dm-block h5 {
  margin: 0 0 0.25rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.dm-block-body,
.dm-band,
.dm-route,
.dm-bank,
.dm-bus2st,
.dm-grp {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}
.dm-band .dg-band-name {
  width: 4.2em;
}
.dm-lcd {
  flex: 1 1 340px;
  background: #0f2440;
  border-color: #33506e;
  color: #d6e8ff;
}
.dm-lcd .y96-lcd-title {
  color: #ffffff;
  border-bottom-color: #2b4a6b;
}
.dm-lcd .dg-panel {
  background: transparent;
  border: 0;
  padding: 0;
}
.dm-groups h5 {
  margin: 0.4rem 0 0.2rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}
.dm-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.dm-keygroup {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.dm-faders .x32-strip {
  width: 58px;
}
/* The DM2000's LCD: white on blue. */
.viz-dm {
  --viz-bg: #0b1c33;
  --viz-grid: rgba(190, 215, 255, 0.1);
  --viz-grid-major: rgba(190, 215, 255, 0.24);
  --viz-curve: #ffffff;
  --viz-fill: rgba(170, 205, 255, 0.18);
  --viz-text: rgba(214, 232, 255, 0.6);
  --viz-dot: #ffe08a;
  --viz-gr: #ffe08a;
  border-color: #2b4a6b;
}
@media (max-width: 899px) {
  .skin-dm2000 .fader {
    --fader-h: 130px;
  }
}
.dm-surface > .dm-inputs,
.dm-surface > .dm-keys {
  flex: none;
}
.dm-inputs .y96-gains {
  flex-wrap: nowrap;
}

/* ---------- Zoom F8n Pro: LCD on top, eight track columns below ---------- */

.skin-f8n .mixer-surface.f8-surface {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: linear-gradient(180deg, #2a2b2e 0%, #161719 100%);
  border: 1px solid #3a3c40;
  border-radius: var(--radius-md);
  padding: 0.6rem;
}
.f8-lcd {
  background: #0c1116;
  border: 3px solid #3d4046;
  border-radius: 6px;
  padding: 0.45rem;
  color: #e6edf5;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.f8-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.f8-tab,
.f8-key {
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  min-height: 32px;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #39404b;
  background: #1a2029;
  color: #b9c4d2;
  cursor: pointer;
}
.f8-tab.on {
  background: #f2f2f2;
  color: #111;
  border-color: #f2f2f2;
}
.f8-key.on {
  background: #ff4d4d;
  border-color: #ff4d4d;
  color: #fff;
}
.f8-screen {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.f8-mixer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 0.25rem;
}
.f8-mixcol {
  font: inherit;
  font-size: 0.64rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.3rem;
  min-height: 44px;
  border-radius: 4px;
  border: 1px solid #2a313b;
  background: #121921;
  color: #dbe5f0;
  cursor: pointer;
}
.f8-mixcol b {
  font-size: 0.8rem;
}
.f8-mixcol.is-sel {
  border-color: #ff4d4d;
}
.f8-mixcol.is-off {
  opacity: 0.45;
}
.f8-mixcol.is-pfl {
  box-shadow: 0 0 0 2px #ffb547 inset;
}
.f8-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.f8-flags {
  color: #ffb547;
}
.f8-head,
.f8-row,
.f8-out {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.f8-title {
  margin: 0;
  flex: 1;
  text-align: center;
  font-weight: 800;
}
.f8-outname {
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 7.5em;
}
.f8-sep {
  font-size: 0.62rem;
  color: #8b97a6;
}
.f8-note {
  margin: 0;
  font-size: 0.68rem;
  color: #9fb0c2;
  line-height: 1.4;
}
.f8-front {
  background: #1d1e21;
  border: 1px solid #36383d;
  border-radius: 8px;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.f8-front-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}
.f8-tracks {
  display: flex;
  overflow-x: auto;
  gap: 0.2rem;
  scrollbar-width: thin;
  min-width: 0;
  max-width: 100%;
}
.f8-track {
  flex: none;
  width: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.1rem;
  border-radius: 6px;
}
.f8-track.is-sel {
  background: rgba(255, 77, 77, 0.08);
}
.f8-meterrow .dg-meter {
  height: 70px;
}
.f8-master {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
}
.f8-lr {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-dim);
}
.f8-master .dg-meter {
  height: 90px;
}

/* ---------- Dante: the DAW laptop card and its two windows ---------- */

.daw-lands {
  list-style: none;
  margin: 0.3rem 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
  font-size: 0.78rem;
}
.daw-lands li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.daw-lands b {
  font-weight: 700;
  color: var(--text-dim);
}
.dante-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.dante-dialog {
  width: min(960px, calc(100vw - 32px));
}
.dante-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.dante-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.dante-head h2 {
  margin: 0;
  font-size: 1.1rem;
}
.dante-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.dante-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.45;
}
.daw-table {
  border-collapse: collapse;
  width: 100%;
  background: #15181e;
  border-radius: 8px;
  overflow: hidden;
}
.daw-table th,
.daw-table td {
  padding: 0.35rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid #262a32;
  font-size: 0.85rem;
}
.daw-num {
  width: 2em;
  color: var(--text-dim);
}
.daw-clip span {
  display: block;
  width: 100%;
  min-width: 60px;
  height: 18px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #3e6fb0 0 3px, #2c5288 3px 6px);
  opacity: 0.7;
}
.daw-table select {
  font: inherit;
  min-height: 34px;
  background: #0f1217;
  color: var(--text);
  border: 1px solid #343a45;
  border-radius: 4px;
  padding: 0.2rem 0.3rem;
}
.dc-wrap {
  overflow: auto;
  max-height: 60vh;
  border: 1px solid #2a2f38;
  border-radius: 6px;
}
.dc-grid {
  border-collapse: collapse;
  font-size: 0.7rem;
}
.dc-grid th {
  background: #1a1e25;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.2rem;
  font-weight: 700;
}
.dc-grid th.dc-rx {
  position: sticky;
  left: 0;
  z-index: 1;
  padding: 0 0.4rem;
}
.dc-corner {
  left: 0;
  z-index: 2 !important;
  white-space: nowrap;
  font-size: 0.62rem;
}
.dc-tx {
  min-width: 34px;
}
.dc-tx span,
.dc-tx small {
  display: block;
}
.dc-tx small {
  font-weight: 400;
  color: var(--text-dim);
  max-width: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dc-grid td {
  padding: 0;
  border: 1px solid #252a32;
}
.dc-cell {
  display: block;
  width: 34px;
  height: 30px;
  border: 0;
  background: #111419;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}
.dc-cell:hover {
  background: #23334a;
}
.dc-cell.on {
  background: #2f9e57;
}
.cl-inpatch {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.cl-inpatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.25rem;
  max-height: 340px;
  overflow-y: auto;
}
.cl-inpatch-ch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: #142036;
  border-radius: 4px;
  padding: 0.15rem 0.3rem;
}
.cl-inpatch-name {
  font-size: 0.7rem;
  font-weight: 800;
  width: 3.4em;
}
.cl-inpatch-ch .lit-btn {
  min-height: 28px;
  padding: 0.1rem 0.4rem;
  font-size: 0.6rem;
}

/* ---------- Stage & patch diagram (js/ui/stage-view.js) ---------- */

.stage-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: var(--radius-md);
  background: radial-gradient(ellipse at 50% 0%, #1a2036 0%, var(--bg-sunken) 70%);
  border: 1px solid var(--line);
  scrollbar-width: thin;
}
.stage-canvas {
  min-width: min(100%, 980px);
}
.stage-svg {
  display: block;
  width: 100%;
  min-width: 980px;
  height: auto;
  font-family: var(--font-body);
  user-select: none;
  -webkit-user-select: none;
}
.col-band {
  fill: rgba(255, 255, 255, 0.018);
}
.col-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  fill: var(--accent);
}
.col-sub {
  font-size: 10px;
  fill: var(--text-dim);
}
/* A rack (the amp rack, the hall's mains rack): one frame around its gear. */
.rack-frame rect {
  fill: rgba(255, 255, 255, 0.025);
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
}
.rack-frame text {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  fill: var(--text-dim);
}

/* Boxes: gear on stage, panels with screws, rack units. */
.sbox {
  cursor: pointer;
  outline: none;
}
.sbox .box-bg {
  fill: url(#sg-metal);
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
}
.sbox.kind-console .box-bg,
.sbox.kind-stagebox .box-bg {
  fill: url(#sg-panel);
}
.sbox .box-bar {
  fill: rgba(255, 255, 255, 0.06);
}
.sbox:hover .box-bg,
.sbox:focus-visible .box-bg {
  stroke: var(--accent);
}
.sbox.selected .box-bg {
  stroke: var(--accent);
  stroke-width: 2;
}
.sbox.tone-ok .box-bg {
  stroke: color-mix(in srgb, var(--ok) 45%, transparent);
}
.sbox.tone-warn .box-bg {
  stroke: color-mix(in srgb, var(--warn) 55%, transparent);
}
.sbox.tone-bad .box-bg {
  stroke: var(--bad);
  stroke-width: 2;
}
/* A box with no power: its name and icon dim (the power tab on its top edge says why). */
.sbox.dark .box-ico,
.sbox.dark .box-name,
.sbox.dark .box-title {
  opacity: 0.5;
}
/* The power tab: plug and switch, on a box's top edge. */
.pwr-bg {
  fill: var(--bg-sunken);
  stroke: var(--line-strong);
  stroke-width: 1;
}
.pwr-on .pwr-bg {
  stroke: color-mix(in srgb, var(--ok) 55%, transparent);
}
.pwr-unplugged .pwr-bg,
.pwr-off .pwr-bg,
.pwr-no-power .pwr-bg {
  stroke: color-mix(in srgb, var(--warn) 70%, transparent);
}
.pwr-btn {
  cursor: pointer;
}
.pwr-hit {
  fill: transparent;
}
.pwr-btn:hover .pwr-hit,
.pwr-btn:focus-visible .pwr-hit {
  fill: rgba(255, 255, 255, 0.12);
}
.pwr-btn:focus-visible {
  outline: none;
}
.pwr-btn:focus-visible .pwr-hit {
  stroke: var(--accent);
}
.pwr-cord,
.pwr-prong,
.pwr-gap,
.pwr-glyph {
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.pwr-body {
  fill: var(--text-dim);
}
.pwr-plug.is-out .pwr-body {
  fill: var(--warn);
}
.pwr-plug.is-out .pwr-cord,
.pwr-plug.is-out .pwr-prong {
  stroke: var(--warn);
}
.pwr-gap {
  stroke: var(--text-dim);
  stroke-width: 2;
}
/* The switch: green and glowing only with power; on but dark is plain white. */
.pwr-sw.is-off .pwr-glyph {
  stroke: rgba(255, 255, 255, 0.28);
}
.pwr-no-power .pwr-sw.is-on .pwr-glyph,
.pwr-unplugged .pwr-sw.is-on .pwr-glyph {
  stroke: var(--text);
}
.pwr-on .pwr-sw .pwr-glyph {
  stroke: var(--ok);
  stroke-width: 2;
  filter: drop-shadow(0 0 3px var(--ok));
}
/* The same, on a box's card. */
.power-state {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-basis: 100%;
}
.pwr-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  flex: none;
}
.power-row.pwr-on .pwr-dot {
  background: var(--ok);
  box-shadow: 0 0 6px var(--ok);
}
.power-row:not(.pwr-on) .power-state {
  color: var(--warn);
}
.box-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  fill: var(--text);
  text-transform: uppercase;
}
.box-name {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  fill: var(--text);
}
.box-sub {
  font-size: 10.5px;
  fill: var(--text-dim);
}
.box-ico {
  color: #c9d3f5;
}
.panel-section {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  fill: #8d95b8;
}
.screw {
  fill: #3a4157;
  stroke: #12151f;
  stroke-width: 1;
}
.pill rect {
  fill: rgba(255, 255, 255, 0.1);
}
.pill text {
  font-size: 10px;
  font-weight: 700;
  fill: var(--text-dim);
}
.pill-ok rect {
  fill: color-mix(in srgb, var(--ok) 18%, transparent);
}
.pill-ok text {
  fill: var(--ok);
}
.pill-warn rect {
  fill: color-mix(in srgb, var(--warn) 18%, transparent);
}
.pill-warn text {
  fill: var(--warn);
}
.pill-bad rect {
  fill: color-mix(in srgb, var(--bad) 25%, transparent);
}
.pill-bad text {
  fill: var(--bad);
}

/* Jacks: the icon set's sockets, brighter when something is plugged in. */
.sjack {
  cursor: pointer;
  outline: none;
  color: #8f98ba;
  touch-action: none;
}
.sjack .jack-hit {
  fill: rgba(0, 0, 0, 0.35);
  stroke: rgba(255, 255, 255, 0.06);
}
.sjack.is-on {
  color: #e4e9ff;
}
.sjack:hover .jack-hit,
.sjack:focus-visible .jack-hit,
.sjack.lit .jack-hit {
  stroke: var(--accent);
  stroke-width: 2;
  fill: rgba(124, 224, 255, 0.12);
}
.sjack.drop-ok .jack-hit {
  stroke: var(--ok);
  stroke-width: 3;
  fill: rgba(107, 255, 176, 0.2);
}
.jack-head {
  font-size: 9px;
  font-weight: 700;
  fill: var(--text);
}
.jack-word {
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  fill: #8d95b8;
}
.jack-ethercon {
  fill: #11141d;
  stroke: #7b84a8;
  stroke-width: 1.4;
}
.jack-rj {
  fill: #2c3346;
}
.netport {
  cursor: default;
}
.netport[data-open-dante] {
  cursor: pointer;
}
.netport[data-open-dante]:hover .jack-ethercon {
  stroke: var(--accent);
}

/* Cables: a dark jacket and a coloured core; speaker cable is a heavy pair,
   network cable is blue, multicore is thick. */
.cable path {
  fill: none;
  stroke-linecap: round;
}
.cable .cable-hit {
  stroke: transparent;
  stroke-width: 14;
  pointer-events: stroke;
}
.cable .cable-shadow {
  stroke: #05070d;
  stroke-width: 6.5;
  opacity: 0.55;
}
.cable .cable-core {
  stroke: hsl(var(--hue) 70% 56%);
  stroke-width: 3.6;
}
.cable-speaker .cable-shadow {
  stroke-width: 10;
}
.cable-speaker .cable-core {
  stroke-width: 7;
}
.cable-speaker .cable-pair {
  stroke: rgba(0, 0, 0, 0.55);
  stroke-width: 1.2;
}
.cable-network .cable-core {
  stroke: #4f8dff;
  stroke-width: 3;
}
.cable-network.fixed .cable-core {
  stroke-dasharray: 1 0;
  opacity: 0.85;
}
.cable-multicore .cable-shadow {
  stroke-width: 14;
}
.cable-multicore .cable-core {
  stroke: #3b3f4d;
  stroke-width: 10;
}
.cable .cable-flow {
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 1.4;
  stroke-dasharray: 2 16;
  opacity: 0;
}
.stage-view-root.playing .cable.st-ok .cable-flow,
#stage.playing .cable.st-ok .cable-flow {
  opacity: 0.7;
  animation: cable-flow 0.9s linear infinite;
}
@keyframes cable-flow {
  to {
    stroke-dashoffset: -18;
  }
}
.cable.st-idle .cable-core {
  opacity: 0.45;
}
.cable.st-warn .cable-core {
  stroke-dasharray: 9 5;
}
.cable.st-bad .cable-core {
  stroke: var(--bad);
  stroke-dasharray: 6 4;
}
.cable.lit .cable-core {
  stroke-width: 5;
  filter: drop-shadow(0 0 4px hsl(var(--hue) 80% 60%));
}
.cable.lifted,
.plugs.lifted {
  opacity: 0.25;
}
.layer-plugs {
  pointer-events: none;
}
.plug-body {
  fill: #1a1d27;
  stroke: #9aa3c4;
  stroke-width: 1;
}
.plug-xlr .plug-body {
  fill: #23262f;
}
.plug-quarter .plug-body,
.plug-mini .plug-body {
  fill: #2b2f3b;
  stroke: #c9cfdf;
}
.plug-rca .plug-body {
  fill: #2b2f3b;
  stroke: #ff8c8c;
}
.plug-ethercon .plug-body {
  fill: #172443;
  stroke: #4f8dff;
}
.badge circle {
  stroke: var(--bg-sunken);
  stroke-width: 1.5;
}
.badge text {
  font-size: 10px;
  font-weight: 800;
  fill: var(--bg);
}
.badge-warn circle {
  fill: var(--warn);
}
.badge-bad circle {
  fill: var(--bad);
}
.drag-cable {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 8 6;
  pointer-events: none;
}
.dragging .sjack:not(.drop-ok) {
  opacity: 0.85;
}

.stage-help {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0.55rem 0.2rem 0;
}
.stage-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.lg {
  display: inline-block;
  width: 22px;
  height: 0;
  border-top: 3px solid #7ce0ff;
  border-radius: 3px;
  margin-left: 0.4rem;
}
.lg-speaker {
  border-top-width: 6px;
  border-top-color: #ffb36b;
}
.lg-network {
  border-top-color: #4f8dff;
}

.stage-inspector {
  margin-top: 0.8rem;
  background: var(--bg-sunken);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}
.stage-inspector[hidden] {
  display: none;
}
.insp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.insp-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
}
.insp-head .patch-x {
  position: static;
}
.insp-body {
  list-style: none;
  margin: 0;
  padding: 0;
}
.insp-empty {
  color: var(--text-dim);
  margin: 0;
}

.patch-lists-wrap {
  margin-top: 0.9rem;
}
.patch-lists-wrap > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.4rem 0.2rem;
  color: var(--text);
}
.patch-lists-wrap > summary small {
  color: var(--text-dim);
  font-weight: 400;
  margin-left: 0.4rem;
}
@media (prefers-reduced-motion: reduce) {
  #stage.playing .cable.st-ok .cable-flow {
    animation: none;
    opacity: 0;
  }
}

.stage-gear {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.stage-gear[hidden] {
  display: none;
}
.stage-gear .chip {
  font-size: 0.85rem;
  min-height: 36px;
  padding: 0.3rem 0.8rem;
}
.stage-gear-label {
  font-weight: 600;
  font-size: 0.85rem;
}
.stage-gear-note {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ---------- top bar: themes, brand, mode, Canvas (js/app.js) ---------- */

.topbar {
  gap: 0.6rem;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.nav-btn:hover,
.canvas-btn:hover {
  border-color: var(--accent);
}
.topbar .brand {
  margin-right: auto;
  font-size: 1.2rem;
}
.mode-switch {
  display: flex;
  gap: 0.2rem;
  padding: 0.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.mode-btn {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  min-height: 38px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-dim);
}
.mode-btn.active {
  background: linear-gradient(135deg, #7ce0ff, #7c9bff);
  color: var(--bg);
}
.canvas-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.35rem 0.5rem 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--warn) 60%, transparent);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

/* ---------- the mission strip (js/ui/mission-view.js) ---------- */

.mission {
  max-width: 1760px;
  margin: 0.75rem auto 0;
  padding: 0 clamp(0.75rem, 2vw, 1.5rem);
}
.mission-inner {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas:
    "head head"
    "steps steps"
    "prompt goal"
    "actions goal"
    "banner banner"
    "hints hints"
    "more more";
  grid-template-rows: auto auto auto 1fr;
  align-items: start;
  gap: 0.55rem 1.25rem;
}
.mission.is-solved .mission-inner {
  border-color: color-mix(in srgb, var(--ok) 55%, transparent);
}
.mission-head {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.mission-theme {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: rgba(124, 224, 255, 0.07);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.mission-theme:hover {
  border-color: var(--accent);
}
.mt-label {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}
.mt-step {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.mission-title {
  flex: 1;
  min-width: 14rem;
}
.mission-title h1 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  margin: 0;
  line-height: 1.15;
}
.mission-on {
  margin: 0.15rem 0 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.mission-on strong {
  color: var(--text);
}
.mission-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.mstep {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
}
.mstep:disabled {
  opacity: 0.3;
  cursor: default;
}
.mstep:not(:disabled):hover {
  border-color: var(--accent);
}
.mission-prompt {
  grid-area: prompt;
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.55rem 0.8rem;
  border-left: 3px solid var(--accent);
  background: rgba(124, 224, 255, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.mission-goalrow {
  grid-area: goal;
}
.mission-goal {
  margin: 0 0 0.4rem;
  color: var(--text-dim);
  line-height: 1.45;
}
.mission-goal strong {
  color: var(--text);
}
.mission .checklist {
  margin: 0;
}
.mission .complete-banner {
  grid-area: banner;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
}
.mission .complete-banner[hidden] {
  display: none;
}
.mission .complete-banner p {
  margin: 0.1rem 0;
}
.mission .complete-banner small {
  opacity: 0.75;
  font-weight: 500;
}
.mission .hint-list {
  grid-area: hints;
  margin: 0;
  padding-left: 1.1rem;
}
.mission .hint-list:empty {
  display: none;
}
.mission-actions {
  grid-area: actions;
  align-self: end;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.mission-actions .chip {
  min-height: 36px;
  padding: 0.3rem 0.85rem;
  font-size: 0.88rem;
}
.mission-more {
  grid-area: more;
}
.mission-more[hidden] {
  display: none;
}
.mission-concept {
  margin: 0 0 0.5rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.mission-free {
  grid-template-areas:
    "head head"
    "prompt goal"
    "more more";
}
.mission-free .music {
  grid-column: 1 / -1;
}
.free-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}
.free-console {
  max-width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-sunken);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
}
.music-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.music-title {
  font-weight: 700;
  margin-right: 0.3rem;
}

/* ---------- drawer: every theme and scenario ---------- */

.drawer {
  margin: 0 auto 0 0;
  height: 100vh;
  max-height: 100vh;
  width: min(460px, 94vw);
  border: none;
  border-right: 1px solid var(--line-strong);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 0;
  background: var(--bg-raised);
  color: var(--text);
}
.drawer::backdrop {
  background: rgba(5, 7, 13, 0.6);
}
.drawer-inner {
  padding: 0.9rem;
}
.drawer-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: sticky;
  top: -0.9rem;
  margin: -0.9rem -0.9rem 0.6rem;
  padding: 0.9rem;
  background: var(--bg-raised);
  z-index: 1;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 {
  margin: 0 auto 0 0;
  font-family: var(--font-display);
}
.drawer-head .chip {
  min-height: 36px;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
}
.drawer-head .patch-x {
  position: static;
}
.drawer-theme {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 0.45rem;
  background: var(--bg-sunken);
}
.drawer-theme summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  list-style: none;
}
.drawer-theme summary::-webkit-details-marker {
  display: none;
}
.theme-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: rgba(124, 224, 255, 0.14);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}
.dt-name {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dt-name small {
  color: var(--text-dim);
}
.dt-prog {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.dt-concept {
  margin: 0 0.8rem 0.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.45;
}
.drawer-list {
  list-style: none;
  margin: 0;
  padding: 0 0.4rem 0.5rem;
}
.drawer-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  min-height: 40px;
}
.drawer-row:hover {
  background: rgba(255, 255, 255, 0.05);
}
.drawer-row.current {
  background: rgba(124, 224, 255, 0.14);
  box-shadow: inset 3px 0 0 var(--accent);
}
.dr-tick {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 0.72rem;
  color: var(--text-dim);
}
.drawer-row.done .dr-tick {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--bg);
  font-weight: 800;
}
.dr-console {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: right;
  max-width: 9rem;
}

/* ---------- start screen: choose what to work on ---------- */

.start-overlay {
  overflow-y: auto;
  align-items: flex-start;
}
.start-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
}
.start-inner h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  margin: 0 0 0.6rem;
}
.start-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 0.5rem;
}
.start-big {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: flex-start;
  text-align: left;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  color: var(--text);
  cursor: pointer;
}
.start-big strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.start-big span {
  color: var(--text-dim);
  font-size: 0.9rem;
}
.start-big:hover,
.theme-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.start-resume {
  background: linear-gradient(135deg, rgba(124, 224, 255, 0.22), rgba(124, 155, 255, 0.18));
  border-color: var(--accent);
}
.start-h {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  color: var(--accent);
  margin: 1.6rem 0 0.7rem;
  text-align: left;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}
.theme-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
  text-align: left;
  padding: 0.85rem 0.9rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.1s ease;
}
.theme-card .theme-num {
  margin-bottom: 0.2rem;
}
.theme-card strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
}
.theme-q {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.35;
}
.theme-card small {
  color: var(--text-dim);
  font-size: 0.75rem;
}
.theme-meter {
  display: block;
  width: 100%;
  margin-top: auto !important;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 0.35rem;
  overflow: hidden;
}
.theme-meter i {
  display: block;
  height: 100%;
  background: var(--ok);
}

@media (max-width: 899px) {
  .nav-btn span,
  .canvas-btn > span {
    display: none;
  }
  .nav-btn {
    padding: 0.35rem 0.6rem;
  }
  .mode-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
  }
  .topbar .brand {
    font-size: 1.05rem;
  }
  .mission {
    margin-top: 0.5rem;
    padding: 0 0.6rem;
  }
  .mission-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "steps" "prompt" "goal" "banner" "hints" "actions" "more";
    grid-template-rows: none;
    padding: 0.75rem;
  }
  .mission-free {
    grid-template-areas: "head" "prompt" "goal" "more";
  }
  .mission-nav {
    margin-left: auto;
  }
  .mission-prompt {
    font-size: 0.95rem;
  }
}
@media (max-width: 900px) {
  .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .topbar .brand {
    display: none;
  }
}

/* ---------- patch dialog picture (js/ui/connector-art.js) ---------- */

.patch-dialog {
  max-width: min(800px, calc(100vw - 1.5rem));
}
.pv {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: radial-gradient(ellipse at 50% 40%, #222842 0%, var(--bg-sunken) 75%);
  border: 1px solid var(--line);
  /* stays in view while the list of jacks scrolls */
  position: sticky;
  top: -1rem;
  z-index: 2;
}
.pv-end {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
}
.pv-end .conn-art {
  width: 100%;
  height: auto;
  max-width: 120px;
}
.pv-end figcaption {
  font-size: 0.75rem;
  line-height: 1.25;
  text-align: center;
  color: var(--text);
}
.pv-end figcaption small {
  display: block;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.65rem;
}
.pv-unknown {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 120px;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px dashed var(--line-strong);
  color: var(--text-dim);
  font-size: 2.2rem;
  font-weight: 700;
}
.pv-cable {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
  justify-items: center;
}
.pv-plugs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16px, 0.35fr) minmax(0, 1fr);
  align-items: center;
  width: 100%;
}
.pv-plugs .conn-art {
  width: 100%;
  height: auto;
  display: block;
}
/* The near plug points back at this jack (left). */
.pv-near {
  transform: scaleX(-1);
  opacity: 0.55;
  filter: saturate(0.4);
}
.pv-wire {
  height: 9px;
  background: linear-gradient(#3a3f4c, #15181f);
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  margin: 0 -6px;
}
.pv-wire-speaker {
  height: 13px;
  background: linear-gradient(#7a5a1e, #3a2a0e);
}
.pv-wire-network {
  background: linear-gradient(#3d6fd6, #1f3a78);
}
.pv-name {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
}
.pv-name span {
  color: var(--text-dim);
  margin-left: 0.3rem;
}
.pv-hint {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}
/* Cable cards: this jack's end greyed (the same on every card), the far end large. */
.ca-near {
  opacity: 0.4;
  filter: grayscale(1);
  display: inline-flex;
}
.ca-far {
  display: inline-flex;
}
.ca-far .conn-art {
  width: 104px;
  height: auto;
}
@media (max-width: 560px) {
  .pv {
    grid-template-columns: 76px minmax(0, 1fr) 76px;
    padding: 0.5rem;
  }
  .pv-end figcaption {
    font-size: 0.68rem;
  }
}

/* ---------- push-lock switch (STAGEPAS MIC/LINE, ST/MONO, Hi-Z) ---------- */

.push-sw {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.2rem 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.push-well {
  position: relative;
  flex: none;
  width: 18px;
  height: 26px;
  border-radius: 4px;
  background: #0b0d12;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}
.push-cap {
  position: absolute;
  left: 2px;
  right: 2px;
  top: 2px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(#e9ecf5, #a9afc2);
  box-shadow: 0 3px 0 #5d6378, 0 4px 5px rgba(0, 0, 0, 0.6);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.push-sw.is-down .push-cap {
  transform: translateY(8px);
  box-shadow: 0 1px 0 #5d6378, 0 1px 2px rgba(0, 0, 0, 0.6);
  background: linear-gradient(#c9cede, #9399ac);
}
.push-legend {
  display: grid;
  gap: 0.1rem;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: left;
  color: var(--text-dim);
}
.push-pos {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  opacity: 0.5;
}
.push-sw:not(.is-down) .push-pos[data-pos="up"],
.push-sw.is-down .push-pos[data-pos="down"] {
  opacity: 1;
  color: var(--text);
}
/* The manual's position icons: the cap out (a raised block) or pushed in (flush). */
.push-ico {
  display: inline-block;
  width: 9px;
  height: 7px;
  border-bottom: 1.5px solid currentColor;
  position: relative;
}
.push-ico::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  background: currentColor;
}
.push-ico.up::before {
  height: 6px;
}
.push-ico.down::before {
  height: 2px;
}

/* ---------- three ways in: by topic, by mixer, free play ---------- */

.mode-short {
  display: none;
}
.start-h small {
  margin-left: 0.5rem;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body, inherit);
  font-weight: 500;
  color: var(--text-dim);
}
/* A topic card leads with its question; the topic's name is the small print. */
.topic-card strong {
  font-size: 1.05rem;
  line-height: 1.25;
}
.mixer-card .theme-q {
  font-size: 0.8rem;
}
.mixer-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.mixer-console {
  min-height: 34px;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-sunken);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  max-width: 100%;
}
.drawer-head {
  flex-wrap: wrap;
}
.drawer-tabs {
  flex-basis: 100%;
  width: max-content;
  max-width: max-content;
  margin-top: 0.2rem;
}

/* ---------- the pinned scenario: stays under the top bar once the strip scrolls away ---------- */

.mission-dock {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 0 clamp(0.75rem, 2vw, 1.5rem);
  pointer-events: none;
}
.mission-dock[hidden] {
  display: none;
}
.dock-inner {
  pointer-events: auto;
  max-width: 1760px;
  margin: 0.35rem auto 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.75rem;
  padding: 0.45rem 0.6rem 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-size: 0.88rem;
}
.dock-inner.is-solved {
  border-color: color-mix(in srgb, var(--ok) 60%, transparent);
}
.dock-where {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
}
.dock-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
}
.dock-ticks {
  display: inline-flex;
  gap: 3px;
}
.dock-ticks i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
}
.dock-ticks i.met {
  background: var(--ok);
  border-color: var(--ok);
}
.dock-next {
  flex: 1 1 14rem;
  min-width: 0;
  color: var(--text-dim);
}
.dock-next.is-broken {
  color: var(--warn);
}
.is-solved .dock-next {
  color: var(--ok);
  font-weight: 700;
}
.dock-actions {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
}
.dock-btn {
  min-height: 34px;
  padding: 0.25rem 0.75rem;
  font-size: 0.82rem;
}
.dock-more {
  flex-basis: 100%;
  max-height: min(55vh, 28rem);
  overflow-y: auto;
  padding: 0.4rem 0 0.2rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.5rem;
}
.dock-more[hidden] {
  display: none;
}
.dock-more .mission-prompt,
.dock-more .checklist,
.dock-more .hint-list {
  margin: 0;
}
.dock-more .linkish {
  justify-self: start;
}

@media (max-width: 899px) {
  .dock-inner {
    gap: 0.25rem 0.5rem;
    padding: 0.4rem 0.5rem 0.4rem 0.7rem;
  }
  .dock-where {
    display: none;
  }
  .dock-next {
    flex-basis: 100%;
    order: 5;
    font-size: 0.82rem;
  }
}
@media (max-width: 560px) {
  .mode-long {
    display: none;
  }
  .mode-short {
    display: inline;
  }
  .mode-btn {
    padding: 0.35rem 0.55rem;
  }
}

/* ---------- track names: instruments or musicians (js/names.js) ---------- */

.names-switch {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: auto;
  padding: 0.2rem 0.2rem 0.2rem 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.names-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-right: 0.2rem;
}
.names-switch .mode-btn {
  min-height: 34px;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
}
/* A musician's name can be longer than the strip: cut it, the full name is in the tooltip. */
.strip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Musicians' names are longer: smaller, and allowed onto a second line. */
.names-musicians .strip-name {
  font-size: 0.68rem;
  letter-spacing: 0;
  line-height: 1.05;
  white-space: normal;
  text-align: center;
}

/* Who's on stage in this scenario (doors: nobody; a speech; someone sitting out). */
.mission-stage {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-dim);
}

/* ---------- the steps of this topic or mixer: every scenario one tap away ---------- */

.mission-steps {
  grid-area: steps;
  list-style: none;
  margin: 0;
  padding: 0 0 0.25rem;
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: thin;
  position: relative; /* a chip's visually-hidden text is clipped here, not left to widen the page */
}
.mstep-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  min-height: 36px;
  padding: 0.25rem 0.75rem 0.25rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 0.82rem;
  cursor: pointer;
}
.mstep-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}
.mstep-chip.current {
  border-color: var(--accent);
  background: rgba(124, 224, 255, 0.16);
  color: var(--text);
  font-weight: 700;
}
.ms-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 0.72rem;
  font-weight: 700;
}
.mstep-chip.done .ms-num {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--bg);
}
.ms-name small {
  margin-left: 0.35rem;
  font-weight: 500;
  color: var(--text-dim);
}

/* A "keep" that broke: undo it or start again, right where it's reported. */
.keep-fix {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--warn);
}
.keep-fix .chip {
  min-height: 32px;
  padding: 0.2rem 0.75rem;
  font-size: 0.82rem;
}
/* The pinned panel is a plain column: don't inherit the strip's grid areas. */
.dock-more > * {
  grid-area: auto;
}
@media (max-width: 899px) {
  .dock-more {
    order: 6;
  }
}

/* ---------- assignments, the Canvas export and bug reports ---------- */

.bug-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}
.bug-btn:hover {
  border-color: var(--accent);
}
.start-legacy {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
  text-align: left;
}
.start-legacy a,
.canvas-note a {
  color: var(--accent);
}
.canvas-total,
.canvas-backup,
.canvas-bugs {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  background: var(--bg-sunken);
}
.canvas-total .canvas-note {
  margin: 0;
}
.ca-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.3rem;
}
.canvas-bug-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.canvas-bug-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 0.75rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.canvas-bug-list small {
  grid-column: 1;
  color: var(--text-dim);
}
.canvas-bug-list .linkish {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
}
.canvas-bugs .chip {
  margin-top: 0.4rem;
}
.canvas-backup-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.canvas-backup-status:empty {
  display: none;
}
.canvas-backup-status {
  margin-top: 0.4rem;
}
.bug-where {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.bug-snap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
}
.bug-extras {
  margin: 0.8rem 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.bug-copy-area {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---------- Zoom LiveTrak L-20: FADER MODE, 18 strips, EFX RTN, MASTER, CHANNEL STRIP + outputs ---------- */

.l20-mode {
  align-items: center;
}
.l20-phantom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}
.l20-phantom .lit-btn {
  min-width: 0;
  min-height: 28px;
  padding: 0.15rem 0.5rem;
}
.l20-bank .dg-strip {
  width: 58px;
}
/* PAD or Hi-Z: on its own line under the GAIN knob (beside it, "Hi-Z" doesn't fit). */
.l20-bank .dg-extra:has(> .lit-btn) {
  flex-wrap: wrap;
  gap: 3px;
}
.l20-bank .dg-extra .lit-btn {
  white-space: nowrap;
}
.l20-efx {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.l20-efx .dg-note {
  font-size: 0.55rem;
  text-align: center;
  margin: 0;
}
.l20-out {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
}
.l20-out .lit-btn {
  min-width: 0;
  min-height: 26px;
  padding: 0.1rem 0.4rem;
  font-size: 0.6rem;
}
.l20-panel .dg-note {
  margin: 0.2rem 0 0;
  font-size: 0.65rem;
}

/* Chapman gigs: a planned gig shows but can't be opened yet. */
.gig-card.gig-soon { opacity: 0.6; cursor: default; }
.drawer-theme.gig-soon { opacity: 0.7; }

/* ---------- Console: Mix5 (the hall's mains rack) ---------- */

.m5-face {
  display: grid;
  gap: 0.9rem;
  max-width: 900px;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #2b2e33, #1f2125);
  border: 1px solid var(--line);
}
.m5-brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.m5-brand strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
}
.m5-brand span {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.m5-jacks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
}
.m5-jack {
  display: grid;
  gap: 0.15rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.75rem;
}
.m5-jack small {
  color: var(--text-dim);
}
.m5-jack.is-plugged {
  border-color: var(--accent);
}
.m5-strips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
  align-items: start;
}
.m5-strip {
  display: grid;
  gap: 0.55rem;
  padding: 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.m5-strip h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  text-align: center;
}
.m5-knob,
.m5-switch {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.4rem;
  font-size: 0.72rem;
  color: var(--text-dim);
}
.m5-knob input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--text-dim);
}
.m5-knob output {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
/* The knobs on the way to the hall's speakers: 4/5 BAL and LEVEL, MAIN MIX. */
.m5-knob.m5-live {
  color: var(--text);
  font-weight: 600;
}
.m5-knob.m5-live input {
  accent-color: var(--accent);
}
.m5-power {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-dim);
}
.m5-meter {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 0.4rem;
  justify-content: center;
  align-items: end;
}
.m5-meter-col,
.m5-meter-scale {
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  font-size: 0.6rem;
  color: var(--text-dim);
}
.m5-meter-scale {
  grid-column: 3;
  grid-row: 1;
  padding-bottom: 1rem;
}
.m5-led {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3a3d42;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}
.m5-meter-col .m5-led.m5-on:nth-child(1) {
  background: #ff4d4d;
}
.m5-meter-col .m5-led.m5-on:nth-child(2) {
  background: #ffc94d;
}
.m5-led.m5-on {
  background: #5ddc6a;
  box-shadow: 0 0 6px currentColor;
}
.m5-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}
/* A sub snake's tails: thinner than the multicore they split from. */
.cable-tail .cable-shadow {
  stroke-width: 6;
}
.cable-tail .cable-core {
  stroke: #3b3f4d;
  stroke-width: 3.5;
}
.sjack .tail-knot {
  fill: #3b3f4d;
}

/* ---------- X32 main display: ROUTING, laid out as the console's own screen ---------- */

.x32-display.x32-display-wide {
  flex-basis: 100%;
  max-width: none;
  order: -1;
}
.x32-rscreen {
  display: grid;
  gap: 0.45rem;
  color: #e7eef6;
}
.x32-rconnected {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: #9fd38a;
}
.x32-rtabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.x32-rmode {
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  background: #2e4a63;
  border-radius: 4px;
}
.x32-rtab,
.x32-rflip,
.x32-rconnect {
  font: inherit;
  font-size: 0.72rem;
  color: #c9d6e3;
  background: #1a2a3a;
  border: 1px solid #2e4a63;
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
}
.x32-rtab.on {
  color: #ffd84d;
  border-color: #ffd84d;
  font-weight: 700;
}
.x32-rflip {
  margin-left: auto;
  background: #26394c;
}
.x32-rconnect {
  width: 100%;
  margin-top: 0.3rem;
  background: #26394c;
  font-weight: 700;
}
.x32-rpage {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}
.x32-rtitle {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  background: #22364a;
  padding: 0.2rem;
  border-radius: 3px;
}
.x32-rcols {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(118px, 1fr);
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 0.2rem;
}
.x32-rcol h6 {
  margin: 0 0 0.2rem;
  text-align: center;
  font-size: 0.66rem;
  color: #9fb4c8;
}
.x32-rlist {
  list-style: none;
  margin: 0;
  padding: 2px;
  max-height: 15.5rem;
  overflow-y: auto;
  background: #e9eef3;
  border-radius: 3px;
  scrollbar-width: thin;
}
.x32-ritem {
  font-size: 0.68rem;
  line-height: 1.25;
  padding: 0.12rem 0.3rem;
  margin: 1px 0;
  color: #fff;
  background: #1f2a44;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.x32-ritem.off {
  color: #8b97ad;
}
/* What's connected (filled), and the cursor (the yellow box). */
.x32-ritem.on {
  background: #7a4a12;
  color: #ffd84d;
  font-weight: 700;
}
.x32-ritem.cur {
  border-color: #ffd84d;
}
.x32-ritem:focus-visible {
  outline: 2px solid #8fd3ff;
}
.x32-rsetting {
  align-self: start;
  background: #1a2a3a;
  border: 1px solid #2e4a63;
  border-radius: 4px;
  padding: 0.3rem;
  font-size: 0.7rem;
}
.x32-rsetting h6 {
  margin: 0;
  font-size: 0.62rem;
  color: #9fb4c8;
}
.x32-rsetting p {
  margin: 0.2rem 0 0;
}
.x32-rnote {
  margin: 0;
  font-size: 0.72rem;
  color: #ffd84d;
  min-height: 1em;
}
.x32-rhelp {
  margin: 0;
  font-size: 0.72rem;
  color: #9fb4c8;
}
/* Antenna coax (BNC): thin and dark. Radio from a handheld to the antennas: a faint dashed line, no cable. */
.cable-rf .cable-core {
  stroke: #6b6f7d;
  stroke-width: 2.5;
}
.cable-radio .cable-core {
  stroke: rgba(150, 200, 255, 0.35);
  stroke-width: 1.5;
  stroke-dasharray: 2 7;
  fill: none;
}
/* A wireless receiver's channels, as its displays show them. */
.rx-status {
  list-style: none;
  margin: 0.4rem 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.rx-status strong {
  color: var(--text);
  margin-right: 0.3rem;
}
/* The room's zones: FOH (the booth) tinted apart from the stage and the stage-side racks. */
.zone-foh .col-band {
  fill: rgba(110, 170, 255, 0.07);
  stroke: rgba(110, 170, 255, 0.25);
  stroke-dasharray: 4 4;
}
.zone-foh .col-label {
  fill: #8fc4ff;
}
.zone-side .col-band {
  fill: rgba(255, 200, 120, 0.035);
}
