/* cortexlab/app/ui/app.css, copied by web/art/demo.py without its width queries */
:root {
  --ground: #10141b;
  --bar: #0c0f14;
  --side: #141922;
  --line: #212a3a;
  --line-2: #263042;
  --raised: #1c2330;
  --text: #e6e7e9;
  --muted: #a2a9b6;
  --faint: #8b94a4;
  /* colours by role (Giovanni, 2026-10-05; APP-DESIGN "Everywhere"). The device's own
     colours - footswitch letters, scene colours, the loaded preset - are content and
     span the whole rainbow, so the interface keeps its hues out of their way: */
  --brand: #2e8bff;               /* the icon's blue (the wand): the main button of a screen */
  --brand-hover: #4d9dff;
  --brand-ink: #04101f;           /* text on the brand colour: white on this blue reads at 3.4:1, this at 5.5:1 */
  --mark: #e8f4ff;                /* the icon's near-white blue (the sparkles), as the neutral:
                                     selection, focus, where a dragged item goes */
  --progress: #e8f4ff;            /* neutral: progress bars */
  --attention: #f5c542;           /* yellow: warnings, why something cannot be done */
  --attention-ink: #ffe39a;
  --attention-line: #6b5a1e;
  --attention-bg: #262113;
  --offline: #52617b;
  --ghost: #7cc8ff;               /* light blue: a change made on paper, not written yet (Giovanni, 2026-10-27) */
  --ghost-line: #2f5f86;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; display: flex; flex-direction: column; overflow: hidden; min-width: 720px;
  background: var(--ground); color: var(--text);
  font-family: 'Barlow', system-ui, sans-serif; font-size: 15px;
  user-select: none;
}
button { font-family: inherit; color: inherit; }
button:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; line-height: 1.4; }
.label { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); }

/* header */
.top {
  height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 28px; padding: 0 20px;
  background: var(--bar); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { display: block; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: 0.02em; }
/* the tools as tabs (Giovanni, 2026-11-09: tabs, not buttons): the one open underlined, on the bar's edge */
.tools { display: flex; gap: 4px; align-self: stretch; }
.tools button {
  align-self: stretch; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px;
  background: transparent; color: var(--faint); font-size: 15px; font-weight: 500; cursor: pointer;
}
.tools button:hover:not(:disabled):not([aria-pressed="true"]) { color: var(--muted); }
.tools button[aria-pressed="true"] { color: var(--text); font-weight: 600; border-bottom-color: var(--mark); }
.views button {
  height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent;
  color: var(--faint); font-size: 15px; font-weight: 500; cursor: pointer;
}
.views button[aria-pressed="true"] { background: var(--raised); color: var(--text); font-weight: 600; }
.tools button:disabled, .views button:disabled { cursor: default; }
.spacer { flex-grow: 1; }

/* layout */
.body { flex-grow: 1; min-height: 0; display: flex; }
/* the open setlist takes the content's ground and joins it (Giovanni, 2026-10-04) */
.setlists {
  width: 264px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--side);
}
.side-head { display: flex; align-items: center; gap: 6px; padding: 14px 10px 8px 20px; }
/* the Editor's side panel: three blocks that fold. An open block of captures or IRs is as tall as its folders (Giovanni,
   2026-11-09: a half-empty block hid the setlists), the setlists take the rest; each list scrolls when room runs out */
.side-sec { display: flex; flex-direction: column; min-height: 0; flex: 0 0 auto; border-top: 1px solid var(--line); }
.side-sec:first-child { border-top: 0; }
.side-sec.open { flex: 0 1 auto; }
#sec-setlists.open { flex: 1 1 auto; }
.lib-folders { padding-bottom: 8px; }
.side-sec:not(.open) .setlist-buttons { display: none; }
.side-sec:not(.open) .side-head #refresh { display: none; }
.side-fold { display: flex; align-items: center; gap: 6px; margin-left: -18px; padding: 2px 4px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.side-fold svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s; }
.side-fold[aria-expanded="true"] svg { transform: rotate(90deg); }
.side-fold:hover { color: var(--text); }
/* My IRs: one folder, the header opens it (no arrow); the label where the others' are */
.side-fold.side-open { margin-left: 2px; }
.side-fold.side-open[aria-current="true"] { color: var(--text); }
.side-head .side-count { margin-left: auto; margin-right: 8px; }
.lib-folders button.sub { padding-left: 26px; }
.side-note { margin: 4px 12px 10px; font-size: 13px; color: var(--muted); }
/* the factory tree's branches: a small chevron that unfolds them */
.lib-folders .twig, #merge-lists .twig { display: inline-flex; margin-left: -16px; margin-right: 4px; color: var(--muted); }
.lib-folders .twig svg, #merge-lists .twig svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s; }
.lib-folders .twig.open svg, #merge-lists .twig.open svg { transform: rotate(90deg); }
.lib-folders .twig:hover, #merge-lists .twig:hover { color: var(--text); }
#merge-lists button.tree { justify-content: flex-start; }
#merge-lists button.tree .count { margin-left: auto; }
/* Plugin presets: a plugin not owned, greyed with its padlock (its page on neuraldsp.com) */
.lib-folders button.locked .name { color: var(--muted); }
.lib-folders button.locked svg { flex: none; margin-right: 6px; }
.row.lib-row.plugin-preset { cursor: pointer; }
.row.lib-row.plugin-preset.loading { opacity: 0.6; }
.row.lib-row.plugin-preset[aria-current="true"] .name { color: var(--mark); }
.lib-folders button { justify-content: flex-start; }
.lib-folders button .count { margin-left: auto; }
.owner-name { flex-grow: 1; font-size: 15px; font-weight: 600; }
/* a capture dragged onto the grid */
.row.lib-row.draggable { cursor: grab; touch-action: none; user-select: none; }
.row.lib-row.dragging { opacity: 0.45; }
.drag-ghost { position: fixed; z-index: 1000; pointer-events: none; padding: 5px 10px; border: 1px solid var(--mark); border-radius: 6px;
  background: var(--raised); color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; }
