.aalp-player {
  --aalp-bg: transparent;
  --aalp-fg: #111111;
  --aalp-muted: #8b93a1;
  --aalp-border: #f0baff;
  --aalp-wave: #404040;
  --aalp-wave-played: #1f1f1f;
  --aalp-wave-track: rgba(64, 64, 64, 0.16);
  --aalp-lyrics-bg: rgba(255, 255, 255, 0.78);
  --aalp-shadow: none;
  margin: 24px 0;
}

.aalp-player.aalp-theme-dark,
.aalp-player.aalp-theme-light {
  --aalp-bg: transparent;
  --aalp-fg: #111111;
  --aalp-muted: #8b93a1;
  --aalp-border: #f0baff;
  --aalp-wave: #404040;
  --aalp-wave-played: #1f1f1f;
  --aalp-wave-track: rgba(64, 64, 64, 0.16);
  --aalp-lyrics-bg: rgba(255, 255, 255, 0.78);
  --aalp-shadow: none;
}

.aalp-shell {
  position: relative;
  padding: 16px 22px 24px;
  border: 2px solid var(--aalp-border);
  background: var(--aalp-bg);
  box-shadow: var(--aalp-shadow);
  overflow: hidden;
}

.aalp-shell::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -24px;
  width: 180px;
  height: 90px;
  border-top: 3px dashed rgba(202, 202, 202, 0.9);
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 100% 0 0 0;
  transform: rotate(-12deg);
  pointer-events: none;
}

.aalp-header {
  margin-bottom: 18px;
  text-align: center;
}

.aalp-kicker {
  display: none;
}

.aalp-title {
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.2;
  font-weight: 400;
  color: var(--aalp-fg);
}

.aalp-audio {
  display: none;
}

.aalp-waveform-wrap {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 14px;
}

.aalp-time {
  font-size: 0.95rem;
  line-height: 1;
  color: var(--aalp-muted);
  font-variant-numeric: tabular-nums;
}

.aalp-time-duration {
  text-align: right;
}

.aalp-waveform-shell {
  position: relative;
  height: 46px;
  display: flex;
  align-items: center;
}

.aalp-waveform {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 1px;
  pointer-events: none;
}

.aalp-waveform-bar {
  flex: 1 1 0;
  align-self: center;
  min-width: 2px;
  background: var(--aalp-wave-track);
  border-radius: 999px;
  transform-origin: center;
  transition: background-color 120ms ease;
}

.aalp-waveform-bar.is-played {
  background: var(--aalp-wave-played);
}

.aalp-progress {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  appearance: none;
}

.aalp-progress::-webkit-slider-thumb {
  appearance: none;
  width: 1px;
  height: 46px;
}

.aalp-progress::-moz-range-thumb {
  width: 1px;
  height: 46px;
  border: 0;
  background: transparent;
}

.aalp-progress::-moz-range-track {
  background: transparent;
}

.aalp-lyrics-viewport {
  min-height: 0;
  margin-top: 10px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-height: 90px;
  opacity: 1;
  transition: max-height 180ms ease, opacity 180ms ease, margin 180ms ease;
}

.aalp-lyrics-list {
  position: relative;
  width: min(100%, 680px);
  min-height: 56px;
  padding: 10px 16px;
  text-align: center;
  background: var(--aalp-lyrics-bg);
  border-radius: 999px;
}

.aalp-player:not(.is-playing) .aalp-lyrics-viewport {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.aalp-line {
  position: absolute;
  inset: 50% 16px auto;
  transform: translateY(-50%);
  color: transparent;
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  font-weight: 500;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.aalp-player:not(.is-playing) .aalp-line,
.aalp-player:not(.is-playing) .aalp-line.is-active {
  opacity: 0;
}

.aalp-line.is-active {
  opacity: 1;
}

.aalp-line.is-past,
.aalp-line.is-future {
  opacity: 0;
}

.aalp-line-karaoke {
  display: inline;
}

.aalp-word {
  --word-progress: 0;
  position: relative;
  display: inline-block;
  margin-right: 0.2em;
  color: rgba(17, 17, 17, 0.28);
}

.aalp-word-base,
.aalp-word-fill {
  display: block;
}

.aalp-word-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--word-progress) * 100%);
  overflow: hidden;
  white-space: nowrap;
  color: var(--aalp-fg);
}

.aalp-word.is-complete .aalp-word-base {
  color: var(--aalp-fg);
}

.aalp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

.aalp-control {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 28px;
  min-width: 40px;
  min-height: 28px;
  padding: 0;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: none;
  color: var(--aalp-muted) !important;
  opacity: 1 !important;
  font: inherit;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease;
}

.aalp-control:hover {
  opacity: 0.78 !important;
}

.aalp-control:active {
  transform: scale(0.96);
}

.aalp-control::before,
.aalp-control::after {
  content: none !important;
  display: none !important;
}

.aalp-icon {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: inherit;
}

.aalp-icon-play::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 12px;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 16px solid currentColor;
}

.aalp-play-toggle.is-playing .aalp-icon-play::before,
.aalp-play-toggle.is-playing .aalp-icon-play::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 5px;
  height: 22px;
  background: currentColor;
  border-radius: 2px;
}

.aalp-play-toggle.is-playing .aalp-icon-play::before {
  left: 11px;
  border: 0;
}

.aalp-play-toggle.is-playing .aalp-icon-play::after {
  left: 20px;
}

.aalp-icon-back::before,
.aalp-icon-back::after,
.aalp-icon-forward::before,
.aalp-icon-forward::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

.aalp-icon-back::before {
  left: 7px;
  border-right: 9px solid currentColor;
}

.aalp-icon-back::after {
  left: 14px;
  border-right: 9px solid currentColor;
}

.aalp-icon-forward::before {
  right: 7px;
  border-left: 9px solid currentColor;
}

.aalp-icon-forward::after {
  right: 14px;
  border-left: 9px solid currentColor;
}

.aalp-icon-back span,
.aalp-icon-forward span {
  display: none;
}

@media (max-width: 640px) {
  .aalp-shell {
    padding: 14px 14px 18px;
  }

  .aalp-waveform-wrap {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 8px;
  }

  .aalp-time {
    font-size: 0.8rem;
  }

  .aalp-lyrics-list {
    padding: 12px 12px;
    border-radius: 20px;
  }

  .aalp-line {
    inset-inline: 12px;
    font-size: 0.92rem;
  }

  .aalp-controls {
    gap: 20px;
  }
}