/* Short, non-blocking cues. The game remains fully usable without motion. */
.music-volume-control { display:inline-flex; align-items:center; gap:7px; min-height:44px; padding:4px 9px; color:var(--foreground); font-size:.8rem; font-weight:600; }
.music-volume-control input[type=range] { width:90px; min-height:32px; padding:0; accent-color:var(--primary); }
.music-volume-control output { min-width:3ch; font-variant-numeric:tabular-nums; }
@media (max-width:520px) { .music-volume-control { width:100%; justify-content:flex-end; } .music-volume-control input[type=range] { width:min(44vw,180px); } }
.match-complete:not([hidden]) .match-complete-card { animation: match-arrive 420ms cubic-bezier(.2,.8,.2,1) both; }
.match-wait:not([hidden]) #match-status::before { content:''; display:inline-block; width:.55em; height:.55em; margin-right:.5em; border-radius:50%; background:#4f8cff; animation: waiting-pulse 1.5s ease-in-out infinite; }
#connection[data-status="ready"] { animation: connection-arrive 500ms ease-out; }
#colorlink-game .effect-piece { animation: piece-arrive 320ms cubic-bezier(.2,.8,.2,1) both; }
#colorlink-game .effect-turn { animation: turn-arrive 650ms ease-out; }
#colorlink-game .effect-proof { animation: proof-arrive 750ms ease-out; }
#colorlink-game .effect-path { animation: path-arrive 550ms ease-out; }
/* A small wooden bridge drops from above onto each newly crossed cell. */
#colorlink-game #cl-board .bridge-cell { position:relative; }
#colorlink-game #cl-board .bridge-junction { position:absolute; pointer-events:none; inset:0; width:100%; height:100%; z-index:3; filter:drop-shadow(0 2px 2px #0008); }
#colorlink-game #cl-board .bridge-junction-outline, #colorlink-game #cl-board .bridge-junction-deck, #colorlink-game #cl-board .bridge-junction-planks { fill:none; stroke-linecap:round; stroke-linejoin:round; }
#colorlink-game #cl-board .bridge-junction-outline { stroke:#63330f; stroke-width:25; }
#colorlink-game #cl-board .bridge-junction-deck { stroke:#d6a15c; stroke-width:19; }
#colorlink-game #cl-board .bridge-junction-planks { stroke:#95602c; stroke-width:2; stroke-linecap:butt; }
#colorlink-game #cl-board .bridge-junction-hub { fill:#e3b46f; stroke:#955d28; stroke-width:1.5; }
#colorlink-game #cl-board .bridge-colors { position:absolute; pointer-events:none; z-index:6; top:12%; left:50%; transform:translateX(-50%); padding:0 2px; border-radius:2px; background:#ffffffdd; color:#142132; font-size:clamp(7px, 1.3vw, 11px); line-height:1.1; white-space:nowrap; }
.bridge-falling { position:fixed; z-index:1000; height:24px; pointer-events:none; transform:translate(-50%,-50%); animation:bridge-drop 650ms cubic-bezier(.18,.73,.28,1) both; filter:drop-shadow(0 3px 3px #0008); }
/* The falling bridge is drawn by bridge-renderer.js; the spans below are its fallback. */
.bridge-falling:has(svg) { height:auto; } .bridge-falling svg { display:block; width:100%; height:auto; overflow:visible; }
.bridge-planks { position:absolute; inset:4px 0; border:2px solid #63330f; border-radius:3px; background:repeating-linear-gradient(90deg,#c48645 0 7px,#915521 7px 9px); }
.bridge-rail { position:absolute; left:-3%; width:106%; height:4px; border:1px solid #583008; border-radius:3px; background:#e0ab68; }
.bridge-rail-top { top:3px; } .bridge-rail-bottom { bottom:3px; }
@keyframes bridge-drop { 0% { opacity:0; transform:translate(calc(-50% + var(--drop-x,0px)),calc(-50% + var(--drop-y,-38vh))) rotate(calc(var(--drop-angle, 0deg) - 14deg)) scale(1.15); } 18% { opacity:1; } 72% { opacity:1; transform:translate(-50%,-50%) rotate(calc(var(--drop-angle, 0deg) + 1deg)) scale(1); } 84% { transform:translate(-50%,calc(-50% - 6px)) rotate(calc(var(--drop-angle, 0deg) - 2deg)); } 100% { opacity:0; transform:translate(-50%,-50%) rotate(var(--drop-angle, 0deg)); } }
@keyframes match-arrive { from { opacity:0; transform:translateY(12px) scale(.96); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes waiting-pulse { 0%,100% { opacity:.45; transform:scale(.85); } 50% { opacity:1; transform:scale(1.15); } }
@keyframes connection-arrive { from { opacity:.5; } to { opacity:1; } }
@keyframes piece-arrive { 0% { transform:scale(.65); filter:brightness(1.3); } 70% { transform:scale(1.08); } 100% { transform:scale(1); filter:brightness(1); } }
@keyframes turn-arrive { 0% { box-shadow:0 0 0 0 #65a5ff99; } 100% { box-shadow:0 0 0 10px #65a5ff00; } }
@keyframes proof-arrive { 0% { box-shadow:0 0 0 0 #faad5499; } 100% { box-shadow:0 0 0 12px #faad5400; } }
@keyframes path-arrive { 0% { filter:brightness(1.35); } 100% { filter:brightness(1); } }
@media (prefers-reduced-motion: reduce) {
 .match-complete:not([hidden]) .match-complete-card, .match-wait:not([hidden]) #match-status::before, #connection[data-status="ready"], #colorlink-game .effect-piece, #colorlink-game .effect-turn, #colorlink-game .effect-proof, #colorlink-game .effect-path { animation:none !important; }
 .bridge-falling { display:none !important; }
}
