@property --cover-feather {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}
@property --cover-stage-feather {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}
@property --cover-flight-progress {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}
/* Full-bleed player composition from the owner's 16.11 reference.
   Other player views retain their existing layout and shared controls. */
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) {
  --player-art-h: 56.5dvh;
  background: rgb(var(--player-ambient-tint, 28, 28, 28));
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode)::after {
  background: linear-gradient(180deg, transparent 35%, rgb(25 22 21 / .08) 60%, rgb(25 22 21 / .28) 100%);
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .player-album-backdrop {
  display: block;
  opacity: 1;
  overflow: hidden;
  filter: none;
  background: rgb(var(--player-ambient-tint, 28, 28, 28)) !important;
}
#nowPlayingModal:not(.clip-mode) .player-album-backdrop::before,
#nowPlayingModal:not(.clip-mode) .player-album-backdrop::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: var(--player-artwork, none) center / 100% 50% repeat-y;
  filter: blur(55px) brightness(.55) saturate(1.35);
  animation: album-ambient-drift var(--dur-ambient-slow) var(--ease-breathe) infinite alternate;
}
#nowPlayingModal:not(.clip-mode) .player-album-backdrop::after {
  filter: blur(75px) brightness(.55) saturate(1.35);
  animation-name: album-ambient-breathe;
}
#nowPlayingModal.hidden .player-album-backdrop::before,
#nowPlayingModal.hidden .player-album-backdrop::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  #nowPlayingModal .player-album-backdrop::before,
  #nowPlayingModal .player-album-backdrop::after { animation: none; }
  #nowPlayingModal .player-album-backdrop::after { opacity: .5; }
}
html[data-motion="instant"] #nowPlayingModal .player-album-backdrop::before,
html[data-motion="instant"] #nowPlayingModal .player-album-backdrop::after { animation: none; }
html[data-motion="instant"] #nowPlayingModal .player-album-backdrop::after { opacity: .5; }
:root[data-glass="lite"] #nowPlayingModal .player-album-backdrop::after { display: none; }
:root[data-glass="solid"] #nowPlayingModal .player-album-backdrop::before,
:root[data-glass="solid"] #nowPlayingModal .player-album-backdrop::after { display: none; }
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .player-modal-nav {
  position: absolute;
  inset: 0 0 auto;
  margin: 0;
  height: 0;
  padding: 0;
  z-index: 4;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .player-modal-grabber {
  top: max(62px, calc(var(--sat) + 7px));
  left: 50%;
  width: 80px;
  height: 22px;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .player-modal-grabber::before {
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: rgb(255 255 255 / .55);
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .player-modal-scroll-body {
  position: absolute;
  top: 0;
  bottom: auto;
  left: 0;
  right: 0;
  translate: none;
  width: 100%;
  max-width: none;
  height: 63.5dvh;
  display: block;
  padding: 0;
  margin: 0;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .ios-art-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--player-art-h);
  min-height: 0;
  padding: 0;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .ios-art-card {
  width: 100%;
  max-width: none;
  height: 100%;
  aspect-ratio: auto;
  margin: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .ios-art-card img {
  object-fit: cover;
  object-position: center;
  -webkit-mask-image: linear-gradient(#000 0 76%, transparent 100%);
  mask-image: linear-gradient(#000 0 76%, transparent 100%);
}
/* При паузе нижний край растушёвывается, пока обложка плавно увеличивается. */
#nowPlayingModal:not(.queue-mode):not(.clip-mode) .ios-art-card {
  --cover-square: max(0px, min(calc(100vw - 64px), calc(var(--player-art-h) - 80px)));
}
#nowPlayingModal:not(.queue-mode):not(.clip-mode):is(:not(.player-morphing), .player-cover-flight) .ios-art-card {
  --cover-stage-feather: calc(25% * var(--cover-flight-progress, 1));
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--cover-stage-feather)), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--cover-stage-feather)), transparent 100%);
}
#nowPlayingModal:not(.queue-mode):not(.clip-mode):not(.player-morphing) .ios-art-card {
  transition: --cover-stage-feather var(--dur-move) var(--ease-audio-player);
}
body.is-playing #nowPlayingModal:not(.queue-mode):not(.clip-mode):is(:not(.player-morphing), .player-cover-flight) .ios-art-card {
  --cover-stage-feather: 0%;
}
#nowPlayingModal:not(.queue-mode):not(.clip-mode).player-cover-flight .ios-art-card img,
#nowPlayingModal:not(.queue-mode):not(.clip-mode):not(.player-morphing) .ios-art-card img {
  --cover-feather: calc(35% * var(--cover-flight-progress, 1));
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--cover-feather)), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--cover-feather)), transparent 100%);
}
#nowPlayingModal.player-cover-flight:not(.queue-mode):not(.clip-mode) .ios-art-card img,
#nowPlayingModal:not(.queue-mode):not(.clip-mode):not(.player-morphing) .ios-art-card img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--cover-square);
  height: var(--cover-square);
  max-width: none;
  object-fit: contain;
  transform: translate(-50%, -50%) scale(1.8);
  border-radius: var(--r-card);
}
#nowPlayingModal:not(.queue-mode):not(.clip-mode):not(.player-morphing) .ios-art-card img {
  transition: transform var(--dur-move) var(--ease-audio-player), --cover-feather var(--dur-move) var(--ease-audio-player);
}
body.is-playing #nowPlayingModal.player-cover-flight:not(.queue-mode):not(.clip-mode) .ios-art-card img,
body.is-playing #nowPlayingModal:not(.queue-mode):not(.clip-mode):not(.player-morphing) .ios-art-card img {
  transform: translate(-50%, -50%) scale(1);
}
body.is-playing #nowPlayingModal:not(.queue-mode):not(.clip-mode):is(:not(.player-morphing), .player-cover-flight) .ios-art-card img {
  --cover-feather: 0%;
}
@media (prefers-reduced-motion: reduce) {
  #nowPlayingModal:not(.queue-mode):not(.clip-mode):not(.player-morphing) .ios-art-card { transition: none; }
  #nowPlayingModal:not(.queue-mode):not(.clip-mode):not(.player-morphing) .ios-art-card img { transition: none; }
}
html[data-motion="instant"] #nowPlayingModal:not(.queue-mode):not(.clip-mode):not(.player-morphing) .ios-art-card { transition: none; }
html[data-motion="instant"] #nowPlayingModal:not(.queue-mode):not(.clip-mode):not(.player-morphing) .ios-art-card img { transition: none; }
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .ios-track-meta {
  position: absolute;
  top: var(--player-art-h);
  left: 32px;
  right: 32px;
  width: auto;
  min-height: 62px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .ios-track-text { flex: 1; min-width: 0; }
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .ios-track-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: -.025em;
  text-align: left;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .ios-track-artist {
  margin: 3px 0 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 25px;
  color: rgb(255 255 255 / .65);
  text-align: left;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .ios-track-actions { padding: 0; gap: 0; }
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) #trackStarBtn { display: none; }
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) #trackMoreBtn {
  display: flex;
  width: 44px;
  height: 44px;
  margin-right: -6px;
  background: none;
  border: 0;
  box-shadow: none;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) #trackMoreBtn svg { width: 26px; height: 26px; }
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .player-fixed-controls {
  top: 66dvh;
  bottom: calc(8px + var(--sab));
  left: 32px;
  right: 32px;
  translate: none;
  width: auto;
  max-width: none;
  height: auto;
  margin: 0;
  display: grid;
  grid-template-rows: 40px minmax(64px, 1fr) 40px 48px;
  row-gap: 12px;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .player-fixed-controls > * { margin: 0; padding: 0; }
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .ios-time-row {
  margin-top: 11px;
  font-size: 12px;
  font-weight: 500;
  color: rgb(255 255 255 / .42);
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .ios-slider-track {
  height: 7px;
  border-radius: 5px;
  background: rgb(255 255 255 / .25);
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .ios-slider-fill { background: rgb(255 255 255 / .65); }
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .ios-controls-cluster {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  justify-items: center;
  min-height: 0;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) :is(.ctrl-shuffle, .ctrl-repeat) { display: none; }
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) :is(.ctrl-prev, .ctrl-next, .ios-play-hero) {
  width: 64px;
  height: 64px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  color: #fff;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) :is(.ctrl-prev, .ctrl-next) svg { width: 44px; height: 44px; }
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) #playBtn svg { width: 48px; height: 48px; }
#nowPlayingModal .player-fixed-controls > .ios-modal-volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) :is(.vol-icon, .vol-icon-btn) { color: rgb(255 255 255 / .65); }
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .vol-icon-btn { min-width: 18px; }
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) #volumeSlider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 4px;
  background: linear-gradient(to right, rgb(255 255 255 / .65) var(--vol-fill, 100%), rgb(255 255 255 / .25) var(--vol-fill, 100%));
}
/* Volume remains available in the fixed player controls while EQ is open. */
#studioEqSheet .eq-volume-label { display: none; }
#nowPlayingModal.queue-mode { --player-controls-h: 270px; }
#nowPlayingModal.queue-mode .player-fixed-controls {
  height: 270px;
  grid-template-rows: 38px 90px 26px 44px;
  gap: 16px;
}
@media (max-height: 740px) {
  #nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) { --player-art-h: 50dvh; }
  #nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .player-modal-scroll-body { height: 61dvh; }
  #nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .player-fixed-controls {
    top: 63dvh;
    grid-template-rows: 32px minmax(48px, 1fr) 28px 40px;
    row-gap: 6px;
  }
  #nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .ios-track-meta { left: 24px; right: 24px; }
  #nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) .player-fixed-controls { left: 24px; right: 24px; }
}

