@font-face {
  font-family: "condensed";
  src: url("../fonts/InterstateRegularCondense.otf");
}

* {
  font-family: 'condensed';
}

/* Design language: spacing scale and shared layout (see DESIGN.md) */
:root {
  /* Every slider is this wide (but a voice's Volume and Pitch on the grid, in its row's columns) */
  --slider-w: 80px;
  --space-xs: 4px;
  --space-s: 8px;
  --space-m: 16px;
  --space-l: 24px;
  /* Controls: space either side of the text inside, and two fixed widths, so rows
     line up in columns. Two narrow controls side by side are as wide as a wide one. */
  --control-pad-x: 10px;
  --control-w: 92px;
  --control-w2: calc(2 * var(--control-w) + var(--space-s));
  --device-write-width: var(--control-w2);
  --storage-width: var(--control-w);
  --lead-label-w: 72px;
  /* The logotype, in the tab bar */
  --logo-h: 20px;
  --logo-w: calc(var(--logo-h) * 257 / 32);
  /* A row of controls is as tall as a button; text and sliders in it don't make it taller */
  --row-h: 21px;
  /* Space between stacked rows of controls: a little more than between controls in a row */
  --row-gap: calc(var(--space-s) + var(--space-xs));
  /* Pattern grid: the voice controls' column, and the gap between cells */
  --seq-label-col: 234px;
  --seq-cell-gap: 3px;
  /* Type: page text (labels, headings, help) and small text (notes, status, legends,
     values, and panels dense with sliders). Controls keep the browser's size. */
  --text: 16px;
  --text-small: 12px;
  --text-muted: rgb(150, 150, 150);
  /* A panel's border and padding: things outside it that line up with its contents
     are indented this much */
  --panel-inset: calc(var(--space-s) + 1px);
}

/* Small text: notes, status messages, legends, values */
.note { font-size: var(--text-small); color: var(--text-muted); }
/* The footer: small text, spaced apart, no separators */
.footer { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-m); }

/* Fixed-width controls: .ctl-1 narrow, .ctl-2 wide (see DESIGN.md) */
.ctl-1 { width: var(--control-w); }
.ctl-2 { width: var(--control-w2); }
input.ctl-1, input.ctl-2, select.ctl-1, select.ctl-2 { box-sizing: border-box; }

body {
  margin: var(--space-s);
}

.toolbar {
  display: flex;
  min-height: var(--row-h);
  line-height: 1;
  /* Everything on a row is centered vertically: controls, their labels, other text */
  align-items: center;
  flex-wrap: wrap;
  column-gap: var(--space-m);
  row-gap: var(--row-gap);
}

/* A toolbar with several jobs: more space between its groups, so they read apart */
.toolbar-spaced { column-gap: var(--space-l); }

/* Sliders' own margins would make a row taller than its buttons, and move them off
   their column */
.toolbar input[type="range"] { margin: 0; }

/* One width for every slider */
input[type="range"]:not(.seq-vol-sl):not(.seq-pitch-sl) { width: var(--slider-w); box-sizing: border-box; }

.toolbar-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-s);
}

/* Groups stacked in one column, left-aligned: a row of controls with a button under it */
.toolbar-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--row-gap);
}

.toolbar-end {
  margin-left: auto;
  justify-content: flex-end;
}

.field {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  white-space: nowrap;
}

/* The label of a field that lines up with fields in the rows above and below:
   a fixed width with the text set right, so the control boxes' left edges align */
.lead-label {
  display: inline-block;
  width: var(--lead-label-w);
  text-align: right;
}

/* Red buttons that write to the Luma: same width, set apart from the controls before them */
.device_write {
  width: var(--device-write-width);
  margin-left: calc(var(--space-m) - var(--space-s));
}

/* Headings, one style everywhere: page-text size, Title Case */
.section-heading {
  font-size: var(--text);
  font-weight: normal;
  margin: 0 0 var(--space-s);
}

.section-rule {
  border: none;
  border-top: 1px solid rgb(190, 190, 190);
  margin: var(--space-m) 0;
}

/* A heading right after a rule hangs just under it */
.section-rule + .section-heading {
  margin-top: calc(var(--space-xs) - var(--space-m));
}

/* A box around a workspace (the pattern grid, a list of slots, a form) */
.panel {
  background: rgb(20, 20, 20);
  border: 1px solid rgb(51, 51, 51);
  border-radius: 3px;
  padding: var(--space-s);
}
.panel + .panel { margin-top: var(--space-s); }
.panel > .section-heading { margin-top: 0; }

/* No two-finger swipe back or forward a page: it lost work */
html, body { overscroll-behavior-x: none; }

body,
html {
  background-color: rgb(24, 24, 24);
  color: rgb(190, 190, 190);
  height: 100%;
}
/* As tall as its content, so the tab bar stays stuck all the way down */
body { height: auto; min-height: calc(100% - 2 * var(--space-s)); }

/* The tabs, sign-in and MIDI Device stay at the top while the rest scrolls under them.
   The padding covers the page's top margin, so nothing shows above the bar. */
.top-bar {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  /* A rule under the tabs, as between sections, with the page's space below it; the
     tabs stand on it */
  background:
    linear-gradient(rgb(190, 190, 190), rgb(190, 190, 190)) left bottom var(--space-s) / 100% 1px no-repeat,
    rgb(24, 24, 24);
  margin-top: calc(-1 * var(--space-s));
  padding-top: var(--space-s);
  padding-bottom: calc(var(--space-s) + 1px);
}
/* The logotype ends the bar, set apart from MIDI Device */
.top-logo { width: var(--logo-w); height: var(--logo-h); margin-left: var(--space-m); }
/* raised a little, clear of the rule under the bar; and in 2px, since the round of
   the final "s" makes the logotype look as if it runs past the rule's right end */
.top-logo { position: relative; top: calc(-1 * var(--space-xs)); right: 2px; }

a {
  text-decoration: none;
}

a:link {
  color: #7a7a7a;
}

a:visited {
  color: #7a7a7a;
}

input {
  background-color: rgb(15, 15, 15);
  color: rgb(236, 221, 223);
  border: 1px solid rgb(138, 138, 138);
}

