/* Staff reader: the controls, the staff (scrolls inside its own box when it is wider than the screen) and the readout.
   Builds on the shared .explorer, .btn and .cx styles in styles.css. */
.staff-reader { min-width: 0; }

.sr-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.8rem; }
.sr-controls .btn { min-height: 44px; flex: 1 1 auto; }
.sr-names[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

/* The staff keeps a readable size: a long scale scrolls sideways inside this box and never widens the page. */
.sr-scroll { overflow-x: auto; max-width: 100%; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); -webkit-overflow-scrolling: touch; }
.sr-scroll:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.sr-figure { background: transparent; max-width: none; }

.sr-line, .sr-ledger, .sr-barline { stroke: var(--text); stroke-width: 1.4; }
.sr-ledger { stroke-width: 1.6; }
.sr-clef-stroke { fill: none; stroke: var(--text); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sr-clef-dot { fill: var(--text); }

/* A note head is a hollow whole note; the selected one is filled and ringed, so colour is never the only cue. */
.sr-head { fill: none; stroke: var(--text); stroke-width: 2.2; }
.sr-note--active .sr-head { fill: var(--accent); stroke: var(--accent); }
.sr-ring { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 3 2; }
.sr-accidental { fill: var(--text); font-size: 22px; font-weight: 700; pointer-events: none; }
.sr-name { fill: var(--text); font-size: 14px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.sr-hit { fill: transparent; cursor: pointer; }

/* The readout is the live region: it is also what the student reads. */
.sr-readout { margin: 0.8rem 0 0; min-height: 3em; padding: 0.55rem 0.75rem; border-radius: 10px; background: var(--accent-soft); font-weight: 600; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) { .sr-head { transition: fill 0.12s; } }
