:root {
  --bg: #10101c;
  --card-bg: #1a1a2b;
  --card-border: rgba(255, 255, 255, 0.08);
  --lane-bg: #141424;
  --line-color: #2b2b42;
  --needle-color: #ef4444;
  --text: #ffffff;
  --text-dim: #94a3b8;
  --tone-mute: #334155;

  --c-lh: #38bdf8;
  --c-rh: #f97316;
  --c-lf: #10b981;
  --c-rf: #ec4899;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 12px 18px;
}

.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2px;
}

.app-title {
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #ffffff;
  font-weight: 800;
}

.app-credits {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-dim);
  font-weight: 500;
  margin-top: 2px;
}

.rig-container {
  display: grid;
  grid-template-columns: 190px 1fr 190px;
  gap: 12px;
  width: 100%;
  max-width: 980px;
  align-items: stretch;
}

.limb-side-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.limb-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--card-border);
  border-top: 4px solid var(--track-color);
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  justify-content: center;
}

.limb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.limb-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--track-color);
  letter-spacing: 0.5px;
}

.btn-mute {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-mute.muted {
  background: var(--tone-mute);
  color: var(--text-dim);
  text-decoration: line-through;
}

.sound-select-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sound-select {
  background: #11111d;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 3px 5px;
  font-size: 10px;
  font-weight: 600;
  outline: none;
  flex: 1;
}

.counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
  padding: 3px 6px;
}

.btn-step {
  background: #25253d;
  border: none;
  color: #fff;
  font-size: 15px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-step:active { transform: scale(0.9); background: #38385e; }

.sig-num {
  font-size: 18px;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--text-dim);
  font-weight: 700;
}

.vol-slider {
  flex: 1;
  height: 4px;
  accent-color: var(--track-color);
  cursor: pointer;
}

.metric-display {
  background: var(--lane-bg);
  border-radius: 14px;
  border: 1px solid var(--card-border);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 8px 0;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.5);
}

.metric-lane {
  position: relative;
  height: 52px;
  width: 100%;
  display: flex;
  align-items: center;
}

.lane-axis {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line-color);
  transform: translateY(-50%);
}

.lane-instrument-badge {
  position: absolute;
  left: 6px;
  top: 2px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--track-color);
  opacity: 0.8;
  text-transform: uppercase;
}

.bound-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  z-index: 2;
}
.bound-left { left: 0; background: var(--text-dim); }
.bound-right { right: 0; border-right: 2px dashed var(--text-dim); }

.tick {
  position: absolute;
  width: 26px;
  height: 48px;
  transform: translateX(-50%);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 4;
}

.tick-bar {
  width: 6px;
  border-radius: 3px;
  background-color: var(--track-color);
  transition: height 0.12s ease, filter 0.08s, opacity 0.12s;
}

.tick-head {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--track-color);
  margin-bottom: 2px;
  display: none;
}

.tick-badge {
  position: absolute;
  top: 1px;
  font-size: 8px;
  font-weight: 700;
  color: var(--text-dim);
}

.state-hyper .tick-bar {
  height: 32px;
  box-shadow: 0 0 10px var(--track-color);
  filter: brightness(1.3);
  opacity: 1;
}
.state-hyper .tick-head {
  display: block;
  box-shadow: 0 0 8px var(--track-color);
  filter: brightness(1.3);
}

.state-accent .tick-bar {
  height: 25px;
  box-shadow: 0 0 6px var(--track-color);
  opacity: 1;
}
.state-accent .tick-head { display: none; }

.state-normal .tick-bar {
  height: 17px;
  opacity: 0.85;
  box-shadow: none;
}
.state-normal .tick-head { display: none; }

.state-subtle .tick-bar {
  height: 9px;
  opacity: 0.55;
  box-shadow: none;
}
.state-subtle .tick-head { display: none; }

.state-mute .tick-bar {
  background-color: var(--tone-mute) !important;
  height: 4px;
  opacity: 0.2;
  box-shadow: none !important;
}
.state-mute .tick-head { display: none; }

.tick.flash .tick-bar, .tick.flash .tick-head {
  filter: brightness(3.5);
  transform: scale(1.25);
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--needle-color);
  box-shadow: 0 0 10px var(--needle-color);
  left: 0%;
  pointer-events: none;
  z-index: 6;
}

