/* © DJFuturo Tools. Todos los derechos reservados. */
/* === DRUM MACHINE v5 === */

/* === BASE === */
.djf-dm {
  position: relative;
  width: 100%;
  max-width: none !important;
  margin: 18px auto;
  color: #222;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* === HEADER === */
.djf-dm-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.djf-tool-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 2px 2px;
  background: linear-gradient(135deg, rgba(248, 208, 88, 0.5), transparent);
  border-radius: 30px;
}

.djf-tool-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd95a 0%, #f8c040 100%);
  border: 2px solid #f0b830;
  box-shadow:
    0 2px 8px rgba(248, 208, 88, 0.25),
    0 0 0 3px rgba(248, 208, 88, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.djf-tool-badge svg {
  width: 100%;
  height: 100%;
}

.djf-tool-title h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

/* === CUERPO PRINCIPAL === */
.djf-dm-body {
  background: linear-gradient(180deg, #fbfbfb, #f3f6f9);
  box-shadow: 0 6px 18px rgba(20, 30, 50, 0.06);
  border-radius: 12px;
  padding: 0px 20px 0px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* === CONTROLES SUPERIORES === */
.djf-dm-controls-top {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8e8e8;
}

.djf-dm-control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.djf-dm-label {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 6px;
  padding-top: 6px;
}

/* === BPM === */
.djf-dm-bpm-group {
  flex: 0 0 auto;
  width: auto;
}

.djf-dm-bpm-display {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}

.djf-dm-bpm-input {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #1a1a1a;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  border: none !important;
  background: transparent !important;
  outline: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0 !important;
  margin: 0;
  width: 3ch !important;
  max-width: 3ch !important;
  min-width: 3ch !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  display: inline-block;
}

.djf-dm-bpm-input:focus {
  color: #e0a800;
  cursor: text;
}

.djf-dm-bpm-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: #e0e0e0;
  outline: none;
  cursor: pointer;
  margin-top: 2px;
}

.djf-dm-bpm-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd95a 0%, #f8c040 100%);
  border: 2px solid #e0a800;
  box-shadow: 0 1px 4px rgba(248, 208, 88, 0.5);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.djf-dm-bpm-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.djf-dm-bpm-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd95a 0%, #f8c040 100%);
  border: 2px solid #e0a800;
  cursor: pointer;
}

/* === SLIDERS GENERALES (swing, vol) === */
.djf-dm-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 110px;
  height: 4px;
  border-radius: 2px;
  background: #e0e0e0;
  outline: none;
  cursor: pointer;
  transition: none;
}

.djf-dm-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd95a 0%, #f8c040 100%);
  border: 2px solid #e0a800;
  box-shadow: 0 1px 4px rgba(248, 208, 88, 0.5);
  cursor: pointer;
}

.djf-dm-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd95a 0%, #f8c040 100%);
  border: 2px solid #e0a800;
  cursor: pointer;
}

/* === SELECT === */
.djf-select {
  padding: 6px 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, #fff, #f8f9fa);
  border: 1px solid #d0d0d0;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: #333;
  font-weight: 500;
  transition: all 0.15s ease;
}

.djf-select:hover {
  border-color: #aaa;
  background: #fff;
}

.djf-select:focus {
  outline: none;
  border-color: #f8d058;
  box-shadow: 0 0 0 3px rgba(248, 208, 88, 0.2);
}

