/* Teclado MIDI · DataVizeLab — misma paleta que la web corporativa.
   En escritorio todo cabe en una pantalla: la altura de las teclas se adapta a la ventana. */

:root {
  --ink: #111621;
  --ink-2: #232a39;
  --slate: #5b6474;
  --slate-2: #99a1b0;
  --surface: #f6f8fc;
  --line: #e6eaf2;
  --line-2: #d8deeb;
  --accent: #2f5bff;
  --accent-600: #1e3fd0;
  --accent-soft: #e9efff;
  --violet: #7c5cff;
  --green: #2fb36d;
  --amber: #f0a020;
  --red: #e5484d;

  --dev-blk: rgba(255, 255, 255, 0.025);
  --dev-line: rgba(255, 255, 255, 0.055);
  --dev-label: #8a93a5;
  --dev-text: #d9dee8;
  --dev-led: #4f7bff;
  --lcd-bg: #08151c;
  --lcd-text: #9fe6ff;

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: radial-gradient(1100px 420px at 50% -160px, #e4ebff 0%, rgba(228, 235, 255, 0) 70%), var(--surface);
  color: var(--ink);
  font: 400 15px/1.5 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'ss01';
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button,
select {
  font: inherit;
}

.wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Cabecera ---------- */

.topbar {
  position: relative;
  z-index: 40;
  flex: none;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  text-decoration: none;
}

.brand-name {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-name span {
  color: var(--accent);
}

.crumb {
  margin: 0;
  padding-left: 14px;
  border-left: 1px solid var(--line-2);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line-2);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.status span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.status i {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--slate-2);
  transition: box-shadow 0.08s, background 0.08s;
}

.status[data-state='on'] i {
  background: var(--green);
}
.status[data-state='wait'] i,
.status[data-state='none'] i {
  background: var(--amber);
}
.status[data-state='err'] i {
  background: var(--red);
}
.status.rx i {
  background: #6cf0a6;
  box-shadow: 0 0 0 4px rgba(47, 179, 109, 0.22);
}

/* ---------- Botones y campos ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn svg {
  width: 16px;
  height: 16px;
  margin-left: -2px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.sm {
  height: 34px;
  padding: 0 14px;
  font-size: 13.5px;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(17, 22, 33, 0.06), 0 10px 24px -10px rgba(47, 91, 255, 0.6);
}
.btn.primary:hover {
  background: var(--accent-600);
}

.btn.ghost {
  background: #fff;
  border-color: var(--line-2);
  color: var(--ink);
}
.btn.ghost:hover {
  border-color: rgba(17, 22, 33, 0.25);
}

.btn.soft {
  background: var(--accent-soft);
  color: var(--accent);
}
.btn.soft:hover,
.btn.soft[aria-pressed='true'] {
  background: var(--accent);
  color: #fff;
}

.btn.light {
  background: #fff;
  color: var(--ink);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover,
.icon-btn[aria-expanded='true'] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.icon-btn .i-off,
.icon-btn.muted .i-on,
.icon-btn.off .i-on {
  display: none;
}

.icon-btn.muted .i-off,
.icon-btn.off .i-off {
  display: block;
}

.icon-btn .btn-label {
  display: none;
}

.icon-btn.muted {
  color: var(--red);
  border-color: #ffc9c9;
  background: #fff5f5;
}

/* Sonido todavía sin activar: el botón dice qué hacer y late para que se vea */
.icon-btn.off {
  display: inline-flex;
  gap: 7px;
  width: auto;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  animation: ring 1.8s ease-out infinite;
}

.icon-btn.off .btn-label {
  display: inline;
}

.icon-btn.off:hover {
  background: var(--ink-2);
  color: #fff;
}

@keyframes ring {
  0% {
    box-shadow: 0 0 0 0 rgba(17, 22, 33, 0.3);
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px rgba(17, 22, 33, 0);
  }
}

.select {
  appearance: none;
  -webkit-appearance: none;
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6474' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.select.sm {
  height: 34px;
  padding: 0 30px 0 11px;
  font-size: 13.5px;
}

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.seg button {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s, color 0.15s;
}

.seg button:hover {
  color: var(--ink);
}

.seg button[aria-checked='true'] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(17, 22, 33, 0.08), 0 0 0 1px var(--line-2);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  border: 0;
  background: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.switch .sw {
  position: relative;
  flex: none;
  width: 32px;
  height: 19px;
  border-radius: 999px;
  background: var(--line-2);
  transition: background 0.2s;
}

.switch .sw::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 22, 33, 0.25);
  transition: transform 0.2s;
}

