/* Background music (js/music.js): the player's place, bottom left. The switch is the ♪ seal of the frame controls
   (js/map/frame-controls.js) since 2026-12-05 (it was a paper note here, spike/music.html). Above the paper layer and the soft focus like the other buttons, under the lightbox.
   Hidden until the map starts drawing (cue). Off = only the switch; on = the music fades in. A visible YouTube player
   (ytHidden: false) opens in a taped note above the switch; hidden (the user's pick) = the player keeps its full size
   and plays, fully transparent, clicks passing through. */
.music { position: fixed; z-index: 800; left: 22px; bottom: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  opacity: 0; translate: 0 10px; pointer-events: none; transition: opacity .8s ease, translate .8s cubic-bezier(.2,.7,.2,1); }
.music[hidden] { display: none; }
.music.shown { opacity: 1; translate: 0 0; pointer-events: auto; }
.music .mcard { position: relative; box-sizing: border-box; transform-origin: 0 100%; background: #f6f3ea; padding: 10px 10px 8px; rotate: -1.2deg; color: var(--ink);
  box-shadow: 0 1px 2px rgb(40 34 26 / .25), 0 10px 26px rgb(40 34 26 / .22);
  transition: opacity .55s ease, translate .55s cubic-bezier(.2,.7,.2,1), scale .55s cubic-bezier(.2,.7,.2,1), visibility 0s linear .55s; }
.music:not(.open) .mcard { opacity: 0; visibility: hidden; translate: 0 14px; scale: .94; pointer-events: none; }
.music.open .mcard { transition-delay: 0s; }
.music.ghost .mcard { position: absolute; left: 0; bottom: 0; opacity: 0 !important; visibility: visible !important; pointer-events: none !important; }
.music .mcard::before { content: ''; position: absolute; left: 50%; top: -10px; width: 86px; height: 20px; margin-left: -43px; rotate: 3deg; background: rgb(214 226 150 / .75);
  clip-path: polygon(0 12%, 4% 0, 96% 6%, 100% 20%, 97% 50%, 100% 85%, 94% 100%, 5% 94%, 0 70%, 3% 45%); mix-blend-mode: multiply; }
/* YouTube: at least 200 px tall while it plays (16:9 → 356 × 200) */
.music .pwrap { width: 356px; aspect-ratio: 16 / 9; min-height: 200px; background: #1b1a18; overflow: hidden; }
.music .pwrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.music .cap { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 5px; }
.music .cap b { font: 400 23px/1 "Reenie Beanie", cursive; }
.music .cap a { color: inherit; opacity: .65; font: 11px system-ui, sans-serif; text-decoration: none; white-space: nowrap; }
.music .cap a:hover { opacity: 1; text-decoration: underline; }

@media (max-width: 600px) {
  .music { left: 12px; bottom: 14px; }
  .music .pwrap { width: min(356px, calc(100vw - 44px)); }
}