/* === BOTONES BASE === */
.djf-btn {
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #d0d0d0;
  background: linear-gradient(180deg, #ffffff, #f8f9fa);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  transition: all 0.15s ease;
  font-family: inherit;
}

.djf-btn:hover {
  background: linear-gradient(180deg, #fafbfc, #f1f3f5);
  border-color: #bbb;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 2px 4px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.djf-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) inset;
  background: linear-gradient(180deg, #f1f3f5, #e9ecef);
}

.djf-btn-sm {
  padding: 4px 9px;
  font-size: 12px;
}

/* Flechas BPM */
.djf-bpm-arrow {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 8px;
  min-width: 28px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* === SECUENCIADOR === */
.djf-dm-sequencer {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}



.djf-dm-clear-solo-btn,
.djf-dm-clear-mute-btn {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 3px;
  border: 1px solid #e0a800;
  background: transparent;
  color: #e0a800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.djf-dm-clear-mute-btn {
  border-color: #e8b8b8;
  color: #d04040;
}

.djf-dm-clear-solo-btn:hover {
  background: rgba(248, 208, 88, 0.15);
}

.djf-dm-clear-mute-btn:hover {
  background: rgba(208, 64, 64, 0.08);
}

.djf-dm-clear-solo-btn.active {
  background: linear-gradient(180deg, #ffd95a, #f8c040);
  border-color: #e0a800;
  color: #706c6c;
  box-shadow: 0 1px 3px rgba(248, 208, 88, 0.4);
}

.djf-dm-clear-mute-btn.active {
  background: linear-gradient(180deg, #ff6b6b, #e05555);
  border-color: #c04040;
  color: #fff;
  box-shadow: 0 1px 3px rgba(220, 60, 60, 0.3);
}

/* === PISTAS === */



.djf-dm-track-name {
  font-size: 14px;
  font-weight: 600;
  color: #444;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: default;
  font-family: inherit;
  text-align: left;
}

/* Toggle Snare/Clap */
.djf-dm-toggle-name {
  cursor: pointer;
  transition: color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 2px;
  line-height: 1;
}

.djf-dm-toggle-name:hover .djf-dm-toggle-a,
.djf-dm-toggle-name:hover .djf-dm-toggle-b {
  color: #e0a800;
}

.djf-dm-toggle-sep {
  font-size: 10px;
  color: #ccc;
}

.djf-dm-toggle-a,
.djf-dm-toggle-b {
  font-size: 14px;
  font-weight: 600;
  color: #bbb;
  transition: color 0.15s ease;
}

.djf-dm-toggle-a.active,
.djf-dm-toggle-b.active {
  color: #333;
}

.djf-dm-mute-btn,
.djf-dm-solo-btn {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 3px;
  border: 1px solid #e8b8b8;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  color: #d04040;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
  touch-action: manipulation;
}

.djf-dm-solo-btn {
  border-color: #e0a800;
  background: transparent;
  color: #e0a800;
}

.djf-dm-mute-btn:hover {
  border-color: #c04040;
  background: rgba(208, 64, 64, 0.08);
}

.djf-dm-solo-btn:hover {
  background: rgba(248, 208, 88, 0.15);
}

.djf-dm-mute-btn.muted {
  background: linear-gradient(180deg, #ff6b6b, #e05555);
  border-color: #c04040;
  color: #fff;
  box-shadow: 0 1px 3px rgba(220, 60, 60, 0.3);
}

.djf-dm-solo-btn.soloed {
  background: linear-gradient(180deg, #ffd95a, #f8c040);
  border-color: #e0a800;
  color: #706c6c;
  box-shadow: 0 1px 3px rgba(248, 208, 88, 0.4);
}

/* === PASOS DEL SECUENCIADOR === */

.djf-dm-step {
  width: 100%;
  height: 28px;
  border-radius: 4px;
  border: 1px solid #b8bcc4;
  background: linear-gradient(180deg, #ffffff, #f0f2f5);
  cursor: pointer;
  transition:
    background 0.08s ease,
    border-color 0.08s ease,
    box-shadow 0.08s ease,
    transform 0.08s ease;
  padding: 0;
  font-family: inherit;
  position: relative;
  touch-action: manipulation;
}

/* Primer paso de cada grupo de 4 — marcador visual sutil */
.djf-dm-step.beat-start {
  border-color: #8a909c;
}

/* Paso activo (encendido) */
.djf-dm-step.active {
  background: linear-gradient(180deg, #ffd95a, #f8c040);
  border-color: #e0a800;
  box-shadow:
    0 0 0 1px rgba(248, 208, 88, 0.4),
    0 2px 6px rgba(248, 208, 88, 0.4);
}

.djf-dm-step.active:hover {
  background: linear-gradient(180deg, #ffe170, #f8cc50);
}

/* Paso siendo reproducido ahora (playhead) */
.djf-dm-step.playing {
  box-shadow:
    0 0 0 2px rgba(248, 208, 88, 0.8),
    0 0 10px rgba(248, 208, 88, 0.5);
  transform: scaleY(1.08);
  z-index: 1;
}

.djf-dm-step.active.playing {
  background: linear-gradient(180deg, #ffe680, #ffd040);
  box-shadow:
    0 0 0 2px #f8d058,
    0 0 14px rgba(248, 208, 88, 0.7),
    0 0 28px rgba(248, 208, 88, 0.3);
}

.djf-dm-step:hover:not(.active) {
  background: linear-gradient(180deg, #fff9e6, #fff3cc);
  border-color: #e0c060;
}

/* Kick más alto */
.djf-dm-track-kick .djf-dm-step {
  height: 32px;
}

/* === SECUENCIADOR GRID === */
.djf-dm-sequencer {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.djf-dm-seq-grid {
  display: grid;
  grid-template-columns:
    minmax(80px, 90px)   /* label */
    44px                   /* vol */
    46px                   /* btns */
    repeat(16, 1fr);       /* pasos */
  gap: 3px 3px;
  min-width: 560px;
  align-items: center;
}

/* Filas */
.djf-dm-seq-row {
  display: contents;
}

/* Columna label */
.djf-dm-col-label {
  display: flex;
  align-items: center;
  padding-right: 4px;
  overflow: hidden;
}

/* Columna vol */
.djf-dm-col-vol {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Columna btns */
.djf-dm-col-btns {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding-right: 4px;
}

/* Columna step (header y pasos) */
.djf-dm-col-step {
  width: 100%;
}

/* Números header */
.djf-dm-step-num {
  font-size: 10px;
  font-weight: 600;
  color: #bbb;
  text-align: center;
  line-height: 1;
  padding: 2px 0;
}

.djf-dm-step-num.beat-start {
  color: #999;
  font-weight: 700;
}

/* Hover fila — usando :has() donde esté soportado */
.djf-dm-track:hover > .djf-dm-col-label,
.djf-dm-track:hover > .djf-dm-col-vol,
.djf-dm-track:hover > .djf-dm-col-btns {
  background: rgba(248, 208, 88, 0.04);
}

/* Kick más alto */
.djf-dm-track-kick .djf-dm-col-step.djf-dm-step {
  height: 32px;
}

/* === VOLUMEN POR PISTA === */

.djf-dm-track-vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: #e0e0e0;
  outline: none;
  cursor: pointer;
}

.djf-dm-track-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5ab4f0, #2e90d1);
  border: 1px solid #1a72b0;
  cursor: pointer;
  transition: background 0.15s ease;
}

.djf-dm-track-vol-slider::-webkit-slider-thumb:hover {
  background: linear-gradient(135deg, #7acbff, #3aa0e8);
  border-color: #1a72b0;
}

.djf-dm-track-vol-slider::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5ab4f0, #2e90d1);
  border: 1px solid #1a72b0;
  cursor: pointer;
}

/* === CONTROLES INFERIORES === */

.djf-dm-btn-play {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 50% !important;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e0a800;
  background: linear-gradient(180deg, #ffd95a 0%, #f8c040 100%);
  color: #1a1a1a;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 2px 8px rgba(248, 208, 88, 0.4);
  cursor: pointer;
  transition: all 0.15s ease;
}

.djf-dm-btn-play:hover {
  background: linear-gradient(180deg, #ffe170, #f8cc50);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 4px 14px rgba(248, 208, 88, 0.55);
  transform: none;
}

.djf-dm-btn-play.playing {
  background: linear-gradient(180deg, #f8c040, #e8a800);
  border-color: #c08000;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.15) inset,
    0 0 0 3px rgba(248, 208, 88, 0.3);
}

.djf-dm-transport-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.djf-dm-btn-clear {
  width: 40px;
  height: 40px;
  border-radius: 50% !important;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
}

.djf-dm-btn-clear:hover {
  color: #1a1a1a;
  transform: none;
}

.djf-dm-btn-clear:hover svg {
  transform: rotate(-30deg);
  transition: transform 0.3s ease;
}

/* === FEEDBACK === */
.djf-dm-feedback {
  font-size: 12px;
  color: #aaa;
  text-align: left;
  min-height: 16px;
  letter-spacing: 0.02em;
  flex: 1;
  padding-right: 12px;
}

/* === RESPONSIVE === */

@media (max-width: 840px) {
  .djf-dm-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
  }
}

@media (max-width: 669px) {
  .djf-tool-title h1 {
    font-size: 16px;
  }

  .djf-tool-badge {
    width: 36px;
    height: 36px;
  }

  .djf-dm-body {
    padding: 14px 12px 12px 12px;
    gap: 14px;
  }

  .djf-dm-controls-top {
    gap: 14px;
  }

  .djf-dm-bpm-input {
    font-size: 21px;
  }

  .djf-dm-bpm-slider {
    width: 90px;
  }

  .djf-dm-slider {
    width: 85px;
  }

  .djf-dm-btn-play {
    width: 54px;
    height: 54px;
    min-width: 54px;
  }

  .djf-dm-controls-bottom {
    flex-direction: row;
    align-items: center;
  }

}

@media (max-width: 450px) {
  .djf-dm-controls-top {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
  }
}


@media (max-width: 360px) {
  .djf-tool-badge {
    width: 32px;
    height: 32px;
  }

  .djf-tool-title h1 {
    font-size: 15px;
  }

  .djf-dm-body {
    padding: 10px 8px 10px 8px;
  }
}

.djf-dm-controls-bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #e8e8e8;
}

.djf-dm-save-load {
  display: flex;
  gap: 6px;
  align-items: center;
}

.djf-dm-btn-save,
.djf-dm-btn-load {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 12px;
}

.djf-dm-btn-load {
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid #d0d0d0;
  background: linear-gradient(180deg, #ffffff, #f8f9fa);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 1px 3px rgba(0,0,0,0.08);
  font-weight: 500;
  color: #333;
  font-family: inherit;
  transition: all 0.15s ease;
}

.djf-dm-btn-load:hover {
  background: linear-gradient(180deg, #fafbfc, #f1f3f5);
  border-color: #bbb;
}


/* === FX === */
.djf-dm-fx-group .djf-dm-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.djf-dm-fx-toggle {
  width: 28px;
  height: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #e0e0e0;
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.djf-dm-fx-toggle-dot {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left 0.2s ease;
}

.djf-dm-fx-toggle.active {
  background: linear-gradient(180deg, #ffd95a, #f8c040);
  border-color: #e0a800;
}

.djf-dm-fx-toggle.active .djf-dm-fx-toggle-dot {
  left: 14px;
}

.djf-dm-fx-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.djf-dm-fx-controls.fx-active {
  opacity: 1;
  pointer-events: auto;
}

.djf-dm-fx-controls {
  display: grid;
  grid-template-columns: 46px auto 1fr;
  gap: 4px 5px;
  align-items: center;
}

.djf-dm-fx-row {
  display: contents;
}

.djf-dm-fx-label {
  font-size: 10px;
  font-weight: 700;
  color: #999;
  letter-spacing: 0.06em;
  width: 46px;
  flex-shrink: 0;
}

.djf-select-xs {
  padding: 3px 6px;
  font-size: 11px;
  width: 68px;
}


.djf-dm-slider-xs {
  width: 70px;
}

/* === REC BUTTON === */
.djf-dm-btn-rec {
  width: 40px;
  height: 40px;
  border-radius: 50% !important;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
 /* color: #c0392b; */
color: #a4706b;
  border-color: #e8a09a;
  background: linear-gradient(180deg, #fdf0ef, #f9e0de);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 1px 3px rgba(192,57,43,0.15);
  cursor: not-allowed;

}
.djf-dm-btn-rec:hover {
  background: linear-gradient(180deg, #fdf0ef, #f9e0de);
  border-color: #e8a09a;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 1px 3px rgba(192,57,43,0.15);
color: #a4706b;
  transform: none;
}
/*
.djf-dm-btn-rec:hover {
  transform: none;
 background: linear-gradient(180deg, #fde8e6, #f9d8d5);
  border-color: #d98880;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 2px 6px rgba(192,57,43,0.2);
  color: #a93226; 
}*/

.djf-dm-transport {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Guardar/Cargar: arriba en desktop, transport en móvil */
.djf-dm-save-load-transport {
  display: none;
}

@media (max-width: 1144px) {
  .djf-dm-save-load-transport {
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .djf-dm-save-load-top {
    display: none;
  }
  .djf-dm-controls-top {
    row-gap: 0;
  }
}

@media (max-width: 950px) {

  .djf-dm-controls-top {
    justify-content: center;
    row-gap: 10px;
  }

  /* Salto de línea forzado entre Fila A y Fila B */
  .djf-dm-row-break {
    flex-basis: 100%;
    height: 0;
  }

  /* Gap vertical reducido en labels de Fila A */
  .djf-dm-control-group:nth-child(1) .djf-dm-label,
  .djf-dm-control-group:nth-child(2) .djf-dm-label,
  .djf-dm-control-group:nth-child(3) .djf-dm-label {
    padding-bottom: 2px;
    padding-top: 2px;
  }

  /* Vol+Swing apilados */
  .djf-dm-volswing-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .djf-dm-volswing-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .djf-dm-volswing-item .djf-dm-label {
    padding-bottom: 0;
    padding-top: 0;
  }

  .djf-dm-slider::-webkit-slider-thumb,
  .djf-dm-bpm-slider::-webkit-slider-thumb {
    width: 13px;
    height: 13px;
  }

  .djf-dm-slider::-moz-range-thumb,
  .djf-dm-bpm-slider::-moz-range-thumb {
    width: 13px;
    height: 13px;
  }

  .djf-dm-fx-group {
    margin-top: -5px;
  }

}

/* Ocultar row-break fuera del breakpoint */
.djf-dm-row-break {
  display: none;
}

@media (max-width: 950px) {
  .djf-dm-row-break {
    display: block;
  }
}

/* Row-break pequeño: oculto por defecto */
.djf-dm-row-break-sm {
  display: none;
}

@media (max-width: 412px) {
  .djf-dm-row-break-sm {
    display: block;
    flex-basis: 100%;
    height: 0;
  }

  /* BPM centrado en su fila */
  .djf-dm-bpm-group {
    flex-basis: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .djf-dm-bpm-display {
    justify-content: center;
  }

  .djf-dm-bpm-slider {
    width: 140px;
  }
}

@media (max-width: 545px) {
  .djf-dm-controls-bottom {
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .djf-dm-feedback {
    flex: 1 1 auto;
    min-width: 0;
  }

  .djf-dm-transport {
    position: static;
    transform: none;
    order: 2;
    flex: 0 0 auto;
  }

  .djf-dm-save-load-transport {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
  }
}


#djfuturo-drum-machine-v3 {
  touch-action: manipulation;
}

@media (max-width: 840px) {
  .djf-dm-track-vol-slider::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
  }
  .djf-dm-track-vol-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
  }
  .djf-dm-slider-xs::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
  }
  .djf-dm-slider-xs::-moz-range-thumb {
    width: 14px;
    height: 14px;
  }
}

.djf-dm-btn-rec {
  position: relative;
}

.djf-dm-btn-rec::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 1px),
    #e8a09a calc(50% - 1px),
    #e8a09a calc(50% + 1px),
    transparent calc(50% + 1px)
  );
  border-radius: 50%;
  pointer-events: none;
}


.djf-dm-volswing-wrap {
  width: 194px;
  flex-shrink: 0;
  flex-grow: 0;
}

@media (max-width: 950px) {
  .djf-dm-volswing-wrap {
    width: auto;
    flex-shrink: 1;
    flex-grow: 0;
  }
}

.djf-dm-volswing-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.djf-dm-volswing-item .djf-dm-label {
  padding-bottom: 0;
  padding-top: 0;
  white-space: nowrap;
}

.djf-dm-volswing-item .djf-dm-slider {
  width: 110px;
}

#djf-dm-swing-val {
  display: inline-block;
  min-width: 3ch;
  text-align: right;
}

@media (min-width: 951px) {
  .djf-dm-volswing-item {
    display: grid;
    grid-template-columns: 75px 110px;
    align-items: center;
    gap: 0 8px;
padding: 4px 0;
  }

.djf-dm-volswing-item .djf-dm-slider {
    width: 110px;
    min-width: 0;
  }
}