#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) #volumeSlider::-webkit-slider-thumb {
  width: 1px;
  height: 6px;
  margin-top: 0;
  box-shadow: none;
  background: transparent;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) #volumeSlider::-moz-range-thumb {
  width: 1px;
  height: 6px;
  border: 0;
  background: transparent;
}

/* Resize isolated painted layers so the end caps stay circular, without scaling. */
:root { --ease-audio-player: cubic-bezier(.32, .08, .24, 1); }
#nowPlayingModal:not(.clip-mode) { --ease-player-controls: var(--ease-audio-player); }
#nowPlayingModal { --slider-shape-ease: var(--ease-player-controls, var(--clip-slider-shape-ease, cubic-bezier(.3, 1.3, .5, 1))); }
#nowPlayingModal #progressBarContainer { background: transparent; }
#nowPlayingModal #progressBarContainer .ios-slider-clip {
  background: rgb(255 255 255 / .25);
  border-radius: 999px;
  transition: inset var(--dur-move) var(--slider-shape-ease);
}
#nowPlayingModal #progressBarContainer.is-scrubbing .ios-slider-clip {
  inset: -5px -2.5%;
}
#nowPlayingModal #progressBarContainer.is-scrubbing .ios-slider-fill { background: #fff; }
#nowPlayingModal .vol-slider-wrap { position: relative; }
#nowPlayingModal .vol-slider-wrap::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 6px;
  margin-top: -3px;
  border-radius: 999px;
  background: linear-gradient(to right, rgb(255 255 255 / .65) var(--vol-fill, 100%), rgb(255 255 255 / .25) var(--vol-fill, 100%));
  pointer-events: none;
  transition: height var(--dur-move) var(--slider-shape-ease), margin-top var(--dur-move) var(--slider-shape-ease), left var(--dur-move) var(--slider-shape-ease), right var(--dur-move) var(--slider-shape-ease);
}
#nowPlayingModal .vol-slider-wrap.is-adjusting::before {
  height: 17px;
  margin-top: -8.5px;
  left: -2.5%;
  right: -2.5%;
}
#nowPlayingModal:is(:not(.queue-mode), .queue-mode):not(.clip-mode) #volumeSlider::-webkit-slider-runnable-track { background: transparent; }
#nowPlayingModal #volumeSlider::-moz-range-track { background: transparent; }
@media (prefers-reduced-motion: reduce) {
  #nowPlayingModal #progressBarContainer .ios-slider-clip,
  #nowPlayingModal .vol-slider-wrap::before { transition: none; }
}

