/* Shared school palette. Illustrated course canvases retain their original artwork. */
:root{--school-navy:#0c2035;--school-panel:#142d42;--school-wood:#38271f;--school-brass:#b89a60;--school-gold:#ead29a;--school-ink:#f2e7d0;--school-muted:#c3c0b2;--school-paper:#efe3c8;--school-edge:1px solid #8a744d;color-scheme:dark}
html{overflow-x:hidden}body{margin:0}*{box-sizing:border-box}
html:not(.school-signed-in) .side-dock-right{display:none!important}
html:not(.school-signed-in) .utility-panel[data-side=right]{display:none!important}
.side-dock-right[hidden]{display:none!important}
.school-signin{color:var(--school-gold);background:var(--school-navy);border:var(--school-edge);border-radius:8px;padding:10px;text-align:center;text-decoration:none;font:600 14px/1.3 Georgia,serif}
.school-signed-in .school-signin{display:none}
:is(.note-lab,.encyclopedia-host,.encyclopedia-app,.reading,.reading-reference,.graded-course,.rhythm-school,.subscription-page,.utility-panel){color:var(--school-ink);font-family:Georgia,'Times New Roman',serif}
:is(.reading,.graded-course,.rhythm-school){max-width:1180px;width:100%;margin:0 auto;padding:clamp(12px,2vw,24px);background:linear-gradient(135deg,#142e45,#091a2c);border:var(--school-edge);border-radius:14px}
:is(.reading,.graded-course,.rhythm-school,.reading-reference) :is(h1,h2,h3,h4){color:var(--school-gold);line-height:1.2;overflow-wrap:break-word}
:is(.reading,.graded-course,.rhythm-school,.reading-reference) p{color:var(--school-ink);line-height:1.55;max-width:90ch}
:is(.reading,.graded-course,.rhythm-school,.reading-reference,.unlock-month-dialog) label{color:var(--school-gold);font:500 15px/1.4 Georgia,serif;min-width:0}
:is(.reading,.graded-course,.rhythm-school,.reading-reference,.unlock-month-dialog,.piano-tool-fold,.lab-settings-dialog) :is(button,select,input:not([type=range]):not([type=checkbox])){min-height:42px;border:var(--school-edge);border-radius:8px;color:var(--school-ink);background:linear-gradient(#264057,#112738);font:600 15px/1.3 Georgia,serif;padding:8px 12px;max-width:100%}
:is(.reading,.graded-course,.rhythm-school,.reading-reference,.unlock-month-dialog) button:hover:not(:disabled){border-color:#edcf8a;background:#355168}
:is(.reading,.graded-course,.rhythm-school) button:disabled{opacity:.55;cursor:not-allowed}
:is(.reading,.graded-course,.rhythm-school,.reading-reference) a{color:#edcf8a}
:is(.reading,.graded-course,.rhythm-school,.reading-reference,.unlock-month-dialog) :focus-visible{outline:3px solid #edcf8a;outline-offset:3px}
.course-lessons,.reading-lessons{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:12px}
.course-lessons article,.reading-lessons article{min-width:0;padding:16px;border:var(--school-edge);border-radius:12px;background:linear-gradient(140deg,#22394c,#12283a);color:var(--school-ink);box-shadow:0 5px 14px #0003}
.course-lessons article :is(h2,h3),.reading-lessons h3{font-size:19px;margin:0 0 10px;color:var(--school-gold)}
.course-toolbar{background:#302b24;color:var(--school-ink);border:var(--school-edge)}
.course-selectors select,.reading-controls select{background:#152e43;color:var(--school-ink);border:var(--school-edge)}
.reading-controls{align-items:end;gap:12px}.reading header{align-items:center;flex-wrap:wrap}.reading header h2{margin:0}
.reading-stage{background:var(--school-paper);color:#182a3d;border:var(--school-edge);border-radius:12px;overflow:hidden;max-width:100%}
.reading-stage svg{display:block;width:100%;height:clamp(180px,30vh,280px);object-fit:contain}
.reading-reference .theory-score>div{max-height:none;overflow:visible}.reading-reference .theory-score svg{max-height:180px;width:100%;height:auto;display:block}.reading-reference .theory-score{background:var(--school-paper);border:var(--school-edge);overflow:visible}
.reading-reference .theory-score figcaption,.reading-reference .theory-symbols figcaption,.reading-reference .theory-symbols p{color:#25394a}
.reading-reference .theory-symbols figure{background:var(--school-paper);border:var(--school-edge)}
.reading-reference summary{background:#20384b!important;border:var(--school-edge);color:var(--school-gold)}
.piano-shell{gap:10px;justify-content:flex-start}.piano-heading{position:static;align-items:center;flex-wrap:wrap}.piano-heading>div:first-child{flex:1 1 240px}.piano-actions{align-items:center;gap:10px;flex-wrap:wrap}
.piano-master-volume{display:grid;grid-template-columns:1fr auto;gap:4px 10px;min-width:160px;font:600 14px Georgia,serif;color:var(--school-gold)}.piano-master-volume input{grid-column:1/-1;width:100%;accent-color:var(--school-brass)}
.piano-shell .piano-scroll{height:clamp(200px,32dvh,310px);flex:none}.piano-shell.has-staff .piano-scroll{height:clamp(180px,26dvh,250px)}
.piano-switches{align-items:start;gap:10px}.piano-label-switch{align-self:start;min-height:52px;height:auto}.piano-octaves{align-items:center;flex:none}.piano-octaves>button{min-height:40px;height:auto}
.piano-tool-fold{border:var(--school-edge);background:linear-gradient(#23374a,#12293c)}.piano-tool-fold>summary{color:var(--school-gold);font:700 17px Georgia,serif}.piano-control-panels>.piano-tool-fold>section{padding:14px;background:transparent;border:0;color:var(--school-ink)}
.piano-tool-fold>section header{position:static}.piano-tool-fold :is(h3,strong){color:var(--school-gold)}.piano-tool-fold .dynamic-levels button[aria-pressed=true]{background:#b59a62;color:#122438}.piano-tool-fold input[type=range]{accent-color:var(--school-brass)}
.piano-key.black .piano-key-name{font-size:12px;letter-spacing:0;line-height:1.3;white-space:nowrap}
.unlock-month-dialog{max-width:min(460px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:24px;border:2px solid var(--school-brass);border-radius:16px;background:linear-gradient(135deg,#223b51,#0c2035);color:var(--school-ink);box-shadow:0 24px 90px #0009}.unlock-month-dialog::backdrop{background:#030b17bd}.unlock-month-dialog h2{margin:0;color:var(--school-gold);font:700 28px Georgia,serif}.unlock-month-dialog form{display:flex;flex-wrap:wrap;gap:16px}.unlock-month-dialog :is(h2,p,label){width:100%;margin:0}.unlock-month-dialog label{display:grid;gap:8px}.unlock-month-dialog input{width:100%}.unlock-month-dialog [data-message]{color:#ffd2b7}.school-button{color:var(--school-gold)}
.rhythm-root{height:100dvh;overflow:auto;padding:clamp(8px,2vw,24px);background:#08192b}.rhythm-school header{display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap}.rhythm-school h1{font-size:clamp(26px,4vw,40px);margin:4px 0 18px}.rhythm-score{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.rhythm-score svg{display:block;width:100%;max-height:180px;background:var(--school-paper);color:#182d3b;border:var(--school-edge);border-radius:12px}.rhythm-actions{display:flex;flex-wrap:wrap;gap:8px}.rhythm-school progress{display:block;width:100%;height:14px;margin:12px 0;accent-color:var(--school-brass)}.rhythm-school .rhythm-tap{display:block;width:100%;min-height:90px;background:linear-gradient(#76573a,#39291f);font-size:22px;border:2px solid var(--school-brass);touch-action:manipulation}.rhythm-school details{margin-top:16px}.rhythm-school summary{cursor:pointer;padding:12px 0}
.encyclopedia-host :is(.encyclopedia-content,.encyclopedia-detail,.encyclopedia-article){min-width:0;max-width:100%}.encyclopedia-host :is(button,select){border-color:var(--school-brass)}
@media(max-width:700px){.rhythm-score{grid-template-columns:1fr}.rhythm-actions button{flex:1 1 130px}.piano-heading h2{font-size:20px}.piano-actions{width:100%}.piano-master-volume{flex:1}.piano-control-panels{grid-template-columns:1fr!important}.reading-reference .theory-score svg{max-height:160px}.course-selectors{align-items:stretch}.course-selectors label{flex:1 1 140px}.course-lessons,.reading-lessons{grid-template-columns:1fr}.rhythm-school .rhythm-tap{min-height:74px}}
@media(prefers-reduced-motion:reduce){.rhythm-tap,.piano-key-name{transition:none}}
/* Shared surfaces across all fifteen encyclopedia sections and Note Lab modes. */
.encyclopedia-app.encyclopedia-app,.note-lab.note-lab{background:radial-gradient(ellipse at top,#253a4c,transparent 65%),var(--school-navy);color:var(--school-ink)}
.encyclopedia-app :is(.ency-header,.ency-main,.ency-category-rail,.ency-category-page>header,.ency-intro),.note-lab :is(.lab-header,.lab-workspace,.exercise-heading){background:linear-gradient(135deg,#1d3346,#102336);border-color:var(--school-brass)}
.encyclopedia-app :is(.ency-card,.dictionary-card,.dictionary-detail,.composer-card,.composer-profile,.guide-card,.guide-detail,.reference-stage,.reference-library,.theory-reference article){background:linear-gradient(145deg,#24394a,#102638);border-color:var(--school-brass);color:var(--school-ink)}
.encyclopedia-app :is(.ency-card>b,.ency-category-rail button b){color:var(--school-navy);background:linear-gradient(#f0deae,#b99759);border-color:var(--school-brass)}
.encyclopedia-app :is(.ency-brand small,.ency-intro small,.ency-category-page header small,.dictionary-tools label,.reference-controls label,.reference-library label,.guide-detail>section b),.note-lab :is(.lab-brand small,.exercise-heading small,.reverse-prompt small,.placement-prompt small){color:var(--school-gold)}
.encyclopedia-app :is(.ency-card small,.ency-intro p,.ency-category-page header p,.dictionary-detail p,.guide-detail p){color:var(--school-ink);line-height:1.5}
.encyclopedia-app :is(.ency-category-rail button,.reference-controls select,.dictionary-tools select,.dictionary-tools input,.reference-library input){background:#182e40;color:var(--school-ink);border-color:var(--school-brass)}
.encyclopedia-app .ency-category-rail button.is-active{background:#4a3b28;border-color:var(--school-gold);box-shadow:inset 3px 0 var(--school-gold)}
.encyclopedia-app :is(.reference-staff,.theory-reference [data-staff],.theory-reference [data-signs]),.note-lab :is(.notation-card,.placement-card){background:var(--school-paper);border-color:var(--school-brass)}
.note-lab :is(.lab-mode-tabs>button,.lab-score>span,.exercise-settings-summary span,.exercise-feedback){background:#182f42;border-color:var(--school-brass);color:var(--school-ink)}
.note-lab .lab-mode-tabs>button.is-active{background:linear-gradient(#eddaa7,#bd9d62);color:var(--school-navy)}
.note-lab .lab-mode-tabs>button>b{color:var(--school-gold)}
.note-lab .lab-mode-tabs>button.is-active>b{color:var(--school-navy)}
.note-lab .exercise-content{align-items:start;grid-template-columns:minmax(0,.9fr) minmax(0,1.2fr)}
.note-lab .question-panel{grid-template-rows:auto auto auto;align-content:start}.note-lab .notation-card.large{height:clamp(180px,32vh,290px)}
.note-lab .answer-grid>button{min-height:64px}.note-lab .answer-panel{align-content:start}.note-lab .exercise-shell{min-height:0;grid-template-rows:auto auto}
.note-lab .lab-metronome button,.note-lab .lab-dynamics button{background:#243b4d;color:var(--school-ink);border-color:var(--school-brass)}
.note-lab .dynamic-levels button[aria-pressed=true]{background:var(--school-gold);color:var(--school-navy)}
.encyclopedia-app :is(.dictionary-detail,.composer-profile,.guide-detail){overflow-wrap:anywhere}
@media(max-width:700px){.note-lab .exercise-content{grid-template-columns:minmax(0,1fr)}.note-lab .exercise-heading{align-items:start;flex-wrap:wrap}.note-lab .exercise-settings-summary{flex-wrap:wrap}.encyclopedia-app .ency-brand strong{white-space:normal;line-height:1.15}.encyclopedia-app .ency-header{grid-template-columns:auto minmax(0,1fr)}.encyclopedia-app .ency-count{display:none}.encyclopedia-app .ency-category{grid-template-columns:minmax(0,1fr)}.encyclopedia-app .ency-category-rail{flex-direction:row;max-width:100%;border-right:0;border-bottom:var(--school-edge)}.encyclopedia-app .ency-category-rail button{flex:none}.encyclopedia-app .dictionary-workspace,.encyclopedia-app .composer-workspace,.encyclopedia-app .guide-workspace{height:auto;grid-template-columns:minmax(0,1fr);overflow:visible}.encyclopedia-app :is(.dictionary-app,.composers-app,.instrument-guide-app){height:auto;display:block}.encyclopedia-app :is(.dictionary-list,.composer-list,.guide-list){max-height:220px;margin-block:12px}.encyclopedia-app :is(.dictionary-detail,.composer-profile,.guide-detail){max-height:none}.encyclopedia-app .ency-content{overflow:auto}.note-lab .notation-card.large{height:220px}}
/* 4.0.0: one layout in both piano states; only key height changes. */
.note-lab .lab-workspace.mode-piano{overflow-y:scroll;scrollbar-gutter:stable;overflow-anchor:none}
.note-lab .piano-shell,.note-lab .piano-shell.has-staff{display:flex!important;flex-direction:column;align-items:stretch;width:100%;min-width:0;height:auto!important;min-height:100%;gap:10px;overflow:visible}
.note-lab .piano-shell>*{flex-shrink:0;min-width:0;max-width:100%}
.note-lab .piano-shell .piano-heading{display:flex;position:relative;z-index:2;min-height:70px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.note-lab .piano-shell .piano-heading h2{font-size:1.15rem}.note-lab .piano-actions{position:relative;z-index:2;display:flex;flex:0 1 auto;gap:10px;align-items:center;flex-wrap:wrap}
.note-lab .piano-master-volume{flex:0 0 170px;position:relative;z-index:1;min-width:170px}.note-lab .piano-actions button{flex:0 0 auto}
.note-lab .piano-shell .piano-scroll{width:100%;height:clamp(210px,32dvh,310px)!important;min-height:0!important;flex:none}
.note-lab .piano-shell.has-staff .piano-scroll{height:clamp(140px,21dvh,200px)!important}
.note-lab .piano-keyboard{height:100%;min-height:0}.note-lab .piano-shell .piano-notation-readout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;margin:0;height:170px;align-self:stretch}
.note-lab .piano-notation-readout:has(>article:only-child){grid-template-columns:1fr}.note-lab .piano-notation-readout>article{min-width:0;margin:0;background:#ece1c7;color:#183441;text-align:center}
.note-lab .piano-notation-readout h3{margin:6px 8px;line-height:1.3;font-size:14px}.note-lab .piano-notation-readout .notation-surface{height:136px!important}.note-lab .piano-notation-readout svg{width:100%!important;height:136px!important;min-width:0}
.note-lab .piano-label-switch small{display:block}.note-lab .piano-label-switch{padding:10px}.note-lab .metro-meter{line-height:1.2;gap:3px;min-width:34px}.note-lab .metro-meter b:first-child{padding-bottom:5px}
.school-signin{position:fixed;right:max(12px,env(safe-area-inset-right));top:50%;transform:translateY(-50%);z-index:65;max-width:90px;box-shadow:0 4px 16px #0005}
/* Warm parchment matches the Reading Sheets examples. */
.note-lab :is(.course-lessons,.reading-lessons,.rhythm-topic-grid)>article{display:grid;grid-template-rows:minmax(3.1em,auto) auto 1fr auto;align-content:start;gap:10px;background:#ece1c7;color:#183441;text-align:center;border:1px solid #967f51;box-shadow:0 4px 10px #0003}
.note-lab :is(.course-lessons,.reading-lessons)>article :is(h2,h3,p,small){color:#183441;text-align:center;margin:0}
.note-lab :is(.course-lessons,.reading-lessons)>article>button{align-self:end;grid-row:4}.note-lab .reading-lessons>article>details{grid-row:5;margin:0;padding:0;min-width:0}.note-lab .reading-lessons summary{white-space:normal;line-height:1.4}.note-lab .reading-lessons select{width:100%}
.note-lab .answer-grid>button:not(.is-correct):not(.is-wrong){background:#ece1c7;color:#183441;border:1px solid #967f51;text-align:center;box-shadow:inset 0 1px #fff7,0 4px 10px #0003}
.note-lab :is(.question-kicker,.octave-clue,.exercise-heading p){color:#f0dfb6}.note-lab .reading-controls{display:flex;position:static;flex-wrap:wrap;gap:12px;align-items:end;justify-content:flex-start}
.note-lab .reading-controls>label{display:grid;gap:5px;flex:0 1 auto;min-width:120px;max-width:100%}.note-lab .reading-controls>label:has(input[type=checkbox]){display:flex;align-items:center;min-height:44px;min-width:100px}
.note-lab .reading-answers{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;clear:both}.note-lab .reading-answers button{min-width:0;padding:8px 3px;background:#ece1c7;color:#183441}.note-lab .reading-stage{min-height:180px;position:relative;clear:both;margin:14px 0}.note-lab .reading-stage svg{height:220px;max-height:none}
.reading-reference :is(.theory-score figcaption,.theory-symbols figure,h2,h3,p){text-align:center}.reading-reference .theory-score figcaption{color:#183441}
.encyclopedia-app .music-reference{height:auto;min-height:0;align-content:start;gap:10px}.encyclopedia-app .reference-stage{height:auto;grid-template-rows:auto auto auto auto auto;align-content:start;gap:8px}
.encyclopedia-app .reference-title{display:flex;align-items:baseline;justify-content:center;flex-wrap:wrap;gap:8px 14px;padding:0;text-align:center}.encyclopedia-app .reference-title small{flex-basis:100%}.encyclopedia-app .reference-title h2,.encyclopedia-app .reference-title p{margin:0}.encyclopedia-app .reference-title p{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 14px;justify-content:center}.encyclopedia-app .reference-title p span{display:inline}
.encyclopedia-app .reference-staff{height:170px;min-height:0;margin:0;background:#ece1c7}.encyclopedia-app .reference-staff svg{height:170px}.encyclopedia-app .reference-piano-frame{height:165px;min-height:165px;margin:0}
@media(max-width:650px){.note-lab .piano-shell .piano-heading{gap:8px}.note-lab .piano-actions{width:100%}.note-lab .piano-master-volume{flex:1 1 160px}.note-lab .piano-shell .piano-notation-readout{height:150px}.note-lab .piano-notation-readout .notation-surface,.note-lab .piano-notation-readout svg{height:118px!important}.note-lab .reading-answers{gap:4px}.note-lab .reading-answers button{font-size:15px}.school-signin{top:auto;bottom:12px;transform:none}.note-lab .reading-controls>label{flex:1 1 130px}.note-lab .reading-stage svg{height:190px}}
.rhythm-topic-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr));gap:14px}.rhythm-topic-grid article,.foundation-school .course-lessons article{display:flex;flex-direction:column;gap:12px;background:#ece1c7;color:#183441;text-align:center;padding:18px;border:1px solid #967f51;border-radius:14px;min-width:0}.foundation-school :is(.rhythm-topic-grid,.course-lessons) :is(h2,h3,p){color:#183441;margin:0;text-align:center}.rhythm-topic-grid h2{font-size:21px;line-height:1.3;min-height:2.6em}.rhythm-mode-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:auto}.rhythm-mode-buttons button{font-size:13px;padding:10px 5px;overflow-wrap:normal}.foundation-school .course-lessons button{margin-top:auto}.rhythm-bar{min-width:0;overflow-x:auto;background:#ece1c7;border:1px solid #967f51;border-radius:10px}.rhythm-bar svg{display:block;width:100%;height:180px;color:#183441}.rhythm-ear-options{display:grid;gap:12px}.rhythm-ear-options>button{display:block;width:100%;text-align:center;min-width:0}.rhythm-ear-options>button.is-correct{outline:3px solid #81bd90}.rhythm-ear-options>button:disabled{opacity:1}.rhythm-hidden-score{padding:35px 15px;text-align:center;color:#ead6a4;border:1px dashed #b69a60;border-radius:12px}.foundation-school .rhythm-explanation{text-align:center;margin-inline:auto}

/* Rhythm dictation and performance feedback. */
.foundation-school .rhythm-entry{display:grid;gap:12px;padding:16px;border:1px solid #bca77b;border-radius:16px;background:#ece1c7;color:#183441}
.foundation-school .rhythm-entry [data-duration-buttons]{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.foundation-school .rhythm-entry button{min-height:44px;color:#183441;background:#fff7e4;border:1px solid #a79169;border-radius:10px;padding:9px 14px}
.foundation-school .rhythm-count{height:52px;text-align:center;font-size:40px;line-height:52px;font-weight:700;color:#86601d}
.foundation-school [data-rhythm-onset].is-playing{opacity:.4}
.foundation-school .rhythm-bar svg{color:#183441}

.course-lessons>article,.reading-lessons>article{background:#ece1c7;color:#183441;text-align:center}
.course-lessons>article :is(h2,h3,p),.reading-lessons>article :is(h2,h3,p){color:#183441;text-align:center}
.quiz-choices>button:not(.is-correct):not(.is-wrong){background:#ece1c7;color:#183441;border:1px solid #967f51;text-align:center}
.foundation-school .rhythm-entry label,.foundation-school .rhythm-entry p{color:#183441;text-align:center}

.note-lab .answer-grid>button:not(.is-correct):not(.is-wrong) :is(b,span,small){color:#183441}

/* Reading comfort — shared educational cards, stage 1. */
#app :is(.note-lab,.encyclopedia-app){--calm-bg:#192d3a;--calm-panel:#243e4b;--calm-card:#2d4854;--calm-text:#e6e5dc;--calm-muted:#c0cdd0;--calm-line:#78929a;--calm-paper:#becac4;--calm-ink:#172e38;font-family:'Segoe UI',Verdana,Arial,sans-serif}
#app .note-lab.note-lab,#app .encyclopedia-app.encyclopedia-app{background:var(--calm-bg);color:var(--calm-text)}
#app .note-lab:before{opacity:0}
#app :is(.note-lab,.encyclopedia-app) :is(.lab-header,.lab-workspace,.exercise-heading,.ency-header,.ency-main,.ency-category-rail){background:var(--calm-bg);border-color:#617a84;box-shadow:none}
#app .note-lab :is(.graded-course,.reading407,.reading,.rhythm-school){background:var(--calm-panel);color:var(--calm-text);border-color:#617a84;font-family:'Segoe UI',Verdana,Arial,sans-serif}
#app .note-lab :is(.graded-course,.reading407,.exercise-shell,.reading,.rhythm-school) :is(h2,h3,h4,p,small,label,button,input,select,summary,a){font-family:'Segoe UI',Verdana,Arial,sans-serif;text-shadow:none}
#app .note-lab :is(.graded-course,.reading407,.exercise-shell,.reading,.rhythm-school) :is(h2,h3,h4){color:var(--calm-text);line-height:1.4;font-weight:650}
#app .note-lab :is(.graded-course,.reading407,.reading,.rhythm-school)>h2{font-size:clamp(23px,2.5vw,30px)}
#app .note-lab :is(.course-lessons,.reading-lessons,.rhythm-topic-grid)>article{display:flex;flex-direction:column;align-items:stretch;gap:14px;background:var(--calm-card);color:var(--calm-text);border:1px solid var(--calm-line);border-radius:18px;padding:22px 20px;box-shadow:0 4px 12px #0002;text-align:center}
#app .note-lab :is(.course-lessons,.reading-lessons,.rhythm-topic-grid)>article h3{margin:0;color:var(--calm-text);font-size:clamp(18px,1.6vw,22px);font-weight:650;line-height:1.45;overflow-wrap:anywhere}
#app .note-lab :is(.course-lessons,.reading-lessons,.rhythm-topic-grid)>article p{margin:0;color:var(--calm-muted);font-size:16px;line-height:1.55}
#app .note-lab .course-lessons>article>button{align-self:center;justify-self:center;float:none;display:block;margin: auto auto 0;width:72%;min-width:140px;max-width:260px;min-height:46px;border-radius:12px;padding:11px 20px;background:#b9cec9;color:#172e38;border:1px solid #b9cec9;font:650 17px/1.4 'Segoe UI',Verdana,Arial,sans-serif;box-shadow:none}
#app .note-lab .course-lessons>article>button:hover:not(:disabled){background:#cbdad5;color:#172e38;border-color:#cbdad5}
#app .note-lab :is(.fixed404-intro,.fixed404-results,.fixed404-unlock,.fixed404-review details,.reading407-review li){background:var(--calm-card);color:var(--calm-text);border:1px solid var(--calm-line);box-shadow:none}
#app .note-lab .fixed404-intro{max-width:880px;padding:clamp(20px,3vw,36px)}
#app .note-lab .fixed404-intro :is(p,li){font-size:17px;line-height:1.75;max-width:68ch;color:var(--calm-text)}
#app .note-lab .fixed404-intro h3{font-size:clamp(24px,2.8vw,32px);margin:12px 0 18px}
#app .note-lab .fixed404-intro h4{font-size:19px;margin:24px 0 10px}
#app .note-lab .fixed404-intro>small{font-size:12px;letter-spacing:.07em;line-height:1.6;color:var(--calm-muted)}
#app .note-lab .fixed404-intro .paragraph-id{font-size:13px;color:var(--calm-muted)}
#app .note-lab :is(.graded-course,.reading407,.fixed404-results,.fixed404-unlock) a{color:#d2e6df;text-decoration:underline;text-underline-offset:4px}
#app .note-lab :is(.course-toolbar,.fixed404-score,.exercise-feedback){background:var(--calm-panel);border:1px solid var(--calm-line);color:var(--calm-text);box-shadow:none}
#app .note-lab :is(.course-toolbar,.fixed404-score) :is(span,b,small){color:var(--calm-text)}
#app .note-lab :is(.fixed404-intro li,.reverse-prompt,.placement-prompt){background:var(--calm-card);border-color:var(--calm-line);color:var(--calm-text);box-shadow:none}
#app .note-lab :is(.reverse-prompt,.placement-prompt) :is(p,h3,small,strong){color:var(--calm-text)}
#app .note-lab :is(.graded-course,.reading407,.course-toolbar) :is(button,select,input:not([type=range]):not([type=checkbox])){background:#345663;color:#e6e5dc;border:1px solid #78929a;border-radius:10px;min-height:44px;padding:10px 16px;font-size:16px;line-height:1.4;box-shadow:none}
#app .note-lab :is(.graded-course,.reading407) option{background:#243e4b;color:#e6e5dc}
#app .note-lab .fixed404-intro [data-start-exercises]{display:block;margin:24px auto 0;min-width:190px;background:#b9cec9;color:#172e38;border-color:#b9cec9}
#app .note-lab :is(.notation-card,.notation-answers>button,.reading407-stage,.symbol-score407){background:var(--calm-paper);color:var(--calm-ink);border-color:#78929a;box-shadow:none}
#app .note-lab .reading407 :is(p,small,label,figcaption,dt,dd){color:var(--calm-text)}
#app .note-lab .reading407-count{color:#172e38}
#app .note-lab :is(.reading407-stars,.fixed404-results .achievement-stars){color:#e5cc95}
#app .note-lab .reading407-review li.is-wrong{border-color:#d99b94}
#app .note-lab .answer-grid>button:not(.is-correct):not(.is-wrong){background:var(--calm-paper);color:var(--calm-ink);border-color:#78929a;box-shadow:none}
#app .note-lab .answer-grid>button.is-correct{background:#afcbbd;color:#17372b;border-color:#5d997b;box-shadow:none}
#app .note-lab .answer-grid>button.is-wrong{background:#d4b8b3;color:#512c2b;border-color:#b17974;box-shadow:none}
#app .note-lab .exercise-feedback span{color:var(--calm-muted)}
#app .note-lab .exercise-feedback span.success{color:#b9e2c7}#app .note-lab .exercise-feedback span.error{color:#f1b9b2}
#app .note-lab .lab-mode-tabs>button{background:#243e4b;color:#e6e5dc;border-color:#617a84;box-shadow:none}
#app .note-lab .lab-mode-tabs>button.is-active{background:#b9cec9;color:#172e38;border-color:#b9cec9;box-shadow:none}
#app .note-lab .lab-mode-tabs>button small{color:#c0cdd0}#app .note-lab .lab-mode-tabs>button.is-active :is(small,b){color:#172e38}
#app .encyclopedia-app :is(.ency-card,.dictionary-card,.dictionary-detail,.composer-card,.composer-profile,.guide-card,.guide-detail,.theory-reference article){background:var(--calm-card);color:var(--calm-text);border-color:var(--calm-line);box-shadow:none}
#app .encyclopedia-app :is(.ency-card,.dictionary-card,.composer-card,.guide-card) :is(h2,h3,p,small,strong){font-family:'Segoe UI',Verdana,Arial,sans-serif;color:var(--calm-text);line-height:1.5;text-shadow:none}
#app .note-lab :is(.graded-course,.reading407,.exercise-shell) :is(button,a,input,select):focus-visible{outline:3px solid #e5cc95;outline-offset:3px}
#app .note-lab .graded-course .course-lessons>article>button{background:#b9cec9;color:#172e38;border-color:#b9cec9;margin:auto auto 0;align-self:center;justify-self:center;width:72%;min-width:140px;max-width:260px;min-height:46px;font-size:17px}
#app .note-lab .graded-course .course-lessons>article>button:hover:not(:disabled){background:#cbdad5;color:#172e38}
#app .note-lab .typed-pitch407{color:var(--calm-text)}
#app .note-lab .typed-pitch407 small{color:var(--calm-muted)}
#app .note-lab .typed-pitch407 input{background:#243e4b;color:#e6e5dc;border-color:#78929a}
#app .note-lab .rhythm407-panel{background:#2d4854!important;color:#e6e5dc!important}
#app .note-lab .rhythm407-panel [data-score]{background:#becac4;color:#172e38;border-radius:14px}

/* Stage 2: contained notation is centred without altering staff coordinates. */
#app .note-lab .reading407-stage{display:flex;align-items:center;justify-content:center;height:clamp(185px,26vh,260px);min-height:185px}
#app .note-lab .reading407-stage>svg{display:block;width:100%;height:100%;max-height:100%;margin:0;position:static;transform:none}
#app .note-lab .notation-answers>button>span{display:flex;align-items:center;justify-content:center}
#app .note-lab .notation-answers .notation-surface{display:flex;align-items:center;justify-content:center}
#app .note-lab .notation-answers .notation-surface>svg{display:block;width:100%;height:100%;margin:0;position:static;transform:none}
#app .note-lab .reading407 [data-practice-octave],#app .note-lab .reading407 [data-octave]{min-width:115px}
