/* Calm paper in Focus; the theme changes notation, never the source artwork. */
body.focus .focus-actions{grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr)}
body.focus #focus-theme{width:44px;min-width:44px;padding:0;font-size:25px;line-height:1}
body.focus:not(.performance)[data-theme=light] .focus-actions{background:#fffdf7;border-color:#d4ddd9;color:#20343f;box-shadow:0 3px 14px #193b2512}
body.focus:not(.performance)[data-theme=light] .focus-actions button{background:#fffdf7;color:#20343f;border-color:#bac8c4;box-shadow:none}
body.focus:not(.performance)[data-theme=light] .focus-actions button:hover{background:#edf3ed;border-color:#537c6e}
body.focus:not(.performance)[data-theme=light] .focus-legend{color:#465f62;border-color:#dae3df}
body.focus:not(.performance)[data-theme=light] .focus-legend small{color:#465f62}
body.focus:not(.performance)[data-theme=light] .focus-legend kbd{color:#284442;background:#f0f5ef;border-color:#bdccc6}
body.focus:not(.performance)[data-theme=light] .gesture-symbol{color:#3a7164}
body[data-theme=dark] #viewport,body.performance.performance-stage-ready[data-theme=dark] #viewport{background:#14232b;color:#edf7f5;border-color:#627f8b}
body[data-theme=dark] #row{color:#e5efe8}
body[data-theme=dark] .note.active{color:#9aefd4}
body[data-theme=dark] .note.active .halo{fill:#27544a;stroke:#8cf4de}
body[data-theme=dark] #row .bar-label{fill:#b8c9cb}
body[data-theme=dark] .duration-track{fill:#334b53;stroke:#bdd9de}
body[data-theme=dark] .note.active .duration-track{fill:#356858}
body[data-theme=dark] .duration-label{fill:#d0e6e3}
body[data-theme=dark].colors .pitch-letter{fill:var(--pitch)}
body[data-theme=dark].colors .pitch-head,body[data-theme=dark].colors .pitch-head use{stroke:#d0dedb}
body[data-theme=dark] #playhead{background:#8cf4de;box-shadow:0 0 0 2px #14232baa}
body[data-theme=dark] #playhead span{background:#28534a;color:#f0fff9}
body[data-theme=dark] .karaoke-bar{fill:#96b9c6;stroke:#d0dedb}
body[data-theme=dark].colors .karaoke-bar{fill:var(--pitch)}
body[data-theme=dark] .karaoke-rest{fill:#253943;stroke:#a0b6bd}
body[data-theme=dark] .karaoke-note.active .karaoke-bar{stroke:#8cf4de}
body[data-theme=dark] .voice-trace,body[data-theme=dark] .voice-bar{stroke:#ff73c0}
body[data-theme=dark] .voice-trace-back,body[data-theme=dark] .voice-bar-back,body[data-theme=dark] .target-indicator-back{stroke:#14232b}
body[data-theme=dark] .voice-marker{fill:#ff73c0;stroke:#14232b}
body[data-theme=dark] .voice-label{fill:#ffb0d8;stroke:#14232b}
body[data-theme=dark] .target-indicator{stroke:#8ce0c7}
body[data-theme=dark] .staff-reference-label{fill:#d0e4e9}
body[data-theme=dark] .staff-reference-title{fill:#b7cbd3}
body[data-theme=dark] .reference-tick{stroke:#a4c5cc}
body[data-theme=dark] .result-symbol{stroke:#14232b}
body[data-theme=dark] .result-hit .result-symbol{fill:#8debab}
body[data-theme=dark] .result-hit .result-ring{stroke:#8debab}
body[data-theme=dark] .result-miss .result-symbol{fill:#ff91a8}
body[data-theme=dark] .result-miss .result-ring{stroke:#ff91a8}
body[data-theme=dark] .result-unscored .result-symbol{fill:#bacbd2}
body[data-theme=dark] .result-unscored .result-ring{stroke:#bacbd2}
body.focus:not(.performance)[data-theme=dark],body.focus:not(.performance)[data-theme=dark] main{background:#101d26}
body.focus:not(.performance)[data-theme=dark] .focus-actions{background:#1b2d38;border-color:#78919c;box-shadow:0 5px 20px #0003}
body.focus:not(.performance)[data-theme=dark] #focus-status:not([hidden]){background:#182e39;color:#e4f2f6;border-radius:10px;padding:6px 12px}
/* The score remains opaque; only Performance's floating controls reveal the stage. */
body.performance.performance-stage-ready .focus-actions{background:#102137;border-color:#8dabc1;color:#f0f9ff;box-shadow:0 7px 25px #030c2580}
body.performance.performance-stage-ready .focus-actions button{background:#20334b;color:#f0f9ff;border-color:#8dabc1;box-shadow:none}
@supports(backdrop-filter:blur(12px)){body.performance.performance-stage-ready .focus-actions{background:#102137cf;backdrop-filter:blur(12px)}body.performance.performance-stage-ready .focus-actions button{background:#20334b9c;backdrop-filter:none}}
body.focus main{padding-top:calc(var(--immersive-controls-height,160px) + 24px)}
@media(prefers-reduced-motion:reduce){body.performance.performance-stage-ready .focus-actions{backdrop-filter:none;background:#102137}}

body[data-theme=dark] #staff-rail>rect{fill:#14232b}

#theme-toggle{min-width:60px;min-height:60px;width:60px;padding:0;font-size:28px;line-height:1;flex:none}
#restart,#brand-readme{display:inline-flex;align-items:center;justify-content:center;gap:9px}
.transport-icon,.guide-action-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round;flex:none}
.guide-action-icon{width:18px;height:18px}
body.focus #focus-drag{grid-column:1/-1;display:flex;align-items:center;justify-content:center;width:100%;height:26px;min-height:26px;padding:0;border:0;background:transparent;color:inherit;box-shadow:none;cursor:grab;touch-action:none;font-size:25px;line-height:1;border-radius:7px}
body.focus #focus-drag.dragging{cursor:grabbing}
body.focus #focus-drag:hover{background:#6b98951c}
.focus-legend .gesture-symbol{width:32px;display:flex;align-items:center;justify-content:center}
.gesture-symbol svg{width:32px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.focus-legend small{white-space:nowrap}
@supports(backdrop-filter:blur(12px)){body.performance.performance-stage-ready .focus-actions{background:#0a1a2d9c;backdrop-filter:blur(16px) saturate(1.2)}body.performance.performance-stage-ready .focus-actions button:not(#focus-drag){background:#20334b70}}
.readme summary{list-style:none;display:flex;align-items:center;gap:12px}
.readme summary::-webkit-details-marker{display:none}
.readme summary::before{content:'';display:block;flex:none;width:18px;height:18px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;transform:rotate(-90deg)}
.readme[open]>summary::before,.readme details[open]>summary::before{transform:none}

body[data-theme=dark] #playhead{box-shadow:0 0 0 3px #14232be6}
