:root {
  --bg: #232323;
  --bg-deep: #1b1b1b;
  --bg-bar: #1e1e1e;
  --row-a: #262626;
  --row-b: #2f2f2f;
  --row-hover: #383838;
  --panel: #2a2a2a;
  --line: #3a3a3a;
  --text: #e9e9e9;
  --text-soft: #d2d2d2;
  --muted: #9b9b9b;
  --muted-2: #7f7f7f;
  --blue: #1a6fe8;
  --blue-bright: #4e9cff;
  --blue-dark: #0a4fc2;
  --red: #c62b2b;
  --green: #7ed321;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

input {
  font: inherit;
}

input[type="range"] {
  accent-color: var(--blue);
}

img {
  border: 0;
}

audio {
  display: none;
}

[x-cloak] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  display: inline-block;
  vertical-align: middle;
  width: 1em;
  height: 1em;
  flex: none;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #474747;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #575757;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ================================================================
 * window frame
 * ================================================================ */
.window {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

/* ================================================================
 * title bar
 * ================================================================ */
.titlebar {
  position: relative;
  z-index: 60;
  flex: none;
  height: 66px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: var(--bg-bar);
  border-bottom: 1px solid #2c2c2c;
}

.titlebar-brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(145deg, #8ce033 0%, #57bd1d 55%, #3d9c13 100%);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(90, 190, 30, 0.35);
}

.brand-logo svg {
  width: 23px;
  height: 23px;
}

.titlebar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 440px;
  max-width: calc(100% - 480px);
}

.search-box {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  background: #2f2f2f;
  border: 1px solid #3a3a3a;
  border-radius: 9px;
  gap: 9px;
  transition: border-color 0.15s, background 0.15s;
}

.search-box:focus-within {
  border-color: #4a4a4a;
  background: #333;
}

.search-icon {
  width: 18px;
  height: 18px;
  color: #8d8d8d;
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.3px;
}

.search-box input::placeholder {
  color: #7d7d7d;
}

.search-clear {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #999;
}

.search-clear:hover {
  background: #454545;
  color: #ddd;
}

.search-clear svg {
  width: 13px;
  height: 13px;
}

.titlebar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-square {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #303030;
  display: grid;
  place-items: center;
  color: #d2d2d2;
  transition: background 0.15s, color 0.15s;
}

.tool-square:hover {
  background: #3c3c3c;
  color: #fff;
}

.tool-square svg {
  width: 19px;
  height: 19px;
}

.tool-plain {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #c4c4c4;
  border-radius: 6px;
}

.tool-plain:hover {
  background: #333;
  color: #fff;
}

.tool-plain svg {
  width: 20px;
  height: 20px;
}

.tool-menu {
  display: none;
  width: 38px;
  height: 38px;
  margin-right: 8px;
  border-radius: 8px;
  place-items: center;
  color: #d0d0d0;
  background: #2c2c2c;
}

.tool-menu svg {
  width: 20px;
  height: 20px;
}

.tool-menu:active {
  background: #3a3a3a;
}

.win-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.win-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #b9b9b9;
  transition: background 0.15s, color 0.15s;
}

.win-btn svg {
  width: 17px;
  height: 17px;
}

.win-btn:hover {
  background: #333;
  color: #fff;
}

.win-close:hover {
  background: #c62b2b;
  color: #fff;
}

/* ================================================================
 * workspace / sidebar
 * ================================================================ */
.workspace {
  flex: 1;
  min-height: 0;
  display: flex;
}

.sidebar {
  flex: none;
  width: 226px;
  padding: 18px 14px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #232323;
  transition: width 0.18s ease, padding 0.18s ease, opacity 0.15s ease;
}

.no-sidebar .sidebar {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  opacity: 0;
  pointer-events: none;
}

.sidebar-backdrop {
  display: none;
}

.side-section {
  margin: 2px 10px 10px;
  color: #e7e7e7;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.side-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
  color: #cfcfcf;
}

.side-add {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #cfcfcf;
}

.side-add:hover {
  background: #3a3a3a;
  color: #fff;
}

.side-add svg {
  width: 16px;
  height: 16px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.side-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 7px;
  color: #d8d8d8;
  font-size: 14px;
  text-align: left;
  transition: background 0.13s, color 0.13s;
}

.side-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.side-item.active {
  background: var(--blue);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(26, 111, 232, 0.22);
}

.side-icon {
  width: 18px;
  height: 18px;
  color: #cfcfcf;
}

.side-item.active .side-icon {
  color: #fff;
}