/* Room either side of the text in buttons, menus and text fields */
input[type="button"], input[type="text"], select {
  padding-left: var(--control-pad-x);
  padding-right: var(--control-pad-x);
}
/* A menu's arrow already sets its text apart on the right */
select { padding-right: var(--space-xs); }

/* A button that can't be used now is dimmed */
input[type="button"]:disabled { opacity: .4; cursor: default; }

/* The Pattern Editor's two Play buttons are <button>s, to draw ▶ and ■ the same height
   (no font's square is as tall as its triangle); otherwise they look like the others */
button.seq-play-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  box-sizing: border-box; flex-shrink: 0; height: var(--row-h); padding: 0 var(--control-pad-x);
  font-family: 'condensed'; font-size: 13.333px; line-height: 1;
  background-color: rgb(15, 15, 15); color: rgb(236, 221, 223);
  border: 1px solid rgb(138, 138, 138); border-radius: 0; cursor: default;
}
button.seq-play-btn:disabled { opacity: .4; }
.seq-play-icon { width: 0; height: 0; border-style: solid; border-color: transparent; border-width: 5px 0 5px 9px; border-left-color: currentColor; }
.seq-play-on .seq-play-icon { width: 10px; height: 10px; border: none; background: currentColor; }

.numeric {
  width: 64px;
  box-sizing: border-box;
  text-align: right;
}

select {
  background-color: rgb(15, 15, 15);
  color: rgb(236, 221, 223);
}

.red_button {
  background-color: rgb(146, 5, 24);
  color: rgb(236, 221, 223);
}

.loop_active {
  background-color: rgb(138, 138, 138);
  color: black;
}

#dragsrc {
  border: none;
  background-color: #9a9a9a;
}

/* Tabs whose content starts under a rule */
#pattern_editor_tab,
#midi_monitor_tab,
#librarian_tab,
#firmware_tab {
  display: flex;
  flex-direction: column;
  border-top: 1px solid white;
  padding-top: var(--space-s);
}


#ram_editor {
  font-family: fixed-width;
  background-color: #292929;
  color: white;
  font-family: monospace, monospace;
  border: none;
  padding: 10px;
  margin: 10px;
  height: 100%;
}

#midi_log {
  font-family: fixed-width;
  background-color: #292929;
  color: white;
  font-family: monospace, monospace;
  border: none;
  padding: var(--space-s);
  margin: var(--space-s) 0 0;
  height: 400px;
}

.tab_button {
  border-top: 1px solid gray;
  border-left: 1px solid gray;
  border-right: 1px solid gray;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  padding-left: 10px;
  padding-right: 10px;
  margin-right: 10px;
  border-bottom: none;
  user-select: none;
}

.waveform_slots ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding-left: 0;
  margin: var(--space-m) 0 0;
  gap: var(--space-s);
}

/* Sample Editor rows: editor tools, playback, sample.
   Evenly spaced, and as tall as their controls, so showing a slider or a value
   (Luma-Sim's pitch, Auto Chop's settings) doesn't move the rows below */
.editor_toolbar, #luma1_sample_controls { margin-top: var(--row-gap); }
#luma1_sample_controls + .drum_synth > .section-rule {
  margin-top: var(--space-xs);
}

/* Luma-1 layout: 2 columns, 5 rows */
.luma1_layout li {
  flex: 0 0 calc(50% - var(--space-s) / 2);
  box-sizing: border-box;
  border: 1px solid rgb(51, 51, 51);
  display: flex;
  height: 100px;
}

/* Luma-Mu layout: 2 columns, 4 rows */
.lumamu_layout li {
  flex: 0 0 calc(50% - var(--space-s) / 2);
  box-sizing: border-box;
  border: 1px solid rgb(51, 51, 51);
  display: flex;
  height: 100px;
}

.waveform_slots canvas {
  height: 100%;
  width: 100%;
}

/* Sample Editor Load and Save: one width, so the bank's sit under the sample's */
.storage_button { width: var(--storage-width); text-align: center; }

/* Drum Synth: a heading that opens it, then a column per sound source */
.ds_toggle, .section-toggle {
  display: block; background: none; border: none; padding: 0; color: inherit; font: inherit; cursor: pointer;
}
.ds_toggle::before, .section-toggle::before { content: "▸ "; }
.drum_synth.open .ds_toggle::before, .section-collapsible.open .section-toggle::before { content: "▾ "; }
/* A section opened by its heading (Z-80 RAM Usage Info): the heading's note and the content */
.section-heading:has(> .section-toggle) { display: flex; align-items: baseline; gap: var(--space-s); }
.section-heading > .section-toggle { display: inline; }
.section-collapsible:not(.open) .section-open-only { display: none; }
.drum_synth:not(.open) .ds_open_only { display: none; }
.ds_controls { display: flex; flex-wrap: wrap; gap: var(--space-m) var(--space-l); margin-top: var(--space-s); font-size: var(--text-small); }
.ds_group { display: flex; flex-direction: column; gap: var(--space-xs); }
.ds_group[hidden], .ds_control[hidden] { display: none; }
.ds_group_title { color: #8a8a8a; }
.ds_control { display: grid; grid-template-columns: 72px 100px 64px; }
.ds_control select { grid-column: 2 / 4; justify-self: start; }
.ds_control input[type="range"] { margin: 0; }
.ds_value { color: rgb(236, 221, 223); text-align: right; }

/* The HIHAT slot has two rows of controls under the waveform; the slot
   beside it stretches to match */
.luma1_layout li.hh_slot { flex-direction: column; height: auto; position: relative; }
.luma1_layout li.hh_slot.hh_collapsed { height: 100px; }
.hh_collapsed .hh_controls { display: none; }
/* Top left of the HIHAT waveform; the slot's name is top right */
.hh_toggle {
  position: absolute; top: var(--space-xs); left: var(--space-xs);
  font: inherit; font-size: 11px; padding: 1px 6px;
  background: rgba(15, 15, 15, 0.8); color: rgb(15, 200, 200);
  border: 1px solid rgb(15, 120, 120); border-radius: 3px; cursor: pointer;
}
.hh_toggle::after { content: " ▾"; }
.hh_collapsed .hh_toggle::after { content: " ▸"; }
.hh_slot canvas { height: 100px; flex: none; }
.hh_controls {
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  gap: var(--space-xs) var(--space-s);
  padding: var(--space-xs) var(--space-s);
  border-top: 1px solid rgb(51, 51, 51);
  font-size: var(--text-small);
}
.editor_tools { margin-top: var(--space-s); }
.chop_sliders { display: inline-flex; align-items: center; gap: var(--space-s); }
.chop_sliders[hidden] { display: none; }
.chop_value { min-width: 46px; color: rgb(40, 200, 255); }
/* Auto Chop wears the color of the sounds it finds, so it's easy to spot */
#auto_chop_button:not(.loop_active) { border-color: rgb(40, 200, 255); color: rgb(40, 200, 255); }
.emu_controls { align-items: center; gap: var(--space-xs); }
#emu_pitchval { font-size: 12px; min-width: 110px; display: inline-block; color: #e08a2e; }
.hh_buttons { grid-row: 1; display: flex; gap: var(--space-xs); }
.hh_group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-s); }
.hh_group + .hh_group { grid-column: 2; }
.hh_group .field { gap: var(--space-xs); }
.hh_controls input[type="range"] { accent-color: rgb(15, 140, 140); }
.hh_value { color: rgb(15, 200, 200); min-width: 36px; }
.hh_group.hh_inactive { opacity: .4; }

