.cmenu {
  position: fixed; z-index: 80; min-width: 236px; max-width: min(300px, calc(100vw - 16px));
  padding: 6px; border-radius: 16px; text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)), rgba(16, 14, 22, .97);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .65);
  animation: cm-in .16s cubic-bezier(.2, .9, .3, 1.1);
  transform-origin: top right;
}
.cmenu.leaving { animation: cm-out .13s ease forwards; pointer-events: none; }
@keyframes cm-in { from { opacity: 0; transform: scale(.94) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes cm-out { to { opacity: 0; transform: scale(.96); } }
.cm-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.cm-th { flex: none; width: 38px; height: 38px; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #2a1e3a, #120e1c); }
.cm-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-tx { min-width: 0; display: flex; flex-direction: column; }
.cm-tx b, .cm-tx i { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; }
.cm-tx b { font-size: .88rem; }
.cm-tx i { font-size: .74rem; color: var(--muted); }
.cm-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border-radius: 10px;
  font-size: .88rem; color: var(--text); text-align: left;
}
.cm-item:hover, .cm-item:focus-visible { background: rgba(255, 255, 255, .08); outline: none; }
.cm-item > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-item svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.cm-item svg .f, .cm-item.liked svg path { fill: currentColor; }
.cm-item.liked svg { color: var(--pink); }
.cm-item.sub > svg:last-child { width: 15px; height: 15px; }
.cm-item.has svg { color: #9be7b6; }
.cm-item em { font-style: normal; font-size: .74rem; color: var(--muted); }
.cm-back { font-weight: 600; border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; margin-bottom: 6px; }
.cm-sep { height: 1px; margin: 5px 8px; background: var(--line); }
.cm-new { display: flex; gap: 6px; padding: 2px 4px 8px; }
.cm-new input {
  flex: 1; min-width: 0; padding: 8px 12px; border-radius: 10px; font: inherit; font-size: .86rem; color: var(--text);
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
}
.cm-new input:focus { outline: none; border-color: rgba(234, 169, 240, .5); }
.cm-new button { flex: none; width: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--pink); color: #1a1020; }
.cm-new button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.cm-scroll { max-height: 240px; overflow-y: auto; scrollbar-width: thin; }
.cm-note { padding: 4px 10px 8px; font-size: .78rem; color: var(--muted); }
.snack {
  position: fixed; left: 50%; z-index: 85; pointer-events: none;
  bottom: calc(14px + 70px + 70px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px); opacity: 0;
  padding: 10px 18px; border-radius: 999px; font-size: .86rem; font-weight: 500; white-space: nowrap;
  max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
  color: #1a1020; background: #f3d4f6; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  transition: opacity .25s, transform .3s cubic-bezier(.2, .9, .3, 1.2);
}
.snack.show { opacity: 1; transform: translate(-50%, 0); }
.dock .likebtn svg, #ovLike svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; transition: fill .2s, color .2s; }
.dock .likebtn { flex: none; color: var(--muted); }
.dock .likebtn:hover { color: var(--text); }
.dock .likebtn.liked, #ovLike.liked { color: var(--pink); }
.dock .likebtn.liked svg, #ovLike.liked svg { fill: currentColor; }
.dock .likebtn:disabled { opacity: .35; cursor: default; }
.likebtn.pop svg, #ovLike.pop svg { animation: heartpop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes heartpop { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }

.dock .queuebtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.dock .queuebtn { position: relative; }
.dock .queuebtn.active { color: var(--pink); background: rgba(234, 169, 240, .12); }
.dock .queuebtn.has::after {
  content: attr(data-count); position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; font-size: .62rem; font-weight: 700; line-height: 16px; text-align: center;
  color: #1a1020; background: var(--pink);
}
.qp-wrap {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 22;
  bottom: calc(14px + 70px + 12px + env(safe-area-inset-bottom, 0px));
  width: min(1040px, calc(100% - 24px)); display: flex; justify-content: flex-end; pointer-events: none;
}
.qp {
  pointer-events: auto; width: min(400px, 100%); display: flex; flex-direction: column;
  max-height: min(520px, calc(100vh - 200px)); max-height: min(520px, calc(100dvh - 200px));
  border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .02)), rgba(12, 10, 18, .92);
  border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
  transform-origin: 90% 100%; animation: lp-in .24s cubic-bezier(.2, .8, .2, 1);
}
.qp[hidden] { display: none; }
.qp.leaving { pointer-events: none; animation: lp-out .2s cubic-bezier(.4, 0, 1, 1) forwards; }
.qp-head { padding: 15px 18px 10px; border-bottom: 1px solid var(--line); }
.qp-head h3 { display: flex; align-items: center; gap: 9px; font-size: 1.02rem; font-weight: 600; }
.qp-head svg { width: 18px; height: 18px; fill: none; stroke: var(--pink); stroke-width: 1.8; stroke-linecap: round; }
.qp-list { list-style: none; overflow-y: auto; padding: 6px 10px 14px; scrollbar-width: none; }
.qp-list::-webkit-scrollbar { display: none; }
.qhead { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 6px; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); list-style: none; }
.qclear { font-size: .72rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--pink); padding: 2px 8px; border-radius: 999px; }
.qclear:hover { background: rgba(234, 169, 240, .12); }
.qempty { padding: 18px 10px; color: var(--muted); font-size: .86rem; list-style: none; }
.qitem { display: flex; align-items: center; gap: 2px; border-radius: 12px; }
.qitem .qrow { flex: 1; min-width: 0; }
.qitem.dragging { opacity: .4; }
.qitem.dropover, .dragrow.dropover { box-shadow: inset 0 2px 0 var(--pink); }
.qgrip, .rowgrip { flex: none; width: 18px; display: grid; place-items: center; color: var(--muted); cursor: grab; opacity: .5; }
.qgrip svg, .rowgrip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.qitem:hover .qgrip, .dragrow:hover .rowgrip { opacity: 1; }
.qrm { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); opacity: 0; }
.qrm svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.qitem:hover .qrm, .qrm:focus-visible { opacity: 1; }
.qrm:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
@media (hover: none) { .qrm, .qgrip { opacity: .8; } }
.likedart, .collage, .newart, .emptyart { display: grid !important; }
.likedart { place-items: center; background: linear-gradient(135deg, #8a4fd8, #eaa9f0 60%, #f6d6c8) !important; }
.likedart svg { width: 42%; height: 42%; fill: #fff; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .3)); }
.collage { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.collage.one { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.collage img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .4s; }
.collage img.loaded { opacity: 1; }
.emptyart { place-items: center; }
.emptyart svg { width: 34%; height: 34%; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.newart { place-items: center; background: transparent !important; border: 2px dashed rgba(255, 255, 255, .16) !important; box-shadow: none !important; }
.newart svg { width: 30%; height: 30%; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; }
.newpl:hover .newart { border-color: rgba(234, 169, 240, .5) !important; }
.newpl:hover .newart svg { stroke: var(--pink); }
.libtip { margin-top: 18px; color: var(--muted); font-size: .84rem; }
.abtn.danger:hover { color: #ff9a9a; border-color: rgba(255, 120, 120, .35); background: rgba(255, 90, 90, .08); }
.dragrow { display: flex; align-items: center; }
.dragrow .atrbtn { flex: 1; min-width: 0; }
.dragrow.dragging { opacity: .4; }
.eq-head { flex-wrap: wrap; gap: 10px; }
.snd-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.snd-tab { position: relative; padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.snd-tab:hover { color: var(--text); }
.snd-tab.active { color: #fff; background: var(--active); box-shadow: inset 0 0 0 1px rgba(234, 169, 240, .35); }
.snd-dot { display: none; position: absolute; top: 4px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--pink); }
.snd-tab.lit .snd-dot { display: block; }
.snd-panel[hidden] { display: none; }
.eq-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.eq-onlbl { font-size: .78rem; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.fx-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 16px; }
.fx-preset {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 12px; border-radius: 12px; text-align: left;
  background: var(--panel2); border: 1px solid var(--line); transition: background .2s, border-color .2s;
}
.fx-preset b { font-size: .86rem; font-weight: 600; }
.fx-preset span { font-size: .7rem; color: var(--muted); }
.fx-preset:hover { background: rgba(255, 255, 255, .09); }
.fx-preset.active { background: linear-gradient(135deg, rgba(234, 169, 240, .18), rgba(59, 140, 240, .1)); border-color: rgba(234, 169, 240, .5); }
.fx-preset.active b { color: #fff; }
.fx-row { display: block; margin-bottom: 14px; }
.fx-row.dim { opacity: .45; }
.fx-top { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: .82rem; }
.fx-name { font-weight: 600; }
.fx-val { color: var(--pink); font-variant-numeric: tabular-nums; font-weight: 600; }
.eq input.fx-range { width: 100%; height: 5px; background: linear-gradient(to right, var(--pink) var(--fill, 0%), rgba(255, 255, 255, .16) var(--fill, 0%)); }
.eq input.fx-range::-webkit-slider-thumb { width: 16px; height: 16px; box-shadow: 0 0 0 4px rgba(234, 169, 240, .22); }
.eq input.fx-range::-moz-range-thumb { width: 16px; height: 16px; box-shadow: 0 0 0 4px rgba(234, 169, 240, .22); }
.fx-pitch { margin: 4px 0 0; padding: 12px 14px; }
.eq input.eq-slider {
  width: 5px; height: 118px; border-radius: 3px; accent-color: auto;
  background: linear-gradient(to top, var(--pink) var(--fill, 50%), rgba(255, 255, 255, .16) var(--fill, 50%));
}
.eq input.eq-slider::-webkit-slider-thumb { width: 15px; height: 15px; box-shadow: 0 0 0 3px rgba(234, 169, 240, .25); }
.eq input.eq-slider::-moz-range-thumb { width: 15px; height: 15px; box-shadow: 0 0 0 3px rgba(234, 169, 240, .25); }
.eq.off input.eq-slider { background: linear-gradient(to top, rgba(255, 255, 255, .35) var(--fill, 50%), rgba(255, 255, 255, .12) var(--fill, 50%)); }
@media (max-width: 560px) {
  .dock .likebtn { display: none; }
  .qp-wrap { width: calc(100% - 16px); bottom: calc(14px + 62px + 10px + env(safe-area-inset-bottom, 0px)); }
  .qp { width: 100%; }
  .snack { bottom: calc(14px + 62px + 66px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .qp-wrap { bottom: calc(14px + 54px + 8px + env(safe-area-inset-bottom, 0px)); }
}
body:has(.qp:not([hidden])) .sd:not(.open) { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .cmenu, .qp { animation: none; } .snack { transition: opacity .2s; } }

@media (max-width: 560px) { .eq input.eq-slider { height: 100px; } }
@media (max-height: 520px) and (orientation: landscape) { .eq input.eq-slider { height: 80px; } }
.dock .cv { position: relative; display: grid; place-items: center; background: #1d1a26; }
.dock .cv img { position: absolute; inset: 0; }
.cv-note { width: 44%; height: 44%; fill: none; stroke: rgba(243, 243, 247, .45); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.idlecv {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  opacity: 0; transition: opacity 1.2s ease;
}
.idlecv.show { opacity: 1; }
.dock:not(.idle) .idlecv { display: none; }
.dock.idle .tl,
.dock.idle .ctl,
.dock.idle .likebtn,
.dock.idle .queuebtn,
.dock.idle .eqbtn,
.dock.idle .lyrbtn,
.dock.idle .vol { display: none; }
.dock.idle .info { flex: 1; width: auto; }
.dock.idle .info span { display: block; transition: opacity .5s ease; }
.dock.idle .info span.idlefade { opacity: 0; }
.dock.idle .cv, .dock.idle .info { cursor: default; }

.dock-shuffle { display: none; }
.dock.idle .dock-shuffle {
  display: inline-flex; align-items: center; gap: 8px; flex: none; margin-right: 4px;
  padding: 9px 16px 9px 13px; border-radius: 999px; font-size: .86rem; font-weight: 600;
  color: var(--text); background: rgba(255, 255, 255, .07); border: 1px solid var(--line);
}
.dock.idle .dock-shuffle:hover { background: rgba(255, 255, 255, .12); }
.dock.idle .dock-shuffle:disabled { opacity: .4; cursor: default; }
.dock-shuffle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes dockin { from { opacity: 0; transform: translateY(10px) scale(.94); } to { opacity: 1; transform: none; } }
.dock.waking .ctl, .dock.waking .tl, .dock.waking .likebtn, .dock.waking .queuebtn,
.dock.waking .eqbtn, .dock.waking .lyrbtn, .dock.waking .vol {
  animation: dockin .5s cubic-bezier(.2, .8, .2, 1) backwards;
}
.dock.waking .likebtn  { animation-delay: .04s; }
.dock.waking .ctl      { animation-delay: .1s; }
.dock.waking .tl       { animation-delay: .18s; }
.dock.waking .queuebtn { animation-delay: .26s; }
.dock.waking .eqbtn    { animation-delay: .32s; }
.dock.waking .lyrbtn   { animation-delay: .38s; }
.dock.waking .vol      { animation-delay: .44s; }
.dock.waking .cv img#cover { animation: dockcv .6s ease backwards; }
@keyframes dockcv { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .dock.idle .dock-shuffle { padding: 9px 11px; }
  .dock.idle .dock-shuffle span { display: none; }
  .dock.idle .info span { font-size: .74rem; }
}
html.no-anim *, html.no-anim *::before, html.no-anim *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
#ovQueueBtn, #ovQueue { display: none !important; }
.dock .wave { overflow: hidden; }
.dock .wave i:nth-child(even) { display: none; }
@media (min-width: 1500px) { .dock .wave i:nth-child(even) { display: block; } }
@media (min-width: 821px) { .dock .info { width: 150px; } }
.dock .likebtn { margin-left: -8px; }
.dock .eqbtn, .dock .lyrbtn { margin-left: -10px; }
.dock .vol input[type=range] { width: 76px; }
.dock .tl { gap: 10px; }
.covertheme {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  opacity: 0; transition: opacity 1.6s ease;
}
.covertheme.show { opacity: 1; }
html.cover-themed body { transition: background-color 1.2s ease; }
html.cover-themed .ov { background: var(--ov-bg, #05050a); transition: background 1.2s ease; }
html.cover-themed .ov::before { background: radial-gradient(circle, var(--ov-glow, rgba(234, 169, 240, .16)), transparent 62%); }
.ov .ovpanel {
  background: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .025));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 12px 32px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
html.cover-themed .ov .ovpanel {
  background: linear-gradient(180deg, color-mix(in srgb, var(--pink) 9%, rgba(255, 255, 255, .06)), rgba(255, 255, 255, .02));
}
.ov::before { will-change: transform; }
body.ov-open .dock,
body.ov-open .sd,
body.ov-open .lp-wrap,
body.ov-open .eq-wrap,
body.ov-open .qp-wrap { visibility: hidden; }