.side-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-count {
  margin-left: auto;
  font-size: 11px;
  color: #9a9a9a;
  flex: none;
}

.side-item.active .side-count {
  color: rgba(255, 255, 255, 0.8);
}

.side-new {
  color: #a9a9a9;
}

.side-new:hover {
  color: #e9e9e9;
}

.side-playlist .side-name {
  flex: 1;
}

.side-playlist .eq-side {
  margin-left: auto;
}

.side-playlist .side-count + .eq-side {
  margin-left: 8px;
}

.side-more {
  display: none;
  width: 30px;
  height: 30px;
  margin-left: 4px;
  border-radius: 6px;
  place-items: center;
  color: #a5a5a5;
  flex: none;
}

.side-more svg {
  width: 16px;
  height: 16px;
}

.side-more:active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.eq,
.row-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  width: 15px;
  flex: none;
  color: currentColor;
}

.eq i,
.row-eq i {
  display: block;
  width: 2.5px;
  height: 100%;
  border-radius: 1px;
  background: currentColor;
  transform-origin: bottom center;
  animation: eqBounce 0.95s ease-in-out infinite;
}

.eq i:nth-child(2),
.row-eq i:nth-child(2) {
  animation-delay: 0.18s;
}

.eq i:nth-child(3),
.row-eq i:nth-child(3) {
  animation-delay: 0.36s;
}

.eq i:nth-child(4),
.row-eq i:nth-child(4) {
  animation-delay: 0.54s;
}

@keyframes eqBounce {
  0%,
  100% {
    transform: scaleY(0.32);
  }
  45% {
    transform: scaleY(1);
  }
  70% {
    transform: scaleY(0.6);
  }
}

/* ================================================================
 * main / content head
 * ================================================================ */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.content-head {
  position: relative;
  flex: none;
  height: 86px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 26px;
  z-index: 20;
}

.head-left {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.btn-play-all {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 17px 0 6px;
  border-radius: 19px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: filter 0.15s, transform 0.12s;
}

.btn-play-all:hover {
  filter: brightness(1.08);
}

.btn-play-all:active {
  transform: scale(0.98);
}

.pa-circle {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--red);
}

.pa-circle svg {
  width: 14px;
  height: 14px;
  margin-left: 1px;
}

.head-count {
  color: #b0b0b0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.head-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 42%;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #f3f3f3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.head-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 25;
}

.seg {
  display: flex;
  align-items: center;
  gap: 2px;
}

.seg button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #8f8f8f;
  transition: background 0.15s, color 0.15s;
}

.seg button svg {
  width: 18px;
  height: 18px;
}

.seg button:hover {
  background: #2f2f2f;
  color: #ddd;
}

.seg button.on {
  color: #f2f2f2;
}

.head-sort {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #c2c2c2;
  transition: background 0.15s;
}

.head-sort:hover {
  background: #2f2f2f;
}

.head-sort svg {
  width: 19px;
  height: 19px;
}

.sort-menu {
  position: absolute;
  right: 0;
  top: 44px;
  width: 152px;
  padding: 6px;
  background: #2c2c2c;
  border: 1px solid #3d3d3d;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 30;
}

.sort-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border-radius: 5px;
  color: #d2d2d2;
  font-size: 13px;
  text-align: left;
}

.sort-menu button:hover {
  background: #383838;
}

.sort-menu button.on {
  color: var(--blue-bright);
}

.sort-check {
  width: 15px;
  height: 15px;
}

.main-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 26px 26px;
}

.scroll-content {
  min-height: 100%;
}

/* ================================================================
 * track list
 * ================================================================ */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 8px;
}

.track-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1.65fr) minmax(0, 1fr) minmax(0, 1.12fr) 76px;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 4px;
  background: var(--row-a);
  color: var(--text-soft);
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
}

.track-row:nth-child(even) {
  background: var(--row-b);
}

.track-row:hover {
  background: var(--row-hover);
}

.track-row.is-active {
  background: #2c2c2c;
  color: var(--blue-bright);
}

.col-index {
  display: flex;
  align-items: center;
  color: #9a9a9a;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.track-row.is-active .col-index {
  color: var(--blue-bright);
}

.row-num {
  padding-left: 2px;
}

.col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-right: 14px;
}

.track-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #e2e2e2;
}

.track-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.track-artist-m {
  display: none;
}

.row-more {
  display: none;
  width: 30px;
  height: 34px;
  border-radius: 6px;
  place-items: center;
  color: #9a9a9a;
}

.row-more svg {
  width: 17px;
  height: 17px;
}

