:root {
  color-scheme: dark;
  --bg: #030714;
  --panel: rgba(9, 22, 39, 0.76);
  --panel-soft: rgba(13, 30, 51, 0.72);
  --panel-strong: rgba(8, 18, 33, 0.92);
  --text: #edf7ff;
  --muted: #92a9bd;
  --dim: #6f879b;
  --line: rgba(136, 203, 247, 0.16);
  --line-strong: rgba(150, 217, 255, 0.34);
  --accent: #8bd8ff;
  --accent-strong: #ccefff;
  --violet: #9b8cff;
  --button: rgba(17, 43, 70, 0.72);
  --button-hover: rgba(30, 74, 112, 0.78);
  --shadow: 0 20px 58px rgba(0, 0, 0, 0.38);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 14% 4%, rgba(58, 130, 211, 0.25), transparent 28rem),
    radial-gradient(circle at 86% 12%, rgba(112, 92, 220, 0.18), transparent 30rem),
    radial-gradient(circle at 52% 105%, rgba(34, 118, 165, 0.14), transparent 34rem),
    linear-gradient(145deg, #02050f 0%, #071526 54%, #030713 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(139, 216, 255, 0.07), transparent 46%),
    radial-gradient(ellipse at 82% 100%, rgba(112, 92, 220, 0.06), transparent 52%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 82%);
}

.ambient-bubbles {
  --vh-unit: 1vh;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

@supports (height: 100dvh) {
  .ambient-bubbles {
    height: 100dvh;
    --vh-unit: 1dvh;
  }
}

.ambient-bubble {
  --size: 24px;
  --x: 50%;
  --delay: 0s;
  --duration: 36s;
  --drift: 0px;
  --peak: 0.42;
  --scale-start: 0.65;
  --scale-end: 1.12;
  --edge: 0.24;
  --glow: 0.14;
  --highlight-x: 30%;
  --highlight-y: 28%;
  --highlight-alpha: 0.55;

  position: absolute;
  left: var(--x);
  bottom: calc(-6 * var(--vh-unit));
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  opacity: 0;
  background: transparent;
  border: 1px solid rgba(186, 232, 255, var(--edge));
  box-shadow: 0 0 calc(var(--size) * 0.55) rgba(120, 196, 255, var(--glow));
  animation: ambient-bubble-rise var(--duration) linear infinite;
  animation-delay: var(--delay);
  will-change: transform, opacity;
}

.ambient-bubble::before {
  content: "";
  position: absolute;
  left: var(--highlight-x);
  top: var(--highlight-y);
  width: 24%;
  height: 24%;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 255, 255, var(--highlight-alpha));
  box-shadow: 0 0 8px rgba(220, 245, 255, 0.35);
  transform: translate(-42%, -42%);
}

.ambient-bubble--1 {
  --x: 6%;
  --size: 22px;
  --duration: 32s;
  --delay: 0s;
  --drift: 12px;
  --peak: 0.4;
  --scale-start: 0.62;
  --scale-end: 1.08;
  --edge: 0.22;
  --glow: 0.12;
  --highlight-x: 28%;
  --highlight-y: 24%;
}

.ambient-bubble--2 {
  --x: 19%;
  --size: 38px;
  --duration: 48s;
  --delay: -5s;
  --drift: -14px;
  --peak: 0.5;
  --scale-start: 0.58;
  --scale-end: 1.2;
  --edge: 0.3;
  --glow: 0.18;
  --highlight-x: 72%;
  --highlight-y: 22%;
  --highlight-alpha: 0.62;
}

.ambient-bubble--3 {
  --x: 34%;
  --size: 18px;
  --duration: 28s;
  --delay: -11s;
  --drift: 8px;
  --peak: 0.36;
  --scale-start: 0.68;
  --scale-end: 1.05;
  --edge: 0.2;
  --glow: 0.1;
  --highlight-x: 38%;
  --highlight-y: 18%;
  --highlight-alpha: 0.48;
}

.ambient-bubble--4 {
  --x: 47%;
  --size: 30px;
  --duration: 40s;
  --delay: -17s;
  --drift: -10px;
  --peak: 0.44;
  --scale-start: 0.6;
  --scale-end: 1.15;
  --edge: 0.26;
  --glow: 0.15;
  --highlight-x: 66%;
  --highlight-y: 30%;
}

.ambient-bubble--5 {
  --x: 61%;
  --size: 44px;
  --duration: 52s;
  --delay: -23s;
  --drift: 16px;
  --peak: 0.52;
  --scale-start: 0.55;
  --scale-end: 1.22;
  --edge: 0.32;
  --glow: 0.2;
  --highlight-x: 34%;
  --highlight-y: 26%;
  --highlight-alpha: 0.65;
}

