:root{--navy:#162c45;--blue:#255bc8;--light:#f2f5fa;--line:#dbe2ed;--muted:#64758b;--white:#fff;--aqua:#007e80}*{box-sizing:border-box}body{margin:0;background:var(--light);color:var(--navy);font:16px/1.5 system-ui,-apple-system,'Segoe UI',sans-serif}button,input,select{font:inherit;color:inherit}button{cursor:pointer;min-height:44px}button:disabled{opacity:.42;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #008ea3;outline-offset:3px}header{display:flex;align-items:center;gap:32px;padding:18px max(4%,calc((100vw - 1360px)/2));background:var(--white);border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;font-weight:700;font-size:21px;text-decoration:none;color:inherit;white-space:nowrap}.brand small{display:block;font-size:12px;color:var(--muted);font-weight:400;letter-spacing:2px}.logo{width:46px;height:46px;border-radius:12px;background:var(--navy);display:grid;place-items:center;color:#baf0f1;font-size:32px}.header-caption{color:var(--muted);font-size:14px}.quiet{margin-left:auto;border:0;background:none;font-size:14px}.soon{background:#edf1f7;color:var(--muted);padding:4px 7px;font-size:12px;border-radius:5px;margin-left:6px}main{max-width:1360px;margin:auto;padding:24px 4% 40px}label{font-size:14px}.lesson-bar{display:flex;align-items:end;gap:14px;flex-wrap:wrap;padding:18px 20px;background:#e7edf7;border-radius:12px;margin-bottom:24px}.lesson-bar label{display:block;font-size:12px;margin-bottom:5px;color:var(--muted)}select,input[type=time]{min-height:43px;border:1px solid #c9d3e4;border-radius:7px;background:white;padding:8px 10px}#lessons{min-width:180px;max-width:330px}#saveStatus{font-size:12px;align-self:center;margin-left:auto;max-width:230px;color:var(--muted)}.outline,.quiet,.text-button{border-radius:7px}.outline{border:1px solid #c5d0e0;background:var(--white);padding:9px 15px;font-size:14px}.outline:hover:not(:disabled){border-color:var(--blue);color:var(--blue)}.primary{background:var(--blue);border:0;border-radius:8px;color:white;font-weight:600;font-size:16px;padding:12px 25px;min-height:49px;box-shadow:0 3px 8px #255bc819}.primary:hover:not(:disabled){background:#194cae}.eyebrow{font-size:12px;letter-spacing:1.6px;font-weight:600;color:var(--muted)}h1,h2,h3,p{margin:0}.setup{background:white;border:1px solid var(--line);border-radius:16px;overflow:hidden}.setup-heading{display:flex;justify-content:space-between;align-items:center;padding:22px 26px;gap:20px}h1{font-size:26px;margin-top:4px;font-weight:650}.group-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.group-controls>button{width:44px;border:1px solid var(--line);border-radius:8px;background:var(--light);font-size:24px}.group-controls input[type=number]{width:55px;min-height:44px;border:1px solid var(--line);border-radius:7px;text-align:center;-moz-appearance:textfield}.group-controls input::-webkit-inner-spin-button{appearance:none}.teacher-check{border-left:1px solid var(--line);padding-left:16px;display:flex;align-items:center;gap:7px}.teacher-check input,input[type=checkbox]{width:18px;height:18px;accent-color:var(--blue)}#studentTabs{display:flex;gap:8px;overflow-x:auto;padding:0 26px 17px;border-bottom:1px solid var(--line)}.student-tab{border:1px solid var(--line);border-radius:8px;background:white;padding:9px 14px;white-space:nowrap;font-size:14px;display:flex;gap:10px;align-items:center}.student-tab.selected{border-color:var(--blue);background:#ebf1ff;color:var(--blue)}.student-tab .complete{font-size:12px;color:var(--aqua)}.student-editor{padding:22px 26px}.editor-heading{display:flex;gap:18px;align-items:center}.editor-heading h2{font-size:22px}.editor-heading #selectionSummary{font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:60%}.text-button{border:0;background:transparent;color:var(--muted);font-size:13px;padding:7px 10px}.editor-heading .text-button{margin-left:auto}.picker-caption{display:flex;gap:18px;align-items:center;margin:14px 0 9px;flex-wrap:wrap}.picker-caption strong{font-size:15px;font-weight:500}.picker-caption label{display:flex;align-items:center;gap:7px;margin-left:auto;font-size:13px}.note-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.octave-row{background:#f7f9fc;border:1px solid #e1e7f0;border-radius:9px;padding:8px 8px 10px}.octave-caption{font-size:12px;color:var(--muted);padding-left:7px;margin-bottom:5px}.pitch-buttons{display:flex;align-items:stretch;gap:3px}.pitch-button{padding:0;flex:1;min-width:40px;max-width:76px;min-height:185px;background:white;border:1px solid #dfe5ee;border-radius:7px;position:relative;overflow:hidden}.pitch-button.selected{border:2px solid var(--blue);background:#ebf2ff}.pitch-button.selected::after{content:'✓';position:absolute;top:5px;right:5px;background:var(--blue);color:white;font-size:12px;width:18px;height:18px;display:grid;place-items:center;border-radius:50%}.pitch-button svg{display:block;width:100%;height:155px}.pitch-label{display:block;font-size:15px;font-weight:650;padding:1px 3px 7px}.pitch-label small{font-size:12px;margin-left:2px}.level-row{display:flex;align-items:center;justify-content:space-between;gap:25px;margin-top:22px}.levels{display:flex;gap:7px;margin-top:8px;flex-wrap:wrap}.level-button{border:1px solid var(--line);border-radius:7px;background:white;font-size:14px;padding:9px 13px}.level-button.selected{background:var(--navy);color:white;border-color:var(--navy)}.secondary{font-size:12px;color:var(--muted);line-height:1.7}#levelHint{margin-top:7px}#done{min-width:135px}.composition{margin-top:30px}.composition-heading{display:flex;justify-content:space-between;align-items:center;gap:15px}.composition-heading h2{font-size:24px;margin-top:3px}.notice{font-size:14px;color:var(--muted);margin:12px 0 17px}.notice.error{color:#b13f41}.score-toolbar{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:13px}.part-tabs{display:flex;gap:5px;overflow:auto;flex:1}.part-tab{border:1px solid var(--line);border-radius:7px;background:white;white-space:nowrap;padding:9px 12px;font-size:13px}.part-tab.selected{background:var(--navy);color:white;border-color:var(--navy)}.score-actions{display:flex;gap:7px;flex-wrap:wrap}.score-actions .outline{font-size:13px;padding:8px 12px}.score-paper{background:#fff;border:1px solid #dbe1ea;border-radius:6px;padding:30px 26px;box-shadow:0 8px 30px #1b325309}.score-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;gap:20px}.score-title h3{font:30px Georgia,serif;letter-spacing:1px}.score-title p{font-size:13px;color:var(--muted);margin-top:7px}.score-title>span{font-family:Georgia,serif;font-size:18px;color:var(--muted)}.score-page{break-inside:avoid;position:relative;margin:0 0 15px}.score-svg{width:100%;display:block;height:auto}.notation-note{font-size:12px;color:var(--muted);border-top:1px solid var(--line);padding-top:12px}.empty-score{min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--muted);gap:9px}.empty-score>span{font:65px serif;color:#8ea5bf}.empty-score h3{font-weight:500;font-size:18px}.empty-score p{font-size:14px}.transport{display:flex;align-items:center;gap:20px;margin-top:18px;padding:20px;background:var(--navy);border-radius:12px;color:white;position:relative;overflow:hidden}.play-button{height:49px;min-width:49px;background:#bff0eb;color:var(--navy);border:0;border-radius:50%;font-size:20px}.play-label{display:flex;flex-direction:column;gap:4px;min-width:180px}.play-label strong{font-weight:500;font-size:15px}.play-label small{font-size:12px;color:#b8c7dc}.tempo-label{display:flex;gap:9px;align-items:center;margin-left:auto;font-size:14px}.tempo-label input{width:130px;accent-color:#8fcece}.tempo-label b{font-weight:500;min-width:30px}.loop-label{display:flex;gap:6px;align-items:center;font-size:13px}.progress{position:absolute;bottom:0;left:0;right:0;height:3px}.progress i{height:100%;width:0;display:block;background:#a0e1da}.sound-caption{text-align:center;margin-top:10px}.bar-marker{pointer-events:none}.current-bar{fill:#dcedfa!important;fill-opacity:.55}dialog{max-width:490px;width:90%;border:1px solid var(--line);padding:30px;border-radius:14px;color:var(--navy)}dialog::backdrop{background:#14243b80;backdrop-filter:blur(3px)}dialog h2{font-size:23px;margin-bottom:16px}dialog p{font-size:15px;margin:12px 0;line-height:1.7}dialog .primary{margin-top:15px}.dialog-close{position:absolute;right:10px;top:7px;background:none;border:0;font-size:27px;color:var(--muted)}.projection header,.projection .lesson-bar,.projection .setup,.projection .composition-heading,.projection .notice,.projection .sound-caption{display:none}.projection main{max-width:1800px;padding:15px 3%}.projection .composition{margin:0}.projection .score-toolbar{position:sticky;top:0;background:var(--light);padding:10px 0;z-index:3}.projection .transport{position:sticky;bottom:8px;z-index:3}
@media(max-width:900px){.header-caption{display:none}.note-picker{grid-template-columns:1fr}.octave-row .pitch-button{max-width:none}.setup-heading{align-items:flex-start;flex-direction:column}.transport{gap:14px;flex-wrap:wrap}.tempo-label{margin-left:auto}.lesson-bar{gap:10px}.lesson-bar #saveStatus{width:100%;margin-left:0}.score-paper{padding:20px 14px}}@media(max-width:550px){header{gap:12px;padding:15px 4%}.brand{font-size:17px}.logo{width:38px;height:38px;font-size:28px}.quiet{font-size:12px;padding:0 4px;max-width:105px}.soon{display:block;font-size:12px;margin:0}.setup-heading,.student-editor{padding:19px 13px}#studentTabs{padding-left:13px;padding-right:13px}.editor-heading{flex-wrap:wrap;gap:7px}.editor-heading #selectionSummary{max-width:70%}.editor-heading .text-button{padding:3px;font-size:12px}.picker-caption{gap:8px}.picker-caption label{margin-left:0}.pitch-button{min-width:55px}.pitch-label{font-size:14px}.pitch-label small{font-size:12px}.level-row{flex-direction:column;align-items:stretch;gap:14px}#done{width:100%}.level-button{padding:9px 10px}.composition-heading h2{font-size:20px}.composition-heading .primary{padding:12px 15px}.group-controls{gap:8px}.lesson-bar{padding:15px 12px}#lessons{min-width:200px}#save{flex:1}.lesson-bar input[type=time]{width:115px}.score-title h3{font-size:24px}.score-actions .outline{font-size:12px;padding:8px 10px}.play-label{min-width:150px}.tempo-label{width:100%;margin-left:0}.tempo-label input{flex:1}.transport{gap:14px}.loop-label{position:absolute;right:16px;top:26px;font-size:12px}.play-label{max-width:60%}.score-page{overflow-x:auto}.score-svg{min-width:560px}.projection .score-svg{min-width:680px}}@media print{@page{size:A4 landscape;margin:13mm}body{background:white;color:black}header,.lesson-bar,.setup,.composition-heading,.notice,.score-toolbar,.transport,.sound-caption,dialog{display:none!important}main{padding:0;max-width:none}.composition{margin:0}.score-paper{border:0;box-shadow:none;padding:0}.score-title h3{font-size:25px}.score-page{overflow:visible;break-inside:avoid;margin-bottom:10mm}.score-svg{min-width:0;max-width:100%}.score-title{margin-bottom:10px}.current-bar{fill:transparent!important}.notation-note{font-size:10px}}

@media(max-width:550px){.pitch-buttons{overflow-x:auto;padding-bottom:4px}.pitch-button{flex:none;width:55px}.pitch-button svg{height:155px}}
/* Ensemble Joy: one student at a time, then a dedicated music view. */
header{max-width:none;padding:14px max(3%,calc((100vw - 1300px)/2));gap:20px}.brand{font-size:23px}.stage-nav{display:flex;gap:3px;margin:auto;background:#edf2fa;padding:4px;border-radius:10px}.stage-nav button{border:0;background:transparent;min-width:100px;border-radius:7px;padding:8px 18px;font-size:15px}.stage-nav button.selected{background:var(--navy);color:white}#language{font-size:14px;max-width:125px}main{max-width:1300px;padding:18px 3% 25px}#lessonPanel{margin-bottom:16px;border:1px solid var(--line);border-radius:10px;background:white}#lessonPanel summary{cursor:pointer;padding:12px 16px;font-size:14px;color:var(--muted)}.lesson-bar{margin:0;border-radius:0 0 10px 10px;gap:12px;padding:14px 16px}.setup-heading{padding:17px 22px}.group-controls{gap:10px}.teacher-check{margin-left:9px}#teacherInstrument{max-width:175px;font-size:14px}.setup-heading #generate{white-space:nowrap}.student-editor{padding:19px 22px}.editor-heading{gap:14px;align-items:center}.editor-heading h1{font-size:23px;white-space:nowrap;margin:0}.editor-heading #instrument{font-size:16px;min-width:190px}.editor-heading #rangeInfo{margin-left:auto}#clefLabel{font:40px/1 serif;color:var(--navy)}.picker-caption{margin:15px 0 12px}.picker-caption strong{font-size:16px}.note-actions{display:flex;margin-left:auto;gap:5px}.pitch-navigation{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}.octaves{display:flex;gap:6px;overflow-x:auto}.octaves button,.accidental-switch button{border:1px solid var(--line);background:#fff;border-radius:7px;min-height:44px;padding:9px 13px;font-size:14px;white-space:nowrap}.octaves button.selected{background:var(--navy);border-color:var(--navy);color:white}.accidental-switch{display:flex;gap:5px}.accidental-switch button{font-size:25px;min-width:48px;padding:2px 9px}.accidental-switch button.selected{background:#ebf2ff;color:var(--blue);border-color:var(--blue)}.note-picker{display:block;padding:10px;border:1px solid var(--line);border-radius:10px;background:#f6f8fc}.pitch-buttons{gap:8px;overflow-x:auto;justify-content:center;padding-bottom:2px}.pitch-button{flex:1;min-width:62px;max-width:130px;min-height:185px;border-radius:9px}.pitch-button svg{height:155px}.pitch-label{font-size:20px;padding-bottom:8px}.pitch-label small{font-size:14px}.pitch-button.selected::after{width:23px;height:23px;font-size:15px}.level-row{margin-top:16px}.level-button{padding:12px 18px;min-height:50px;font-size:15px}#done{min-width:150px;font-size:18px;min-height:54px}.levels{gap:7px}#selectionSummary{font-size:12px;margin-top:9px;max-height:34px;overflow:auto;line-height:1.6}.composition{display:none;margin-top:0}.score-mode .setup{display:none}.score-mode .composition{display:block}.notice{margin:10px 2px;font-size:13px;min-height:20px}.score-mode .notice{margin-top:0}.score-mode #lessonPanel{display:none}.score-toolbar{gap:10px}.score-actions{gap:5px}.score-actions .outline{min-height:44px}.score-paper{padding:20px 20px 14px}.score-title h2{font:29px Georgia,serif;letter-spacing:.5px}.score-title{margin-bottom:8px}.transport{padding:15px 19px;gap:16px;position:sticky;bottom:12px;z-index:4}.transport .outline{background:#fff;color:var(--navy);border:0;min-height:46px}.tempo-label input{width:125px}.play-label{min-width:145px}.loop-label{white-space:nowrap}.play-button{height:54px;min-width:54px;font-size:22px}.sound-caption{margin-bottom:0}footer{display:flex;justify-content:center;padding-top:9px}.projection footer{display:none}.projection .stage-nav{display:none}.projection #editGroup{display:none}.projection .score-paper{padding:12px}.projection .transport{bottom:8px}.projection #lessonPanel{display:none}.projection .composition{display:block}
@media(min-width:850px){.setup-heading{flex-direction:row;align-items:center}.note-picker{grid-template-columns:none}.teacher-check input{width:21px;height:21px}.pitch-button svg{height:160px}.pitch-button{min-height:191px}.transport{flex-wrap:nowrap}.setup{max-width:1180px;margin:auto}}
@media(max-width:850px){header{gap:10px}.brand{font-size:19px}.stage-nav button{min-width:72px;padding:7px 12px}.setup-heading{flex-direction:row;flex-wrap:wrap;align-items:center}.setup-heading #generate{margin-left:auto}.group-controls{gap:7px}.group-controls label{font-size:14px}#teacherInstrument{max-width:150px}.transport{flex-wrap:wrap}.tempo-label{width:auto;margin-left:auto}.loop-label{position:static}.play-label{max-width:none}.transport #newMusic{margin-left:auto}.score-actions #projection,.score-actions #print{display:none}.score-title h2{font-size:25px}}
@media(max-width:550px){header{padding:12px 3%;flex-wrap:wrap}.brand{font-size:18px}.logo{width:34px;height:34px}.stage-nav{order:3;width:100%;justify-content:center;margin:0}.stage-nav button{flex:1}#language{margin-left:auto;max-width:115px}.setup-heading,.student-editor{padding:15px 12px}.teacher-check{margin-left:0;border-left:0;padding-left:3px}#teacherInstrument{font-size:13px;max-width:140px}.group-controls{flex-wrap:wrap}.setup-heading #generate{width:100%}.editor-heading{gap:8px}.editor-heading h1{font-size:21px}.editor-heading #instrument{min-width:140px;max-width:190px;font-size:14px}#clefLabel{font-size:30px}.editor-heading #rangeInfo{font-size:12px;min-height:36px}.picker-caption{gap:8px}.note-actions{width:100%;margin-left:0}.pitch-navigation{align-items:flex-start;flex-direction:column}.octaves{max-width:100%;width:100%}.octaves button{padding:8px 10px;font-size:12px}.accidental-switch{align-self:flex-end}.note-picker{padding:8px}.pitch-buttons{justify-content:flex-start;gap:6px}.pitch-button{width:62px;min-width:62px;flex:0 0 62px;min-height:174px}.pitch-button svg{height:142px}.pitch-label{font-size:17px}.level-row{gap:12px}.level-button{font-size:13px;padding:10px 12px;min-height:46px}#done{width:100%;min-height:51px}.play-label{min-width:100px;width:calc(100% - 80px)}.tempo-label{width:100%;margin-left:0}.tempo-label input{flex:1}.loop-label{position:static;font-size:13px}.transport #newMusic{margin-left:auto}.transport{gap:12px;padding:15px}.score-title h2{font-size:23px}.score-svg{min-width:620px}.score-actions{width:100%}.score-actions #editGroup{margin-left:auto}.part-tabs{width:100%;flex:auto}#saveStatus{max-width:none}}
@media print{.stage-nav,#lessonPanel,.notice,footer,#newMusic{display:none!important}.composition{display:block!important}.score-paper{padding:0}.transport{display:none}.score-title h2{font-size:24px}.score-svg{min-width:0}.score-page{break-inside:avoid}.notation-note{font-size:10px}}

.transport{top:8px;bottom:auto;margin-top:0;margin-bottom:14px}.projection .transport{top:8px;bottom:auto}@media(max-width:850px){.score-actions #projection,.score-actions #print{display:inline-flex;align-items:center;justify-content:center}}

.live-students{display:flex;align-items:center;gap:12px;margin-bottom:12px}.live-students button{min-width:46px}.picker-staff svg{display:block;width:100%;height:auto}.note-picker .pitch-buttons{display:grid;gap:0}.note-picker .pitch-button{min-width:0;width:100%;height:48px;min-height:48px;border:0;border-radius:8px;background:transparent;padding:4px;font-size:21px}.note-picker .pitch-button.selected{background:#e6efff;color:var(--blue)}.note-picker .pitch-button small{font-size:12px;margin-left:3px}.picker-staff{pointer-events:none}.note-hit{pointer-events:none}.editing-notes .note-hit{pointer-events:all;cursor:pointer}.editing-notes .note-hit:hover,.editing-notes .note-hit:focus{fill:#255bc822;outline:none}#noteValue{min-width:180px;margin:18px 12px 18px 0}#clefLabel{display:none}.group-controls+label{display:grid;gap:3px}.score-svg{height:auto}
@media print{.live-students,#editHint,.note-hit,.bar-marker{display:none!important}.score-paper{padding:0!important}.score-title{break-after:avoid;page-break-after:avoid;margin-bottom:8mm!important}.score-page{break-inside:avoid;page-break-inside:avoid;margin-bottom:4mm!important}.score-svg{display:block;width:100%!important;min-width:0!important;height:auto!important;max-height:155mm}.notation-note{display:none!important}}

.note-picker .pitch-button{max-width:none}.note-picker .pitch-button.selected::after{display:none}.setup-heading{flex-wrap:wrap}

input[type=text]{min-height:44px;border:1px solid #c9d3e4;border-radius:7px;padding:8px 10px;max-width:220px;background:white}.live-students label,.name-field{display:grid;gap:4px}.live-students{flex-wrap:wrap}.live-students label{margin-right:auto}.editor-heading{flex-wrap:wrap}.name-field{font-size:14px}.octave-choice{display:flex;gap:12px;align-items:center;margin:16px 0;font-size:16px}#octaveChoices{display:flex;flex-wrap:wrap;gap:0 22px;margin-bottom:14px}.lesson-overview{margin:12px 0;padding:14px 18px;background:white;border:1px solid var(--line);border-radius:10px}.lesson-overview[hidden]{display:none}#roster{display:flex;flex-wrap:wrap;gap:10px 22px;margin-bottom:12px}#roster div{max-width:340px}#roster span{display:block;font-size:14px;color:var(--muted)}.lesson-overview label{display:flex;align-items:center;gap:12px;flex-wrap:wrap}#savedPieces{max-width:100%}@media print{.lesson-overview{display:none!important}}

.note-picker .note-cards{display:flex;gap:10px;justify-content:flex-start;overflow-x:auto;padding:2px}.note-picker .note-cards .pitch-button{flex:1 0 95px;min-width:95px;max-width:145px;width:auto;height:auto;min-height:220px;padding:0;border:1px solid #dbe2ed;border-radius:9px;background:white;overflow:hidden}.note-picker .note-cards .pitch-button.selected{border:2px solid var(--blue);background:#ebf2ff}.note-cards .pitch-button svg{display:block;width:100%;height:auto;pointer-events:none}.note-cards .pitch-label{display:block;padding:0 4px 12px;font-size:21px}.note-cards .pitch-button>div{pointer-events:none}

.current-lesson{font-size:21px;font-weight:650;margin:0 0 14px}.score-mode .live-students{display:none}.editing-notes .note-hit{touch-action:none}#dragPitch{position:fixed;z-index:100;background:var(--navy);color:white;border-radius:8px;padding:6px 12px;pointer-events:none}@media print{.current-lesson,#dragPitch{display:none!important}}

.note-picker{min-width:0;max-width:100%}.note-picker .note-cards{touch-action:pan-x pan-y pinch-zoom;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-width:thin}.note-picker .note-cards .pitch-button{flex:0 0 110px;width:110px;min-width:110px;max-width:110px;border:2px solid #dbe2ed;user-select:none;-webkit-user-select:none}.note-cards .pitch-button>div{display:flex;justify-content:center}.note-cards .pitch-button svg{width:110px;max-width:100%}.pitch-navigation{justify-content:flex-end}#nextLesson{margin-left:auto}.score-mode #lessonPanel[open]{display:block}@media print{#nextLesson{display:none!important}}

.group-controls .teacher-check{border-left:0;margin-left:0;padding-left:0}.student-tab .secondary:empty{display:none}.add-student{justify-content:center;min-width:48px;font-size:24px;flex-shrink:0}#studentTabs{border-bottom:0}.teacher-check{white-space:nowrap}

.instrument-field{display:grid;gap:4px;font-size:14px}.instrument-field[hidden]{display:none}.editor-heading{align-items:flex-end;gap:16px}.editor-heading h1{line-height:44px;margin:0}.editor-heading .name-field input,.editor-heading .instrument-field select{height:44px;min-height:44px;margin:0}.editor-heading .name-field,.editor-heading .instrument-field{min-width:0}.group-controls{align-items:flex-end}.group-controls .teacher-check{min-height:44px}.setup-heading{align-items:flex-end}#teacherInstrument{max-width:220px}.editor-heading #instrument{max-width:260px}@media(max-width:550px){.editor-heading h1{flex-basis:100%;line-height:1.4}.editor-heading .name-field,.editor-heading .instrument-field{flex:1 1 145px}.editor-heading input,.editor-heading #instrument{width:100%;min-width:0;max-width:100%}.editor-heading{gap:10px}.setup-heading{align-items:stretch}}

/* Shared baseline for teacher, concert key and create-piece controls. */
.setup-heading{display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,190px) auto;align-items:end;gap:20px}
.setup-heading .group-controls{align-items:end}
.setup-heading .group-controls>label.instrument-field,.setup-heading>.group-controls+label{display:grid;grid-template-rows:21px 44px;gap:4px;align-self:end}
.setup-heading select{height:44px;min-height:44px;box-sizing:border-box;margin:0}
.setup-heading .teacher-check{height:44px;min-height:44px;margin-bottom:0;align-self:end;align-items:center}
.setup-heading #generate{height:44px;min-height:44px;padding:0 24px;line-height:1.3;align-self:end}
.score-mode #lessonOverview{display:none}
@media(max-width:700px){.setup-heading{grid-template-columns:minmax(0,1fr) minmax(115px,150px);gap:14px}.setup-heading #generate{grid-column:1 / -1;width:100%}.setup-heading .group-controls{gap:8px}.setup-heading #teacherInstrument{min-width:0;width:100%;max-width:220px}}
@media(max-width:400px){.setup-heading{grid-template-columns:minmax(0,1fr)}.setup-heading>.group-controls+label{width:100%}}

#liveCount{width:64px;height:44px;border:1px solid #c5d0e0;background:#fff;border-radius:7px;text-align:center;font-size:16px;padding:4px;appearance:textfield}#liveCount::-webkit-inner-spin-button{appearance:none}#editNotes[aria-pressed=true]{background:var(--blue);border-color:var(--blue);color:#fff;box-shadow:inset 0 0 0 1px #fff4}.editing-notes .score-paper{outline:2px solid #255bc855;outline-offset:3px}.editing-notes .note-hit{fill:#255bc80c}.editing-notes .note-hit:hover,.editing-notes .note-hit:focus{fill:#255bc833}.score-actions #nextLesson{margin-left:0}.score-actions{align-items:center}@media print{.editing-notes .score-paper{outline:0}}

/* Give voice selection a full row, with wrapping for larger groups. */
.score-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.part-tabs{display:flex;flex-wrap:wrap;overflow:visible;flex:none;min-width:0;width:100%;gap:7px}.part-tab{white-space:normal;overflow-wrap:anywhere;max-width:100%;font-size:14px}.score-actions{width:100%}.editing-notes .note-hit.dragging-note{fill:#255bc82e;stroke:var(--blue);stroke-width:1;rx:5}.editing-notes #score{user-select:none;-webkit-user-select:none}

.score-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 24px;margin-bottom:18px}.score-header .current-lesson{margin:0;min-width:0;overflow-wrap:anywhere}.score-header #nextLesson{flex:0 0 auto;margin-left:auto}@media print{.score-header{display:none!important}}

.difficulty-controls{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.difficulty-controls #partLevel{font-size:14px;color:var(--muted);padding:0 4px;text-align:center}.difficulty-controls #partLevel[hidden]{display:none}

/* Keep large-class overviews aligned and easy to scan on touch screens. */
.lesson-overview{padding:0;overflow:hidden}
#rosterDetails>summary{padding:15px 18px;min-height:52px;cursor:pointer;font-size:16px;font-weight:650;user-select:none;-webkit-user-select:none}
#rosterDetails>summary::marker{color:var(--muted)}
#rosterDetails>summary:focus-visible{outline:3px solid var(--blue);outline-offset:-3px}
.roster-count{display:inline-flex;align-items:center;justify-content:center;min-width:27px;margin-left:9px;padding:1px 7px;border-radius:14px;background:#edf2f9;color:var(--muted);font-size:14px;font-weight:500}
#roster{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:0 18px 18px;margin:0}
#roster .roster-card{display:flex;flex-direction:column;gap:5px;min-width:0;max-width:none;padding:14px 15px;background:#f7f9fc;border:1px solid #e3e9f2;border-radius:9px;overflow-wrap:anywhere}
#roster strong{display:block;font-size:16px;line-height:1.4}
#roster .roster-meta{font-size:14px;line-height:1.5}
#roster .roster-notes{font-size:14px;line-height:1.6;color:var(--navy)}
#roster .roster-notes.empty{color:var(--muted)}
.lesson-overview .saved-pieces-row{display:grid;grid-template-columns:auto minmax(0,1fr);gap:16px;align-items:center;padding:15px 18px;border-top:1px solid var(--line);font-size:14px}
.saved-pieces-row #savedPieces{width:100%;min-width:0;max-width:480px}
@media(max-width:1000px){#roster{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){#roster{grid-template-columns:minmax(0,1fr);padding:0 12px 12px;gap:8px}#rosterDetails>summary{padding:14px 12px}.lesson-overview .saved-pieces-row{grid-template-columns:minmax(0,1fr);gap:8px;padding:14px 12px}.saved-pieces-row #savedPieces{max-width:none}}

#classroomPager,#classroomControls{display:none}
#scoreTransport[hidden]{display:none!important}
@media screen{
  body.projection{overflow:hidden;background:#fff}
  .projection main{height:100vh;height:100dvh;max-width:none;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));overflow:hidden}
  .projection .composition{height:100%;display:flex;flex-direction:column;min-height:0}
  .projection .score-header,.projection .score-toolbar,.projection #lessonOverview,.projection #editHint,.projection .live-students,.projection .notation-note{display:none!important}
  .projection .transport{position:static;flex:0 0 auto;flex-wrap:wrap;gap:8px;padding:8px 12px;margin:0 0 8px;border-radius:8px}
  .projection .transport #newMusic,.projection .play-label strong{display:none}
  .projection .play-button{height:44px;min-width:44px}
  .projection .play-label{width:auto;min-width:90px;max-width:none}
  .projection .play-label small{font-size:14px}
  .projection .tempo-label{width:auto;margin-left:0}
  .projection .tempo-label input{width:85px;flex:none}
  .projection .loop-label{position:static;font-size:14px}
  .projection #classroomPager{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:7px;margin-left:auto}
  .projection #classroomPosition{font-size:14px;white-space:nowrap;min-width:110px;text-align:center}
  .projection #classroomExit{margin-left:8px}
  .projection .score-paper{flex:1;min-height:0;display:flex;flex-direction:column;padding:0;border:0;box-shadow:none;border-radius:0}
  .projection .score-title{flex:0 0 auto;align-items:center;gap:12px;margin:0 6px 2px;min-width:0;min-height:44px}
  .projection .score-title>div{flex:1;min-width:0}
  .projection #classroomControls{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:44px;padding:8px 12px;font-size:14px;white-space:nowrap}
  .projection #classroomControls[hidden]{display:none}
  .projection .score-title h2{font-size:18px;line-height:1.2;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .projection #pieceSubtitle,.projection #pieceEdition{display:none}
  .projection #score{flex:1;min-height:0;overflow:hidden}
  .projection .score-page{display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;margin:0}
  .projection .score-page[hidden]{display:none!important}
  .projection .score-svg{width:100%;height:100%;min-width:0;max-width:100%;max-height:100%}
}
@media screen and (max-width:600px){.projection .transport{gap:6px;padding:7px}.projection #classroomPager{justify-content:space-between;width:100%;gap:5px}.projection #classroomExit{margin-left:auto;font-size:12px;padding:8px}.projection .score-title h2{font-size:17px}}
@media print{#classroomPager,#classroomControls{display:none!important}}
