/* B078AQ: one fluid desktop workspace for MA.17–MA.32. Scoped to these two lesson families. */
html:is(.cwCreativeMastery,.cwAdvancedCreation) main.lesson{min-width:0;max-width:none!important;width:100%!important}
html:is(.cwCreativeMastery,.cwAdvancedCreation) :is(.lesson-content,.advContent){width:100%!important;max-width:none!important;margin:0!important;padding:8px 20px 24px!important}
html:is(.cwCreativeMastery,.cwAdvancedCreation) main>.lesson-nav{height:auto!important;min-height:46px!important;padding:6px 20px!important}
html:is(.cwCreativeMastery,.cwAdvancedCreation) .lesson-actions .nav-link{min-height:32px!important;padding:6px 10px!important;font-size:12px!important;line-height:18px!important}
html.cwCreativeMastery .creativeSticky{padding:5px 20px!important}
html.cwCreativeMastery .creativeHeading .eyebrow{display:none}
html.cwCreativeMastery .creativeHeading h1{font-size:25px!important;margin:0 0 4px!important}
html.cwCreativeMastery .creativeHeading>p{margin:3px 0!important}
html.cwCreativeMastery .creativeBuilder{margin:6px 0!important;padding:9px!important}
html.cwCreativeMastery .masteryInstructions{order:1;font-size:11px;color:#b9cee6;margin:0 0 5px}
html.cwCreativeMastery .masteryInstructions>summary{cursor:pointer;padding:3px 0}
html.cwCreativeMastery .masteryInstructions .creativeToolbar{margin-top:7px}
html.cwCreativeMastery .creativeVersion{margin:0 0 5px;padding:5px 8px;min-height:28px}
html.cwCreativeMastery .creativeBuilder>.creativeActions{padding:4px 6px!important;margin:0 0 5px!important}
html.cwCreativeMastery .creativeActions button{height:32px!important;min-height:32px!important;padding:4px 9px!important;line-height:20px!important}
html.cwCreativeMastery .creativeCompareControls{margin:0 0 5px!important}
html.cwCreativeMastery .creativeCompareButtons>button{height:32px!important;min-height:32px!important;padding:4px 9px!important;line-height:20px!important}
html.cwCreativeMastery .creativePaletteHead #creativeSelection{grid-column:3;grid-row:2;font-size:10px}
html.cwCreativeMastery .creativeBuilder>.creativePalette{padding:6px!important;margin:0 0 6px!important}
html.cwCreativeMastery .creativePaletteGroup{padding:4px 6px!important}
html.cwCreativeMastery .creativeTimelineReview{grid-template-columns:minmax(0,1fr) minmax(240px,22%)!important;gap:12px!important}
html.cwCreativeMastery .creativeTimelineReview .creativeTimeline{grid-template-columns:50px repeat(var(--bars),minmax(0,1fr))!important}
html.cwCreativeMastery .creativeTrackFeedback{max-height:310px;overflow:auto}
html.cwCreativeMastery .creativeBuilder>.compositionKeyboardViewport{margin-top:7px!important;flex-shrink:0}
html.cwCreativeMastery .creativeMelodyLegend{margin:6px 0!important}
@media(max-width:1100px){
 html:is(.cwCreativeMastery,.cwAdvancedCreation) :is(.lesson-content,.advContent){padding-left:12px!important;padding-right:12px!important}
 html.cwCreativeMastery .creativeTimelineReview{grid-template-columns:minmax(0,1fr)!important}
 html.cwCreativeMastery .creativeTrackFeedback{max-height:none;overflow:visible}
}
html.cwCreativeMastery .creativeVersion .masteryInstructions{order:2;position:relative;margin:0 8px 0 auto;flex-shrink:0}
html.cwCreativeMastery .masteryInstructions[open]{max-width:650px}
html.cwCreativeMastery .creativeVersion{flex-wrap:wrap}
html.cwCreativeMastery .creativePaletteHead{gap:2px 10px!important;margin-bottom:2px!important}
html.cwCreativeMastery .creativePaletteHead #creativeSelection{grid-column:1;grid-row:2;justify-self:start;max-width:240px;line-height:12px}
html.cwCreativeMastery .creativePaletteHead>.creativeTransport{grid-row:1/3;padding:3px!important;min-height:36px!important}
html.cwCreativeMastery .creativePaletteHead>.creativeTransport button{height:32px!important;min-height:32px!important;padding:4px 8px!important}
html.cwCreativeMastery .creativePaletteHead #creativeClear{grid-row:1/3}
html.cwCreativeMastery .creativeTrackFeedback{max-height:270px}
html.cwCreativeMastery #creativePhrasePages{margin:3px 0 5px!important}
html.cwCreativeMastery #creativeMelodyLegend{margin:5px 0!important}
html.cwCreativeMastery .creativeTimeline .barHead{line-height:1.3!important;padding:5px!important}
html.cwCreativeMastery .creativeTimeline .barHead p{margin:4px 0!important;line-height:1.3!important}
@media(max-width:1100px){html.cwCreativeMastery .creativeTrackFeedback{max-height:none}}
html.cwCreativeMastery .creativeTimeline .barHead strong{display:block;font-size:12px!important;line-height:16px!important;margin:4px 0!important}
html.cwCreativeMastery .creativeTimeline .barHead small{font-size:9px!important;line-height:12px!important}
html.cwCreativeMastery .creativePaletteHead{grid-template-columns: minmax(150px,1fr) auto minmax(150px,1fr)!important}
html.cwCreativeMastery .creativePaletteHead #creativeClear{justify-self:end}
html.cwCreativeMastery #creativeDifferenceSummary:empty{display:none!important}
html.cwCreativeMastery .creativeCompareButtons{padding:2px!important;gap:7px!important}
@media(min-width:1101px) and (max-height:820px){
 html:is(.cwCreativeMastery,.cwAdvancedCreation) main>.lesson-nav{min-height:40px!important;padding-top:3px!important;padding-bottom:3px!important}
 html.cwCreativeMastery .creativeHeading h1{font-size:22px!important}
 html.cwCreativeMastery .creativeHeading>p,html.cwAdvancedCreation .advHeading p{font-size:11px!important;line-height:1.3!important}
 html.cwCreativeMastery .creativeTrackFeedback{max-height:240px}
 html.cwCreativeMastery .creativeTimeline .barCell[data-track=melody]{min-height:65px!important}
 html.cwCreativeMastery .creativeTimeline .melodyNotes{height:30px!important}
 html.cwCreativeMastery .creativeTimeline button.slot{height:40px!important;min-height:40px!important}
}
/* Keep active assignment information on the same header row as transport. */
html.cwCreativeMastery .creativeBuilder .creativePalette .creativePaletteHead{position:relative;min-height:38px!important;grid-template-rows:auto!important}
html.cwCreativeMastery .creativeBuilder .creativePaletteHead #creativeSelection{grid-row:1;grid-column:1;align-self:end;transform:translateY(1px);font-size:9px!important;line-height:10px!important}
html.cwCreativeMastery .creativeBuilder .creativePaletteHead>strong{align-self:start;font-size:11px!important}
html.cwCreativeMastery .creativeBuilder .creativePaletteHead>.creativeTransport{grid-row:1!important;min-height:34px!important;height:38px!important}
html.cwCreativeMastery .creativeBuilder .creativePaletteHead #creativeClear{grid-row:1!important}
html.cwCreativeMastery .creativeBuilder .creativeTimeline .cwChordToneHeading{margin-top:3px!important;line-height:12px!important;font-size:9px!important}
html.cwCreativeMastery .creativeBuilder .creativeTimeline .cwBassPrompt{gap:1px!important}
html.cwCreativeMastery .creativeBuilder #creativePhrasePages button{height:30px!important;min-height:30px!important;padding:4px 8px!important}
html.cwCreativeMastery .masteryComparisonNotes{order:12;font-size:11px;line-height:1.4;color:#bfd0e6;margin:7px 0}
html.cwCreativeMastery .masteryComparisonNotes>summary{cursor:pointer;padding:4px 0}
@media(min-width:1101px){
 html.cwCreativeMastery #creativePaletteItems:has([data-kind=harmony]):has([data-kind=bass]){flex-wrap:nowrap!important}
 html.cwCreativeMastery #creativePaletteItems:has([data-kind=harmony]) .creativePaletteGroup{flex:1 1 0!important;gap:7px!important}
 html.cwCreativeMastery #creativePaletteItems:has([data-kind=harmony]) .creativePaletteGroup button{min-width:34px!important;padding:5px 7px!important}
 html.cwCreativeMastery #creativePaletteItems:has([data-kind=harmony]) .creativePaletteGroup>span{min-width:50px;flex-basis:50px}
}
html.cwCreativeMastery .creativeHeading .creativeRoute{display:inline!important;font-size:10px!important;line-height:13px!important}
html.cwCreativeMastery .creativeHeading #creativeBrief{display:inline!important;margin-right:12px!important}
html.cwCreativeMastery .creativeHeading{padding-bottom:4px}
html:is(.cwCreativeMastery,.cwAdvancedCreation) main>.lesson-nav{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:5px 12px!important;justify-content:space-between!important}
html.cwCreativeMastery main>.lesson-nav #creativeSticky,html.cwAdvancedCreation main>.lesson-nav .advSticky{position:static!important;top:auto!important;background:transparent!important;border:0!important;outline:0!important;box-shadow:none!important;padding:0!important;flex:1 1 auto;justify-content:flex-start!important;min-height:32px!important}
html:is(.cwCreativeMastery,.cwAdvancedCreation) main>.lesson-nav .lesson-actions{flex:0 0 auto;margin-left:auto}
html.cwCreativeMastery .creativeBuilder .creativePalette .creativePaletteHead{min-height:46px!important}
html.cwCreativeMastery .creativeBuilder .creativePaletteHead>.creativeTransport{height:auto!important;min-height:38px!important}
html.cwCreativeMastery .creativeBuilder .creativePalette .creativePaletteHead{min-height:50px!important;margin-bottom:5px!important}
html.cwCreativeMastery .creativeBuilder .creativePaletteHead #creativeSelection{position:absolute;left:0;bottom:1px;transform:none;font-size:10px!important;line-height:12px!important}
html.cwCreativeMastery .creativeVersion .masteryInstructions[open]{flex-basis:100%;max-width:none;margin-top:6px}
/* Remove inherited spacing inside chord headers rather than shrinking the keyboard. */
html.cwCreativeMastery #creativeTimeline .barHead{gap:1px!important}
html.cwCreativeMastery #creativeTimeline .barHead>strong{margin:2px 0!important}
/* B078AR: key, destination and transport stay together while working on timelines. */
html.cwAdvancedCreation main>.lesson-nav{position:sticky!important;top:0!important;z-index:100!important;background:#080e17!important}
html.cwAdvancedCreation .advWorkspace>.advPaletteHeader{position:sticky;top:var(--mastery-nav-height,46px);z-index:90;background:#162133;border:1px solid #617793;border-radius:6px;padding:6px;margin:5px 0 0;grid-template-columns:auto auto minmax(0,1fr) auto!important;box-shadow:0 3px 6px #0005}
html.cwAdvancedCreation .advPaletteTools{grid-column:3;grid-row:1;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;min-width:0}
html.cwAdvancedCreation .advKeyControls{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
html.cwAdvancedCreation .advKeyControls label{display:flex;align-items:center;gap:6px;font-size:11px;color:#e1eafa;font-weight:600}
html.cwAdvancedCreation .advKeyControls select{height:32px;min-height:32px;max-width:220px;font-size:11px;padding:4px 6px}
html.cwAdvancedCreation .advKeyControls #advKey{min-width:105px;border-color:#c0a9fa}
html.cwAdvancedCreation .advPaletteHeader .advTransport{flex:0 0 auto}
html.cwAdvancedCreation .advWorkspace>.advPalette{margin-top:0;border-top:0;border-radius:0 0 6px 6px}
@media(max-width:1350px){html.cwAdvancedCreation .advWorkspace>.advPaletteHeader{grid-template-columns:auto 1fr auto!important}html.cwAdvancedCreation #advLaneTabs{grid-column:2;grid-row:1}html.cwAdvancedCreation .advPaletteTools{grid-column:1/4;grid-row:2}html.cwAdvancedCreation .advWorkspace>.advPaletteHeader #advClear{grid-column:3;grid-row:1}}