.ambient-bubble--6 {
  --x: 74%;
  --size: 20px;
  --duration: 30s;
  --delay: -8s;
  --drift: -7px;
  --peak: 0.38;
  --scale-start: 0.66;
  --scale-end: 1.1;
  --edge: 0.21;
  --glow: 0.11;
  --highlight-x: 58%;
  --highlight-y: 20%;
}

.ambient-bubble--7 {
  --x: 12%;
  --size: 26px;
  --duration: 44s;
  --delay: -14s;
  --drift: 10px;
  --peak: 0.42;
  --scale-start: 0.64;
  --scale-end: 1.14;
  --edge: 0.25;
  --glow: 0.14;
  --highlight-x: 24%;
  --highlight-y: 32%;
}

.ambient-bubble--8 {
  --x: 86%;
  --size: 16px;
  --duration: 29s;
  --delay: -20s;
  --drift: -11px;
  --peak: 0.35;
  --scale-start: 0.7;
  --scale-end: 1.06;
  --edge: 0.19;
  --glow: 0.09;
  --highlight-x: 70%;
  --highlight-y: 16%;
  --highlight-alpha: 0.45;
}

.ambient-bubble--9 {
  --x: 28%;
  --size: 32px;
  --duration: 46s;
  --delay: -26s;
  --drift: 13px;
  --peak: 0.46;
  --scale-start: 0.59;
  --scale-end: 1.18;
  --edge: 0.28;
  --glow: 0.16;
  --highlight-x: 48%;
  --highlight-y: 22%;
}

.ambient-bubble--10 {
  --x: 53%;
  --size: 36px;
  --duration: 50s;
  --delay: -12s;
  --drift: -9px;
  --peak: 0.48;
  --scale-start: 0.57;
  --scale-end: 1.2;
  --edge: 0.29;
  --glow: 0.17;
  --highlight-x: 76%;
  --highlight-y: 28%;
  --highlight-alpha: 0.6;
}

.ambient-bubble--11 {
  --x: 68%;
  --size: 24px;
  --duration: 35s;
  --delay: -31s;
  --drift: 7px;
  --peak: 0.41;
  --scale-start: 0.63;
  --scale-end: 1.11;
  --edge: 0.23;
  --glow: 0.13;
  --highlight-x: 32%;
  --highlight-y: 34%;
}

.ambient-bubble--12 {
  --x: 92%;
  --size: 28px;
  --duration: 42s;
  --delay: -19s;
  --drift: -13px;
  --peak: 0.43;
  --scale-start: 0.61;
  --scale-end: 1.16;
  --edge: 0.27;
  --glow: 0.15;
  --highlight-x: 62%;
  --highlight-y: 18%;
}

@keyframes ambient-bubble-rise {
  0% {
    transform: translate3d(0, 0, 0) scale(var(--scale-start));
    opacity: 0;
  }

  10% {
    opacity: calc(var(--peak) * 0.55);
  }

  22% {
    opacity: var(--peak);
  }

  72% {
    opacity: calc(var(--peak) * 0.82);
  }

  100% {
    transform: translate3d(var(--drift), calc(-122 * var(--vh-unit)), 0) scale(var(--scale-end));
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .ambient-bubble--1 { --peak: 0.46; }
  .ambient-bubble--2 { --peak: 0.56; }
  .ambient-bubble--3 { --peak: 0.42; }
  .ambient-bubble--4 { --peak: 0.5; }
  .ambient-bubble--5 { --peak: 0.58; }
  .ambient-bubble--6 { --peak: 0.44; }
  .ambient-bubble--7 { --peak: 0.48; }
  .ambient-bubble--8 { --peak: 0.4; }
  .ambient-bubble--9 { --peak: 0.52; }
  .ambient-bubble--10 { --peak: 0.54; }
  .ambient-bubble--11 { --peak: 0.47; }
  .ambient-bubble--12 { --peak: 0.49; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-bubble {
    animation: none;
    opacity: calc(var(--peak) * 0.65);
    bottom: auto;
    top: var(--rest-y, 72%);
    transform: scale(1);
  }

  .ambient-bubble--1 { --rest-y: 82%; }
  .ambient-bubble--2 { --rest-y: 68%; }
  .ambient-bubble--3 { --rest-y: 88%; }
  .ambient-bubble--4 { --rest-y: 62%; }
  .ambient-bubble--5 { --rest-y: 74%; }
  .ambient-bubble--6 { --rest-y: 86%; }
  .ambient-bubble--7 { --rest-y: 78%; }
  .ambient-bubble--8 { --rest-y: 90%; }
  .ambient-bubble--9 { --rest-y: 70%; }
  .ambient-bubble--10 { --rest-y: 64%; }
  .ambient-bubble--11 { --rest-y: 80%; }
  .ambient-bubble--12 { --rest-y: 72%; }
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

button,
.player-actions a {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--button);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

button:hover,
.player-actions a:hover {
  background: var(--button-hover);
  border-color: var(--line-strong);
}

.app-shell {
  position: relative;
  z-index: 2;
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 104px;
}

.hero {
  position: relative;
  display: grid;
  gap: 16px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 12%, rgba(139, 216, 255, 0.18), transparent 14rem),
    radial-gradient(circle at 28% 100%, rgba(155, 140, 255, 0.14), transparent 16rem),
    linear-gradient(180deg, rgba(12, 31, 54, 0.82), rgba(7, 17, 31, 0.72));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -8% -42% 18%;
  height: 120px;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(139, 216, 255, 0.15), transparent 68%);
  filter: blur(20px);
}

.hero-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.hero-line {
  margin: 0;
  color: var(--text);
  font-size: clamp(23px, 5.6vw, 34px);
  font-weight: 700;
  line-height: 1.24;
  text-shadow: 0 0 24px rgba(139, 216, 255, 0.18);
}

.hero-subline {
  margin: 0;
  color: var(--accent-strong);
  font-size: clamp(15px, 3.7vw, 19px);
  line-height: 1.45;
  text-shadow: 0 0 22px rgba(155, 140, 255, 0.24);
}

.hero-avatar {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  width: clamp(72px, 16vw, 104px);
  aspect-ratio: 1;
  border: 1px solid rgba(176, 229, 255, 0.42);
  border-radius: 50%;
  background: transparent;
  box-shadow:
    0 0 30px rgba(139, 216, 255, 0.2),
    0 0 48px rgba(155, 140, 255, 0.12);
}

.hero-avatar::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155, 140, 255, 0.22), transparent 70%);
  filter: blur(12px);
  pointer-events: none;
  z-index: -1;
}

