@media (max-width: 560px) {
  .player {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    will-change: transform;
    transition: padding .18s ease;
  }

  .player-inner {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto auto auto auto;
    align-items: center;
    width: calc(100% - 20px);
    max-width: 100%;
    min-height: 0;
    padding: 10px 0 14px;
    row-gap: 6px;
    transition: padding .18s ease, gap .18s ease;
  }

  .player-artwork,
  .volume,
  .debug-toggle {
    display: none;
  }

  .now-playing {
    display: contents;
  }

  .timeline {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    align-items: center;
    justify-self: stretch;
    gap: 5px;
    width: 100%;
    max-width: 100%;
    height: 20px;
    margin: 0;
  }

  #seekControl {
    min-width: 0;
    max-width: 100%;
    touch-action: pan-y;
  }

  #skipBack,
  #playToggle,
  #skipForward {
    grid-row: 2;
    position: static;
    transform: none;
    justify-self: center;
    align-self: center;
  }

  #skipBack {
    display: grid;
    grid-column: 1;
  }

  #playToggle {
    grid-column: 2;
  }

  #skipForward {
    display: grid;
    grid-column: 3;
  }

  #sleepTimer,
  #speedToggle {
    position: absolute;
    top: 55px;
    transform: translateY(-50%);
  }

  #sleepTimer {
    left: 2px;
  }

  #speedToggle {
    right: 2px;
  }

  #playbackOrderToggle {
    position: static;
    grid-column: 2;
    grid-row: 3;
    justify-self: center;
    transform: none;
    text-align: center;
  }

  #skipBack,
  #skipForward {
    place-items: center;
    padding: 0;
    line-height: 1;
    text-align: center;
  }

  #closePlayer {
    position: absolute;
    top: 18px;
    right: 0;
    z-index: 2;
    transform: translateY(-50%);
  }

  .now-label,
  .now-title {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-self: stretch;
    text-align: center;
  }

  .now-label {
    grid-row: 4;
    font-size: 8px;
  }

  .now-title {
    grid-row: 5;
    margin-top: -4px;
    font-size: 12px;
  }

  .round-control {
    width: 32px;
    height: 32px;
  }

  .play-toggle {
    width: 38px;
    height: 38px;
  }

  .speed-toggle {
    padding: 5px 8px;
  }

  .player.mobile-expanded .player-inner {
    row-gap: 12px;
    padding-top: 14px;
    padding-bottom: 22px;
  }

  .player.mobile-expanded #sleepTimer,
  .player.mobile-expanded #speedToggle {
    top: 81px;
  }

  .player.mobile-expanded #closePlayer {
    top: 32px;
  }

  .player.mobile-expanded .timeline {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 8px;
    height: 36px;
  }

  .player.mobile-expanded #seekControl {
    height: 36px;
    margin: -10px 0;
    touch-action: none;
  }
}

@media (max-width: 380px) {
  .player-inner {
    width: calc(100% - 14px);
  }

  .round-control {
    width: 30px;
    height: 30px;
    font-size: 9px;
  }

  .play-toggle {
    width: 36px;
    height: 36px;
  }

  #sleepTimer,
  #speedToggle {
    top: 54px;
    padding-inline: 6px;
  }

  #sleepTimer {
    left: 0;
  }

  #speedToggle {
    right: 0;
  }

  #playbackOrderToggle {
    padding-inline: 6px;
  }

  .player.mobile-expanded #sleepTimer,
  .player.mobile-expanded #speedToggle {
    top: 80px;
  }

  .close-player {
    font-size: 22px;
  }
}
