/* Refrain layout adapter: canonical ecosystem components retain their own implementation. */
.rf-core-crumb{margin:0!important;padding:12px 10px;text-align:center;color:#292827;background:#f4eddf;font:400 16px/1.5 Nunito,Arial,sans-serif}
.rf-core-crumb a{color:inherit}
.rf-core-hero{background:#292827!important;color:#f8f0df!important;text-align:center;border-radius:7px!important;padding:24px 16px;margin:12px auto;width:min(100% - 24px,1600px);box-sizing:border-box}
.rf-core-eyebrow{font:400 33px/1.2 Cinzel,Georgia,serif;color:#d8b66b}
.rf-core-hero h1{font:400 clamp(33px,6vw,66px)/1.15 Cinzel,Georgia,serif!important;color:#f8f0df!important;margin:12px 0;overflow-wrap:anywhere}
.rf-core-hero p{font:400 24px/1.4 Nunito,Arial,sans-serif!important;color:#f8f0df!important;margin:8px auto;max-width:900px}
.rf-core-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin:16px 0 0}
.rf-core-actions a,.rf-core-features button,.rf-core-dialog button,.rf-core-dialog a{display:inline-flex;justify-content:center;align-items:center;padding:9px 16px;min-height:44px;border:1px solid #cdbfa8;border-radius:7px;text-decoration:none;background:#f8f0df;color:#292827;font:400 16px/1.4 Nunito,Arial,sans-serif;cursor:pointer}
.rf-core-about,.rf-core-features{width:min(100% - 24px,1600px);margin:12px auto;padding:16px;box-sizing:border-box;background:#f4eddf;color:#292827;border:1px solid #cdbfa8;border-radius:7px;text-align:center;font:400 16px/1.5 Nunito,Arial,sans-serif}
.rf-core-about h2,.rf-core-features h2{font:400 24px/1.3 Cinzel,Georgia,serif;margin:0 0 8px;color:#292827}
.rf-core-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.rf-core-grid button{background:#292827;color:#f8f0df;min-height:54px;white-space:normal;overflow-wrap:anywhere}
.rf-core-dialog{width:min(90vw,560px);max-height:85vh;overflow:auto;background:#f4eddf;color:#292827;border:1px solid #cdbfa8;border-radius:7px;padding:24px;font:400 16px/1.5 Nunito,Arial,sans-serif;text-align:center}
.rf-core-dialog::backdrop{background:#292827bb}.rf-core-dialog h2{font:400 24px/1.3 Cinzel,Georgia,serif}.rf-core-dialog a{background:#292827;color:#f8f0df}
.rf-core-local-nav{position:static!important;top:auto!important;z-index:auto!important}
body[data-refrain-core] footer{background:#292827!important;color:#f8f0df!important;text-align:center!important;border-radius:7px!important;padding-bottom:125px!important}
body[data-refrain-core] footer,body[data-refrain-core] footer *{font-size:14px!important;color:#f8f0df!important}
body[data-refrain-core] :is(#vnv333NetworkTicker,#vnvTickerAutoPopulate,#vnvHeaderAutoPopulate,#vnvEnrichedMenuOverlay,#vnvClassToolsToolbar,#vnvEcosystemUtilityDock,#vnv-language-switch,#vnvProfileGradeChooser,#vnvUpdatesDialog) :is(a,button,span,p,small,label,select,input,output,strong){font-size:16px!important;font-weight:400!important}
body[data-refrain-core] #vnv333NetworkTicker a[href*="stripe.com"]{display:none!important}
body[data-refrain-core] #vnv-language-switch{position:static!important;}
body[data-refrain-core] #vnvClassToolsToggle{width:76px!important;min-width:76px!important;height:44px!important;border-radius:7px!important}
body[data-refrain-core] #vnvClassToolsPanel .vct-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
body[data-refrain-core] #vnvClassToolsPanel .vct-grid>:is(a,button){white-space:normal!important;overflow-wrap:anywhere}
body[data-refrain-core] #vnvClassToolsToolbar{width:min(240px,calc(100vw - 24px))!important}
body[data-refrain-core] #vnvHeaderAutoPopulate .vnv-header-actions{display:none!important}
@media(max-width:600px){.rf-core-eyebrow{font-size:28px}.rf-core-hero p{font-size:24px!important}.rf-core-grid button{min-height:64px}.rf-core-actions a{flex:1 1 auto}}

.rf-core-local-tools{margin:12px auto;padding:12px;border:1px solid #cdbfa8;border-radius:7px;text-align:center;background:#f4eddf;color:#292827}.rf-core-local-tools .hero-links,.rf-core-local-tools .hero-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}.rf-core-local-tools .project-status{color:#292827!important}.rf-core-grid button{height:100%}.rf-core-hero{width:calc(100% - 24px);max-width:1600px}.rf-core-eyebrow{font-size:33px!important}body[data-refrain-core] #vnvClassToolsToggle{width:76px!important;min-height:44px!important}body[data-refrain-core] #vnvEcosystemUtilityDock :is(a,button){min-height:44px!important}@media(max-width:540px){body[data-refrain-core] #vnvClassToolsToolbar{width: min(240px,calc(100vw - 24px))!important;bottom:calc(var(--vnv-ecosystem-dock-height,94px) + 18px)!important}body[data-refrain-core] footer{padding-bottom:180px!important}}

/* Compact header pilot: one 33px identity/translator/menu row. */
body[data-refrain-core] #vnvHeaderAutoPopulate{--vnv-header-height:43px;width:100%!important;max-width:none!important;box-sizing:border-box!important;padding:0!important;border-radius:0!important;text-align:left!important;background:#f4eddf!important;color:#292827!important;min-height:43px!important}
body[data-refrain-core] #vnvHeaderAutoPopulate .vnv-header-inner{display:grid!important;grid-template-columns:minmax(33px,1fr) minmax(0,max-content) minmax(33px,1fr)!important;align-items:center!important;gap:7px!important;min-height:43px!important;height:auto!important;padding:5px 11px!important;width:100%!important;max-width:none!important;box-sizing:border-box}
body[data-refrain-core] #vnvHeaderAutoPopulate .vnv-header-home{grid-column:1!important;grid-row:1!important;min-width:0;max-width:100%;width:auto!important;justify-self:start;align-items:center;gap:7px}
body[data-refrain-core] #vnvHeaderAutoPopulate .vnv-header-actions,body[data-refrain-core] #vnvHeaderAutoPopulate .vnv-header-subtitle{display:none!important}
body[data-refrain-core] #vnvHeaderAutoPopulate .vnv-header-copy{min-width:0;overflow:hidden}
body[data-refrain-core] #vnvHeaderAutoPopulate .vnv-header-title{font-size:16px!important;line-height:1.25!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-refrain-core] #vnvHeaderAutoPopulate .vnv-header-logo{width:33px!important;height:33px!important;min-width:33px!important;min-height:33px!important;flex:0 0 33px!important;border-radius:7px!important}
body[data-refrain-core] #vnvHeaderAutoPopulate .vnv-header-menu-button{grid-column:3!important;grid-row:1!important;justify-self:end!important;align-self:center!important;margin:0!important;width:33px!important;height:33px!important;min-width:33px!important;min-height:33px!important;padding:0!important;border-radius:7px!important}
body[data-refrain-core] #vnvHeaderAutoPopulate .rf-header-language{grid-column:2;grid-row:1;justify-self:center;min-width:0;max-width:100%;width:max-content;height:33px;overflow:hidden;box-sizing:border-box}
html:root body[data-refrain-core] #vnvHeaderAutoPopulate .rf-header-language #vnv-language-switch{box-sizing:border-box!important;height:33px!important;min-height:33px!important;max-height:33px!important;max-width:100%!important;margin:0!important;padding:2px 4px!important;gap:4px!important;position:static!important;overflow-x:auto!important;overflow-y:hidden!important;border-radius:7px!important;justify-content:safe center!important;scrollbar-width:none}
html:root body[data-refrain-core] #vnvHeaderAutoPopulate .rf-header-language #vnv-language-switch::-webkit-scrollbar{display:none}
html:root body[data-refrain-core] #vnvHeaderAutoPopulate .rf-header-language #vnv-language-switch > :is(select,button){height:27px!important;min-height:27px!important;max-height:27px!important;padding:1px 6px!important;line-height:1.15!important;font-size:16px!important}
html:root body[data-refrain-core] #vnvHeaderAutoPopulate .rf-header-language #vnv-language-switch > label{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)}
@media(max-width:1000px){body[data-refrain-core] #vnvHeaderAutoPopulate .vnv-header-inner{grid-template-columns:33px minmax(0,1fr) 33px!important;gap:7px!important}body[data-refrain-core] #vnvHeaderAutoPopulate .vnv-header-copy{display:none!important}body[data-refrain-core] #vnvHeaderAutoPopulate .rf-header-language{width:100%;max-width:max-content;justify-self:center}html:root body[data-refrain-core] #vnvHeaderAutoPopulate .rf-header-language #vnv-language-switch{justify-content:flex-start!important}}

/* Refrain cream surfaces v1 — scoped to content, not instruments or ecosystem chrome. */
body[data-refrain-core]{--rf-section-cream:#fffaf0;--rf-section-ink:#292827;--rf-section-border:#cdbfa8}
body[data-refrain-core] :is(.rf-core-about,.rf-core-features,.rf-core-dialog,.rf-core-local-tools){background:var(--rf-section-cream)!important;color:var(--rf-section-ink)!important}
body[data-refrain-title="The Refrain"] :is(.room,.room-body,.rf-pending,.rf-panel){background:var(--rf-section-cream)!important;color:var(--rf-section-ink)!important}
body[data-refrain-title="The Refrain"] :is(.room-body .features,.rf-pending p,.rf-panel h2,.rf-panel p,.rf-panel .rf-status,.rf-favorites){color:var(--rf-section-ink)!important}
body[data-refrain-title="The Refrain"] :is(.room>summary,.rf-pending>summary){background:#292827!important;color:#f8f0df!important}
body[data-refrain-title="The Refrain"] .room>summary:hover{background:#3c3a36!important}
body[data-refrain-title="My Music Cloud"] #music-private :is(.mc-panel,.mc-section,.mc-inside,.mc-card){background:var(--rf-section-cream)!important;color:var(--rf-section-ink)!important}
body[data-refrain-title="My Song Project"] #privateWorkspace :is(.panel,details,.inside,.file-row,fieldset){background:var(--rf-section-cream)!important;color:var(--rf-section-ink)!important}
body[data-refrain-title="My Song Project"]:not([data-print-ownership]) #ownershipPreview{background:var(--rf-section-cream)!important;color:var(--rf-section-ink)!important}
body[data-refrain-title="Recording Booth"] main>section:not(.rf-core-hero),
body[data-refrain-title="Audio Editing Desk"] main :is(section,details,.card),
body[data-refrain-title="Vocal Transcription Studio"] main :is(section,details,.comparison),
body[data-refrain-title="The Staff"] main :is(.tools,.panel,details){background:var(--rf-section-cream)!important;color:var(--rf-section-ink)!important}
body[data-refrain-title="Audio Editing Desk"] main .strip{background:#292827!important;color:#f8f0df!important}
body[data-refrain-title="Little Composer Studio"] :is(.app-shell,.panel,.control,.lesson:not(.complete),.stat,.project-tools,.lc-records,.lc-songbook,.lc-sheet){background:var(--rf-section-cream)!important}
body[data-refrain-title="Little Composer Studio"] .lc-songbook>summary{background:#292827!important;color:#f8f0df!important}
/* Keep performance controls and staff surfaces dark; brighten explanatory and library cards. */
body[data-refrain-title="Harmony’s Haven"] :is(.quick-guide,.hh-drawer){background:var(--rf-section-cream)!important;color:var(--rf-section-ink)!important}
body[data-refrain-title="Harmony’s Haven"] :is(.quick-guide,.hh-drawer)>summary{background:#292827!important;color:#f8f0df!important;border-radius:7px}
body[data-refrain-title="Harmony’s Haven"] .quick-guide .guide-step{background:var(--rf-section-cream)!important;color:var(--rf-section-ink)!important;border:1px solid var(--rf-section-border)}
body[data-refrain-title="Harmony’s Haven"] .quick-guide .guide-step :is(strong,span){color:#292827!important}
body[data-refrain-title="Harmony’s Haven"] :is(.hh-sheet,.hh-personal-viewer){background:var(--rf-section-cream)!important;color:var(--rf-section-ink)!important}
body[data-refrain-title="Harmony’s Haven"] .hh-drawer :is(.studio-section,.notation-section,.tracks-section,.control-card,.hh-musicstand,.hh-personal-stand){color:var(--ink)}
/* Hall cards retain dark navigation and intentional quiz feedback. */
body[data-refrain-title="ARSHIF Music Hall"] #arshif-music-hall :is(.amh-card,.amh-module,.amh-tool,.amh-source,.amh-time,.amh-term,.amh-quiz-card,.amh-report,.amh-launch-card,.amh-side-card,.amh-output){background:var(--rf-section-cream)!important;color:var(--rf-section-ink)!important;--amh-ink:#292827;--amh-muted:#514a40;--amh-parchment:#292827;--amh-gold:#765621;--amh-line:#cdbfa8;border-color:#cdbfa8;border-radius:7px}
body[data-refrain-title="ARSHIF Music Hall"] #arshif-music-hall :is(.amh-card,.amh-module,.amh-tool,.amh-source,.amh-time,.amh-term,.amh-quiz-card,.amh-report,.amh-launch-card,.amh-side-card) :is(.amh-btn,.amh-quick-link,.amh-choice:not(.good):not(.bad)){background:#292827;color:#f8f0df}
body[data-refrain-title="ARSHIF Music Hall"] #arshif-music-hall :is(.amh-card,.amh-module,.amh-tool,.amh-quiz-card,.amh-report) :is(input,select,textarea){background:#fffaf0;color:#292827;border-color:#cdbfa8}
body[data-refrain-title="ARSHIF Music Hall"] #arshif-music-hall :is(.amh-card,.amh-module,.amh-tool,.amh-quiz-card,.amh-report) option{background:#fffaf0;color:#292827}
/* Workshops retain their explicit dark-mode choices and print layouts. */
html:not([data-theme="dark"]) body[data-refrain-title="Music 101 Workshop"]{--surface:#fffaf0;--surface-2:#fffaf0}
html[data-theme="light"] body[data-refrain-title="Music Theory 201 Workshop"],html body[data-refrain-title="Music Theory 201 Workshop"][data-theme="light"]{--panel:#fffaf0;--panel2:#fffaf0}