.hero-avatar-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0;
  text-shadow: 0 0 18px rgba(139, 216, 255, 0.34);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.2;
}

h2 {
  font-size: 22px;
}

.subtitle,
.muted-text {
  margin: 0;
  color: var(--muted);
}

.search-box {
  position: relative;
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.hero-search {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 1;
  width: 18px;
  height: 18px;
  color: var(--dim);
  pointer-events: none;
  transform: translateY(-50%);
}

.search-box input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 46px 12px 42px;
  background: rgba(4, 13, 26, 0.74);
  color: var(--text);
  font-size: 16px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 216, 255, 0.12);
}

.clear-search {
  position: absolute;
  right: 8px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  color: var(--muted);
  transform: translateY(-50%);
}

.view-section {
  margin-top: 22px;
}

.hidden {
  display: none !important;
}

.section-head,
.list-toolbar,
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 14px;
  text-align: left;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(13, 32, 55, 0.8), rgba(6, 17, 32, 0.76));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: none;
}

.category-card:hover,
.category-card:active,
.category-card:focus,
.category-card:focus-visible {
  background:
    linear-gradient(180deg, rgba(13, 32, 55, 0.8), rgba(6, 17, 32, 0.76));
  border-color: var(--line);
  transform: none;
  outline: none;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

@media (hover: hover) and (pointer: fine) {
  .category-card:hover {
    background: linear-gradient(180deg, rgba(18, 42, 68, 0.88), rgba(10, 24, 42, 0.84));
    border-color: var(--line-strong);
  }
}

.category-card strong {
  font-size: 18px;
}

.category-card span {
  display: none;
}

.category-card small {
  justify-self: end;
  align-self: end;
  color: var(--accent-strong);
}

.sticky-toolbar {
  position: sticky;
  z-index: 12;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 14, 27, 0.88);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.sticky-toolbar .section-kicker,
.sticky-toolbar .muted-text {
  display: none;
}

.toolbar-title {
  min-width: 0;
  text-align: center;
}

.toolbar-title h2 {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
  color: var(--accent-strong);
}

.ghost-button {
  min-height: 38px;
  padding: 8px 12px;
}

.work-rows,
.queue-rows {
  display: grid;
  gap: 8px;
}

.work-rows {
  gap: 6px;
}

.queue-rows {
  gap: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.work-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 6px 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 21, 38, 0.66);
  backdrop-filter: blur(14px);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.queue-row {
  display: flex;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0 4px 0 10px;
  border: 0;
  border-bottom: 1px solid rgba(139, 216, 255, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  text-align: left;
  -webkit-touch-callout: none;
}

.queue-rows .queue-row:last-child {
  border-bottom: 0;
}

.queue-rows.is-reordering .queue-row:not(.is-drag-floating) {
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.queue-row.is-drag-floating {
  opacity: 1;
  border: 0;
  border-radius: 8px;
  background: rgba(42, 101, 151, 0.38);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
  transform: scale(1.01);
  transition: none;
  pointer-events: none;
  will-change: transform, top;
}

.queue-row-placeholder {
  min-height: 48px;
  margin: 0;
  border: 0;
  border-bottom: 1px dashed rgba(150, 217, 255, 0.22);
  border-radius: 0;
  background: rgba(139, 216, 255, 0.05);
  box-sizing: border-box;
  transition: height 160ms ease, margin 160ms ease;
}

body.queue-drag-active {
  touch-action: none;
  overscroll-behavior: none;
}

body.queue-drag-active .queue-drawer {
  overflow: hidden;
}

.queue-row .queue-actions {
  display: flex;
  flex-shrink: 0;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
  align-self: center;
  padding-right: 2px;
}

.queue-remove,
.drag-handle,
.queue-ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.queue-remove .ui-icon {
  width: 19px;
  height: 19px;
}

.drag-handle .ui-icon {
  width: 22px;
  height: 22px;
}

.queue-remove.queue-ghost-action {
  margin-left: 2px;
  margin-right: 0;
}

.drag-handle.queue-ghost-action {
  margin-left: 0;
}

.queue-remove,
.drag-handle {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.player-sheet .player-meta-download,
.player-meta-download {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.queue-remove:hover,
.drag-handle:hover,
.queue-ghost-action:hover {
  background: transparent;
  border-color: transparent;
  color: var(--accent-strong);
  opacity: 0.9;
  transform: none;
}

.drag-handle {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.work-row.is-current {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(42, 101, 151, 0.34), rgba(71, 62, 145, 0.22));
}

.queue-row.is-current {
  border: 0;
  border-bottom: 1px solid rgba(139, 216, 255, 0.1);
  background: rgba(62, 139, 205, 0.1);
  box-shadow: inset 3px 0 0 rgba(139, 216, 255, 0.48);
}

.row-index {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.row-main {
  min-width: 0;
}

.row-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-row .queue-title {
  display: block;
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-row.is-current .queue-title {
  color: var(--accent-strong);
  font-weight: 600;
}

.sort-hint {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.tag {
  color: var(--accent-strong);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.work-row .row-index {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

.work-row .row-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.work-row .row-actions {
  grid-column: 1 / -1;
  grid-row: 2;
  flex-wrap: nowrap;
  justify-content: stretch;
  gap: 5px;
  margin: 0;
}

.work-row .row-actions button,
.work-row .row-actions a {
  flex: 1 1 0;
  min-width: 0;
  min-height: 32px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(15, 38, 62, 0.7);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-size: 12px;
}

.work-row .row-actions .labeled-icon-button {
  justify-content: center;
  gap: 4px;
}

.work-row .row-actions .button-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-actions button,
.row-actions a {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(15, 38, 62, 0.7);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
}

.row-actions .labeled-icon-button .ui-icon {
  width: 14px;
  height: 14px;
}

.empty {
  padding: 28px 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.mini-player {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: min(760px, calc(100% - 24px));
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(6, 17, 31, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), 0 0 26px rgba(83, 162, 232, 0.12);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.mini-main {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  padding: 6px 8px;
  text-align: left;
  background: transparent;
  border-color: transparent;
}

.mini-title-marquee {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.mini-player .mini-title-marquee .marquee-text,
.mini-player .mini-title-text {
  display: inline-block;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
}

.mini-title-marquee:not(.is-marquee) .marquee-track {
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-title-marquee:not(.is-marquee) .mini-title-text {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.mini-title-marquee:not(.is-marquee) .marquee-text--clone {
  display: none;
}

.mini-title-marquee.is-marquee .marquee-track {
  display: inline-flex;
  width: max-content;
  max-width: none;
  will-change: transform;
  animation: title-marquee-mini 18s linear infinite;
}

.mini-title-marquee.is-marquee .marquee-text--clone {
  display: inline-block;
}

.mini-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mini-controls button {
  flex: 0 0 auto;
}

.mini-controls .primary-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
}

.mini-controls #miniPlay .ui-icon,
.mini-controls .primary-icon .ui-icon {
  width: 26px;
  height: 26px;
}

.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 50%;
  color: var(--accent-strong);
}

.primary-icon {
  width: 48px;
  height: 48px;
  min-height: 48px;
  min-width: 48px;
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(62, 139, 205, 0.64), rgba(96, 83, 188, 0.44));
}

.icon-button .ui-icon {
  width: 22px;
  height: 22px;
}

.primary-icon .ui-icon {
  width: 24px;
  height: 24px;
}

.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
}

.ui-icon .icon-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ui-icon--sm {
  width: 16px;
  height: 16px;
}

.ui-icon--toast {
  width: 20px;
  height: 20px;
}

.labeled-icon-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.labeled-icon-button .button-label {
  line-height: 1.2;
}

.icon-only-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--accent-strong);
}

.icon-only-button .ui-icon {
  width: 20px;
  height: 20px;
}

.icon-only-button[data-icon="close"] .ui-icon,
.clear-search .ui-icon {
  width: 16px;
  height: 16px;
}

.close-button.icon-only-button {
  justify-self: end;
  width: 36px;
  height: 36px;
  min-height: 36px;
  min-width: 36px;
}

.drawer-close.icon-only-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  min-width: 34px;
}

.clear-search.icon-only-button .ui-icon {
  width: 16px;
  height: 16px;
}

.overlay,
.drawer-overlay {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 5, 13, 0.7);
  backdrop-filter: blur(12px);
}

.player-sheet,
.video-sheet {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(560px, 100%);
  max-width: 100%;
  min-width: 0;
  max-height: calc(100vh - 36px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(87, 173, 255, 0.16), transparent 18rem),
    var(--panel-strong);
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.player-sheet > * {
  min-width: 0;
  max-width: 100%;
}

.close-button {
  justify-self: end;
  min-height: 36px;
  padding: 7px 12px;
}

.close-button.icon-only-button {
  padding: 0;
}

.player-art {
  position: relative;
  overflow: hidden;
  width: min(220px, 58vw);
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 45%, rgba(204, 239, 255, 0.24), transparent 15%),
    radial-gradient(circle at 50% 50%, rgba(139, 216, 255, 0.12), transparent 44%),
    radial-gradient(circle at 34% 72%, rgba(155, 140, 255, 0.24), transparent 36%),
    linear-gradient(135deg, rgba(13, 43, 72, 0.86), rgba(43, 38, 103, 0.54));
  box-shadow: 0 0 42px rgba(86, 171, 241, 0.18), inset 0 0 34px rgba(204, 239, 255, 0.08);
  animation: artBreath 6.5s ease-in-out infinite;
}

.player-art span {
  position: absolute;
  pointer-events: none;
}

.art-glow {
  inset: 19%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(204, 239, 255, 0.24), transparent 56%),
    radial-gradient(circle at 42% 60%, rgba(139, 216, 255, 0.16), transparent 62%);
  filter: blur(2px);
  animation: coreFloat 7.2s ease-in-out infinite;
}

.art-ring {
  inset: 9%;
  border: 1px solid rgba(204, 239, 255, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(139, 216, 255, 0.12);
}

.art-ring-two {
  inset: 20%;
  border-color: rgba(155, 140, 255, 0.2);
  animation: slowRotate 18s linear infinite;
}

.art-wave {
  inset: 24%;
  border: 1px solid rgba(139, 216, 255, 0.2);
  border-radius: 50%;
  opacity: 0.58;
  animation: wavePulse 5.8s ease-out infinite;
}

.art-wave-two {
  animation-delay: 2.8s;
  border-color: rgba(155, 140, 255, 0.18);
}

.art-particle {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(204, 239, 255, 0.86);
  box-shadow: 0 0 12px rgba(139, 216, 255, 0.78);
  animation: particleDrift 8s ease-in-out infinite;
}

.art-particle-one {
  left: 26%;
  top: 28%;
}

.art-particle-two {
  left: 66%;
  top: 34%;
  width: 4px;
  height: 4px;
  animation-delay: 1.5s;
}

.art-particle-three {
  left: 57%;
  top: 70%;
  width: 6px;
  height: 6px;
  animation-delay: 3s;
}

.art-particle-four {
  left: 34%;
  top: 64%;
  width: 3px;
  height: 3px;
  animation-delay: 4.6s;
}

.overlay.is-playing .player-art {
  animation-duration: 4.5s;
}

.overlay.is-playing .art-wave {
  animation-duration: 3.4s;
}

.overlay.is-playing .art-glow {
  animation-duration: 4.2s;
}

.overlay.is-playing .art-particle {
  animation-duration: 5.2s;
}

@keyframes artBreath {
  0%,
  100% {
    box-shadow: 0 0 36px rgba(86, 171, 241, 0.16), inset 0 0 28px rgba(204, 239, 255, 0.07);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 54px rgba(139, 216, 255, 0.28), inset 0 0 42px rgba(204, 239, 255, 0.12);
    transform: scale(1.018);
  }
}

@keyframes coreFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(0.98);
    opacity: 0.72;
  }
  50% {
    transform: translate3d(0, -5px, 0) scale(1.06);
    opacity: 0.95;
  }
}

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

@keyframes wavePulse {
  0% {
    transform: scale(0.72);
    opacity: 0;
  }
  38% {
    opacity: 0.58;
  }
  100% {
    transform: scale(1.48);
    opacity: 0;
  }
}

@keyframes particleDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 0.42;
  }
  45% {
    transform: translate3d(7px, -12px, 0);
    opacity: 0.95;
  }
  72% {
    transform: translate3d(-6px, 5px, 0);
    opacity: 0.68;
  }
}

.progress-area {
  display: grid;
  gap: 8px;
}

#progressBar {
  width: 100%;
  accent-color: var(--accent);
}

.time-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.player-actions button,
.player-actions a {
  min-height: 44px;
  padding: 10px 14px;
}

.player-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.player-meta-line {
  display: none;
  width: 100%;
  min-width: 0;
}

.player-meta-row {
  display: block;
  width: 100%;
  min-width: 0;
}

.player-meta-kicker {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-title-row {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.player-title-marquee {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.marquee-track {
  display: block;
  max-width: 100%;
  white-space: nowrap;
}

.marquee-text {
  display: inline-block;
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0;
  white-space: nowrap;
}

.player-title-marquee:not(.is-marquee) .marquee-track {
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-title-marquee:not(.is-marquee) .marquee-text {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.player-title-marquee:not(.is-marquee) .marquee-text--clone {
  display: none;
}

.player-title-marquee.is-marquee .marquee-track {
  display: inline-flex;
  width: max-content;
  max-width: none;
  will-change: transform;
  animation: title-marquee 18s linear infinite;
}

.player-title-marquee.is-marquee .marquee-text--clone {
  display: inline-block;
}

@keyframes title-marquee {
  0%,
  18% {
    transform: translate3d(0, 0, 0);
  }

  82%,
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.player-meta-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.sleep-timer-wrap {
  position: relative;
  flex-shrink: 0;
}

.player-meta-timer,
.sleep-timer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 34px;
  min-height: 34px;
  max-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-strong);
  box-shadow: none;
  white-space: nowrap;
  flex-direction: row;
  flex-wrap: nowrap;
}

.player-meta-timer:hover,
.sleep-timer-button:hover {
  background: rgba(139, 216, 255, 0.08);
  border-color: transparent;
  opacity: 0.92;
  transform: none;
}

.player-meta-timer.is-active,
.sleep-timer-button.is-active {
  color: var(--accent);
}

.player-meta-timer-label {
  font-size: 13px;
  line-height: 1;
}

.player-meta-timer .ui-icon--timer {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.player-meta-timer .sleep-timer-icon {
  width: 18px;
  height: 18px;
}

.sleep-timer-label {
  white-space: nowrap;
  line-height: 1;
  font-size: 13px;
  color: inherit;
}

.sleep-timer-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  min-width: 17px;
  min-height: 17px;
  max-width: 17px;
  max-height: 17px;
  flex: 0 0 17px;
  line-height: 0;
  overflow: hidden;
  color: inherit;
}

.sleep-timer-icon-wrap svg,
.sleep-timer-icon {
  display: block;
  width: 17px;
  height: 17px;
  min-width: 17px;
  min-height: 17px;
  max-width: 17px;
  max-height: 17px;
  flex: 0 0 17px;
  color: inherit;
}

.sleep-timer-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

body.sleep-timer-sheet-open {
  overflow: hidden;
}

.sleep-timer-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.sleep-timer-overlay.hidden {
  display: none;
}

.sleep-timer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(0, 5, 13, 0.58);
  cursor: pointer;
}

.sleep-timer-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  max-height: 72vh;
  overflow-x: hidden;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(87, 173, 255, 0.12), transparent 16rem),
    var(--panel-strong);
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.sleep-timer-sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(139, 216, 255, 0.28);
}

.sleep-timer-sheet-title {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}

.sleep-timer-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.sleep-timer-quick {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 72px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 43, 70, 0.72);
  color: var(--text);
}

.sleep-timer-quick-value {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}

.sleep-timer-quick-unit {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.sleep-timer-quick--custom .sleep-timer-quick-value {
  font-size: 15px;
}

.sleep-timer-clear {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(155, 140, 255, 0.28);
  border-radius: 12px;
  background: rgba(155, 140, 255, 0.08);
  color: var(--accent-strong);
  font-size: 14px;
}

.sleep-timer-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  max-width: 100%;
  overflow-x: hidden;
}

.sleep-timer-picker-col {
  min-width: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  overscroll-behavior-y: contain;
}

.sleep-timer-picker-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.sleep-timer-scroll {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 180px;
  overflow-x: hidden !important;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: rgba(8, 18, 33, 0.72);
  background-image:
    linear-gradient(to bottom, rgba(8, 18, 33, 0.96), rgba(8, 18, 33, 0)),
    linear-gradient(to top, rgba(8, 18, 33, 0.96), rgba(8, 18, 33, 0)),
    linear-gradient(rgba(108, 178, 255, 0.1), rgba(108, 178, 255, 0.1));
  background-size: 100% 72px, 100% 72px, calc(100% - 12px) 36px;
  background-position: top, bottom, center;
  background-repeat: no-repeat;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.sleep-timer-scroll::before,
.sleep-timer-scroll::after {
  content: "";
  position: sticky;
  left: 0;
  right: 0;
  z-index: 1;
  display: block;
  height: 72px;
  pointer-events: none;
}

.sleep-timer-scroll::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(8, 18, 33, 0.96), rgba(8, 18, 33, 0));
}

.sleep-timer-scroll::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(8, 18, 33, 0.96), rgba(8, 18, 33, 0));
}

