#practice-room-tool { max-width: 1500px; margin: 42px auto 0; }
.pr-header, .pr-score-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.pr-header { justify-content: flex-start; gap: 24px; }
.pr-header h1 { margin: 0; }
.pr-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#pr-upload { display: inline-flex; align-items: center; gap: 12px; background: var(--green); color: white; border: 1px solid var(--green); border-radius: 12px; padding: 14px 22px; font-weight: 650; box-shadow: 0 4px 12px #16695b18; transition: transform .15s, box-shadow .15s; }
#pr-upload:hover { background: #105346; box-shadow: 0 6px 20px #16695b24; transform: translateY(-1px); }
#pr-upload:disabled { opacity: .6; cursor: wait; }
#pr-workspace { margin-top: 32px; }
.pr-score-heading h2 { font-size: clamp(23px, 3vw, 30px); font-weight: 650; letter-spacing: -.5px; margin: 0 0 18px; overflow-wrap: anywhere; }
#pr-part { max-width: 100%; }
#pr-score { width: 100%; min-height: 180px; overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 14px; }
#pr-score svg { display: block; }
.pr-measure { fill: transparent; stroke: transparent; cursor: crosshair; }
.pr-measure:hover { fill: #16695b12; stroke: #16695b55; }
.pr-measure[aria-pressed="true"] { fill: #16695b28; stroke: var(--green); stroke-width: 1.5px; }
.pr-measure:focus-visible { outline: none; stroke: #ac922f; stroke-width: 3px; }
#pr-selection, #pr-passage-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 0; }
#pr-selection { position: sticky; bottom: 10px; padding: 14px 18px; margin-top: 12px; border: 1px solid #b9d4cb; border-radius: 12px; background: var(--mint); box-shadow: 0 4px 20px #203b4410; }
#pr-selection[hidden], #pr-passage-bar[hidden] { display: none; }
#pr-selection-label { font-weight: 650; }
.pr-library-actions { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 14px; }
.pr-library-actions button { padding: 3px 0; font-size: 13px; border: 0; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
#pr-library { margin-top: 8px; max-width: 650px; }
#pr-saved-list { margin: 0; padding: 0; list-style: none; }
.pr-saved-row { display: flex; gap: 12px; align-items: center; padding: 2px 0; }
.pr-saved-open { text-align: left; display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 3px 0; border: 0; background: transparent; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.pr-saved-open span:last-child { font-size: 12px; color: var(--muted); }
.pr-saved-remove { padding: 2px 5px; font-size: 11px; border: 0; background: transparent; color: var(--muted); }
#pr-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
#pr-tools[hidden] { display: none; }
#pr-tools button { padding: 8px 12px; font-size: 13px; }
#pr-tools [aria-pressed="true"] { background: var(--green); border-color: var(--green); color: white; }
.pr-annotation { pointer-events: none; }
.pr-note-hit { fill: transparent; stroke: transparent; cursor: pointer; }
.pr-note-hit:hover, .pr-note-hit[aria-pressed="true"] { fill: #16695b33; stroke: var(--green); }
.pr-note-hit:focus-visible { outline: none; stroke: #ac922f; stroke-width: 3; }
#pr-fingering-panel { margin: 18px 0; width: 250px; max-width: 100%; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 12px; text-align: center; }
#pr-fingering-panel h3 { font-size: 18px; margin: 0 0 8px; }
#pr-note-notice, #pr-count-notice { font-size: 12px; color: var(--muted); }
#pr-print-output { display: none; }
body.pr-printing #pr-print-output { display: block; position: absolute; left: -10000px; top: 0; width: 186mm; }
@page practice-room { size: A4 portrait; margin: 12mm; }
@media print {
  body.pr-printing { margin: 0!important; background: white!important; color: black!important; }
  body.pr-printing > *:not(#pr-print-output) { display: none!important; }
  body.pr-printing > #pr-print-output { display: block!important; position: static!important; width: 100%!important; }
  #pr-print-output { page: practice-room; font-family: system-ui; }
  .pr-print-song { break-before: page; }
  .pr-print-song:first-child { break-before: auto; }
  .pr-print-song h1 { font-size: 18px; margin: 0 0 12px; }
  .pr-print-passage h2 { font-size: 14px; margin: 14px 0 6px; break-after: avoid; }
  .pr-print-passage svg { display: block; width: 100%; height: auto; max-height: 238mm; break-inside: avoid; }
  .pr-print-passage .pr-annotation { fill: black; }
  .pr-print-notice { font-size: 11px; margin: 6px 0; }
}
#pr-error { color: #a51d26; }
#pr-error:empty { display: none; }
@media (max-width: 540px) { #practice-room-tool { margin-top: 28px; } .pr-header { align-items: center; gap: 12px; } #pr-upload { padding: 12px 16px; } }
#practice-room-tool:has(#pr-guide:not([hidden])) .pr-intro {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}
#practice-room-tool:has(#pr-guide:not([hidden])) .pr-header {
  justify-content: space-between;
  align-items: center;
  padding: clamp(22px, 5vw, 52px);
  background: var(--mint);
}
#practice-room-tool:has(#pr-guide:not([hidden])) .pr-actions {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
#pr-welcome { max-width: 34rem; color: var(--ink); margin: 12px 0 0; font-size: clamp(16px, 2vw, 20px); }
#pr-file-formats { color: var(--muted); font-size: 12px; margin: 0; }
#pr-guide { padding: clamp(22px, 4vw, 40px) clamp(22px, 5vw, 52px); }
#pr-guide h2 { margin: 0 0 18px; }
.pr-guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding-left: 22px; }
.pr-guide-steps li { padding-left: 4px; }
.pr-guide-steps li::marker { color: var(--green); font-weight: 750; }
.pr-guide-steps h3 { margin: 0 0 4px; font-size: 16px; }
.pr-guide-steps p { margin: 0; color: var(--muted); font-size: 14px; }
#practice-room-tool:has(#pr-guide:not([hidden])) #pr-error { margin: 14px clamp(22px, 5vw, 52px) 0; }
@media (max-width: 660px) {
  .pr-guide-steps { grid-template-columns: 1fr; gap: 16px; }
}
#pr-score-heading { margin: 24px 0 12px; }
#pr-score-heading[hidden] { display: none; }
#pr-score-heading h2 { margin: 0; }
#pr-worksheet { max-width: 1000px; padding: clamp(16px, 3vw, 28px); border: 1px solid var(--line); border-radius: 16px; background: white; }
.pr-worksheet-heading, .pr-worksheet-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.pr-worksheet-heading { justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 0 14px; }
.pr-worksheet-heading nav { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-worksheet-heading h2 { margin: 3px 0 0; }
#pr-worksheet-step { margin: 0; color: var(--muted); font-size: .85rem; }
#pr-worksheet-message { color: var(--muted); }
#pr-worksheet-message:empty { display: none; }
#pr-worksheet-body > p { margin: 16px 0; }
.pr-chosen-exercises { max-width: 720px; }
.pr-chosen-exercises h3 { font-size: .95rem; margin: 16px 0 0; }
.pr-worksheet-controls { margin: 12px 0; }
.pr-worksheet-controls > label:not(.pr-check) { display: grid; gap: 4px; min-width: 0; font-size: .9rem; }
.pr-worksheet-controls select { max-width: 100%; }
.pr-check { display: inline-flex; align-items: center; gap: 5px; }
.pr-worksheet-items { padding-left: 24px; }
.pr-worksheet-items li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pr-worksheet-items .pr-worksheet-controls { margin: 6px 0; }
.pr-worksheet-items button { padding: 5px 9px; }
.pr-worksheet-score { overflow-x: auto; }
.pr-worksheet-score svg { display: block; }
.pr-sheet-viewport { margin-top: 16px; overflow: auto; background: #e8efed; border-radius: 10px; padding: 12px; }
.pr-sheet-pages { box-sizing: content-box; width: 186mm; margin-inline: auto; padding-inline: 12mm; }
.pr-sheet-page { box-sizing: content-box; width: 186mm; min-height: 273mm; padding: 12mm; margin: 0 0 12px -12mm; background: white; color: #171717; font-family: system-ui; box-shadow: 0 1px 6px #24372d25; }
.pr-sheet-page header { display: block; padding: 0; border: 0; }
.pr-sheet-page h1 { margin: 0 0 4px; font-size: 21px; overflow-wrap: anywhere; }
.pr-sheet-page header p { margin: 0 0 12px; font-size: 13px; }
.pr-sheet-block { margin: 0 0 9px; display: flow-root; }
.pr-sheet-block h2 { margin: 0 0 4px; font-size: 16px; }
.pr-sheet-block h3 { margin: 0 0 3px; font-size: 13px; font-weight: 600; }
.pr-sheet-block > svg { display: block; width: 100%; height: auto; max-height: 238mm; }
@media print {
  .pr-sheet-page { min-height: 0; padding: 0; width: 100%; margin: 0; box-shadow: none; break-after: page; }
  .pr-sheet-page:last-child { break-after: auto; }
  .pr-sheet-block { break-inside: avoid; }
}

.pr-chosen-exercises .pr-sheet-block { margin-top: 16px; }
.pr-sheet-directions { font-size: 13px; margin: 4px 0 8px; }
#pr-worksheet-body > label:not(.pr-check) { display: grid; gap: 5px; max-width: 24rem; }
.pr-sheet-student { white-space: pre-wrap; }

.pr-final-song-title { margin-bottom: 12px; }
.pr-sheet-block h2 { overflow-wrap: anywhere; }
