/* M4RVL background music — site-wide player pill + faint living background.
   Theme-matched: IBM Plex Mono, ink/gold on near-black, sharp corners. */
#bgm { position: fixed; right: 18px; bottom: 16px; z-index: 90; display: inline-flex; align-items: center; gap: 11px;
  background: rgba(0,0,0,.62); border: 1px solid rgba(217,212,200,.28); padding: 8px 14px 8px 9px;
  font-family: "IBM Plex Mono", ui-monospace, monospace; color: #d9d4c8;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); max-width: calc(100vw - 36px); }
body.cart-open #bgm { display: none; }
#bgm .bgm-btn { flex: none; width: 34px; height: 34px; border: 1px solid #d9a94a; background: rgba(217,169,74,.10);
  color: #d9a94a; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
#bgm .bgm-btn:hover { background: rgba(217,169,74,.22); }
#bgm .bgm-btn svg { width: 13px; height: 13px; fill: #d9a94a; display: block; }
#bgm .bgm-btn .ic-pause { display: none; }
#bgm.playing .bgm-btn .ic-pause { display: block; }
#bgm.playing .bgm-btn .ic-play { display: none; }
#bgm .bgm-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#bgm .bgm-title { font-size: 11px; letter-spacing: .08em; color: #d9d4c8; white-space: nowrap; }
#bgm .bgm-sub { font-size: 8.5px; letter-spacing: .22em; text-transform: uppercase; color: #9a958a; white-space: nowrap; }
#bgm .bgm-bars { display: none; align-items: flex-end; gap: 2.5px; height: 14px; flex: none; margin-left: 2px; }
#bgm.playing .bgm-bars { display: inline-flex; }
#bgm .bgm-bars i { width: 3px; background: #d9a94a; height: 30%; }
#bgm.playing .bgm-bars i { animation: bgm-eq 0.9s ease-in-out infinite; }
#bgm .bgm-bars i:nth-child(2) { animation-delay: .22s; }
#bgm .bgm-bars i:nth-child(3) { animation-delay: .45s; }
#bgm .bgm-bars i:nth-child(4) { animation-delay: .12s; }
@keyframes bgm-eq { 0%,100% { height: 22%; } 50% { height: 96%; } }
#bgm.attn { border-color: #d9a94a; box-shadow: 0 0 22px rgba(217,169,74,.22); }
@media (max-width: 480px) {
  #bgm { right: 12px; bottom: 12px; padding: 7px 11px 7px 8px; gap: 9px; }
  #bgm .bgm-sub { display: none; }
}
canvas.bgm-cloud { position: fixed; inset: 0; pointer-events: none; }
/* the hidden YouTube engine: rendered and playing, parked off-screen */
#bgmYt { position: fixed; left: -320px; bottom: 0; width: 200px; height: 113px; border: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  #bgm.playing .bgm-bars i { animation: none; height: 55%; }
}