.sleep-timer-scroll-list {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.sleep-timer-scroll-pad {
  height: 72px;
}

.sleep-timer-scroll-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 36px;
  color: var(--muted);
  font-size: 15px;
  opacity: 0.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  scroll-snap-align: center;
  transform-origin: center center;
  transition: color 0.16s ease, opacity 0.16s ease, transform 0.16s ease, text-shadow 0.16s ease;
}

.sleep-timer-scroll-item.is-selected {
  color: rgba(238, 249, 255, 1);
  font-size: 16px;
  font-weight: 800;
  opacity: 1;
  transform: scale(1.08);
  text-shadow: 0 0 12px rgba(132, 205, 255, 0.35);
  z-index: 1;
}

.sleep-timer-sheet-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sleep-timer-sheet-action {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 15px;
}

.sleep-timer-sheet-action--ghost {
  border: 1px solid var(--line);
  background: rgba(17, 43, 70, 0.72);
  color: var(--text);
}

.sleep-timer-sheet-action--primary {
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, rgba(62, 139, 205, 0.64), rgba(96, 83, 188, 0.44));
  color: var(--text);
}

.player-meta-actions .player-meta-download {
  flex-shrink: 0;
  align-self: center;
}

.player-meta-download,
.download-audio-button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  max-width: 34px;
  max-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-strong);
  box-shadow: none;
}