.fine_print {
  font-size: 10pt;
}

.main_section {
  margin: 0px;
  display: flex;
  flex-direction: column;
  padding: 0px;
}

.editor_waveform {
  display: block;
  box-sizing: border-box; /* its border inside its width, so it ends on the page margin */
  border: 1px solid rgb(51, 51, 51);
  background-color: rgb(41, 41, 41);
  width: 100%;
  height: 260px;
}

.status_alert {
  color: #ff4d4d;
}

.status_success {
  color: #4CAF50;
}

/* Firmware page: a panel one column wide, under the tabs */
.firmware_page {
  max-width: 600px;
}
.firmware_page .info_box p {
  margin: 0;
}

#firmware_progress_container {
  background: #333;
  padding: 15px;
  border-radius: 4px;
  border: 1px solid #444;
}


/* Tooltip Styles */
#global-tooltip {
  position: absolute;
  z-index: 10000;
  /* High z-index to sit on top of everything */
  pointer-events: none;
  /* CRITICAL: Allows clicks to pass through to underlying elements */

  background-color: rgba(20, 20, 20, 0.95);
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 8px 12px;
  font-family: 'condensed', sans-serif;
  font-size: 14px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  max-width: 250px;
  white-space: pre-wrap;
  /* Allows \n to act as line break */

  /* Smooth implementation */
  transition: opacity 0.1s;
}

/* ═══════════════════════════════════════════════════════════════
   STEP SEQUENCER  (luma_sequencer.js)
═══════════════════════════════════════════════════════════════ */

/* ── Patterns bar: under the grid, its controls on the grid panel's left and right edges ── */
.seq-topbar { padding: 0 var(--panel-inset); }
/* On the Pattern Editor, things outside a panel line up with the panels' contents */
.seq-inset { margin-left: var(--panel-inset); }
/* Its own line under the patterns controls, kept tall enough that messages don't move the page */
/* The status line ends Pattern Selection's toolbar, one line (the whole of a long one on hover) */
.seq-pp-bar { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; }
.seq-status { color: rgb(100,220,120); min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.seq-ram-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 1px 6px; border-radius: 3px; color: rgb(236,221,223);
}
.seq-ram-flash { animation: seq-ram-flash 1.2s ease-out; }
@keyframes seq-ram-flash { from { background: rgb(180,95,0); color: #fff; } to { background: transparent; } }
.seq-file-lbl {
  cursor: pointer;
  background-color: rgb(15,15,15);
  color: rgb(236,221,223);
  border: 1px solid rgb(138,138,138);
  padding: 2px 6px;
  font-size: 12px;
}
.seq-file-lbl:hover { border-color: rgb(200,200,200); }

/* ── Panels (chain / pattern pickers): heading, controls, buttons and legend on one left edge ── */
.seq-chain-bar { margin-bottom: var(--space-s); }
.seq-legend {
  display: flex;
  gap: var(--space-m);
  flex-wrap: wrap;
  margin-top: var(--space-s);
}
.seq-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 3px;
  vertical-align: middle;
}
.seq-swatch-empty  { background: rgb(30,30,30); border: 1px solid rgb(50,50,50); }
.seq-swatch-data   { background: rgb(90,50,10); border: 1px solid rgb(150,90,20); }
.seq-swatch-active { background: rgb(90,60,0); border: 2px solid rgb(217,119,6); }
.seq-swatch-play   { background: rgb(90,60,0); border: 2px solid rgb(245,158,11); }
.seq-swatch-queue  { background: rgb(0,24,40); border: 2px solid rgb(56,189,248); }

/* ── Pattern picker buttons: each as big as a tile of the grid (luma_sequencer.js measures
   one into --seq-tile-w / --seq-tile-h), across to the right edge, then the next row ── */
.seq-pp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--seq-tile-w, 28px));
  grid-auto-rows: var(--seq-tile-h, 24px);
  gap: var(--seq-cell-gap);
  margin-bottom: 4px;
}
.seq-pp-btn {
  font-size: 11px;
  font-family: monospace;
  background: rgb(20,20,20);
  border: 1px solid rgb(35,35,35);
  color: rgb(130,130,130);
  padding: 0;
  box-sizing: border-box;
  cursor: pointer;
  border-radius: 3px;
  min-width: 0;
  text-align: center;
  line-height: 1.4;
}
.seq-pp-btn:hover { border-color: rgb(140,140,140); color: rgb(190,190,190); }
.seq-pp-has   { background: rgb(26,14,0); border-color: rgb(92,56,16); color: rgb(217,119,6); }
.seq-pp-has:hover { border-color: rgb(217,119,6); }
.seq-pp-active  { background: rgb(42,26,0); border-color: rgb(217,119,6); color: rgb(251,191,36); outline: 1px solid rgb(107,58,16); }
.seq-pp-playing { background: rgb(42,26,0); border-color: rgb(245,158,11); color: rgb(254,240,138); outline: 2px solid rgb(217,119,6); font-weight: bold; }
.seq-pp-queued  {
  background: rgb(0,24,40); border-color: rgb(56,189,248); color: rgb(125,211,252);
  animation: seqPPQ .7s ease-in-out infinite;
}
@keyframes seqPPQ {
  0%,100% { border-color: rgb(56,189,248); background: rgb(0,24,40); }
  50%      { border-color: rgb(125,211,252); background: rgb(0,38,61); }
}
/* Picking the pattern to write the grid into */
.seq-pp-picking .seq-pp-btn { cursor: copy; }
.seq-pp-picking .seq-pp-btn.seq-pp-active { cursor: default; }
.seq-copy-prompt { color: rgb(125,211,252); }
/* Under the grid: what happens to edits, lit once the grid has been edited */
.seq-edit-note {
  margin: var(--space-s) 0 0 calc(-1px - var(--space-xs)); /* its text on the help's left edge */
  padding: 2px var(--space-xs); border-radius: 3px;
  border: 1px solid transparent; transition: color .3s, background-color .3s, border-color .3s;
}
.seq-edit-note.edited { color: rgb(251,191,36); background: rgba(217,119,6,.14); border-color: rgb(107,58,16); }

