/* Componentes musicales: partitura, teclado y cascada de notas. */
@font-face { font-family: 'Bravura'; src: url('/fonts/Bravura.woff2') format('woff2'); font-display: block; }

/* ---------- Partitura ---------- */
.score { color: var(--ink); max-width: 100%; overflow: hidden; }
.score-svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.score .mg { font-family: 'Bravura'; fill: currentColor; }
.score .mg.mid { text-anchor: middle; }
.score .ink, .score .stem, .score .ledger { stroke: currentColor; }
.score .staff-line { stroke: var(--staff-line, #6b7087); }
.score .beam, .score .tie, .score .slur { fill: currentColor; }
.score .bracket { fill: none; stroke: currentColor; stroke-width: calc(var(--S) * 0.13); }
.score .bracket.dashed { stroke-dasharray: calc(var(--S) * 0.6) calc(var(--S) * 0.45); }
.score .finger { font: 600 calc(var(--S) * 1.25) var(--font-body); text-anchor: middle; fill: currentColor; }
.score .note-name { font: 600 calc(var(--S) * 1.2) var(--font-body); text-anchor: middle; fill: var(--ink-2); }
.score .score-text { font: italic 500 calc(var(--S) * 1.45) var(--font-display); fill: currentColor; }
.score .score-tempo { font: 700 calc(var(--S) * 1.5) var(--font-display); fill: currentColor; }
.score .volta-label { font: 600 calc(var(--S) * 1.3) var(--font-body); fill: currentColor; }
.score .ev { transition: color .15s; }
.score.by-hand .ev.rh { color: var(--rh); }
.score.by-hand .ev.lh { color: var(--lh); }
.score.by-hand .beam.rh { fill: var(--rh); }
.score.by-hand .beam.lh { fill: var(--lh); }
.score .ev.hidden { visibility: hidden; }
.score .ev.cur { color: var(--felt); }
.score .ev.ok { color: var(--ok); }
.score .ev.bad { color: var(--felt); animation: shake .3s; }
.score .ev.dim { opacity: .28; }
.score .ev.pulse { animation: notePulse .5s ease-out; transform-box: fill-box; transform-origin: center; }
.score-cursor { fill: var(--cursor, rgba(36, 99, 209, .13)); transition: x .12s ease-out; }
@keyframes notePulse { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.mg-inline { font-family: 'Bravura'; font-size: 1.5em; line-height: 0; display: inline-block; vertical-align: 0; padding: 0 .12em; font-style: normal; font-weight: normal; }

/* ---------- Teclado ---------- */
.kbd { width: 100%; margin-inline: auto; user-select: none; -webkit-user-select: none; }
.kbd-svg { display: block; width: 100%; height: auto; touch-action: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .28)); }
.kbd.static .kbd-svg { touch-action: auto; }
.kbd-felt { fill: var(--felt); }
.key { cursor: pointer; }
.kbd.static .key { cursor: default; }
.key rect { transition: fill .08s; }
.key.white rect { fill: #fbfaf6; stroke: #b9bcc9; stroke-width: .6; }
.key.black rect { fill: #1a1b26; stroke: #000; stroke-width: .6; }
.key.white.down rect { fill: #d9dceb; }
.key.black.down rect { fill: #4a4d66; }
.key.white.hint rect { fill: #ffe9a8; }
.key.black.hint rect { fill: #c59a1f; }
.key.white.rh rect { fill: #a9c6f7; }
.key.black.rh rect { fill: var(--rh); }
.key.white.lh rect { fill: #f8c9a2; }
.key.black.lh rect { fill: var(--lh); }
.key.white.sel rect { fill: #cdd3f5; }
.key.black.sel rect { fill: #5b61a8; }
.key.white.ok rect { fill: #9fe0c1; }
.key.black.ok rect { fill: var(--ok); }
.key.white.bad rect { fill: #f3a9b8; }
.key.black.bad rect { fill: var(--felt); }
.key.white.dimmed rect { fill: #dcdde3; }
.key-name { font: 600 6.4px var(--font-body); text-anchor: middle; fill: #6a6e85; pointer-events: none; }
.key-name.middle { fill: var(--felt); }
.key-middle-dot { fill: var(--felt); pointer-events: none; }
.kbd-labels { pointer-events: none; }
.pc-hint { font: 600 5.6px var(--font-body); text-anchor: middle; fill: #9a9db0; }
.pc-hint.on-black { fill: #8f93ad; }
.key-bubble circle { fill: var(--ink); }
.key-bubble text { font: 700 8.5px var(--font-body); fill: #fff; text-anchor: middle; dominant-baseline: central; }
.key-bubble text.small { font-size: 5.4px; }
.key-bubble.rh circle { fill: var(--rh); }
.key-bubble.lh circle { fill: var(--lh); }
.key-bubble.accent circle { fill: var(--felt); }
.key-bubble.light circle { fill: #fff; stroke: var(--ink); stroke-width: .8; }
.key-bubble.light text { fill: var(--ink); }