.player-sheet .player-meta-download:hover {
  background: transparent;
  border-color: transparent;
  opacity: 0.86;
  transform: none;
}

.player-meta-download .ui-icon,
.download-audio-button .ui-icon {
  width: 17px;
  height: 17px;
}

.player-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  max-width: 380px;
  margin: 2px auto 0;
  padding: 2px 0;
}

.player-ghost-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-strong);
  box-shadow: none;
}

.player-sheet .player-ghost-control:hover {
  background: transparent;
  border-color: transparent;
  opacity: 0.86;
  transform: none;
}

.player-ghost-control .ui-icon {
  width: 24px;
  height: 24px;
}

.player-main-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  min-width: 66px;
  min-height: 66px;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(62, 139, 205, 0.62), rgba(96, 83, 188, 0.42));
  color: var(--accent-strong);
  box-shadow: 0 0 28px rgba(139, 216, 255, 0.18);
}

.player-main-play .ui-icon {
  width: 30px;
  height: 30px;
}

.drawer-overlay {
  align-items: end;
  padding: 0;
  overflow-x: hidden;
}

#queueOverlay {
  overflow-x: hidden;
}

.queue-drawer {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(720px, 100%);
  max-width: 100%;
  min-width: 0;
  max-height: 72vh;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  background: rgba(7, 18, 32, 0.96);
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.38);
}