#nowPlayingModal .volume-wave,
#nowPlayingModal .volume-mute-mark {
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-player-controls, var(--ease-out));
}
#nowPlayingModal [data-volume-level="0"] .volume-mute-mark,
#nowPlayingModal [data-volume-level="1"] .volume-wave-1,
#nowPlayingModal [data-volume-level="2"] :is(.volume-wave-1, .volume-wave-2),
#nowPlayingModal [data-volume-level="3"] .volume-wave { opacity: 1; }
#nowPlayingModal #volMuteBtn svg {
  transform: scale(var(--volume-low-scale, 1));
  transition: transform var(--dur-move) var(--ease-player-controls, var(--ease));
}
#nowPlayingModal #volMaxBtn {
  transform: scale(var(--volume-high-scale, 1));
  transition: transform var(--dur-move) var(--ease-player-controls, var(--ease));
}
@media (prefers-reduced-motion: reduce) {
  #nowPlayingModal :is(.volume-wave, .volume-mute-mark, #volMaxBtn),
  #nowPlayingModal #volMuteBtn svg { transition: none; }
}

#nowPlayingModal #progressBarFill {
  transition: transform var(--dur-fast) var(--ease-player-controls, var(--ease));
}
@media (prefers-reduced-motion: reduce) {
  #nowPlayingModal #progressBarFill { transition: none; }
}

/* Clicks travel smoothly; direct dragging always removes this opt-in state. */
@property --vol-fill {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 100%;
}
#nowPlayingModal .vol-slider-wrap.is-volume-command {
  transition: --vol-fill var(--dur-move) var(--ease-player-controls, var(--ease-breathe));
}
@media (prefers-reduced-motion: reduce) {
  #nowPlayingModal .vol-slider-wrap.is-volume-command { transition: none; }
}

/* Lyrics use the same fixed transport, with a compact identity row above the text. */
#nowPlayingModal.queue-mode:not(.clip-mode) .player-modal-scroll-body {
  top: max(92px, var(--player-top));
  bottom: calc(34dvh + 16px);
  height: auto;
  left: 0;
  right: 0;
  width: 100%;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: 72px minmax(0, 1fr);
  gap: 14px 12px;
  overflow: hidden;
}
#nowPlayingModal.queue-mode:not(.clip-mode) .ios-art-stage {
  position: relative;
  inset: auto;
  grid-area: 1 / 1;
  width: 72px;
  height: 72px;
  margin: 0;
}
#nowPlayingModal.queue-mode:not(.clip-mode) .ios-art-card {
  width: 72px;
  min-width: 0;
  height: 72px;
  border-radius: 9px;
}
#nowPlayingModal.queue-mode:not(.clip-mode) .ios-art-card img {
  mask-image: none;
  -webkit-mask-image: none;
}
/* Keep the viewport clip, not the new grid's bounds, during the artwork flight. */
#nowPlayingModal.lyrics-artwork-morphing:not(.clip-mode) .player-modal-scroll-body {
  overflow: visible;
}
#nowPlayingModal.lyrics-artwork-morphing:not(.clip-mode) .ios-art-card {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--cover-stage-feather)), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--cover-stage-feather)), transparent 100%);
}
#nowPlayingModal.lyrics-artwork-morphing:not(.clip-mode) .ios-art-card img {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--cover-feather)), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--cover-feather)), transparent 100%);
}
#nowPlayingModal.lyrics-artwork-morphing:not(.clip-mode):not(.player-morphing) :is(.ios-art-card, .ios-art-card img) {
  transition: none;
}
#nowPlayingModal.queue-mode:not(.clip-mode) .ios-track-meta {
  position: relative;
  inset: auto;
  grid-area: 1 / 2;
  width: 100%;
  min-height: 0;
  height: 72px;
  gap: 4px;
}
#nowPlayingModal.queue-mode:not(.clip-mode) .ios-track-title { font-size: 17px; line-height: 22px; }
#nowPlayingModal.queue-mode:not(.clip-mode) .ios-track-artist { font-size: 15px; line-height: 20px; margin-top: 1px; }
#nowPlayingModal.queue-mode:not(.clip-mode) #trackMoreBtn { width: 36px; min-width: 36px; }
#nowPlayingModal.queue-mode:not(.clip-mode) #lyricsPanel {
  grid-area: 2 / 1 / 3 / -1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#nowPlayingModal.queue-mode:not(.clip-mode) #lyricsContent {
  padding: 22px 0 60%;
  gap: 28px;
  --player-edge-fade: 32px;
  text-align: left;
}
#nowPlayingModal.queue-mode:not(.clip-mode) .lyrics-line {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.025em;
  text-align: left;
  color: rgb(255 255 255 / .36);
  opacity: .65;
  filter: blur(3px);
  transform: none;
  scale: none;
  transition: color var(--dur-move) var(--ease-audio-player), opacity var(--dur-move) var(--ease-audio-player),
              filter var(--dur-move) var(--ease-audio-player);
}
#nowPlayingModal.queue-mode:not(.clip-mode) .lyrics-line.lyrics-near { filter: blur(2px); opacity: .8; }
#nowPlayingModal.queue-mode:not(.clip-mode) .lyrics-line.active {
  color: #fff;
  opacity: 1;
  filter: none;
  transform: none;
  scale: none;
}
#nowPlayingModal.queue-mode:not(.clip-mode) .lyrics-line::before { display: none; }
#nowPlayingModal.queue-mode:not(.clip-mode) .is-plain .lyrics-line {
  font-size: 28px;
  color: rgb(255 255 255 / .85);
  opacity: 1;
  filter: none;
}
#nowPlayingModal.queue-mode:not(.clip-mode) #lyricsToggleBtn {
  border-radius: 50%;
  background: transparent;
}
@media (max-height: 740px) {
  #nowPlayingModal.queue-mode:not(.clip-mode) .player-modal-scroll-body {
    padding: 0 24px;
    bottom: calc(37dvh + 12px);
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-rows: 56px minmax(0, 1fr);
    row-gap: 8px;
  }
  #nowPlayingModal.queue-mode:not(.clip-mode) :is(.ios-art-stage, .ios-art-card) { width: 56px; height: 56px; }
  #nowPlayingModal.queue-mode:not(.clip-mode) .ios-track-meta { height: 56px; }
  #nowPlayingModal.queue-mode:not(.clip-mode) .lyrics-line { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  #nowPlayingModal.queue-mode:not(.clip-mode) .lyrics-line { transition: none; }
}

