/* A small mirror ball suspended from the ceiling, drawn in the room's ink style. */
.room-disco-ball{position:absolute;z-index:7;left:60.8073%;top:0;width:80px;height:140px;transform:translateX(-50%) scale(var(--frame-scale,1));transform-origin:50% 0;border:0;padding:0;background:none;color:var(--room-ink);cursor:pointer}
.room-disco-ball svg{display:block;width:100%;height:100%;overflow:visible}
.disco-chain{fill:none;stroke:currentColor;stroke-width:1.5}.disco-cap{fill:var(--room-paper);stroke:currentColor;stroke-width:1.3}
.disco-sphere{fill:url(#mirror-ball-shine);stroke:currentColor;stroke-width:1.5}
.disco-mirrors{fill:none;stroke:#715e48;stroke-width:.8}.disco-glint{fill:#fff9eaaa;stroke:none}
.disco-label{position:absolute;top:100%;left:50%;transform:translateX(-50%);white-space:nowrap;background:var(--room-paper);color:var(--room-ink);border:1px solid currentColor;border-radius:4px;padding:5px 9px;font:14px Plex,system-ui,sans-serif;opacity:0;pointer-events:none}
.room-disco-ball:hover .disco-label,.room-disco-ball:focus-visible .disco-label{opacity:1}
.room-disco-ball:focus-visible{outline:1px dashed currentColor;outline-offset:2px;border-radius:30px}
.room-disco-ball:hover .disco-sphere{fill:url(#mirror-ball-party)}
.room-disco-show{position:absolute;inset:0;width:100%;height:100%;z-index:6;pointer-events:none;opacity:0;transition:opacity .7s ease;mix-blend-mode:multiply;overflow:hidden}
.room-disco-on .room-disco-show{opacity:.9}
.room-evening .room-disco-show{mix-blend-mode:screen}
.room-disco-on .disco-sphere{fill:url(#mirror-ball-party);filter:drop-shadow(0 0 8px #cba1e8)}
.room-disco-on .disco-mirrors{animation:mirror-turn 5s ease-in-out infinite alternate;transform-origin:40px 101px}
.disco-beams{filter:blur(9px);transform-origin:934px 97px;animation:disco-sweep 14s ease-in-out infinite alternate;animation-play-state:paused}
.disco-reflections{animation:disco-drift 11s ease-in-out infinite alternate;animation-play-state:paused;opacity:.72}
.room-disco-on .disco-beams,.room-disco-on .disco-reflections{animation-play-state:running}
.still-room .disco-beams,.still-room .disco-reflections,.still-room .disco-mirrors,.disco-paused .disco-beams,.disco-paused .disco-reflections,.disco-paused .disco-mirrors,body:has(.room-reader[open]) .disco-beams,body:has(.room-reader[open]) .disco-reflections,body:has(.room-reader[open]) .disco-mirrors{animation-play-state:paused}
@keyframes mirror-turn{from{transform:scaleX(.76)}to{transform:scaleX(1)}}
@keyframes disco-sweep{from{transform:rotate(-10deg)}to{transform:rotate(10deg)}}
@keyframes disco-drift{from{transform:translate(-20px,-10px) rotate(-2deg)}to{transform:translate(24px,15px) rotate(2deg)}}
@media(prefers-reduced-motion:reduce){.room-disco-show{transition:none}.disco-beams,.disco-reflections,.room-disco-on .disco-mirrors{animation:none}}
@media(max-width:540px){.room-disco-ball:before{content:'';position:absolute;left:-47px;right:-47px;top:-24px;bottom:-10px}}

/* Audio-clock variables keep the light movement locked to the groove. */
.room-disco-on .room-disco-show{opacity:var(--disco-level,.82);filter:hue-rotate(var(--disco-hue,0deg));transition:none}
.disco-beams{animation:none;transform:rotate(var(--disco-angle,0deg))}
.disco-reflections{animation:none;transform:translateX(var(--disco-drift,0px));opacity:var(--disco-sparkle,.65)}
