/* LoopLabs — ritmo no navegador, com a cara do app Windows (JUCE):
   chassi claro cinza-prata, LCDs azul-marinho embutidos, azul #1A73B8
   como cor de destaque, botões âmbar para mute, Plus Jakarta Sans. */

:root {
  --page: #23272C;
  --chassis-hi: #DCE0E4;
  --chassis-lo: #C3C8CE;
  --panel-hi: #EEF0F2;
  --panel-lo: #DEE1E5;
  --panel-edge: #A7AEB6;
  --card-hi: #F4F6F8;
  --card-lo: #E3E6EA;
  --ink: #2A2F36;
  --ink-soft: #4A525B;
  --ink-faint: #7A828C;
  --blue: #1A73B8;
  --blue-hi: #3D95D8;
  --blue-deep: #0F4E80;
  --amber: #E3A23F;
  --amber-hi: #F4BE63;
  --amber-deep: #B97E22;
  --lcd-a: #0B1322;
  --lcd-b: #101A2C;
  --lcd-edge: #04070C;
  --lcd-text: #8FC1EC;
  --lcd-dim: #51708F;
  --btn-hi: #4E555D;
  --btn-lo: #343A41;
  --btn-edge: #23272C;
  --led-green-a: #46E07A;
  --led-green-b: #2BB85B;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --lcd-labelw: 104px;
  --step-h: 27px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(90% 90% at 50% 0%, #2B3036, var(--page) 70%),
    var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font-family: inherit; }
button { cursor: pointer; }
code { font-size: 11px; }

/* ---------- Chassi ---------- */
.chassis {
  max-width: 1330px;
  margin: 12px auto 8px;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, var(--chassis-hi), var(--chassis-lo));
  border: 1px solid #14171B;
  border-radius: 14px;
  box-shadow:
    0 34px 80px -34px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -2px 6px rgba(0, 0, 0, 0.12);
}

/* ---------- Cabeçalho escuro ---------- */
.apphead {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #31363C, #22262B);
  border: 1px solid #121519;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 2px 5px rgba(0, 0, 0, 0.25);
}
.head-zone { flex: 1 1 0; min-width: 0; display: flex; align-items: center; }
.head-center { justify-content: center; flex: 0 0 auto; }
.head-right { justify-content: flex-end; }

.ch-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #0C1118;
  border: 1px solid #000;
  border-radius: 7px;
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 255, 255, 0.07);
  color: #E8EEF5;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.ch-tag {
  color: #4FA3E0;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.ch-text { color: #99A5B2; font-size: 10px; letter-spacing: 0.14em; }