.drop-capture { outline: 2px solid var(--mark) !important; outline-offset: 2px; }
.side-note.bad { color: var(--attention); }
/* a folder of captures or IRs in the list: the name on its line, its gain, version, author and date under it */
.row.lib-row { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-height: 34px; padding-top: 5px; padding-bottom: 5px; cursor: default; }
.lib-row .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-meta { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; color: var(--muted); }
.lib-row .gain { display: flex; gap: 2px; align-items: flex-end; height: 10px; flex: none; }
.lib-row .gain i { width: 4px; height: 10px; border-radius: 1px; background: var(--line-2); }
.lib-row .gain i.on { background: #e5484d; }
.lib-row .author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lib-row .date { margin-left: auto; flex: none; }
.side-head #setlist-count { margin-left: auto; }
.icon-button {
  width: 32px; height: 32px; flex-shrink: 0; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.icon-button:hover:not(:disabled) { background: #1c2330; color: var(--text); }
.icon-button:disabled { opacity: 0.5; cursor: default; }
.icon-button.turning svg { animation: turn 0.9s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.g-saving::before { content: ''; display: inline-block; box-sizing: border-box; width: 11px; height: 11px; margin-right: 7px; vertical-align: -1px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: turn 0.9s linear infinite; }
.setlist-buttons { flex-grow: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
/* about a fifth lower than the first 44 px, to show more (Giovanni, 2026-11-10) */
.setlist-buttons button {
  min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 12px; border: 0; border-radius: 8px; background: transparent; text-align: left;
  font-size: 15px; font-weight: 500; cursor: pointer;
}
.setlist-buttons button:hover { background: #181f2a; }
.setlist-buttons button[aria-current="true"] {
  margin-right: -10px; padding-right: 22px; border-radius: 8px 0 0 8px; background: var(--ground); font-weight: 600;
}
/* no scrollbar between the open setlist and the content: a fade says there is more below */
.setlist-buttons::-webkit-scrollbar { width: 0; height: 0; }
.setlist-buttons.more-below {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
}
.setlist-buttons .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* dragging a setlist: a line where it lands */
.setlist-buttons button[draggable="true"] { cursor: grab; }
.setlist-buttons button.drop-before { box-shadow: inset 0 2px 0 var(--brand); }
.setlist-buttons button.drop-after { box-shadow: inset 0 -2px 0 var(--brand); }
/* the ⋯ of a setlist (Rename, Delete): on hover and on the open one, as a preset's */
.setlist-buttons button .more { flex: none; margin-right: -6px; }
.setlist-buttons button:hover .more, .setlist-buttons button[aria-current="true"] .more { opacity: 1; }
/* Delete a setlist: every preset it holds, in two columns filled top to bottom (the rows
   are set by app.js); it scrolls when long */
.delete-list {
  list-style: none; margin: 4px 0 0; padding: 10px 12px; max-height: min(46vh, 420px); overflow-y: auto;
  display: grid; grid-auto-flow: column; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px;
  background: var(--ground); border: 1px solid var(--line); border-radius: 8px;
}
.delete-list li { display: flex; gap: 10px; padding: 2px 0; font-size: 14px; min-width: 0; }
.delete-list .pos { flex: none; width: 3.2em; color: var(--muted); }
.delete-list .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setlist-buttons .count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
/* a filled grey, so an active secondary button never looks switched off (Giovanni,
   2026-10-04); switched off = no fill, faint border and text */
.secondary {
  height: 44px; border: 1px solid #455167; border-radius: 8px; background: #252f40; color: var(--text);
  font-size: 15px; font-weight: 500; cursor: pointer;
}
.secondary:hover:not(:disabled) { background: #313a4a; border-color: #53627d; }
.secondary:disabled { background: transparent; border-color: var(--line-2); color: var(--faint); cursor: default; }

.content { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.views { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line-2); border-radius: 10px; flex-shrink: 0; }
.views button { height: 34px; padding: 0 14px; }
.views button:disabled { opacity: 0.4; }

.list-wrap { flex-grow: 1; min-height: 0; overflow-y: auto; padding: 8px 28px 24px; }
.message { display: none; max-width: 560px; margin: 48px auto; text-align: center; line-height: 1.5; color: var(--muted); }
.message.show { display: block; }
.message strong { display: block; margin-bottom: 6px; font-size: 18px; color: var(--text); }
.message button { margin-top: 18px; padding: 0 22px; }

/* the list */
.presets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.bank { display: flex; align-items: center; gap: 10px; padding: 14px 2px 6px; }
.bank .label { font-size: 12px; }
.bank .rule { flex-grow: 1; height: 1px; background: var(--line-2); }
.row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 90px) minmax(0, 170px) 30px; align-items: center; gap: 12px;
  min-height: 42px; padding: 0 6px 0 12px; border-radius: 8px; background: #151b25;
}
.row .pos { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.row .pos .num { color: var(--faint); }
.row .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .instrument, .row .author { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.empty { background: transparent; border: 1px dashed var(--line-2); }
.row.empty .name { font-weight: 400; font-style: italic; color: var(--faint); }
.row.loaded { background: var(--loaded-bg); }

button.small { height: 36px; padding: 0 12px; font-size: 14px; }

/* reorder: rows as drag sources and targets */
.row { position: relative; cursor: grab; }
.row.empty { cursor: default; }
.slot.selected { box-shadow: inset 0 0 0 2px var(--mark); }
.slot.dragging { opacity: 0.35; }
.chip-moved {
  margin-left: 10px; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600;
  color: #d1d2d6; background: #263042; vertical-align: 2px;
}
/* on the unit's Favorites, as Cortex Control's heart */
.fav { margin-left: 8px; font-size: 12px; color: var(--muted); }
.row.line-before::before, .row.line-after::after {
  content: ''; position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--mark); pointer-events: none;
}
.row.line-before::before { top: -3px; }
.row.line-after::after { bottom: -3px; }
.slot .onto, .slot .place { display: none; pointer-events: none; }
.slot.onto-replace .onto, .slot.onto-swap .onto {
  position: absolute; inset: 0; display: flex; gap: 5px; background: var(--ground);
}
.onto .half {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 7px;
  font-weight: 600; font-size: 14px;
}
.onto .half small { font-weight: 400; font-size: 12px; opacity: 0.8; }
.onto .replace { border: 2px solid #6e262b; background: #2a1214; color: #b5474d; }
.onto .swap { border: 2px solid #364051; background: #181f2a; color: var(--faint); }
.slot.onto-replace .onto .replace { border-color: #ff4d55; background: #4a1519; color: #ffe9ea; }
.slot.onto-swap .onto .swap { border-color: var(--mark); background: #252f40; color: #fff; }
.slot.over-place .place {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 8px;
  background: #2c3442; color: #fff; font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 2px var(--mark);
}

/* the bottom bar: one line (Giovanni, 2026-10-04) */
.draftbar {
  flex-shrink: 0; display: flex; align-items: center; gap: 12px; min-height: 52px;
  padding: 8px 20px 8px 28px; border-top: 1px solid var(--line); background: var(--side);
}
.draftbar[hidden] { display: none; }
.bar-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; }
.bar-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.bar-text.muted { font-weight: 400; }
.bar-gap { flex-grow: 1; }
.draftbar button.secondary, .draftbar button.primary { height: 36px; padding: 0 14px; font-size: 14px; flex-shrink: 0; }
.draftbar button.icon { width: 38px; padding: 0; }
.icon svg { display: block; margin: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.progress { flex: 0 0 160px; height: 6px; border-radius: 3px; background: #263042; }
.progress .fill { height: 100%; border-radius: 3px; background: var(--progress); transition: width 0.2s; }
.primary {
  height: 44px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--brand); color: var(--brand-ink);
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.primary:hover { background: var(--brand-hover); }
.danger {
  height: 44px; padding: 0 18px; border: 0; border-radius: 8px; background: #b3261e; color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
}

/* dialogs */
.modal-back { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.55); z-index: 10; }
.modal-back[hidden] { display: none; }
.modal {
  width: 520px; max-width: calc(100% - 32px); padding: 24px 26px 20px; border-radius: 12px;
  background: #181f2a; border: 1px solid #263042; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal h2 { margin: 0 0 10px; font-size: 20px; font-weight: 700; }
.modal p { margin: 0 0 8px; font-size: 15px; line-height: 1.45; color: #d1d2d6; user-select: text; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal-actions button { padding: 0 16px; }

/* replace: what the save will delete */
.deleted-strip {
  flex-shrink: 0; padding: 8px 28px; font-size: 14px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #ffd9db; background: #2a1214; border-top: 1px solid #6e262b;
}
.deleted-strip[hidden] { display: none; }

/* save as new setlist */
.text-input {
  width: 100%; height: 44px; margin: 6px 0 10px; padding: 0 12px; border-radius: 8px;
  border: 1px solid #364051; background: #10141b; color: var(--text); font-family: inherit; font-size: 16px;
  user-select: text;
}
.text-input:focus { outline: 2px solid var(--mark); outline-offset: 1px; }
.facts .fact { margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.facts .fact.bad { color: var(--attention); font-weight: 600; }
.modal-actions button:disabled { opacity: 0.4; cursor: default; }

/* banks view: the Preset-mode Gig View, Cortex Control's version */
/* banks side by side are divided by a vertical line too: every card draws one on its
   left, and the first card of each row pushes its line out of the clipped box */
.banks { display: flex; flex-wrap: wrap; align-content: flex-start; row-gap: 22px; padding-top: 4px; overflow: hidden; }
.banks[hidden], .presets[hidden] { display: none; }
.bank-card { width: 384px; max-width: 100%; display: flex; flex-direction: column; gap: 4px; box-sizing: border-box;
  margin-left: -1px; padding: 0 24px; border-left: 1px solid var(--line-2); }
.banks.eight .bank-card { width: 584px; }
.bank-card .bank { padding: 0 2px 4px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.banks.eight .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile {
  position: relative; min-height: 112px; padding: 10px 12px 12px; border-radius: 8px; background: #181f2a;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px; cursor: grab;
}
.tile:hover { background: #1d2533; }
.tile.empty { background: transparent; border: 1px dashed var(--line-2); cursor: default; }
.tile-pos { align-self: flex-end; font-size: 30px; font-weight: 400; line-height: 1; }
.tile-pos .num { color: var(--faint); }
.tile-name { padding-right: 26px; font-size: 15px; font-weight: 500; line-height: 1.25; color: #d1d2d6; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile.empty .tile-name { font-style: italic; color: var(--faint); }
.tile.loaded, .tile.loaded:hover { color: #0c0f14; }
.tile.loaded .tile-name, .tile.loaded .tile-pos .num { color: #0c0f14; font-weight: 600; }
.tile-chip { position: absolute; top: 10px; left: 12px; margin: 0; }
.tile.line-before::before, .tile.line-after::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: var(--mark); pointer-events: none;
}
.tile.line-before::before { left: -5px; }
.tile.line-after::after { right: -5px; }
.tile .onto { flex-direction: column; }

/* preset details */
.field-label { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); }
select.text-input { appearance: auto; }
.danger-text { color: #ff8a8f; }

/* keyboard focus on the list area */
.list-wrap:focus { outline: none; }

/* context menu */
.ctxmenu {
  position: fixed; z-index: 20; min-width: 230px; padding: 6px; border-radius: 10px;
  background: #1c2330; border: 1px solid #364051; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.ctxmenu[hidden] { display: none; }
.ctxmenu .item {
  width: 100%; height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 10px; border: 0; border-radius: 6px; background: transparent; font-size: 14px; text-align: left; cursor: pointer;
}
.ctxmenu .item:hover:not(:disabled), .ctxmenu .item:focus-visible { background: #263042; outline: none; }
.ctxmenu .item:disabled { opacity: 0.4; cursor: default; }
.ctxmenu .keys { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ctxmenu .sep { height: 1px; margin: 5px 4px; background: var(--line-2); }

/* loading: the slot fills like a progress bar */
.slot .loadfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; pointer-events: none; }
.slot.loading > :not(.loadfill) { position: relative; }
.slot.loading .onto, .slot.loading .place, .tile.loading .more, .tile.loading .tile-chip { position: absolute; }
.tile.loading .letter, .tile.loading .tile-pos .num { color: var(--text) !important; }   /* the fill is the letter's colour */

/* the ⋯ of a preset: on hover and on the selected one */
.more {
  width: 30px; height: 28px; display: flex; align-items: center; justify-content: center; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; opacity: 0;
}
.more svg { display: block; fill: currentColor; }
.slot:hover .more, .slot.selected .more, .more:focus-visible { opacity: 1; }
.more:hover, .more[aria-expanded="true"] { background: #263042; color: var(--text); opacity: 1; }
.tile .more { position: absolute; right: 6px; bottom: 6px; }
.tile.loaded .more { color: #0c0f14; }
.tile.loaded .more:hover { background: rgba(0, 0, 0, 0.15); }

/* scrollbars in the app's colours */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2d3543; border: 2px solid transparent; border-radius: 5px; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #394355; }

/* the start notice's "don't show again" */
.check { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: #d1d2d6; }
.check + .field-label { margin-top: 18px; }   /* Settings: a new group after the notice */
/* Settings: each group's title apart from what is above it, close to what it names (Giovanni, 2026-11-09) */
.field-label.group { margin: 20px 0 8px; }

/* narrower windows */

/* small screens and large text: columns give way, the header and the bar tighten */



/* settings */
.sizes, .icon-sets { align-self: flex-start; width: max-content; margin: 6px 0 4px; }
.sizes button, .icon-sets button { height: 36px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent;
  color: var(--faint); font-size: 15px; font-weight: 500; cursor: pointer; }
.sizes button[aria-pressed="true"], .icon-sets button[aria-pressed="true"] { background: var(--raised); color: var(--text); font-weight: 600; }
/* the developer's screens (app.js tryPage) */
.screens { display: flex; flex-direction: column; gap: 6px; }
.screen-list { display: flex; flex-wrap: wrap; gap: 6px; }
.screen-list button { height: 32px; padding: 0 12px; font-size: 13.5px; }
.trying { position: fixed; left: 8px; bottom: 8px; z-index: 50; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--mark);
  background: #10141b; color: var(--text); font-size: 12.5px; cursor: pointer; }
.about { margin-top: 18px !important; font-size: 13px !important; color: var(--faint) !important; }
.top .icon-button { width: 38px; height: 38px; }

/* settings: the device's name */
.name-row { display: flex; gap: 8px; align-items: center; }
.name-row .text-input { margin: 6px 0; }
.name-row button { flex-shrink: 0; padding: 0 16px; }

/* plugins the user owns */
.plugin-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; margin: 8px 0 12px; }
.plugin-list .check { margin-top: 6px; color: var(--text); }
#modal > .secondary { padding: 0 16px; }

/* -- Preset merge ------------------------------------------------------------------- */
.body[hidden], .views[hidden] { display: none; }
.source-note { margin: 6px 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.source-note button { margin-top: 6px; height: 34px; padding: 0 12px; font-size: 14px; }

.merge-main { position: relative; }
.merge-scroll { flex-grow: 1; min-height: 0; overflow-y: auto; padding: 18px 28px 24px; display: flex; flex-direction: column; gap: 16px; }
.merge-head { display: flex; align-items: center; gap: 12px; }
.merge-head[hidden] { display: none; }
.merge-head h1 { margin: 0; font-size: 24px; font-weight: 700; }
.merge-head .secondary { align-self: center; padding: 0 14px; }
.merge-pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 24px; }
.merge-pages.qc { grid-template-columns: 1fr; }
.merge-page { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.merge-page .label { font-size: 12px; }
.mtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.merge-pages.qc .mtiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* a scene: the Scene-mode Gig View (data/ui-reference/NOTES.md) - the default scene in
   the "selected" look, as the device shows it right after loading */
.mtile {
  position: relative; height: 148px; overflow: hidden; border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 4px;
  background: var(--tint, #1e1e1e); color: #d3cfcf;
}
.mtile.real { cursor: grab; }
.mtile.free { background: transparent; border: 1px dashed var(--line-2); color: var(--faint); }
.mtile.default { background: var(--colour); color: #000; }
.mtile .mark {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%); pointer-events: none;
  font-size: 96px; font-weight: 700; line-height: 1; color: var(--watermark, #252525);   /* the big scene letter; not --mark, the neutral */
}
.mtile > :not(.mark):not(.onto):not(.place):not(.loadfill) { position: relative; }
.mtile .mtop { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 26px; }
.mtile .letter { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.mtile .x {
  width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: rgba(0, 0, 0, 0.35);
  color: inherit; font-size: 16px; line-height: 1; cursor: pointer;
}
.mtile.default .x { background: rgba(0, 0, 0, 0.15); }
.mtile .scene-label {
  font-size: 20px; font-weight: 600; line-height: 1.15; text-align: center; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mtile.free .scene-label { font-size: 14px; font-weight: 400; }
.mtile .mbottom { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 26px; }
.mtile .from {
  min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; opacity: 0.8; text-align: left;
  font-size: 12px; line-height: 1.3; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mtile .from:hover { opacity: 1; text-decoration: underline; }
.mtile .tag { flex-shrink: 0; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; background: rgba(0, 0, 0, 0.18); }
.mtile .make-default {
  flex-shrink: 0; height: 24px; padding: 0 8px; border: 1px solid #364051; border-radius: 999px;
  background: rgba(0, 0, 0, 0.35); color: inherit; font-size: 11px; cursor: pointer;
}
.mtile.reading .scene-label { opacity: 0.6; }
.mtile .loadfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255, 255, 255, 0.08); pointer-events: none; }
.mtile.dragging { opacity: 0.35; }
.mtile .onto, .mtile .place { display: none; pointer-events: none; }
.mtile.onto-replace .onto, .mtile.onto-swap .onto { position: absolute; inset: 0; display: flex; gap: 5px; padding: 0; background: var(--ground); }
.mtile.onto-replace .onto .replace { border-color: #ff4d55; background: #4a1519; color: #ffe9ea; }
.mtile.onto-swap .onto .swap { border-color: var(--mark); background: #252f40; color: #fff; }
.mtile.over-place .place {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px;
  background: #2c3442; color: #fff; font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 2px var(--mark);
}

.merge-options { display: flex; flex-direction: column; gap: 12px; }
.mopt { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--side); }
.mopt h2 { margin: 0; font-size: 15px; font-weight: 600; }
.mopt p { margin: 0; font-size: 14px; line-height: 1.45; color: #d1d2d6; user-select: text; }
.mopt .check { margin-top: 2px; color: var(--text); }
.mopt .choice { display: flex; gap: 2px; padding: 2px; align-self: flex-start; border: 1px solid var(--line-2); border-radius: 10px; }
.mopt .choice button { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--faint); font-size: 14px; cursor: pointer; }
.mopt .choice button[aria-pressed="true"] { background: var(--raised); color: var(--text); font-weight: 600; }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px); align-items: center; gap: 12px; }
.setting-row .what { font-size: 14px; line-height: 1.4; }
.setting-row .what small { display: block; font-size: 13px; color: var(--muted); }
.setting-row select { height: 36px; margin: 0; font-size: 14px; }
.blocker { color: var(--attention); }

/* the source dialog: which scene, which sound, the name */
.scene-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 6px 0 4px; }
.scene-pick button {
  position: relative; min-height: 58px; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px;
  background: var(--tint); color: #d3cfcf; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px;
}
.scene-pick button .l { font-family: var(--mono); font-size: 11px; opacity: 0.8; }
.scene-pick button .n { font-size: 14px; font-weight: 600; line-height: 1.2; word-break: break-word; }
.scene-pick button .i { font-size: 11px; opacity: 0.75; }
.scene-pick button[aria-pressed="true"] { background: var(--colour); color: #000; }
.scene-pick button:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; }
.inputs-pick { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.inputs-pick .check { margin-top: 6px; color: var(--text); }
.layout-grid { display: grid; grid-template-columns: max-content 1fr; align-items: center; gap: 10px 14px; margin: 8px 0; }
.layout-grid .views button { height: 32px; padding: 0 12px; font-size: 14px; }
.modal.wide { width: 640px; }

/* report a problem (report.js): it scrolls in a short window */
.modal.report { max-height: calc(100vh - 32px); overflow-y: auto; }
.report-text { height: auto; min-height: 120px; padding: 10px 12px; line-height: 1.4; resize: vertical; }
.link-button {
  margin-top: 12px; padding: 0; height: auto; border: 0; background: none; color: var(--muted);
  font-size: 14px; text-decoration: underline; cursor: pointer;
}
.link-button:hover { color: var(--text); }
.report-preview {
  max-height: 180px; overflow: auto; margin: 8px 0 0; padding: 10px 12px; border-radius: 8px;
  border: 1px solid #364051; background: #10141b; color: var(--muted);
  font-family: var(--mono); font-size: 12px; line-height: 1.45; white-space: pre-wrap; user-select: text;
}
.report-preview[hidden] { display: none; }




/* Preset merge, step 2: Try it, then save */
.merge-try { display: flex; flex-direction: column; gap: 16px; }
.merge-try[hidden] { display: none; }
.sources.locked .setlist-buttons { opacity: 0.45; pointer-events: none; }
.try-busy { max-width: 560px; margin: 40px auto; display: flex; flex-direction: column; gap: 12px; }
.try-busy h1 { margin: 0; font-size: 22px; }
.try-busy p { margin: 0; line-height: 1.5; }
.try-busy .progress { flex: none; width: 100%; }
.try-actions { display: flex; gap: 8px; margin-top: 8px; }
.try-actions button { padding: 0 18px; }
button.mtile { width: 100%; border: 0; font-family: inherit; text-align: left; cursor: pointer; }
button.mtile:disabled { cursor: default; }
button.mtile .from { cursor: inherit; }
button.mtile .from:hover { text-decoration: none; }
.try-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.save-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 6px 12px; }
.save-grid .field-label { margin: 0; }
.save-grid .text-input { height: 38px; margin: 0; font-size: 14px; }
.problems { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.45; color: #d1d2d6; user-select: text; }
.merge-pages[hidden], .merge-options[hidden] { display: none; }
.mtile .scene-label.unnamed { font-size: 15px; font-weight: 400; font-style: italic; opacity: 0.6; }
#modal > .progress { flex: none; width: 100%; margin: 12px 0 0; }
#modal > .progress[hidden] { display: none; }

/* Preset merge, Giovanni's layout (2026-10-04): the presets above, the new preset below */
.merge-main { display: flex; flex-direction: column; }
.merge-main > .message.show { flex-grow: 1; }
.sources .side-label { padding: 14px 12px 6px; font-size: 12px; }
.merge-top { flex: 1 1 auto; min-height: 140px; display: flex; flex-direction: column; }
.merge-top[hidden], .merge-bottom[hidden] { display: none; }
.merge-top-head { display: flex; align-items: center; gap: 14px; padding: 10px 28px 4px; }
.merge-top-head .text-input { width: 280px; height: 36px; margin: 0; font-size: 14px; flex-shrink: 0; }
.merge-top-head .small { font-size: 13px; }
.merge-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 0 28px 10px; }
.merge-list .bank { padding: 10px 2px 4px; }
.srow {
  position: relative; min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 2px 6px 2px 8px;
  border-radius: 8px; background: #151b25; cursor: pointer; overflow: hidden;
}
.srow:hover { background: #1a212d; }
.srow.open { background: #1f2735; border-radius: 8px 8px 0 0; }
.srow > :not(.loadfill) { position: relative; }
.srow .pos { width: 34px; flex-shrink: 0; font-family: var(--mono); font-size: 13px; color: var(--faint); }
.srow .nm { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.srow .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .nm .n { font-weight: 600; }
.srow .nm .where { font-size: 12px; color: var(--faint); }
.srow .used { padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: 11px; font-weight: 600; color: #0c0f14; }
.srow .chev {
  width: 30px; height: 30px; flex-shrink: 0; padding: 0; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.srow .chev svg { display: block; margin: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s; }
.srow:not(.open) .chev svg { transform: rotate(-90deg); }
.srow .chev:hover { background: #263042; color: var(--text); }
.srow .loadfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(233, 231, 227, 0.08); pointer-events: none; }
.sscenes {
  display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 10px 30px; margin-bottom: 4px;
  border-radius: 0 0 8px 8px; background: #1f2735; font-size: 13px;
}
.sscenes .secondary { align-self: flex-start; }
.sscene-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
/* what can be dragged is blue, the brand's (Giovanni, 2026-10-09: red read as "not allowed");
   a scene's own colour is the stripe on the left */
.sscene {
  min-height: 54px; padding: 5px 8px; border-radius: 7px; background: rgba(46, 139, 255, 0.14); color: #dfe4ec;
  display: flex; flex-direction: column; gap: 1px; cursor: grab;
  border: 1px solid rgba(46, 139, 255, 0.28); border-left: 4px solid var(--colour, var(--brand));
}
.sscene:hover { border-color: var(--brand); border-left-color: var(--colour, var(--brand)); background: rgba(46, 139, 255, 0.2); }
.sscene:active { cursor: grabbing; }
.sscene.whole { max-width: 360px; flex-direction: row; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; }
.sscene .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.sscene .went { margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: rgba(46, 139, 255, 0.3); font-family: var(--mono); font-size: 11px; font-weight: 600; }
.sscene .drag-me {
  flex-shrink: 0; padding: 3px 9px; border-radius: 999px; background: var(--brand); color: var(--brand-ink);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.sscene .l { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-family: var(--mono); font-size: 11px; opacity: 0.85; }
.sscene .grip { display: inline-flex; flex-shrink: 0; color: var(--brand-hover); }
.sscene.whole .grip svg { width: 10px; height: 16px; }
.sscene .grip svg { fill: currentColor; }
.sscene .n { font-size: 14px; font-weight: 600; line-height: 1.2; word-break: break-word; }
.sscene .i { font-size: 11px; opacity: 0.75; }
.merge-bottom { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 8px 28px 10px; border-top: 1px solid var(--line); background: #0e1219; }
.merge-bottom .merge-head .secondary { height: 32px; padding: 0 12px; font-size: 14px; }
.merge-bottom .mtile { height: 98px; padding: 6px 9px; gap: 2px; }
.merge-bottom .merge-page > .label { display: none; }      /* AI / AII on the tiles say the page */
.merge-bottom .mtile .mark { font-size: 64px; }
.merge-bottom .mtile .mtop, .merge-bottom .mtile .mbottom { min-height: 22px; }
.merge-bottom .mtile .x { width: 22px; height: 22px; font-size: 14px; }
.merge-bottom .mtile .make-default { height: 22px; }
.merge-bottom .mtile .scene-label { font-size: 14px; line-height: 1.15; }
.merge-bottom .merge-pages { gap: 8px 20px; }
.merge-bottom .mtiles { gap: 6px; }
.merge-options { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow-y: auto; }
.try-busy .stage-line { min-height: 1.5em; font-size: 14px; color: var(--text); }
.try-busy .progress .fill, .draftbar .progress .fill { transition: width 0.6s ease-out; }
/* footswitches and pedals after Try it: copyable facts */
.pedal-list { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 0; user-select: text; }
.pedal-list h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.pedal-list p { margin: 0 0 2px; font-size: 14px; line-height: 1.4; color: #d1d2d6; }
.pedal-list .who { color: var(--muted); }
.pedal-list .merge-row { color: var(--text); font-weight: 600; }
/* the warning after Try it: the attention yellow; red stays for what deletes */
.warn { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 14px; border: 1px solid var(--attention-line); border-radius: 10px; background: var(--attention-bg); }
.warn-head { display: flex; align-items: center; gap: 10px; }
.warn-head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--attention-ink); }
.warn-icon svg { display: block; }
.warn .muted { margin: 0; font-size: 14px; line-height: 1.45; }
.warn .secondary.small { height: 32px; padding: 0 12px; font-size: 14px; }
.warn.flash { box-shadow: 0 0 0 3px var(--attention); transition: box-shadow 0.2s; }
.warn.folded { padding: 8px 16px; }
.warn.folded .warn-head h2 { font-size: 14px; font-weight: 600; }
/* a disabled primary looks it (Giovanni, 2026-10-04: Save stayed blue and did nothing) */
.primary:disabled, .primary:disabled:hover { background: #252f40; color: var(--faint); cursor: default; }
.bar-text.why { color: var(--attention); font-weight: 600; }
/* every kind of button looks switched off when it is (Giovanni, 2026-10-04) */
button:disabled { cursor: default; }
.danger:disabled, .danger:disabled:hover { background: #252f40; color: var(--faint); }
.mtile .x:disabled, .mtile .make-default:disabled, .srow .chev:disabled, .sscene[aria-disabled="true"] { opacity: 0.4; }

/* while the app works on the Quad Cortex (app.js, deviceBusy): a band at the top, not modal */
.device-busy {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 40;
  max-width: min(720px, calc(100% - 32px)); padding: 10px 16px; border-radius: 10px;
  background: var(--attention-bg); color: var(--attention-ink); border: 1px solid var(--attention-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45); font-size: 14px; line-height: 1.4; text-align: center;
  pointer-events: none;
}
.device-busy strong { color: var(--attention); font-weight: 700; }
.device-busy[hidden] { display: none; }

/* a merge scene's colour: the 8 the device stores (merge.js, openSource) */
.colour-pick { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 6px; }
.colour-pick .swatch {
  width: 30px; height: 30px; border-radius: 7px; cursor: pointer; padding: 0;
  background: var(--colour); border: 2px solid var(--ground);
}
.colour-pick .swatch[aria-checked="true"] { outline: 2px solid var(--mark); outline-offset: 2px; }

/* the Setlists page with the preset loaded at its right (grid.js, #preset-pane; Giovanni, 2026-10-31):
   the list a column, the grid zoomed to the pane (--gz, grid.js fit), its blocks a symbol each (the name
   in the tooltip, as the Quad Cortex shows no names), the editor as wide as the grid and tighter */
.content.with-pane { flex-direction: row; }
.list-col { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.with-pane .list-col { flex: 0 0 clamp(250px, 24vw, 330px); border-right: 1px solid var(--line); }
.with-pane .list-wrap { padding: 4px 10px 20px; }
.with-pane .row { grid-template-columns: 44px minmax(0, 1fr) 30px; gap: 8px; min-height: 36px; padding-left: 8px; }
.with-pane .row .author, .with-pane .row .instrument { display: none; }
.with-pane .row .pos { font-size: 13.5px; }
.with-pane .draftbar, .with-pane .deleted-strip { padding-left: 10px; padding-right: 10px; }
.with-pane .bar-main { flex-wrap: wrap; }
.preset-pane { flex: 1 1 auto; min-width: 0; overflow: auto; --gz: 1; --gw: 1; display: flex; flex-direction: column; }
.preset-pane[hidden] { display: none; }
/* the grid stays in sight, the editor scrolls under it (Giovanni, 2026-10-31); the pane itself scrolls only when
   too short even for that */
.preset-pane .grid-content { padding: 12px 16px 14px; gap: 10px; overflow: visible; flex: 1 1 auto; min-height: 0; }
.preset-pane .grid-content > * { max-width: calc(794px * var(--gw)); flex-shrink: 0; }
/* the rows zoomed to the width (--gw), lower in a low pane (--gz); two of them with a large editor (grid.js paintNow) */
.preset-pane .g-rows { zoom: var(--gz); margin: 0 auto; }
.preset-pane .g-rows-wrap.half { overflow: hidden; padding-bottom: 0; border-bottom: 0; border-radius: 12px 12px 0 0; }
.preset-pane .g-rows-wrap.half.low { padding-top: 0; padding-bottom: 16px; }
.preset-pane .g-rows-wrap.half + .g-editor { margin-top: -16px; position: relative; z-index: 6; box-shadow: 0 -6px 16px rgba(0, 0, 0, .6); }
.preset-pane .g-title .label, .preset-pane .g-note, .preset-pane .g-again { display: none; }
.preset-pane .g-head { gap: 8px; flex-wrap: nowrap; }
.preset-pane .g-name { font-size: 18px; }
.preset-pane .g-head button.secondary, .preset-pane .g-head button.primary { height: 30px; padding: 0 10px; font-size: 13.5px; }
/* Undo, Redo and Save as icons, as on the Quad Cortex; while it saves the wheel alone turns */
.g-head button.g-icon-btn.secondary, .g-head button.g-icon-btn.primary { width: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.g-icon-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.g-icon-btn.g-saving svg { display: none; }
.g-icon-btn.g-saving::before { margin-right: 0; }
.preset-pane .g-scenes { flex-wrap: nowrap; gap: 4px; }
.preset-pane .g-scene { flex: 1 1 0; min-width: 0; padding: 3px 7px; }
.preset-pane .g-scene .lab { max-width: 100%; }
.preset-pane .g-block .n { display: none; }
.preset-pane .g-block svg { width: 36px; height: 36px; }
.preset-pane .g-block .badge { font-size: 12px; top: -9px; }
.preset-pane .g-block .stomp { font-size: 13px; }
.preset-pane .g-port span { font-size: 14px; }
.preset-pane .g-port span.long { font-size: 12px; }
.preset-pane .g-port.unused span { font-size: 26px; }
.preset-pane .g-editor { padding: 10px 12px 12px; gap: 8px; flex: 0 1 auto; min-height: 0; overflow: auto; }
.preset-pane .g-editor > * { flex-shrink: 0; }                    /* scrolled, never squeezed */
.preset-pane .g-ed-head { position: sticky; top: -10px; z-index: 4; margin: -10px -12px 0; padding: 10px 12px 6px; background: var(--side); }
.preset-pane .g-ed-icon { width: 36px; height: 36px; }
.preset-pane .g-ed-name { font-size: 16px; }
.preset-pane .g-ed-params { gap: 6px; }
/* a card as Cortex Control's tile, lower (Giovanni, 2026-10-31: so the Multivoicer fits): the knob at the right
   beside the name and the value; a name cut short beside it takes the whole width, the knob under it (grid.js fitCards) */
.preset-pane .g-param { min-height: 0; padding: 6px 8px; }
.preset-pane .g-param:has(.g-knob) { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto;
  column-gap: 6px; row-gap: 2px; align-content: space-between; }
.preset-pane .g-param:has(.g-knob) > * { grid-column: 1; }
.preset-pane .g-param:has(.g-knob) .g-param-foot { display: contents; }
.preset-pane .g-param:has(.g-knob) .g-param-value { align-self: end; }
.preset-pane .g-param .g-knob { grid-column: 2; grid-row: 1 / -1; align-self: center; width: 38px; height: 38px; }
.preset-pane .g-param.long > .g-param-top { grid-column: 1 / -1; }
.preset-pane .g-param.long .g-knob { grid-row: 2; }
.preset-pane .g-param-value { font-size: 13.5px; }
.preset-pane.narrow .g-param { padding: 6px; }
.preset-pane.narrow .g-ed-params { grid-template-columns: repeat(4, minmax(0, 1fr)); }   /* the Parametric's five too */
.preset-pane.narrow .g-knob { width: 34px; height: 34px; }
.preset-pane.narrow .g-param-value { font-size: 12.5px; }
.preset-pane.narrow .g-param-units { margin-left: 2px; font-size: 11px; }
/* the tall editors lower in the pane: the faders, the curve, the voices' pad, the speakers side by side and smaller */
.preset-pane .g-fader-track { height: 110px; }
.preset-pane .g-fader .g-param-value { font-size: 12px; line-height: 1.15; text-align: center; }
.preset-pane .g-fader .g-param-units { display: block; margin-left: 0; }
.preset-pane .g-peq { height: 140px; }
.preset-pane .g-pad { padding: 10px 12px; gap: 8px; }
.preset-pane .g-pad-area { height: 132px; margin: 12px 20px 16px; }
.preset-pane .g-cab { --cab: 140px; flex-wrap: nowrap; gap: 14px; padding: 10px 12px; }
.preset-pane.narrow .g-cab { --cab: 120px; }
.preset-pane .g-cab-panel { flex: 1 1 0; min-width: 0; gap: 8px; }
.preset-pane .g-cab-pick { flex: 1 1 0; min-width: 0; }
.preset-pane .g-cab-front, .preset-pane .g-cab-strip { margin-left: auto; margin-right: auto; }

/* the grid of the preset loaded, read-only (grid.js) */
.grid-content { padding: 16px 24px 24px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
/* not wider than the grid (Giovanni, 2026-10-14) */
.grid-content > * { max-width: 860px; width: 100%; }
.g-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.g-title { display: flex; align-items: baseline; gap: 12px; flex-grow: 1; min-width: 0; }
.g-name { font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-scenes { display: flex; gap: 6px; flex-wrap: wrap; }
.g-scene {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 84px; padding: 5px 9px;
  border-radius: 8px; border: 1px solid var(--line-2); background: var(--side); cursor: pointer; text-align: left;
  border-left: 4px solid var(--colour);
}
.g-scene .id { font-size: 12px; color: var(--muted); }
.g-scene .lab { font-size: 13px; font-weight: 600; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-scene { background: color-mix(in srgb, var(--colour) 16%, var(--side)); }
/* the active scene in its colour, as its left border (Giovanni, 2026-10-31) */
.g-scene.on { background: var(--colour); border-color: var(--colour); color: var(--ink); }
.g-scene.on .id, .g-scene.on .dflt { color: var(--ink); opacity: .75; }
.g-rows-wrap { flex-shrink: 0; overflow-x: auto; background: var(--bar); border: 1px solid var(--line); border-radius: 12px; padding: 12px 0; }
/* an edit on its way to the unit: the border breathes, faintly, and only if it takes longer than a moment (grid.js, E) */
@keyframes g-wait { 0%, 100% { border-color: var(--line); } 50% { border-color: #5d6b84; } }
.g-waiting .g-rows-wrap { animation: g-wait 1.1s ease-in-out 200ms infinite; }
@media (prefers-reduced-motion: reduce) { .g-waiting .g-rows-wrap { animation: none; border-color: #5d6b84; } }
.g-rows { position: relative; width: 792px; }   /* grid.js GRID_W */
.g-lines, .g-tapline, .g-taps { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.g-lines { z-index: 2; } .g-taps { z-index: 5; }
.g-tapline { z-index: 2; }                 /* a source's line: under the blocks (3), over the bypassed ones (1); a faint copy in .g-taps */
.g-lines path { fill: none; }
.g-port { position: absolute; width: 44px; height: 64px; z-index: 3; display: flex; align-items: center; justify-content: center; }
.g-port svg { position: absolute; inset: 0; }
.g-port path { fill: var(--raised); stroke: #3a465c; stroke-width: 1.5; stroke-linejoin: round; }
.g-port span { position: relative; white-space: pre-line; text-align: center; font-size: 11.5px; line-height: 1.15; font-weight: 600; color: #c9cdd6; margin-left: -4px; }
.g-port span.shift { margin-left: 4px; }
.g-port span.long { font-size: 10px; }
.g-port.unused path { fill: var(--side); stroke: var(--line-2); stroke-dasharray: 3 3; }
.g-port.unused span { font-size: 22px; font-weight: 300; color: var(--faint); }
.g-port.ignored { opacity: 0.38; }
button.g-port { background: none; border: 0; padding: 0; cursor: pointer; }
.g-port.selected path { stroke: var(--mark); stroke-width: 2; stroke-dasharray: none; }
.g-port .lane-bar { position: absolute; left: 9px; width: 22px; height: 3px; border-radius: 2px; }
.g-port .lane-bar.gate { top: 6px; background: #d6a531; }
.g-port .lane-bar.mute { bottom: 6px; background: #ff3b3b; }
.g-port .lane-bar.solo { top: 6px; background: #4fc3f7; }
.g-block {
  position: absolute; width: 70px; height: 64px; z-index: 3; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; padding: 4px; border-radius: 12px; cursor: pointer; background: var(--raised);
  border: 2px solid var(--colour); color: var(--text);
}
.g-block svg { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* the Quad Cortex's symbols (grid.js QC_ICONS) are finer than ours */
.g-block svg.qc, .g-ed-icon svg.qc { stroke-width: 1.4; }
.g-block .n { font-size: 10.5px; line-height: 1.15; max-width: 62px; text-align: center; color: #c9cdd6; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.g-block .badge { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font-size: 9.5px; font-weight: 700;
  letter-spacing: .06em; padding: 1px 5px; border-radius: 4px; background: var(--colour); color: #0c0f14; }
.g-block .stomp { position: absolute; right: 5px; top: 3px; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.g-block { transition: transform 210ms cubic-bezier(.2, .7, .3, 1); }
@media (prefers-reduced-motion: reduce) { .g-block { transition: none; } }
.g-block.bypassed { z-index: 1; background: #121720; border-color: var(--line-2); opacity: .45; }
.g-block.selected { border-color: var(--mark); }
/* the (X) of a block under the mouse, as Cortex Control */
.g-block-x { position: absolute; top: -9px; right: -9px; z-index: 5; width: 22px; height: 22px; display: none; align-items: center; justify-content: center; border: 1px solid #5d6b84; border-radius: 50%; background: #232c3a; color: var(--text); font-size: 15px; line-height: 1; }
.g-block:hover .g-block-x, .g-block:focus-visible .g-block-x { display: flex; }
.g-block-x:hover { background: #3a4659; }
.g-cell { position: absolute; width: 70px; height: 64px; z-index: 3; padding: 0; border-radius: 12px; cursor: pointer; background: transparent; border: 2px dashed transparent; }
.g-cell:hover { border-color: #5d6b84; }
.g-cell:not(.selected):hover::after { content: '+'; color: var(--text); font-size: 26px; line-height: 1; }
.g-rows.moving .g-cell:hover::after { content: none; }
/* a block dragged: where it can go, it dimmed where it was, a copy under the mouse; where it would end a ghost in one colour, and it gone from where it was */
.g-rows.moving .g-cell { border-color: #2b3444; }
.g-rows.moving, .g-rows.moving * { cursor: grabbing; }
.g-rows.moving .g-block-x { display: none; }
/* taken: it rises at once, as on the unit; nothing of the browser's own gets in the way of a drag */
.g-block { touch-action: none; user-select: none; -webkit-user-drag: none; }
.g-block.held { z-index: 20; transform: translateY(-8px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); cursor: grabbing; transition: transform 70ms ease-out; }
.g-block.held .g-block-x { display: none; }
.g-block.lifted { opacity: 0.3; }
.g-block.lifted.gone { visibility: hidden; }
.g-block.room { z-index: 4; }
.g-block-ghost { z-index: 4; pointer-events: none; transition: none; background: #1a1f28; border-color: #5d6b84; filter: grayscale(1); opacity: 0.55; }
/* S and M: an outline at rest, full moved up, as in Cortex Control */
.g-node { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; padding: 0; z-index: 6; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--colour); background: #0b0e13; color: var(--colour); font-size: 12px; font-weight: 700; line-height: 1; cursor: grab; }
.g-node.moved { background: var(--colour); color: #fff; }
.g-node.selected { outline: 2px solid var(--mark); outline-offset: 2px; }
.g-node.bypassed { opacity: 0.5; }
.g-node.lifted { opacity: 0.3; }
.g-node-drag { z-index: 21; pointer-events: none; opacity: 1; }
.g-rows.placing, .g-rows.placing * { cursor: grabbing; }
.g-point { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; z-index: 5; border-radius: 50%; border: 2px solid #e8ecf2; background: #0b0e13; pointer-events: none; }
.g-point.on { border-color: var(--colour); background: var(--colour); }
/* over everything, a bypassed block too: its symbol stays in sight */
.g-block.g-block-drag { z-index: 20; pointer-events: none; opacity: 0.9; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); transition: none; }
/* the line of an upper row with no split, where a split starts (grid.js pullSplit) */
.g-line-grab { position: absolute; z-index: 0; cursor: grab; touch-action: none; user-select: none; }
/* a source dragged on the grid: the slot and the source's dot taken, the line following, the blocks it can take
   outlined, the one under the pointer more, the cursor a link there */
/* the block menu's plugins not owned: greyed, a padlock, Neural DSP's page on a click */
.dr-go-row.locked .dr-menu-name { color: var(--muted); }
.g-tap-grab { position: absolute; z-index: 6; width: 18px; height: 18px; border-radius: 50%; cursor: grab; touch-action: none; user-select: none; }
.g-tap-grab:hover { box-shadow: 0 0 0 2px rgba(230, 231, 233, 0.45); }
.g-tapdrag { position: absolute; left: 0; top: 0; z-index: 7; pointer-events: none; overflow: visible; }
.tapping .g-tapline, .tapping .g-taps path { visibility: hidden; }
.g-block.tap-can { outline: 1px dashed var(--colour); outline-offset: 3px; }
.g-block.tap-over { outline: 2px solid var(--colour); outline-offset: 3px; }
html.tap-drag, html.tap-drag * { cursor: grabbing !important; }
html.tap-drag.tap-on, html.tap-drag.tap-on * { cursor: alias !important; }
.g-cell.selected { border-color: var(--mark); color: var(--text); font-size: 26px; line-height: 1; }
.g-hint { font-size: 12.5px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 0; }   /* what is left beside the name: the name stays whole */
.g-told { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; animation: g-told linear forwards; }
.g-flash { color: var(--muted); }
@keyframes g-told { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
.fades { animation: g-told linear forwards; }
/* a hint keeps its own faint look while it stands, then goes as the others */
.g-hint.g-told { animation-name: g-told-hint; }
@keyframes g-told-hint { 0%, 85% { opacity: .7; } 100% { opacity: 0; } }
.g-editor { background: var(--side); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.g-ed-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.g-ed-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--raised); border: 2px solid var(--colour); }
.g-ed-icon svg { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.g-ed-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex-grow: 1; }
.g-ed-name { font-size: 19px; font-weight: 700; }
/* Active / Bypassed: the block itself, as the grid draws it (grid.js, blockSwitch) - bypassed dimmed, the signal's line over it with its dark edge */
.g-switch { position: relative; flex: none; padding: 0; color: var(--colour); }
button.g-switch { cursor: pointer; }
button.g-switch:hover { filter: brightness(1.25); }
button.g-switch:focus-visible { outline: 2px solid var(--mark); outline-offset: 1px; }
.g-switch.bypassed { background: #121720; border-color: var(--line-2); }
.g-switch.bypassed > * { opacity: 0.45; }
.g-switch.bypassed::before, .g-switch.bypassed::after { content: ''; position: absolute; left: -9px; right: -9px; top: 50%; pointer-events: none; }
.g-switch.bypassed::before { height: 8px; margin-top: -4px; background: #0c0f14; }
.g-switch.bypassed::after { height: 2px; margin-top: -1px; background: #5d6b84; }
.g-switch-node { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--colour); background: #0b0e13; font-size: 16px; font-weight: 700; line-height: 1; }
.g-switch-word { display: flex; align-items: center; justify-content: center; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--colour); background: transparent; }
.g-switch-word .g-param-name { color: var(--colour); }
.g-ed-chip { font-size: 13px; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); }
.g-ed-stomp { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.g-ed-stomp svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.g-ed-pages { display: flex; gap: 6px; }
.g-ed-pages button { min-width: 34px; height: 30px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-family: var(--mono); }
.g-ed-pages button.on { background: var(--line-2); }
.g-ed-params { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 8px; }
.g-param { position: relative; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; min-height: 100px; }
.g-param-top { display: flex; align-items: center; gap: 6px; }
.g-pick { margin-left: auto; width: 14px; height: 14px; min-width: 14px; padding: 0; border-radius: 3px; border: 1px solid #4c5a70; background: transparent; cursor: pointer; }
.g-pick.on { background: #4aa8ff; border-color: #4aa8ff; box-shadow: inset 0 0 0 2px #10141b; }
/* five and five as long as "-60.0 dB" and the knob fit in a card, fewer below that */
.g-ed-params.g-five { grid-template-columns: repeat(auto-fill, minmax(max(116px, calc((100% - 32px) / 5)), 1fr)); }
.g-five .g-param { padding-left: 8px; padding-right: 8px; }
.g-five .g-param-name { letter-spacing: 0; }
.g-five .g-knob { width: 40px; height: 40px; }
.g-five .g-param-foot .g-param-value { overflow: visible; font-size: 13px; }
/* beside the name, so that a row keeps its height and the rows below stay under the mouse (Giovanni, 2026-11-03) */
.brow .beffect { grid-row: 1; grid-column: 4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; opacity: .6; }
.g-param-name { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; color: var(--muted); flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-param-scene { font-size: 12px; color: var(--faint); }
.g-param-exp { font-size: 10.5px; color: #45f862; }
.g-param-value { font-size: 15px; font-weight: 500; white-space: nowrap; }
.g-param-units { margin-left: 3px; font-size: 12px; color: var(--faint); }
/* a knob as Cortex Control draws it (grid.js knob): the value at the bottom left, the knob at the bottom right */
.g-param-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; min-width: 0; }
.g-param-foot .g-param-value { padding-bottom: 2px; overflow: hidden; text-overflow: ellipsis; }
.g-knob { flex: none; overflow: visible; }
.g-knob-track { fill: none; stroke: #0c0f14; stroke-width: 5; }
.g-knob-arc { fill: none; stroke: var(--colour); stroke-width: 5; }
.g-knob-ptr { stroke: #e6e7e9; stroke-width: 2.4; stroke-linecap: round; }
.g-knob-dot { fill: #3a4558; }
.g-knob-dot.on { fill: var(--colour); }
.g-knob-ghost { fill: none; stroke: var(--ghost); stroke-width: 3; stroke-linecap: round; }
/* the editor writes (grid.js): a knob is dragged up and down (or right and left), or stepped with the arrow keys;
   the cursor says so only during the drag */
.g-param.editable { touch-action: none; user-select: none; }
.g-param.editable:hover { border-color: var(--line-2); }
.g-param.editable:focus-visible { outline: 2px solid var(--mark); outline-offset: 1px; }
.g-param.editable.dragging { border-color: var(--mark); cursor: ns-resize; }
/* a parameter of two ways (grid.js, paramCard): a switch, lit when On; other names one at each side */
.g-toggle { margin-top: auto; align-self: flex-start; max-width: 100%; display: flex; align-items: center; gap: 7px; padding: 3px 0;
  border: 0; background: transparent; color: var(--faint); font-family: inherit; font-size: 12.5px; cursor: pointer; }
.g-toggle:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; border-radius: 6px; }
.g-toggle-track { flex: none; position: relative; width: 38px; height: 22px; border-radius: 11px; background: #0c0f14; border: 1px solid var(--line-2); }
.g-toggle-knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: left .12s, top .12s; }
.g-toggle-track.right .g-toggle-knob { left: 18px; }
.g-toggle-track.still .g-toggle-knob { transition: none; }
.g-toggle-track.lit { background: var(--colour); border-color: var(--colour); }
.g-toggle-track.lit .g-toggle-knob { background: #e6e7e9; }
.g-toggle-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-toggle-name.set { color: var(--text); font-weight: 600; }
/* the names one over the other where side by side they would be cut (grid.js fitToggles): the switch upright */
.g-toggle.stack { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 7px; row-gap: 2px; align-items: center; text-align: left; }
.g-toggle.stack .g-toggle-track { grid-column: 1; grid-row: 1 / span 2; width: 22px; height: 38px; }
.g-toggle.stack .g-toggle-name { grid-column: 2; }
.g-toggle.stack .g-toggle-name:last-child { grid-row: 2; }
.g-toggle.stack .g-toggle-track.right .g-toggle-knob { left: 2px; top: 18px; }
.g-switch { display: flex; gap: 4px; margin-top: auto; }
.g-switch button { flex: 1; height: 28px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent;
  color: var(--muted); font-size: 12.5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-switch button.on { background: var(--line-2); color: var(--text); font-weight: 600; }
.g-select { margin-top: auto; height: 30px; border-radius: 6px; border: 1px solid var(--line-2); background: #10141b;
  color: var(--text); font-family: inherit; font-size: 13.5px; padding: 0 6px; min-width: 0; width: 100%; }
.g-select:focus-visible { outline: 2px solid var(--mark); outline-offset: 1px; }
/* a row's port: the unit's list, with its icons, over the page (grid.js openPortList) */
.g-port-icon { flex: none; width: 25px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.g-port-icon .soft { stroke: #6fa9d6; }
.g-port-icon .solid { fill: currentColor; stroke: none; }
.g-port-icon .pin { fill: var(--raised); stroke: none; }
.g-port-icon text { fill: currentColor; stroke: none; font-size: 11.5px; font-weight: 700; text-anchor: middle; }
.g-port-pick { display: flex; align-items: center; gap: 4px; padding: 0 4px; text-align: left; cursor: pointer; }
.g-port-pick:disabled { cursor: default; }
.g-port-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-port-fed { display: flex; align-items: center; gap: 4px; margin-top: auto; height: 30px; font-size: 13.5px; }
.g-portlist { position: fixed; z-index: 20; width: 250px; max-height: min(430px, calc(100vh - 16px)); overflow-y: auto; padding: 6px;
  border-radius: 10px; background: var(--raised); border: 1px solid #364051; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }
.g-portlist-group { padding: 8px 8px 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.g-portlist-item { width: 100%; min-height: 36px; display: flex; align-items: center; gap: 10px; padding: 4px 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text); font-family: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.g-portlist-item:hover:not(:disabled), .g-portlist-item:focus-visible { background: var(--line-2); outline: none; }
.g-portlist-item:disabled { opacity: 0.45; cursor: default; }
.g-portlist-item.current { color: #7ee2a8; }
.g-portlist-text { display: flex; flex-direction: column; min-width: 0; }
.g-portlist-note { font-size: 12px; color: var(--muted); }
.g-head button.secondary, .g-head button.primary { height: 34px; padding: 0 14px; font-size: 14px; }
.g-param.idle { opacity: 0.42; }
/* a row's input: the gate a group of its own, with its Active / Bypassed (grid.js laneEditor) */
.g-lane-gate { grid-column: span 2; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 8px; }
.g-lane-gate-side { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
/* a row's output: the port's name whole, MUTE and SOLO only a switch; in a narrow pane the port over the rest */
.g-ed-params.g-lane-out { grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)) repeat(2, minmax(0, 0.7fr)); }
.preset-pane.narrow .g-ed-params.g-lane-out { grid-template-columns: repeat(2, minmax(0, 1.3fr)) repeat(2, minmax(0, 0.7fr)); }
.preset-pane.narrow .g-lane-out > :first-child { grid-column: 1 / -1; }
/* a value being typed: the box over the value, which stays hidden and keeps the card's size (grid.js editValue) */
.g-param-value.typing { visibility: hidden; }
.g-type { position: absolute; z-index: 1; box-sizing: border-box; border-radius: 3px; border: 0; outline: 1px solid var(--mark); background: #10141b; color: var(--text);
  padding: 0 3px; user-select: text; }
/* the Graphic-9's faders (grid.js, graphicEq) */
.g-geq { background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 10px; }
.g-geq-faders { position: relative; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
.g-geq-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 1; }
.g-geq-line { fill: none; stroke: var(--colour); stroke-width: 1.5; opacity: .55; }
.g-fader { background: transparent; border: 0; padding: 0; min-height: 0; align-items: center; gap: 6px; }
.g-fader .g-param-value { font-size: 13px; }
.g-fader .g-type { transform: translateX(-50%); text-align: center; }
.g-fader-track { position: relative; width: 6px; height: 150px; border-radius: 3px; background: var(--line-2); }
.g-fader.editable .g-fader-track { touch-action: none; width: 8px; }
.g-fader.dragging .g-fader-track { cursor: ns-resize; }
.g-fader.editable .g-fader-track::before { content: ""; position: absolute; left: -18px; right: -18px; top: -10px; bottom: -10px; }
.g-fader-zero { position: absolute; left: -7px; right: -7px; top: 50%; height: 1px; background: var(--faint); }
.g-fader-fill { position: absolute; left: 0; right: 0; background: var(--colour); border-radius: 3px; opacity: .8; }
.g-fader-knob { position: absolute; left: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: #10141b; border: 2px solid var(--colour); font-size: 10.5px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; color: var(--text); z-index: 2; }
.g-fader.dragging .g-fader-knob, .g-fader:focus-visible .g-fader-knob { border-color: var(--mark); }
/* on paper the circle is the band's tick (.g-pick's colour when set) */
.g-fader-knob.pick { cursor: pointer; }
.g-fader-knob.on { background: #4aa8ff; border-color: #4aa8ff; color: #10141b; }
.g-fader:focus-visible { outline: none; }
.g-fader-name { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.g-param.g-fader.editable { border: 0; }
/* the Parametric's response (grid.js, parametricEq) */
.g-peq { position: relative; height: 200px; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.g-peq-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.g-peq-grid { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.g-peq-zero { stroke: var(--faint); stroke-width: 1; vector-effect: non-scaling-stroke; }
.g-peq-curve { fill: none; stroke: var(--colour); stroke-width: 2; vector-effect: non-scaling-stroke; }
.g-peq-lab { position: absolute; bottom: 4px; transform: translateX(-50%); font-size: 10.5px; color: var(--faint); pointer-events: none; }
.g-peq-lab.y { bottom: auto; left: 6px; transform: translateY(-50%); }
.g-peq-handle { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; z-index: 2;
  background: #10141b; border: 2px solid var(--colour); font-size: 10.5px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; color: var(--text); cursor: grab; touch-action: none; user-select: none; }
.g-peq-handle.off { border-color: var(--faint); color: var(--faint); border-style: dashed; }
.g-peq-handle.dragging { border-color: var(--mark); cursor: grabbing; }
.g-peq-handle.chosen { background: var(--colour); color: #10141b; }
.g-peq-handle.chosen.off { background: #10141b; color: var(--faint); border-color: var(--colour); }
/* the cab (grid.js, cabEditor): one speaker per mic, side by side */
.g-cab { --cab: 190px; display: flex; gap: 22px; flex-wrap: wrap; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.g-cab-panel { display: flex; flex-direction: column; gap: 10px; }
.g-cab-panel.off .g-cab-front { opacity: .55; }
.g-cab-head { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.g-cab-m { font-size: 13px; font-weight: 700; }
.g-cab-model { font-size: 13px; color: var(--muted); }
.g-cab-pick { width: auto; min-width: 140px; margin-top: 0; }
.g-cab-front { position: relative; flex-shrink: 0; width: var(--cab); height: var(--cab); }
.g-cab-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.g-cab-square { fill: none; stroke: var(--line-2); stroke-width: 0.01; stroke-dasharray: 0.04 0.04; }
.g-cab-frame { fill: #151b25; stroke: #3a465c; stroke-width: 0.012; }
.g-cab-cone { fill: #0c1017; stroke: #2c3442; stroke-width: 0.012; }
.g-cab-cap { fill: #1c2330; stroke: #3a465c; stroke-width: 0.012; }
.g-cab-axis { stroke: var(--line-2); stroke-width: 0.008; stroke-dasharray: 0.03 0.03; }
.g-cab-mic { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; z-index: 2;
  background: rgba(16, 20, 27, .85); border: 2px solid var(--colour); font-size: 11px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; color: var(--text); cursor: grab; touch-action: none; user-select: none; }
.g-cab-mic.off { border-style: dashed; border-color: var(--faint); color: var(--faint); }
.g-cab-mic.dragging { border-color: var(--mark); cursor: grabbing; }
.g-cab-strip { position: relative; width: var(--cab); height: 26px; border-top: 2px solid #4a5670; margin-top: 12px; }
.g-cab-strip .g-cab-mic { top: 0; }
.g-cab-grille { position: absolute; left: -9px; top: -13px; width: 6px; height: 24px; border-radius: 3px; background: #6b7891; }
/* the IR loader (grid.js, irEditor) and its picker */
.g-ir { display: flex; flex-direction: column; gap: 8px; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.g-ir-row { display: flex; align-items: center; gap: 12px; }
.g-ir-slot { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; color: var(--muted); min-width: 34px; }
.g-ir-name { font-size: 15px; font-weight: 600; flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-ir-row button.secondary { height: 32px; padding: 0 12px; font-size: 13.5px; }
.ir-list { max-height: 380px; overflow: auto; display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.ir-folder { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; color: var(--faint); margin: 8px 0 2px; text-transform: uppercase; }
.ir-item { text-align: left; padding: 6px 10px; border-radius: 6px; border: 1px solid transparent; background: transparent; cursor: pointer; font-size: 14px; }
.ir-item:hover { background: var(--raised); }
.ir-item.on { border-color: var(--mark); }
/* the Multivoicer's and Minivoicer's pad (grid.js, voicerPad): bars from a floor, as the unit */
.g-pad { display: flex; flex-direction: column; gap: 10px; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.g-pad-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.g-pad-view { min-width: 260px; margin-top: 0; }
.g-pad-area { position: relative; height: 220px; margin: 18px 24px 16px; }
.g-pad-line { position: absolute; left: -12px; right: -12px; border-top: 1px solid var(--line-2); }
.g-pad-floor { position: absolute; left: -12px; right: -12px; bottom: 0; border-top: 2px solid #4a5670; }
.g-pad-lab { position: absolute; bottom: -18px; font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.g-pad-lab.l { left: 0; transform: translateX(-50%); } .g-pad-lab.c { left: 50%; transform: translateX(-50%); }
.g-pad-lab.r { left: 100%; transform: translateX(-50%); }
.g-pad-bar { position: absolute; bottom: 0; width: 14px; margin-left: -7px; border-radius: 3px 3px 0 0; background: #e8c547; }
.g-pad-bar.di { background: #f0a030; }
.g-pad-bar.off { background: var(--line-2); }
.g-pad-voice { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; z-index: 2;
  background: #dfe9f2; color: #1a2230; border: 2px solid #ffffff; font-size: 11.5px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; cursor: grab; touch-action: none; user-select: none; }
.g-pad-voice.di { font-size: 10px; }
.g-pad-voice.off { background: #10141b; color: var(--faint); border: 2px dashed var(--faint); }
.g-pad-voice.dragging { border-color: var(--mark); box-shadow: 0 0 0 3px rgba(232, 244, 255, .25); cursor: grabbing; }
.g-pad-legend { display: flex; gap: 8px; flex-wrap: wrap; }
.g-pad-tag { font-size: 12.5px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text); }
.g-pad-tag.off { color: var(--faint); border-style: dashed; }

/* the testers' measurement (measure.js; BACKLOG I): RUN TEST, in sight in the bar (Giovanni) */
.run-test { height: 32px; padding: 0 14px; margin-right: 6px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; letter-spacing: 0.04em; font-size: 13px;
  white-space: nowrap; flex-shrink: 0; }
.run-test:hover { background: var(--brand-hover); }
/* a newer version (app.js checkUpdate): in sight, quieter than RUN TEST */
.update { height: 32px; padding: 0 14px; margin-right: 2px; border: 1px solid var(--brand); border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--brand); font-weight: 600; font-size: 13px; white-space: nowrap; flex-shrink: 0; }
.update:hover { background: var(--brand); color: var(--brand-ink); }
.run-test:disabled { opacity: 0.45; cursor: default; }
.test-list { margin: 4px 0 8px; padding-left: 20px; color: var(--muted); line-height: 1.5; }
.test-progress { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.test-progress .progress { flex: none; width: 100%; }
.measure-refs { border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.measure-refs th { text-align: left; color: var(--faint); font-weight: 500; padding: 2px 16px 4px 0; }
.measure-refs td { padding: 2px 16px 2px 0; }
.fact.good { color: var(--text); font-weight: 600; }
.test-minutes { display: flex; gap: 6px; margin: 2px 0 2px; }
.test-minutes .seg { height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--raised);
  color: var(--muted); cursor: pointer; font-size: 14px; }
.test-minutes .seg[aria-pressed="true"] { border-color: var(--mark); color: var(--text); font-weight: 600; }

/* Batch edits (batch.js): the search's chips above, the presets on the left, the one shown and the changes on the right */
.batch-main { min-height: 0; }
/* the drawer: what will be changed, always in sight, a row of cells as an inventory (Giovanni, 2026-11-03) */
.batch-drawer { flex: none; display: flex; align-items: stretch; gap: 8px; margin: 10px 16px 0; max-width: calc(794px * var(--gw)); padding: 5px 0 0 5px; border: 1px solid #364051; border-radius: 10px; background: #10141b; }
/* the block's panel under the drawer; the preset below, anchored at the bottom: a place to take blocks from, it never moves when the panel changes */
#batch-pane { overflow: hidden; }
#batch-grid { overflow: auto; }
#batch-grid .g-editor { min-height: 130px; }
.batch-preset { flex: none; margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
/* the scrollbar's room is always kept: nothing moves when the row outgrows the window */
.dr-cells { flex: 1 1 auto; min-width: 0; height: 73px; display: flex; gap: 6px; padding: 3px 3px 0; overflow-x: auto; overflow-y: hidden; }
.dr-edge { flex: none; display: flex; gap: 6px; padding-top: 3px; }
.dr-cell, .dr-empty { flex: 0 1 72px; min-width: 50px; height: 60px; border-radius: 10px; }
.dr-cell.port, .dr-empty.port { flex: none; width: 64px; }
.dr-cell.tempo, .dr-empty.tempo { flex: none; width: 46px; min-width: 0; }
.dr-cell.tempo .dr-text { display: none; }
.dr-empty.tempo, .dr-empty.port { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 10.5px; }
.dr-empty.tempo svg:not(.g-port-icon) { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dr-empty .g-port-icon { width: 22px; height: 18px; }
.dr-cell { position: relative; border: 2px solid var(--colour); background: var(--raised); }
.dr-cell.set .dr-name { color: var(--ghost); }
.dr-cell.on { outline: 2px solid var(--mark); outline-offset: 1px; }
/* its symbol above its name, as a block on the grid is narrow */
/* the top line is the count's and the X's, in every cell, so that nothing lies under them and nothing moves when the count comes */
.dr-go { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; padding: 11px 3px 0; border: 0; background: transparent; color: var(--text); text-align: center; cursor: pointer; font: inherit; }
.dr-go svg { flex: none; width: 20px; height: 20px; }
.dr-go svg.g-port-icon { width: 22px; height: 18px; margin-block: 1px; }
.dr-go svg:not(.g-port-icon) { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dr-text { min-width: 0; max-width: 100%; display: flex; flex-direction: column; }
.dr-name { font-size: 10.5px; line-height: 1.1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dr-cell.holds .dr-name { -webkit-line-clamp: 1; }
.dr-sub { font-size: 9.5px; line-height: 1.15; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-count { position: absolute; left: 4px; top: 1px; font-size: 10.5px; font-weight: 600; color: var(--ghost); }
.dr-cell .chip-x { position: absolute; top: 1px; right: 1px; width: 16px; height: 16px; display: none; align-items: center; justify-content: center; padding: 0; font-size: 12px; line-height: 1; background: #313a4a; color: var(--text); }
.dr-cell:hover .chip-x, .dr-cell.on .chip-x { display: flex; }
.dr-empty { padding: 0; border: 2px dashed #2b3444; background: transparent; color: var(--faint); font-size: 20px; cursor: pointer; }
.dr-empty:hover { border-color: #5d6b84; color: var(--text); }
/* the broom is the drawer's end, from its top to its bottom, not a button on it */
.dr-clear { flex: none; width: 44px; margin-top: -5px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-left: 1px solid #364051; border-radius: 0 9px 9px 0; background: #161b24; color: var(--text); cursor: pointer; }
.dr-clear:hover:not(:disabled) { background: #232c3a; }
.dr-clear:disabled { color: var(--faint); background: transparent; cursor: default; }
.dr-clear svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dr-ghost { position: fixed; z-index: 60; margin: 0; pointer-events: none; opacity: 0.9; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); transition: none; }
.dr-menu { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 10px; height: min(60vh, 460px); min-width: 0; }
.dr-menu-col { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
.dr-go-row { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.dr-go-row:hover, .dr-go-row.on { background: #1d2737; }
.dr-go-row:disabled { opacity: 0.4; cursor: default; background: transparent; }
/* a model and, at its right, the symbol of its block presets, as on the unit */
.dr-item { flex: none; display: flex; align-items: center; gap: 4px; }
.dr-item .dr-go-row { flex: 1 1 auto; min-width: 0; }
.dr-stack { flex: none; width: 32px; height: 28px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 7px; background: #1a2230; color: var(--muted); cursor: pointer; }
.dr-stack:hover { background: #2a3546; color: var(--text); }
.dr-stack svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dr-stack svg .top { fill: currentColor; }
/* Pin to top: under the mouse, or always when pinned (green, as Cortex Control's) */
.dr-pin { flex: none; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; opacity: 0; }
.dr-item:hover .dr-pin, .dr-pin:focus-visible { opacity: 1; }
.dr-pin:hover { background: #2a3546; color: var(--text); }
.dr-pin.on { opacity: 1; color: #45f862; }
.lib-row .pin { display: inline-flex; margin-left: 6px; color: #45f862; vertical-align: -2px; }
.dr-menu-head { flex: none; padding: 10px 8px 4px; }
.dr-menu-note { padding: 8px; margin: 0; }
.dr-back { font-weight: 600; }
.dr-find { flex: none; height: 34px; margin-bottom: 6px; padding: 0 10px; border: 1px solid #364051; border-radius: 8px; background: #10141b; color: var(--text); font: inherit; font-size: 14px; user-select: text; }
.dr-find:focus { outline: 2px solid var(--mark); outline-offset: 1px; }
.dr-menu-list { display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.dr-menu-col .count { flex: none; color: var(--muted); font-size: 12px; }
.dr-menu-name { min-width: 0; display: flex; align-items: center; gap: 9px; }
/* a category as the unit's menu draws it: its symbol in a box of its colour */
.dr-menu-icon { flex: none; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--colour, #5d6b84); border-radius: 7px; }
.dr-menu-icon svg { width: 18px; height: 18px; }
.dr-menu-icon svg:not(.g-port-icon) { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dr-menu-col .any { font-weight: 600; }
.batch-reached { font-weight: 600; }
.batch-search {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  flex: none; margin: 10px 20px 4px 28px; padding: 6px 8px; min-height: 46px; border: 1px solid #364051; border-radius: 8px; background: #10141b;
}
.batch-search:focus-within { outline: 2px solid var(--mark); outline-offset: 1px; }
.batch-input { flex: 1 1 200px; min-width: 120px; height: 32px; border: 0; background: transparent; color: var(--text); font-family: inherit; font-size: 15px; user-select: text; }
.batch-input:focus { outline: none; }
.chips { display: contents; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 4px 0 10px; border-radius: 15px;
  background: var(--raised); border: 1px solid var(--line-2); font-size: 14px; font-weight: 600;
}
.chip-x { width: 24px; height: 24px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.chip-x:hover { background: #313a4a; color: var(--text); }
.sugg {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 100%; width: 460px; max-height: 320px; overflow-y: auto;
  padding: 4px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--side); box-shadow: 0 10px 30px #0008;
}
.sugg[hidden] { display: none; }
.sugg-item { display: flex; width: 100%; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; font-size: 14px; }
.sugg-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg-item .count { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.sugg-item.on, .sugg-item:hover { background: #252f40; }
.batch-split { flex: 1 1 auto; min-height: 0; display: flex; }
.batch-left { flex: 0 0 var(--batch-list, 320px); min-width: 0; display: flex; flex-direction: column; }
.batch-list-wrap { flex: 1 1 auto; min-height: 0; min-width: 0; padding-top: 4px; }
/* the line between the list and the preset, dragged: over the preset's left border, wider than it to the mouse */
.batch-drag { flex: 0 0 9px; margin: 0 -5px 0 -4px; position: relative; z-index: 6; cursor: col-resize; touch-action: none; }
.batch-drag:hover, .batch-drag:focus-visible, .batch-drag.dragging { background: linear-gradient(to right, transparent 3px, var(--mark) 3px, var(--mark) 6px, transparent 6px); outline: none; }
.batch-list { display: flex; flex-direction: column; gap: 2px; }
.bhead { display: flex; align-items: center; gap: 10px; padding: 10px 2px 8px; }
.bhead .bar-text { flex: 1; }
.bgroup { padding: 12px 2px 4px; font-size: 12px; }
.brow {
  display: grid; grid-template-columns: 18px 30px minmax(0, 1fr) fit-content(30%); align-items: center; gap: 10px;
  min-height: 40px; padding: 0 10px; border-radius: 8px; background: #151b25; cursor: pointer;
}
.brow:hover { background: #18202c; }
.brow.chosen { background: #1d2737; box-shadow: inset 0 0 0 1px #3a4a63; }
.brow.shown { outline: 2px solid var(--mark); outline-offset: -2px; }
.brow input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.brow .pos { color: var(--faint); font-size: 14px; }
.brow .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bfound { grid-column: 3 / -1; display: flex; gap: 4px; flex-wrap: wrap; padding-bottom: 8px; }
.bchip { height: 24px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 12px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.bchip:hover { color: var(--text); border-color: var(--mark); }
.setlist-buttons button.has-chosen .count { color: var(--text); font-weight: 600; }
/* on the right the preset shown, in the editor's own pane (.preset-pane; grid.js fit) */
.batch-preview { border-left: 1px solid var(--line); }
/* on paper the tick at the card's corner; under it the value and the knob, "was" over the value: the knob stays put */
.preset-pane .g-param:has(.g-pick) > .g-param-top { grid-column: 1 / -1; }
.preset-pane .g-param:has(.g-pick) .g-knob { grid-row: 2 / span 2; }
.preset-pane .g-param:has(.g-pick) .g-param-was { grid-row: 2; }
.preset-pane .g-param:has(.g-pick) .g-param-value { grid-row: 3; }
/* the metronome beside the scenes */
.g-tool { flex: none; width: 40px; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--side); color: var(--muted); cursor: pointer; }
.g-tool svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.g-tool.on { color: var(--mark); border-color: var(--mark); }
/* All Params, at the far end of the foot */
.g-all { margin-left: auto; display: flex; align-items: center; gap: 6px; padding: 2px 4px; border: 0; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; }
.g-all .g-pick { margin-left: 0; display: block; }
/* before a preset is shown */
.batch-hint { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; }
.batch-hint strong { font-size: 16px; }
.batch-hint ol { margin: 0; padding-left: 20px; color: var(--muted); }
.batch-hint li { margin: 3px 0; }
.g-scene .dflt { font-size: 10.5px; color: var(--faint); }
.g-block.found { outline: 2px dashed var(--mark); outline-offset: 3px; }
/* what can be written, light blue as a change on paper: the blocks a change reaches, ticked or not; a preset ticked; the plan's lines */
.brow .beffect.reach { color: var(--ghost); opacity: 1; }
.g-block.writes { outline: 2px solid var(--ghost); outline-offset: 3px; }
.g-port.writes path { stroke: var(--ghost); stroke-width: 2; stroke-dasharray: none; }
.g-tool.writes { color: var(--ghost); border-color: var(--ghost); }
.brow.writes .name, .bchip.writes, .plan-preset:not(.none) .plan-name, .plan-what p.plan-writes { color: var(--ghost); }
.g-ed-foot { display: flex; align-items: center; gap: 8px; }
/* the buttons at the grid's right edge, however wide the window (the list 320 + its border + the pane's 16 + the grid 794) */
#batch-bar { padding-right: max(20px, calc(100% - 811px - var(--batch-list, 320px))); }
#batch-pane .grid-content { padding-top: 10px; }
.batch-offline { color: var(--attention-ink); }
/* a change on paper (grid.js placeGhost): the arc the knob moved, light blue (.g-knob-ghost), and what it was */
.g-param.changed { border-color: var(--ghost-line); }
.g-param-was { font-size: 11px; color: var(--ghost); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* at the panel's foot, scrolled with it */
.batch-ops { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.batch-ops > p { margin: 0; }
.change-what { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.change-list { display: flex; flex-direction: column; gap: 2px; align-self: stretch; }
.change-row { display: grid; grid-template-columns: minmax(0, 160px) auto auto; justify-content: start; align-items: center; gap: 8px; min-height: 30px; }
.change-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.change-to { color: var(--ghost); }
.batch-ops .check { margin-top: 0; font-size: 13px; }
.plan { max-height: min(56vh, 520px); overflow-y: auto; padding: 4px 2px; }
.plan-problems { margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--attention-line); border-radius: 8px; background: var(--attention-bg); }
.plan-problems strong { color: var(--attention-ink); }
.plan-problems p { margin: 4px 0 0; font-size: 14px; }
.plan-setlist { margin: 12px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.plan-preset { display: grid; grid-template-columns: 40px minmax(0, 180px) minmax(0, 1fr); gap: 10px; padding: 6px 4px; border-top: 1px solid var(--line); }
.plan-preset.none { opacity: 0.6; }
.plan-pos { color: var(--faint); font-size: 13px; }
.plan-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-what p { margin: 0 0 2px; font-size: 14px; }
.example-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; }
.example-list .check { margin-top: 0; padding: 6px 4px; color: var(--text); }
.example-list .pname { flex: 0 0 160px; font-weight: 600; }
.example-list .pval { color: var(--muted); font-family: var(--mono); font-size: 13px; }

/* TAP beside the Tempo's name; a choice among few, a value with its label, in a window */
.g-tap { margin-left: auto; min-width: 72px; font-weight: 700; letter-spacing: .06em; }
.g-tap:active { background: var(--mark); color: #0b0e13; }
.g-choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.g-choices button.on { border-color: var(--mark); color: var(--mark); }
.g-range-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 14px; }
.g-range-row > span:first-child { flex: none; width: 112px; }
.g-range-row .text-input { width: 80px; }
.g-range-row .g-range { flex: 1; min-width: 0; }

/* the tuner */
.g-tuner-note { font-size: 64px; font-weight: 700; text-align: center; line-height: 1.1; min-height: 72px; }
.g-tuner-note.faint { opacity: .25; }
.g-tuner-hz { text-align: center; font-size: 14px; opacity: .8; min-height: 20px; }
.g-tuner-scale { position: relative; height: 26px; margin: 12px 0; border-radius: 6px; background: var(--raised); }
.g-tuner-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--faint); }
.g-tuner-bar { position: absolute; left: 50%; top: 3px; bottom: 3px; width: 6px; margin-left: -3px; border-radius: 3px; background: #e8ecf2; transition: left 60ms linear; }
.g-tuner-bar.on { background: #4fc3f7; }
/* in tune: the needle and the note light blue; the square is the tolerance (grid.js TUNER_TOLERANCE) */
.g-tuner-note.in { color: #4fc3f7; }
.g-tuner-square { position: absolute; left: 50%; top: 4px; bottom: 4px; min-width: 14px; transform: translateX(-50%); border: 1.5px solid var(--muted); border-radius: 3px; }
.g-tuner-square.on { border-color: #4fc3f7; background: rgba(79, 195, 247, .18); }
.g-tuner-cents { text-align: center; font-size: 15px; min-height: 20px; }
.g-tuner-mute { width: 150px; height: auto; min-height: 0; gap: 10px; }
.g-tuner-cards { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.g-tuner-input { width: 100%; }
.g-tuner-refrow { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.g-tuner-ref { font-size: 15px; font-weight: 500; cursor: text; border-radius: 3px; }
.g-tuner-ref.typing { visibility: hidden; }
.g-tuner-step { width: 28px; height: 26px; padding: 0; border-radius: 6px; background: var(--raised); border: 1px solid var(--line-2); color: var(--text); font-size: 16px; cursor: pointer; }
.g-tuner-step:disabled { opacity: .4; cursor: default; }
/* Looper X, as the unit's page (grid.js looperPanel): its screen with the state, a lane for what is written above the loop's
   lane, as Cortex Control draws them; the actions on the footswitches with their names, as the manuals' pages */
.g-looper { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; --loop-red: #f2283c; --loop-blue: #1d6fe0; --loop-gold: #ffc53d; }
.g-loop-bar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.g-loop-lock { width: 34px; height: 26px; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 6px; background: var(--raised); border: 1px solid var(--line-2); color: var(--muted); cursor: pointer; }
.g-loop-lock svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-loop-lock.on { color: var(--text); border-color: var(--mark); }
.g-loop-screen { display: flex; align-items: stretch; min-height: 66px; background: #0b0e13; border: 1px solid #05070a; border-radius: 8px; overflow: hidden; }
.g-loop-state, .g-loop-side { flex: none; width: 108px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; text-align: center; }
.g-loop-side { width: 76px; }
.g-loop-word { font-size: 11.5px; letter-spacing: .04em; }
.g-loop-word.red { color: var(--loop-red); }
.g-loop-side-name { font-size: 11px; letter-spacing: .04em; color: var(--muted); }
.g-loop-lanes { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 8px 6px; border-left: 1px solid #1b2029; border-right: 1px solid #1b2029; }
.g-loop-lane { position: relative; height: 16px; }
.g-loop-seg { position: absolute; top: 0; bottom: 0; min-width: 2px; box-sizing: border-box; }
.g-loop-seg.red { background: var(--loop-red); }
.g-loop-seg.white { background: #f2f4f7; }
.g-loop-seg.framed { border: 2px solid var(--loop-red); }
.g-loop-seg.hatch { background: repeating-linear-gradient(135deg, #6a707a 0 2.5px, #1d2128 2.5px 6px); border: 2px solid var(--loop-red); }
.g-loop-pads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.g-loop-pad { position: relative; height: 66px; min-width: 0; border-radius: 8px; background: var(--raised); border: 1px solid var(--line-2); color: var(--text); padding: 0; user-select: none; touch-action: none; cursor: pointer; }
.g-loop-name { position: absolute; left: 8px; top: 6px; font-size: 10.5px; letter-spacing: .04em; white-space: nowrap; }
.g-loop-key { position: absolute; right: 8px; top: 3px; font-size: 19px; }
.g-loop-icon { position: absolute; left: 0; right: 0; top: 22px; bottom: 6px; display: flex; align-items: center; justify-content: center; }
.g-loop-icon.red { color: var(--loop-red); }
.g-loop-icon.gold { color: var(--loop-gold); }
.g-loop-icon.flip svg { transform: scaleX(-1); }
.g-loop-pad svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.g-loop-pad svg .solid { fill: currentColor; stroke: none; }
.g-loop-pad svg .knock { stroke: rgba(0, 0, 0, .6); stroke-width: 1.6; }
.g-loop-dup { display: flex; align-items: center; gap: 2px; }
.g-loop-dup svg .knock { stroke: #fff; stroke-width: 2.4; }
.g-loop-count { font-size: 20px; font-weight: 800; color: var(--loop-red); }
.g-loop-half { font-size: 21px; font-weight: 800; }
.g-loop-pad.red { background: var(--loop-red); border-color: var(--loop-red); }
.g-loop-pad.red .g-loop-icon { color: #fff; }
.g-loop-pad.blue { background: var(--loop-blue); border-color: var(--loop-blue); }
.g-loop-pad.grey { background: #3a404b; }
.g-loop-pad.dim > * { opacity: .32; }
.g-loop-pad.down { transform: translateY(1px); filter: brightness(1.25); }
/* the Mini: its two pages side by side, each as the unit, A and B over C and D (grid.js looperPanel) */
.g-loop-pages { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.g-loop-page-name { font-size: 12px; color: var(--muted); letter-spacing: .06em; margin: 0 0 4px 2px; }
.g-loop-four { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
/* arranging: the actions are moved, not pressed */
.g-looper.arranging .g-loop-pad { border-style: dashed; cursor: grab; }
.g-loop-pad.lifted { opacity: .5; cursor: grabbing; }
.g-loop-pad.drop { border-color: var(--mark); box-shadow: inset 0 0 0 2px var(--mark); }
/* the Mini: its switch's name above, the action's under, as its own screen */
.mini .g-loop-key { left: 0; right: 0; top: 4px; text-align: center; font-size: 14px; color: var(--muted); }
.mini .g-loop-name { left: 0; right: 0; top: auto; bottom: 6px; text-align: center; }
.mini .g-loop-icon { top: 20px; bottom: 22px; }
.mini .g-loop-pad { height: 74px; }

/* the preset's MIDI Out */
.g-tool-word { width: auto; padding: 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
/* the sources as the unit draws them (grid.js midiUnit): the device, its screen for "on preset load", the pedals */
.g-midi-unit { display: flex; align-items: flex-end; gap: 14px; margin: 10px 0 4px; }
.g-midi-left { display: flex; flex-direction: column; gap: 6px; flex: 0 1 300px; min-width: 0; }
.g-midi-pages { display: flex; gap: 4px; align-self: flex-end; }
.g-midi-pages button { min-width: 34px; height: 26px; border-radius: 6px; background: var(--raised); border: 1px solid var(--line-2); color: var(--muted); font-size: 12px; cursor: pointer; }
.g-midi-pages button.on { color: var(--text); border-color: var(--mark); }
.g-midi-dev { background: var(--raised); border: 1px solid var(--line-2); border-radius: 12px; padding: 8px; }
.mini .g-midi-dev { display: grid; grid-template-columns: 46px 1fr 46px; grid-template-rows: 54px 54px; gap: 6px; }
.mini .g-midi-fs.a { grid-column: 1; grid-row: 1; }
.mini .g-midi-fs.b { grid-column: 3; grid-row: 1; }
.mini .g-midi-fs.c { grid-column: 1; grid-row: 2; flex-direction: column-reverse; }
.mini .g-midi-fs.d { grid-column: 3; grid-row: 2; flex-direction: column-reverse; }
.mini .g-midi-screen { grid-column: 2; grid-row: 1 / span 2; }
.full .g-midi-dev { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 52px 36px 36px; gap: 4px 6px; }
.full .g-midi-screen { grid-column: 2 / span 2; grid-row: 1; }
.full .g-midi-fs { flex-direction: row; justify-content: flex-start; padding-left: 8px; }
.g-midi-fs { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0; background: none; border: 1px solid transparent; border-radius: 8px; color: var(--text); font-size: 12px; cursor: pointer; }
.g-midi-fs:hover, .g-midi-pedal:hover, .g-midi-screen:hover { border-color: var(--line-2); }
.g-midi-fs.on { border-color: var(--mark); }
.g-midi-fs.on .g-midi-fs-name { color: var(--mark); font-weight: 600; }
.g-midi-dot { width: 16px; height: 16px; flex: none; border-radius: 50%; background: #0b0e13; border: 2px solid var(--line-2); }
.g-midi-fs.used .g-midi-dot { background: var(--mark); border-color: var(--mark); }
.g-midi-screen { background: #0b0e13; border: 2px solid #05070a; border-radius: 8px; color: var(--muted); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.g-midi-screen.on { border-color: var(--mark); color: var(--text); }
.g-midi-screen.used { box-shadow: inset 0 -3px 0 var(--mark); }
.g-midi-pedals { display: flex; gap: 8px; }
.g-midi-pedal { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px 4px 4px; background: none; border: 1px solid transparent; border-radius: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; cursor: pointer; }
.g-midi-pedal.on { border-color: var(--mark); color: var(--mark); }
.g-midi-pedal.used .g-midi-pedal-name { box-shadow: inset 0 -2px 0 var(--mark); }
.g-midi-pedal-body { width: 40px; height: 84px; border-radius: 10px 10px 8px 8px; border: 2px solid var(--line-2);
  background: repeating-linear-gradient(to bottom, #3a4352 0 2px, transparent 2px 6px) center 10px / 60% 26px no-repeat,
              repeating-linear-gradient(to bottom, #3a4352 0 2px, transparent 2px 6px) center bottom 8px / 60% 20px no-repeat, #0b0e13; }
.g-midi-pedal.on .g-midi-pedal-body { border-color: var(--mark); }
.g-midi-title { margin: 8px 0; font-size: 13px; font-weight: 600; }
.g-midi-rows { display: flex; flex-direction: column; gap: 8px; }
.g-midi-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.g-midi-row.g-midi-page { margin-top: 10px; }
.g-midi-k { width: 18px; height: 34px; line-height: 34px; text-align: right; }
.g-midi-field { display: flex; flex-direction: column; gap: 3px; }
.g-midi-num { width: 84px; height: 34px; margin: 0; }

/* -- the unit's I/O and its settings (unit.js; APP-DESIGN, "The unit's I/O and its settings") -- */
.io-button { width: 30px; height: 30px; margin-right: 2px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 9.5px; font-weight: 700; letter-spacing: .02em; }
.modal.io { width: 940px; }
.modal.io h2 { display: flex; align-items: center; gap: 14px; }
.u-head { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.u-port-name { color: var(--brand); font-size: 18px; font-weight: 600; }
.u-eq { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.u-eq .g-toggle, .u-row .g-toggle { margin-top: 0; align-self: center; }
.u-panel { display: block; width: 100%; height: auto; margin: 4px 0 12px; background: #0c0f14; border: 1px solid var(--line); border-radius: 10px; }
.u-port { cursor: pointer; outline: none; }
.u-port.none { cursor: default; opacity: .4; }
.u-body { fill: #1c2330; stroke: #3a4558; stroke-width: 2; }
.u-ring { fill: #10141b; stroke: #2a3445; stroke-width: 1.5; }
.u-hole { fill: #05070a; stroke: none; }
.u-icon { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.u-label { fill: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; font-family: 'Barlow', system-ui, sans-serif; }
.u-port:not(.none):hover .u-body, .u-port:focus-visible .u-body { stroke: var(--mark); }
.u-port.on .u-body { stroke: var(--brand); stroke-width: 3; filter: drop-shadow(0 0 5px var(--brand)); }
.u-port.on .u-label { fill: var(--text); }
.u-port.on .u-icon { stroke: var(--text); }
.u-divider { stroke: var(--line-2); stroke-width: 1.5; }
.u-hit { fill: transparent; }
.u-link { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.u-chain:not(.none):hover .u-link, .u-chain:focus-visible .u-link { stroke: var(--mark); }
.u-cards { display: flex; flex-direction: column; gap: 10px; min-height: 212px; }   /* two lines: the window keeps its size from port to port */
.u-cards-row { display: flex; gap: 10px; }
.u-cards-row .g-param { width: 172px; }
.u-cards-row .g-param .g-knob { width: 46px; height: 46px; }
.u-io .fact.bad, .u-settings .fact.bad { margin: 10px 0 0; color: var(--attention); font-weight: 600; font-size: 14px; }
.modal.unit { width: 780px; }
.u-settings { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 20px; min-height: 400px; }
.u-nav { display: flex; flex-direction: column; gap: 1px; padding-right: 12px; border-right: 1px solid var(--line); max-height: 62vh; overflow-y: auto; }
.u-nav button { flex: none; text-align: left; height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.u-nav button:hover { background: #1c2330; color: var(--text); }
.u-nav button[aria-current="true"] { background: var(--raised); color: var(--text); font-weight: 600; }
.u-side > .label { display: block; margin: 6px 0 12px; }
.u-page { display: flex; flex-direction: column; gap: 4px; }
.u-page .fact { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.u-page .field-label { margin-top: 14px; }
.u-row { display: flex; align-items: center; gap: 14px; min-height: 40px; }
.u-row-name { flex: 1; min-width: 0; font-size: 14.5px; }
.u-row .g-select { margin-top: 0; width: 170px; }
.u-row-value { min-width: 64px; text-align: right; color: var(--muted); font-size: 13.5px; }
.u-range { width: 240px; accent-color: var(--brand); }
.u-radios { display: flex; flex-direction: column; gap: 6px; }
.u-radio { text-align: left; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.u-radio:hover:not(:disabled) { color: var(--text); }
.u-radio[aria-pressed="true"] { border-color: var(--brand); color: var(--text); background: var(--raised); }
.u-seg { align-self: flex-start; }
.u-seg button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.u-seg button[aria-pressed="true"] { background: var(--mark); color: var(--brand-ink); font-weight: 600; }
/* Modes: the places the footswitches go through, as Cortex Control's Modes Configuration (its icons; a hybrid's two
   modes one over the other, each with its row's dot, and the unit's switches drawn in those colours) */
.u-modes-wrap { display: flex; flex-direction: column; gap: 12px; }
.u-modes { display: flex; align-items: stretch; flex-wrap: wrap; }
.u-mode { display: flex; align-items: center; gap: 10px; min-width: 132px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); cursor: grab; user-select: none; touch-action: none; }
.u-mode.active { border-color: var(--mark); }
.u-mode.over { outline: 2px solid var(--mark); outline-offset: 2px; }
.u-mode.dragging, .u-mode-add.dragging { opacity: 0.4; }
.u-mode-names { display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.u-mode-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.u-mode-name svg, .u-mode-add svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.u-mode-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; }
.u-mode-tools { display: flex; flex-direction: column; gap: 2px; }
.u-mode-tools button { height: 22px; min-width: 22px; padding: 0 4px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.u-mode-tools button:hover:not(:disabled) { background: var(--line); color: var(--text); }
.u-mode-gap { width: 12px; border-radius: 3px; }
.u-mode-gap.over { background: var(--mark); }
.u-modes-spare { display: flex; gap: 8px; flex-wrap: wrap; }
.u-mode-add { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px dashed var(--line-2); border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; cursor: grab; user-select: none; touch-action: none; }
.u-mode-add:hover:not(:disabled) { color: var(--text); border-color: var(--muted); }
.u-plus { font-size: 16px; font-weight: 500; }
.u-modes-foot { display: flex; align-items: center; gap: 14px; }
.u-modes-foot .fact { margin: 0; }
.u-mode-unit { flex: none; color: var(--faint); }
/* the editor's MODE indicator: the mode in use, a hybrid's two one over the other */
.g-mode .g-mode-two { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.u-store .u-bar { flex: 2; height: 8px; border-radius: 4px; background: #0c0f14; overflow: hidden; }
.u-store .u-bar span { display: block; height: 100%; background: var(--brand); }
.u-exp-hint { font-size: 12.5px; color: var(--attention-ink); line-height: 1.3; }
.u-exp-button { margin-top: auto; height: 32px; padding: 0 14px; align-self: flex-start; }
/* "Global EQ" opens its editor: a tab of the window, underlined while open (Giovanni, 2026-11-09) */
.u-eq-name { height: 32px; padding: 0 4px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent;
  color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.u-eq-name:hover { color: var(--text); }
.u-eq-name.on { color: var(--text); border-bottom-color: var(--mark); }
.u-eqed-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
/* a presets button or the port's name left out: their own display would keep them */
.u-eq-presets[hidden], .g-ed-presets[hidden], .u-port-name[hidden] { display: none; }
.u-eq-none { color: var(--attention); font-weight: 600; font-size: 13px; }
.u-eq-none[hidden] { display: none; }
.u-eqed { display: flex; flex-direction: column; gap: 12px; }
.u-eq-graph { height: 190px; }
.u-eq-graph.off .g-peq-curve { stroke: var(--faint); }
.g-param-note { flex: none; font-size: 11.5px; font-weight: 600; color: var(--text); }
/* block presets and the Global EQ's (presets.js): a panel by its button, as Cortex Control's list */
.pp {
  position: fixed; z-index: 19; width: 330px; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px;
  background: #1c2330; border: 1px solid #364051; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.pp:focus { outline: none; }
.pp-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pp-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-tabs button { height: 28px; padding: 0 10px; font-size: 13px; }
.pp-list { flex: 1 1 auto; min-height: 60px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.pp-item { flex: none; display: flex; align-items: center; gap: 2px; }
.pp-row {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; padding: 4px 8px;
  border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
}
.pp-row:hover:not(:disabled) { background: #263042; }
.pp-row:disabled { cursor: default; }
.pp-row.on { background: #2b3a52; font-weight: 600; }
.pp-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-tag { flex: none; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.pp-more { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.pp-more:hover, .pp-more[aria-expanded] { background: #263042; color: var(--text); }
.pp-msg { margin: 4px 8px; }
.pp .fact.bad { color: var(--attention); font-weight: 600; font-size: 13px; }
.pp-foot { flex: none; display: flex; justify-content: flex-end; }
.pp-form { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 8px; background: #161c27; }
.pp-form-title { font-size: 13.5px; font-weight: 600; }
.pp-form-text { margin: 0; font-size: 13px; color: var(--muted); }
.pp-input { height: 36px; padding: 0 10px; border: 1px solid #364051; border-radius: 8px; background: #10141b; color: var(--text); font: inherit; font-size: 14px; user-select: text; }
.pp-input:focus { outline: 2px solid var(--mark); outline-offset: 1px; }
.pp-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.pp-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.pp-form-actions button.small { height: 32px; }
/* the button that opens them: in the editor's head, before the block's name; in the Global EQ's, by its name */
.g-ed-presets, .u-eq-presets {
  flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--line-2); border-radius: 8px; background: #1a2230; color: var(--muted); cursor: pointer;
}
.g-ed-presets:hover, .u-eq-presets:hover, .g-ed-presets[aria-expanded], .u-eq-presets[aria-expanded] { color: var(--text); border-color: #53627d; }
.g-ed-presets svg, .u-eq-presets svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-ed-presets svg .top, .u-eq-presets svg .top { fill: currentColor; }
.u-eq-presets { width: 30px; height: 28px; }