.switch[aria-checked='true'] .sw {
  background: var(--accent);
}
.switch[aria-checked='true'] .sw::after {
  transform: translateX(13px);
}

/* ---------- Ventanas emergentes (monitor y guía) ---------- */

.pop {
  position: relative;
}

.pop-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  max-height: calc(100vh - 84px);
  overflow: auto;
  padding: 18px 20px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(17, 22, 33, 0.05), 0 28px 60px -24px rgba(17, 22, 33, 0.35);
  animation: pop-in 0.16s ease-out;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.pop-panel.monitor {
  width: 460px;
}

.pop-panel.help {
  width: 680px;
}

.pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.pop-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pop-actions {
  display: flex;
  gap: 6px;
}

.pop-text {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--slate);
}

.pop-text b {
  color: var(--ink);
  font-weight: 600;
}

.log {
  max-height: 300px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.log li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
}

.log li:last-child {
  border-bottom: 0;
}

.log .ch {
  color: var(--slate-2);
}

.log .msg {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log .tgt {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

.log .tgt.none {
  color: var(--slate-2);
  font-weight: 400;
}

.log .empty {
  display: block;
  padding: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--slate);
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 26px;
}

.help-grid h3 {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 600;
}

.help-grid ul {
  margin: 0;
  padding-left: 17px;
  font-size: 13.5px;
  color: var(--slate);
}

.help-grid li + li {
  margin-top: 4px;
}

.help-grid b {
  color: var(--ink);
  font-weight: 600;
}

.keys-help {
  list-style: none;
  padding-left: 0 !important;
}

.help-foot {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--slate);
}

kbd {
  display: inline-block;
  min-width: 21px;
  padding: 0 5px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  font: 600 11.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink);
  text-align: center;
}

/* ---------- Zona principal ---------- */

.main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 16px;
}

/* ---------- El teclado (cuerpo) ---------- */

.device {
  position: relative;
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 0;
  border-radius: 22px;
  border: 1px solid #0b0c0f;
  background: linear-gradient(180deg, #2a2e37 0%, #1c1e24 34%, #141519 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 32px 64px -34px rgba(17, 22, 33, 0.7), 0 3px 10px rgba(17, 22, 33, 0.14);
  color: var(--dev-text);
}

/* La firma: una línea con los colores de la marca en el canto superior */
.device::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 40px;
  right: 40px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, rgba(47, 91, 255, 0), var(--accent) 22%, var(--violet) 78%, rgba(124, 92, 255, 0));
}

/* ---------- Barra de ajustes integrada en el instrumento ---------- */

.deck {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
  margin-bottom: 14px;
  padding: 0 2px 14px;
  border-bottom: 1px solid var(--dev-line);
}

.deck-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.deck-cap {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dev-label);
}

.deck-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.deck-didactic {
  margin-left: auto;
}

/* Sonido: una pantallita con flechas, como el selector de sonidos de un sintetizador */
.preset {
  display: flex;
  align-items: stretch;
  height: 38px;
  border-radius: 9px;
  background: var(--lcd-bg);
  box-shadow: inset 0 0 0 1px #000, inset 0 2px 8px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 255, 255, 0.05);
}

.preset-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lcd-text);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}

.preset-arrow:first-child {
  border-radius: 9px 0 0 9px;
}

.preset-arrow:last-child {
  border-radius: 0 9px 9px 0;
}

.preset-arrow svg {
  width: 16px;
  height: 16px;
}