/* The pattern a write would replace, in the dialog that asks */
#seq_copy_dialog[hidden] { display: none; }
.seq-copy-dialog { width: min(520px, 100%); }
.seq-thumb {
  display: grid; gap: 1px; margin: 0 0 var(--space-l);
  font: 8px monospace; color: rgb(130,130,130); align-items: center;
}
.seq-thumb-lbl { padding-right: var(--space-xs); text-align: right; }
/* A pattern's picture: these colors are the canvas pictures' too (seqThumbColors reads them) */
:root {
  --thumb-off: rgb(30,30,30); --thumb-beat: rgb(42,42,42);
  --thumb-soft: rgb(120,70,10); --thumb-loud: rgb(217,119,6); --thumb-open: rgb(15,180,180);
}
.seq-thumb-cell { height: 8px; background: var(--thumb-off); border-radius: 1px; }
.seq-thumb-cell.beat { background: var(--thumb-beat); }
.seq-thumb-cell.soft { background: var(--thumb-soft); }
.seq-thumb-cell.loud { background: var(--thumb-loud); }
.seq-thumb-cell.open { background: var(--thumb-open); }
/* …and in the tip over a pattern's button */
#seq-tip.seq-tip-wide { width: 300px; max-width: 300px; }
#seq-tip .seq-thumb { margin: 6px 0 2px; }
/* …and the tip over a chain's button: its patterns in order */
#seq-tip:has(.seq-chain-strip) { width: auto; max-width: none; }
.seq-chain-strip { display: grid; grid-auto-flow: row; column-gap: 0; row-gap: 6px; margin: 6px 0 2px; align-items: start; }
.seq-chain-link { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.seq-chain-link img { display: block; width: 96px; height: 38px; image-rendering: pixelated; }
.seq-chain-num {
  font: 8px monospace; line-height: 1; padding: 2px 4px; border-radius: 2px;
  background: rgb(26,14,0); border: 1px solid rgb(92,56,16); color: rgb(217,119,6);
}
.seq-chain-num.empty { background: rgb(20,20,20); border-color: rgb(35,35,35); color: rgb(110,110,110); }
/* Editing a chain: its links, as in the tip, and empty ones to drop onto */
.seq-ch-edit { margin-top: var(--space-s); }
/* room below, so the page can scroll the Chains row up near the top */
#pattern_editor_tab.seq-chain-editing { padding-bottom: 60vh; }
.seq-ch-edit[hidden] { display: none; }
.seq-ch-help { margin-bottom: var(--space-s); }
.seq-ch-progress { color: rgb(251,191,36); }
.seq-ch-links { display: grid; row-gap: 6px; align-items: start; justify-content: start; user-select: none; }
.seq-ch-links img { width: 192px; height: 76px; }
.seq-ch-links .seq-chain-arrow { height: 76px; }
.seq-ch-links .seq-chain-link { cursor: grab; border-radius: 3px; outline: 1px solid transparent; outline-offset: 2px; }
.seq-ch-links .seq-chain-link.selected { outline-color: rgb(240,240,240); }
.seq-ch-links .seq-chain-link.playing img { outline: 2px solid rgb(245,158,11); }
/* where the chain playing is: a line on its playing link's picture */
.seq-ch-pic { position: relative; }
.seq-ch-cursor { display: none; position: absolute; top: -2px; bottom: -2px; left: 0; width: 2px; margin-left: -1px;
  background: rgb(240,240,240); box-shadow: 0 0 3px rgba(0,0,0,.8); pointer-events: none; }
.seq-ch-links .seq-chain-link.playing .seq-ch-cursor { display: block; }
.seq-ch-links .seq-chain-link.drop-here { outline: 2px dashed rgb(56,189,248); }
.seq-ch-links .seq-ch-slot { cursor: default; opacity: .45; }
.seq-ch-slot-box { width: 192px; height: 76px; border: 1px dashed rgb(90,90,90); border-radius: 2px; box-sizing: border-box; }
.seq-chain-arrow { width: 20px; height: 38px; display: flex; align-items: center; justify-content: center; color: rgb(150,150,150); font-size: 13px; }

/* ── Chains: Play, Edit, then the 8 chains side by side, each its number and its links ── */
.seq-ch-grid { display: flex; flex-wrap: wrap; gap: var(--space-s); }
.seq-ch-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: var(--control-w);
  height: var(--row-h);
  font-size: 11px;
  font-family: monospace;
  background: rgb(20,20,20);
  border: 1px solid rgb(35,35,35);
  color: rgb(130,130,130);
  padding: 0 8px;
  cursor: pointer;
  border-radius: 3px;
  transition: border-color .1s;
}
.seq-ch-btn:hover { border-color: rgb(140,140,140); color: rgb(190,190,190); }
.seq-ch-has     { background: rgb(26,14,0); border-color: rgb(92,56,16); color: rgb(217,119,6); }
.seq-ch-has:hover { border-color: rgb(217,119,6); }
.seq-ch-active  { background: rgb(42,26,0); border-color: rgb(217,119,6); color: rgb(251,191,36); outline: 1px solid rgb(107,58,16); }
.seq-ch-playing { background: rgb(30,16,0); border-color: rgb(245,158,11); color: rgb(254,240,138); outline: 2px solid rgb(217,119,6); font-weight: bold; }