.row-more:active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.track-row.is-active .track-name {
  color: var(--blue-bright);
}

.track-flag {
  flex: none;
  font-size: 10px;
  line-height: 14px;
  padding: 0 3px;
  border: 1px solid #4b4b4b;
  border-radius: 3px;
  color: #9a9a9a;
}

.track-row.is-active .track-flag {
  border-color: rgba(78, 156, 255, 0.55);
  color: var(--blue-bright);
}

.col-artist,
.col-album {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #9f9f9f;
  padding-right: 14px;
}

.track-row.is-active .col-artist,
.track-row.is-active .col-album {
  color: var(--blue-bright);
}

.col-duration {
  text-align: right;
  color: #9f9f9f;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.track-row.is-active .col-duration {
  color: var(--blue-bright);
}

/* ================================================================
 * grid cards
 * ================================================================ */
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 24px 18px;
  padding: 4px 2px 22px;
}

.track-card {
  cursor: pointer;
  min-width: 0;
}

.cover {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #3b3b3b, #292929);
  border-radius: 6px;
}

.cover-lg {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.cover-note {
  position: absolute;
  width: 38%;
  height: 38%;
  color: rgba(255, 255, 255, 0.16);
}

.cover img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.track-card:hover .cover img,
.album-card:hover .cover img {
  transform: scale(1.035);
}

.card-play {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.16s, transform 0.16s;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.card-play svg {
  width: 16px;
  height: 16px;
  margin-left: 2px;
}

.card-more {
  display: none;
  position: absolute;
  top: 5px;
  right: 5px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  place-items: center;
  color: #fff;
  background: rgba(12, 12, 12, 0.62);
  backdrop-filter: blur(4px);
  z-index: 3;
}

.card-more svg {
  width: 17px;
  height: 17px;
}

.card-more:active {
  background: rgba(12, 12, 12, 0.85);
}

.track-card:hover .card-play {
  opacity: 1;
  transform: translateY(0);
}

.track-card.is-active .cover {
  box-shadow: 0 0 0 2px var(--blue);
}

.card-title {
  margin-top: 10px;
  color: #e4e4e4;
  font-size: 13.5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.track-card.is-active .card-title {
  color: var(--blue-bright);
}

.card-sub {
  margin-top: 3px;
  color: #8d8d8d;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 26px 18px;
  padding: 4px 2px 22px;
}

.album-card {
  cursor: pointer;
  min-width: 0;
}

.artist-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 20px;
}

.artist-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 9px 14px;
  border-radius: 6px;
  background: var(--row-a);
  text-align: left;
  transition: background 0.13s;
}

.artist-card:nth-child(even) {
  background: var(--row-b);
}

.artist-card:hover {
  background: var(--row-hover);
}

.artist-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3d3d3d, #2c2c2c);
  display: grid;
  place-items: center;
  color: #9b9b9b;
  flex: none;
}

.artist-avatar svg {
  width: 21px;
  height: 21px;
}

.artist-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.artist-name {
  color: #e5e5e5;
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.artist-count {
  color: #8c8c8c;
  font-size: 12px;
}

/* ================================================================
 * states
 * ================================================================ */
.loading-state,
.error-state {
  padding: 90px 20px;
  text-align: center;
  color: #9a9a9a;
  font-size: 14px;
}

.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid #3b3b3b;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-state p {
  margin: 16px 0 0;
}

.error-state {
  color: #d98f8f;
}

.error-state p {
  margin: 0 0 16px;
}

.empty-state {
  padding: 90px 20px;
  text-align: center;
  color: #8d8d8d;
}

.empty-icon {
  width: 46px;
  height: 46px;
  color: #565656;
}

.empty-state p {
  margin: 16px 0 0;
  font-size: 14px;
}

.empty-sub {
  font-size: 12.5px !important;
  color: #6e6e6e;
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 18px 0 8px;
}

.load-more button {
  height: 34px;
  padding: 0 22px;
  border-radius: 17px;
  background: #2f2f2f;
  color: #cfcfcf;
  font-size: 13px;
  transition: background 0.15s;
}

.load-more button:hover {
  background: #3b3b3b;
  color: #fff;
}

/* ================================================================
 * player bar
 * ================================================================ */
.player {
  position: relative;
  z-index: 50;
  flex: none;
  height: 82px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: var(--bg-bar);
  border-top: 1px solid #2e2e2e;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.pbtn {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #2f2f2f;
  color: #e4e4e4;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.pbtn svg {
  width: 18px;
  height: 18px;
}

.pbtn:hover {
  background: #3b3b3b;
  color: #fff;
}

