/* ─── Audio card list ──────────────────────────────────────────── */

/* φ = 1.618 — spacing derived from golden ratio */
:root {
  --au-radius: 12px;
  --au-pad-v: 14px;
  --au-pad-h: 22px;       /* ~1.618 × 14px */
  --au-gap: 16px;
  --au-label-w: 3.89rem;
  --au-icon-size: 20px;
}

.audio-list {
  display: flex;
  flex-direction: column;
  gap: 8.7px;             /* 14 ÷ 1.618 */
  margin: 1rem 0;
}

.audio-card {
  display: flex;
  align-items: center;
  gap: var(--au-gap);
  padding: var(--au-pad-v) var(--au-pad-h);
  background: var(--md-code-bg-color);
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--au-radius);
  transition: border-color 0.18s ease, transform 0.15s ease;
  position: relative;
  overflow: hidden;
}

[data-md-color-scheme="slate"] .audio-card {
  border-color: rgba(255, 255, 255, 0.1);
}

/* left accent bar on hover */
.audio-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--md-primary-fg-color);
  border-radius: var(--au-radius) 0 0 var(--au-radius);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.audio-card:hover {
  border-color: rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

[data-md-color-scheme="slate"] .audio-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.audio-card:hover::before {
  opacity: 1;
}

/* track number */
.audio-card__index {
  font-size: 11px;
  font-weight: 500;
  color: var(--md-default-fg-color--light);
  min-width: 1.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

/* title + filename */
.audio-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* min-width: var(--au-label-w);
  max-width: var(--au-label-w); */
}

.audio-card__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--md-default-fg-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.audio-card__meta {
  font-size: 11px;
  color: var(--md-default-fg-color--light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* html5 player */
.audio-card__player {
  flex: 1;
  min-width: 0;
}

.audio-card__player audio {
  width: 100%;
  height: 32px;
  accent-color: var(--md-primary-fg-color);
  border-radius: 6px;
  outline: none;
}

/* download button (circular) */
.audio-card__download {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;               /* 20 × φ ≈ 32 */
  height: 32px;
  border-radius: 50%;
  color: var(--md-default-fg-color--light);
  text-decoration: none;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

[data-md-color-scheme="slate"] .audio-card__download {
  border-color: rgba(255, 255, 255, 0.12);
}

.audio-card__download:hover {
  color: var(--md-primary-fg-color);
  border-color: var(--md-primary-fg-color);
  background: rgba(var(--md-primary-fg-color--rgb), 0.08);
}

.audio-card__download svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ─── Mobile ≤ 600px ──────────────────────────────────────────── */
@media screen and (max-width: 600px) {
  .audio-card {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 10px;
  }
  .audio-card__index   { display: none; }
  .audio-card__info    { flex: 1; min-width: 0; max-width: calc(100% - 44px); }
  .audio-card__download { order: 2; margin-left: auto; }
  .audio-card__player  { width: 100%; order: 3; }
}