@media (max-width: 759px) {
  /* Borrow a few pixels inside the fixed track-info row. The negative bottom
     margin preserves its total flow size, so the title, timeline, controls,
     and logo retain their existing positions. */
  .walkman-page .walkman-device__track-info .music-pick__artist {
    height: 1.35em;
    flex: 0 0 1.35em;
    line-height: 1.2;
    margin-bottom: -0.35em;
  }

  .walkman-page .walkman-device__deck { container-type: inline-size; }

  /* Let the open playlist grow upward over the lower fifth of the 4:3 player.
     Its list takes the remaining height and scrolls without a fixed row count. */
  .walkman-page .walkman-device__playlist-panel {
    top: -clamp(3rem, 15vw, 7rem);
    right: 0;
    bottom: 0;
    left: 0;
    height: auto;
  }

  @supports (top: 1cqi) {
    .walkman-page .walkman-device__playlist-panel { top: -15cqi; }
  }

  .walkman-page .walkman-device__playlist-list {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Desktop player is square, so the panel overlaps one fifth of its height. */
@media (min-width: 760px) {
  .walkman-page .walkman-device__deck { container-type: inline-size; }
  .walkman-page .walkman-device__playlist-panel {
    top: -clamp(4rem, 10vw, 6.2rem);
    right: 0;
    bottom: 0;
    left: 0;
    height: auto;
  }

  @supports (top: 1cqi) {
    .walkman-page .walkman-device__playlist-panel { top: -20cqi; }
  }

  .walkman-page .walkman-device__playlist-list {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow-y: auto;
  }
}