.pbtn:active {
  transform: scale(0.96);
}

.pbtn-fav {
  display: none;
}

.pbtn-fav.is-on {
  color: #ff6b6b;
}

.pbtn-play {
  width: 46px;
  height: 46px;
  background: #343434;
}

.pbtn-play svg {
  width: 20px;
  height: 20px;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
  width: 236px;
  min-width: 0;
  cursor: pointer;
}

.player-progress {
  display: none;
}

.np-cover {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
  display: grid;
  place-items: center;
  flex: none;
}

.np-cover .cover-note {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.17);
}

.np-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.np-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.np-title {
  color: #ececec;
  font-size: 13.5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.np-artist {
  color: #8e8e8e;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wave-wrap {
  position: relative;
  flex: 1;
  min-width: 100px;
  height: 100%;
  display: flex;
  align-items: center;
}

#waveCanvas {
  width: 100%;
  height: 56px;
  display: block;
  cursor: pointer;
  touch-action: none;
}

.wave-tip {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(8, 8, 8, 0.88);
  border: 1px solid #3d3d3d;
  color: #eee;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  z-index: 2;
}

.player-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.picon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #d0d0d0;
  transition: background 0.15s, color 0.15s;
}

.picon svg {
  width: 20px;
  height: 20px;
}

.picon:hover {
  background: #2f2f2f;
  color: #fff;
}

.picon.is-on {
  color: #ff6b6b;
}

.lrc-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  color: #cfcfcf;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  transition: background 0.15s, color 0.15s;
}

.lrc-btn:hover {
  background: #2f2f2f;
  color: #fff;
}

.lrc-btn.is-on {
  background: var(--blue);
  color: #fff;
}

.queue-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  transition: filter 0.15s;
}

.queue-btn svg {
  width: 19px;
  height: 19px;
}

.queue-btn:hover {
  filter: brightness(1.1);
}

.volume-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.volume-pop {
  position: absolute;
  right: -6px;
  bottom: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 168px;
  padding: 10px 12px;
  background: #2b2b2b;
  border: 1px solid #3d3d3d;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  z-index: 60;
}

.volume-pop input {
  width: 118px;
  height: 4px;
}

.volume-value {
  width: 24px;
  font-size: 11px;
  color: #a5a5a5;
  text-align: right;
}

/* ================================================================
 * queue drawer
 * ================================================================ */
.queue-drawer {
  position: fixed;
  top: 66px;
  right: 0;
  bottom: 82px;
  width: 362px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  background: #202020;
  border-left: 1px solid #343434;
  box-shadow: -16px 0 38px rgba(0, 0, 0, 0.42);
  z-index: 46;
}

.queue-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px 10px 18px;
}

.queue-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #eaeaea;
}

.queue-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #8b8b8b;
}

.queue-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 8px 16px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 10px;
  border-radius: 6px;
  color: #d5d5d5;
  cursor: pointer;
  transition: background 0.13s;
}

.queue-item:hover {
  background: #2b2b2b;
}

.queue-item.is-active {
  background: #2b2b2b;
  color: var(--blue-bright);
}

.queue-index {
  width: 18px;
  flex: none;
  font-size: 12px;
  color: #8a8a8a;
  text-align: center;
}

.queue-item.is-active .queue-index {
  color: var(--blue-bright);
}