.queue-drawer-header {
  position: relative;
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
  padding-right: 36px;
}

.queue-list-scroll {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

body.queue-drag-active .queue-list-scroll {
  overflow: hidden;
}

.queue-drawer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

.queue-drawer-close:hover {
  color: var(--accent-strong);
  background: transparent;
  border-color: transparent;
}

.queue-drawer-close .ui-icon {
  width: 16px;
  height: 16px;
}

.queue-drawer-top {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 10px;
}

.queue-drawer-heading {
  min-width: 0;
}

.queue-drawer-heading h2 {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-drawer-header .sort-hint {
  margin: 0 0 10px;
}

.queue-drawer .drawer-actions--queue {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.queue-drawer .queue-toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  padding: 0 8px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.queue-drawer .queue-toolbar-button.labeled-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.queue-drawer .queue-toolbar-button .ui-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.queue-drawer .queue-toolbar-button .button-label,
.queue-drawer .queue-toolbar-button .reset-order-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.queue-drawer .queue-toolbar-button .reset-order-label--short {
  display: none;
}

.utility-drawer {
  position: relative;
  width: min(620px, 100%);
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  background: rgba(7, 18, 32, 0.97);
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.38);
}

.drawer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  min-width: 34px;
  padding: 0;
  border-radius: 50%;
  color: var(--accent-strong);
  line-height: 1;
}

.utility-drawer .drawer-head {
  padding-right: 42px;
}

.filename-tip {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 21, 38, 0.66);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.filename-tip span {
  color: var(--accent-strong);
  overflow-wrap: anywhere;
}

.utility-tip {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

#copyTextArea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(4, 13, 26, 0.78);
  color: var(--accent-strong);
  font: inherit;
  line-height: 1.5;
  outline: none;
}

#copyTextArea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 216, 255, 0.12);
}

