:root {
  color-scheme: dark;
  --bg: #203a47;
  --bg-deep: #152a35;
  --theme-top: #274a59;
  --theme-mid: #203a47;
  --theme-bottom: #152a35;
  --theme-top-rgb: 39, 74, 89;
  --theme-mid-rgb: 32, 58, 71;
  --theme-bottom-rgb: 21, 42, 53;
  --ink: #edf5f6;
  --muted: rgba(237, 245, 246, 0.54);
  --faint: rgba(237, 245, 246, 0.24);
  --line: rgba(237, 245, 246, 0.08);
  --accent: #85adb6;
  --warm: #d97958;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(
    155deg,
    var(--theme-top) 0%,
    var(--theme-mid) 46%,
    var(--theme-bottom) 100%
  );
  transition: background 520ms ease;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

button {
  font: inherit;
}

.viewSwitch {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 60;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(8, 18, 24, 0.52);
  backdrop-filter: blur(14px);
}

.viewBtn {
  min-width: 54px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  color: rgba(237, 245, 246, 0.62);
  background: transparent;
  cursor: pointer;
}

.viewBtn.isActive {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.14);
  font-weight: 720;
}

.shell {
  min-height: 100dvh;
}

.player {
  position: relative;
  width: min(1600px, 100vw);
  height: calc(100dvh - 82px);
  min-height: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 680px minmax(560px, 1fr);
  grid-template-rows: 190px minmax(0, 1fr);
  column-gap: 120px;
  padding: 76px 72px 24px;
}

.mobileTop {
  display: none;
}

.artWrap {
  position: relative;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: center;
  width: 590px;
  aspect-ratio: 1;
  border-radius: 999px;
  isolation: isolate;
}

.artWrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 999px;
  background:
    repeating-radial-gradient(circle, rgba(255, 255, 255, 0.034) 0 1px, transparent 1px 7px),
    radial-gradient(circle at center, #191a19 0 34%, #111211 35% 70%, #0c0d0d 71% 100%);
  box-shadow:
    0 0 0 22px rgba(95, 124, 134, 0.13),
    0 30px 86px rgba(0, 0, 0, 0.33);
}

.artWrap::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 68px;
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.98) 0 22%, rgba(15, 21, 23, 0.92) 24% 35%, rgba(246, 248, 247, 0.9) 38% 100%);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.cover {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 56%;
  height: 56%;
  display: block;
  object-fit: cover;
  border: 0;
  border-radius: 999px;
  background: #17232a;
  box-shadow: 0 0 0 10px rgba(0, 0, 0, 0.44);
  animation: epCoverSpin 18s linear infinite;
  animation-play-state: paused;
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: center center;
  will-change: transform;
}

.recordGlow {
  position: absolute;
  left: 52%;
  top: -24%;
  z-index: 5;
  width: 44px;
  height: 300px;
  border-radius: 999px;
  background: #eff2ef;
  filter: none;
  opacity: 0.96;
  pointer-events: none;
  transform: rotate(-13deg);
  transform-origin: top center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.recordGlow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -22px;
  width: 40px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: #fbfcfa;
  box-shadow: 0 0 0 10px rgba(93, 119, 127, 0.22);
  transform: translateX(-50%);
}

.recordGlow::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -14px;
  width: 94px;
  height: 36px;
  border-radius: 8px;
  background: #fbfcfa;
  transform: rotate(24deg);
}

.artWrap.isPlaying .cover {
  animation-play-state: running;
}

.artWrap.isPlaying .recordGlow {
  transform: rotate(-7deg);
}

.nowPlaying {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  min-width: 0;
}

.artist,
.credit {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.title {
  display: flex;
  align-items: baseline;
  gap: 0.22em;
  margin: 10px 0 8px;
  max-width: 720px;
  color: var(--ink);
  font-size: 2.55rem;
  line-height: 1.12;
  font-weight: 760;
  letter-spacing: 0;
}

.titleTrackToggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(237, 245, 246, 0.34);
  border-radius: 6px;
  color: inherit;
  background: rgba(255, 255, 255, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.12);
  font-family: inherit;
  font-size: clamp(0.72rem, 1.15vw, 0.92rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease,
    transform 100ms ease;
}

.titleTrackToggle::after {
  content: "\21C4";
  color: rgba(237, 245, 246, 0.62);
  font-size: 0.86em;
  font-weight: 600;
}

.titleTrackToggle:hover {
  color: #ffffff;
  border-color: rgba(237, 245, 246, 0.58);
  background: rgba(255, 255, 255, 0.15);
}

.titleTrackToggle:active {
  transform: translateY(1px);
  background: rgba(255, 255, 255, 0.2);
}

.titleTrackToggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 3px;
}

