:root {
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --spring: cubic-bezier(.3, 1.6, .5, 1);
}

html { scroll-behavior: smooth; }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
@keyframes viewIn   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cardIn   { from { opacity: 0; transform: translateY(26px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes dockIn   { from { opacity: 0; transform: translate(-50%, 140%); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastIn  { from { opacity: 0; transform: translate(-50%, 30px) scale(.94); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes toastOut { to   { opacity: 0; transform: translate(-50%, 20px) scale(.96); } }
@keyframes noteIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes noteOut { to   { opacity: 0; } }
@keyframes ovIn     { from { opacity: 0; transform: translateY(44px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ovOut    { to   { opacity: 0; transform: translateY(36px) scale(.98); } }
@keyframes drawerIn  { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes drawerOut { to   { opacity: 0; transform: translateX(60px); } }
@keyframes coverIn  { from { opacity: 0; transform: scale(.82) rotate(-3deg); } to { opacity: 1; transform: none; } }
@keyframes swap     { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes imgIn    { from { opacity: 0; transform: scale(1.18); } to { opacity: 1; transform: none; } }
@keyframes pop      { 0% { transform: scale(.55); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes ring {
  0%   { opacity: .7; transform: scale(1); }
  100% { opacity: 0;  transform: scale(1.55); }
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(14vw, 8vh) scale(1.25); }
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.logo, .mark { animation: fadeDown .9s var(--ease-out) backwards; }
.bar { animation: fadeUp .9s var(--ease-out) .12s backwards; }
main:not([hidden]) { animation: viewIn .55s var(--ease-out) backwards; }
footer { animation: fadeIn 1.2s ease .5s backwards; }
.pillbar {
  position: relative;
  transition: border-color .35s, box-shadow .35s;
}
.pillbar:focus-within {
  border-color: rgba(234, 169, 240, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 0 0 4px rgba(234, 169, 240, .08), 0 12px 36px rgba(0, 0, 0, .5);
}
.pill { position: relative; z-index: 1; }
.pillbar:has(.glider.ready) .pill.active { background: transparent; }
.pill:not(.active):hover { color: var(--text); }
.pill.active { color: #fff; }
.glider {
  position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 0;
  border-radius: 999px; pointer-events: none; opacity: 0;
  background: linear-gradient(135deg, rgba(234, 169, 240, .24), rgba(110, 150, 255, .17));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .12), 0 4px 18px rgba(234, 169, 240, .16);
  transition: transform .55s var(--ease-io), width .55s var(--ease-io), height .55s var(--ease-io), opacity .3s;
}
.glider.ready { opacity: 1; }
button { transition: transform .22s var(--ease-out), background-color .25s, color .25s, opacity .25s, box-shadow .3s; }
button:active { transform: scale(.94); }
.ic:hover, .toggle:hover { transform: scale(1.1); }
.ic:active, .toggle:active { transform: scale(.88); }
.toggle:hover { color: var(--text); }
.ovbtn:hover { transform: scale(1.08); }
.ovbtn svg { transition: transform .3s var(--ease-out); }
#ovClose:hover svg { transform: translateY(3px); }
.mbtn:hover { transform: scale(1.1); }
.toast .btns button:hover { transform: translateY(-1px); }
.status button:hover { transform: translateY(-2px); }
.play:hover { transform: scale(1.08); }
.play:active { transform: scale(.92); }
.pop { animation: pop .38s var(--spring); }
.grid > li.enter { animation: cardIn .65s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 38ms); }

.card .art,
.card:hover .art {
  transform: perspective(700px) translateY(var(--lift, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .45s var(--ease-out), box-shadow .45s;
}
.card:hover .art { will-change: transform; --lift: -7px; box-shadow: 0 18px 42px rgba(234, 169, 240, .24); }
.card:active .art { --lift: -2px; }
.card.active:hover .art { box-shadow: 0 0 0 2px var(--pink), 0 18px 42px rgba(234, 169, 240, .32); }
.card:active { transform: scale(.97); }
.card .t { transition: color .3s; }
.card .art img, .qthumb img, .mini .art img {
  opacity: 0;
  transition: opacity .6s ease, transform .8s var(--ease-out);
}
.art img.loaded, .qthumb img.loaded { opacity: 1; }
.card:hover .art img { transform: scale(1.08); }
.grid.list .card { transition: background-color .3s, transform .25s var(--ease-out); }
.grid.list .card:hover { transform: translateX(4px); }
.grid.list .card:hover .art { --lift: 0px; }
.skel .art, .skel .line {
  background: linear-gradient(100deg, rgba(255,255,255,.04) 30%, rgba(255,255,255,.13) 50%, rgba(255,255,255,.04) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
.skel .art, .skel .line { display: block; }
.skel .art { aspect-ratio: 1; border-radius: 18px; border: 1px solid var(--line); }
.skel .line { height: 12px; border-radius: 6px; margin: 12px auto 0; width: 70%; }
.skel .line.l2 { height: 9px; width: 45%; margin-top: 8px; }
.grid.list .skel { height: 64px; margin-bottom: 8px; border-radius: 14px; border: 0;
  background: linear-gradient(100deg, rgba(255,255,255,.03) 30%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.03) 70%);
  background-size: 200% 100%; animation: shimmer 1.5s linear infinite; }
.grid.list .skel > * { display: none; }
.status { animation: fadeIn .5s ease; }
.dock { animation: dockIn .9s var(--ease-out) .35s backwards; transition: border-color .4s, box-shadow .4s; }
.dock:hover { border-color: rgba(255, 255, 255, .17); box-shadow: 0 14px 50px rgba(0, 0, 0, .65), 0 0 40px rgba(234, 169, 240, .08); }
.dock .cv { animation: spin 18s linear infinite paused; transition: box-shadow .4s; }
.dock .cv:hover { box-shadow: 0 0 0 2px var(--pink); }
.is-playing .dock .cv { animation-play-state: running; }
.dock .play { position: relative; }
.dock .play::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(234, 169, 240, .6); opacity: 0;
}
.is-playing .dock .play::after { animation: ring 2.6s ease-out infinite; }
.swap { animation: swap .5s var(--ease-out); }
.swapimg { animation: imgIn .7s var(--ease-out); }
.wave i { transition: height .7s var(--ease-out), background-color .3s, transform .25s var(--ease-out); }
.wave:hover i { transform: scaleY(1.14); }
input[type=range]::-webkit-slider-thumb { transition: transform .2s var(--ease-out); }
input[type=range]::-moz-range-thumb { transition: transform .2s var(--ease-out); }
input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.35); }
input[type=range]:hover::-moz-range-thumb { transform: scale(1.35); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.1); }
.toast { animation: toastIn .5s var(--ease-out); }
.toast.leaving { animation: toastOut .3s ease forwards; }
.toast .ti { animation: pop .6s var(--spring) .15s backwards; }
.note { animation: noteIn .5s ease; }
.note.leaving { animation: noteOut .35s ease forwards; }
.note:not(.leaving) .ncard { animation: cardIn .6s var(--ease-out); }
.note.leaving .ncard { animation: ovOut .3s ease forwards; }
.note:not(.leaving) .ni { animation: pop .7s var(--spring) .2s backwards; }
.note .x, .note .go { transition: transform .22s var(--ease-out), background-color .25s; }
.note .go:hover { transform: scale(1.06); }
.note .x:hover { transform: scale(1.08); }
.ov { animation: ovIn .55s var(--ease-out); }
.ov.leaving { animation: ovOut .32s ease forwards; }
.ov::before {
  content: ''; position: fixed; z-index: 0; pointer-events: none;
  width: 70vmax; height: 70vmax; left: -15vmax; top: -5vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(234, 169, 240, .16), transparent 62%);
  animation: drift 20s ease-in-out infinite alternate paused;
}
.is-playing .ov::before { animation-play-state: running; }
.ov:not([hidden]):not(.leaving) .ovcover  { animation: coverIn .9s var(--ease-out) .08s backwards; }
.ov:not([hidden]):not(.leaving) .ovfrom   { animation: fadeUp .7s var(--ease-out) .22s backwards; }
.ov:not([hidden]):not(.leaving) .ovpanel  { animation: fadeUp .8s var(--ease-out) .34s backwards; }
.ov:not([hidden]):not(.leaving) .ovlyrics { animation: fadeIn 1s ease .45s backwards; }
.ov:not([hidden]):not(.leaving) .ovtr     { animation: fadeDown .7s var(--ease-out) .2s backwards; }
.ov:not([hidden]):not(.leaving) #ovClose  { animation: fadeDown .7s var(--ease-out) .2s backwards; }
.ovcover { position: relative; }

.lyr.fresh { animation: fadeIn .8s ease; }
.ll {
  transition: opacity .5s ease, filter .5s ease, transform .5s var(--ease-out), text-shadow .5s;
  transform-origin: center;
}
.ll.on { transform: scale(1.035); }

.ovqueue { animation: drawerIn .45s var(--ease-out); }
.ovqueue.leaving { animation: drawerOut .3s ease forwards; }
.ovqueue li.enter { animation: fadeUp .5s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 32ms + 120ms); }
.qrow { transition: background-color .25s, transform .3s var(--ease-out); }
.qrow:hover { transform: translateX(5px); }
.ovpill:hover { transform: translateY(-1px); }
.minput { transition: border-color .3s, box-shadow .3s, transform .35s var(--ease-out); }
.minput:focus { transform: scale(1.015); }
.mini { transition: transform .35s var(--ease-out), border-color .3s, background-color .3s; }
.mini:hover { transform: translateY(-2px); border-color: rgba(234, 169, 240, .3); }
.mini.enter, .mhead.enter, .mnone.enter { animation: fadeUp .55s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.mfill { transition: width .3s linear; }
.lite .ov::before,
.lite .dock .play::after,
.lite .skel .art, .lite .skel .line { animation: none; }
.lite .card .art, .lite .card:hover .art { transform: translateY(var(--lift, 0px)); }
.lite .wave i { transition: background-color .3s; }
.lite .wave:hover i { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