.preset-arrow:hover {
  opacity: 1;
  background: rgba(127, 224, 255, 0.08);
}

.preset-screen {
  appearance: none;
  -webkit-appearance: none;
  width: 172px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
  color: var(--lcd-text);
  text-shadow: 0 0 7px rgba(127, 224, 255, 0.5);
  text-align: center;
  text-align-last: center;
  cursor: pointer;
}

.preset-screen:focus-visible {
  outline-offset: -2px;
}

.preset-screen option,
.preset-screen optgroup,
.deck-select option {
  color: var(--ink);
  background: #fff;
  text-shadow: none;
}

/* Teclas: cada opción es un mini teclado, más ancho cuantas más teclas tiene */
.sizes {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 38px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.04);
}

.size {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 6px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--dev-label);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.size .mini-kb {
  display: block;
  width: calc(var(--w) * 1px);
  height: 11px;
  border-radius: 1.5px;
  opacity: 0.55;
  /* Teclas negras arriba (patrón de una octava cada 7 blancas de 2px) y blancas debajo */
  background:
    repeating-linear-gradient(90deg, transparent 0 1.4px, #15171c 1.4px 2.6px, transparent 2.6px 3.4px, #15171c 3.4px 4.6px, transparent 4.6px 7.4px, #15171c 7.4px 8.6px, transparent 8.6px 9.4px, #15171c 9.4px 10.6px, transparent 10.6px 11.4px, #15171c 11.4px 12.6px, transparent 12.6px 14px) top / 100% 60% no-repeat,
    repeating-linear-gradient(90deg, #e3e7ee 0 1.5px, #15171c 1.5px 2px);
  transition: opacity 0.15s;
}

.size .n {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.size:hover {
  color: var(--dev-text);
}

.size:hover .mini-kb {
  opacity: 0.85;
}

.size[aria-checked='true'] {
  background: rgba(79, 123, 255, 0.2);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(79, 123, 255, 0.6);
}

.size[aria-checked='true'] .mini-kb {
  opacity: 1;
  box-shadow: 0 0 8px rgba(79, 123, 255, 0.55);
}

/* Modelo */
.deck-select {
  appearance: none;
  -webkit-appearance: none;
  width: 158px;
  height: 38px;
  padding: 0 30px 0 12px;
  border: 1px solid #0d0e11;
  border-radius: 8px;
  background: #23262d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a93a5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 0 #0a0b0e;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--dev-text);
  cursor: pointer;
}

.deck-select:hover {
  background-color: #2b2f37;
}

/* Botones con piloto, como los del Launchkey */
.led {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid #0d0e11;
  border-radius: 8px;
  background: linear-gradient(#3b404b, #2a2e37);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 2px 0 #0a0b0e;
  font-size: 13px;
  font-weight: 500;
  color: #aeb6c6;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.led i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3a3f4a;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6);
  transition: background 0.15s, box-shadow 0.15s;
}

.led:hover {
  color: #fff;
}

.led:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 0 #0a0b0e;
}

.led[aria-checked='true'] {
  color: #fff;
}

.led[aria-checked='true'] i {
  background: var(--dev-led);
  box-shadow: 0 0 8px var(--dev-led), 0 0 2px #fff inset;
}

.led.icon {
  width: 38px;
  padding: 0;
  justify-content: center;
}

.led svg {
  width: 17px;
  height: 17px;
}

/* Notación: interruptor de dos posiciones */
.flip {
  display: inline-flex;
  height: 38px;
  padding: 3px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.04);
}

.flip button {
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dev-label);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.flip button:hover {
  color: var(--dev-text);
}

.flip button[aria-checked='true'] {
  background: linear-gradient(#4a505d, #3a3f4a);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 3px rgba(0, 0, 0, 0.5);
}

.more {
  position: relative;
}

.more summary {
  list-style: none;
  user-select: none;
}

.more summary::-webkit-details-marker {
  display: none;
}

.more[open] summary {
  color: #fff;
  background: linear-gradient(#4a505d, #3a3f4a);
}

.more-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 300px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(17, 22, 33, 0.04), 0 24px 48px -20px rgba(17, 22, 33, 0.45);
  color: var(--ink);
}

.more-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--slate);
}

/* ---------- Panel de controles ---------- */

.panel {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 12px;
}

.blk {
  padding: 12px;
  border-radius: 14px;
  background: var(--dev-blk);
  border: 1px solid var(--dev-line);
}

.ctl-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 500;
  color: var(--dev-label);
  text-align: center;
}