/* ── Sequencer machine ────────────────────────────────────────── */
.seq-machine {overflow-x:auto;
  font-family: monospace;
}

/* ── Controls row ─────────────────────────────────────────────── */
.seq-ctrl-row {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  flex-wrap: wrap;
  margin-bottom: var(--space-s);
}
.seq-ctrl-group { display: flex; align-items: center; gap: var(--space-s); }
.seq-ctrl-right { margin-left: auto; }
/* Play's column is as wide as the voice controls, so BPM starts on the event grid's left edge */
.seq-ctrl-lead { width: calc(var(--seq-label-col) + var(--seq-cell-gap) - var(--space-m)); }
.seq-bpm-lbl { font-size: var(--text-small); color: rgb(214,144,30); min-width: 28px; }
.seq-bpm-lbl.seq-bpm-ext { color: rgb(100,200,230); min-width: 38px; }   /* the tempo of the MIDI clock followed */
.seq-sync-sel { max-width: 170px; }
#seqBpmIn:disabled { opacity: 0.4; }
/* Autopilot: its name and Generate share Play's column, Generate ending on Play's right edge */
.seq-ap-lead { width: var(--control-w2); display: flex; align-items: center; justify-content: space-between; }
.seq-ap-lbl { min-width: 52px; }
/* Autopilot's rows after a rule, as the panel's own (a section rule's color, closer) */
.seq-ap-rule { border: none; border-top: 1px solid rgb(85,85,85); margin: 0 0 var(--space-s); }
/* A section's name on its row of controls, in Play's column, as Autopilot's: the Pattern
   Storage Manager and Chains */
/* The bank's name gives way, so the Pattern Storage Manager's controls stay on its row */
.seq-psm-row > .toolbar-group:not(.toolbar-end) { flex: 1 1 0; flex-wrap: nowrap; min-width: calc(var(--control-w2) + 230px); }
.seq-psm-row .toolbar-group > * { flex-shrink: 0; }
/* the bank's name takes the room there is; cut short (…) only when it's longer than that */
.seq-psm-row .seq-ram-name { flex: 1 1 auto; min-width: 0; }
.seq-row-head { margin: 0; flex: 0 0 auto; width: calc(var(--seq-label-col) + var(--seq-cell-gap) - var(--space-m)); white-space: nowrap; }
.seq-ap-pct { min-width: 32px; }
.seq-play-on { background: rgb(42,26,0) !important; color: rgb(251,191,36) !important; border-color: rgb(217,119,6) !important; }


/* ── Step number header ───────────────────────────────────────── */
.seq-nums-wrap {
  display: flex;
  gap: 3px;
  margin-bottom: 2px;
}
.seq-vlbl-spacer { width: 50px; flex-shrink: 0; }
.seq-ngrp {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  flex: 1;
}

/* Numbers header row — same grid as voice rows, perfect alignment */
.seq-vrow-nums .seq-vlbl { opacity:0; pointer-events:none; }
.seq-sn { font-size:7px; color:rgb(140,140,140); text-align:center; line-height:1; }
.seq-bt { color:rgb(200,160,60); }

/* ── Flat 32-column grid layout ─────────────────── */
/* seq-nums-wrap removed — numbers now in first row of seqGrid */
.seq-sn-spacer{width:50px;flex-shrink:0;}
.seq-sn{flex:1;font-size:7px;color:rgb(140,140,140);text-align:center;line-height:1;min-width:0;}
.seq-vrow{display:grid;grid-template-columns:var(--seq-label-col) repeat(32,1fr);gap:2px;margin-bottom:2px;min-width:0;}

.seq-bt { color: rgb(200,160,60); }

/* 16 vs 32 step layout */
/* Always 32 steps */
.seq-nums-wrap, 

/* ── Grid rows ────────────────────────────────────────────────── */
.seq-grid { display: flex; flex-direction: column; gap: 2px; }
.seq-vrow {
  display: grid;
  gap: var(--seq-cell-gap);
  margin-bottom: 1px;
}



