:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#253930;background:#f7f7f0;--ink:#253930;--green:#365e48;--line:#dce0d5;--beat:calc(100% / 32);--label:200px}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,select{cursor:pointer}button{border:1px solid var(--line);background:#fffef9;color:var(--ink);border-radius:7px;padding:10px 14px;font-size:13px;font-weight:650;white-space:nowrap}button:hover{background:#eaf0e5;border-color:#a5b6a3}button:disabled{opacity:.4;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #db782e;outline-offset:3px}button[aria-pressed=true]{background:#e3ebdd;border-color:#8da480}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#254936}.primary.playing{background:#b25a30}header{max-width:1440px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:27px 48px;border-bottom:1px solid var(--line);gap:20px}.brand{display:flex;gap:16px;align-items:center}.brandmark{font-size:36px;color:#a6b58b}.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:750;margin:0 0 12px;color:#6d7c66}h1{font-size:28px;letter-spacing:-1px;margin:0;font-weight:700}.version{font-size:11px;border:1px solid #cfd7c5;border-radius:20px;padding:4px 7px;vertical-align:middle;margin-left:10px;letter-spacing:0}.header-actions{display:flex;align-items:center;gap:9px}.local{font-size:11px;margin-right:12px;color:#68825e}main{max-width:1440px;margin:auto;padding:0 48px}.intro{display:flex;justify-content:space-between;align-items:center;padding:38px 0 32px;gap:25px}h2{font-size:46px;letter-spacing:-2px;line-height:1.08;margin:0 0 16px;font-weight:650}.intro>div>p:last-child{font-size:14px;color:#71806c;margin:0}.lesson{border-left:2px solid #bbc8aa;padding:0 0 0 24px;width:285px}.lesson-number{font-size:9px;letter-spacing:1.5px;color:#7d886f}.lesson h3{font-size:18px;line-height:1.4;margin:12px 0 8px}.lesson p{font-size:12px;line-height:1.6;color:#7b8673;margin:0 0 12px}.pill{display:inline-block;border-radius:20px;background:#e9eddf;color:#657553;font-size:10px;padding:5px 10px}.studio{background:#fffef9;border:1px solid #d3dbca;border-radius:13px;box-shadow:0 8px 28px #34442a08;overflow:hidden}.transport{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:17px 20px;background:#f0f3e9;border-bottom:1px solid var(--line);flex-wrap:wrap}.play-controls,.music-controls{display:flex;gap:10px;align-items:center}.play-controls .primary{min-width:98px;padding:12px}.music-controls label{font-size:11px;color:#59664f;display:flex;gap:7px;align-items:center}.music-controls input[type=number]{width:56px;border:1px solid #cbd3bf;border-radius:5px;padding:6px;color:#31442c;background:#fffef9;font-weight:700}.music-controls select{font-size:12px;padding:7px;border:1px solid #cbd3bf;border-radius:5px;background:#fffef9}.music-controls input[type=range]{width:75px;accent-color:#577549}.check{font-size:11px;display:flex;align-items:center;gap:3px;margin-left:4px}.check input{accent-color:#537746}.arrangement-heading{display:flex;align-items:center;justify-content:space-between;padding:24px 20px 20px;gap:10px}h3{margin:0;font-size:16px}.arrangement-heading p{margin:6px 0 0;font-size:11px;color:#7e8979}.tools{display:flex;gap:5px}.tools button{padding:8px 11px;font-size:11px}.scroll{overflow:auto}#timeline{min-width:850px;position:relative;user-select:none;padding-bottom:8px}.ruler-row,.track{display:grid;grid-template-columns:var(--label) 1fr}.ruler-row{height:32px;border-top:1px solid #e6eade;border-bottom:1px solid var(--line)}.ruler-label{font-size:8px;letter-spacing:1px;color:#8a9582;padding:10px 20px}#ruler{display:grid;grid-template-columns:repeat(8,1fr)}#ruler button{border:0;border-left:1px solid #e0e5d7;border-radius:0;text-align:left;padding:0 8px;background:#f6f7f0;font-size:10px;color:#6a7a60}.track{min-height:78px;border-bottom:1px solid #e4e7dc}.track-controls{padding:12px 15px 10px 20px;position:relative;display:grid;grid-template-columns:1fr auto;gap:8px;align-content:center;border-right:1px solid #dfe5d7}.track-name{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:128px}.track-name:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--color);margin-right:7px}.track-number{font-size:10px;color:#abb49e}.track-actions{display:flex;align-items:center;gap:4px;grid-column:1 / -1}.track-actions button{font-size:9px;padding:4px 7px;border-radius:4px}.track-actions input{width:63px;height:12px;accent-color:var(--color);margin-left:auto}.lane{position:relative;touch-action:none;background:repeating-linear-gradient(to right,#cdd6c780 0,#cdd6c780 1px,transparent 1px,transparent 12.5%),repeating-linear-gradient(to right,#e8ebdf80 0,#e8ebdf80 1px,transparent 1px,transparent 3.125%),#fbfcf7;min-height:78px;cursor:crosshair}.lane[data-silent=true]{opacity:.4}.clip{position:absolute;top:12px;height:54px;border-radius:5px;border:1px solid var(--color);background:var(--clip-fill,var(--color));color:#283d32;overflow:hidden;cursor:pointer;box-shadow:0 2px 0 #00000008;padding:8px;text-align:left;touch-action:none}.clip::after{content:"";position:absolute;inset:25px 6px 6px;background:repeating-linear-gradient(90deg,var(--color) 0,var(--color) 2px,transparent 2px,transparent 8px);opacity:.45;clip-path:polygon(0 40%,4% 0,8% 55%,12% 20%,16% 75%,20% 35%,24% 0,28% 60%,32% 15%,36% 50%,40% 10%,44% 60%,48% 25%,52% 0,56% 50%,60% 20%,64% 70%,68% 10%,72% 45%,76% 0,80% 60%,84% 15%,88% 65%,92% 30%,96% 0,100% 40%,100% 75%,0 75%)}.clip.selected{outline:2px solid #243d2f;outline-offset:2px}.clip span{font-size:10px;white-space:nowrap;position:relative;z-index:1}.clip .handle{position:absolute;right:1px;top:0;bottom:0;width:10px;background:#ffffff35;cursor:ew-resize;font-size:15px;display:grid;place-items:center}.selection{display:flex;justify-content:space-between;align-items:center;padding:12px 20px;gap:12px;border-bottom:1px solid var(--line);font-size:11px;color:#79856d}.selection button{font-size:11px;padding:7px 10px}.studio-foot{display:flex;justify-content:space-between;gap:15px;padding:12px 20px;font-size:10px;color:#718268;background:#f8faf3}#position{letter-spacing:1px;white-space:nowrap}#playhead{position:absolute;left:var(--label);top:0;bottom:8px;width:2px;background:#d77036;pointer-events:none;display:none;z-index:5}#playhead:before{content:"";position:absolute;top:0;left:-4px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:7px solid #d77036}.bottom{display:grid;grid-template-columns:1.45fr 1fr;gap:32px;padding:32px 0}.section-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px}.section-heading .eyebrow{margin-bottom:8px}.section-heading button{font-size:11px;padding:7px 10px}#palette{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.sound{padding:13px;border:1px solid var(--line);border-radius:8px;background:#fffef9;display:flex;gap:10px;align-items:center;cursor:grab}.sound-icon{font-size:18px;width:35px;height:35px;display:grid;place-items:center;border-radius:7px;background:color-mix(in srgb,var(--color),white 80%);color:var(--color)}.sound-info{flex:1}.sound h4{font-size:11px;margin:0 0 5px}.sound p{font-size:9px;color:#849078;margin:0}.sound button{font-size:10px;padding:6px}.hint{font-size:11px;color:#839076;line-height:1.6}.imports{border-left:1px solid var(--line);padding-left:30px}.imports h3{margin-bottom:10px}.imports>p:not(.eyebrow){font-size:12px;line-height:1.65;color:#7d8973}.imports>button{width:100%;text-align:left;margin-bottom:8px}.import-loop{display:flex;align-items:center;justify-content:space-between;gap:10px}.import-loop button{flex:1;text-align:left}.import-loop label{font-size:10px;color:#77816f;white-space:nowrap}.import-loop select{border:1px solid #cfd7c5;border-radius:4px;background:#fffef9;font-size:11px;padding:5px}details{font-size:11px;color:#64765c;line-height:1.6}summary{cursor:pointer}audio{width:100%;height:34px}#mixLabel{font-size:11px;overflow-wrap:anywhere}footer{font-size:9px;color:#909985;border-top:1px solid var(--line);padding:20px 0 30px;display:flex;justify-content:space-between;gap:20px}dialog{max-width:440px;border:1px solid #d1d9c9;border-radius:13px;padding:25px;background:#fffef9;color:var(--ink)}dialog::backdrop{background:#20342670}dialog p{font-size:14px;line-height:1.6}body[data-tool=move] .lane{cursor:grab}body[data-tool=erase] .lane{cursor:cell}@media(max-width:1000px){header{padding:22px 25px}main{padding:0 25px}.music-controls .master{display:none}.transport{gap:12px}.lesson{width:240px}.header-actions .local{display:none}}@media(max-width:700px){header{padding:20px;align-items:flex-start}.header-actions{flex-wrap:wrap;justify-content:flex-end}.header-actions button{font-size:10px;padding:8px}.brandmark{display:none}h1{font-size:24px}.brand .eyebrow{font-size:8px;max-width:160px;line-height:1.5;margin-bottom:6px}main{padding:0 16px}.intro{padding:28px 4px}h2{font-size:36px}.lesson{display:none}.intro>div>p:last-child{font-size:12px;line-height:1.5}.arrangement-heading{align-items:flex-start;flex-direction:column}.bottom{grid-template-columns:1fr;gap:24px}.imports{border:0;border-top:1px solid var(--line);padding:24px 0 0}.selection{flex-wrap:wrap;padding:12px}.studio-foot{padding:12px;font-size:9px}.transport{padding:12px}.check{font-size:10px}.music-controls{width:100%}footer{flex-direction:column;gap:8px}}
.bottom>*{min-width:0}.sound-info{min-width:0}.sound h4{overflow-wrap:anywhere}.sound-shelf,.imports{min-width:0}@media(max-width:700px){#palette{grid-template-columns:1fr}.sound-info{flex:1}.sound h4{font-size:12px}.sound p{font-size:10px}.sound button{padding:8px 11px}.header-actions{max-width:175px}.brand{min-width:0}.check{white-space:nowrap}}

.lane{background:linear-gradient(to right,#cdd6c780 1px,transparent 1px),linear-gradient(to right,#e8ebdf80 1px,transparent 1px),#fbfcf7}.clip{pointer-events:none}.archive-note{font-size:11px;line-height:1.6;margin:0;padding:12px 20px;background:#fff4df;color:#785d32}.archive-note[hidden]{display:none}body[data-tool=erase] .lane{cursor:cell}

/* Language and the horizontally scrolling 32-bar canvas. */
:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}.header-actions{flex-wrap:wrap;justify-content:flex-end}.header-actions #language{font-size:12px}.timeline-hint{margin:0;padding:0 20px 12px;font-size:11px;line-height:1.6;color:#718268}.scroll{scrollbar-gutter:stable;overscroll-behavior-x:contain}.track-controls,.ruler-label{position:sticky;left:0;z-index:3;background:#fffef9}.ruler-label{background:#f6f7f0}.mix-controls{display:grid;grid-template-columns:auto 1fr;gap:9px;align-items:center;margin:8px 0 14px}.mix-controls input{min-width:0;width:100%;accent-color:#577549}.mix-controls #mixPosition{font-size:11px;white-space:nowrap}.mix-controls #mixVolume{max-width:120px;justify-self:end}.mix-controls button{font-size:12px}#mixPlayer{display:none}html[lang=zh-Hans] .eyebrow{letter-spacing:1px}html[lang=zh-Hans] h2{letter-spacing:0;line-height:1.2}html[lang=zh-Hans] h1{font-size:25px;letter-spacing:0}html[lang=zh-Hans] .track-actions button{padding:4px 6px}.studio-foot{flex-wrap:wrap}.play-controls{flex-wrap:wrap}.music-controls{flex-wrap:wrap}@media(max-width:700px){header{flex-wrap:wrap}.header-actions{max-width:none;width:100%;justify-content:flex-start}.brand .eyebrow{max-width:none}.header-actions #language{margin-right:auto}.transport{align-items:flex-start}.check{margin-left:0}.music-controls{gap:9px}.timeline-hint{padding:0 20px 12px}.studio-foot #position{margin-left:auto}html[lang=zh-Hans] h1{font-size:24px}}

.music-controls .master{display:flex}

/* Private restoration starting points. */
.starting-points{margin:0 0 22px;padding:18px 20px;border:1px solid var(--line);border-radius:12px;background:#f0f3e9}.starting-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}.starting-heading p{font-size:12px;line-height:1.6;color:#71806c;margin:6px 0 15px}.starting-heading .pill{white-space:nowrap}.starting-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.starting-cards button{display:flex;flex-direction:column;align-items:flex-start;gap:7px;text-align:left;padding:13px 15px;white-space:normal}.starting-cards strong{font-size:14px}.starting-cards span{font-size:11px;line-height:1.5;font-weight:400;color:#71806c}.starting-points .hint{margin:12px 0 0}.starting-confirm-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}#startingPointConfirm{max-width:540px}@media(max-width:700px){.starting-heading{flex-direction:column;gap:0}.starting-heading .pill{margin-bottom:12px}.starting-cards{grid-template-columns:1fr}.starting-cards button{flex-direction:row;justify-content:space-between;align-items:center;gap:15px}.starting-cards span{text-align:right;max-width:60%}.starting-points{padding:16px}.starting-confirm-actions button{white-space:normal}}

/* Version 06: the composition is the main workspace; panels scroll internally. */
:root{--label:180px}body{min-width:280px}header{width:100%;max-width:none;padding:10px 22px;gap:16px;min-height:66px}.brand{gap:10px}.brandmark{font-size:28px}.brand .eyebrow{font-size:9px;margin:0 0 4px}h1{font-size:23px}.header-actions{gap:7px}.header-actions .local{margin:0 5px}.header-actions button{min-height:40px}main{width:100%;max-width:none;padding:0 22px;display:flex;flex-direction:column;gap:12px}.intro{padding:12px 0 0;gap:24px;align-items:center}.intro-copy{min-width:0;flex:1}.intro .eyebrow{font-size:9px;margin:0 0 5px}h2{font-size:clamp(20px,2.3vw,32px);letter-spacing:-.7px;line-height:1.2;margin:0 0 6px}.intro>div>p:last-child{font-size:12px;line-height:1.4}.lesson{display:flex;align-items:center;width:min(43%,500px);gap:14px;padding:0 0 0 18px}.prompt-copy{flex:1;min-width:0}.lesson-number{font-size:9px;letter-spacing:1px}.lesson h3{font-size:14px;line-height:1.3;margin:5px 0}.lesson p{font-size:11px;line-height:1.4;margin:0}.prompt-next{flex-shrink:0;min-width:44px;min-height:44px;border-radius:50%;font-size:25px;font-weight:400;padding:2px}.studio{display:flex;flex-direction:column;min-height:320px;flex:1}.transport{padding:9px 12px;gap:8px}.play-controls{gap:7px}.play-controls button{min-height:44px}.play-controls .primary{min-width:86px;padding:10px}.music-controls{gap:12px}.music-controls input[type=number],.music-controls select{min-height:40px}.music-controls .master{display:flex}.music-controls input[type=range]{width:80px;min-height:32px}.check{min-height:44px}.arrangement-heading{padding:8px 12px;gap:12px;flex-wrap:wrap}.arrangement-heading h3{font-size:14px}.arrangement-heading p{margin:3px 0 0;font-size:10px}.tools{margin-left:auto}.tools button{min-height:44px;font-size:12px;padding:8px 12px}.starting-points{display:flex;align-items:center;gap:8px;margin:0 0 0 auto;padding:0;background:none;border:0;border-radius:0}.starting-points label{font-size:11px}.starting-points select{max-width:225px;min-height:44px;padding:8px;border:1px solid #cbd3bf;border-radius:7px;background:#fffef9;font-size:12px;color:var(--ink)}.timeline-hint{padding:0 12px 6px;font-size:10px;line-height:1.3}.scroll{flex:1;min-height:155px;overflow:auto;scrollbar-gutter:stable;overscroll-behavior:contain;border-top:1px solid var(--line)}#timeline{padding-bottom:0}.ruler-row{position:sticky;top:0;z-index:6;height:34px;border-top:0}.ruler-label{z-index:7;padding:11px 12px}.track,.lane{min-height:78px}.track-controls{padding:8px 10px;gap:4px}.track-name{max-width:138px}.track-actions button{min-height:30px;font-size:10px;padding:4px 7px}.track-actions input{min-height:26px;width:55px}.clip{top:10px;height:57px}#playhead{bottom:0}.selection{padding:6px 12px;font-size:10px;line-height:1.3}.studio-foot{padding:7px 12px;font-size:10px;flex-wrap:nowrap;align-items:center}.studio-foot #status{min-width:0;overflow-wrap:anywhere}.archive-note{padding:5px 12px;font-size:10px;line-height:1.4}.bottom{display:block;padding:0;flex-shrink:0}.section-heading{margin-bottom:6px;gap:10px}.section-heading .eyebrow{display:none}.section-heading h3{font-size:13px}.section-heading button{min-height:36px;padding:6px 10px}.palette-actions{display:flex;gap:7px}#palette{display:flex;gap:8px;overflow-x:auto;padding:0 0 5px;scrollbar-gutter:stable;overscroll-behavior-x:contain}.sound{flex:1 0 225px;padding:8px;gap:7px}.sound-icon{width:28px;height:28px;font-size:16px}.sound h4{font-size:11px;margin:0 0 4px}.sound p{font-size:9px}.sound button{min-width:36px;min-height:40px;padding:6px;font-size:12px}.sound-shelf>.hint{font-size:10px;margin:2px 0 0;line-height:1.4}footer{padding:0 0 7px;border:0;font-size:9px;line-height:1.4;flex-shrink:0}dialog{max-height:calc(100dvh - 32px);overflow:auto;width:min(540px,calc(100vw - 28px));margin:auto;max-width:none}dialog button{min-height:44px}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}.imports{border:0;padding:0}.imports>p.eyebrow,.imports>h3{display:none}.imports>button{min-height:44px}.imports .hint{color:#657553}.import-loop{flex-wrap:wrap}.import-loop label{font-size:12px}.import-loop select{min-height:40px}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}html[lang=zh-Hans] h2{line-height:1.2}html[lang=zh-Hans] h1{font-size:22px}.workshop-sharing{font-size:10px;line-height:1.4;margin:0;padding:5px 12px!important}
@media(min-width:700px) and (min-height:600px){body{height:100vh;height:100dvh;display:flex;flex-direction:column}header{flex-shrink:0}main{flex:1;min-height:0}.studio{min-height:250px}.scroll{min-height:140px}}
@media(max-width:1050px){header,main{padding-left:16px;padding-right:16px}.header-actions .local{display:none}.intro{gap:14px}.lesson{width:43%;padding-left:14px}.music-controls{gap:8px}.starting-points{margin-left:0}.arrangement-heading{gap:8px}.starting-points label{font-size:10px}.starting-points select{max-width:190px}.sound{flex-basis:220px}.header-actions button{padding:8px 11px}}
@media(min-width:700px) and (max-width:820px){.transport{justify-content:flex-start}.music-controls{margin-left:auto}.music-controls .master input{width:65px}.intro{padding-top:8px}.intro h2 span{display:block}.lesson{width:43%}.arrangement-heading>div:first-child{flex:1}.starting-points select{max-width:170px}.tools button{padding:8px 10px}.starting-points{gap:5px}.starting-points label{max-width:50px}.header-actions{width:auto}.brandmark{display:none}.header-actions .local{display:none}.brand .eyebrow{max-width:220px}}
@media(max-width:699px){header{padding:12px;gap:8px;align-items:center}.brand .eyebrow{font-size:8px}.header-actions{width:100%;justify-content:flex-start;max-width:none}.header-actions #language{margin-right:auto}.header-actions button{font-size:12px;min-height:44px}.brandmark{display:none}main{padding:0 12px;gap:12px}.intro{flex-direction:column;align-items:stretch;padding:0}.intro h2{font-size:24px}.lesson{width:100%;display:flex;padding-left:12px}.lesson h3{font-size:14px}.lesson p{font-size:12px}.studio{flex:none;min-height:0}.transport{padding:8px}.music-controls{width:100%;gap:8px}.music-controls label{font-size:10px}.music-controls .master input{width:65px}.music-controls input[type=number]{width:50px}.arrangement-heading{flex-direction:row;align-items:center;padding:8px}.arrangement-heading>div:first-child{width:100%}.starting-points{width:100%;margin:0;justify-content:space-between}.starting-points label{font-size:12px}.starting-points select{max-width:none;min-width:0;flex:1}.tools{margin-left:0}.tools button{min-width:70px}.timeline-hint{padding:0 8px 8px}.scroll{height:345px;flex:none}.selection{padding:7px 8px}.studio-foot{flex-wrap:wrap;padding:7px 8px}.studio-foot #position{margin-left:auto}.section-heading h3{font-size:12px}.sound{flex:0 0 255px}.sound h4{font-size:12px}.sound p{font-size:10px}.sound button{min-height:44px;min-width:40px}.bottom{padding:0}.section-heading .palette-actions{gap:5px}.section-heading button{font-size:11px;padding:6px 8px;min-height:44px}footer{gap:4px;flex-direction:column}.imports{padding:0}.starting-confirm-actions{justify-content:stretch}.starting-confirm-actions button{flex:1}.studio-foot{font-size:10px}}
#timeline{min-height:100%;display:flex;flex-direction:column}.ruler-row{flex-shrink:0}#tracks{display:flex;flex-direction:column;flex:1}.track{flex:1;flex-shrink:0}.clip{height:auto;bottom:10px}

/* Version 07: tracks first, with an optional sound-and-ideas tray. */
header{padding-top:10px;padding-bottom:10px;gap:20px;align-items:center}
.brand{flex-shrink:0}.brand .eyebrow{font-size:8px;letter-spacing:1.1px}.brand-tagline{font-size:10px;color:#71806c;margin:4px 0 0;white-space:nowrap}
header .lesson{flex:1;width:auto;max-width:480px;min-width:170px;gap:10px;margin-left:auto;padding-left:16px}
header .lesson-number{font-size:8px}header .lesson h3{font-size:12px;margin:3px 0;line-height:1.3}header .lesson p{font-size:10px;line-height:1.3}header .prompt-next{min-width:40px;min-height:40px;font-size:23px}
.header-actions{flex-shrink:0;flex-wrap:nowrap}.header-actions .local{display:none}
main{padding-top:10px;gap:8px}.studio{min-height:0}.arrangement-heading{padding-top:6px;padding-bottom:6px}.studio-foot{min-height:32px}
.bottom{background:#edf1e7;border:1px solid var(--line);border-radius:10px;overflow:hidden}.sound-shelf{padding:0 10px}.section-heading{margin:0;min-height:48px}.tray-toggle{display:flex;align-items:center;gap:12px;min-height:44px;background:transparent;border-color:transparent;font-size:13px!important;padding:6px 4px!important}.tray-toggle:hover{background:#e3ebda}.tray-chevron{font-size:22px;line-height:1;transition:transform .15s}.tray-toggle[aria-expanded=true] .tray-chevron{transform:rotate(180deg)}
#soundTray{padding:3px 0 8px;max-height:180px;overflow:auto}#soundTray>.hint{font-size:10px;margin:2px 0 0;line-height:1.4}footer{font-size:8px;padding-bottom:5px}
@media(min-width:700px) and (min-height:600px){.studio{min-height:0}.scroll{min-height:140px}}
@media(max-width:1120px){header{gap:12px}.brandmark{display:none}.header-actions button{font-size:11px;padding:7px 9px}.brand .eyebrow{font-size:7px}.brand-tagline{font-size:9px}header .lesson{min-width:150px;padding-left:12px}header .lesson p{font-size:9px}.music-controls{gap:8px}}
@media(min-width:700px) and (max-width:850px){header{display:grid;grid-template-columns:1fr auto;gap:8px 16px}.brand .eyebrow{max-width:none;font-size:8px}.header-actions{grid-column:2;grid-row:1}.brand{grid-column:1;grid-row:1}header .lesson{grid-column:1 / -1;grid-row:2;max-width:none;width:100%;margin:0;border:0;padding:0}header .prompt-copy{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px}header .lesson-number{display:none}header .lesson h3{margin:0}header .lesson p{font-size:10px}header .prompt-next{min-height:34px;min-width:34px}}
@media(max-width:699px){header{display:grid;grid-template-columns:1fr;gap:9px;padding:10px 12px}.brand .eyebrow{font-size:8px}.brand-tagline{font-size:10px}.header-actions{width:100%;grid-row:2;justify-content:flex-start;gap:7px}header .lesson{grid-row:3;width:100%;max-width:none;min-width:0;padding-left:10px;margin:0}header .lesson h3{font-size:13px}header .lesson p{font-size:11px}main{padding-top:8px}.scroll{height:420px}.section-heading .palette-actions{gap:4px}.section-heading button{font-size:10px;padding:6px 7px}.tray-toggle{font-size:12px!important;gap:7px}.sound-shelf{padding:0 7px}#soundTray{max-height:175px}.brand .eyebrow{max-width:none}.header-actions button{font-size:12px}footer{font-size:8px}.studio{min-height:0}}
@media(prefers-reduced-motion:reduce){.tray-chevron{transition:none}}

/* Icon-only editing tools retain a 44px touch target. */
.tools button.tool-icon{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;padding:10px;flex-shrink:0}.tool-icon svg{display:block;pointer-events:none}

/* Version 08: compact controls and optional whole-song / expanded canvas views. */
header{min-height:62px;padding-top:6px;padding-bottom:6px}
.header-actions #language{order:3;margin-left:6px;margin-right:0;white-space:nowrap;font-size:12px;font-weight:450}
#language .active-language{font-weight:750;text-decoration:underline;text-underline-offset:4px}
.brand .eyebrow{display:none}.brand-tagline{margin-top:2px}
main{padding-top:7px;gap:6px}
.transport{padding:3px 12px;gap:6px}
.play-controls button,.play-controls .primary{min-height:36px;padding:6px 12px}
.check{min-height:36px}
.music-controls input[type=number],.music-controls select{min-height:34px;padding:5px 7px}
.music-controls input[type=range]{min-height:28px}
.arrangement-heading{gap:8px;padding-top:4px;padding-bottom:4px}
.arrangement-heading>div:first-child{margin-right:auto}
.starting-points{margin-left:0}.starting-points select{min-height:36px;padding:6px;max-width:190px}
.tools{margin-left:0}
.view-tools{display:flex;align-items:center;gap:5px;border-left:1px solid var(--line);padding-left:8px}
.view-tools button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:7px 9px;font-size:11px}
.view-tools svg{flex-shrink:0;pointer-events:none}
.collapse-symbol,.canvas-expanded .expand-symbol{display:none}.canvas-expanded .collapse-symbol{display:initial}
.section-heading{min-height:38px}.section-heading .tray-toggle{min-height:36px;padding-top:3px!important;padding-bottom:3px!important}
.section-heading .palette-actions button{min-height:30px;padding:4px 9px}
#soundTray{padding-bottom:5px}.sound{padding:5px 7px;flex-basis:215px}.sound button{min-height:34px}.sound h4{margin-bottom:2px}
.sound{touch-action:pan-x;user-select:none}.sound:active{cursor:grabbing}.lane.drop-target{box-shadow:inset 0 0 0 3px #577549;background-color:#eaf1e1}
.sound-drag-preview{position:fixed;z-index:100;pointer-events:none;padding:8px 12px;background:#365e48;color:white;border-radius:7px;box-shadow:0 3px 12px #0002;font-size:12px;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ruler-row,.track{grid-template-columns:var(--label) minmax(0,1fr)}
.canvas-fit #timeline{width:100%;min-width:0}
.canvas-fit #ruler button{min-width:0;overflow:visible;padding:0 3px;font-size:9px;white-space:nowrap}
.canvas-fit #ruler button:not(.quiet-bar){position:relative;z-index:1}
.canvas-fit #ruler button:last-child:not(.quiet-bar){text-align:right;padding-right:2px}
.canvas-fit #ruler button.quiet-bar{font-size:0}
.canvas-fit .track{min-height:48px;flex:1 0 48px}
.canvas-fit .lane{min-height:0;overflow:hidden}
.canvas-fit .track-controls{padding:3px 8px;gap:2px}
.canvas-fit .track-name{font-size:11px}
.canvas-fit .track-actions button{min-height:24px;padding:2px 6px;font-size:9px}
.canvas-fit .track-actions input{min-height:24px}
.canvas-fit .clip{top:5px;bottom:5px;padding:4px;border-radius:3px}
.canvas-fit .clip::after{inset:21px 3px 3px}
.canvas-fit.canvas-dense{--label:240px}
.canvas-dense .track{min-height:34px;flex-basis:34px}
.canvas-dense .track-controls{display:flex;align-items:center;gap:6px;padding:3px 8px}
.canvas-dense .track-name{flex:1;min-width:0;max-width:none;font-size:10px}
.canvas-dense .track-number{display:none}.canvas-dense .track-actions{flex-shrink:0}
.canvas-dense .track-actions input{width:42px}.canvas-dense .clip{top:3px;bottom:3px;padding:3px}
.canvas-dense .clip::after{inset:18px 3px 2px}
body.canvas-expanded{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.canvas-expanded>header,.canvas-expanded footer{display:none}
.canvas-expanded main{width:100%;max-width:none;flex:1;min-height:0;padding:5px;gap:4px}
.canvas-expanded .studio{flex:1;min-height:0;border-radius:8px}
.canvas-expanded .scroll{flex:1;min-height:80px;height:auto}
.canvas-expanded .bottom{border-radius:7px}
@media(max-width:1120px) and (min-width:700px){.starting-points label{display:none}.starting-points select{max-width:165px}.view-tools button{padding:7px}.arrangement-heading{gap:6px}}
@media(max-width:850px) and (min-width:700px){.arrangement-heading>div:first-child{flex:1 0 40%}.starting-points{margin-left:auto}.tools{margin-right:auto}}
@media(max-width:699px){.transport{padding:5px 8px}.view-tools{margin-left:auto}.view-tools button{min-height:44px;padding:6px}.view-tools svg{display:none}.tools button:not(.tool-icon){min-width:50px;padding:6px 8px}.starting-points select{max-width:none}.starting-points label{display:block}.canvas-expanded .arrangement-heading>div:first-child,.canvas-expanded .starting-points{display:none}.canvas-expanded .arrangement-heading{gap:4px}.canvas-expanded main{padding:3px}.canvas-fit{--label:145px}.canvas-fit .track-name{max-width:106px}.canvas-fit .track-actions{gap:3px}.canvas-fit .track-actions input{width:42px}.canvas-fit .track-actions button{padding:2px 4px}.section-heading .palette-actions button,.section-heading .tray-toggle{min-height:40px}.sound button{min-height:40px}}
@media(pointer:coarse){.play-controls button,.play-controls .primary,.check{min-height:44px}.music-controls input[type=number],.music-controls select,.view-tools button{min-height:44px}.canvas-fit .track{min-height:60px;flex-basis:60px}.canvas-fit .track-actions button,.canvas-fit .track-actions input{min-height:36px}.sound button{min-height:44px}}
@media(max-width:699px){.canvas-fit.canvas-dense{--label:160px}.canvas-dense .track-controls{gap:3px;padding:3px 5px}.canvas-dense .track-name:before{display:none}.canvas-dense .track-actions input{width:30px}}
@media(max-width:699px){header{grid-template-columns:minmax(0,1fr) auto}.header-actions{display:contents}.header-actions #language{grid-column:2;grid-row:1;justify-self:end;margin:0;padding:8px}.brand{grid-column:1;grid-row:1;min-width:0}.brand-tagline{white-space:normal}.header-actions #save{grid-column:1;grid-row:2}.header-actions #open{grid-column:2;grid-row:2}header .lesson{grid-column:1 / -1;grid-row:3}}

/* The native Loop checkbox presents as an icon-and-label transport toggle. */
.loop-toggle{position:relative;gap:6px;padding:5px 10px;border:1px solid var(--line);border-radius:7px;background:#fffef9;font-size:12px;font-weight:650;cursor:pointer;user-select:none}
.loop-toggle svg{display:block;flex-shrink:0;pointer-events:none}
.loop-toggle:has(input:checked){background:#e3ebdd;border-color:#8da480}
.loop-toggle:hover{border-color:#a5b6a3;background:#eaf0e5}
.loop-toggle:has(input:focus-visible){outline:3px solid #db782e;outline-offset:3px}

/* Keep prompt navigation beside its copy; reserve a row of project actions on phones. */
header .prompt-copy{flex:0 1 auto}
@media(max-width:699px){
 header{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:7px}
 .brand{grid-column:1 / 3}
 .header-actions #language{grid-column:3}
 .header-actions #newProject{grid-column:1;grid-row:2}
 .header-actions #save{grid-column:2;grid-row:2}
 .header-actions #open{grid-column:3;grid-row:2}
 .header-actions button{padding-left:6px;padding-right:6px;font-size:11px}
}

.workshop-sharing{margin:0;padding:12px 20px}
