/* JMMS v17.1 — presentation-only album refinements after the GDPR consent gate.
 * Same outer player height; no DOM, iframe origin, API or consent changes.
 */
.album-stream-section .album-stream-list {
  align-items: stretch;
}
.album-stream-section .album-stream-list > .album-player {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.album-stream-section .album-stream-list > .album-player > h3 {
  flex: 0 0 auto;
}
/* Fixed iframe viewport instead of the old Spotify=160, Apple=260, video=16:9.
 * Video content is letterboxed by its provider; it is NOT stretched or cropped.
 */
.album-stream-section .album-stream-list > .album-player > iframe {
  display: block;
  flex: none;
  width: 100%;
  height: 260px;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  background: #181a1f;
  color-scheme: light dark;
}
.album-stream-section .album-stream-list > .album-player-video > iframe,
.album-stream-section .album-stream-list > .album-player-spotify > iframe {
  height: 260px;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
}
/* Before consent, keep the dark placeholder at the same height as the player.
 * v17 still controls the actual iframe source and hidden state.
 */
.album-stream-section .album-stream-list > .album-player > .jmms-media-placeholder {
  flex: 1 1 auto;
  min-height: 260px;
}
[data-theme="dark"] .album-stream-section .album-stream-list > .album-player > iframe {
  color-scheme: dark;
  background: #17191d;
}
/* Apple Music's light UI is hosted on Apple's origin. We cannot restyle its
 * internals, but can gently lower its visual brightness in dark mode.
 * No invert filter (it would spoil album art and text). */
[data-theme="dark"] .album-stream-section .album-stream-list > .album-player > iframe:is(
  [src*="embed.music.apple.com"],
  [data-jmms-src*="embed.music.apple.com"]
) {
  filter: brightness(.82);
}
/* A booklet-like track list on wide screens; mobile remains one column.
 * Do not split tracks across columns, especially those with audio samples.
 * Only albums with >=9 tracks use the two-column view.
 */
@media (min-width: 1250px) {
  .album-tracks {
    max-width: min(100%, 1160px);
  }
  .album-tracks ol:has(> li:nth-child(9)) {
    column-count: 2;
    column-gap: clamp(35px, 4vw, 70px);
  }
  .album-tracks ol > li {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
@media (max-width: 600px) {
  .album-stream-section .album-stream-list > .album-player > iframe,
  .album-stream-section .album-stream-list > .album-player-video > iframe,
  .album-stream-section .album-stream-list > .album-player-spotify > iframe {
    height: 235px;
  }
  .album-stream-section .album-stream-list > .album-player > .jmms-media-placeholder {
    min-height: 235px;
  }
}
@media print {
  .album-tracks ol { column-count: 1 !important; }
  .album-stream-section .album-stream-list > .album-player > iframe {
    height: auto;
  }
}