#nowPlayingModal :is(.lyrics-mode .lyrics-line, .lyrics-panel-leaving .lyrics-line) { padding: 0; margin: 0; }
#nowPlayingModal :is(#lyricsToggleBtn.active, #queueToggleBtn.active, #openEqBtn.view-active) {
  width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; justify-self: center; border-radius: 50%;
  background: rgb(255 255 255 / .65);
  color: #3a3837;
}
#nowPlayingModal.queue-mode:not(.lyrics-mode):not(.equalizer-mode) .player-modal-scroll-body {
  grid-template-rows: 72px 38px minmax(0,1fr);
}
#nowPlayingModal.queue-mode:not(.lyrics-mode):not(.equalizer-mode) #playerQueueModes {
  grid-area: 2 / 1 / 3 / -1;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
}
#nowPlayingModal #playerQueueModes .ios-icon-btn {
  display: grid; place-items: center; width: 100%; height: 38px;
  border-radius: 24px; background: rgb(255 255 255 / .14); color: #fff;
}
#nowPlayingModal #playerQueueModes .ios-icon-btn.active { background: rgb(255 255 255 / .7); color: #4b4746; }
#nowPlayingModal.queue-mode:not(.lyrics-mode):not(.equalizer-mode) #playerQueueContainer {
  grid-area: 3 / 1 / 4 / -1; margin: 0; min-height: 0;
}
#nowPlayingModal .player-queue-header { display: block; flex: none; padding: 3px 0 14px; }
#nowPlayingModal .player-queue-title { font-size: 17px; font-weight: 650; color: #fff; }
#nowPlayingModal .player-queue-subtitle { font-size: 13px; margin-top: 3px; color: rgb(255 255 255 / .6); }
#nowPlayingModal.queue-mode #playerQueueList { margin: 0; padding: 0 0 24px; --player-edge-fade: 16px; }
#nowPlayingModal.queue-mode #playerQueueList .ios-track-item { min-height: 56px; padding: 4px 0; border-radius: 0; }
#nowPlayingModal.queue-mode #playerQueueList .track-cover-sm { width: 48px; height: 48px; border-radius: 4px; }
#nowPlayingModal.queue-mode #playerQueueList .queue-track-select { gap: 12px; }
#nowPlayingModal.queue-mode #playerQueueList .track-name-main { font-size: 16px; font-weight: 400; }
#nowPlayingModal.queue-mode #playerQueueList .track-artist-sub { font-size: 12px; color: rgb(255 255 255 / .6); }
#nowPlayingModal.queue-mode .player-fixed-controls {
  transition: transform var(--dur-move) var(--ease-player-controls, var(--ease-page)),
              opacity var(--dur-move) var(--ease-player-controls, var(--ease));
}
#nowPlayingModal.queue-reordering .player-fixed-controls { transform: translateY(40dvh); opacity: 0; pointer-events: none; }
#nowPlayingModal.queue-reordering .player-modal-scroll-body { bottom: calc(8px + var(--sab)); }
@media (max-height:740px) {
 #nowPlayingModal.queue-mode:not(.lyrics-mode):not(.equalizer-mode) .player-modal-scroll-body { grid-template-rows: 56px 38px minmax(0,1fr); }
}
@media (prefers-reduced-motion:reduce) {
 #nowPlayingModal.queue-mode .player-fixed-controls { transition: none; }
}

#nowPlayingModal.queue-mode:not(.clip-mode) .player-fixed-controls #lyricsToggleBtn {
  background: transparent;
  width: 44px; min-width: 44px; height: 44px;
  padding: 0; justify-self: center;
}
#nowPlayingModal.queue-mode:not(.clip-mode) .player-fixed-controls :is(#lyricsToggleBtn.active, #queueToggleBtn.active, #openEqBtn.view-active) {
  background: rgb(255 255 255 / .65);
  color: #3a3837;
  width: 44px; min-width: 44px; height: 44px; min-height: 44px;
  padding: 0; justify-self: center; border-radius: 50%;
}
#nowPlayingModal.queue-mode .player-fixed-controls :is(#lyricsToggleBtn, #queueToggleBtn)::after { display: none; }

/* One header-to-row gap; the first cover must not fade under the heading. */
#nowPlayingModal.queue-mode .player-queue-header { margin: 0; }
#nowPlayingModal.queue-mode #playerQueueList {
  --queue-fade: min(64px, 25%);
  --queue-bottom-mask: linear-gradient(to bottom,
    #000 0, #000 calc(100% - var(--queue-cut, 0px) - var(--queue-fade)),
    rgb(0 0 0 / .96) calc(100% - var(--queue-cut, 0px) - var(--queue-fade) * .8),
    rgb(0 0 0 / .8) calc(100% - var(--queue-cut, 0px) - var(--queue-fade) * .6),
    rgb(0 0 0 / .5) calc(100% - var(--queue-cut, 0px) - var(--queue-fade) * .4),
    rgb(0 0 0 / .18) calc(100% - var(--queue-cut, 0px) - var(--queue-fade) * .2),
    rgb(0 0 0 / .04) calc(100% - var(--queue-cut, 0px) - var(--queue-fade) * .08),
    transparent calc(100% - var(--queue-cut, 0px)));
  -webkit-mask-image: var(--queue-bottom-mask);
  mask-image: var(--queue-bottom-mask);
}

/* Browsing the queue folds its identity row away, leaving transport anchored. */
#nowPlayingModal.queue-mode:not(.lyrics-mode):not(.equalizer-mode) .player-modal-scroll-body {
  transition: grid-template-rows var(--dur-move) var(--ease-player-controls, var(--ease-page));
}
#nowPlayingModal.queue-mode:not(.lyrics-mode):not(.equalizer-mode) .ios-art-stage,
#nowPlayingModal.queue-mode:not(.lyrics-mode):not(.equalizer-mode):not(.clip-mode) .ios-track-meta {
  transition: opacity var(--dur-short) var(--ease-player-controls, var(--ease)),
              translate var(--dur-move) var(--ease-player-controls, var(--ease-page));
}
#nowPlayingModal.queue-mode.queue-header-collapsed:not(.lyrics-mode):not(.equalizer-mode) .player-modal-scroll-body {
  grid-template-rows: 0px 38px minmax(0,1fr);
}
#nowPlayingModal.queue-mode.queue-header-collapsed:not(.lyrics-mode):not(.equalizer-mode) :is(.ios-art-stage, .ios-track-meta) {
  opacity: 0;
  translate: 0 -16px;
  pointer-events: none;
}
@media (prefers-reduced-motion:reduce) {
  #nowPlayingModal.queue-mode:not(.lyrics-mode):not(.equalizer-mode) :is(.player-modal-scroll-body, .ios-art-stage, .ios-track-meta) { transition: none; }
}
/* Перестановка: список сразу длинный (раскладку не анимируем), а его низ,
   где ещё уезжает панель, закрыт мягким краем маски. --queue-hide — сколько
   низа закрыто: открывается при захвате и закрывается при отпускании тем же
   ходом, что и панель; queue-reorder-leaving держит список длинным до конца хода.
   --queue-gain — на сколько список длиннее (разница двух bottom ниже). */