.trackBadge {
  flex: 0 0 auto;
  align-self: center;
  min-width: 44px;
  padding: 4px 7px 3px;
  border: 1px solid rgba(151, 189, 193, 0.48);
  border-radius: 3px;
  color: rgba(224, 239, 240, 0.9);
  background: rgba(104, 152, 157, 0.16);
  font-size: clamp(0.62rem, 0.82vw, 0.72rem);
  font-weight: 650;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.trackBadge[hidden] {
  display: none;
}

body[data-view="portrait"] .titleTrackToggle {
  border-color: rgba(238, 233, 233, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

body[data-view="portrait"] .trackBadge {
  border-color: rgba(220, 202, 202, 0.42);
  color: rgba(242, 233, 233, 0.9);
  background: rgba(255, 255, 255, 0.09);
}

/* v21: full-screen song catalog. */
.catalogOpen {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  top: max(18px, env(safe-area-inset-top));
  z-index: 42;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(237, 245, 246, 0.18);
  border-radius: 6px;
  color: rgba(237, 245, 246, 0.78);
  background: rgba(12, 28, 36, 0.72);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.catalogOpen:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.catalogLayer {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  padding:
    max(28px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(36px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(43, 30, 31, 0.98), rgba(25, 35, 41, 0.99)),
    var(--bg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-24px);
  transition:
    opacity 220ms ease,
    transform 320ms cubic-bezier(0.22, 0.8, 0.2, 1);
}

.catalogLayer.isOpen {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.catalogIsOpen {
  overflow: hidden;
}

.catalogInner {
  width: min(920px, 100%);
  margin: 0 auto;
}

.catalogHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 22px;
  border-bottom: 1px solid rgba(237, 245, 246, 0.13);
}

.catalogHeader p {
  margin: 0 0 5px;
  color: rgba(237, 245, 246, 0.5);
  font-size: 0.92rem;
}

.catalogHeader h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.catalogClose {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(237, 245, 246, 0.2);
  border-radius: 50%;
  color: rgba(237, 245, 246, 0.82);
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.catalogList {
  display: grid;
  padding-top: 10px;
}

.catalogSong {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 18px 8px;
  border: 0;
  border-bottom: 1px solid rgba(237, 245, 246, 0.11);
  color: rgba(237, 245, 246, 0.88);
  background: transparent;
  text-align: left;
  font: inherit;
  letter-spacing: 0;
  cursor: pointer;
  transition:
    color 150ms ease,
    background-color 150ms ease;
}

.catalogSong:hover,
.catalogSong:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
}

.catalogSong.isCurrent {
  background: rgba(127, 195, 201, 0.08);
}

.catalogSong img {
  display: block;
  width: 96px;
  aspect-ratio: 1;
  border-radius: 5px;
  object-fit: cover;
}

.catalogSongCopy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.catalogSongCopy strong {
  overflow: hidden;
  font-size: clamp(1.16rem, 2.8vw, 1.48rem);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalogSongCopy span {
  color: rgba(237, 245, 246, 0.48);
  font-size: 0.94rem;
}

.catalogSongCopy .catalogSongSeries {
  color: rgba(237, 245, 246, 0.34);
  font-size: 0.76rem;
  line-height: 1.2;
}

.catalogSongArrow {
  color: rgba(237, 245, 246, 0.42);
  font-size: 2rem;
  text-align: center;
}

.topButton {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

body[data-view="portrait"] .catalogOpen,
body[data-view="landscape"] .catalogOpen {
  display: none;
}

@media (max-width: 600px) {
  .catalogLayer {
    padding:
      max(18px, env(safe-area-inset-top))
      max(18px, env(safe-area-inset-right))
      max(24px, env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-left));
  }

  .catalogHeader {
    padding-top: 10px;
  }

  .catalogSong {
    grid-template-columns: 74px minmax(0, 1fr) 28px;
    gap: 14px;
    padding: 14px 4px;
  }

  .catalogSong img {
    width: 74px;
  }
}

.modeTabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.modeTabs span {
  padding: 7px 14px;
  border-radius: 999px;
  color: rgba(237, 245, 246, 0.45);
  font-size: 0.96rem;
}

.modeTabs .isCurrent {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
}

.lyricsPanel {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
  border: 0;
}

.lyrics {
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: auto;
  padding: 190px 0 270px;
  scrollbar-width: none;
}

.lyrics::-webkit-scrollbar {
  display: none;
}

.lyricLine {
  min-height: 56px;
  max-width: 760px;
  display: flex;
  align-items: center;
  color: var(--faint);
  font-size: 1.42rem;
  line-height: 1.45;
  font-weight: 680;
  overflow-wrap: anywhere;
}

.lyricLine.isActive {
  color: rgba(255, 255, 255, 0.98);
  font-size: 1.72rem;
  font-weight: 780;
  transform: none;
}

.lyricLine.isPassed {
  color: rgba(237, 245, 246, 0.17);
}

.lyricLine.isPreview {
  color: rgba(255, 255, 255, 0.82);
}

.lyricScrub {
  position: absolute;
  left: 0;
  right: 0;
  top: 46%;
  z-index: 12;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 56px;
  align-items: center;
  min-height: 62px;
  padding: 0 10px;
  border-radius: 12px;
  color: rgba(242, 239, 238, 0.84);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 16px 52px rgba(0, 0, 0, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.985);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.lyricScrub.isVisible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.lyricScrubTime {
  color: rgba(242, 239, 238, 0.6);
  font-size: 0.96rem;
  font-variant-numeric: tabular-nums;
}

.lyricScrubText {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.25rem;
  font-weight: 720;
}

.lyricScrubPlay {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  cursor: pointer;
}

.transport {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(180px, 240px);
  gap: 22px;
  align-items: center;
  min-height: 82px;
  padding: 12px 72px 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(13, 25, 31, 0.8);
  backdrop-filter: blur(18px);
}

.playBtn {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  cursor: pointer;
}

.playBtn:hover {
  background: rgba(255, 255, 255, 0.16);
}

#playIcon {
  display: inline-block;
  width: 1em;
  text-align: center;
  line-height: 1;
}

.timeline {
  min-width: 0;
}

.seekBar {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.seekBar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.seekFill {
  position: relative;
  z-index: 1;
  width: 0%;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.seekKnob {
  position: absolute;
  top: 50%;
  right: 0;
  width: 18px;
  height: 18px;
  border: 3px solid #203946;
  border-radius: 999px;
  background: #f4f7f5;
  transform: translate(50%, -50%);
}

.timeRow {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 10px;
  align-items: center;
  color: rgba(237, 245, 246, 0.46);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.qualityText {
  justify-self: center;
  color: rgba(237, 245, 246, 0.5);
}

.mobileActions {
  display: none;
}

.volumePanel {
  display: grid;
  grid-template-columns: 34px minmax(90px, 1fr) 30px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.muteBtn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.volumeStack {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.volumeControl {
  width: 100%;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.levelMeter {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.11);
}

.levelFill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, #6eb69a 0%, #d2b85c 78%, #d36a5f 100%);
  transition: width 60ms linear;
}

.levelPeak {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(-1px);
}

.volumeValue {
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@keyframes epCoverSpin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Desktop view */
body[data-view="desktop"] .player {
  width: min(1600px, 100vw);
  height: calc(100dvh - 82px);
  min-height: 720px;
  grid-template-columns: 680px minmax(560px, 1fr);
  grid-template-rows: 190px minmax(0, 1fr);
  column-gap: 120px;
  padding: 76px 72px 24px;
}

/* Mobile portrait: record page */
body[data-view="portrait"] {
  overflow: hidden;
  background: linear-gradient(
    165deg,
    var(--theme-top) 0%,
    var(--theme-mid) 48%,
    var(--theme-bottom) 100%
  );
}

body[data-view="portrait"] .viewSwitch {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

body[data-view="portrait"] .player {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 72px minmax(280px, 46dvh) auto minmax(0, 1fr) 244px;
  gap: 0;
  padding: max(10px, env(safe-area-inset-top)) 24px max(18px, env(safe-area-inset-bottom));
}

body[data-view="portrait"] .mobileTop {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  grid-row: 1;
  color: rgba(237, 245, 246, 0.58);
}

body[data-view="portrait"] .topIcon {
  font-size: 2.2rem;
  line-height: 1;
}

body[data-view="portrait"] .topTitle {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}

body[data-view="portrait"] .topTitle strong,
body[data-view="portrait"] .topTitle span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-view="portrait"] .topTitle strong {
  color: rgba(237, 245, 246, 0.72);
  font-size: 1rem;
}

body[data-view="portrait"] .topTitle span {
  color: rgba(237, 245, 246, 0.45);
  font-size: 0.86rem;
}

body[data-view="portrait"] .artWrap {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  width: min(78vw, 46dvh, 470px);
}

body[data-view="portrait"] .cover {
  width: 56%;
  height: 56%;
}

body[data-view="portrait"] .recordGlow {
  width: 7.5%;
  height: 49%;
}

body[data-view="portrait"] .nowPlaying {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
  padding-top: 20px;
}

body[data-view="portrait"] .artist {
  font-size: 1.02rem;
}

body[data-view="portrait"] .title {
  margin-top: 8px;
  font-size: clamp(1.8rem, 8vw, 2.55rem);
}

body[data-view="portrait"] .credit,
body[data-view="portrait"] .modeTabs {
  display: none;
}

body[data-view="portrait"] .lyricsPanel {
  grid-column: 1;
  grid-row: 4;
  min-height: 0;
}

body[data-view="portrait"] .lyrics {
  padding: 13dvh 0 14dvh;
}

body[data-view="portrait"] .lyricLine {
  justify-content: center;
  min-height: 42px;
  max-width: none;
  text-align: center;
  font-size: clamp(1.08rem, 4.4vw, 1.38rem);
}

body[data-view="portrait"] .lyricLine.isActive {
  font-size: clamp(1.26rem, 5vw, 1.68rem);
}

body[data-view="portrait"] .transport {
  position: static;
  grid-column: 1;
  grid-row: 5;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  gap: 22px;
  min-height: 0;
  padding: 0 0 4px;
  border-top: 0;
  background: transparent;
  backdrop-filter: none;
}

body[data-view="portrait"] .playBtn {
  grid-row: 3;
  width: 84px;
  height: 84px;
  font-size: 2rem;
  background: transparent;
}

body[data-view="portrait"] .timeline {
  grid-row: 1;
}

body[data-view="portrait"] .mobileActions {
  grid-row: 2;
  display: flex;
  justify-content: space-around;
  color: rgba(237, 245, 246, 0.54);
  font-size: 2rem;
}

body[data-view="portrait"] .volumePanel {
  grid-row: 3;
  width: min(78vw, 320px);
  justify-self: center;
}

body[data-view="portrait"] .mobileActions {
  display: none;
}

/* Mobile landscape */
body[data-view="landscape"] {
  overflow: hidden;
  background: linear-gradient(
    145deg,
    var(--theme-top) 0%,
    var(--theme-mid) 50%,
    var(--theme-bottom) 100%
  );
}

body[data-view="landscape"] .player {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  grid-template-columns: minmax(330px, 43vw) minmax(420px, 1fr);
  grid-template-rows: auto minmax(0, 1fr) 142px;
  column-gap: 52px;
  padding: max(28px, env(safe-area-inset-top)) 54px max(18px, env(safe-area-inset-bottom));
}

body[data-view="landscape"] .mobileTop {
  display: none;
}

body[data-view="landscape"] .artWrap {
  grid-column: 1;
  grid-row: 1 / 4;
  align-self: center;
  width: min(38vw, 68dvh, 560px);
}

body[data-view="landscape"] .nowPlaying {
  grid-column: 2;
  grid-row: 1;
  padding-top: 28px;
}

body[data-view="landscape"] .title {
  font-size: clamp(1.8rem, 3vw, 2.65rem);
}

body[data-view="landscape"] .credit,
body[data-view="landscape"] .modeTabs {
  display: none;
}

body[data-view="landscape"] .lyricsPanel {
  grid-column: 2;
  grid-row: 2;
}

body[data-view="landscape"] .lyrics {
  padding: 16dvh 0 18dvh;
}

body[data-view="landscape"] .lyricLine {
  min-height: 46px;
  font-size: clamp(1.15rem, 1.9vw, 1.55rem);
}

body[data-view="landscape"] .lyricLine.isActive {
  font-size: clamp(1.42rem, 2.3vw, 1.95rem);
}

body[data-view="landscape"] .transport {
  position: static;
  grid-column: 2;
  grid-row: 3;
  grid-template-columns: 86px minmax(0, 1fr) 120px;
  gap: 28px;
  min-height: 0;
  padding: 0;
  border-top: 0;
  background: transparent;
  backdrop-filter: none;
}

body[data-view="landscape"] .playBtn {
  width: 68px;
  height: 68px;
  font-size: 1.5rem;
  background: transparent;
}

body[data-view="landscape"] .mobileActions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(237, 245, 246, 0.58);
  font-size: 2.1rem;
}

body[data-view="landscape"] .volumePanel {
  grid-column: 3;
}

body[data-view="landscape"] .mobileActions {
  display: none;
}

@media (max-width: 900px) and (orientation: portrait) {
  body:not([data-view="desktop"]):not([data-view="landscape"]) .viewSwitch {
    top: auto;
    right: auto;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
  }
}

/* v10 mobile tuning: portrait becomes a two-state scroll view. */
body[data-view="portrait"] {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y proximity;
  background: linear-gradient(
    165deg,
    var(--theme-top) 0%,
    var(--theme-mid) 48%,
    var(--theme-bottom) 100%
  );
}

body[data-view="portrait"] .shell {
  min-height: 190svh;
}

body[data-view="portrait"] .player {
  position: relative;
  width: 100%;
  min-height: 190svh;
  height: auto;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 74px minmax(300px, 53svh) auto minmax(76svh, auto);
  gap: 0;
  padding: 0 clamp(18px, 5vw, 28px) calc(176px + env(safe-area-inset-bottom));
}

body[data-view="portrait"] .mobileTop {
  position: sticky;
  top: 0;
  z-index: 18;
  display: grid;
  grid-row: 1;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  min-height: 74px;
  align-items: center;
  color: rgba(236, 230, 230, 0.68);
  background: linear-gradient(
    180deg,
    rgba(var(--theme-mid-rgb), 0.92),
    rgba(var(--theme-mid-rgb), 0)
  );
}

body[data-view="portrait"] .topIcon {
  font-size: 2.35rem;
  line-height: 1;
}

body[data-view="portrait"] .topTitle {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}

body[data-view="portrait"] .topTitle strong {
  max-width: 100%;
  overflow: hidden;
  color: rgba(242, 239, 238, 0.76);
  font-size: clamp(1.08rem, 4.8vw, 1.42rem);
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-view="portrait"] .topTitle span {
  max-width: 100%;
  overflow: hidden;
  color: rgba(242, 239, 238, 0.42);
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-view="portrait"] .artWrap {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  justify-self: center;
  width: min(85vw, 50svh, 460px);
  margin-top: clamp(6px, 2.6svh, 26px);
  scroll-snap-align: start;
  scroll-margin-top: 20px;
}

body[data-view="portrait"] .artWrap::before {
  box-shadow:
    0 0 0 clamp(16px, 4.8vw, 28px) rgba(var(--theme-top-rgb), 0.62),
    0 20px 70px rgba(0, 0, 0, 0.28);
}

body[data-view="portrait"] .cover {
  width: 54%;
  height: 54%;
}

body[data-view="portrait"] .recordGlow {
  left: 54%;
  top: -22%;
  width: clamp(32px, 7vw, 44px);
  height: 49%;
}

body[data-view="portrait"] .recordGlow::before {
  width: clamp(30px, 7.8vw, 42px);
}

body[data-view="portrait"] .recordGlow::after {
  right: -62%;
  bottom: -5%;
  width: 190%;
  height: 12%;
}

body[data-view="portrait"] .nowPlaying {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
  padding-top: clamp(26px, 4svh, 46px);
  padding-bottom: 168px;
}

body[data-view="portrait"] .artist {
  color: rgba(238, 233, 233, 0.55);
  font-size: clamp(1.18rem, 5vw, 1.55rem);
  font-weight: 520;
}

body[data-view="portrait"] .title {
  max-width: none;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(2.05rem, 9vw, 3.1rem);
  line-height: 1.12;
  font-weight: 820;
}

body[data-view="portrait"] .credit,
body[data-view="portrait"] .modeTabs {
  display: none;
}

body[data-view="portrait"] .lyricsPanel {
  grid-column: 1;
  grid-row: 4;
  min-height: 76svh;
  padding-top: 10svh;
  padding-bottom: 184px;
  scroll-snap-align: start;
}

body[data-view="portrait"] .lyrics {
  height: 64svh;
  max-height: 64svh;
  min-height: 360px;
  overflow-y: auto;
  padding: 22svh 0 24svh;
}

body[data-view="portrait"] .lyricLine {
  justify-content: center;
  min-height: clamp(44px, 6.4svh, 62px);
  max-width: none;
  color: rgba(236, 230, 230, 0.23);
  text-align: center;
  font-size: clamp(1.14rem, 4.4vw, 1.52rem);
  font-weight: 720;
}

body[data-view="portrait"] .lyricLine.isActive {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.34rem, 5.2vw, 1.86rem);
  font-weight: 820;
}

body[data-view="portrait"] .transport {
  position: fixed;
  left: clamp(18px, 5vw, 28px);
  right: clamp(18px, 5vw, 28px);
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 34;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 66px auto;
  gap: 18px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: linear-gradient(
    180deg,
    rgba(var(--theme-bottom-rgb), 0),
    rgba(var(--theme-bottom-rgb), 0.86) 18%,
    rgba(var(--theme-bottom-rgb), 0.94)
  );
  backdrop-filter: none;
}

body[data-view="portrait"] .timeline {
  grid-row: 1;
}

body[data-view="portrait"] .seekBar {
  height: 28px;
}

body[data-view="portrait"] .seekBar::before,
body[data-view="portrait"] .seekFill {
  height: 5px;
}

body[data-view="portrait"] .timeRow {
  grid-template-columns: 64px 1fr 64px;
  color: rgba(236, 230, 230, 0.48);
  font-size: clamp(0.96rem, 4vw, 1.25rem);
}

body[data-view="portrait"] .qualityText {
  font-weight: 620;
}

body[data-view="portrait"] .playBtn {
  grid-row: 2;
  align-self: center;
  justify-self: center;
  width: 66px;
  height: 66px;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  font-size: 2.3rem;
}

body[data-view="portrait"] .mobileActions {
  grid-row: 3;
  display: flex;
  justify-content: space-around;
  align-items: center;
  color: rgba(236, 230, 230, 0.46);
  font-size: 2.2rem;
}

body[data-view="portrait"] .viewSwitch {
  top: auto;
  right: max(10px, env(safe-area-inset-right));
  bottom: calc(116px + env(safe-area-inset-bottom));
  left: auto;
  transform: none;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  background: rgba(14, 17, 20, 0.56);
}

body[data-view="portrait"] .viewBtn {
  min-width: 46px;
  min-height: 30px;
  font-size: 0.82rem;
}

/* v10 landscape: match the wide phone reference and keep controls separated. */
body[data-view="landscape"] {
  overflow: hidden;
  background: linear-gradient(
    145deg,
    var(--theme-top) 0%,
    var(--theme-mid) 50%,
    var(--theme-bottom) 100%
  );
}

body[data-view="landscape"] .player {
  width: 100vw;
  height: 100svh;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 43vw) minmax(420px, 1fr);
  grid-template-rows: minmax(92px, 25svh) minmax(120px, 1fr) minmax(94px, 24svh);
  column-gap: clamp(36px, 6vw, 96px);
  padding: clamp(18px, 5svh, 42px) clamp(40px, 7vw, 96px) clamp(20px, 5svh, 44px);
}

body[data-view="landscape"] .artWrap {
  grid-column: 1;
  grid-row: 1 / 4;
  align-self: center;
  justify-self: center;
  width: min(38vw, 73svh, 520px);
}

body[data-view="landscape"] .artWrap::before {
  box-shadow:
    0 0 0 clamp(12px, 2.2vw, 22px) rgba(var(--theme-top-rgb), 0.58),
    0 22px 72px rgba(0, 0, 0, 0.24);
}

body[data-view="landscape"] .cover {
  width: 56%;
  height: 56%;
}

body[data-view="landscape"] .recordGlow {
  left: 57%;
  top: -23%;
  width: clamp(28px, 3.4vw, 44px);
  height: 58%;
}

body[data-view="landscape"] .recordGlow::after {
  right: -72%;
  width: 210%;
}

body[data-view="landscape"] .nowPlaying {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  padding: 0;
}

body[data-view="landscape"] .artist {
  color: rgba(236, 230, 230, 0.58);
  font-size: clamp(1rem, 2.1vw, 1.3rem);
  font-weight: 560;
}

body[data-view="landscape"] .title {
  margin: 10px 0 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.93);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.1;
  font-weight: 820;
}

body[data-view="landscape"] .credit,
body[data-view="landscape"] .modeTabs {
  display: none;
}

body[data-view="landscape"] .lyricsPanel {
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
  align-self: stretch;
}

body[data-view="landscape"] .lyrics {
  height: 100%;
  max-height: none;
  min-height: 0;
  padding: 12svh 0 12svh;
}

body[data-view="landscape"] .lyricLine {
  min-height: clamp(34px, 7svh, 50px);
  max-width: 760px;
  color: rgba(236, 230, 230, 0.2);
  font-size: clamp(1.1rem, 2.25vw, 1.7rem);
  font-weight: 760;
}

body[data-view="landscape"] .lyricLine.isActive {
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.35rem, 2.7vw, 2.05rem);
}

body[data-view="landscape"] .transport {
  position: static;
  grid-column: 2;
  grid-row: 3;
  display: grid;
  grid-template-columns: 84px minmax(180px, 1fr) minmax(128px, 180px);
  gap: clamp(22px, 4vw, 54px);
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

body[data-view="landscape"] .timeline {
  grid-column: 2;
}

body[data-view="landscape"] .playBtn {
  grid-column: 1;
  width: 68px;
  height: 68px;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  font-size: 1.75rem;
}

body[data-view="landscape"] .timeRow {
  grid-template-columns: 58px 1fr 58px;
  color: rgba(236, 230, 230, 0.48);
  font-size: clamp(0.92rem, 1.8vw, 1.2rem);
}

body[data-view="landscape"] .qualityText {
  max-width: 82px;
  justify-self: center;
  line-height: 1.25;
  text-align: center;
}

body[data-view="landscape"] .mobileActions {
  grid-column: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(236, 230, 230, 0.58);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

body[data-view="landscape"] .viewSwitch {
  top: max(14px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  left: auto;
  transform: none;
}

@media (max-height: 520px) and (orientation: landscape) {
  body[data-view="landscape"] .player {
    grid-template-rows: minmax(74px, 22svh) minmax(86px, 1fr) minmax(76px, 24svh);
    padding-top: 14px;
    padding-bottom: 12px;
  }

  body[data-view="landscape"] .artWrap {
    width: min(35vw, 69svh, 430px);
  }

  body[data-view="landscape"] .lyrics {
    padding: 9svh 0 8svh;
  }
}

/* v11: mobile is a proper app-like two-panel player. */
body[data-view="portrait"] {
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  scroll-snap-type: none;
}

body[data-view="portrait"] .shell,
body[data-view="portrait"] .player {
  width: 100vw;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
}

body[data-view="portrait"] .player {
  display: block;
  padding: 0;
}

body[data-view="portrait"] .mobileTop {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 42;
  width: 100vw;
  min-height: 74px;
  padding: 0 clamp(18px, 5vw, 28px);
  background: linear-gradient(
    180deg,
    rgba(var(--theme-mid-rgb), 0.96),
    rgba(var(--theme-mid-rgb), 0)
  );
}

body[data-view="portrait"] .artWrap {
  position: fixed;
  left: 50%;
  top: clamp(92px, 11svh, 126px);
  z-index: 8;
  width: min(84vw, 52svh, 500px);
  margin: 0;
  cursor: pointer;
  transition:
    transform 420ms cubic-bezier(0.22, 0.8, 0.2, 1),
    opacity 260ms ease;
  transform: translateX(-50%);
}

body[data-view="portrait"][data-mobile-panel="lyrics"] .artWrap {
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(-50% - 104vw));
}

body[data-view="portrait"] .nowPlaying {
  position: fixed;
  left: clamp(22px, 6vw, 36px);
  right: clamp(22px, 6vw, 36px);
  bottom: calc(242px + env(safe-area-inset-bottom));
  z-index: 9;
  padding: 0;
  transition:
    transform 420ms cubic-bezier(0.22, 0.8, 0.2, 1),
    opacity 240ms ease;
}

body[data-view="portrait"][data-mobile-panel="lyrics"] .nowPlaying {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-104vw);
}

body[data-view="portrait"] .artist {
  font-size: clamp(1.2rem, 5.2vw, 1.65rem);
}

body[data-view="portrait"] .title {
  font-size: clamp(2rem, 8.4vw, 3rem);
  white-space: nowrap;
}

body[data-view="portrait"] .lyricsPanel {
  position: fixed;
  left: 100vw;
  top: 0;
  z-index: 7;
  width: 100vw;
  height: 100svh;
  min-height: 0;
  padding: 112px clamp(22px, 6vw, 36px) calc(236px + env(safe-area-inset-bottom));
  transition: transform 420ms cubic-bezier(0.22, 0.8, 0.2, 1);
}

body[data-view="portrait"] .lyricScrub {
  left: clamp(16px, 4vw, 28px);
  right: clamp(16px, 4vw, 28px);
  top: 46%;
  grid-template-columns: 58px minmax(0, 1fr) 48px;
  min-height: 58px;
  padding: 0 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.075);
}

body[data-view="portrait"] .lyricScrubText {
  font-size: clamp(1.08rem, 4.4vw, 1.34rem);
}

body[data-view="portrait"] .lyricScrubPlay {
  width: 40px;
  height: 40px;
}

body[data-view="portrait"][data-mobile-panel="lyrics"] .lyricsPanel {
  transform: translateX(-100vw);
}

body[data-view="portrait"] .lyrics {
  height: calc(100svh - 348px - env(safe-area-inset-bottom));
  max-height: none;
  min-height: 280px;
  padding: 20svh 0 22svh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body[data-view="portrait"] .lyricLine {
  min-height: clamp(42px, 6.2svh, 60px);
  justify-content: center;
  color: rgba(236, 230, 230, 0.28);
  font-size: clamp(1.12rem, 4.5vw, 1.48rem);
  text-align: center;
}

body[data-view="portrait"] .lyricLine.isActive {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.11);
}

body[data-view="portrait"] .transport {
  left: clamp(20px, 6vw, 36px);
  right: clamp(20px, 6vw, 36px);
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 44;
  grid-template-rows: 38px 72px 46px;
  gap: 10px;
  background: linear-gradient(
    180deg,
    rgba(var(--theme-bottom-rgb), 0),
    rgba(var(--theme-bottom-rgb), 0.9) 22%,
    rgba(var(--theme-bottom-rgb), 0.98)
  );
}

body[data-view="portrait"] .playBtn {
  width: 72px;
  height: 72px;
}

body[data-view="portrait"] .viewSwitch {
  top: 78px;
  right: max(14px, env(safe-area-inset-right));
  bottom: auto;
  left: auto;
  z-index: 50;
  flex-direction: row;
  transform: none;
  opacity: 0.72;
}

body[data-view="portrait"] .viewBtn {
  min-width: 46px;
  min-height: 28px;
  font-size: 0.78rem;
}

body[data-view="landscape"] {
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
}

body[data-view="landscape"] .shell,
body[data-view="landscape"] .player {
  height: 100svh;
  min-height: 0;
  overflow: hidden;
}

body[data-view="landscape"] .player {
  grid-template-columns: minmax(270px, 42vw) minmax(430px, 1fr);
  grid-template-rows: minmax(88px, 27svh) minmax(92px, 1fr) minmax(96px, 25svh);
  column-gap: clamp(34px, 6vw, 86px);
  padding: clamp(18px, 4.6svh, 36px) clamp(50px, 8vw, 100px) clamp(16px, 4svh, 34px);
}

body[data-view="landscape"] .artWrap {
  width: min(34vw, 70svh, 470px);
}

body[data-view="landscape"] .recordGlow {
  left: 58%;
  top: -20%;
  height: 54%;
}

body[data-view="landscape"] .nowPlaying {
  align-self: center;
}

body[data-view="landscape"] .artist {
  font-size: clamp(1rem, 1.9vw, 1.25rem);
}

body[data-view="landscape"] .title {
  max-width: 720px;
  font-size: clamp(2rem, 3.6vw, 2.7rem);
}

body[data-view="landscape"] .lyrics {
  padding: 5svh 0 6svh;
}

body[data-view="landscape"] .lyricLine {
  min-height: clamp(32px, 7svh, 48px);
  font-size: clamp(1.06rem, 2.15vw, 1.55rem);
}

body[data-view="landscape"] .lyricLine.isActive {
  font-size: clamp(1.24rem, 2.45vw, 1.82rem);
}

body[data-view="landscape"] .transport {
  grid-template-columns: 76px minmax(260px, 1fr) minmax(150px, 210px);
  gap: clamp(22px, 4vw, 48px);
  align-self: start;
}

body[data-view="landscape"] .playBtn {
  width: 62px;
  height: 62px;
}

body[data-view="landscape"] .timeRow {
  grid-template-columns: 58px minmax(120px, 1fr) 58px;
}

body[data-view="landscape"] .qualityText {
  max-width: none;
  white-space: nowrap;
}

body[data-view="landscape"] .viewSwitch {
  top: max(12px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  opacity: 0.72;
}

@media (orientation: landscape) and (max-height: 480px) {
  body[data-view="landscape"] .player {
    grid-template-columns: minmax(250px, 39vw) minmax(430px, 1fr);
    grid-template-rows: minmax(70px, 25svh) minmax(72px, 1fr) minmax(82px, 27svh);
    padding: 14px 64px 12px 60px;
  }

  body[data-view="landscape"] .artWrap {
    width: min(32vw, 66svh, 390px);
  }

  body[data-view="landscape"] .title {
    font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  }
}

/* v12: keep the album art clean on phone; no center puck over the cover. */
body[data-mode="mobile"] .artWrap::after {
  display: none;
}

/* v13: make the phone record label feel like album art, not a tiny sticker. */
body[data-mode="mobile"] .cover {
  width: 68%;
  height: 68%;
  box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.42);
}

/* v29: keep the song catalog discoverable in both phone orientations. */
.mobileCatalogButton {
  min-width: 76px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  color: rgba(242, 239, 238, 0.82);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
}

.mobileCatalogButton > span:first-child {
  font-size: 1.35rem;
  line-height: 1;
}

.mobileCatalogLabel {
  font-size: 0.9rem;
  line-height: 1;
}

body[data-view="portrait"] .mobileTop {
  grid-template-columns: 82px minmax(0, 1fr) 82px;
}

body[data-view="portrait"] .mobileTop > .topIcon:last-child {
  justify-self: end;
}

body[data-view="landscape"] .mobileTop {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  top: max(12px, env(safe-area-inset-top));
  z-index: 60;
  width: auto;
  min-height: 44px;
  display: block;
  padding: 0;
  background: none;
}

body[data-view="landscape"] .mobileTop .topTitle,
body[data-view="landscape"] .mobileTop > .topIcon:last-child {
  display: none;
}

body[data-view="landscape"] .mobileCatalogButton {
  padding: 0 12px;
  border: 1px solid rgba(242, 239, 238, 0.16);
  border-radius: 6px;
  background: rgba(20, 16, 17, 0.54);
  backdrop-filter: blur(12px);
}

.mobileDisclosure {
  display: none;
  color: rgba(242, 239, 238, 0.34);
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
}

body[data-view="portrait"] .mobileDisclosure {
  display: block;
}

body[data-view="landscape"] .credit {
  display: block;
  margin-top: 8px;
  color: rgba(237, 245, 246, 0.42);
  font-size: clamp(0.64rem, 1.15vw, 0.78rem);
  line-height: 1.35;
}

/* v16: lyric dragging uses the line itself as the seek row. */
.lyricScrub {
  display: none !important;
}

.lyricLine {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 56px;
  align-items: center;
  column-gap: 8px;
  padding: 0 10px;
  border-radius: 12px;
  transition:
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.lyricCredits {
  display: grid;
  gap: 7px;
  margin: 0 0 34px;
  padding: 10px 0 24px;
  border-bottom: 1px solid rgba(237, 245, 246, 0.1);
  color: rgba(237, 245, 246, 0.56);
  font-size: clamp(0.9rem, 1.25vw, 1.04rem);
  line-height: 1.45;
}

.lyricCredits p {
  margin: 0;
}

body[data-view="portrait"] .lyricCredits {
  justify-items: center;
  margin-bottom: 28px;
  padding: 8px 0 22px;
  color: rgba(242, 239, 238, 0.5);
  font-size: clamp(0.82rem, 3.5vw, 1rem);
  text-align: center;
}

body[data-view="landscape"] .lyricCredits {
  margin-bottom: 22px;
  padding-bottom: 18px;
  font-size: clamp(0.72rem, 1.2vw, 0.9rem);
}

.lyricText {
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lyricLine:not(.isPreview) .lyricText {
  grid-column: 1 / 4;
}

.lyricPreviewTime,
.lyricPreviewPlay {
  display: none;
}

.lyricLine.isPreview {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 16px 52px rgba(0, 0, 0, 0.14);
}

.lyricLine.isPreview .lyricPreviewTime {
  display: block;
  color: rgba(242, 239, 238, 0.58);
  font-size: 0.96rem;
  font-variant-numeric: tabular-nums;
}

.lyricLine.isPreview .lyricPreviewPlay {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  justify-self: end;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  cursor: pointer;
}

body[data-view="portrait"] .lyricLine,
body[data-view="landscape"] .lyricLine {
  grid-template-columns: 58px minmax(0, 1fr) 48px;
  column-gap: 6px;
  padding: 0 8px;
  border-radius: 10px;
}

body[data-view="portrait"] .lyricText,
body[data-view="landscape"] .lyricText {
  text-align: center;
}

body[data-view="portrait"] .lyricLine.isPreview,
body[data-view="landscape"] .lyricLine.isPreview {
  background: rgba(255, 255, 255, 0.076);
  box-shadow: none;
}

body[data-view="portrait"] .lyricLine.isPreview .lyricPreviewTime,
body[data-view="landscape"] .lyricLine.isPreview .lyricPreviewTime {
  font-size: clamp(0.86rem, 3.6vw, 1.08rem);
}

body[data-view="portrait"] .lyricLine.isPreview .lyricPreviewPlay,
body[data-view="landscape"] .lyricLine.isPreview .lyricPreviewPlay {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

/* Final volume layout: keep the meter usable without competing with mobile navigation. */
body[data-view="portrait"] .transport {
  position: fixed;
}

body[data-view="portrait"] .volumePanel {
  position: absolute;
  top: -42px;
  left: 0;
  width: min(78vw, 320px);
  grid-row: auto;
}

body[data-view="portrait"] .mobileActions {
  display: flex;
}

body[data-view="landscape"] .transport {
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 4px;
}

body[data-view="landscape"] .playBtn {
  grid-column: 1;
  grid-row: 1 / 3;
}

body[data-view="landscape"] .timeline {
  grid-column: 2;
  grid-row: 1;
}

body[data-view="landscape"] .volumePanel {
  grid-column: 2;
  grid-row: 2;
  width: min(100%, 270px);
}

body[data-view="landscape"] .mobileActions {
  display: none;
}