.seq-vlbl{font-size:9px;color:rgb(190,190,190);letter-spacing:1px;font-family:monospace;flex-shrink:0;user-select:none;width:28px;text-align:right;}
.seq-sgrp {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

/* ── Step cells ───────────────────────────────────────────────── */
.seq-st {
  position: relative;
  height: 22px;
  background: rgb(30,30,30);
  border: 1px solid rgb(44,44,44);
  cursor: pointer;
  border-radius: 2px;
  transition: background .05s;
}
.seq-st:hover { border-color: rgb(80,80,80); }
.seq-st.seq-cur { outline: 1px solid rgb(240,240,240); }

/* Velocity states */
.seq-st.seq-loud { background: rgb(180,95,0); border-color: rgb(140,74,0); }
.seq-st.seq-soft { background: rgb(70,34,0); border-color: rgb(90,44,0); }
.seq-st.seq-on   { background: rgb(180,95,0); border-color: rgb(140,74,0); }
.seq-st.seq-open { background: rgb(15,100,100); border-color: rgb(13,82,82); }

/* Shuffle tints */
.seq-st.seq-shuf1.seq-loud, .seq-st.seq-shuf1.seq-on { background: rgb(30,90,170); border-color: rgb(25,75,145); }
.seq-st.seq-shuf1.seq-soft                            { background: rgb(18,54,100); border-color: rgb(25,65,115); }
.seq-st.seq-shuf4.seq-loud, .seq-st.seq-shuf4.seq-on { background: rgb(90,30,180); border-color: rgb(75,25,150); }
.seq-st.seq-shuf4.seq-soft                            { background: rgb(54,18,100); border-color: rgb(65,22,120); }

/* Early (pulled ahead of the grid) tint */
.seq-st.seq-early.seq-loud, .seq-st.seq-early.seq-on { background: rgb(40,135,70); border-color: rgb(32,110,56); }
.seq-st.seq-early.seq-soft                            { background: rgb(22,72,38); border-color: rgb(28,90,48); }

/* Micro-offset marker: where in the step the hit actually falls (centre = on grid) */
.seq-off-mark {
  position: absolute; top: 2px; bottom: 2px; width: 2px; margin-left: -1px;
  background: rgba(255,255,255,.85); border-radius: 1px; pointer-events: none;
}

/* ‹ › nudge handles, shown on the hovered hit */
.seq-nudge {
  display: none;
  position: absolute; top: 0; bottom: 0; width: 34%;
  align-items: center; justify-content: center;
  font-size: 13px; font-weight: bold; line-height: 1;
  color: rgba(255,255,255,.9); background: rgba(0,0,0,.35);
  user-select: none;
}
.seq-nudge-l { left: 0; border-radius: 2px 0 0 2px; }
.seq-nudge-r { right: 0; border-radius: 0 2px 2px 0; }
.seq-st:hover .seq-nudge { display: flex; }
.seq-nudge:hover { background: rgba(0,0,0,.65); color: rgb(255,210,120); }

/* Steps beyond the pattern length */
.seq-st.seq-st-x { opacity: .22; cursor: default; }
.seq-st.seq-st-x .seq-nudge { display: none; }
.seq-sn.seq-st-x { opacity: .3; }

/* Shuffle label */
.seq-shuf-lbl {
  position: absolute;
  bottom: 1px; right: 2px;
  font-size: 6.5px;
  font-family: monospace;
  font-weight: bold;
  color: rgba(255,255,255,.82);
  pointer-events: none;
  line-height: 1;
  letter-spacing: -.3px;
}

/* ── Mouse note ───────────────────────────────────────────────── */
.seq-mnote { margin-top: var(--space-s); }

/* ── Hex / encoding panel ─────────────────────────────────────── */
/* The encoding is a data display, sized like the grid's */
.seq-hex-panel { font-size: 10px; }
.seq-hex-stitle { margin-bottom: var(--space-xs); padding-bottom: var(--space-xs); border-bottom: 1px solid rgb(35,35,35); }
.seq-ev-row { display: flex; align-items: baseline; gap: 10px; padding: 1px 0; flex-wrap: wrap; }
.seq-ev-empty { opacity: .45; }
.seq-ev-addr  { font-size: 9.5px; color: rgb(160,160,160); min-width: 52px; }
.seq-ev-bytes { font-size: 9.5px; min-width: 100px; letter-spacing: 1px; }
.seq-ev-meta  { font-size: 8.5px; color: rgb(130,130,130); }
.seq-ev-v     { font-size: 9px; color: rgb(251,191,36); background: rgb(42,26,0); padding: 1px 3px; border-radius: 2px; }
.seq-b0c { color: rgb(74,222,128); }
.seq-bdc { color: rgb(56,189,248); }
.seq-bec { color: rgb(167,139,250); }

/* Drag-and-drop target */
.seq-machine.seq-drag-over{
  outline:2px dashed rgb(217,119,6);
  background:rgb(26,16,0);
}

/* Pitch slider column */
.seq-pitch-cell{display:flex;align-items:center;gap:3px;padding:0 3px 0 4px;overflow:hidden;}
.seq-pitch-sl{
  width:56px;flex-shrink:0;cursor:pointer;margin:0;
  -webkit-appearance:none;appearance:none;
  height:4px;border-radius:2px;
  background:rgb(50,50,50);outline:none;
}
.seq-pitch-sl::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:14px;height:14px;border-radius:50%;
  background:rgb(80,200,140);
  cursor:pointer;margin-top:-5px;
  box-shadow:0 1px 3px rgba(0,0,0,.6);
}
.seq-pitch-sl::-webkit-slider-runnable-track{
  height:4px;background:rgb(50,50,50);border-radius:2px;
}
.seq-vkey-lbl{
  font-size:8px;font-family:monospace;
  background:rgb(40,40,40);
  border:1px solid rgb(90,90,90);border-bottom:2px solid rgb(60,60,60);
  border-radius:3px;padding:1px 3px;color:rgb(200,200,200);
  flex-shrink:0;user-select:none;min-width:13px;text-align:center;line-height:1.4;
}

/* Tooltip (Pattern Editor) */
#seq-tip{position:fixed;z-index:9999;pointer-events:none;display:none;
  background:rgba(18,18,18,.97);color:rgb(210,210,210);
  border:1px solid rgb(80,80,80);border-radius:4px;
  padding:6px 9px;font-size:11px;font-family:'Barlow Condensed',condensed,sans-serif;
  max-width:240px;line-height:1.45;white-space:pre-wrap;
  box-shadow:0 4px 12px rgba(0,0,0,.5);}

/* Luma-Mu editor (mu/index.html) hosted in the Sample Editor tab */
#lumamu_editor_frame {
  display: block;
  width: 100%;
  height: 560px;
  border: 0;
  background: rgb(24, 24, 24);
}
#lumamu_editor_frame[hidden] { display: none; }

/* Per-instrument LM-1 shuffle menu (row header) */
.seq-shuf-sel {
  width: 64px; flex-shrink: 0;
  font-size: 9px; font-family: monospace;
  padding: 0 1px; height: 16px;
  background: rgb(22,22,22); color: rgb(150,150,150);
  border: 1px solid rgb(60,60,60); border-radius: 2px;
}
.seq-shuf-sel.seq-shuf-on { color: rgb(120,170,220); border-color: rgb(40,85,140); }