#videoPlayer {
  width: 100%;
  max-height: 70vh;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #02050b;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 18, 32, 0.95);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast-text {
  line-height: 1.45;
}

.toast--success {
  border-color: rgba(139, 216, 255, 0.34);
  box-shadow: 0 0 22px rgba(139, 216, 255, 0.12);
}

.toast--warning {
  border-color: rgba(155, 140, 255, 0.32);
  box-shadow: 0 0 22px rgba(155, 140, 255, 0.1);
}

.toast-icon--success {
  color: var(--accent-strong);
}

.toast-icon--warning {
  color: var(--accent);
  opacity: 0.92;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 22px, 1040px);
    padding-top: 18px;
    padding-bottom: 112px;
  }

  .hero {
    gap: 12px;
    padding: 14px;
  }

  .hero-main {
    gap: 10px;
  }

  .hero-avatar {
    width: 64px;
  }

  .hero-line {
    font-size: 22px;
  }

  .hero-subline {
    font-size: 15px;
  }

  h1 {
    font-size: 27px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 76px;
    padding: 12px;
  }

  .category-card strong {
    padding-right: 92px;
  }

  .category-card small {
    position: absolute;
    right: 12px;
    bottom: 11px;
    font-size: 12px;
  }

  .work-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 5px 8px;
    padding: 9px;
  }

  .work-row .row-actions {
    gap: 4px;
  }

  .work-row .row-actions button,
  .work-row .row-actions a {
    min-height: 30px;
    padding: 4px 5px;
    font-size: 11px;
  }

  .mini-player {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px 8px;
    gap: 6px;
  }

  .mini-main {
    min-height: 42px;
    padding: 5px 6px;
  }

  .mini-controls {
    gap: 6px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .primary-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .mini-controls .primary-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .mini-controls #miniPlay .ui-icon,
  .mini-controls .primary-icon .ui-icon {
    width: 24px;
    height: 24px;
  }

  .drawer-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .drawer-actions {
    width: 100%;
  }

  .drawer-actions button {
    flex: 1 1 auto;
  }

  .queue-drawer-header {
    padding-right: 34px;
  }

  .queue-drawer-top {
    gap: 8px;
    margin-bottom: 8px;
  }

  .queue-drawer-header .sort-hint {
    margin-bottom: 8px;
    font-size: 12px;
  }

  .queue-drawer .drawer-actions--queue {
    gap: 4px;
  }

  .queue-drawer .drawer-actions--queue .queue-toolbar-button {
    flex: none;
    height: 42px;
    min-height: 42px;
    padding: 0 6px;
    font-size: 12px;
  }

  .queue-drawer .queue-toolbar-button .reset-order-label--long {
    display: none;
  }

  .queue-drawer .queue-toolbar-button .reset-order-label--short {
    display: inline;
  }

  .player-sheet,
  .video-sheet {
    padding: 18px;
  }

  .marquee-text {
    font-size: 19px;
  }

  .mini-player .mini-title-marquee .marquee-text,
  .mini-player .mini-title-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
  }

  .player-control-bar {
    max-width: 100%;
    gap: 2px;
  }

  .player-ghost-control {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .player-ghost-control .ui-icon {
    width: 22px;
    height: 22px;
  }

  .player-main-play {
    width: 62px;
    height: 62px;
    min-width: 62px;
    min-height: 62px;
  }

  .player-main-play .ui-icon {
    width: 28px;
    height: 28px;
  }

}

