/* Self-hosted fonts keep classroom devices independent of installed PC fonts. */
@font-face{font-family:Forest UI;src:url('assets/fonts/SUIT-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:Forest UI;src:url('assets/fonts/SUIT-Bold.woff2') format('woff2');font-weight:700 900;font-display:swap}
@font-face{font-family:Forest Story;src:url('assets/fonts/NanumMyeongjo-Bold.woff2') format('woff2');font-weight:700;font-display:swap}
:root{font-family:'Forest UI','Malgun Gothic',sans-serif;--ink:#263f35;--muted:#526458;--line:#bfc9b9}
body{line-height:1.5}
.brand{letter-spacing:-.025em;line-height:1.3}
.brand>span:last-child,.forest-card h1,.library-head h1,.home .intro h1{font-family:'Forest Story','Malgun Gothic',serif;font-weight:700}
.brand small{font-family:'Forest UI','Malgun Gothic',sans-serif;font-weight:400;letter-spacing:0;line-height:1.5}
body.forest-mode header{background:#f6faefe8;border-bottom:1px solid #52674730}
body.forest-mode:not(.forest-cinema) .workspace{background:#fbfcf3f5;border:1px solid #bfc9b9;box-shadow:0 8px 24px #183d2826}
.forest-settings summary{color:#263f35;background:#f8fbf0f5;border-color:#758c6b;box-shadow:0 2px 8px #173d2820}
.forest-settings-panel{background:#fbfcf3fa;border:1px solid #bfc9b9}
.forest-map-choice select{background:#f5f8ed;border-color:#95a88a;font-weight:700;line-height:1.4}
.view-bar{padding:8px 0;border-bottom:1px solid #cbd3c4}
.group-btn{font-weight:800;letter-spacing:-.025em}
.quick-listen button{font-size:15px;background:#f9fcf4;border-color:#829780;color:#294b39}
.quick-listen button.primary{background:#345a48;color:white}
.palette,.keyboard-panel{border-color:#bdc9b7;background:#fbfcf7;box-shadow:none}
.duration-group,.header-actions{gap:8px}
.duration-group button{min-height:48px}
.key b{font-size:21px;font-weight:800}.key small{font-weight:400}
.keyboard-panel .free-choice{padding:8px 4px;line-height:1.45}
.library-note,.library-empty{line-height:1.65;color:#526458}
.library-current{background:#f4f8ec;border-color:#bdc9b7}
:where(button,input,select,summary,a,[tabindex]):focus-visible{outline:3px solid #285ac3;outline-offset:3px}
@media(max-width:600px){
 .brand>span:last-child{font-size:18px}.brand small{font-size:12px}
 .quick-listen button{font-size:14px;min-height:48px}
 .forest-settings{max-width:min(340px,calc(100vw - 32px))}
 .forest-map-choice select{font-size:16px}
}
@media print{body.forest-mode:not(.forest-cinema) .workspace{background:white;box-shadow:none}}

/* A quiet forest notebook: leaf-green cues, clear white notation paper. */
:root{--blue:#35644f}
.brand{gap:11px}
.brand .brand-mark{width:48px;height:52px;border-radius:22px 22px 12px 12px;background:#284d3d;color:#fff9e8;box-shadow:inset 0 0 0 1px #ffffff24}
.brand-mark svg{width:38px;height:38px}
.brand>span:last-child{font-size:21px;letter-spacing:-.045em}
.brand small{font-size:11px;color:#596c5d;margin-top:5px;letter-spacing:.01em}
body.forest-mode:not(.forest-cinema) .workspace{background:#f8faf3f5;border-color:#ced7c6;border-radius:24px 24px 0 0}
.forest-bar{padding-bottom:4px}
.forest-map-choice select{border-radius:12px;background:#f4f7ee;border-color:#c2ceba}
.view-bar{border-bottom:0;gap:10px;padding:8px 0 12px}
.group-btn{border-radius:10px;background:#f4f7ee;border-color:#c4cebe}
.quick-listen button{border-radius:10px}
.score-book{border-radius:14px;border-color:#c6d0bf;box-shadow:0 3px 0 #dce4d4;overflow:hidden}
.sheet .bar-bg.active,.sheet .active .bar-bg{fill:#edf4e7}
.sheet .chord-label{fill:#35644f}.sheet .bar-label{fill:#48604f}
.sheet .chord-guide{fill:#73975d;fill-opacity:.12}.sheet .guide-dot{fill:#5d8451}
.sheet .staff-line{stroke:#8c9d8c}.sheet .bar-line{stroke:#687d69}
.palette{border-radius:12px;background:#f5f8ef;border-color:#d0d9c8}
.duration-group button{background:#edf2e7;border-color:#c4d0bb;border-radius:9px}
.duration-group button.active{background:#35644f;border-color:#35644f;color:white}
.duration-group button:hover:not(:disabled){background:#dde9d3;border-color:#8ba47b}
.duration-group button.active:hover:not(:disabled){background:#294e3e}
.keyboard-panel{border-radius:12px}
@media(max-width:600px){.brand>span:last-child{font-size:18px}.brand small{font-size:10px}.brand .brand-mark{width:40px;height:44px}.brand-mark svg{width:32px;height:32px}}
.duration-group button[aria-pressed=true],.duration-group button[aria-pressed=true]:hover:not(:disabled){background:#35644f;border-color:#35644f;color:white}

.presentation{min-height:75vh;background:#f8faf3f5;border-radius:20px;margin-top:24px;padding:24px;}
.presentation .work-list li.is-playing{border-color:#35644f;background:#e8f2df}
.presentation .work-list small{overflow-wrap:anywhere}.presentation .work-list li>div{min-width:0}
.presentation-errors{margin:16px 0;color:#7a391f;overflow-wrap:anywhere}
.dialog input[name=title]{display:block;width:100%;min-height:48px;margin:12px 0;padding:10px;border:1px solid #a6b99c;border-radius:8px}
@media(max-width:600px){.head-actions{gap:5px}.head-actions button{font-size:12px;padding:8px;min-height:44px}.presentation{padding:16px;margin-top:12px}.presentation .work-list li{gap:10px}}

.measure-select{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:10px 14px 8px 6%;border-bottom:1px solid #e3eadd;background:#fafcf7}
.measure-select button{min-width:0;min-height:44px;background:#f0f5e9;border-color:#c7d5bd;color:#36533d;border-radius:8px;font-size:15px}
.measure-select button span{margin-left:8px;font-weight:400}
.measure-select button[aria-pressed=true]{background:#35644f;border-color:#35644f;color:white}
@media(max-width:600px){.measure-select{padding:8px;gap:4px}.measure-select button{font-size:13px;padding:8px 3px}.measure-select button span{margin-left:3px}}

.classroom{background:#f8faf3f5;border-radius:20px;margin-top:24px;padding:24px;min-height:70vh}
.classroom-tabs,.classroom-rooms{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.classroom form{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:20px 0}.classroom form label{display:grid;gap:8px;max-width:100%;flex:1;min-width:180px}.classroom input{width:100%;min-height:48px;border:1px solid #a5ba99;border-radius:8px;padding:10px;background:white}.classroom form p{flex-basis:100%}
.classroom-current{border-top:1px solid #bacab0;margin-top:20px;padding-top:20px}.classroom-code{font-size:26px;letter-spacing:.12em;color:#345a48}.classroom-error{background:#fff0db;border-left:4px solid #916427;padding:12px;overflow-wrap:anywhere}.classroom-fallback{border-top:1px solid #bacab0;padding-top:18px;margin-top:28px}.classroom-fallback p{font-size:14px;color:#526458}.classroom-login{display:flex;align-items:center;gap:12px}.classroom .work-list small{overflow-wrap:anywhere}
@media(max-width:600px){.classroom{padding:16px}.classroom .work-list li{flex-wrap:wrap}.classroom .work-list li>div{width:100%}.classroom-code{font-size:22px}}

/* Separate key layers keep black keys fixed while a neighbouring white key moves. */
.piano{display:block;min-width:744px;padding:18px 12px 12px;border:1px solid #76563c;border-radius:11px;background:repeating-linear-gradient(2deg,#ffffff04 0 2px,transparent 2px 9px),linear-gradient(#b68d5c,#755337 17px,#60452f 18px,#906943);box-shadow:inset 0 2px 1px #ffe6ba99,inset 0 -3px #533c2b,0 4px 10px #3c332421;overflow:hidden}
.piano-keys{position:relative;display:flex;gap:0;isolation:isolate;border-top:3px solid #8e4641;background:#272521}
.piano .key{position:relative;flex:1 0 48px;width:48px;min-width:48px;height:152px;min-height:152px;margin:0;padding:0 1px 14px;border:0;border-right:1px solid #8e887c;border-radius:0 0 3px 3px;background:linear-gradient(180deg,#ded9cd,transparent 28%),linear-gradient(90deg,#e7e2d6,#fffdf5 9%,#fffdf6 90%,#e6dfd1);box-shadow:inset 0 -7px #d7cebd,inset 0 -9px #fff9ec;color:#314b3c;transition:transform .08s,box-shadow .08s;overflow:visible}
.piano .key[data-key]{margin-left:0}
.piano .key:last-of-type{border-right:0}
.piano .key:disabled{opacity:1;color:#74766f;background:linear-gradient(180deg,#ded9cd,transparent 28%),linear-gradient(90deg,#ddd8cd,#f3f0e7 9%,#f3f0e7 90%,#ded8cb);box-shadow:inset 0 -7px #cbc4b6,inset 0 -9px #ece6da}
.piano .key.tone,.piano .key.tone:hover:not(:disabled){background:linear-gradient(180deg,#ded9cd,transparent 28%),linear-gradient(90deg,#e7e2d6,#fffdf5 9%,#fffdf6 90%,#e6dfd1);border-color:#8e887c;box-shadow:inset 0 -7px #d7cebd,inset 0 -9px #fff9ec}
.piano .black-key{position:absolute;z-index:3;top:0;left:calc(var(--slot)*100%/15);width:calc(100%/15*.6);height:61%;transform:translateX(-50%);border:1px solid #111711;border-radius:0 0 3px 3px;background:linear-gradient(90deg,#111813,#313933 16%,#1d2720 84%,#0c110d);box-shadow:inset 0 -8px #101711,inset 0 -10px #465047,inset 1px 0 #7f857a,2px 4px 3px #0006;cursor:default}
.piano .black-key::after{content:'';position:absolute;inset:4px 3px 11px;border-top:1px solid #6e776c;border-radius:1px;pointer-events:none}
.piano .key .dot{position:absolute;bottom:52px;left:calc(50% - 3px);width:6px;height:6px;margin:0;background:#518358;border-radius:50%;box-shadow:0 0 0 3px #e5eddb}
.piano .key b{font-size:18px}.piano .key small{font-size:11px}
.piano .key.pressing,.piano .key:active:not(:disabled){transform:translateY(3px);box-shadow:inset 0 -3px #c0c9ac,inset 0 -5px #ffffef;background:linear-gradient(#e6ead7,#f7faed 65%,#dce7cd)}
@media(prefers-reduced-motion:reduce){.piano .key{transition:none}.piano .key.struck{animation:none}}

.piano-hint{display:block;color:#5c6e60;font-size:12px;margin:8px 4px}.harmony-note{font-size:13px;color:#755128;background:#fff5df;padding:8px 12px;border-radius:8px}.playing-harmony{font-size:15px;font-variant-numeric:tabular-nums}

/* Sunlit storybook: warm paper framed in wood, with the forest left open above it. */
:root{--ink:#284c3c;--muted:#62705e;--line:#d5d9c5;--blue:#3f7054}
body.forest-mode{--band:clamp(180px,24vh,260px);background:#e5e8d3}
body.forest-mode header{position:relative;z-index:6;max-width:1200px;padding:10px 24px;min-height:72px;background:#fffdf1f5;border:1px solid #d1c8aa;border-top:0;border-radius:0 0 18px 18px;box-shadow:0 4px 20px #293e2620}
.brand .brand-mark{background:#3e6b50;border-radius:20px 20px 8px 8px;width:42px;height:46px}.brand>span:last-child{font-size:24px}.brand small{font-size:11px;color:#5a6d57}
.header-more{position:relative}.header-more summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;padding:8px 16px;border:1px solid #bac6af;border-radius:9px;font-weight:700}.header-more summary::-webkit-details-marker{display:none}.header-more summary::after{content:'⌄';margin-left:9px}.header-more>div{position:absolute;right:0;top:calc(100% + 8px);z-index:12;min-width:172px;padding:8px;display:grid;gap:4px;background:#fffdf3;border:1px solid #c8cfb9;border-radius:12px;box-shadow:0 12px 28px #243c3030}.header-more button{text-align:left}
body.forest-mode:not(.forest-cinema) .workspace{padding:16px 22px 20px;background:#fffdf3;border:1px solid #c6b493;border-top:4px solid #c6a374;border-radius:22px;box-shadow:0 6px 0 #b39b75,0 18px 40px #233f3933;margin-bottom:30px}
.forest-bar{padding:0 0 8px;margin:0}.forest-map-choice{font-size:14px;gap:12px}.forest-map-choice select{background:#f4f5e8;border-color:#c6d1b8}
.view-bar{padding:6px 0 12px;gap:10px}.group-switch{padding:3px;gap:3px;background:#e8eedc;border-radius:12px}.group-btn{min-height:44px;font-size:16px;background:transparent;border:0;box-shadow:none}.group-btn[aria-pressed=true]{background:#426e53;color:white;box-shadow:0 2px 4px #304a3224}
.score-book{background:#fffef8;border:1px solid #d7d9c8;border-radius:12px;box-shadow:0 3px 0 #e6e3d2}.measure-select{padding:8px 12px 7px 6%;background:#f4f5e8;border-color:#e5e6d7}.measure-select button{min-height:44px;background:#fdfdf6;border-color:#d1d8c3}.measure-select button[aria-pressed=true]{background:#4a765a;border-color:#4a765a}
.sheet{max-height:188px;background:#fffef9}.sheet .bar-bg.active{fill:#eef3e2}.sheet .staff-line{stroke:#97a28e}.sheet .chord-guide{fill-opacity:.085}
.workspace .palette{margin-top:12px;padding:8px 10px;background:#f4f4e8;border:1px solid #dce0ce;border-radius:12px;gap:8px}.duration-group{gap:7px}.duration-group button{min-height:46px;padding:5px 13px;background:#fffdf4}.duration-icon{height:32px;width:28px}.history-buttons button{font-size:13px;padding:8px}
.keyboard-panel{padding:12px 0 0;margin-top:0;background:transparent;border:0;border-radius:0;box-shadow:none}.keyboard-panel .free-choice{margin:6px 0 0;padding:3px 4px;min-height:44px}.keyboard-panel .free-choice strong{font-size:14px}.keyboard-panel .free-choice small{font-size:12px}.keyboard-panel .piano-hint{margin:2px 4px 0;font-size:12px}
.workspace .transport{padding:8px 0;margin-top:0}.workspace .more{margin-top:0;padding-top:8px;border-color:#d5d8c4}.outlined{border-color:#a4b79b;color:#36583f;border-radius:9px;background:#fffdf4}.primary{background:#426e53;border-color:#426e53}.primary:hover:not(:disabled){background:#315b42}
@media(min-width:700px) and (max-height:850px){body.forest-mode{--band:150px}body.forest-mode:not(.forest-cinema) .workspace{padding:12px 18px}.sheet{max-height:148px}.piano .key{height:136px;min-height:136px;padding-bottom:10px}.piano .key .dot{bottom:46px}.piano .black-key{height:58%}.view-bar{padding-bottom:8px}}
@media(max-width:600px){body.forest-mode{--band:170px}body.forest-mode header{padding:10px 14px;gap:10px;border-radius:0 0 14px 14px}.brand>span:last-child{font-size:21px}.head-actions{width:100%;gap:7px}.head-actions>button{flex:1}.header-more summary{padding:8px 12px;font-size:13px}.header-more>div{right:0}body.forest-mode:not(.forest-cinema) .workspace{padding:12px 12px 16px;border-radius:17px;margin-left:8px;margin-right:8px}.forest-bar .forest-map-choice{max-width:none}.group-switch{width:100%;display:flex}.group-btn{flex:1}.view-bar .view-toggle{min-height:44px}.palette .duration-group button{padding:5px 10px}.piano .key{height:152px;min-height:152px}.piano-hint::after{content:' · 밀거나 화살표로 다른 음을 찾아요.'}.sheet{max-height:none}.keyboard-panel .free-choice small{display:none}.forest-look-band{top:136px}}
.duration-group span{white-space:nowrap}
@media(max-width:600px){.palette .duration-group button{min-width:0;gap:4px;padding:5px 8px}}
@media print{body.forest-mode:not(.forest-cinema) .workspace{background:white;box-shadow:none;border:0;margin:0}.header-more{display:none}}

/* The range navigator appears only while some keys are outside the viewport. */
.piano-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 7px;color:#3b5545}
.piano-nav[hidden]{display:none}.piano-nav button{min-width:80px;min-height:44px;padding:6px 9px;font-size:12px;background:#e8eddf;color:#324e3d;border:1px solid #b5c1a9;white-space:nowrap}.piano-nav button:disabled{opacity:.45}.piano-range{font-size:12px;text-align:center;line-height:1.4;font-variant-numeric:tabular-nums}.piano-nav button:focus-visible{outline:3px solid #386949;outline-offset:2px}

/* Reference A: a single bound scorebook, with the scenery selector above its rim. */
body.forest-mode:not(.forest-cinema) .workspace{max-width:1060px;margin-left:auto;margin-right:auto;padding:16px 20px 12px;border:7px solid transparent;border-radius:23px;background:radial-gradient(ellipse at 35% 0,var(--book-light,#fffef5) 20%,var(--book-shade,#f5efd9) 100%) padding-box,linear-gradient(135deg,var(--binding-light,#658263),var(--binding-shade,#36563f) 38%,var(--binding-light,#77916a) 73%,var(--binding-shade,#3c5a45)) border-box;box-shadow:inset 0 0 0 2px #c5ad74,inset 0 0 0 5px #fbf5df,inset 0 8px 14px #fffdf1b3,0 2px 0 2px #8c7754,0 14px 30px #203d3433}
.workspace>.forest-bar{position:absolute;right:18px;top:-54px;width:266px;padding:0;margin:0;min-height:44px}
.workspace .forest-map-choice{width:100%;gap:7px;font-size:12px}.workspace .forest-map-choice select{min-height:44px;padding:6px 11px;background:#fffceded;border:1px solid #abb793;border-radius:10px;box-shadow:0 2px 8px #273d2522}
.workspace .view-bar{margin:0 0 10px;padding:0 0 8px;border-bottom:1px solid #d8d7bd;box-shadow:0 1px #fffef3;gap:8px}
.workspace .group-switch{padding:0;gap:4px;background:transparent;border-radius:0}
.workspace .group-btn{min-width:108px;min-height:44px;padding:7px 14px;border:1px solid #b9c5a3;border-radius:11px 11px 5px 5px;background:#e9edd9;color:#3c5943;font-size:14px}
.workspace .group-btn[aria-pressed=true]{background:linear-gradient(#617f4c,#436345);border-color:#4b6943;box-shadow:inset 0 1px #d1dfb077,0 2px 3px #48613c24;color:#fffbed}
.workspace .quick-listen{gap:6px}.workspace .quick-listen button,.workspace .view-toggle{min-height:44px;padding:7px 11px;font-size:13px;border-radius:7px;box-shadow:none}
.workspace .score-book{background:repeating-linear-gradient(0deg,#c1b79206 0 1px,transparent 1px 4px),radial-gradient(ellipse at 50% 40%,#fffff8,#f9f5e5);border:1px solid #b6bea0;border-radius:11px;box-shadow:inset 0 0 0 3px #f1edda,inset 0 5px 12px #84744b0d,0 2px 0 #fffcef,0 3px 4px #78815d24;padding:7px 7px 3px}
.workspace .measure-select{padding:0 0 0 5.8%;gap:5px;border:0;background:transparent}
.workspace .measure-select button{min-height:44px;padding:4px 8px;border:0;border-radius:7px 7px 2px 2px;background:linear-gradient(transparent 16%,#e2e7c9 16%,#e2e7c9 84%,transparent 84%);color:#465b42;font-size:13px}
.workspace .measure-select button[aria-pressed=true]{background:linear-gradient(transparent 16%,#bdcf9b 16%,#bdcf9b 84%,transparent 84%);color:#294b35;box-shadow:inset 0 -2px #6c8c52}
.workspace .sheet{max-height:152px;background:transparent;color:#294631}.workspace .sheet .bar-bg.active{fill:#dce7b9;fill-opacity:.38}.workspace .sheet .staff-line{stroke:#7f8f77;stroke-width:1}.workspace .sheet .bar-line{stroke:#89977f}.workspace .sheet .chord-guide{fill-opacity:.025}.workspace .sheet .guide-dot{fill:#6e8b59;opacity:.4}.workspace .sheet .note-name{fill:#52654b;font-size:14px}.workspace .sheet .note-head{filter:drop-shadow(0 1px 0 #28432b12)}
.workspace[data-view=full] .sheet{max-height:130px}.workspace .system+.system{border-top:0;margin-top:3px}
.workspace .palette{margin:8px 0 0;padding:0 4px;background:transparent;border:0;border-radius:0;gap:7px}
.workspace .duration-group{gap:7px}.workspace .duration-group button{min-height:44px;padding:4px 12px;border:1px solid #c6c9a9;border-radius:7px;background:linear-gradient(#fffdf2,#eee8d1);box-shadow:inset 0 1px #fffef7,0 1px 1px #b9ad8a44;color:#3d553c}.workspace .duration-icon{width:22px;height:28px}.workspace .duration-group span{font-size:13px}
.workspace .duration-group button[aria-pressed=true]{background:linear-gradient(#7f9960,#506f40);border-color:#688249;color:white;box-shadow:inset 0 1px #cad9a777,0 1px 2px #5a70452e}
.workspace .history-buttons button{min-height:44px;padding:6px 7px;border:0;background:transparent;font-size:12px;color:#617256}.workspace .history-buttons button:disabled{color:#92998a;background:transparent}
.workspace .keyboard-panel{padding:8px 0 0}.workspace .transport{padding:5px 2px}.workspace .more{padding:0 2px}
@media(min-width:700px) and (max-height:850px){body.forest-mode{--band:132px}body.forest-mode:not(.forest-cinema) .workspace{padding:12px 15px 8px}.workspace .sheet{max-height:132px}.workspace[data-view=full] .sheet{max-height:116px}}
@media(max-width:700px){body.forest-mode:not(.forest-cinema) .workspace{margin-left:8px;margin-right:8px;padding:12px 10px 8px;border-width:5px}.workspace>.forest-bar{right:8px;width:244px;top:-52px}.workspace .group-switch{flex:0 0 auto;width:auto}.workspace .group-btn{min-width:100px}.workspace .quick-listen{flex:1;justify-content:flex-end}.workspace .view-toggle{margin-left:auto}.workspace .measure-select{padding-left:5.8%}.workspace .measure-select button{font-size:12px}.workspace .sheet{max-height:none}.workspace .palette{padding:0}.workspace .duration-group button{padding:4px 7px}.workspace .history-buttons button{font-size:12px}}
@media print{body.forest-mode:not(.forest-cinema) .workspace{border:0;box-shadow:none;background:white}.workspace>.forest-bar{display:none}}

/* Ivory keys set into a light timber case with a quiet green felt edge. */
.workspace .piano{padding:18px 10px 12px;border:1px solid #a28b60;border-radius:10px;background:repeating-linear-gradient(1deg,transparent 0 5px,#8a6e3b12 6px,transparent 7px 12px),linear-gradient(110deg,#f3e2b7,#d2bb89 28%,#ead5a5 75%,#bca575);box-shadow:inset 0 2px #fff9dd,inset 0 -3px #aa9266,0 2px 3px #776a4526}
.workspace .piano-keys{border-top:3px solid #4d684a;background:#4d684a;box-shadow:0 0 0 2px #5a7351,0 0 0 4px #e8dbb6;border-radius:2px}
.workspace .piano .key{height:132px;min-height:132px;padding-bottom:11px;border-right-color:#b7b19b;border-radius:0 0 3px 3px;color:#36553f;background:linear-gradient(#d8d4bb3d,transparent 25%),linear-gradient(90deg,#e9e1cc,#fffcef 8%,#fffcef 94%,#e0d6be);box-shadow:inset 0 -4px #d5c8aa,inset 0 -6px #fff8e5}
.workspace .piano .key.tone,.workspace .piano .key.tone:hover:not(:disabled){background:linear-gradient(#d8d4bb3d,transparent 25%),linear-gradient(90deg,#e9e1cc,#fffcef 8%,#fffcef 94%,#e0d6be);border-color:#b7b19b;box-shadow:inset 0 -4px #d5c8aa,inset 0 -6px #fff8e5}
.workspace .piano .key:disabled{color:#7b8276;background:linear-gradient(#d8d4bb3d,transparent 25%),linear-gradient(90deg,#dfd9c6,#f4f1e4 8%,#f4f1e4 94%,#ddd4c0);box-shadow:inset 0 -4px #c9c0ac,inset 0 -6px #eee8d8}
.workspace .piano .black-key{height:59%;border:1px solid #1d261e;border-radius:0 0 3px 3px;background:linear-gradient(90deg,#20261f,#40483a 12%,#2e372c 18%,#293227 80%,#182118);box-shadow:inset 0 -6px #161d16,inset 0 -8px #53604b,inset 1px 0 #90977d,1px 3px 3px #2c38294d}
.workspace .piano .black-key::after{inset:3px 3px 9px;border-top-color:#afb69b80;background:linear-gradient(105deg,#d8dec016,transparent 38%);border-left:1px solid #b6bf9b18}
.workspace .piano .key .dot{position:static;flex-shrink:0;width:4px;height:4px;margin:0 0 6px;background:#7b9661;box-shadow:none}
.workspace .piano .key b{font-size:17px}.workspace .piano .key small{font-size:10px;color:#6c7961;line-height:1.3}
.workspace .piano .key.pressing,.workspace .piano .key:active:not(:disabled){transform:translateY(2px);background:linear-gradient(#d7e2c1,#f6f6df 70%,#dce5c4);box-shadow:inset 0 -2px #bdc7a2}
.workspace .outlined,.workspace .palette>button,body.forest-mode .head-actions>button{border-color:#bec8aa;color:#3b563e;background:linear-gradient(#fffef4,#f2eedc);border-radius:7px}
.workspace .primary{background:linear-gradient(#6f8b55,#496d47);border-color:#59764b;color:#fffdf0}
.workspace .sheet{max-height:none}.workspace[data-view=full] .sheet{max-height:none}
.workspace .measure-select button{border-radius:7px 7px 3px 3px;background:linear-gradient(transparent 17%,#e0e5c9 17%,#e0e5c9 86%,transparent 86%)}
.workspace .keyboard-panel .free-choice{color:#536746;min-height:44px}.workspace .free-choice input{accent-color:#648052;width:22px;height:22px}.workspace .free-choice strong{font-size:13px}.workspace .piano-hint{color:#69765b;font-size:12px}
@media(min-width:700px) and (max-height:850px){.workspace .piano .key{height:124px;min-height:124px}}
@media(max-width:600px){.workspace .piano .key{height:140px;min-height:140px}.workspace .piano-nav button{background:#e8ecd7;border-color:#c0caaa;color:#415c43}}

/* Small botanical corners sit on the binding, outside the notation and hit targets. */
body.forest-mode:not(.forest-cinema) .workspace::before,body.forest-mode:not(.forest-cinema) .workspace::after{content:'';position:absolute;width:112px;height:96px;background:url('assets/ui/scorebook-corner.svg') center/contain no-repeat;pointer-events:none;z-index:3;filter:drop-shadow(0 2px 1px #5769401c)}
body.forest-mode:not(.forest-cinema) .workspace::before{left:-6px;top:-21px}
body.forest-mode:not(.forest-cinema) .workspace::after{right:-6px;bottom:-21px;transform:rotate(180deg)}
.workspace .score-system{min-width:0;width:100%}.workspace .score-system .sheet{min-width:0;display:block;width:100%}
.workspace .measure-select{padding-left:5.714%;padding-right:1.428%;gap:4px}.workspace .measure-select button{position:relative;isolation:isolate;background:transparent;box-shadow:none}
.workspace .measure-select button::before{content:'';position:absolute;z-index:-1;inset:7px 0;border-radius:7px 7px 2px 2px;background:#e0e5c9}
.workspace .measure-select button[aria-pressed=true]{background:transparent;color:#294b35;box-shadow:none}
.workspace .measure-select button[aria-pressed=true]::before{background:linear-gradient(#c7d5a8,#b7c997);box-shadow:inset 0 -2px #7d965f}
.workspace .primary:disabled{background:#e5e8d8;color:#8c9680;border-color:#ccd2bf;box-shadow:none}
.workspace .piano .key b{font-weight:700;text-shadow:0 1px #fffaf0}.workspace .piano .key.current{box-shadow:inset 0 -4px #71895b,inset 0 -7px #c4d6a3}.workspace .piano .key.struck{animation:forest-key-struck .65s ease-out}.workspace .piano .key:focus-visible{outline:3px solid #547047;outline-offset:-4px;z-index:1}.workspace .keyboard-panel .free-choice strong,.workspace .keyboard-panel .free-choice small,.workspace .keyboard-panel .free-state{color:#5e7052}
.workspace .staff-scroll{scrollbar-color:#adbb90 #f1eedc;scroll-padding:10px}
.workspace .view-bar .view-toggle{border-color:#bec8aa}.workspace .more{border-color:#d4d6bc}.workspace .more summary{font-size:13px;color:#61734f}
@media(max-width:700px){
 body.forest-mode:not(.forest-cinema) .workspace::before,body.forest-mode:not(.forest-cinema) .workspace::after{width:80px;height:69px}
 body.forest-mode:not(.forest-cinema) .workspace::before{left:-4px;top:-16px}
 body.forest-mode:not(.forest-cinema) .workspace::after{right:-4px;bottom:-16px}
 .workspace .view-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}
 .workspace .group-switch{width:100%;min-width:0;grid-column:1;grid-row:1;gap:4px}
 .workspace .group-btn{min-width:0;padding:6px 7px;font-size:13px;flex:1;white-space:nowrap}
 .workspace .view-toggle{grid-column:2;grid-row:1;min-width:0;padding:6px 7px;font-size:11px}
 .workspace .quick-listen{grid-column:1/-1;grid-row:2;width:100%;justify-content:stretch}
 .workspace .quick-listen button{flex:1;white-space:nowrap;font-size:13px}
 .workspace .palette{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
 .workspace .palette>button,.workspace .history-buttons button{font-size:11px;padding:5px 2px;min-width:0;white-space:nowrap}
 .workspace .palette>.duration-group{grid-column:1/-1}.workspace .duration-group span{font-size:13px}
 .workspace .forest-map-choice{gap:5px}.workspace .forest-map-choice select{font-size:13px}
 .workspace[data-view=focus] .view-bar{display:flex}.workspace[data-view=focus] .quick-listen{flex-basis:100%}
}
@media print{.workspace::before,.workspace::after{display:none!important}.workspace .score-system{min-width:0}}

/* Olive selection and honey-coloured playback echo the paper and timber. */
.workspace .sheet .note.selected{color:#355d3e}.workspace .sheet .note.selected .note-hit{fill:#658b4f;fill-opacity:.14;stroke:#6f8f51}.workspace .sheet .note.selected ellipse{stroke:#355d3e}
.workspace .sheet .note.sounding{color:#946c25}.workspace .sheet .note.sounding .note-hit{fill:#e9c772;fill-opacity:.32}.workspace .sheet .bar-bg.playing{fill:#efdcaa;fill-opacity:.55}
@keyframes forest-key-struck{from{background:#f4dc9c;box-shadow:inset 0 -4px #b79d60,inset 0 -7px #fff0b6}to{box-shadow:inset 0 -4px #d5c8aa,inset 0 -6px #fff8e5}}
@media(prefers-reduced-motion:reduce){.workspace .piano .key.struck{animation:none}}

/* A cooler paper surround joins the two night scenes without dimming the notation. */
.workspace:is([data-theme=dream],[data-theme=moon]){--book-light:#f9faf1;--book-shade:#e6ecdf;--binding-light:#537975;--binding-shade:#304d50}
.workspace[data-theme=warm]{--book-light:#fffaf0;--book-shade:#f1e7cd;--binding-light:#7b885b;--binding-shade:#4e6244}
.workspace .focus-card{border:1px solid #b6bea0;border-radius:11px;background:#fffdf1;box-shadow:inset 0 0 0 3px #f1edda,0 2px 2px #78815d24}
.workspace .note-row{border:1px solid #a9ba90;border-left:4px solid #708d55;border-radius:8px;background:#f0f3e2}.workspace .note-row strong{color:#35573c}
.workspace .sheet .note:focus-visible .note-hit{stroke:#527449;stroke-width:3;stroke-dasharray:4 3}
.workspace :is(button,select,input,summary):focus-visible{outline:3px solid #4f7045;outline-offset:3px}.workspace .piano .key:focus-visible{outline-offset:-4px}
body.forest-mode .brand small{font-size:12px}.workspace .piano-hint{font-size:13px;line-height:1.55}
.workspace .forest-map-choice select{font-size:14px}
@media(hover:hover){
 .workspace :is(.outlined,.quick-listen button,.view-toggle,.piano-nav button):hover:not(:disabled){background:#e8edd6;border-color:#98ab7c;color:#36563a}
 .workspace :is(.primary,.group-btn[aria-pressed=true],.duration-group button[aria-pressed=true]):hover:not(:disabled){background:linear-gradient(#708b51,#46663d);border-color:#577342;color:#fffdf0}
 .workspace .measure-select button:hover:not(:disabled){background:transparent;color:#294b35}.workspace .measure-select button:hover::before{background:#d2dfb3}
 .workspace :is(.history-buttons button,.note-row .quiet):hover:not(:disabled){background:#e7edd4;color:#36563a;border-color:#9eaf89}
}
@media(max-width:600px){.workspace .forest-map-choice select{font-size:16px}.workspace .piano-hint{margin-top:4px}}

/* The landscape label needs its own paper backing over every scene. */
.workspace .forest-map-choice{padding:4px 6px 4px 10px;border:1px solid #bcc8a8;border-radius:12px;background:#fffdf1f5;box-shadow:0 2px 5px #263f3520;color:#35543f}
.workspace .forest-map-choice select{min-width:0;border:0;background:transparent;padding-left:4px}
.forest-map-choice{flex-wrap:wrap}
.forest-map-choice small{flex-basis:100%;font-size:11px;line-height:1.3;color:#526248}
.workspace>.forest-bar{top:auto;bottom:calc(100% + 8px)}
.score-scroll-hint{display:none}
@media(max-width:700px){.workspace .score-scroll-hint{display:block;margin:0 3px 6px;color:#526248;font-size:12px;text-align:right}}

/* Bravura (SIL OFL) makes notation independent of device symbol fonts. */
@font-face{font-family:Forest Music;src:url('assets/fonts/Bravura.woff2') format('woff2');font-weight:400;font-display:block}
.sheet .music-clef,.sheet .rest-symbol{font-family:Forest Music,'Segoe UI Symbol','Apple Symbols',serif;font-size:64px;font-weight:400;fill:currentColor;pointer-events:none}
.sheet .music-clef{font-size:56px;transform:translateX(-7px)}
.workspace .piano .key small{font-size:12px}
@media(max-width:700px){.workspace .view-toggle{font-size:12px}.workspace .palette>button,.workspace .history-buttons button{font-size:12px}}
@media(min-width:700px) and (max-height:850px){body.forest-mode{--band:188px}}

/* Leave the tab hit targets clear; the flowers belong to the binding. */
body.forest-mode:not(.forest-cinema) .workspace::before{width:78px;height:67px;top:-53px;left:-3px}
body.forest-mode:not(.forest-cinema) .workspace::after{width:86px;height:74px;right:-3px;bottom:-15px}
.workspace .piano .key.tone::after{content:'';position:absolute;bottom:6px;left:calc(50% - 9px);width:18px;height:3px;border-radius:2px;background:#8fa271;pointer-events:none}
.workspace .transport .play-buttons button{border-color:transparent;background:transparent;color:#526b48;font-size:13px}

/* A score on the forest's music desk: quiet paper, explicit classroom access. */
:root{--ink:#243f35;--muted:#59695f;--line:#c5cfc3}
body.forest-mode header{background:#fafbf6f5;border-radius:0;border-bottom:1px solid #b7c6b7;box-shadow:0 2px 12px #16332612}
.head-actions .classroom-entry{background:#315d49;border:1px solid #315d49;color:#fff;font-weight:700;min-height:46px;padding:10px 17px;box-shadow:none}
.head-actions .classroom-entry:hover{background:#244a39;color:white}
body.forest-mode:not(.forest-cinema) .workspace{background:#f6f8f1f7;border:1px solid #bdcbb9;border-radius:18px 18px 0 0;box-shadow:0 4px 18px #183d281c}
.workspace .score-book{background:#fffef8;border:1px solid #becab9;border-radius:12px;box-shadow:none;padding:12px}
.workspace .system{background:transparent;box-shadow:none;border:0}
.workspace .measure-select button::before{background:#edf1e3;border-radius:6px 6px 0 0}
.workspace .measure-select button[aria-pressed=true]::before{background:#d6e3c4}
.workspace .palette{background:transparent;border:0;padding:10px 0;gap:10px}
.workspace .duration-group{gap:6px;flex-wrap:wrap}
.workspace .duration-group button{background:#fffef8;border:1px solid #bdc9b7;border-radius:8px;color:#31543e;min-height:50px;box-shadow:none}
.workspace .duration-group button[aria-pressed=true],.workspace .group-btn[aria-pressed=true]{background:#3d654e;border-color:#3d654e;color:white;box-shadow:none}
.workspace .duration-group button[aria-pressed=true]:hover{background:#31543e}
.workspace .duration-group button.unfit{border-style:dashed}
.workspace .history-buttons button{color:#53654e;font-size:13px}
.workspace .history-buttons button:disabled{opacity:.45}
.workspace .sheet .augmentation-dot{fill:currentColor;pointer-events:none}
.classroom-intro{font-size:17px;color:#345d48;margin:10px 0 18px}
.classroom-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}
.classroom-tabs button{min-height:48px;background:#f1f5e9;color:#31543e;border-color:#b4c5ab}
.classroom form{padding:20px;background:#fffef8;border:1px solid #bccbb7;border-radius:12px}
.classroom input[name=code]{font-size:24px;letter-spacing:.14em;font-weight:700}
@media(max-width:600px){.head-actions .classroom-entry{padding:8px 12px;font-size:13px}.workspace .score-book{padding:8px}.workspace .duration-group{gap:4px}.workspace .duration-group button{padding:5px 8px;gap:4px;min-height:48px}.classroom form{padding:14px}}

/* Round 2: keep the classroom action visible and the notebook inside the viewport. */
body.forest-mode header .head-actions .classroom-entry{background:#315d49;color:white;border-color:#315d49;box-shadow:none}
body.forest-mode:not(.forest-cinema) .workspace::before{left:0}
body.forest-mode:not(.forest-cinema) .workspace::after{right:0;bottom:0}
body.forest-mode .classroom{background:#fafcf6fa;border:1px solid #bdcbb9;box-shadow:0 8px 24px #19392722}
.workspace .duration-group button.unfit[aria-pressed=true]{opacity:1}
@media(max-width:600px){.workspace .duration-group{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:100%}.workspace .duration-group button{flex-direction:column;padding:4px 2px;gap:0}.workspace .duration-icon{height:29px;width:25px}.workspace .duration-group span{font-size:12px}.head-actions{flex-wrap:wrap}}

/* Round 3: opaque writing surface, clear rhythmic hint, quieter piano casing. */
body.forest-mode:not(.forest-cinema) .workspace{background:#f7f9f2}
body.forest-mode .classroom{background:#fafcf6}
.workspace .duration-help{font-size:13px;color:#426049;margin:-2px 0 10px;padding:0 4px}
.workspace .piano{border-color:#a59777;background:linear-gradient(#d9cfb4,#b8aa88);box-shadow:0 2px 0 #8c8167}
.classroom-tabs button[aria-pressed=true]{background:#315d49;color:white;border-color:#315d49}
@media(max-width:600px){.workspace .duration-help{font-size:12px}.head-actions .classroom-entry{font-weight:800}}
@media(max-width:600px){.classroom form{display:flex;flex-direction:column;align-items:stretch;gap:12px}.classroom form label,.classroom form input{width:100%;min-width:0}.classroom input[name=code]::placeholder{font-size:16px;letter-spacing:0}.classroom form>button{min-height:46px}}

.forest-intro .loading-sound{position:fixed;z-index:45;bottom:12vh;left:50%;transform:translateX(-50%);min-height:48px;padding:12px 20px;background:#fafcf0;color:#294d39;border:1px solid #b5c8a2;border-radius:12px;white-space:nowrap}.forest-intro .loading-sound:disabled{opacity:1}

/* Clear header hierarchy, preserving the existing forest palette. */
body.forest-mode header{padding:10px 22px;gap:14px;align-items:center}
body.forest-mode header .head-actions{gap:8px;align-items:center}
.head-actions>button,.header-more>summary{min-height:44px;border-radius:8px;font-size:14px}
.brand .brand-mark{width:40px;height:44px;border-radius:18px 18px 9px 9px;box-shadow:none}
.brand-mark svg{width:32px;height:32px}.brand small{font-size:12px}
@media(max-width:600px){body.forest-mode header{padding:10px 12px;gap:8px}.head-actions{width:100%;display:grid;grid-template-columns:1fr 1.4fr auto}.head-actions>button,.header-more>summary{padding:8px;font-size:12px}.brand small{font-size:11px}}
/* Ivory key surfaces: crisp seams, a readable front lip, no changes to key widths. */
.workspace .piano .key{background:linear-gradient(180deg,#d5d2c8 0,#f7f5ec 22%,#fffef7 68%,#f1eadb 96%);border-right:1px solid #9c9587;box-shadow:inset 1px 0 #fff,inset -1px 0 #e5ded0,inset 0 -6px #c7bdab,inset 0 -8px #fff8e9;color:#294638}
.workspace .piano .key:disabled{background:linear-gradient(#d4d1c8,#f0eee5 25%,#ebe7dc 95%);color:#74766e;box-shadow:inset 0 -6px #c4bcae,inset 0 -8px #e8e3d7}


.compose-context{display:flex;gap:10px;align-items:center;padding:3px 4px 10px;font-size:13px;color:#536558;flex-wrap:wrap}.compose-context strong{color:#2d523e}.compose-context span:nth-child(2){font-variant-numeric:tabular-nums}.compose-context span:last-child{margin-left:auto}
@media(max-width:600px){.compose-context{font-size:12px;gap:7px}.compose-context span:last-child{width:100%;margin-left:0}}
/* Black-key upper surface and bevel remain independent from the moving white keys. */
.workspace .piano .black-key{background:linear-gradient(90deg,#111713 0,#434c45 12%,#242c26 22%,#202822 78%,#080d0a 100%);border:1px solid #151b16;box-shadow:inset 0 -7px #090e0b,inset 0 -9px #586058,inset 1px 0 #788074,2px 4px 3px #0005}
.workspace .piano .black-key::after{inset:4px 4px 12px;border-top:1px solid #9aa091;background:linear-gradient(#ffffff0c,transparent 55%)}


.workspace .note-row{border:1px solid #b7c7ae;background:#edf4e5;padding:12px;border-radius:8px;gap:8px}.workspace .duration-help{min-height:20px}.workspace .duration-group button{transition:background-color .12s,border-color .12s}.workspace .duration-group button.unfit{background:#f2f0e9;border-color:#b9b5a6}.workspace .duration-group button[aria-pressed=true]{background:#315d49;color:#fff}
/* A thin felt strip and timber rail frame the keys without obscuring their hit areas. */
.workspace .piano{position:relative;background:linear-gradient(#c0a079 0,#a58056 12px,#5b4431 17px,#8a694b 18px,#b08b63 100%);border-color:#7d6145;box-shadow:inset 0 2px #eed8b5,inset 0 -3px #70543d,0 2px 6px #24352120}
.workspace .piano-keys::before{content:'';position:absolute;top:-3px;left:0;right:0;height:3px;background:#794e47;box-shadow:0 1px 2px #2d201a77;z-index:4;pointer-events:none}


.classroom .library-head{align-items:center;gap:14px}.classroom .classroom-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px}.classroom .classroom-tabs button{padding:14px 10px;border-radius:9px;font-size:15px}.classroom .classroom-fallback{margin-top:24px;padding-top:18px;border-top:1px solid #c4d1bd}.classroom label{display:block;line-height:1.6}.classroom input:focus{outline:3px solid #91bca2;outline-offset:2px}.classroom .library-note{font-size:14px;line-height:1.7}
/* Readable note labels are always below the black-key tips. */
.workspace .piano .key b{font-size:19px;line-height:1.2;font-weight:700;text-shadow:0 1px #fff9}
.workspace .piano .key small{font-size:11px;line-height:1.4;color:#6e756a}
.workspace .piano .key.tone .dot{background:#55804e;box-shadow:0 0 0 3px #e6eddc}
.workspace .piano .key:disabled b{text-shadow:none;color:#72766d}
.workspace .piano .key.tone::after{height:2px;width:16px;left:calc(50% - 8px);background:#7b9866}


.workspace .history-buttons{gap:6px}.workspace .history-buttons button{min-height:44px}.workspace .view-bar{align-items:center}.workspace .view-toggle{margin-left:auto}
@media(max-width:600px){.workspace .view-bar{display:grid;grid-template-columns:1fr 1fr;gap:8px}.workspace .group-switch{grid-column:1;grid-row:1;width:100%}.workspace .quick-listen{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:1fr 1fr}.workspace .view-toggle{grid-column:2;grid-row:1;margin:0;min-height:44px}.workspace .palette{grid-template-columns:repeat(4,minmax(0,1fr))}.workspace .history-buttons{grid-column:2/-1;min-width:0;width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.workspace .history-buttons button{padding:7px 3px;font-size:12px}.workspace .palette>button[data-action=add-rest]{min-height:44px;width:100%}}
/* Press feedback preserves real key alignment and separate black-key geometry. */
.workspace .piano .key.pressing,.workspace .piano .key:active:not(:disabled){transform:translateY(2px);background:linear-gradient(#d0d6c2,#f3f7e9 45%,#e3edd7);box-shadow:inset 0 -3px #adb99d,inset 0 -5px #f9fce9}
.workspace .piano .key:focus-visible{outline:3px solid #2e6957;outline-offset:-4px;z-index:1}
.workspace .piano .key.current{background:linear-gradient(#e1dcc5,#fff5cc);box-shadow:inset 0 -6px #c9b681,inset 0 -8px #fff7df}
@media(prefers-reduced-motion:reduce){.workspace .duration-group button,.workspace .piano .key{transition:none;animation:none}}


.workspace .group-btn[aria-pressed=false]{background:#edf1e4;color:#3d5a44;border-color:#b9c8ac}

/* One shared score; these controls choose the backing and the part being edited. */
.compose-tools{display:flex;align-items:center;justify-content:space-between;gap:10px 18px;flex-wrap:wrap;padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid var(--line)}
.backing-choice,.part-tabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.backing-choice>label:first-child,.part-tabs>span{font-size:13px;color:#426049;font-weight:700}
.backing-choice select{min-height:44px;max-width:230px;min-width:140px;background:#fffef8;border:1px solid #aebfa5;border-radius:8px;color:#294638;padding:8px;font:inherit}
.backing-enabled{display:flex;align-items:center;gap:6px;min-height:44px;font-size:13px;white-space:nowrap}
.backing-enabled input{width:20px;height:20px;accent-color:#315d49}
.part-tabs button{min-height:44px;padding:8px 12px;white-space:nowrap}
.part-tabs button[aria-pressed=true]{background:#315d49;border-color:#315d49;color:white}
.compose-tools :focus-visible,.part-tabs button:focus-visible{outline:3px solid #2e6957;outline-offset:3px}
.part-score-title{font-size:17px;color:#31543e}
@media(max-width:600px){.compose-tools{display:grid;gap:8px}.backing-choice{gap:7px}.backing-choice select{flex:1;min-width:0}.part-tabs{gap:6px}.part-tabs>span{width:100%}.part-tabs button{flex:1;padding:7px 8px;font-size:13px}}
@media print{.compose-tools,.part-tabs{display:none}}

/* Reuse the supplied creator logo beside the title and credit. */
.brand .brand-mark{width:46px;height:46px;border-radius:10px;background:#fff;border:1px solid #c0cbb8;overflow:hidden}
.brand-mark img{display:block;width:44px;height:44px;object-fit:contain}
.brand small{font-weight:600}

.playback-score{margin:20px 0;padding:18px;background:#fffdf3;border:1px solid #b8c8a7;border-radius:14px;color:#294b38}
.playback-score-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.playback-score-head h2{margin:0;font-size:24px}.playback-position{font-size:16px;font-weight:700}
.score-parts{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.score-parts button[aria-pressed=true]{background:#315d49;color:white}
.playback-score .sheet{min-width:620px;max-height:none}.playback-score .staff-scroll{overflow-x:auto}
.playback-score .note.sounding .note-head{fill:#d77a22;stroke:#844614;stroke-width:2}
.playback-score .note.sounding .note-hit{fill:#ffe8b4;opacity:.55}
@media(max-width:600px){.playback-score{padding:10px}.playback-score-head h2{font-size:20px}}

/* Keep the composing surface close to the keyboard; concert view still fills the forest. */
body.forest-mode{--band:128px}
.workspace .compose-tools{padding-bottom:8px;margin-bottom:6px;gap:8px 14px}
.workspace .part-tabs{gap:8px}.part-written{margin-left:5px;font-size:15px}
.workspace .view-bar{gap:8px;padding:4px 0 8px}
.workspace .compose-context{padding-bottom:6px;line-height:1.5}
.workspace .score-book{padding:6px}
.workspace .measure-select{gap:8px;padding-top:4px;padding-bottom:4px}
.workspace .measure-select button{min-height:44px}
.workspace .palette{padding:8px 0 4px;gap:8px}
.workspace .duration-group{gap:8px}.workspace .duration-group button{min-height:48px}
.workspace .duration-help{margin:0 2px 5px;font-size:13px}
.workspace .history-buttons{gap:8px}
.workspace .piano{border-radius:10px;padding:14px 8px 9px;background:linear-gradient(#bc9970,#826345 12px,#c1a47d 15px,#b18c63);box-shadow:inset 0 2px #f0dfbf,inset 0 -3px #775839,0 3px 8px #233b2920}
.workspace .piano-keys{box-shadow:0 0 0 1px #544c3e,0 0 0 3px #dbcbaa;border-radius:2px}
.workspace .piano-keys::before{background:#6a493e;height:3px}
.workspace .piano .key,.workspace .piano .key.tone{height:140px;min-height:140px;background:linear-gradient(180deg,#d5d1c5,#fffdf3 24%,#fffef7 75%,#eee6d5);border-right:1px solid #a39a88;box-shadow:inset 1px 0 #fff,inset -1px 0 #e5dece,inset 0 -5px #c8bda8,inset 0 -7px #fff8e7}
.workspace .piano .key b{font-size:20px;line-height:1.2}
.workspace .piano .key small{font-size:12px;color:#59634f;line-height:1.3}
.workspace .piano .key .dot{width:5px;height:5px;margin-bottom:7px}
.workspace .piano .key.tone::after{width:18px;left:calc(50% - 9px);height:2px;bottom:7px}
.workspace .piano .key:disabled{background:linear-gradient(#d3d0c6,#eeeae0 24%,#e4dfd3);box-shadow:inset 0 -5px #c0b7a6,inset 0 -7px #e9e2d2}
.workspace .piano .black-key{height:53%;width:calc(100%/15*.57);background:linear-gradient(90deg,#111914,#475047 13%,#29332b 24%,#202a23 80%,#101710);box-shadow:inset 0 -6px #101711,inset 0 -8px #536052,inset 1px 0 #88917e,1px 3px 3px #0004}
.workspace .piano .black-key::after{inset:4px 4px 10px;border-top-color:#b1b7a880;background:linear-gradient(100deg,#fff1,transparent 65%)}
.workspace .piano .key.pressing,.workspace .piano .key.playing-note{transform:translateY(2px);background:linear-gradient(#c5d4b8,#f1f8df 50%,#dce9c7);box-shadow:inset 0 -2px #8d9f7c,inset 0 -4px #eff5dd;color:#24432d}
.workspace .piano .key.current{outline:3px solid #ad762c;outline-offset:-4px}
.workspace .piano .key:focus-visible{outline:3px solid #285ac3;outline-offset:-4px}
.workspace .piano .key.struck{animation-duration:.28s}
.workspace .more summary{min-height:44px;display:flex;align-items:center}
.playback-score-head h2{overflow-wrap:anywhere;min-width:0}
.score-parts button{min-height:44px}.score-parts{gap:8px}
.playback-score .bar-bg.playing{fill:#f6deb0;fill-opacity:.65}
.cinema-bar{gap:8px}.cinema-bar button{min-height:48px}
@media(min-width:700px) and (max-height:850px){body.forest-mode{--band:96px}.workspace .score-system .sheet{height:auto}.workspace .piano .key{height:132px;min-height:132px}.workspace .piano .black-key{height:51%}}
@media(max-width:600px){body.forest-mode{--band:120px}.compose-tools{width:100%}.backing-choice select{max-width:none}.workspace .part-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:8px}.workspace .part-tabs>span{grid-column:1/-1}.workspace .part-tabs button{padding:8px 4px;min-width:0}.workspace .duration-group{gap:6px}.workspace .quick-listen{gap:8px}.workspace .score-system{min-width:0}.workspace .score-system .sheet{height:auto}.workspace .piano .key{min-width:52px;width:52px;flex-basis:52px}.workspace .keyboard-panel .free-choice small{display:none}.workspace .piano-hint::after{content:''}.playback-score .sheet{min-width:620px}.cinema-bar{max-width:calc(100vw - 24px);padding:12px}}
@media(prefers-reduced-motion:reduce){.workspace .piano .key.pressing,.workspace .piano .key.playing-note{transform:none}.workspace .piano .key{transition:none;animation:none}}
@media print{.playback-score{border:0;padding:0}.score-parts{display:none}.playback-score .sheet{min-width:0}.playback-score .note.sounding .note-hit{fill:none}.playback-score .note.sounding .note-head{fill:currentColor;stroke:currentColor}}

/* The rhythm part uses the same bar selection, with eight direct on/off beats. */
.rhythm-system{display:flex;gap:8px;padding:12px 4px;min-height:120px}
.rhythm-measure{flex:1;min-width:0;border-radius:8px;padding:8px 6px;background:#f5f7ed}
.rhythm-measure>strong{font-size:13px;color:#46634c}
.rhythm-marks{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:2px;margin-top:10px}
.rhythm-marks .note{display:grid;place-items:center;border-radius:5px;color:#6c7568;min-height:48px}
.rhythm-marks small{font-size:12px}.rhythm-marks b{font-size:18px}.rhythm-marks .rhythm-hit{color:#315d49;background:#dce9cb}
.rhythm-marks .sounding{background:#f6d28b;color:#603b0e;outline:2px solid #a46b20}
.rhythm-measure.playing{background:#fff0cd}
.rhythm-editor{margin:12px 0;padding:14px;background:#fffdf3;border:1px solid #becab9;border-radius:12px}
.rhythm-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px}
.rhythm-heading span,.rhythm-editor p{font-size:13px;color:#526458}.rhythm-editor p{margin:10px 0 0}
.rhythm-pads{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px}
.rhythm-pad{display:grid;gap:4px;place-items:center;min-width:0;min-height:68px;padding:8px 2px;border-radius:10px;background:#f2f5e9;color:#465d42;border:1px solid #b4c4a7}
.rhythm-pad span{font-size:20px;font-weight:700}.rhythm-pad b{font-size:13px}
.rhythm-pad:nth-child(2n){background:#fafbf4}
.rhythm-pad[aria-pressed=true]{background:#315d49;color:white;border-color:#315d49;box-shadow:inset 0 -3px #1e402e}
.rhythm-pad.playing-note{outline:3px solid #c28a32;outline-offset:2px}
.rhythm-pad:focus-visible{outline:3px solid #285ac3;outline-offset:3px}
.rhythm-history{justify-content:flex-end}
@media(max-width:600px){.workspace .part-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.rhythm-pads{grid-template-columns:repeat(4,minmax(0,1fr))}.rhythm-editor{padding:12px}.rhythm-history{display:flex!important;flex-wrap:wrap}.rhythm-history button{flex:1;min-height:44px}.rhythm-heading{flex-wrap:wrap}.rhythm-marks b{font-size:16px}}
@media print{.rhythm-measure{break-inside:avoid;background:white;border:1px solid #888}.rhythm-marks .rhythm-hit{background:white;color:black}}

.finish-help{flex-basis:100%;margin:0;color:#465d42;font-size:13px;line-height:1.6}
.rhythm-pad{touch-action:manipulation;user-select:none;-webkit-user-select:none}
.save-status:empty{display:none}

/* Ivory highlights stay quiet so note labels remain the focal point. */
.workspace .piano .key,.workspace .piano .key.tone{background:linear-gradient(180deg,#ded9cc,#fffdf5 22%,#fffef8 76%,#eae2d1);box-shadow:inset 1px 0 #fff,inset -1px 0 #e4ddcf,inset 0 -5px #c7bda9,inset 0 -7px #fff9ea}
.workspace .piano .key:disabled{background:linear-gradient(#d8d4ca,#eeeae1 25%,#e3ded2)}

.workspace .piano .black-key{background:linear-gradient(90deg,#101812,#3c483f 12%,#28332b 24%,#1e2821 80%,#101711);box-shadow:inset 0 -5px #0d150f,inset 0 -7px #4b594c,inset 1px 0 #73816e,1px 3px 3px #0003}
.workspace .piano .black-key::after{border-top-color:#c0c9b580;background:linear-gradient(100deg,#fff1,transparent 58%)}

.workspace .piano .key.current{outline:0;box-shadow:inset 0 -5px #a87930,inset 0 -8px #f2d99d,inset 2px 0 #c5a45f,inset -2px 0 #c5a45f}
.workspace .piano .key.current b{color:#795016}
.workspace .piano .key.pressing,.workspace .piano .key.playing-note{background:linear-gradient(#c7d6bb,#f1f8df 50%,#dce9c7);box-shadow:inset 0 -2px #8d9f7c,inset 0 -4px #eff5dd}
.workspace .piano .key:focus-visible{outline:3px solid #285ac3;outline-offset:-4px}

.workspace .score-book,.workspace .focus-card{background:#fffef8;border-color:#bac6b2;box-shadow:0 2px 0 #d8decd,0 5px 12px #2c493a09}
.workspace .score-system{background:#fffef8}
.workspace .staff-line{stroke:#899780;stroke-width:1.15}
.workspace .bar-line{stroke:#60745c}

.concert .concert-art{width:min(320px,80vw);aspect-ratio:3/2;object-fit:contain;border:1px solid #c4cfb8;border-radius:12px;box-shadow:0 7px 18px #263c2920}
.concert-hero h1{color:#294b3a}.concert .badge-row span{background:#f0f4e7;border:1px solid #c0ceb0;color:#36563d}
@media print{.concert .concert-art{display:none}.workspace .score-book{box-shadow:none}}

.part-check{display:inline-block;width:13px;margin-right:3px;font-weight:800}.part-tabs button[aria-pressed=true]{box-shadow:inset 0 -3px #789766}.part-written{color:inherit}

.workspace .measure-select button{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:3px 8px}.measure-progress{font-size:11px;font-weight:500;color:inherit;opacity:.85;white-space:nowrap}

.save-status>span{font-size:12px;color:#506650;white-space:nowrap}@media(max-width:600px){.head-actions .save-status{flex-basis:100%;text-align:right;min-height:16px}}

.keyboard-edit-hint{margin:0 0 8px;padding:8px 10px;background:#f2f5e8;border-left:3px solid #819668;font-size:13px;line-height:1.5;color:#405a3e}

.focus-toggle{min-height:44px;white-space:nowrap}@media(max-width:600px){.workspace .focus-toggle{grid-column:1/-1;grid-row:3}.workspace .quick-listen{min-width:0}}

#toast{bottom:max(24px,env(safe-area-inset-bottom));overflow-wrap:anywhere}@media(max-width:600px){#toast{font-size:15px;padding:12px 16px;max-width:calc(100vw - 24px)}}

@media(max-width:600px){.workspace .history-buttons button,.workspace .palette>button,.workspace .part-tabs button{font-size:14px;min-height:48px}.backing-choice select,.settings input,.song-title{font-size:16px}.backing-enabled{min-height:48px}.workspace .duration-group button{min-height:48px}.workspace .duration-group span{font-size:14px}}

.focus-scroll{overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}.workspace .sheet.focus-sheet{min-width:480px;width:100%;max-width:760px;max-height:none;height:auto;margin:0 auto}.focus-card{overflow:hidden}

.rest-mark{fill:currentColor;pointer-events:none}

.beat-guide{stroke:#9aac8c;stroke-width:1;stroke-dasharray:2 5;opacity:.35;pointer-events:none}.beat-count{font-size:12px;fill:#62765b;text-anchor:middle;pointer-events:none}

.note-beam{fill:currentColor;pointer-events:none}

.score-playhead{stroke:#a96b21;stroke-width:2;opacity:.85;pointer-events:none}@media print{.score-playhead{display:none}}

.register-mark{font-size:10px;fill:#5d7354;text-anchor:middle;letter-spacing:1px;pointer-events:none}.note.selected .note-name{font-weight:800;fill:#245ba5}.note.sounding .note-name{font-weight:800;fill:#895014}

.continue-bar{font-size:13px;min-height:44px;margin-left:auto}.compose-context .continue-bar{flex-shrink:0}@media(max-width:600px){.compose-context .continue-bar{margin-left:0}}

.solo-listen{font-size:13px}@media(max-width:600px){.workspace .quick-listen .solo-listen{grid-column:1/-1}}

/* A phone gets three compact rows of composing controls, not a vertical button list. */
@media(max-width:600px){
 .workspace .part-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
 .workspace .part-tabs button{padding:8px 3px}
 .workspace[data-view=group] .quick-listen{display:contents}
 .workspace[data-view=group] .quick-listen [data-action=listen-all]{grid-column:1;grid-row:2}
 .workspace[data-view=group] .quick-listen [data-action=listen-bar]{grid-column:2;grid-row:2}
 .workspace[data-view=group] .quick-listen .solo-listen{grid-column:1;grid-row:3}
 .workspace[data-view=group] .focus-toggle{grid-column:2;grid-row:3}
 .workspace:not([data-view=group]) .view-bar{display:flex;flex-wrap:wrap}
 .workspace:not([data-view=group]) .quick-listen{width:100%;display:grid;grid-template-columns:1fr 1fr}
 .workspace:not([data-view=group]) .focus-name{flex:1;text-align:center}
 .workspace .continue-bar{font-size:12px;padding:6px 9px;min-height:44px}
 .workspace .compose-context span:last-of-type{font-size:12px}
 .head-actions .save-status{grid-column:1/-1;grid-row:2;min-height:14px;text-align:right}
}

.cinema-bar{background:rgba(255,254,246,.95);border:1px solid #c2ccb5;box-shadow:0 4px 18px #172c2433}.cinema-bar .playing-harmony{color:#294b3a}

.workspace .piano .key[data-key="72"],.workspace .piano .key[data-key="84"]{border-left:2px solid #a29579}

.workspace .piano .key:disabled{color:#737463;opacity:1}.workspace .piano .key:disabled b{color:#737463}.workspace .piano .key:disabled small{color:#737463}

.workspace .measure-select button[aria-pressed=true]{box-shadow:inset 0 -3px #315d49;border-color:#6c8955}.workspace .measure-progress{font-variant-numeric:tabular-nums}

.rhythm-pad:nth-child(2n+1){border-left:3px solid #81996c}.rhythm-pad:nth-child(2n){border-right:3px solid #81996c}.rhythm-marks .note:nth-child(2n){border-right:1px solid #aab99b}

.staff-scroll,.piano-scroll,.focus-scroll{scrollbar-color:#91a080 #edf1e4;scrollbar-width:thin}.staff-scroll:focus-visible,.piano-scroll:focus-visible,.focus-scroll:focus-visible{outline:3px solid #285ac3;outline-offset:2px}

@media print{.score-book,.score-system,.focus-card,.sheet{background:white!important;box-shadow:none!important}.sheet .staff-line,.sheet .bar-line,.sheet .ledger{stroke:#333}.sheet .chord-guide,.sheet .guide-dot,.beat-guide,.beat-count{display:none}.sheet{color:#111}}

.playback-score .note.sounding .note-head.hollow,.sheet .note.sounding .note-head.hollow{fill:#fffef8;stroke:currentColor}@media print{.playback-score .note.sounding .note-head.hollow,.sheet .note .note-head.hollow{fill:white;stroke:#111}}

.note-beam.beam-selected{fill:#245ba5}

.workspace[data-view=full] .sheet{max-height:none;height:auto}.workspace .note-name{paint-order:stroke;stroke:#fffef8;stroke-width:2px;stroke-linejoin:round}.workspace .register-mark{paint-order:stroke;stroke:#fffef8;stroke-width:1px}@media print{.workspace .note-name,.workspace .register-mark{stroke:white}}

.workspace .palette>button:disabled{color:#78826f;border-color:#d2d9c8;background:#f4f6ef;box-shadow:none;cursor:default;opacity:.65}
@media(max-width:600px){header{position:relative}.head-actions .save-status:has(>span){position:absolute;right:14px;top:31px;min-height:0}}

.workspace .sheet .note.selected{color:#245ba5}.workspace .sheet .note.selected .note-hit{fill:#dce9fa;fill-opacity:.5;stroke:#245ba5}.workspace .sheet .note.selected ellipse{stroke:#245ba5}

.workspace .sheet .note.selected.sounding .note-hit{fill:#ffe0a0;stroke:#245ba5;stroke-width:2}.workspace .sheet .note.sounding .note-name{fill:#895014}

.concert-hero h1,.work-list strong,.presentation .work-list small{overflow-wrap:anywhere;min-width:0}.work-list li>div{min-width:0}.concert-hero h1{line-height:1.35}

dialog.dialog{max-width:min(520px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #9caf8c;border-radius:14px;background:#fffef7;color:#294b3a;box-shadow:0 12px 50px #19372944}dialog.dialog::backdrop{background:#172c2466}

.workspace .piano .key .dot{width:7px;height:7px;box-shadow:0 0 0 1px #fffef8}.workspace .piano .key.tone::after{height:3px}

.rhythm-pad.playing-note{box-shadow:inset 0 0 0 3px #ffe1a1;outline:2px solid #a96b21;outline-offset:1px}.rhythm-marks .sounding{box-shadow:inset 0 -3px #a96b21}

.workspace .score-system .sheet{width:100%;height:auto;max-height:none}

.next-note-guide{stroke:#779262;stroke-width:1.5;stroke-dasharray:3 5;opacity:.7;pointer-events:none}@media print{.next-note-guide{display:none}}

/* Rhythm workbench: one playable measure and a compact eight-measure arrangement. */
.rhythm-workbench{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);gap:28px;padding:24px 8px 18px;color:#294b3a}
.rhythm-board-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.rhythm-kicker{font-size:13px;font-weight:700;color:#68805c}.rhythm-board h2{font-size:25px;margin:5px 0 0;line-height:1.35}.rhythm-instruction,.rhythm-arrangement>p{font-size:14px;line-height:1.6;color:#5b7058;margin:10px 0 20px}.rhythm-live-position{font-size:12px;white-space:nowrap;color:#926222}
.rhythm-beat-groups{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.rhythm-beat-pair>strong{display:block;text-align:center;margin-bottom:9px;font-size:15px}.rhythm-beat-pair>div{display:grid;grid-template-columns:1fr 1fr;gap:5px}.rhythm-workbench .rhythm-pad{display:flex;flex-direction:column;gap:6px;min-height:118px;min-width:44px;border:1px solid #bac9aa;border-radius:14px;padding:10px 3px;background:#f0f4e6;color:#466448;box-shadow:none}.rhythm-workbench .rhythm-pad>span{font-size:15px}.rhythm-workbench .rhythm-pad>b{font-size:24px}.rhythm-workbench .rhythm-pad>small{font-size:11px}.rhythm-workbench .rhythm-pad[aria-pressed=true]{background:#315d49;color:white;border-color:#315d49;box-shadow:inset 0 -4px #214735}
.rhythm-arrangement h3{font-size:17px;margin:0}.rhythm-arrangement>p{margin:5px 0 12px}.rhythm-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.rhythm-mini{display:grid;gap:8px;padding:10px 6px;min-width:0;min-height:82px;border:1px solid #cdd7c1;border-radius:9px;background:#fffef8;color:#566e4e;text-align:left}.rhythm-mini>strong{font-size:18px;line-height:1}.rhythm-mini strong small{font-size:11px;font-weight:400;margin-left:3px}.rhythm-mini>small{font-size:11px}.rhythm-mini[aria-pressed=true]{background:#e1ecd3;border:2px solid #527747;padding:9px 5px;color:#294b3a}.rhythm-mini-notes{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:2px}.rhythm-mini-notes i{height:8px;border-radius:2px;background:#dde5d3}.rhythm-mini-notes .rhythm-mini-hit{background:#46744e}.rhythm-mini.playing{box-shadow:inset 0 0 0 2px #b77d2e;background:#fff2d0}.rhythm-mini-notes .note.sounding{background:#b77d2e;outline:1px solid #724b15}
.rhythm-arrangement .quick-listen{display:flex!important;flex-wrap:wrap;gap:7px;margin-top:16px}.rhythm-arrangement .quick-listen button{flex:1;min-height:44px;font-size:12px;white-space:nowrap;padding:9px 8px}.rhythm-arrangement .rhythm-history{padding:8px 0 0!important;margin:0!important;justify-content:flex-start}.shaker-workspace .transport{margin-top:12px}
@media(max-width:800px){.rhythm-workbench{grid-template-columns:1fr;gap:24px;padding:18px 0}.rhythm-arrangement .quick-listen button{font-size:13px}.rhythm-beat-groups{gap:10px}}
@media(max-width:480px){.rhythm-board h2{font-size:22px}.rhythm-beat-groups{grid-template-columns:repeat(2,minmax(0,1fr))}.rhythm-workbench .rhythm-pad{min-height:90px}.rhythm-live-position{font-size:11px}.rhythm-mini{min-height:80px}.rhythm-workbench .quick-listen .solo-listen{grid-column:auto}}

/* The orbit makes one 4/4 measure tangible; the arrangement never scrolls sideways. */
.rhythm-workbench{grid-template-columns:minmax(320px,.95fr) minmax(300px,1fr);gap:40px;padding:24px 12px;align-items:center}
.rhythm-board-heading h2{margin:0;font-size:26px}.rhythm-instruction{margin:8px 0 14px;font-size:14px}.rhythm-board-heading{min-height:36px}.rhythm-orbit{position:relative;width:min(100%,336px);aspect-ratio:1;margin:0 auto;border-radius:50%;background:radial-gradient(circle,#fffef8 0 31%,#eaf0df 32% 50%,#f4f7ed 51% 68%,transparent 69%)}
.rhythm-orbit-track{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.rhythm-orbit-track circle{fill:none;stroke:#b3c69e;stroke-width:3}.rhythm-orbit-track path{fill:#819e68;stroke:none}
.rhythm-workbench .orbit-step{position:absolute;left:var(--x);top:var(--y);width:70px;height:70px;min-height:0;min-width:0;border-radius:50%;padding:6px;gap:1px;justify-content:center;transform:translate(-50%,-50%);border:2px solid #bacba9;background:#fffef8;box-shadow:0 3px 0 #d5dfc7;color:#3c6044}.rhythm-workbench .orbit-step>span{font-size:16px;font-weight:700;color:inherit}.rhythm-workbench .orbit-step>b{font-size:24px;line-height:1.05;color:inherit}.rhythm-workbench .orbit-between{width:54px;height:54px;background:#eaf0df;border-style:dashed}.rhythm-workbench .orbit-between>span{font-size:12px;font-weight:500}.rhythm-workbench .orbit-between>b{font-size:21px}
.shaker-workspace .rhythm-workbench .orbit-step[aria-pressed=true],.shaker-workspace .rhythm-workbench .orbit-step[aria-pressed=true]:hover{background:#315d49;border-color:#315d49;border-style:solid;color:#fffef8;box-shadow:0 3px 0 #173c2a}.shaker-workspace .rhythm-workbench .orbit-step[aria-pressed=false]:hover{background:#e2ecd4;color:#294b3a}.shaker-workspace .rhythm-workbench .orbit-step:active{transform:translate(-50%,calc(-50% + 2px))}.rhythm-orbit-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:138px;display:grid;justify-items:center;text-align:center;gap:7px}.rhythm-orbit-center>strong{font-size:38px;line-height:1;font-weight:700;color:#315d49}.rhythm-orbit-center strong small{font-size:14px;font-weight:500;margin-left:4px;color:inherit}.rhythm-orbit-center>span{font-size:11px;color:#607453;min-height:15px}.rhythm-orbit-center .orbit-listen{min-height:44px;border-radius:22px;border:1px solid #bccca9;background:#fffef8;color:#315d49;padding:10px 16px;font-size:13px;white-space:nowrap}
.rhythm-orbit-key{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:14px 0 0;color:#607453;font-size:12px;line-height:1.5}.rhythm-orbit-key span:first-child{color:#315d49;font-weight:700}.rhythm-arrangement .quick-listen{display:grid!important;grid-template-columns:1fr 1fr}.shaker-workspace .rhythm-mini[aria-pressed=true]:hover{background:#d4e4c1;color:#294b3a}.rhythm-workbench .rhythm-mini strong small,.rhythm-workbench .rhythm-mini>small{color:inherit}
@media(max-width:820px){.rhythm-workbench{grid-template-columns:1fr;gap:24px;padding:18px 0}.rhythm-board,.rhythm-arrangement{width:100%;max-width:520px;margin:0 auto}.rhythm-board-heading{justify-content:center}.rhythm-instruction{text-align:center}}
@media(max-width:480px){.rhythm-board-heading h2{font-size:23px}.rhythm-orbit{width:min(100%,324px)}.rhythm-workbench .orbit-step{width:64px;height:64px}.rhythm-workbench .orbit-between{width:50px;height:50px}.rhythm-orbit-center{width:126px}.rhythm-orbit-center>strong{font-size:34px}.rhythm-orbit-key{gap:6px;font-size:11px}.rhythm-live-position:empty{display:none}}

.piano .key.carol-tone{box-shadow:inset 0 0 0 3px #b98836}
.rhythm-workbench .rhythm-pad.current-beat{outline:3px solid #bb872f;outline-offset:4px}
.rhythm-workbench .rhythm-pad.playing-note{box-shadow:0 0 0 6px #f0dba4}

.export-format{display:grid;gap:8px;margin-top:14px}.export-format select{width:100%;min-width:0;font:inherit;white-space:normal}

.ensemble-hint{margin:8px 0 0;color:#40604d;font-size:13px;line-height:1.5}
.forest-start-card{position:fixed;z-index:4;right:24px;bottom:30px;display:grid;gap:10px;max-width:310px;padding:16px;background:#fffdf3ed;border:1px solid #b9ccb5;border-radius:18px;box-shadow:0 8px 28px #142a3024;color:#284c3c}
.forest-start-card span{font-size:14px;line-height:1.5}
@media(max-width:600px){.forest-start-card{left:16px;right:16px;bottom:215px;max-width:none;padding:12px;gap:6px}.forest-start-card span{font-size:13px}}


/* Phone composer: keep the same controls, but remove stacked toolbar rows. */
@media(max-width:600px){
 body.forest-mode{--band:90px}
 body.forest-mode:not(.forest-cinema) .workspace{margin-top:100px;padding:8px 10px}
 .workspace .compose-tools{padding:0;margin:0}
 .workspace .part-tabs{display:flex;gap:4px;flex-wrap:wrap;margin:6px 0}
 .workspace .part-tabs>span{width:100%;font-size:12px}
 .workspace .part-tabs button{flex:1;min-width:52px;min-height:44px;padding:6px 2px;font-size:12px}
 .workspace .part-check{display:none}
 .workspace .ensemble-hint{font-size:11px;margin:4px 0;line-height:1.4}
 .workspace[data-view] .view-bar{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;padding:5px 0;scrollbar-width:thin}
 .workspace[data-view] .quick-listen{display:flex!important;flex:0 0 auto;width:auto;gap:6px}
 .workspace .view-bar button{flex:0 0 auto;min-width:72px;min-height:44px;padding:6px;font-size:12px;white-space:nowrap}
 .workspace .view-bar .group-switch{flex:0 0 auto;gap:4px}
 .workspace .compose-context{margin:4px 0;padding:4px;gap:4px}
 .workspace .compose-context span:last-of-type{display:none}
 .workspace .score-scroll-hint{margin:3px 6px;font-size:11px}
 .workspace .measure-select{padding-top:4px;padding-bottom:4px}
 .workspace .palette{margin-top:6px;padding:4px;gap:4px}
 .workspace .duration-group{width:100%;gap:4px}
 .workspace .duration-group button{flex:1;display:flex;flex-direction:row;justify-content:center;padding:2px;gap:2px;min-height:44px}
 .workspace .duration-icon{height:24px;width:18px}
 .workspace .palette>button,.workspace .history-buttons button{min-height:44px;padding:4px;font-size:12px}
 .workspace .duration-help{margin:3px 0;font-size:11px}
 .workspace .keyboard-panel{padding:6px;margin-top:4px}
 .workspace .piano-nav{margin:3px 0}
 .workspace .piano .key,.workspace .piano .key.tone{height:120px;min-height:120px}
 .workspace .piano .key small{font-size:10px}
}
@media(max-width:600px){
 body.forest-mode:not(.forest-cinema) .workspace{margin-top:56px}
 .workspace .focus-card{margin:4px 0;padding:4px}
 .workspace .focus-card .sheet{width:100%;min-width:0;max-height:140px}
 .workspace .piano{min-height:150px;height:150px}
 .workspace .piano-keys{min-height:120px;height:120px}
}
@media(max-width:600px){
 .workspace .view-bar .focus-name{flex:0 0 auto;min-width:64px;white-space:nowrap;font-size:13px}
 .workspace .view-bar [data-action=prev],.workspace .view-bar [data-action=next]{min-width:44px}
 .workspace>.forest-bar{position:static;width:auto;margin:0 0 6px;padding:0}
 .workspace>.forest-bar .forest-map-choice{padding:0;max-width:none}
 .workspace>.forest-bar .forest-map-choice small{font-size:10px}
 body.forest-mode:not(.forest-cinema) .workspace{margin-top:12px}
 .workspace .keyboard-panel .piano-nav{gap:4px}
}
@media(max-width:600px){
 .workspace .keyboard-panel{display:flex;flex-direction:column;gap:4px}
 .workspace .keyboard-panel .piano-scroll{order:0}
 .workspace .keyboard-panel .piano-nav{order:1}
 .workspace .keyboard-panel .free-choice{order:2}
 .workspace .keyboard-panel .piano-hint,.workspace .keyboard-panel .harmony-note{order:3}
 .workspace .focus-card .sheet{max-height:120px}
}


/* Keep listening and score controls visible instead of clipping them sideways. */
@media(max-width:600px){
 .workspace[data-view] .view-bar{flex-wrap:wrap;overflow:visible;gap:4px}
 .workspace[data-view] .view-bar .quick-listen{order:2;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));flex:1 0 100%;width:100%;gap:4px}
 .workspace[data-view] .view-bar .quick-listen button{grid-column:auto!important;grid-row:auto!important;min-width:0;padding:6px 2px;white-space:normal;font-size:12px}
 .workspace .view-bar .focus-name{min-width:52px;font-size:12px}
 .workspace .view-bar .view-toggle,.workspace .view-bar .focus-toggle{flex:1;min-width:76px;font-size:11px;padding:6px 3px}
 .workspace .view-bar .group-switch{flex:1}
 .workspace .view-bar .group-btn{min-width:70px}
}

/* Recommendation stays distinct from the key's ivory shading and playback glow. */
.workspace .piano .key.carol-tone{outline:3px solid #b98836;outline-offset:-4px}
.workspace .piano .key.carol-tone:focus-visible{outline:3px solid #285ac3;outline-offset:2px}
/* Keyboard pass 1: a crafted walnut cabinet with a felt rail. */
.workspace .piano{position:relative;min-width:804px;height:176px;min-height:176px;padding:25px 12px 15px;border:1px solid #533927;border-radius:12px;background:linear-gradient(180deg,#b28a5b,#755034 20%,#4b3326 78%,#8e603d);box-shadow:inset 0 2px 1px #f5d6a3,inset 0 -5px 0 #3a291f,0 5px 10px #31271d26}
.workspace .piano::before{content:'';position:absolute;left:12px;right:12px;top:10px;height:1px;background:#e9c68d99;box-shadow:0 2px #34281d80;pointer-events:none}
.workspace .piano-keys{height:132px;min-height:132px;border-top:4px solid #704347;border-radius:3px;background:#27231f;box-shadow:0 -2px 0 #2b201b,0 1px 0 2px #2b201b}
/* Keyboard pass 2: ivory key faces, front lips and polished ebony caps. */
.workspace .piano .key,.workspace .piano .key.tone,.workspace .piano .key.tone:hover:not(:disabled){flex:1 0 52px;min-width:52px;width:52px;height:132px;min-height:132px;padding:0 2px 13px;border:0;border-right:1px solid #b9b0a0;border-radius:0 0 5px 5px;color:#263d31;background:linear-gradient(180deg,#b9b2a3a6,transparent 34%),linear-gradient(90deg,#ded8cb,#fffef7 8%,#fffdf5 87%,#ede7d9);box-shadow:inset 0 -7px #c9bdab,inset 0 -9px #fffcf0,0 2px 1px #241f1d;transform:none}
.workspace .piano .key:disabled{opacity:1;color:#64645b;background:linear-gradient(180deg,#b9b2a366,transparent 34%),linear-gradient(90deg,#d8d2c6,#eeeae0 12%,#eeeae0 88%,#d8d2c6);box-shadow:inset 0 -7px #c1b8a8,inset 0 -9px #f5f1e6}
.workspace .piano .black-key{height:54%;width:calc(100%/15*.57);border:1px solid #151a18;border-radius:0 0 4px 4px;background:linear-gradient(90deg,#161b19,#424944 12%,#262d29 23%,#202723 80%,#101612);box-shadow:inset 0 -8px #101511,inset 0 -10px #5a6157,inset 1px 0 #a1a49966,2px 5px 4px #10180f55}
.workspace .piano .black-key::after{inset:3px 4px 12px;border-top:1px solid #bdc4b37a;border-left:1px solid #8c968133;background:linear-gradient(110deg,#ffffff16,transparent 45%)}
/* Keyboard pass 3: readable names and distinct guidance without tinting the ivory. */
.workspace .piano .key b{font-size:20px;line-height:1.2;font-weight:800;text-shadow:0 1px #fff9;letter-spacing:0}
.workspace .piano .key small{font-size:11px;line-height:1.5;color:#525c4e}
.workspace .piano .key:disabled b,.workspace .piano .key:disabled small{color:#66655c;text-shadow:none}
.workspace .piano .key .dot{width:6px;height:6px;margin:0 0 7px;background:#437547;box-shadow:0 0 0 3px #e5efdc;border-radius:50%}
.workspace .piano .key.carol-tone{outline:2px solid #b98836;outline-offset:-4px}
.workspace .piano .key.carol-tone::after{content:'';position:absolute;left:32%;right:32%;bottom:9px;height:3px;border-radius:2px;background:#b98836;pointer-events:none}
.workspace .piano .key.current{outline:3px solid #386e93;outline-offset:-4px}
.workspace .piano .key:focus-visible,.workspace .piano .key.carol-tone:focus-visible{outline:3px solid #285ac3;outline-offset:-4px}
/* Keyboard pass 4: tactile feedback; selected, recommended and sounding are separate states. */
.workspace .piano{background-image:linear-gradient(180deg,#edc38b55,#271b1644 30%,#25191266 85%,#b98a5255),url('./assets/ui/walnut-keyboard.webp');background-size:cover;background-position:center}
.workspace .piano .key.current{box-shadow:inset 0 -7px #aebbc2,inset 0 -9px #f8fcff,0 2px 1px #241f1d}
.workspace .piano .key.current b{color:#2d5875}
.workspace .piano .key:is(.pressing,.playing-note):not(:disabled),.workspace .piano .key:is(.pressing,.playing-note):hover:not(:disabled){transform:translateY(2px);background:linear-gradient(180deg,#9ab2a0,#eaf5df 50%,#d7e8c4);box-shadow:inset 0 -3px #879e80,inset 0 -5px #f5ffe9;color:#213e2b}
.workspace .piano .key.playing-note .dot{background:#305b35;box-shadow:0 0 0 4px #c3d9b2}
.workspace .piano .key{transition:transform 80ms ease,box-shadow 80ms ease,background-color 80ms ease}
@media(prefers-reduced-motion:reduce){.workspace .piano .key:is(.pressing,.playing-note):not(:disabled),.workspace .piano .key:is(.pressing,.playing-note):hover:not(:disabled){transform:none}.workspace .piano .key{transition:none}}
/* Keyboard pass 5: thumb-sized keys and quiet navigation on small screens. */
.workspace .piano-scroll{border-radius:12px;padding-bottom:4px;scroll-padding-inline:12px;scrollbar-color:#a88a5d #e9e2d1;scrollbar-width:thin}
.workspace .piano-nav button{min-height:44px;min-width:80px;border:1px solid #b6bda7;border-radius:8px;background:linear-gradient(#fffef8,#e9eedf);color:#344d39;box-shadow:0 2px 0 #b9c2ac}
.workspace .piano-nav button:disabled{box-shadow:none;opacity:.5}
.workspace .piano-range{font-size:12px;color:#43513e;font-weight:600}
.workspace .piano .key[data-key="72"],.workspace .piano .key[data-key="84"]{border-left:2px solid #ac9675}
@media(max-width:600px){.workspace .piano-nav{margin:5px 0 2px;gap:5px}.workspace .piano-nav button{min-width:76px}.workspace .piano-hint{font-size:11px;line-height:1.6}.workspace .keyboard-edit-hint{font-size:12px;line-height:1.6}}
/* Give the two four-measure ranges their own row on narrow screens. */
@media(max-width:600px){.workspace[data-view=group] .view-bar .group-switch{flex:1 0 100%;width:100%;min-width:0}.workspace[data-view=group] .view-bar .group-btn{flex:1;min-width:0}}
/* Keep the four-measure overview, with a separate touch-sized edit staff below it. */
.mobile-detail{margin:10px 0;border:1px solid #b7c5ab;border-radius:10px;background:#fffef8;padding:10px 8px}
.mobile-detail h3{margin:0 0 4px;font-size:15px;color:#31573e}
.mobile-detail p{margin:0 0 6px;font-size:12px;line-height:1.5;color:#56664c}
.workspace .mobile-detail .sheet.focus-sheet,.workspace .focus-card .sheet.focus-sheet{min-width:480px;max-height:none;height:auto}
.workspace .mobile-detail .focus-scroll{max-width:100%}

/* Keep navigation outside draggable notes, with the same touch size as piano controls. */
.score-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:6px 0}
.score-nav[hidden]{display:none}
.workspace .score-nav button{min-height:44px;min-width:84px;padding:6px 10px;border:1px solid #b6bda7;border-radius:8px;background:#f4f7ec;color:#344d39;font-size:13px}
.workspace .score-nav button:disabled{opacity:.45}
.score-nav output{font-size:12px;color:#43513e;font-weight:600;text-align:center}