@property --queue-hide { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --queue-gain { syntax: "<length>"; inherits: true; initial-value: 0px; }
#nowPlayingModal.queue-mode #playerQueueList {
  --queue-gain: calc(34dvh + 16px - 8px - var(--sab));
  --queue-hide: var(--queue-gain);
}
@media (max-height: 740px) {
  #nowPlayingModal.queue-mode #playerQueueList { --queue-gain: calc(37dvh + 12px - 8px - var(--sab)); }
}
#nowPlayingModal.queue-mode:is(.queue-reordering, .queue-reorder-leaving) #playerQueueList {
  --queue-cut: var(--queue-hide);
  /* Хвост того же размера, что и прибавка: предел прокрутки не меняется, и
     прокрученный до конца список не прыгает ни при захвате, ни после. */
  padding-bottom: calc(24px + var(--queue-gain));
  transition: --queue-hide var(--dur-move) var(--ease-player-controls, var(--ease-page));
}
#nowPlayingModal.queue-mode.queue-reordering #playerQueueList { --queue-hide: 0px; }
@media (prefers-reduced-motion:reduce) {
  #nowPlayingModal.queue-mode:is(.queue-reordering, .queue-reorder-leaving) #playerQueueList { transition: none; }
}
/* Match the specificity of the compact view so drag really uses the freed area. */
#nowPlayingModal.queue-mode:is(.queue-reordering, .queue-reorder-leaving):not(.equalizer-mode) .player-modal-scroll-body {
  bottom: calc(8px + var(--sab));
}

/* The owner explicitly wants icon feedback, with motionless queue pills. */
#nowPlayingModal #playerQueueModes > button {
  transform: none;
  scale: none;
  translate: none;
  animation: none;
  transition: none;
}
#nowPlayingModal:not(.clip-mode) #playerQueueModes > button {
  transition: background-color var(--dur-short) var(--ease-audio-player), color var(--dur-short) var(--ease-audio-player);
}
@media (prefers-reduced-motion: reduce) {
  #nowPlayingModal:not(.clip-mode) #playerQueueModes > button { transition: none; }
}

/* Активная кнопка дока — как в Apple Music (референс 16.11): светлый круг
   того же тона, что неактивные иконки, а иконка внутри — тёмная, под тон фона.
   Белая точка под кнопкой больше не нужна: круг сам показывает состояние.
   Замер референса: фон #393736, круг #ADABA9 (≈ белый 60–65 %), иконка = фон. */
#nowPlayingModal .player-fixed-controls :is(#lyricsToggleBtn.active, #queueToggleBtn.active, #openEqBtn.view-active) {
  width: 44px; min-width: 44px; height: 44px; min-height: 44px;
  padding: 0; justify-self: center; border-radius: 50%;
  background: rgb(255 255 255 / .65);
  color: #3a3837;
  transition: background-color var(--dur-short) var(--ease), color var(--dur-short) var(--ease);
}
#nowPlayingModal .player-fixed-controls :is(#lyricsToggleBtn.active, #queueToggleBtn.active, #openEqBtn.view-active)::before { display: none; }
/* Неактивная кнопка всегда прозрачная: ни тёмного, ни светлого круга.
   eq-active (эквалайзер включён, но панель закрыта) сохраняет белую иконку (без точки). */
#nowPlayingModal .player-fixed-controls .player-dock-cell:not(.active):not(.view-active):not(.eq-active) {
  background: transparent;
  color: rgb(255 255 255 / .65);
}
@media (prefers-reduced-motion: reduce) {
  #nowPlayingModal .player-fixed-controls :is(#lyricsToggleBtn.active, #queueToggleBtn.active, #openEqBtn.view-active) { transition: none; }
}

/* ---- Караоке: плашка нажатой строки и режим «листаю» (16.11, вечер) ----
   Плашка: строка шире текста на 14px с каждой стороны (отрицательные поля
   гасят прибавку, текст не сдвигается). Чтобы края плашки не обрезались,
   панель текста расширена на те же 14px, кнопки справа возвращены на место.
   Размытие строк снимается и возвращается классом — радиус blur никогда не
   анимируется (LIQUID-GLASS §5.8, §7): при возврате каждая строка включает
   его мгновенно, но с задержкой по удалённости от активной — волна. */