/* Ratchet: faint slices for each repeat + count label */
.seq-ratchet {
  position: absolute; inset: 0; pointer-events: none; border-radius: 2px;
  background: repeating-linear-gradient(90deg, transparent 0,
    transparent calc(100% / var(--k) - 1px), rgba(0,0,0,.45) calc(100% / var(--k) - 1px),
    rgba(0,0,0,.45) calc(100% / var(--k)));
}
.seq-ratchet-lbl {
  position: absolute; top: 1px; left: 2px; pointer-events: none;
  font-size: 7px; font-family: monospace; font-weight: bold; line-height: 1;
  color: rgba(255,255,255,.9);
}
/* Right-click menu on a hit */
#seqHitMenu {
  position: fixed; z-index: 10001; padding: 6px 8px;
  background: rgb(28,28,28); border: 1px solid rgb(90,90,90); border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.5); font-size: 11px; color: rgb(200,200,200);
}
#seqHitMenu .seq-hm-title { color: rgb(200,160,60); margin-bottom: 4px; }
#seqHitMenu .seq-hm-row { display: flex; align-items: center; gap: 3px; margin-top: 3px; }
#seqHitMenu .seq-hm-row span { min-width: 58px; }
#seqHitMenu button {
  font-size: 10px; padding: 1px 5px; cursor: pointer;
  background: rgb(40,40,40); color: rgb(220,220,220); border: 1px solid rgb(80,80,80); border-radius: 2px;
}
#seqHitMenu button.on { background: rgb(180,95,0); border-color: rgb(140,74,0); color: #fff; }
#seqHitMenu button:disabled { opacity: .4; cursor: default; }

/* Per-voice volume fader (row header) */
.seq-vol-sl{
  width:44px;flex-shrink:0;cursor:pointer;margin:0;
  -webkit-appearance:none;appearance:none;
  height:4px;border-radius:2px;background:rgb(50,50,50);outline:none;
}
.seq-vol-sl::-webkit-slider-thumb{
  -webkit-appearance:none;width:12px;height:12px;border-radius:2px;
  background:rgb(214,144,30);cursor:pointer;margin-top:-4px;box-shadow:0 1px 3px rgba(0,0,0,.6);
}
.seq-vol-sl::-webkit-slider-runnable-track{height:4px;background:rgb(50,50,50);border-radius:2px;}
/* Column headings above the row controls */
.seq-col-hdr{flex-shrink:0;font-size:7px;color:rgb(140,140,140);letter-spacing:.5px;text-align:center;line-height:1;}
.seq-col-vol{width:44px;}
.seq-col-pitch{width:56px;}
.seq-col-key{width:21px;}
.seq-col-shuf{width:64px;}

