.media-layer { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.media-layer > * { position: absolute; }
.media-layer .show { pointer-events: auto; }
.m-audio { inset: 0; pointer-events: none !important; }
.m-audio > * { position: absolute; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.m-audio.show > * { opacity: 1; pointer-events: auto; }
.m-audio .m-spin { pointer-events: none !important; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 10%, rgba(255,255,255,.16) 14%, transparent 20% 60%, rgba(255,255,255,.12) 64%, transparent 70%); animation: spin 1.8s linear infinite; animation-play-state: paused; opacity: 0 !important; }
.m-audio.playing .m-spin { opacity: 1 !important; animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.m-disc {
  border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; padding: 0;
  color: #fff; background: rgba(var(--ink-rgb), .72); backdrop-filter: blur(3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25), 0 0 0 4px rgba(255,255,255,.18);
  transition: transform .25s cubic-bezier(.3,1.6,.5,1), background .2s;
}
.m-disc:hover { transform: scale(1.08); background: rgba(224, 82, 122, .9); }
.m-disc:active { transform: scale(.94); }
.m-audio.playing .m-disc { background: rgba(224, 82, 122, .92); }
.m-wave { cursor: pointer; border-radius: 6px; overflow: hidden; }
.m-wave i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(224, 82, 122, .55); mix-blend-mode: multiply; transition: width .25s linear; }
.m-wave:hover { background: rgba(var(--ink-rgb), .04); }

.m-hit { border: 0; background: transparent; cursor: pointer; border-radius: 10px; opacity: 0; transition: opacity .25s, box-shadow .25s; padding: 0; display: grid; place-items: center; }
.m-hit.show { opacity: 1; }
.m-hit:hover { box-shadow: 0 0 0 3px rgba(224, 82, 122, .45); }
.m-yt-play { width: 84px; height: 59px; background: url(/brand/youtube.svg) center / contain no-repeat; transform: scale(.85); opacity: 0; transition: transform .3s cubic-bezier(.3,1.6,.5,1), opacity .2s; filter: drop-shadow(0 8px 18px rgba(0,0,0,.35)); }
.m-yt-play svg { display: none; }
.m-yt:hover .m-yt-play { opacity: 1; transform: scale(1.05); }
.m-tw-open { position: absolute; right: 12px; bottom: -34px; font: 500 12.5px Inter, system-ui, sans-serif; color: #fff; background: #0f1419; padding: 6px 12px; border-radius: 999px; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .25s; white-space: nowrap; }
.m-tw:hover .m-tw-open { opacity: 1; transform: none; }

.m-frame { position: fixed; z-index: 8; border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 24px 60px rgba(0,0,0,.35); animation: frameIn .35s cubic-bezier(.2,.9,.25,1.1) both; }
.m-frame.tweet { background: var(--surface); }
.m-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.m-close { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.6); }
.m-frame.tweet .m-close { color: #0f1419; background: rgba(15,20,25,.08); }
@keyframes frameIn { from { opacity: 0; transform: scale(.96); } }

/* now playing, when the song's page has been turned */
.np {
  position: fixed; right: 18px; bottom: 18px; z-index: 9; display: flex; align-items: center; gap: 4px;
  padding: 5px 5px 5px 14px; border-radius: 999px; background: #1a1c1f; color: #fff;
  box-shadow: 0 12px 30px rgba(26,28,31,.25); font: 500 13px Inter, system-ui, sans-serif;
  transform: translateY(140%); transition: transform .45s cubic-bezier(.2,.9,.25,1.15);
}
.np.show { transform: none; }
.np button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.np-go { max-width: 220px; }
.np-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-toggle { width: 32px; height: 32px; border-radius: 50%; justify-content: center; background: rgba(255,255,255,.12) !important; }
.np-toggle svg { width: 16px; height: 16px; }
.np-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.np-bars b { width: 3px; background: #f29bb8; border-radius: 2px; animation: eq .9s ease-in-out infinite; }
.np-bars b:nth-child(2) { animation-delay: -.3s; } .np-bars b:nth-child(3) { animation-delay: -.6s; }
.np.paused .np-bars b { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

.m-frame.stream { background: transparent; box-shadow: 0 20px 50px rgba(0,0,0,.3); border-radius: 14px; }
.m-frame.stream.ytmusic { background: #000; }
.m-audio.stream .m-disc { background: rgba(255,255,255,.92); color: #1a1c1f; }
.m-audio.stream .m-disc:hover { background: var(--surface); transform: scale(1.1); }