#nowPlayingModal.lyrics-mode:not(.equalizer-mode) #lyricsPanel { width: calc(100% + 28px); margin-inline: -14px; }
#nowPlayingModal.lyrics-mode:not(.equalizer-mode) #lyricsContent,
#nowPlayingModal #lyricsPanel.lyrics-panel-leaving #lyricsContent { padding-inline: 14px; }
#nowPlayingModal.lyrics-mode:not(.equalizer-mode) #lyricsPanel :is(.lyrics-sing-action, .lyrics-vocal-control) { right: 18px; }
#nowPlayingModal.queue-mode:not(.clip-mode) #lyricsPanel.lyrics-panel-leaving {
  position: absolute;
  grid-area: auto;
  inset: var(--lyrics-exit-top) auto auto var(--lyrics-exit-left);
  width: var(--lyrics-exit-width);
  height: var(--lyrics-exit-height);
  z-index: 1;
  pointer-events: none;
}
#nowPlayingModal #lyricsPanel.lyrics-panel-leaving #lyricsContent {
  padding-bottom: var(--lyrics-exit-padding-bottom);
  -webkit-mask-image: var(--lyrics-exit-mask);
  mask-image: var(--lyrics-exit-mask);
}
#nowPlayingModal #lyricsPanel.lyrics-panel-leaving :is(.lyrics-sing-action, .lyrics-vocal-control) {
  right: 18px;
  translate: var(--lyrics-exit-action-shift);
}
#nowPlayingModal #lyricsPanel.lyrics-panel-leaving .lyrics-sing-action { opacity: var(--lyrics-exit-sing-opacity); }
#nowPlayingModal #lyricsPanel.lyrics-panel-leaving .lyrics-vocal-control { opacity: var(--lyrics-exit-vocal-opacity); }
#nowPlayingModal :is(.lyrics-mode #lyricsContent, .lyrics-panel-leaving #lyricsContent) .lyrics-line[data-time] {
  width: auto;
  margin: -8px -14px;
  padding: 8px 14px;
  border-radius: 20px;
}
#nowPlayingModal #lyricsContent .lyrics-line[data-time].is-pressed {
  background-color: rgb(255 255 255 / .16);
  color: color-mix(in srgb, rgb(var(--tint)) 45%, #fff);
  opacity: 1;
}
#nowPlayingModal #lyricsContent.lyrics-browsing .lyrics-line {
  filter: none;
  transition: color var(--dur-move) var(--ease-audio-player), opacity var(--dur-move) var(--ease-audio-player);
}
#nowPlayingModal #lyricsContent.lyrics-settling .lyrics-line {
  transition: color var(--dur-move) var(--ease-audio-player), opacity var(--dur-move) var(--ease-audio-player),
    filter var(--dur-instant) var(--ease-linear) calc(var(--lyrics-wave, 0) * var(--dur-press) / 2);
}
/* Пока ни одна строка не активна (трек не начат), размывать нечего — текст
   читается целиком, а не сплошным пятном. */
#nowPlayingModal #lyricsContent:not(:has(.lyrics-line.active)) .lyrics-line { filter: none; }

/* 16.11 вечер — пока листают текст, нижняя панель уезжает, как при
   перестановке очереди, и текст занимает экран до низа. Раскладку не
   анимируем: текст сразу длинный, а открывшийся низ закрыт краем маски
   --lyrics-hide, который открывается тем же ходом, что уезжает панель.
   lyrics-browse-leaving держит текст длинным, пока край закрывается. */
@property --lyrics-hide { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --lyrics-gain { syntax: "<length>"; inherits: true; initial-value: 0px; }
#nowPlayingModal.lyrics-mode #lyricsPanel {
  --lyrics-gain: calc(34dvh + 16px - 8px - var(--sab));
  --lyrics-hide: var(--lyrics-gain);
}
@media (max-height: 740px) {
  #nowPlayingModal.lyrics-mode #lyricsPanel { --lyrics-gain: calc(37dvh + 12px - 8px - var(--sab)); }
}
#nowPlayingModal.lyrics-mode.lyrics-browsing .player-fixed-controls { transform: translateY(40dvh); opacity: 0; pointer-events: none; }
#nowPlayingModal.lyrics-mode:is(.lyrics-browsing, .lyrics-browse-leaving):not(.equalizer-mode) .player-modal-scroll-body {
  bottom: calc(8px + var(--sab));
}
#nowPlayingModal.lyrics-mode:is(.lyrics-browsing, .lyrics-browse-leaving) #lyricsPanel {
  transition: --lyrics-hide var(--dur-move) var(--ease-audio-player);
}
#nowPlayingModal.lyrics-mode.lyrics-browsing #lyricsPanel { --lyrics-hide: 0px; }
#nowPlayingModal.lyrics-mode:is(.lyrics-browsing, .lyrics-browse-leaving):not(.equalizer-mode) #lyricsContent {
  /* Хвост равен прибавке: предел прокрутки не меняется, текст не прыгает. */
  padding-bottom: calc(60% + var(--lyrics-gain));
  --lyrics-browse-mask: linear-gradient(180deg,
    transparent 0, rgb(0 0 0 / .2) 20px, rgb(0 0 0 / .8) 40px, #000 var(--scroll-mask-top),
    #000 calc(100% - var(--lyrics-hide) - var(--scroll-mask-bottom)),
    rgb(0 0 0 / .8) calc(100% - var(--lyrics-hide) - var(--scroll-mask-bottom) + 35px),
    rgb(0 0 0 / .2) calc(100% - var(--lyrics-hide) - 20px),
    transparent calc(100% - var(--lyrics-hide)));
  -webkit-mask-image: var(--lyrics-browse-mask);
  mask-image: var(--lyrics-browse-mask);
}
/* Кнопки караоке привязаны к низу текста: держим их на месте, пока текст
   длинный, и гасим, пока листают. */
#nowPlayingModal.lyrics-mode #lyricsPanel :is(.lyrics-sing-action, .lyrics-vocal-control) {
  transition: opacity var(--dur-short) var(--ease);
}
#nowPlayingModal.lyrics-mode:is(.lyrics-browsing, .lyrics-browse-leaving) #lyricsPanel :is(.lyrics-sing-action, .lyrics-vocal-control) {
  translate: 0 calc(-1 * var(--lyrics-gain));
}
#nowPlayingModal.lyrics-mode.lyrics-browsing #lyricsPanel :is(.lyrics-sing-action, .lyrics-vocal-control) { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  #nowPlayingModal.lyrics-mode #lyricsPanel,
  #nowPlayingModal.lyrics-mode #lyricsPanel :is(.lyrics-sing-action, .lyrics-vocal-control) { transition: none; }
}

/* Заливка текущей строки слева направо. Строчный span без
   box-decoration-break склеивает переносы в одну полосу, поэтому градиент
   идёт по строкам по очереди, как у Apple. --lyrics-fill (0..1) ставит JS.
   Градиент стоит на КАЖДОЙ строке, а меняются только два зарегистрированных
   цвета: «залито» у текущей строки белое, у остальных такое же серое, как
   «не залито». Поэтому при смене строки заливка прежней плавно гаснет, а новой
   плавно разгорается тем же ходом, что и цвет строки, а не щёлкает. */