.click-guide {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 8.5px;
  color: var(--text-dim);
  margin-top: 4px;
  margin-bottom: 2px;
  padding: 3px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.click-guide span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.guide-bar-hyper { width: 3px; height: 12px; background: #fff; border-radius: 2px; position: relative; }
.guide-bar-hyper::after { content: ''; position: absolute; top: -2px; left: -2px; width: 7px; height: 2px; border-radius: 1px; background: #fff; }
.guide-bar-accent { width: 3px; height: 9px; background: #fff; border-radius: 1.5px; }
.guide-bar-normal { width: 3px; height: 7px; background: #fff; border-radius: 1.5px; opacity: 0.8; }
.guide-bar-subtle { width: 3px; height: 4px; background: #fff; border-radius: 1.5px; opacity: 0.55; }
.guide-bar-mute { width: 3px; height: 2px; background: var(--tone-mute); border-radius: 1px; }

.controls {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.controls-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.action-row {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.swap-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 8px 14px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.swap-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.swap-badge-count {
  font-size: 10px;
  color: var(--needle-color);
  font-weight: bold;
}

.swap-options {
  display: flex;
  gap: 3px;
  background: #141424;
  border-radius: 8px;
  padding: 2px;
}

.btn-chip {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-chip.active {
  background: #282844;
  color: #fff;
}

.bpm-box {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 6px 14px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tempo-selector {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tempo-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.tempo-select {
  background: #121220;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 700;
  outline: none;
}

.bpm-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.bpm-input {
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  width: 60px;
  text-align: right;
  outline: none;
}

.bpm-unit {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

.btn-tap {
  background: #2a2a46;
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
}

.export-settings {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
}

.bars-input {
  background: #121220;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 12px;
  font-weight: bold;
  width: 48px;
  text-align: center;
  outline: none;
}

.btn-utility {
  background: #24243a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

.btn-utility:hover {
  background: #31314d;
}

.btn-reset {
  border-color: #ef444455;
  color: #fca5a5;
}

.btn-reset:hover {
  background: #451a1a;
  color: #fff;
}

.btn-play {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}
.btn-play:active { transform: scale(0.92); }

.play-icon {
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid var(--bg);
  margin-left: 4px;
}

.pause-icon {
  display: flex;
  gap: 5px;
}
.pause-icon div {
  width: 5px;
  height: 18px;
  background: var(--bg);
  border-radius: 2px;
}

/* Botón de Presets */
.btn-preset {
  background: linear-gradient(135deg, #2b2b4e, #1c1c36);
  border-color: rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.btn-preset:hover {
  background: linear-gradient(135deg, #3b3b68, #242448);
  border-color: rgba(56, 189, 248, 0.8);
  color: #fff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

/* Modal de Presets */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 8, 16, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #161628;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  width: 100%;
  max-width: 820px;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.1);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-backdrop.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: background 0.15s;
}

.btn-close-modal:hover {
  background: rgba(239, 68, 68, 0.4);
}

.modal-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 20px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn.active, .tab-btn:hover {
  background: #252542;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 12px;
}

.preset-card {
  background: #1b1b30;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.preset-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.preset-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.preset-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.preset-tag {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.tag-polyrhythm {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.tag-clave {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.preset-subtitle {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 2px;
}

.preset-desc {
  font-size: 10px;
  color: #cbd5e1;
  line-height: 1.4;
}

.preset-badges-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-pill {
  font-size: 9px;
  font-weight: 700;
  background: #111122;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 6px;
  border-radius: 5px;
  color: #94a3b8;
}

.preset-pill strong {
  color: #fff;
}

.btn-load-preset {
  background: #252542;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-load-preset:hover {
  background: #38bdf8;
  color: #0b1120;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

@media (max-width: 600px) {
  .modal-body {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   RESPONSIVE DESIGN (MOBILE & VIEWPORT HEIGHT OPTIMIZATION)
   Ajusta elementos para caber en 100dvh en pantallas pequeñas
   ========================================== */
@media (max-width: 820px), (max-height: 760px) {
  html, body {
    min-height: 100dvh;
    height: auto;
  }

  body {
    padding: 8px 10px 16px;
    justify-content: flex-start;
    gap: 7px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .app-header {
    margin-bottom: 2px;
  }

  .app-title {
    font-size: 12px;
    letter-spacing: 1.5px;
  }

  .app-credits {
    font-size: 8.5px;
    margin-top: 1px;
    line-height: 1.1;
  }

  /* Reordenamiento: Línea de tiempo arriba, extremidades abajo */
  .rig-container {
    display: grid;
    grid-template-areas:
      "timeline timeline"
      "col-left  col-right";
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    max-width: 100%;
  }

  /* Línea de tiempo superior con mejor altura vertical */
  .metric-display {
    grid-area: timeline;
    width: 100%;
    padding: 5px 0;
    border-radius: 12px;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6);
  }

  .metric-lane {
    height: 42px;
  }

  .lane-instrument-badge {
    font-size: 8px;
    top: 2px;
    left: 6px;
    opacity: 0.9;
  }

  .tick {
    width: 22px;
    height: 38px;
  }

  .tick-badge {
    font-size: 7px;
    top: 0;
  }

  .tick-head {
    width: 6px;
    height: 6px;
    margin-bottom: 1.5px;
  }

  .state-hyper .tick-bar {
    height: 26px;
    width: 5px;
  }

  .state-accent .tick-bar {
    height: 20px;
    width: 5px;
  }

  .state-normal .tick-bar {
    height: 14px;
    width: 4px;
  }

  .state-subtle .tick-bar {
    height: 8px;
    width: 3.5px;
  }

  .state-mute .tick-bar {
    height: 3px;
    width: 3px;
  }

  /* Extremidades debajo de la línea de tiempo */
  .limb-side-col:first-of-type {
    grid-area: col-left;
  }

  .limb-side-col:last-of-type {
    grid-area: col-right;
  }

  .limb-side-col {
    gap: 7px;
  }

  .limb-card {
    padding: 8px 10px;
    border-radius: 11px;
    border-top-width: 3px;
    gap: 5px;
  }

  .limb-header {
    gap: 4px;
  }

  .limb-title {
    font-size: 10.5px;
    font-weight: 800;
  }

  .btn-mute {
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 4px;
  }

  .sound-select-row {
    margin-top: 0;
  }

  .sound-select {
    font-size: 9.5px;
    padding: 3px 6px;
    border-radius: 6px;
    height: 25px;
  }

  .counter-row {
    padding: 3px 6px;
    border-radius: 7px;
  }

  .btn-step {
    width: 23px;
    height: 23px;
    font-size: 14px;
  }

  .sig-num {
    font-size: 16px;
    min-width: 24px;
  }

  .volume-row {
    font-size: 8.5px;
    gap: 5px;
  }

  .vol-slider {
    height: 4px;
  }

  /* Guía de acentos compacta */
  .click-guide {
    gap: 8px 10px;
    margin: 3px auto;
    padding: 3px 12px;
    font-size: 8px;
    max-width: 92%;
  }

  .click-guide span {
    gap: 4px;
  }

  .guide-bar-hyper { width: 3px; height: 11px; }
  .guide-bar-accent { width: 3px; height: 9px; }
  .guide-bar-normal { width: 3px; height: 7px; }
  .guide-bar-subtle { width: 3px; height: 5px; }
  .guide-bar-mute { width: 3px; height: 2.5px; }

  /* Controles Globales */
  .controls {
    margin-top: 4px;
    gap: 7px;
    width: 100%;
  }

  .controls-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .swap-card {
    padding: 6px 10px;
    border-radius: 9px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .swap-label {
    font-size: 9px;
  }

  .swap-badge-count {
    font-size: 8.5px;
  }

  .swap-options {
    gap: 2px;
    padding: 2px;
    border-radius: 6px;
  }

  .btn-chip {
    font-size: 9px;
    padding: 3px 6px;
    border-radius: 4px;
  }

  .bpm-box {
    padding: 6px 10px;
    border-radius: 9px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .tempo-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }

  .tempo-label {
    font-size: 9px;
  }

  .tempo-select {
    font-size: 9px;
    padding: 3px 5px;
    border-radius: 6px;
    height: 24px;
    max-width: 105px;
  }

  .bpm-display {
    display: flex;
    align-items: baseline;
    gap: 2px;
    flex-shrink: 0;
  }

  .bpm-input {
    font-size: 19px;
    width: 42px;
  }

  .bpm-unit {
    font-size: 9px;
  }

  .btn-tap {
    padding: 4px 10px;
    font-size: 9.5px;
    border-radius: 6px;
    flex-shrink: 0;
  }

  /* Barra de Acciones */
  .action-row {
    gap: 6px;
    width: 100%;
  }

  .btn-utility {
    padding: 7px 11px;
    font-size: 10.5px;
    border-radius: 7px;
    gap: 5px;
  }

  .export-settings {
    padding: 4px 9px;
    font-size: 10.5px;
    border-radius: 7px;
    gap: 5px;
  }

  .bars-input {
    width: 36px;
    padding: 2px 4px;
    font-size: 11px;
  }

  /* Botón de Play */
  .btn-play {
    width: 56px;
    height: 56px;
    margin-top: 3px;
  }

  .play-icon {
    border-top-width: 9px;
    border-bottom-width: 9px;
    border-left-width: 14px;
    margin-left: 3px;
  }

  .pause-icon div {
    width: 5px;
    height: 16px;
  }
}

/* Ajuste fino para pantallas con altura extremadamente reducida (< 600px o landscape) */
@media (max-height: 600px) {
  body {
    padding: 3px 6px 6px;
    gap: 3px;
  }

  .app-header {
    display: none;
  }

  .metric-lane {
    height: 30px;
  }

  .tick {
    height: 26px;
  }

  .click-guide {
    display: none;
  }

  .limb-card {
    padding: 4px 6px;
    gap: 3px;
  }

  .btn-play {
    width: 44px;
    height: 44px;
  }
}