.ctl-label .short {
  display: none;
}

.grp-label {
  display: block;
  margin-bottom: 5px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dev-label);
}

/* Ruedas */

.blk-wheels {
  display: grid;
  grid-template-columns: repeat(2, 30px);
  grid-template-rows: 1fr auto;
  gap: 10px;
  justify-content: center;
}

.wheel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: ns-resize;
  touch-action: none;
  border-radius: 9px;
}

.w-body {
  position: relative;
  flex: 1;
  width: 30px;
  min-height: 104px;
  border-radius: 9px;
  background: #0b0c0f;
  box-shadow: inset 0 0 0 1px #000, inset 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.w-ridges {
  position: absolute;
  inset: 4px;
  border-radius: 6px;
  background: repeating-linear-gradient(180deg, #31353f 0 3px, #1b1d23 3px 6px);
  background-position: 0 calc(var(--v, 0.5) * -72px);
  box-shadow: inset 0 14px 12px -8px rgba(0, 0, 0, 0.85), inset 0 -14px 12px -8px rgba(0, 0, 0, 0.85);
}

.w-mark {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 6px;
  top: calc((1 - var(--v, 0.5)) * (100% - 14px) + 4px);
  border-radius: 3px;
  background: var(--dev-led);
  box-shadow: 0 0 10px rgba(79, 123, 255, 0.85);
}

.wheel.active .w-mark {
  background: #8aa6ff;
}

.pedal {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 6px;
  border: 1px solid #2c3039;
  border-radius: 7px;
  background: none;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--dev-label);
  cursor: pointer;
}

.pedal i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3a3f4a;
}

.pedal.lit {
  color: #f5c46a;
  border-color: rgba(240, 160, 32, 0.4);
}
.pedal.lit i {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

/* Pantalla */

.blk-screen {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 172px;
}

.lcd {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--lcd-bg);
  box-shadow: inset 0 0 0 1px #000, inset 0 3px 10px rgba(0, 0, 0, 0.7);
  font: 600 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  letter-spacing: 0.02em;
  color: var(--lcd-text);
  text-shadow: 0 0 6px rgba(127, 224, 255, 0.45);
  white-space: pre;
  overflow: hidden;
}

.lcd-row {
  min-height: 1.45em;
}

.scope {
  display: block;
  flex: none;
  width: 100%;
  height: 40px;
  border-radius: 8px;
  background: var(--lcd-bg);
  box-shadow: inset 0 0 0 1px #000;
}

.screen-btns {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
}

.screen-btns .hwb {
  width: 26px;
}

.btn-group .row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.oct {
  min-width: 18px;
  font: 600 12.5px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--dev-text);
  text-align: center;
}

/* Botones del teclado */

