/* Shared listen strip: waveform + timeline + region + slow / loop */
.al {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.al.is-dock {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 100%;
}
.al-wave {
  position: relative;
  min-width: 0;
  flex: 1 1 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
.al-chords {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 14px;
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
}
.al-chord {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent, #0EA5E9);
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono, ui-monospace, monospace);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.al-stage {
  position: relative;
  width: 100%;
  height: 72px;
  background: #111;
  border: 1px solid var(--border, #1A1A1A);
  touch-action: none;
  cursor: text;
  user-select: none;
  -webkit-user-select: none;
}
.al.is-dock .al-stage {
  flex: 1 1 auto;
  height: auto;
  min-height: 28px;
}
.al-overview {
  position: relative;
  flex: 0 0 22px;
  height: 22px;
  background: #080808;
  border: 1px solid var(--border, #1A1A1A);
  border-top: 0;
  cursor: text;
  touch-action: none;
  user-select: none;
  overflow: hidden;
}
.al-overview.is-demo {
  flex-basis: 32px;
  height: 32px;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.55);
}
.al-overview-canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.al-overview-win {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 8px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-sizing: border-box;
  pointer-events: none;
  z-index: 2;
}
.al-overview-loop {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 8px;
  background: rgba(14, 165, 233, 0.38);
  border-left: 2px solid #0EA5E9;
  border-right: 2px solid #0EA5E9;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 1;
}
.al-overview-loop-clear {
  pointer-events: auto;
  position: absolute;
  top: 50%;
  right: 1px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 13px;
  line-height: 16px;
  cursor: pointer;
  z-index: 3;
}
.al-overview-loop-clear:hover {
  background: #000;
  color: #fff;
}
.al-overview-loop.is-on {
  background: rgba(14, 165, 233, 0.52);
}
.al-overview-loop.is-on::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  line-height: 1;
  color: #E0F2FE;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 4px #000;
}
.al-overview-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: #64748B;
  pointer-events: none;
  z-index: 4;
}
.al-overview-hint[hidden] {
  display: none;
}
.al-overview.is-demo .al-overview-win {
  opacity: 0.2;
}
.al-overview-demo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}
.al-overview-demo[hidden] {
  display: none;
}
.al-overview-demo-sel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 16%;
  width: 4px;
  background: rgba(14, 165, 233, 0.48);
  border-left: 2px solid #38BDF8;
  border-right: 2px solid #38BDF8;
  box-sizing: border-box;
  animation: al-demo-sel 3.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.al-overview-demo-sel::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #E0F2FE;
  white-space: nowrap;
  text-shadow: 0 0 6px #000;
  opacity: 0;
  animation: al-demo-sel-label 3.8s ease-in-out infinite;
}
.al-overview-demo-press {
  position: absolute;
  top: 50%;
  left: 16%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border: 2px solid #7DD3FC;
  border-radius: 50%;
  animation: al-demo-press 3.8s ease-out infinite;
}
.al-overview-demo-cursor {
  position: absolute;
  top: 4px;
  left: 16%;
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
  animation: al-demo-cursor 3.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.al-overview-demo-ptr {
  display: block;
  width: 20px;
  height: 20px;
}
.al-overview-demo-cap {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 650;
  color: #7DD3FC;
  text-shadow: 0 0 8px #000;
  white-space: nowrap;
  animation: al-demo-cap 3.8s ease-in-out infinite;
}
@keyframes al-demo-sel {
  0%, 8% { left: 16%; width: 3px; opacity: 0; }
  14% { left: 16%; width: 6px; opacity: 1; }
  58% { left: 16%; width: 38%; opacity: 1; }
  74% { left: 16%; width: 38%; opacity: 1; }
  88%, 100% { left: 16%; width: 38%; opacity: 0; }
}
@keyframes al-demo-sel-label {
  0%, 22% { opacity: 0; }
  40%, 74% { opacity: 1; }
  88%, 100% { opacity: 0; }
}
@keyframes al-demo-press {
  0%, 6% { opacity: 0; transform: scale(0.3); }
  12% { opacity: 1; transform: scale(1.15); }
  22% { opacity: 0; transform: scale(2.1); }
  22.01%, 100% { opacity: 0; }
}
@keyframes al-demo-cursor {
  0%, 6% { left: 16%; transform: translate(0, 0) scale(1); opacity: 1; }
  12% { left: 16%; transform: translate(0, 3px) scale(0.88); }
  58% { left: 52%; transform: translate(0, 0) scale(1); }
  74% { left: 52%; transform: translate(0, 0) scale(1); opacity: 1; }
  88%, 100% { left: 52%; opacity: 0; }
}
@keyframes al-demo-cap {
  0%, 100% { opacity: 0.55; }
  40%, 70% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .al-overview-demo-sel,
  .al-overview-demo-sel::after,
  .al-overview-demo-press,
  .al-overview-demo-cursor,
  .al-overview-demo-cap {
    animation: none;
  }
  .al-overview-demo-sel {
    left: 18%;
    width: 32%;
    opacity: 0.85;
  }
  .al-overview-demo-sel::after { opacity: 1; }
  .al-overview-demo-press { display: none; }
  .al-overview-demo-cursor { left: 48%; opacity: 1; }
  .al-overview-demo-cap { opacity: 1; }
}
.al-overview-head {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  pointer-events: none;
  z-index: 3;
}
.al-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.al-playhead {
  position: absolute;
  top: 0;
  width: 12px;
  margin-left: -5px;
  height: calc(100% - 12px);
  background: transparent;
  pointer-events: auto;
  cursor: ew-resize;
  z-index: 4;
}
.al-playhead::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.al-times {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-3, #888);
  font-size: 12px;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.al.is-dock .al-times {
  display: none;
}
.al-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.al.is-dock .al-toolbar {
  flex-wrap: nowrap;
  align-items: stretch;
  height: 32px;
  gap: 0;
  border: 1px solid var(--border, #1A1A1A);
  background: #0A0A0A;
  box-sizing: border-box;
}
.al.is-dock .al-rates {
  display: none;
}
.al.is-dock .al-loop,
.al.is-dock .al-clear-loop,
.al.is-dock .al-reset {
  border: 0;
  height: 30px;
  min-height: 30px;
  line-height: 30px;
  padding: 0 12px;
  background: transparent;
  box-sizing: border-box;
}
.al.is-dock .al-loop,
.al.is-dock .al-clear-loop {
  border-right: 1px solid var(--border, #1A1A1A);
}
.al.is-dock .al-loop:hover,
.al.is-dock .al-clear-loop:hover,
.al.is-dock .al-reset:hover {
  border-color: transparent;
  background: #151515;
  color: var(--text-1, #fff);
}
.al.is-dock .al-loop.is-on {
  background: var(--accent, #0EA5E9);
  color: #000;
}
.al-clear-loop[hidden],
.al-overview-loop-clear[hidden] {
  display: none !important;
}
.al-play,
.al-loop,
.al-clear-loop,
.al-reset,
.al-rate {
  appearance: none;
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border, #1A1A1A);
  background: #0A0A0A;
  color: var(--text-2, #ccc);
  font: inherit;
  font-size: 12px;
  line-height: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.al-play {
  min-width: 32px;
  width: 32px;
  padding: 0;
}
.al-play .al-ico {
  width: 12px;
  height: 12px;
  fill: currentColor;
  display: block;
}
.al-play .al-ico-play { margin-left: 1px; }
.al-play:hover,
.al-loop:hover,
.al-clear-loop:hover,
.al-reset:hover,
.al-rate:hover {
  border-color: var(--text-3, #666);
  color: var(--text-1, #fff);
}
.al-loop.is-on,
.al-rate.is-active {
  border-color: var(--accent, #0EA5E9);
  color: var(--accent, #0EA5E9);
}
.al-rates {
  display: inline-flex;
  gap: 0;
  height: 32px;
  border: 1px solid var(--border, #1A1A1A);
}
.al-rates .al-rate {
  border: 0;
  border-right: 1px solid var(--border, #1A1A1A);
  min-width: 40px;
  height: 30px;
  min-height: 30px;
  line-height: 30px;
  background: transparent;
}
.al-rates .al-rate:last-child {
  border-right: 0;
}
.al-empty {
  color: var(--text-3, #888);
  font-size: 13px;
}