@property --lyrics-done { syntax: "<color>"; inherits: false; initial-value: rgb(255 255 255 / .36); }
@property --lyrics-todo { syntax: "<color>"; inherits: false; initial-value: rgb(255 255 255 / .36); }
#nowPlayingModal.queue-mode:not(.equalizer-mode) .lyrics-line .lyrics-fill {
  --lyrics-fill-edge: 12px;
  --lyrics-done: rgb(255 255 255 / .36);
  --lyrics-todo: rgb(255 255 255 / .36);
  background-image: linear-gradient(90deg,
    var(--lyrics-done) calc(var(--lyrics-fill, 0) * (100% + 2 * var(--lyrics-fill-edge)) - 2 * var(--lyrics-fill-edge)),
    var(--lyrics-todo) calc(var(--lyrics-fill, 0) * (100% + 2 * var(--lyrics-fill-edge))));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: --lyrics-done var(--dur-move) var(--ease-audio-player), --lyrics-todo var(--dur-move) var(--ease-audio-player);
}
#nowPlayingModal.queue-mode:not(.equalizer-mode) .lyrics-line.active .lyrics-fill { --lyrics-done: #fff; }
#nowPlayingModal.queue-mode:not(.equalizer-mode) .lyrics-line.is-pressed .lyrics-fill {
  --lyrics-done: color-mix(in srgb, rgb(var(--tint)) 45%, #fff);
  --lyrics-todo: color-mix(in srgb, rgb(var(--tint)) 45%, #fff);
}
@media (prefers-reduced-motion: reduce) {
  #nowPlayingModal.queue-mode:not(.equalizer-mode) .lyrics-line .lyrics-fill { transition: none; }
}

/* Эквалайзер — тот же компактный режим, что и текст/очередь: маленькая обложка,
   прозрачные плашки rgb(255 255 255 / .14–.16), светлые активные кнопки. Свой
   тёмно-бирюзовый вид убран; цвет фона даёт --tint, как везде. */
#nowPlayingModal.equalizer-mode #studioEqSheet {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: transparent;
  color: #fff;
}
#nowPlayingModal.equalizer-mode #studioEqSheet .sheet-header {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 0 10px;
  border: 0;
  gap: 12px;
}
#nowPlayingModal.equalizer-mode #studioEqSheet .eq-heading > span { display: none; }
#nowPlayingModal.equalizer-mode #studioEqSheet .eq-heading h3 {
  font-size: 17px;
  line-height: 22px;
  font-weight: 650;
  letter-spacing: 0;
}
#nowPlayingModal.equalizer-mode #studioEqSheet .eq-toggle-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: rgb(255 255 255 / .6);
}
#nowPlayingModal.equalizer-mode #studioEqSheet .eq-toggle-label.active { color: #fff; }
#nowPlayingModal.equalizer-mode #studioEqSheet .studio-sheet-body {
  gap: 10px;
  padding: 0 0 24px;
  --player-edge-fade: 16px;
}

/* Режимы и пресет — плашки высотой 38px, как «Очередь / Радио / …». */
#nowPlayingModal.equalizer-mode #studioEqSheet .eq-mode-segments {
  height: 38px;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 24px;
  background: rgb(255 255 255 / .14);
  box-shadow: none;
}
#nowPlayingModal.equalizer-mode #studioEqSheet .eq-seg-btn {
  height: 38px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: transparent;
  box-shadow: none;
}
#nowPlayingModal.equalizer-mode #studioEqSheet .eq-seg-btn.active {
  background: rgb(255 255 255 / .7);
  color: #4b4746;
}
#nowPlayingModal.equalizer-mode #studioEqSheet .eq-preset-wrap { gap: 10px; }
#nowPlayingModal.equalizer-mode #studioEqSheet :is(.eq-glass-select, .eq-reset-btn) {
  height: 38px;
  border: 0;
  border-radius: 24px;
  background-color: rgb(255 255 255 / .14);
  box-shadow: none;
  color: #fff;
  font-size: 15px;
}
#nowPlayingModal.equalizer-mode #studioEqSheet .eq-reset-btn { width: 38px; min-width: 38px; padding: 0; }

/* Плашки с ползунками — одной заливкой, без рамок и бликов. */
#nowPlayingModal.equalizer-mode #studioEqSheet :is(.simple-eq-grid, .eq-glass-card, .eq-sliders-board, .eq-collapsible-fx) {
  border: 0;
  border-radius: 18px;
  background-color: rgb(255 255 255 / .12);
  box-shadow: none;
}
#nowPlayingModal.equalizer-mode #studioEqSheet .simple-eq-grid { padding: 14px 8px 12px; }
#nowPlayingModal.equalizer-mode #studioEqSheet .band-tag {
  font-size: 11px;
  font-weight: 650;
  color: rgb(255 255 255 / .7);
}
#nowPlayingModal.equalizer-mode #studioEqSheet .band-db-badge { color: #fff; }
#nowPlayingModal.equalizer-mode #studioEqSheet :is(.band-freq-sub, .card-tag, .preamp-label, .eq-scale-labels, .channel-freq) {
  color: rgb(255 255 255 / .6);
}
@media (max-height: 740px) {
  #nowPlayingModal.equalizer-mode #studioEqSheet .eq-mode-segments,
  #nowPlayingModal.equalizer-mode #studioEqSheet .eq-seg-btn,
  #nowPlayingModal.equalizer-mode #studioEqSheet :is(.eq-glass-select, .eq-reset-btn) { height: 34px; }
  #nowPlayingModal.equalizer-mode #studioEqSheet .eq-reset-btn { width: 34px; min-width: 34px; }
  #nowPlayingModal.equalizer-mode #studioEqSheet .simple-eq-grid .knob-container { height: 90px; }
  #nowPlayingModal.equalizer-mode #studioEqSheet .simple-eq-grid .band-knob-slider { width: 90px; }
}

