/* VALENS — sound pill in the header: a vinyl with the current cover (main.js fills [data-player-cover])
   that spins while the music plays, and five fire bars driven by the real audio levels (vizLoop sets
   each bar's transform). Paused, the bars breathe in a slow wave on the `scale` property, which stacks
   on top of the inline transform; while the browser still blocks sound, the vinyl glows to invite a play. */
.sound-btn{width:auto;height:2.6rem;padding:0 .85rem 0 .3rem;gap:.6rem;justify-content:flex-start;border-radius:100px;opacity:1;transition:border-color .3s ease,background-color .3s ease,box-shadow .4s ease}
.sound-btn:not(.is-playing){opacity:1}

/* vinyl */
.sb-disc{position:relative;flex:none;width:2rem;height:2rem;border-radius:50%;overflow:hidden;
  background:repeating-radial-gradient(circle at 50% 50%,#1b1a17 0 1.5px,#0d0d0c 1.5px 3px);
  box-shadow:0 0 0 1px #ffffff1f,0 4px 14px #0000008c}
.sb-disc img{position:absolute;inset:16%;width:68%;height:68%;border-radius:50%;object-fit:cover;opacity:.95}
.sb-disc img[src=""]{opacity:0}
.sb-disc::before{content:"";position:absolute;inset:0;border-radius:50%;z-index:1;pointer-events:none;
  background:conic-gradient(from 210deg,#ffffff00 0deg,#ffffff38 40deg,#ffffff00 90deg,#ffffff00 200deg,#ffffff24 240deg,#ffffff00 290deg)}
.sb-disc::after{content:"";position:absolute;left:50%;top:50%;width:.32rem;height:.32rem;margin:-.16rem 0 0 -.16rem;border-radius:50%;z-index:2;background:#0a0a09;box-shadow:0 0 0 1.5px #ffffff40}
.sb-ico{position:absolute;inset:0;z-index:3;display:grid;place-items:center;border-radius:50%;background:#0a0a09c7;color:#fff;font-size:.85rem;opacity:0;transition:opacity .25s ease}
.sb-ico .icon{grid-area:1/1}
.sound-btn.is-playing .sb-disc img{animation:sbspin 5s linear infinite}
@keyframes sbspin{to{rotate:360deg}}

/* bars */
.sound-btn .eq{margin:0;height:1rem;gap:3px;align-items:center}
.sound-btn .eq i{width:3px;border-radius:3px;transform-origin:center;background:linear-gradient(180deg,var(--ember),var(--fire) 55%,var(--blood))}
.sound-btn:not(.is-playing) .eq i{animation:sbwave 1.6s ease-in-out infinite}
.sound-btn .eq i:nth-child(2){animation-delay:-.32s}.sound-btn .eq i:nth-child(3){animation-delay:-.64s}
.sound-btn .eq i:nth-child(4){animation-delay:-.96s}.sound-btn .eq i:nth-child(5){animation-delay:-1.28s}
@keyframes sbwave{0%,100%{scale:1 1}50%{scale:1 2.4}}
.sound-btn.is-playing{border-color:#ff5a1f73;background:color-mix(in srgb,var(--fire) 10%,transparent);box-shadow:0 0 22px #ff5a1f33}
.sound-btn.is-playing .eq i{filter:drop-shadow(0 0 4px #ff5a1f99)}

/* the browser still blocks sound: the vinyl glows, the old ring pulse goes */
.sound-locked .sound-btn{border-color:#ff5a1f80}
.sound-locked .sound-btn::after{display:none}
.sound-locked .sb-disc{animation:sbcall 1.8s ease-in-out infinite}
@keyframes sbcall{0%,100%{box-shadow:0 0 0 1px #ffffff1f,0 0 0 0 #ff5a1f00}50%{box-shadow:0 0 0 1px #ff5a1f99,0 0 16px 3px #ff5a1f80}}

@media(hover:hover) and (pointer:fine){
  .sound-btn:hover{border-color:#ff5a1f99}
  .sound-btn:hover .sb-ico{opacity:1}
}
.sound-btn:focus-visible .sb-ico{opacity:1}
@media(max-width:640px){.sound-btn{padding:0 .7rem 0 .28rem;gap:.5rem}.sb-disc{width:1.9rem;height:1.9rem}}
@media(prefers-reduced-motion:reduce){
  .sound-btn .eq i,.sound-btn.is-playing .sb-disc img,.sound-locked .sb-disc{animation:none}
}