.queue-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.queue-title {
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.queue-artist {
  font-size: 11.5px;
  color: #8a8a8a;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.queue-time {
  flex: none;
  font-size: 11.5px;
  color: #8a8a8a;
  font-variant-numeric: tabular-nums;
}

.queue-empty {
  padding: 44px 18px;
  color: #777;
  font-size: 13px;
  text-align: center;
}

.queue-enter {
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.queue-enter-start {
  transform: translateX(100%);
  opacity: 0;
}

.queue-enter-end {
  transform: translateX(0);
  opacity: 1;
}

.queue-leave {
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.queue-leave-start {
  transform: translateX(0);
  opacity: 1;
}

.queue-leave-end {
  transform: translateX(100%);
  opacity: 0;
}

/* ================================================================
 * lyrics view
 * ================================================================ */
.lyrics-view {
  position: fixed;
  top: 66px;
  left: 0;
  right: 0;
  bottom: 82px;
  overflow: hidden;
  z-index: 40;
  background: #333;
}

.lyrics-bg {
  position: absolute;
  inset: -70px;
  background-size: cover;
  background-position: center;
  filter: blur(58px) brightness(0.34) saturate(0.62);
  transform: scale(1.18);
  opacity: 0.95;
}

.lyrics-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 32% 45%, rgba(70, 70, 70, 0.08), rgba(18, 18, 18, 0.55) 72%),
    linear-gradient(180deg, rgba(30, 30, 30, 0.34), rgba(20, 20, 20, 0.52));
}

.lyrics-watermark {
  position: absolute;
  left: 49%;
  top: 48%;
  width: 540px;
  height: 540px;
  transform: translate(-50%, -50%) rotate(-7deg);
  color: rgba(146, 196, 84, 0.17);
  filter: blur(3px);
  z-index: 1;
  pointer-events: none;
}

.lyrics-inner {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5%;
  padding: 0 7% 0 9%;
}

.lyrics-mobile-head {
  display: none;
}

.lyrics-art-col {
  flex: none;
  width: 252px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lyrics-art {
  position: relative;
  width: 250px;
  height: 250px;
  border-radius: 4px;
  overflow: hidden;
  background: #f4f4f4;
  display: grid;
  place-items: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.lyrics-art .cover-note {
  width: 44%;
  height: 44%;
  color: #7ed321;
}

.lyrics-art img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lyrics-song {
  margin-top: 18px;
  max-width: 250px;
  color: #ededed;
  font-size: 15px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lyrics-artist {
  margin-top: 5px;
  max-width: 250px;
  color: #9d9d9d;
  font-size: 12.5px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lyrics-stage {
  position: relative;
  flex: 1;
  max-width: 49%;
  height: 74%;
  min-width: 280px;
  display: flex;
  align-items: center;
}

.lyrics-pane {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 39% 0;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 17%, #000 83%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 17%, #000 83%, transparent 100%);
}

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

.lyrics-lines {
  display: flex;
  flex-direction: column;
  padding: 0 6px 0 18px;
}

.lyric-line {
  position: relative;
  padding: 15px 0;
  color: #bbbbbb;
  font-size: 17px;
  line-height: 1.45;
  text-align: center;
  cursor: pointer;
  transition: color 0.18s;
  z-index: 2;
}

.lyric-line:hover {
  color: #dedede;
}

.lyric-line.is-active {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
}

.lyric-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.lyric-extra {
  display: block;
  margin-top: 3px;
  color: #a0a0a0;
  font-size: 13px;
  font-weight: 400;
}

.lyric-line.is-active .lyric-extra {
  color: #cfcfcf;
}

.lyrics-placeholder {
  padding: 40px 0;
  color: #999;
  font-size: 14px;
  text-align: center;
}

.lyrics-placeholder p {
  margin: 6px 0;
}

.lyrics-seek {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(205, 205, 205, 0.62);
  z-index: 4;
  cursor: ew-resize;
  touch-action: none;
}

.lyrics-seek:hover {
  background: rgba(235, 235, 235, 0.85);
}

.seek-play {
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #e8e8e8;
  display: grid;
  place-items: center;
}

.seek-play svg {
  width: 16px;
  height: 16px;
}

.seek-track {
  position: absolute;
  inset: 0;
  background: transparent;
}

.seek-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  margin-top: -0.5px;
  background: #8fb8ff;
  opacity: 0.8;
  pointer-events: none;
}

.seek-end {
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.seek-end-left {
  left: -1px;
  transform: translate(-100%, -50%);
  border-right: 6px solid rgba(225, 225, 225, 0.9);
}

.seek-end-right {
  right: -1px;
  transform: translate(100%, -50%);
  border-left: 6px solid rgba(225, 225, 225, 0.9);
}

/* ================================================================
 * context menus
 * ================================================================ */
.context-menu {
  position: fixed;
  z-index: 120;
  min-width: 224px;
  padding: 6px;
  background: #2b2b2b;
  border: 1px solid #3f3f3f;
  border-radius: 9px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52);
}

.context-menu-sm {
  min-width: 186px;
}

.context-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border-radius: 5px;
  color: #d8d8d8;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

.context-menu button svg {
  width: 16px;
  height: 16px;
  color: #a8a8a8;
}

.context-menu button:hover {
  background: #383838;
  color: #fff;
}

.context-menu button:hover svg {
  color: #ddd;
}

.menu-sep {
  height: 1px;
  margin: 5px 7px;
  background: #3a3a3a;
}

.menu-label {
  padding: 5px 10px;
  color: #8a8a8a;
  font-size: 11px;
  letter-spacing: 0.3px;
}

.menu-scroll {
  max-height: 158px;
  overflow-y: auto;
}

.menu-strong {
  color: #6aa8ff !important;
}

.menu-strong svg {
  color: #6aa8ff !important;
}

.menu-danger {
  color: #e07a7a !important;
}

.menu-danger svg {
  color: #e07a7a !important;
}

/* ================================================================
 * modal / code gate / toast
 * ================================================================ */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}

.modal {
  width: 364px;
  max-width: calc(100vw - 40px);
  padding: 22px;
  background: #2a2a2a;
  border: 1px solid #3d3d3d;
  border-radius: 12px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

.modal h3 {
  margin: 0 0 15px;
  color: #f0f0f0;
  font-size: 16px;
  font-weight: 600;
}

.modal input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: #1f1f1f;
  border: 1px solid #3d3d3d;
  border-radius: 7px;
  outline: 0;
  color: #f0f0f0;
  font-size: 14px;
}

.modal input:focus {
  border-color: var(--blue);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.btn-primary,
.btn-ghost {
  height: 36px;
  padding: 0 17px;
  border-radius: 7px;
  font-size: 13.5px;
  transition: filter 0.15s, background 0.15s;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-ghost {
  background: #343434;
  color: #cfcfcf;
}

.btn-ghost:hover {
  background: #3f3f3f;
  color: #fff;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 102px;
  transform: translateX(-50%);
  z-index: 300;
  padding: 9px 17px;
  background: rgba(18, 18, 18, 0.94);
  border: 1px solid #3d3d3d;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  color: #ededed;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
}

/* ================================================================
 * responsive
 * ================================================================ */
@media (max-width: 1180px) {
  .titlebar-center {
    width: 360px;
    max-width: calc(100% - 440px);
  }

  .now-playing {
    width: 200px;
  }

  .lyrics-art-col {
    width: 210px;
  }

  .lyrics-art {
    width: 210px;
    height: 210px;
  }
}

/* 平板及以下：侧栏改为抽屉，主区铺满 */
@media (max-width: 920px) {
  .titlebar-center {
    position: static;
    transform: none;
    flex: 1;
    width: auto;
    max-width: none;
    margin: 0 14px;
  }

  .search-box {
    width: 100%;
  }

  .search-box input,
  .modal input {
    font-size: 16px;
  }

  .tool-plain,
  .win-controls {
    display: none;
  }

  .tool-menu {
    display: grid;
  }

  .sidebar {
    position: fixed;
    top: 66px;
    bottom: 82px;
    left: 0;
    width: min(84vw, 320px);
    padding: 16px 12px 20px;
    z-index: 70;
    background: #232323;
    border-right: 1px solid #303030;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    opacity: 1;
    pointer-events: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  body:not(.no-sidebar) .sidebar {
    transform: none;
    pointer-events: auto;
  }

  body.no-sidebar .sidebar {
    width: min(84vw, 320px);
    padding: 16px 12px 20px;
    opacity: 1;
    transform: translateX(-102%);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    top: 66px;
    bottom: 82px;
    left: 0;
    right: 0;
    z-index: 65;
    background: rgba(0, 0, 0, 0.52);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  body:not(.no-sidebar) .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .content-head {
    height: 78px;
    padding: 0 18px;
  }

  .head-title {
    max-width: 36%;
    font-size: 19px;
  }

  .head-count {
    display: none;
  }

  .main-scroll {
    padding: 0 18px 22px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .track-row {
    grid-template-columns: 44px minmax(0, 1.7fr) minmax(0, 1fr) 56px 32px;
  }

  .row-more,
  .card-more,
  .side-more {
    display: grid;
  }

  .col-album {
    display: none;
  }

  .now-playing {
    width: 180px;
  }

  .np-cover {
    width: 42px;
    height: 42px;
  }

  .lyrics-art-col {
    display: none;
  }

  .lyrics-stage {
    max-width: 88%;
    margin: 0 auto;
  }

  .lyrics-inner {
    padding: 0 6%;
  }

  .queue-list {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

/* 手机 */
@media (max-width: 700px) {
  .titlebar {
    height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 8px 0;
    gap: 4px;
  }

  .titlebar-brand {
    gap: 0;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .brand-logo svg {
    width: 20px;
    height: 20px;
  }

  .tool-menu {
    width: 36px;
    height: 36px;
    margin-right: 6px;
  }

  .titlebar-center {
    margin: 0 6px;
  }

  .search-box {
    height: 36px;
    padding: 0 9px;
    gap: 6px;
    border-radius: 8px;
  }

  .search-box input {
    font-size: 16px;
  }

  .search-icon {
    width: 16px;
    height: 16px;
  }

  .titlebar-actions {
    gap: 4px;
  }

  .tool-square {
    width: 34px;
    height: 34px;
  }

  .content-head {
    height: 58px;
    padding: 0 12px;
    gap: 6px;
  }

  .head-left {
    gap: 6px;
  }

  .head-title {
    position: static;
    transform: none;
    display: block;
    order: 2;
    flex: 1;
    min-width: 0;
    max-width: none;
    margin: 0;
    font-size: 17px;
    text-align: left;
    pointer-events: auto;
  }

  .head-right {
    order: 3;
    gap: 2px;
  }

  .btn-play-all {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }

  .btn-play-all > span:not(.pa-circle) {
    display: none;
  }

  .pa-circle {
    width: 26px;
    height: 26px;
    background: transparent;
    color: #fff;
  }

  .pa-circle svg {
    width: 13px;
    height: 13px;
  }

  .seg button {
    width: 30px;
    height: 30px;
  }

  .head-sort {
    width: 32px;
    height: 32px;
  }

  .sort-menu {
    top: 40px;
    right: 0;
    width: 148px;
  }

  .main-scroll {
    padding: 0 10px 18px;
  }

  .track-row {
    grid-template-columns: 26px minmax(0, 1fr) 44px 30px;
    height: auto;
    min-height: 56px;
    padding: 7px 6px 7px 8px;
    column-gap: 4px;
    font-size: 14px;
  }

  .col-index {
    font-size: 12px;
  }

  .col-title {
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding-right: 0;
  }

  .track-line {
    width: 100%;
    gap: 6px;
  }

  .track-name {
    min-width: 0;
  }

  .track-artist-m {
    display: block;
    color: #8f8f8f;
    font-size: 11.5px;
    line-height: 1.3;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .col-artist {
    display: none;
  }

  .col-duration {
    font-size: 12px;
    padding-right: 2px;
  }

  .row-more {
    display: grid;
  }

  .track-grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 18px 12px;
    padding-bottom: 16px;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 18px 12px;
  }

  .card-more {
    display: grid;
  }

  .card-play {
    display: none;
  }

  .card-title {
    margin-top: 8px;
    font-size: 13px;
  }

  .card-sub {
    font-size: 11.5px;
  }

  .artist-card {
    min-height: 58px;
    padding: 8px 10px;
  }

  .artist-avatar {
    width: 40px;
    height: 40px;
  }

  /* 播放条 */
  .player {
    height: calc(64px + env(safe-area-inset-bottom));
    gap: 2px;
    padding: 0 8px env(safe-area-inset-bottom);
  }

  .now-playing {
    order: 1;
    flex: 1;
    width: auto;
    min-width: 0;
    gap: 8px;
    padding: 0 2px;
  }

  .np-cover {
    display: grid;
    width: 40px;
    height: 40px;
  }

  .np-title {
    font-size: 13px;
  }

  .np-artist {
    font-size: 11px;
  }

  .player-left {
    order: 2;
    gap: 0;
  }

  .player-left .pbtn {
    display: none;
  }

  .player-left .pbtn-play,
  .player-left .pbtn-fav,
  .player-left .pbtn:last-child {
    display: grid;
  }

  .pbtn {
    width: 38px;
    height: 38px;
    background: transparent;
  }

  .pbtn-play {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #343434;
  }

  .pbtn:active {
    background: #3b3b3b;
  }

  .wave-wrap {
    display: none;
  }

  .player-right {
    order: 3;
    gap: 0;
  }

  .player-right .picon {
    display: none;
  }

  .volume-wrap {
    display: none;
  }

  .lrc-btn {
    width: 38px;
    height: 36px;
    padding: 0;
    font-size: 0;
    border-radius: 8px;
  }

  .lrc-btn::after {
    content: "词";
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
  }

  .queue-btn {
    width: 38px;
    height: 38px;
  }

  .player-progress {
    display: block;
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 14px;
    z-index: 3;
    cursor: pointer;
    touch-action: none;
  }

  .player-progress::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 6px;
    height: 2px;
    background: rgba(255, 255, 255, 0.16);
  }

  .player-progress > span {
    position: absolute;
    left: 0;
    top: 6px;
    height: 2px;
    background: var(--blue-bright);
    border-radius: 2px;
    pointer-events: none;
  }

  .player-progress > span::after {
    content: "";
    position: absolute;
    right: -3.5px;
    top: -2.5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(30, 30, 30, 0.9);
  }

  .toast {
    bottom: calc(76px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 32px);
    text-align: center;
  }

  /* 歌词 */
  .lyrics-view {
    top: calc(56px + env(safe-area-inset-top));
    bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .lyrics-inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
  }

  .lyrics-mobile-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
    padding: 12px 12px 6px 14px;
  }

  .lmh-cover {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    flex: none;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
  }

  .lmh-cover .cover-note {
    position: absolute;
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.2);
  }

  .lmh-cover img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .lmh-meta {
    flex: 1;
    min-width: 0;
  }

  .lmh-title {
    color: #f0f0f0;
    font-size: 14px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .lmh-artist {
    margin-top: 3px;
    color: #9a9a9a;
    font-size: 11.5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .lmh-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #bdbdbd;
    flex: none;
  }

  .lmh-close:active {
    background: rgba(255, 255, 255, 0.12);
  }

  .lmh-close svg {
    width: 18px;
    height: 18px;
  }

  .lyrics-stage {
    flex: 1;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-width: 0;
    margin: 0;
  }

  .lyrics-pane {
    padding: 36% 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .lyrics-lines {
    padding: 0 10px 0 12px;
  }

  .lyric-line {
    font-size: 16px;
    padding: 13px 0;
  }

  .lyric-line.is-active {
    font-size: 17px;
  }

  .lyrics-watermark {
    width: 340px;
    height: 340px;
  }

  .lyrics-seek {
    left: 0;
    right: 0;
  }

  .seek-track {
    inset: -14px 0;
  }

  .seek-play {
    left: -14px;
  }

  /* 队列 */
  .queue-drawer {
    top: calc(56px + env(safe-area-inset-top));
    bottom: calc(64px + env(safe-area-inset-bottom));
    width: 100vw;
    max-width: none;
    border-left: 0;
  }

  .queue-head {
    padding: 12px 10px 8px 16px;
  }

  .queue-item {
    min-height: 52px;
  }

  /* 侧栏抽屉 */
  .sidebar {
    top: calc(56px + env(safe-area-inset-top));
    bottom: calc(64px + env(safe-area-inset-bottom));
    padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
  }

  body.no-sidebar .sidebar {
    padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
  }

  .sidebar-backdrop {
    top: calc(56px + env(safe-area-inset-top));
    bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .side-item {
    height: 46px;
  }

  .side-more {
    display: grid;
  }

  /* 菜单改为底部弹层 */
  .context-menu {
    left: 0 !important;
    right: 0;
    top: auto !important;
    bottom: 0;
    width: 100%;
    min-width: 0;
    max-height: 72vh;
    overflow-y: auto;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.55);
    overscroll-behavior: contain;
  }

  .context-menu::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    margin: 0 auto 8px;
    border-radius: 2px;
    background: #4a4a4a;
  }

  .context-menu button {
    height: 46px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14.5px;
  }

  .context-menu button svg {
    width: 18px;
    height: 18px;
  }

  .context-menu-sm {
    min-width: 0;
  }

  .menu-scroll {
    max-height: 34vh;
  }

  /* 弹窗 */
  .modal {
    width: calc(100vw - 32px);
    max-width: 420px;
    padding: 20px;
  }

  .modal input {
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  .titlebar {
    padding-left: 6px;
    padding-right: 6px;
  }

  .tool-menu {
    margin-right: 4px;
  }

  .titlebar-center {
    margin: 0 4px;
  }

  .search-icon {
    display: none;
  }

  .content-head {
    padding: 0 10px;
  }

  .head-title {
    font-size: 16px;
  }

  .now-playing {
    gap: 6px;
  }

  .np-cover {
    width: 36px;
    height: 36px;
  }

  .lrc-btn {
    width: 34px;
  }

  .queue-btn {
    width: 34px;
    height: 34px;
  }
}

/* 手机横屏：压缩上下栏高度 */
@media (max-height: 480px) and (orientation: landscape) {
  .titlebar {
    height: calc(50px + env(safe-area-inset-top));
  }

  .content-head {
    height: 50px;
  }

  .player {
    height: calc(58px + env(safe-area-inset-bottom));
  }

  .lyrics-view,
  .queue-drawer {
    top: calc(50px + env(safe-area-inset-top));
    bottom: calc(58px + env(safe-area-inset-bottom));
  }

  .sidebar {
    top: calc(50px + env(safe-area-inset-top));
    bottom: calc(58px + env(safe-area-inset-bottom));
  }

  .sidebar-backdrop {
    top: calc(50px + env(safe-area-inset-top));
    bottom: calc(58px + env(safe-area-inset-bottom));
  }

  .np-cover {
    display: none;
  }

  .lyrics-mobile-head {
    padding-top: 4px;
  }
}