/* meta 区：分类/ID 与按钮分行，按钮横向排列 */
.player-meta-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
}

.sleep-timer-wrap {
  flex: 0 0 auto !important;
}

#sleepTimerButton.sleep-timer-button {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-strong) !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#sleepTimerButton.sleep-timer-button.is-active {
  color: var(--accent) !important;
}

#sleepTimerButton .sleep-timer-icon-wrap,
#sleepTimerButton svg.sleep-timer-icon {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  min-height: 17px !important;
  max-width: 17px !important;
  max-height: 17px !important;
  flex: 0 0 17px !important;
  display: inline-flex !important;
  line-height: 0 !important;
  overflow: hidden !important;
  color: inherit !important;
}

#sleepTimerButton .sleep-timer-icon-wrap svg {
  display: block !important;
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  min-height: 17px !important;
  max-width: 17px !important;
  max-height: 17px !important;
  flex: 0 0 17px !important;
  color: inherit !important;
}

#sleepTimerButton .sleep-timer-label {
  white-space: nowrap !important;
  line-height: 1 !important;
  font-size: 13px !important;
  flex: 0 0 auto !important;
  color: inherit !important;
}

#sleepTimerButton svg.sleep-timer-icon path {
  fill: currentColor !important;
}

#downloadCurrentAudio.download-audio-button,
#downloadCurrentAudio {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  max-width: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-strong) !important;
  flex: 0 0 34px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#downloadCurrentAudio svg,
#downloadCurrentAudio .icon,
#downloadCurrentAudio img,
#downloadCurrentAudio .ui-icon,
#downloadCurrentAudio .ui-icon .icon-svg {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  min-height: 17px !important;
  max-width: 17px !important;
  max-height: 17px !important;
  flex: 0 0 17px !important;
  display: block !important;
}