.hwb {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #0d0e11;
  background: linear-gradient(#3b404b, #2a2e37);
  color: #aeb6c6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 2px 0 #0a0b0e;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}

.hwb svg {
  width: 15px;
  height: 15px;
}

.hwb:hover {
  color: #fff;
}

.hwb.down {
  transform: translateY(1px);
  background: #4a505d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 0 #0a0b0e;
  color: #fff;
}

.hwb.lit {
  color: #fff;
  background: linear-gradient(#5f80ff, #2f5bff);
  box-shadow: 0 0 14px rgba(47, 91, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 0 #0a0b0e;
}

.hwb[data-id='play'].lit {
  background: linear-gradient(#4fd08a, #2fb36d);
  box-shadow: 0 0 14px rgba(47, 179, 109, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 0 #0a0b0e;
}

.hwb.rec {
  color: #ff8a8f;
}

.hwb.rec.lit {
  color: #fff;
  background: linear-gradient(#ff7378, #e5484d);
  box-shadow: 0 0 14px rgba(229, 72, 77, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 0 #0a0b0e;
  animation: rec 1s steps(2, jump-none) infinite;
}

@keyframes rec {
  50% {
    filter: brightness(0.7);
  }
}

.hwb.sm {
  width: 26px;
  height: 22px;
}

.hwb.sm svg {
  width: 13px;
  height: 13px;
}

/* Perillas y pads */

.blk-center {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.blk-center .grp-label {
  margin: 0;
}

.grp-pads {
  margin-top: auto !important;
  padding-top: 4px;
}

.pots-row,
.pads-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pots {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  container-type: inline-size;
}

.knob {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
  cursor: ns-resize;
  touch-action: none;
  border-radius: 10px;
}

.knob:focus-visible {
  outline-offset: 0;
}

.knob svg {
  width: 46px;
  height: 46px;
  max-width: 100%;
}

.k-track,
.k-val {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
}

.k-track {
  stroke: #2f333c;
}

.k-val {
  stroke: var(--dev-led);
  filter: drop-shadow(0 0 3px rgba(79, 123, 255, 0.7));
}

.k-body {
  fill: url(#knobFace);
  stroke: #0b0c0f;
  stroke-width: 1.5;
}

.knob.active .k-body {
  stroke: #4f7bff;
}

.k-ptr line {
  stroke: #f2f4f8;
  stroke-width: 2.5;
  stroke-linecap: round;
}

@container (max-width: 420px) {
  .knob .ctl-label .full {
    display: none;
  }
  .knob .ctl-label .short {
    display: inline;
  }
}

.pads {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  container-type: inline-size;
}

.pad {
  --hit: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  height: 42px;
  padding: 4px 3px;
  border-radius: 8px;
  border: 1px solid #0b0c0f;
  background: color-mix(in srgb, var(--pc) 20%, #1c1f26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px color-mix(in srgb, var(--pc) 28%, transparent);
  color: rgba(255, 255, 255, 0.55);
  font-size: 9.5px;
  font-weight: 500;
  cursor: pointer;
  touch-action: none;
  transition: background 0.35s ease-out, box-shadow 0.35s ease-out, color 0.35s;
}

.pad span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pad.hit {
  background: color-mix(in srgb, var(--pc) calc(var(--hit) * 100%), #1c1f26);
  box-shadow: 0 0 calc(20px * var(--hit)) color-mix(in srgb, var(--pc) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #fff;
  transition: none;
}

@container (max-width: 330px) {
  .pad {
    font-size: 8.5px;
  }
}

@container (max-width: 270px) {
  .pad span {
    display: none;
  }
}

/* Faders y transporte: van juntos y, si no caben en la fila, bajan a la siguiente a todo lo ancho */

.blk-right {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
}

.blk-faders {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.faders,
.faders-caption {
  display: grid;
  grid-template-columns: repeat(9, 26px);
  justify-content: space-between;
  column-gap: 5px;
}

.fader-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.fader {
  position: relative;
  width: 100%;
  height: 108px;
  cursor: ns-resize;
  touch-action: none;
  border-radius: 6px;
}

.f-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 6px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: #0a0b0e;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.05);
}

.f-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--v, 0) * 100%);
  border-radius: 3px;
  background: var(--dev-led);
  opacity: 0.9;
}

.master .f-fill {
  background: #e6e9f0;
}

.f-cap {
  position: absolute;
  left: 50%;
  bottom: calc(var(--v, 0) * (100% - 14px));
  width: min(26px, 100%);
  height: 14px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: linear-gradient(#5d6370, #3b404b 45%, #2a2e37 55%, #4b515e);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.f-cap::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: 6px;
  height: 2px;
  border-radius: 1px;
  background: #fff;
  opacity: 0.85;
}

.fader.active .f-cap {
  background: linear-gradient(#6f7686, #474d5a 45%, #353a45 55%, #5a6170);
}

.fbtn {
  width: min(26px, 100%);
  height: 15px;
  border-radius: 4px;
}

.faders-caption span {
  grid-column: 1 / 9;
  padding-top: 5px;
  border-top: 1px solid #353a44;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--dev-label);
}

.blk-faders.inactive .fader-col:not(.master) .fader {
  opacity: 0.45;
}

.blk-faders.inactive .faders-caption span::after {
  content: ' · elige Órgano';
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 500;
}

/* Visor de la nota que suena: naranja pastel apagado sobre un fondo oscuro cálido */

.note-display {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 104px;
  height: 58px;
  padding: 7px 8px;
  overflow: hidden;
  border-radius: 9px;
  background: #2a221e;
  box-shadow: inset 0 0 0 1px rgba(233, 169, 126, 0.14), inset 0 2px 8px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.nd-main,
.nd-sub {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nd-main {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #e9a97e;
  text-shadow: 0 0 12px rgba(233, 169, 126, 0.28);
}

.nd-main sub {
  position: relative;
  top: 0.1em;
  font-size: 0.62em;
  vertical-align: baseline;
}

.nd-sub {
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.25;
  color: rgba(233, 169, 126, 0.72);
}

.note-display.idle .nd-main {
  color: rgba(233, 169, 126, 0.32);
  text-shadow: none;
}

.note-display.idle .nd-sub {
  color: rgba(233, 169, 126, 0.45);
}

/* Transporte */

.blk-transport {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.transport {
  display: grid;
  grid-template-columns: repeat(2, 34px);
  gap: 7px;
}

.hwb.tp {
  width: 34px;
  height: 28px;
}

.panel[data-gen='legacy'] .tp.modern,
.panel:not([data-gen='legacy']) .tp.legacy {
  display: none;
}

.tempo {
  display: grid;
  grid-template-columns: 22px auto 22px;
  align-items: center;
  justify-items: center;
  gap: 2px 5px;
  font: 600 13.5px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--dev-text);
}

.tempo output {
  min-width: 28px;
  text-align: center;
}

.tempo .unit {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--dev-label);
}

.mini {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #0d0e11;
  background: #2b2f38;
  color: #cfd5e2;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.mini:hover {
  background: #363b46;
}

.beat {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #353a44;
}

.beat.on {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.beat.on.accent {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

/* Modo asignar */

.panel.learning .knob,
.panel.learning .fader,
.panel.learning .wheel,
.panel.learning .pad,
.panel.learning .hwb,
.panel.learning .pedal {
  outline: 1px dashed rgba(127, 160, 255, 0.55);
  outline-offset: 2px;
  cursor: crosshair;
}

.panel .learn-target,
.panel.learning .learn-target {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  animation: target 1s ease-in-out infinite;
}

@keyframes target {
  50% {
    outline-color: rgba(240, 160, 32, 0.35);
  }
}

.learn-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: min(720px, calc(100vw - 32px));
  padding: 10px 10px 10px 18px;
  transform: translateX(-50%);
  border-radius: 14px;
  border: 1px solid rgba(240, 160, 32, 0.55);
  background: #1c1f26;
  box-shadow: 0 22px 44px -18px rgba(17, 22, 33, 0.65);
  color: #e3e7ef;
  font-size: 14px;
}

.learn-bar b {
  color: #ffcf7a;
  font-weight: 600;
}

/* ---------- Teclas ---------- */

.keys-scroll {
  flex: 0 1 clamp(190px, 31vh, 300px);
  min-height: 140px;
  display: flex;
  margin: 0 -16px;
  padding: 0 16px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #3a3f4a transparent;
}

.keyboard {
  --bw: calc(100% / var(--whites) * 0.6);
  position: relative;
  flex: 1;
  min-width: calc(var(--whites) * 22px);
  max-width: calc(var(--whites) * 64px);
  margin: 0 auto;
  border-top: 6px solid #0b0c0f;
  border-radius: 4px 4px 0 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-x;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.key {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  cursor: pointer;
}

.key.white {
  z-index: 1;
  width: calc(100% / var(--whites));
  height: 100%;
  padding-bottom: 12px;
  border: 1px solid #b9bfcb;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #dfe3ea 0, #fafbfc 6%, #fff 70%, #f1f2f5 100%);
  box-shadow: inset 0 -7px 0 #e3e6ec, inset 0 -8px 0 #cfd4dd, inset 1px 0 0 #fff;
  transition: background 0.06s;
}

.key.black {
  z-index: 2;
  width: var(--bw);
  height: 62%;
  padding-bottom: 9px;
  border: 1px solid #000;
  border-top: 0;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(180deg, #121316 0, #2c2f36 72%, #1a1c21 100%);
  box-shadow: inset 0 -6px 0 #3b3f48, inset 1px 0 0 rgba(255, 255, 255, 0.07), inset -1px 0 0 rgba(255, 255, 255, 0.03), 0 3px 4px rgba(0, 0, 0, 0.55);
}

.key.white.on {
  background: linear-gradient(180deg, #2443c9 0, #4a6dff 10%, #3a61ff 100%);
  box-shadow: inset 0 -3px 0 #2546d8, inset 0 4px 8px rgba(0, 0, 0, 0.25);
  border-color: #2443c9;
}

.key.black.on {
  background: linear-gradient(180deg, #1c37b0 0, #3a61ff 85%, #2f52e6 100%);
  box-shadow: inset 0 -3px 0 #2546d8, 0 1px 2px rgba(0, 0, 0, 0.5);
}

.key.white.on.play {
  background: linear-gradient(180deg, #5b3fe0 0, #8a6dff 10%, #7c5cff 100%);
  box-shadow: inset 0 -3px 0 #5b3fe0, inset 0 4px 8px rgba(0, 0, 0, 0.25);
  border-color: #5b3fe0;
}

.key.black.on.play {
  background: linear-gradient(180deg, #4a2fc4 0, #7c5cff 85%);
}

.key.white.sus {
  background: linear-gradient(180deg, #c7d3ff 0, #e2e9ff 10%, #dbe4ff 100%);
}

.key.black.sus {
  background: linear-gradient(180deg, #1f2c66 0, #33489e 85%);
}

.note-colors .key::after {
  content: '';
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 4px;
  height: 4px;
  border-radius: 2px;
  background: var(--nc);
}

.note-colors .key.black::after {
  bottom: 3px;
  height: 3px;
}

.note-colors .key.white.on,
.note-colors .key.black.on {
  background: var(--nc);
  border-color: color-mix(in srgb, var(--nc) 70%, #000);
}

.note-colors .key.on::after {
  background: rgba(255, 255, 255, 0.85);
}

.key .lbl,
.key .num {
  display: none;
  pointer-events: none;
}

.key .lbl {
  font-size: clamp(9px, 0.8vw, 12.5px);
  font-weight: 600;
  line-height: 1;
  color: #5b6474;
  white-space: nowrap;
}

.key .lbl sub {
  position: relative;
  top: 0.15em;
  margin-left: 0.5px;
  font-size: 0.72em;
  vertical-align: baseline;
}

.key.white.c .lbl {
  color: var(--accent);
}

.show-notes .key.white .lbl {
  display: block;
}

.show-notes.show-black .key.black .lbl {
  display: block;
  font-size: clamp(7.5px, 0.6vw, 10px);
  color: #c9cfdb;
  letter-spacing: -0.02em;
}

.key .num {
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--violet);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(17, 22, 33, 0.2);
}

.key.black .num {
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  font-size: 9.5px;
  line-height: 16px;
  background: #a48dff;
}

.show-numbers .key.has-num .num {
  display: block;
}

.key.on .lbl,
.key.sus.black .lbl {
  color: #fff !important;
}

.key.on .num {
  background: #fff;
  color: var(--accent);
}

.key.on.play .num {
  color: var(--violet);
}

/* ---------- Debajo del instrumento: qué es y preguntas frecuentes ---------- */

.about {
  border-top: 1px solid var(--line);
  background: #fff;
}

.about-in {
  max-width: 1040px;
  padding-top: 72px;
  padding-bottom: 64px;
}

.about h2 {
  max-width: 22ch;
  margin: 0 0 16px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.about-lead {
  max-width: 68ch;
  margin: 0 0 10px;
  font-size: 17px;
  color: var(--slate);
}

.about-en {
  font-size: 14.5px;
  color: var(--slate-2);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 36px 0 64px;
}

.about-grid section {
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--surface);
}

.about-grid h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.about-grid p {
  margin: 0;
  font-size: 15px;
  color: var(--slate);
}

.about-grid b {
  color: var(--ink);
  font-weight: 600;
}

.faq {
  display: grid;
  gap: 8px;
  max-width: 820px;
}

.faq details {
  border-radius: 14px;
  background: var(--surface);
}

.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex: none;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
}

.faq details[open] summary::after {
  content: '−';
}

.faq p {
  max-width: 70ch;
  margin: 0;
  padding: 0 20px 18px;
  font-size: 15px;
  color: var(--slate);
}

.about-foot {
  margin: 48px 0 0;
  font-size: 13.5px;
  color: var(--slate);
}

.about-foot a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

/* ---------- Avisos ---------- */

.toast {
  position: fixed;
  top: 70px;
  left: 50%;
  z-index: 80;
  max-width: min(560px, calc(100vw - 32px));
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 18px 40px -16px rgba(17, 22, 33, 0.55);
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Tamaños de pantalla ---------- */

/* Escritorio: la herramienta ocupa justo la ventana, sin scroll (el texto de ayuda queda debajo). */
@media (min-width: 720px) and (min-height: 600px) {
  .app {
    height: 100vh;
    height: 100dvh;
  }
}

@media (max-width: 1399px) {
  .side-col {
    display: none;
  }
}

@media (max-width: 1259px) {
  .deck-didactic {
    margin-left: 0;
  }
}

@media (max-width: 1139px) {
  .wrap {
    padding: 0 18px;
  }
  .blk-right {
    flex-basis: 100%;
  }
  .faders,
  .faders-caption {
    grid-template-columns: repeat(9, minmax(26px, 60px));
  }
  .blk-transport {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 18px;
  }
  .note-display {
    width: 170px;
    height: 74px;
  }
  .nd-main {
    font-size: 26px;
  }
  .transport {
    grid-template-columns: repeat(4, 34px);
  }
}

@media (max-width: 899px) {
  .crumb {
    display: none;
  }
}

@media (max-width: 719px) {
  .wrap {
    padding: 0 14px;
  }
  .topbar-in {
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    padding: 8px 0;
    gap: 8px 12px;
  }
  .pop-panel {
    position: fixed;
    top: 64px;
    left: 12px;
    right: 12px;
    width: auto !important;
    max-height: calc(100vh - 80px);
  }
  .help-grid,
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .more-panel {
    right: auto;
    left: 0;
  }
  .device {
    padding: 12px 10px 0;
    border-radius: 18px;
  }
  .sizes {
    overflow-x: auto;
    max-width: 100%;
  }
  .keys-scroll {
    flex: none;
    height: 200px;
    margin: 0 -10px;
    padding: 0 10px 12px;
  }
  .keyboard {
    min-width: calc(var(--whites) * 30px);
  }
  .panel {
    gap: 10px;
  }
  .blk-screen {
    flex: 1 1 160px;
    width: auto;
  }
  .blk-center {
    flex: 1 1 100%;
  }
  .blk-right {
    flex-wrap: wrap;
  }
  .blk-faders,
  .blk-transport {
    flex: 1 1 100%;
  }
  .blk-transport {
    flex-wrap: wrap;
  }
  .faders,
  .faders-caption {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
  .about-in {
    padding-top: 48px;
    padding-bottom: 40px;
  }
}

@media (max-width: 520px) {
  .pots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 8px;
  }
  .status {
    max-width: 170px;
  }
}

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