/* ── Google Drive browser (luma_drive_browser.js) ─────────────── */
.drive-browser {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: rgb(30, 30, 30);
  border: 1px solid #444;
  border-radius: 5px;
  outline: none;
  overflow: hidden;
}
.drive-browser:focus-visible { border-color: #888; }
.drive-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgb(40, 40, 40);
  border-bottom: 1px solid #444;
}
.drive-tool, .drive-primary, .drive-browse-all {
  background: rgb(55, 55, 55);
  color: rgb(236, 221, 223);
  border: 1px solid rgb(100, 100, 100);
  border-radius: 4px;
  padding: 3px 9px;
  min-height: 26px;
  cursor: pointer;
  white-space: nowrap;
}
.drive-tool:hover:not(:disabled), .drive-browse-all:hover { background: rgb(70, 70, 70); }
.drive-tool:disabled, .drive-primary:disabled { opacity: .4; cursor: default; }
.drive-primary { background: rgb(180, 95, 0); border-color: rgb(140, 74, 0); color: #fff; }
.drive-primary:hover:not(:disabled) { background: rgb(200, 108, 0); }
.drive-path {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
  padding: 0 6px;
}
.drive-path-item { cursor: pointer; color: #aaa; overflow: hidden; text-overflow: ellipsis; }
.drive-path-item:hover { color: #fff; text-decoration: underline; }
.drive-path-item.current { color: rgb(236, 221, 223); cursor: default; text-decoration: none; }
.drive-path-sep { color: #666; }
.drive-search { width: 150px; border-radius: 4px; padding: 3px 6px; }
.drive-body { flex: 1; display: flex; min-height: 0; }
.drive-sidebar {
  width: 170px;
  flex-shrink: 0;
  padding: 8px 0;
  background: rgb(36, 36, 36);
  border-right: 1px solid #444;
  overflow-y: auto;
}
.drive-sidebar-heading { font-size: 12px; color: #888; padding: 2px 12px 6px; text-transform: uppercase; letter-spacing: .5px; }
.drive-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  cursor: pointer;
  color: #ccc;
}
.drive-sidebar-item:hover { background: rgb(50, 50, 50); }
.drive-sidebar-item.selected { background: rgb(70, 70, 70); color: #fff; }
.drive-sidebar-item svg, .drive-row svg { flex-shrink: 0; color: rgb(224, 138, 46); }
.drive-browse-all { display: block; margin: 12px 10px 0; width: calc(100% - 20px); text-align: left; }
.drive-columns { flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; min-width: 0; }
.drive-column {
  width: 230px;
  flex-shrink: 0;
  border-right: 1px solid #3a3a3a;
  overflow-y: auto;
  padding: 2px 0;
}
.drive-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px 4px 10px;
  cursor: default;
  user-select: none;
  white-space: nowrap;
}
.drive-row:hover { background: rgb(42, 42, 42); }
.drive-row.selected { background: rgb(180, 95, 0); color: #fff; }
.drive-row.selected svg { color: #fff; }
.drive-row.dimmed { opacity: .45; }
.drive-row.dimmed.selected { opacity: 1; }
.drive-row-name { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.drive-row-chevron { color: #888; }
.drive-row.selected .drive-row-chevron { color: #fff; }
.drive-rename { flex: 1; min-width: 0; }
.drive-message { padding: 14px; color: #999; font-style: italic; }
.drive-message.error { color: #ff7777; font-style: normal; white-space: normal; }
.drive-message .drive-tool { display: block; margin-top: 8px; }
.drive-preview { width: 250px; padding: 18px 14px; text-align: center; }
.drive-preview-icon svg { width: 64px; height: 64px; color: #999; }
.drive-preview-name { margin: 8px 0 14px; color: #fff; word-break: break-word; }
.drive-preview-detail { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 2px 0; text-align: right; }
.drive-preview-detail span:first-child { color: #888; }

/* Librarian tab */
/* Librarian: Load (for the selected file) and Save above the browser */
.drive-local-selection { display: flex; flex: 1; justify-content: space-between; }

/* Firmware: a label is dimmer than its value */
.info_label { color: #8a8a8a; }
.info_value { color: rgb(236, 221, 223); }

.drive-librarian-help { margin-bottom: var(--space-s); color: #999; line-height: 1.5; }
.drive-librarian { position: relative; height: max(380px, calc(100vh - 300px)); margin-top: var(--space-s); }

.drive-status { font-style: italic; color: #aaa; }

/* Open/Save dialog */
.drive-local { padding: var(--space-m); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); color: #ccc; }
.drive-format { margin-left: var(--space-xs); }
.drive-choice-note { color: #aaa; } /* beside the Load as menu */
.drive-multi-hint { color: #aaa; padding: 6px 10px 0; } /* under the Drive browser */
.drive-multi-hint[hidden] { display: none; }

.drive-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .55);
  padding: 16px;
}
.drive-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(940px, 100%);
  height: min(580px, 100%);
  background: rgb(34, 34, 34);
  border: 1px solid #666;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
  overflow: hidden;
}
.drive-dialog-title { padding: 10px 14px; text-align: center; color: #ddd; border-bottom: 1px solid #444; }
.drive-dialog-browser { flex: 1; min-height: 0; padding: 8px 10px 0; }
.drive-dialog-footer { display: flex; align-items: center; gap: 8px; padding: 10px; }
.drive-save-as { display: flex; align-items: center; gap: 8px; }
.drive-save-name { width: 260px; padding: 4px 6px; border-radius: 4px; }
.drive-spacer { flex: 1; }
.drive-sheet {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 32px));
  z-index: 3;
  padding: 18px;
  background: rgb(45, 45, 45);
  border: 1px solid #777;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
}
.drive-sheet-title { line-height: 1.4; margin-bottom: 14px; word-break: break-word; }
.drive-sheet-buttons { display: flex; justify-content: flex-end; gap: 8px; }
.drive-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1100;
  max-width: calc(100% - 32px);
  padding: 9px 16px;
  background: rgb(50, 50, 50);
  color: #eee;
  border: 1px solid #777;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
}
.drive-toast.error { border-color: #c44; color: #ffb3b3; }

/* Unsaved work from an earlier visit, offered back in a dialog over the page (luma_autosave.js);
   the overlay is the Load/Save dialog's */
#autosave_dialog[hidden] { display: none; }
.autosave-dialog {
  width: min(460px, 100%);
  padding: var(--space-l);
  background: rgb(34, 34, 34);
  border: 1px solid #666;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
}
.autosave-title { color: #eee; margin-bottom: var(--space-s); }
.autosave-text { color: #ccc; line-height: 1.4; margin: 0 0 var(--space-l); }
.autosave-buttons { display: flex; justify-content: flex-end; gap: var(--space-s); }

/* The MCP link (luma_claude.js): on and waiting is the usual "on" look; connected is green */
#claude_link.claude-connected { background-color: rgb(60, 140, 80); color: white; }

/* Its hover card (luma_claude.js claudeTipInit): what the link is, its state, how to set it up.
   The same type as the other tooltips (#global-tooltip): one font, size and spacing throughout. */
#mcp_tip {
  position: absolute; z-index: 10001; pointer-events: none;
  width: 400px; max-width: calc(100vw - 16px); box-sizing: border-box;
  background-color: rgba(20, 20, 20, 0.95); color: #fff;
  border: 1px solid #444; border-radius: 4px; padding: 8px 12px;
  font-family: 'condensed', sans-serif; font-size: 14px; letter-spacing: 0.5px; line-height: 1.35;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
#mcp_tip[hidden] { display: none; }
#mcp_tip * { font-family: inherit; font-size: inherit; letter-spacing: inherit; font-style: normal; font-weight: inherit; }
#mcp_tip p { margin: 6px 0; }
#mcp_tip ol, #mcp_tip ul { margin: 4px 0 6px; padding-left: 20px; }
#mcp_tip li { margin: 2px 0; }
#mcp_tip code { color: #cfe; }
.mcp-tip-title { margin-bottom: 6px; }
.mcp-tip-head { margin-top: 8px; color: #aaa; }
.mcp-tip-status { padding: 4px 8px; border-radius: 4px; background: #333; }
.mcp-tip-status.mcp-tip-on { background: rgb(40, 100, 55); }
.mcp-tip-status.mcp-tip-wait { background: #4a4330; }

/* Luma-1 Banks window (luma_banklist.js); overlay and frame are the Load/Save dialog's */
.banklist-dialog { height: min(640px, 100%); }
.banklist-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #444; }
.banklist-check { color: #ccc; display: inline-flex; align-items: center; gap: 4px; }
.banklist-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 8px 10px 0; }
.banklist-col { display: flex; flex-direction: column; min-height: 0; border: 1px solid #444; border-radius: 6px; }
.banklist-head { padding: 6px 10px; color: #ddd; font-weight: 600; border-bottom: 1px solid #444; }
.banklist-list { flex: 1; min-height: 0; overflow-y: auto; }
.banklist-row { display: flex; align-items: center; gap: 8px; padding: 3px 8px; border-bottom: 1px solid #333; }
.banklist-row:hover { background: rgb(44, 44, 44); }
.banklist-num { font-variant-numeric: tabular-nums; color: #999; min-width: 2ch; }
.banklist-name { color: #ddd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banklist-absent .banklist-name { color: #666; font-style: italic; }
.banklist-active { background: rgba(80, 140, 220, .16); }
.banklist-tag { font-size: 11px; color: #9cf; border: 1px solid #58a; border-radius: 4px; padding: 0 5px; }
.banklist-empty { padding: 12px; color: #888; font-style: italic; }
.banklist-note { padding: 8px 12px 0; color: #999; font-size: 12px; line-height: 1.4; }
.banklist-status { color: #aaa; font-style: italic; }
.banklist-status.error { color: #ffb3b3; }
@media (max-width: 640px) { .banklist-cols { grid-template-columns: 1fr; } }
.banklist-remote { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 10px; font-size: 13px; }
.banklist-remote:not(:empty) { padding: 6px 10px; border-bottom: 1px solid #444; }
.banklist-off { color: #ffb3b3; }
.banklist-on { color: #9d9; }
.banklist-chan { color: #aaa; }