.ch-sep { width: 1px; height: 14px; background: #2A3340; }
.ch-bpm b { font-weight: 800; }
.ch-pos { color: #99A5B2; min-width: 28px; font-weight: 700; }
.beats { display: inline-flex; gap: 4px; }
.beats i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #253040;
  transition: background 0.1s, box-shadow 0.1s;
}
.beats i.on { background: #4FA3E0; box-shadow: 0 0 7px rgba(79, 163, 224, 0.8); }

.logo { display: flex; align-items: center; gap: 10px; }
.logo .mark { width: 30px; height: 30px; }
.logo-words { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.18em;
  color: #F2F5F8;
  white-space: nowrap;
}
.logo-name b { color: #8FA7BC; font-weight: 800; }
.logo-sub {
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.34em;
  color: #7C8793;
  white-space: nowrap;
}
.head-btn {
  padding: 7px 14px;
  border: 1px solid #454C54;
  border-radius: 999px;
  background: linear-gradient(180deg, #3B4147, #2B3036);
  color: #DCE2E8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: color 0.15s, border-color 0.15s;
}
.head-btn:hover { color: #fff; border-color: var(--blue-hi); }

/* ---------- Painéis ---------- */
.deck {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px 236px;
  gap: 10px;
  align-items: stretch;
}
.panel {
  background: linear-gradient(180deg, var(--panel-hi), var(--panel-lo));
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  padding: 9px 11px 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 2px 6px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.panel-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}
.panel-title.sub { margin-top: 2px; }
.panel-note {
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-transform: none;
  margin-left: 6px;
}

/* ---------- LCDs ---------- */
.lcd {
  background: linear-gradient(180deg, var(--lcd-a), var(--lcd-b) 55%, #0A101B);
  border: 1px solid var(--lcd-edge);
  border-radius: 8px;
  box-shadow:
    inset 0 3px 12px rgba(0, 0, 0, 0.7),
    inset 0 -1px 0 rgba(100, 150, 210, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.65);
}

/* ---------- Sequenciador (LCD principal) ---------- */
.panel-seq { min-width: 0; }
.seq-lcd { flex: 1; padding: 9px 10px 10px; }

.ruler {
  display: grid;
  grid-template-columns: var(--lcd-labelw) 1fr;
  gap: 8px;
  margin-bottom: 6px;
}
.ruler-track {
  display: grid;
  grid-template-columns: repeat(var(--seq-cols, 4), 1fr);
  gap: 8px;
}
.ruler-beat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 3px;
}
.ruler-beat b {
  font-weight: 800;
  font-size: 11px;
  color: var(--lcd-dim);
  transition: color 0.1s, text-shadow 0.1s;
}
.ruler-beat i { width: 3px; height: 3px; border-radius: 50%; background: #223042; }
.ruler-beat.now b { color: #9FD0FF; text-shadow: 0 0 9px rgba(120, 190, 255, 0.7); }

.seq { display: grid; gap: 4px; }
.lane {
  display: grid;
  grid-template-columns: var(--lcd-labelw) 1fr;
  gap: 8px;
  align-items: stretch;
}
.lane-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #7FA8CE;
  font-weight: 700;
  font-size: 11px;
  text-align: left;
  border-radius: 6px;
}
.lane-name:hover { color: #BFE0FF; }
.lane-name svg {
  width: 14px;
  height: 14px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}
.lane-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-led {
  width: 6px;
  height: 6px;
  flex: none;
  margin-left: auto;
  border-radius: 50%;
  background: #223042;
  transition: background 80ms, box-shadow 80ms;
}
.lane-led.hot { background: #8CC9F6; box-shadow: 0 0 6px #5FB2EE, 0 0 14px rgba(95, 178, 238, 0.7); }

.steps {
  display: grid;
  grid-template-columns: repeat(var(--seq-cols, 4), 1fr);
  gap: 8px;
  row-gap: 6px;
  touch-action: pan-y;
}
.beat-group {
  display: grid;
  grid-template-columns: repeat(var(--gs, 4), 1fr);
  gap: 4px;
}
.step {
  height: var(--step-h);
  border: 1px solid #0A121E;
  border-radius: 5px;
  background: #16202F;
  padding: 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
  transition: background 0.1s, border-color 0.1s, box-shadow 0.1s, transform 0.1s;
  touch-action: pan-y;
}
.beat-group:nth-child(even) .step:not(.on) { background: #121B29; }
.step:hover { border-color: rgba(120, 180, 235, 0.5); }
.step.on {
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  border-color: var(--blue-deep);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 0 9px rgba(61, 149, 216, 0.4);
}
/* Dinâmicas: v1 fraco (ghost, apagado), normal (padrão), v3 acento (brilhante). */
.step.on.v1 {
  background: linear-gradient(180deg, #27567E, #1B4264);
  border-color: #12324C;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 4px rgba(61, 149, 216, 0.18);
}
.step.on.v3 {
  background: linear-gradient(180deg, #7CC0F4, #2585CE);
  border-color: #A9D7F8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 13px rgba(96, 175, 235, 0.75),
    0 0 3px rgba(191, 224, 255, 0.8);
}
.step.now {
  border-color: rgba(159, 208, 255, 0.75);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(143, 193, 236, 0.4);
}
.step.on.now {
  background: linear-gradient(180deg, #8CC6F2, #4D9FDC);
  border-color: #BFE0FF;
  box-shadow: 0 0 0 1px rgba(191, 224, 255, 0.8), 0 0 13px rgba(120, 190, 255, 0.65);
  transform: scale(1.04);
  animation: stepPulse 180ms var(--ease);
}
@keyframes stepPulse {
  0% { transform: scale(1.14); box-shadow: 0 0 0 1px rgba(191, 224, 255, 0.95), 0 0 20px rgba(120, 190, 255, 0.9); }
  100% { transform: scale(1.04); }
}
.lane.dim .step.on { opacity: 0.3; }
.lane.dim .lane-name { opacity: 0.45; }

/* ---------- Botões de hardware ----------
   Física comum: specular no topo (gradiente + inset claro), base escura,
   press real com translateY + sombra interna em 90ms. */
.pill-btn {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--btn-edge);
  border-radius: 8px;
  background: linear-gradient(180deg, #5C636C 0%, var(--btn-hi) 14%, var(--btn-lo) 86%, #2B3036 100%);
  color: #EDEFF2;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 2px 3px rgba(0, 0, 0, 0.3);
  transition: transform 90ms var(--ease), filter 0.12s, background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.pill-btn:hover { filter: brightness(1.12); }
.pill-btn:active {
  transform: translateY(1.5px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 1px 1px rgba(0, 0, 0, 0.2);
}
.pill-btn.on, .pat.on {
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  border-color: var(--blue-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 10px rgba(61, 149, 216, 0.45);
}
.pill-btn.ghost {
  background: linear-gradient(180deg, #E9EBEE, #D6DADE);
  border-color: #A7AEB6;
  color: var(--ink-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.18);
}
.pill-btn.ghost:hover { color: #8A2F2D; border-color: #B98784; filter: none; }
.pill-btn.tap.flash {
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  border-color: var(--blue-deep);
}

.sq-btn {
  width: 38px;
  height: 46px;
  border: 1px solid var(--btn-edge);
  border-radius: 9px;
  background: linear-gradient(180deg, #5C636C 0%, var(--btn-hi) 14%, var(--btn-lo) 86%, #2B3036 100%);
  color: #EDEFF2;
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 2px 3px rgba(0, 0, 0, 0.3);
  transition: transform 90ms var(--ease), filter 0.12s, box-shadow 0.18s var(--ease);
}
.sq-btn:hover { filter: brightness(1.12); }
.sq-btn:active {
  transform: translateY(1.5px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* ---------- Painel BPM GLOBAL ---------- */
.bpm-row {
  display: grid;
  grid-template-columns: 38px 1fr 38px 52px;
  gap: 7px;
  align-items: stretch;
}
.bpm-row .pill-btn.tap { height: 46px; padding: 0; border-radius: 9px; }
.bpm-lcd {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  height: 46px;
  padding: 0 8px;
  align-items: center;
}
.bpm-lcd b {
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  color: #EAF4FF;
  text-shadow: 0 0 14px rgba(120, 190, 255, 0.45);
}
.bpm-lcd span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #4FA3E0;
  align-self: center;
  margin-top: 10px;
}

.pat-row { display: flex; gap: 6px; align-items: center; }
.pat-btns { display: flex; gap: 5px; flex: 1; }
.pat {
  flex: 1;
  height: 30px;
  border: 1px solid var(--btn-edge);
  border-radius: 8px;
  background: linear-gradient(180deg, #5C636C 0%, var(--btn-hi) 14%, var(--btn-lo) 86%, #2B3036 100%);
  color: #EDEFF2;
  font-weight: 800;
  font-size: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 2px 3px rgba(0, 0, 0, 0.3);
  transition: transform 90ms var(--ease), filter 0.12s, background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.pat:hover { filter: brightness(1.12); }
.pat:active {
  transform: translateY(1.5px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 1px 1px rgba(0, 0, 0, 0.2);
}

.groove-row { display: flex; align-items: center; gap: 8px; }
.mini-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
/* Dropdown customizado de grooves: botão-LCD + menu azul-marinho. */
.dd { position: relative; flex: 1; min-width: 0; }
.dd-btn {
  width: 100%;
  height: 30px;
  padding: 0 28px 0 10px;
  display: flex;
  align-items: center;
  text-align: left;
  border: 1px solid var(--lcd-edge);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--lcd-a), var(--lcd-b) 60%, #0A101B);
  color: #BFE0FF;
  font-weight: 700;
  font-size: 11.5px;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.65),
    inset 0 -1px 0 rgba(100, 150, 210, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.55);
  transition: color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.dd-btn.placeholder { color: var(--lcd-dim); }
.dd-btn:hover { color: #D6E9FB; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(79, 163, 224, 0.35), 0 1px 0 rgba(255, 255, 255, 0.55); }
.dd-btn .dd-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 10px;
  height: 6px;
  margin-top: -3px;
  color: #51708F;
  transition: transform 0.15s var(--ease), color 0.15s;
}
.dd.open .dd-arrow { transform: rotate(180deg); color: #9FD0FF; }
.dd-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 5px;
  list-style: none;
  background: linear-gradient(180deg, #13203A, var(--lcd-b) 40%, var(--lcd-a));
  border: 1px solid #04070C;
  border-radius: 9px;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.55),
    0 3px 9px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(120, 170, 220, 0.14);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top center;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease), visibility 0s 0.15s;
}
.dd.open .dd-menu {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
.dd-menu:focus { outline: none; }
.dd-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 6px;
  color: #A9C6E4;
  font-weight: 700;
  font-size: 11.5px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.dd-opt b { font-weight: 700; font-size: 9.5px; color: #51708F; letter-spacing: 0.04em; }
.dd-opt.focus { background: rgba(61, 149, 216, 0.2); color: #E4F1FC; }
.dd-opt.focus b { color: #8FC1EC; }
.dd-opt[aria-selected="true"] {
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 9px rgba(61, 149, 216, 0.35);
}
.dd-opt[aria-selected="true"] b { color: #CFE7FA; }

/* Grupo exportar/importar */
.io-row { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.io-row .io-btn { font-size: 9px; padding: 0 4px; height: 28px; }
.io-row #wavBtn { grid-column: 1 / -1; height: 30px; font-size: 10px; }
.io-row .io-btn:disabled { opacity: 0.65; cursor: wait; transform: none; }

/* Cabeçalhos de grupo no menu de grooves */
.dd-menu { max-height: min(360px, 62vh); overflow-y: auto; }
.dd-group {
  padding: 7px 9px 3px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #51708F;
  border-top: 1px solid rgba(80, 110, 145, 0.25);
  margin-top: 3px;
}
.dd-group:first-child { border-top: 0; margin-top: 0; }

/* Comprimento do padrão + copiar */
.len-row { display: flex; align-items: center; gap: 8px; }
.len-pills { display: flex; gap: 4px; flex: 1; }
.len-pill {
  flex: 1;
  height: 24px;
  padding: 0;
  border: 1px solid var(--btn-edge);
  border-radius: 6px;
  background: linear-gradient(180deg, #5C636C 0%, var(--btn-hi) 14%, var(--btn-lo) 86%, #2B3036 100%);
  color: #C9CFD6;
  font-weight: 800;
  font-size: 9.5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 90ms var(--ease), filter 0.12s, background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.len-pill:hover { filter: brightness(1.12); }
.len-pill:active { transform: translateY(1.5px); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4); }
.len-pill.on {
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  border-color: var(--blue-deep);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 8px rgba(61, 149, 216, 0.4);
}
.copy-btn { height: 24px; padding: 0 9px; font-size: 8.5px; }
.copy-btn.on {
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  border-color: var(--blue-deep);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 9px rgba(61, 149, 216, 0.5);
}
.pat-btns.copy-dest .pat:not(.on) { animation: copyPulse 0.9s var(--ease) infinite; }
@keyframes copyPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 0 0 rgba(61, 149, 216, 0); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 9px 1px rgba(61, 149, 216, 0.55); }
}

/* Modo música */
.song-row { display: flex; align-items: center; gap: 8px; }
.song-toggle { height: 26px; padding: 0 10px; font-size: 9px; flex: none; }
.song-add { display: flex; gap: 4px; flex: 1; }
.song-addbtn {
  flex: 1;
  height: 26px;
  padding: 0;
  border: 1px solid var(--btn-edge);
  border-radius: 6px;
  background: linear-gradient(180deg, #5C636C 0%, var(--btn-hi) 14%, var(--btn-lo) 86%, #2B3036 100%);
  color: #C9CFD6;
  font-weight: 800;
  font-size: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 90ms var(--ease), filter 0.12s;
}
.song-addbtn:hover { filter: brightness(1.15); }
.song-addbtn:active { transform: translateY(1.5px); }
.song-seq {
  min-height: 30px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 7px;
  background: linear-gradient(180deg, var(--lcd-a), var(--lcd-b) 60%, #0A101B);
  border: 1px solid var(--lcd-edge);
  border-radius: 8px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.5);
}
.song-hint { font-size: 10px; font-weight: 600; color: var(--lcd-dim); }
.song-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid #1C2C44;
  border-radius: 5px;
  background: linear-gradient(180deg, #1A2A44, #12203A);
  color: #A9C6E4;
  font-weight: 800;
  font-size: 10px;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.song-chip i { font-style: normal; font-weight: 700; font-size: 9px; color: #51708F; }
.song-chip:hover { color: #E4F1FC; border-color: #2A4468; }
.song-chip:hover i { color: #D88; }
.song-chip.now {
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  border-color: var(--blue-deep);
  color: #fff;
  box-shadow: 0 0 8px rgba(61, 149, 216, 0.6);
}
.song-chip.now i { color: #CFE7FA; }

.knob-row {
  display: flex;
  gap: 22px;
  justify-content: center;
  align-items: center;
  padding: 2px 0 0;
  flex: 1;
}

/* ---------- Knobs ---------- */
.knob {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  user-select: none;
  -webkit-user-select: none;
}
.k-dial {
  position: relative;
  width: 46px;
  height: 46px;
  cursor: ns-resize;
  touch-action: none;
  border-radius: 50%;
}
.k-dial svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.k-track { fill: none; stroke: #AAB1B9; stroke-width: 3; stroke-linecap: round; }
.k-arc { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; }
.k-cap {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 46%),
    conic-gradient(from 210deg, #C7CCD2, #F5F7F9 11%, #BDC3C9 24%, #E9ECEF 38%, #ACB3BB 54%, #EEF1F3 70%, #C2C8CE 86%, #C7CCD2);
  border: 1px solid #848C96;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.4),
    0 1px 1px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -2px 3px rgba(0, 0, 0, 0.14);
}
.k-ptr {
  position: absolute;
  left: calc(50% - 1.25px);
  bottom: 50%;
  width: 2.5px;
  height: 36%;
  transform-origin: 50% 100%;
  background: linear-gradient(180deg, #20262D 0 62%, transparent 62%);
  border-radius: 2px;
  pointer-events: none;
}
.k-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}
.k-sub { font-size: 9px; font-weight: 700; color: var(--ink-faint); min-height: 12px; }
.k-dial:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.knob-lg .k-dial { width: 78px; height: 78px; }
.knob-lg .k-track, .knob-lg .k-arc { stroke-width: 3.6; }
.knob-lg .k-cap { inset: 10px; }
.knob-lg .k-ptr {
  height: 42%;
  width: 3px;
  left: calc(50% - 1.5px);
  background: linear-gradient(180deg, #2A2F36 0 26%, transparent 26%);
}
.k-val {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  line-height: 1.05;
}
.k-val .k-num { font-weight: 800; font-size: 17px; color: var(--ink); }
.k-val .k-cap-label {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}

/* ---------- Painel MASTER ---------- */
.meters {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 12px 12px 8px;
  height: 116px;
}
.meter-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.meter-col > span {
  font-size: 9px;
  font-weight: 800;
  color: var(--lcd-dim);
  letter-spacing: 0.1em;
}
.meter {
  width: 13px;
  flex: 1;
  background: #060B12;
  border: 1px solid #1B2634;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.meter i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(180deg, #F2C14E 0, var(--led-green-a) 16%, var(--led-green-b));
}
.meter::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0 3px, #060B12 3px 4px);
  pointer-events: none;
}
.meter-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 17px;
  font-size: 8.5px;
  font-weight: 700;
  color: var(--lcd-dim);
}

.master-row { display: flex; justify-content: center; }

.rate-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.rate-row .pill-btn { padding: 0 4px; font-size: 9px; }

.metro-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.metro-toggle { height: 26px; padding: 0 10px; font-size: 9px; }
.metro-toggle.on {
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  border-color: var(--blue-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 9px rgba(61, 149, 216, 0.45);
}
.metro-knob .k-dial { width: 30px; height: 30px; }
.metro-knob .k-cap { inset: 5px; }
.metro-knob .knob { flex-direction: row; gap: 5px; }

.transport-big {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 7px;
  margin-top: auto;
}
.big-btn.rec svg { fill: #D86A61; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.4)); }
.big-btn.rec.on {
  background: linear-gradient(180deg, #B44A42, #8E342D);
  border-color: #5F1F1A;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 13px rgba(216, 106, 97, 0.65);
}
.big-btn.rec.on svg { fill: #FFD9D5; filter: drop-shadow(0 0 5px rgba(255, 170, 160, 0.9)); }
.big-btn.rec.on { animation: recPulse 1.2s var(--ease) infinite; }
@keyframes recPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 9px rgba(216, 106, 97, 0.45); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 16px rgba(216, 106, 97, 0.85); }
}
.big-btn {
  height: 46px;
  border: 1px solid var(--btn-edge);
  border-radius: 10px;
  background: linear-gradient(180deg, #5C636C 0%, var(--btn-hi) 14%, var(--btn-lo) 86%, #2B3036 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 90ms var(--ease), filter 0.12s, background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.big-btn:hover { filter: brightness(1.12); }
.big-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.45), 0 1px 1px rgba(0, 0, 0, 0.2);
}
.big-btn svg { width: 20px; height: 20px; fill: #EDEFF2; }
.big-btn.play.on {
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  border-color: var(--blue-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 14px rgba(61, 149, 216, 0.55);
}

/* ---------- Strips de canal ---------- */
.strips {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.strip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 7px 7px 9px;
  background:
    linear-gradient(104deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 22%, rgba(0, 0, 0, 0.04) 46%, rgba(255, 255, 255, 0.3) 72%, rgba(255, 255, 255, 0) 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 1px, rgba(31, 36, 42, 0.025) 1px 3px),
    linear-gradient(180deg, var(--card-hi), var(--card-lo));
  border: 1px solid #8F97A0;
  border-top-color: #B9BFC6;
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(0, 0, 0, 0.16),
    inset 1px 0 0 rgba(255, 255, 255, 0.4),
    inset -1px 0 0 rgba(0, 0, 0, 0.07),
    0 4px 9px -2px rgba(0, 0, 0, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.22);
  min-width: 0;
  transition: box-shadow 0.18s var(--ease);
}
.strip-head {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(120, 130, 142, 0.45);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}
.strip-num {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #868E98;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}
.strip.muted .strip-num { color: #B0885A; }

/* Enviar amostra do canal: pill azul em destaque no topo do strip. */
.up-btn {
  flex: 1;
  min-width: 0;
  height: 19px;
  margin: 0 5px 0 6px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(26, 115, 184, 0.55);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(61, 149, 216, 0.2), rgba(26, 115, 184, 0.12));
  color: var(--blue);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.12);
  transition: color 0.15s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 90ms var(--ease);
}
.u-ic {
  width: 12px;
  height: 12px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.u-txt {
  font-weight: 800;
  font-size: 7.5px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* A seta "respira" para cima a cada ~4 s (desligada em reduced-motion). */
.u-arr { animation: upNudge 4s var(--ease) infinite; }
@keyframes upNudge {
  0%, 88%, 100% { transform: translateY(0); }
  92% { transform: translateY(-2px); }
  96% { transform: translateY(0.4px); }
}
.u-check { display: none; }
.up-btn:hover {
  color: #0F5E9C;
  border-color: var(--blue);
  background: linear-gradient(180deg, rgba(61, 149, 216, 0.34), rgba(26, 115, 184, 0.22));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 0 9px rgba(26, 115, 184, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.15);
}
.up-btn:active {
  transform: translateY(1.5px);
  box-shadow: inset 0 1px 3px rgba(15, 78, 128, 0.35);
}
/* Canal com amostra do usuário: botão aceso com check. */
.strip.custom .up-btn {
  color: #fff;
  border-color: var(--blue-deep);
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  text-shadow: 0 0 6px rgba(214, 236, 255, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 10px rgba(61, 149, 216, 0.6),
    0 1px 2px rgba(0, 0, 0, 0.2);
}
.strip.custom .up-btn { gap: 3px; padding: 0 3px; }
.strip.custom .u-txt { font-size: 7px; letter-spacing: 0.05em; }
.strip.custom .u-arr { display: none; }
.strip.custom .u-check { display: block; }
/* Restaurar o som original (só aparece com amostra do usuário). */
.rst-btn {
  width: 19px;
  height: 19px;
  flex: none;
  margin-right: 4px;
  padding: 0;
  border: 1px solid #A7AEB6;
  border-radius: 6px;
  background: linear-gradient(180deg, #EDEFF2, #D9DDE1);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 90ms var(--ease);
}
.rst-btn svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rst-btn[hidden] { display: none; }
.rst-btn:hover {
  color: var(--amber-deep);
  border-color: var(--amber-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 8px rgba(227, 162, 63, 0.45);
}
.rst-btn:active { transform: translateY(1.5px); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2); }
/* Drag-and-drop por cima do strip: borda tracejada animada + véu azul. */
.strip.dropping {
  box-shadow:
    0 0 0 3px rgba(61, 149, 216, 0.35),
    0 4px 14px -2px rgba(26, 115, 184, 0.5);
}
.strip.dropping::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 8px;
  z-index: 6;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, var(--blue) 0 7px, transparent 7px 14px),
    repeating-linear-gradient(90deg, var(--blue) 0 7px, transparent 7px 14px),
    repeating-linear-gradient(180deg, var(--blue) 0 7px, transparent 7px 14px),
    repeating-linear-gradient(180deg, var(--blue) 0 7px, transparent 7px 14px);
  background-size: 100% 2px, 100% 2px, 2px 100%, 2px 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  animation: ants 0.6s linear infinite;
}
@keyframes ants {
  to { background-position: 14px 0, -14px 100%, 0 -14px, 100% 14px; }
}
.strip.dropping::after {
  content: "SOLTE AQUI";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(214, 233, 248, 0.88);
  border-radius: 9px;
  color: var(--blue-deep);
  font-weight: 800;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  pointer-events: none;
  z-index: 5;
}
.strip-led {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 50%;
  background: #B6BCC3;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.25);
  transition: background 80ms, box-shadow 80ms;
}
.strip-led.hot { background: #6FB9EC; box-shadow: 0 0 6px rgba(61, 149, 216, 1), 0 0 13px rgba(61, 149, 216, 0.55); }
/* Plaqueta do nome: mini-LCD escuro embutido no strip. */
.strip-name {
  width: 100%;
  padding: 4px 7px;
  background: linear-gradient(180deg, var(--lcd-a), var(--lcd-b) 60%, #0A101B);
  border: 1px solid var(--lcd-edge);
  border-radius: 6px;
  color: var(--lcd-text);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 7px rgba(143, 193, 236, 0.4);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.65),
    inset 0 -1px 0 rgba(100, 150, 210, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.6);
}
.strip.custom .strip-name { color: #BFE0FF; text-shadow: 0 0 8px rgba(120, 190, 255, 0.6); }
.pad-btn {
  width: 100%;
  height: 24px;
  padding: 0;
  border: 1px solid var(--btn-edge);
  border-radius: 7px;
  background: linear-gradient(180deg, #5C636C 0%, var(--btn-hi) 14%, var(--btn-lo) 86%, #2B3036 100%);
  color: #EDEFF2;
  font-weight: 800;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 2px 3px rgba(0, 0, 0, 0.3);
  transition: transform 90ms var(--ease), filter 0.12s, background 0.1s, box-shadow 90ms var(--ease);
}
.pad-btn:hover { filter: brightness(1.12); }
.pad-btn.kbd,
.pad-btn:active {
  transform: translateY(1.5px);
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  border-color: var(--blue-deep);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.35),
    0 0 10px rgba(61, 149, 216, 0.55);
}

.strip-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}
/* Coluna de knobs do strip: PAN / TONE / SEND (+REV/DLY) */
.knob-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.knob-col .k-dial { width: 34px; height: 34px; cursor: ns-resize; }
.knob-col .k-cap { inset: 5.5px; }
.knob-col .k-track, .knob-col .k-arc { stroke-width: 3.6; }
.knob-col .k-label { font-size: 7.5px; letter-spacing: 0.1em; }
.send-dest {
  margin-top: 1px;
  padding: 1px 6px;
  border: 1px solid var(--btn-edge);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--btn-hi), var(--btn-lo));
  color: #C9CFD6;
  font-weight: 800;
  font-size: 7px;
  letter-spacing: 0.1em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 90ms var(--ease), filter 0.12s;
}
.send-dest:hover { filter: brightness(1.15); }
.send-dest:active { transform: translateY(1px); }

.fader-wrap { display: flex; align-items: stretch; gap: 2px; }
.fader-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 8px;
  font-weight: 700;
  color: #808892;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  text-align: right;
}
.fader {
  position: relative;
  width: 34px;
  height: 148px;
}
.fader::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  bottom: 6px;
  width: 6px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #171B20, #262C33 55%, #1B2026);
  border-radius: 3px;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.8),
    inset 0 -1px 1px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.65);
  pointer-events: none;
}
.fader input {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 148px;
  height: 34px;
  margin: 0;
  transform: translate(-50%, -50%) rotate(-90deg);
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}
.fader input::-webkit-slider-runnable-track { height: 34px; background: transparent; }
.fader input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 19px;
  height: 31px;
  margin-top: 1.5px;
  border-radius: 4px;
  border: 1px solid #4E565F;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0) 0 41%, var(--blue) 41% 59%, rgba(0, 0, 0, 0) 59% 100%),
    linear-gradient(180deg, #FDFEFE 0%, #E7EBEE 28%, #B4BBC2 50%, #D8DCE1 54%, #F1F3F5 100%);
  box-shadow:
    0 3px 5px rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 1px rgba(0, 0, 0, 0.2);
}
.fader input::-moz-range-track { height: 5px; background: transparent; }
.fader input::-moz-range-thumb {
  width: 19px;
  height: 31px;
  border-radius: 4px;
  border: 1px solid #4E565F;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0) 0 41%, var(--blue) 41% 59%, rgba(0, 0, 0, 0) 59% 100%),
    linear-gradient(180deg, #FDFEFE 0%, #E7EBEE 28%, #B4BBC2 50%, #D8DCE1 54%, #F1F3F5 100%);
  box-shadow:
    0 3px 5px rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 1px rgba(0, 0, 0, 0.2);
}
.fader input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

.strip-ms { display: flex; gap: 6px; }
.ms-btn {
  width: 26px;
  height: 22px;
  padding: 0;
  border-radius: 6px;
  font-weight: 800;
  font-size: 10px;
  line-height: 1;
  transition: transform 90ms var(--ease), filter 0.12s, box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}
.ms-btn:active {
  transform: translateY(1.5px);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.2);
}
.ms-btn.mute {
  border: 1px solid #8F6218;
  background: linear-gradient(180deg, #E8B35C 0%, #DCA74E 16%, #BC8428 88%, #9E6C1D 100%);
  color: #3A2504;
  opacity: 0.8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 2px 3px rgba(0, 0, 0, 0.25);
}
.ms-btn.mute.on {
  opacity: 1;
  background: linear-gradient(180deg, #FFD98E 0%, #FFC963 20%, var(--amber-deep) 100%);
  text-shadow: 0 0 6px rgba(255, 236, 190, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 12px rgba(244, 190, 99, 0.85),
    0 0 26px rgba(227, 162, 63, 0.4);
}
.ms-btn.solo {
  border: 1px solid var(--btn-edge);
  background: linear-gradient(180deg, #5C636C 0%, var(--btn-hi) 14%, var(--btn-lo) 86%, #2B3036 100%);
  color: #EDEFF2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 2px 3px rgba(0, 0, 0, 0.3);
}
.ms-btn.solo.on {
  background: linear-gradient(180deg, #6FB4E6 0%, var(--blue-hi) 20%, var(--blue) 100%);
  border-color: var(--blue-deep);
  text-shadow: 0 0 6px rgba(214, 236, 255, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 12px rgba(61, 149, 216, 0.8),
    0 0 26px rgba(61, 149, 216, 0.35);
}
.ms-btn:hover { filter: brightness(1.1); }

/* ---------- Modo demo: barra fina + cadeado + upsell ---------- */
.demo-bar {
  max-width: 1330px;
  margin: 10px auto -4px;
  padding: 5px 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, #2E333A, #23272C);
  border: 1px solid #14171B;
  border-radius: 8px;
  color: #AEB7C0;
  font-size: 11px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.demo-bar b { color: #E8C987; font-weight: 800; letter-spacing: 0.02em; }
.demo-bar a { color: #8FC1EC; font-weight: 700; text-decoration: none; }
.demo-bar a:hover { color: #BFE0FF; text-decoration: underline; }

.locked { position: relative; }
.locked::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -5px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid #14171B;
  background: #2A2F36 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><path d="M3.1 4.5V3.3a1.9 1.9 0 1 1 3.8 0v1.2" fill="none" stroke="%23F4BE63" stroke-width="1.1"/><rect x="2.2" y="4.5" width="5.6" height="3.8" rx="0.8" fill="%23F4BE63"/></svg>') center / 8px 8px no-repeat;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  z-index: 3;
}

.upsell { position: fixed; inset: 0; z-index: 100; }
.upsell-back {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 19, 0.6);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.18s var(--ease);
}
.upsell.open .upsell-back { opacity: 1; }
.upsell-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(360px, calc(100vw - 32px));
  padding: 22px 20px 18px;
  text-align: center;
  background: linear-gradient(180deg, #13203A, var(--lcd-b) 40%, var(--lcd-a));
  border: 1px solid #04070C;
  border-radius: 14px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(120, 170, 220, 0.16);
  color: #D6E9FB;
  opacity: 0;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.upsell.open .upsell-card { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.upsell-card:focus { outline: none; }
.upsell-lock {
  width: 34px;
  height: 34px;
  stroke: #F4BE63;
  fill: #F4BE63;
  stroke-width: 1.6;
  stroke-linecap: round;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 8px rgba(244, 190, 99, 0.35));
}
.upsell-card h2 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #EAF4FF;
}
.upsell-card p {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.55;
  color: #A9C6E4;
}
.upsell-actions { display: flex; gap: 8px; justify-content: center; }
.upsell-actions .pill-btn {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  text-decoration: none;
  font-size: 10px;
}
.upsell-actions .upsell-plans {
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  border-color: var(--blue-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 12px rgba(61, 149, 216, 0.5);
}
.upsell-x {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #51708F;
  font-size: 17px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.upsell-x:hover { color: #BFE0FF; background: rgba(61, 149, 216, 0.15); }

/* ---------- Barra de status ---------- */
.statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 6px 11px;
  background: linear-gradient(180deg, #CDD2D7, #C1C6CC);
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}
.status { min-height: 16px; }
.status-right { white-space: nowrap; color: var(--ink-faint); font-weight: 700; letter-spacing: 0.04em; }

.fine {
  max-width: 1330px;
  margin: 0 auto 26px;
  padding: 0 12px;
  font-size: 11px;
  color: #8A929B;
  text-align: center;
}
.fine code { color: #A6ADB5; }
.fine a { color: #9FC4E4; text-decoration: none; }
.fine a:hover { text-decoration: underline; }

/* ---------- Foco ---------- */
.step:focus-visible, .pill-btn:focus-visible, .sq-btn:focus-visible, .pat:focus-visible,
.big-btn:focus-visible, .pad-btn:focus-visible, .ms-btn:focus-visible,
.lane-name:focus-visible, .head-btn:focus-visible, .dd-btn:focus-visible,
.up-btn:focus-visible, .rst-btn:focus-visible, .strip-name:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.dd-menu:focus-visible { outline: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .deck { grid-template-columns: 1fr 1fr; }
  .panel-seq { grid-column: 1 / -1; }
  .strips { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ch-sep-pos, .ch-pos, .beats { display: none; }
}

@media (max-width: 900px) {
  .strips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .logo-sub { display: none; }
}

@media (max-width: 760px) {
  :root { --step-h: 38px; }
  body { font-size: 13px; }
  .chassis { margin: 6px; padding: 6px; border-radius: 12px; }
  .panel { padding: 8px 6px; }
  .seq-lcd { padding: 8px; }
  .apphead { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .head-left { order: 2; flex: 1 1 100%; justify-content: center; }
  .head-center { order: 1; flex: 1; justify-content: flex-start; }
  .head-right { order: 1; flex: 0 0 auto; }
  .logo-name { font-size: 14px; }

  .deck { grid-template-columns: 1fr; gap: 8px; }
  .ruler { display: none; }
  .seq { gap: 10px; }
  .lane { grid-template-columns: 1fr; gap: 4px; }
  .lane-name { height: 20px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 5px; }
  .beat-group { gap: 3px; }

  .strips { grid-template-columns: 1fr; gap: 6px; }
  .strip { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; row-gap: 7px; padding: 7px 9px; }
  .strip-head {
    width: auto;
    padding-bottom: 0;
    border-bottom: 0;
    box-shadow: none;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 108px;
  }
  .strip-led { margin-left: 0; }
  .strip-name { width: 76px; flex: none; }
  .pad-btn { width: 44px; flex: none; }
  .strip-ms { margin-left: auto; }
  .strip-mid { flex: 1 1 100%; order: 10; gap: 10px; justify-content: space-between; }
  .knob-col { flex-direction: row; gap: 12px; align-items: flex-start; }
  .knob-col .k-dial { width: 38px; height: 38px; }
  .fader-scale { display: none; }
  .fader { width: auto; max-width: none; min-width: 90px; height: 34px; flex: 1; align-self: center; }
  .fader::before {
    left: 6px;
    right: 6px;
    top: 50%;
    bottom: auto;
    width: auto;
    height: 5px;
    transform: translateY(-50%);
  }
  .fader input { width: 100%; height: 34px; transform: translate(-50%, -50%); }
  .fader input::-webkit-slider-thumb { width: 31px; height: 19px; margin-top: 7.5px; }
  .fader input::-moz-range-thumb { width: 31px; height: 19px; }
  .strip-ms { flex: none; }

  .statusbar { flex-direction: column; align-items: flex-start; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