/* Очередь и комментарии клипа: видео остаётся видимым, пока список открыт. */
:root { --ease-clip-panel: cubic-bezier(.32, .08, .24, 1); }
#nowPlayingModal.clip-mode .ios-art-stage { z-index: 3; }
#nowPlayingModal.clip-mode .player-modal-nav { z-index: 4; }
#nowPlayingModal.clip-mode .player-fixed-controls .ios-player-bottom-dock { grid-template-columns: repeat(3, 1fr); }
#nowPlayingModal.clip-mode .player-fixed-controls #queueToggleBtn { order: 1; }
#nowPlayingModal.clip-mode .player-fixed-controls #clipCommentsBtn { order: 2; }
#nowPlayingModal.clip-mode .player-fixed-controls #playerShareBtn { order: 3; }
body.tg-top-band #nowPlayingModal.clip-mode .player-fixed-controls .ios-player-bottom-dock { grid-template-columns: repeat(2, 1fr); }
#nowPlayingModal.clip-mode.queue-mode #playerQueueContainer {
  display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0;
  width: 100%; margin: 0; padding: 0; border: 0;
}
#nowPlayingModal.clip-mode.queue-mode .player-queue-header { margin: 0; padding: 4px 0 8px; }
#nowPlayingModal.clip-mode.queue-mode #playerQueueList {
  flex: 1 1 auto; min-height: 0; margin: 0; padding: 0 0 20px;
  overflow-y: auto; mask-image: none; -webkit-mask-image: none;
}
#nowPlayingModal.clip-mode #clipCommentsList {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 0 20px; scrollbar-width: thin;
}
#nowPlayingModal.clip-mode .clip-comment { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
#nowPlayingModal.clip-mode .clip-comment-author { color: #fff; font-size: 14px; font-weight: 650; }
#nowPlayingModal.clip-mode .clip-comment-text { margin: 5px 0 0; color: rgba(255,255,255,.86); font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
#nowPlayingModal.clip-mode .clip-comment-meta { margin-top: 6px; color: rgba(255,255,255,.5); font-size: 12px; }
#nowPlayingModal.clip-mode .clip-comments-skeleton-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
#nowPlayingModal.clip-mode .clip-comments-reveal { position: relative; }
#nowPlayingModal.clip-mode .clip-comments-reveal > .clip-comments-skeleton {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
#nowPlayingModal.clip-mode .clip-comment-placeholder { display: grid; gap: var(--s2); }
#nowPlayingModal.clip-mode .clip-comment-placeholder span {
  display: block; height: 10px; border-radius: var(--r-detail); background: currentColor; opacity: .13;
}
#nowPlayingModal.clip-mode .clip-comment-placeholder span:first-child { width: 34%; opacity: .22; }
#nowPlayingModal.clip-mode .clip-comment-placeholder span:nth-child(2) { width: 86%; }
#nowPlayingModal.clip-mode .clip-comment-placeholder span:last-child { width: 57%; }
#nowPlayingModal.clip-mode .clip-comment-placeholder:nth-of-type(2) span:nth-child(2) { width: 71%; }
#nowPlayingModal.clip-mode .clip-comments-message { padding: 12px 0; color: rgba(255,255,255,.65); font-size: 14px; line-height: 1.4; }
#nowPlayingModal.clip-mode .clip-comments-more {
  min-height: 44px; margin-top: 8px; padding: 0 16px; border: 0; border-radius: var(--r-pill);
  background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 14px; cursor: pointer;
}
@media (orientation: portrait) {
  #nowPlayingModal.clip-mode.queue-mode .player-modal-scroll-body {
    position: absolute; top: max(64px, calc(var(--sat) + 24px)); bottom: calc(34dvh + 16px);
    left: 0; right: 0; translate: none; width: 100%; height: auto; max-width: none;
    display: flex; flex-direction: column; justify-content: flex-start; gap: 8px;
    padding: 0 32px; overflow: visible;
  }
  #nowPlayingModal.clip-mode.queue-mode .ios-art-stage {
    position: relative !important; inset: auto; width: 100%; height: 200px !important;
    flex: 0 0 200px !important; display: flex; align-items: center; justify-content: center;
  }
  #nowPlayingModal.clip-mode.queue-mode .clip-media-host { width: min(100%, 340px); height: 200px; aspect-ratio: auto; }
  #nowPlayingModal.clip-mode.queue-mode .ios-track-meta { flex: 0 0 auto; min-height: 50px; }
  #nowPlayingModal.clip-mode.queue-mode .player-fixed-controls {
    position: absolute; top: auto; bottom: calc(8px + var(--sab)); left: 32px; right: 32px;
    width: auto; max-width: none; height: calc(34dvh - 8px - var(--sab)); margin: 0; padding: 0;
    grid-template-rows: 40px minmax(64px, 1fr) 40px 48px; gap: 12px;
  }
  @media (max-height: 740px) {
    #nowPlayingModal.clip-mode.queue-mode .player-modal-scroll-body {
      bottom: calc(38dvh + 8px);
      padding-bottom: 16px; /* Запас под translateY(16px) при входе списка (setPlayerView). */
    }
    #nowPlayingModal.clip-mode.queue-mode .player-fixed-controls { height: calc(38dvh - 8px - var(--sab)); gap: 8px; }
    #nowPlayingModal.clip-mode.queue-mode .ios-track-meta {
      position: absolute; inset: 208px 32px auto; width: auto;
      visibility: hidden; opacity: 0; pointer-events: none;
    }
  }
  @media (max-width: 350px) {
    #nowPlayingModal.clip-mode.queue-mode .player-modal-scroll-body { padding-inline: 24px; }
    #nowPlayingModal.clip-mode.queue-mode .player-fixed-controls { left: 24px; right: 24px; }
    #nowPlayingModal.clip-mode.queue-mode .ios-track-meta { inset-inline: 24px; }
  }
}
@media (orientation: landscape) and (max-height: 540px) {
  #nowPlayingModal.clip-mode.queue-mode .player-modal-scroll-body {
    position: absolute; top: 44px; bottom: 8px; left: 0; right: 42%; translate: none;
    width: auto; height: auto; display: flex; flex-direction: column; justify-content: flex-start;
    gap: 8px; padding: 0 8px 0 var(--land-l); overflow: visible;
  }
  #nowPlayingModal.clip-mode.queue-mode .ios-art-stage {
    position: relative !important; inset: auto; width: 100%; height: 200px !important;
    flex: 0 0 200px !important; display: flex; align-items: center; justify-content: center;
  }
  #nowPlayingModal.clip-mode.queue-mode .clip-media-host { width: min(100%, 340px); height: 200px; aspect-ratio: auto; }
  #nowPlayingModal.clip-mode.queue-mode .ios-track-meta { position: fixed; top: 50px; left: 60%; right: var(--land-r); }
}
