/* Musical Sketch: readability refinements, the last layer of the theme.
   Keeps the sticker album and its hand-drawn touch, with dark ink on the
   bright stickers for contrast and a crisp sans-serif for longer reading
   and forms. (:root keeps the specificity these rules were written with.) */
/* Refined: preserve the four bright sticker colours and use dark ink on them
   instead of white (e.g. coral 5.18:1, mint 6.66:1 contrast). */
html:root body{
  --ms-reading-font:"DM Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --ms-reading-ink:#26313f;
  --ms-reading-muted:#4d5c6e;
}
html:root body :is(.challenge-link,.info-primary,.account-primary,.email-submit,.username-submit,.sketch-button.primary,.button-link,.success-btn,#confirmSubmitBtn,#tryTodayChallenge),
html.public-sketch-ui:root body:not(.creator-mode) :is(.submit-main,.tutorial-actions button.primary){
  color:var(--ms-reading-ink)!important;font-weight:650!important
}
html.ms-done-today:root body.home-page .challenge-link,
html:root body :is(.logged-in-avatar,.home-profile-avatar,.ms-tabs a[aria-current="page"],
  .calendar-day.has-sketches,.info-feature-number,.verify-card .mark),
html.public-sketch-ui:root .completion-share-actions #showShareMenu{
  color:var(--ms-reading-ink)!important
}
html:root body .ach-step.is-earned :is(.ach-node,.ach-step-need){
  color:var(--ms-reading-ink)!important
}
html:root body .ach-step:not(.is-earned) .ach-step-need{color:#526174}
html:root body .msx-emblem:not(.msx-locked) .msx-glyph{fill:var(--ms-reading-ink)}
html:root body .msx-gold:not(.msx-locked) .msx-glyph{fill:#6b4a00}
html.public-sketch-ui:root body:not(.creator-mode) .submit-main:disabled{
  color:#526174!important;font-weight:600!important
}

/* Refined: handwritten headlines, short labels and stickers still carry the
   theme. Longer reading and forms get a crisp, consistent sans-serif. */
html:root body :is(.info-panel,.info-feature,.info-credits,.info-contact-panel,
  .auth-card,.verify-card,.username-card,.library-board,.ach-app,.ms-profile-rank,.ms-unlocked)
  :is(p,li,dd,dt,small,label,input,textarea,select),
html:root body :is(.no-challenge-message,.provider-note,.password-help,.email-status,
  .ach-track-blurb,.ach-next-goal,.ach-card-desc,.ach-rank-next,.ach-sync,.ms-quest-label,
  .calendar-weekdays *, .sketch-meta, .info-updated,.info-caption),
html.public-sketch-ui:root body:not(.creator-mode)
  :is(.paper-heading p,.puzzle-instructions,.challenge-constraints li,.constraint-result,.constraint-overview,
    .automatic-status,.submit-hint,.tutorial-explanation,.tutorial-hint,.tutorial-guide li,.tutorial-guide button,
    .tutorial-step-counter,#tutorialStepCounter,.tutorial-eyebrow,.mobile-nav-hint,.status,.dialog-copy,
    .completion-panel p,.completion-metric *){
  font-family:var(--ms-reading-font)!important;
}
html:root body :is(.info-panel,.info-feature,.info-credits,.info-contact-panel) :is(p,li){
  line-height:1.7
}
html:root body :is(.ach-track-blurb,.ach-next-goal,.ach-card-desc,.ach-rank-next,.ach-sync){
  line-height:1.55;color:var(--ms-reading-muted)
}

/* Refined editor: understated chrome and instruction cards, not a different
   notation engine. Preserve registered staff sizes, score, voice colour glow,
   toolbar glyphs, and the four voice buttons. No layout geometry changes. */
html.public-sketch-ui:root body:not(.creator-mode) :is(.titlebar,.toolbar,.status){
  border-color:#dce5ee!important
}
html.public-sketch-ui:root body:not(.creator-mode) .toolbar{
  background:#f8fafc!important
}
html.public-sketch-ui:root body:not(.creator-mode) :is(.challenge-constraints,.tutorial-guide,.mobile-score-nav){
  border-radius:12px!important;box-shadow:0 0 0 1px #d6e0eb,0 2px 8px #25364f0a!important
}
html.public-sketch-ui:root body:not(.creator-mode) :is(.challenge-constraints,.tutorial-guide){
  background:#fff!important
}
html.public-sketch-ui:root body:not(.creator-mode) :is(.paper-heading h1){
  background-image:none!important
}
html.public-sketch-ui:root body:not(.creator-mode) :is(.top-btn,.submit-secondary,.tutorial-actions button:not(.primary)){
  border-color:#cbd6e3!important;border-radius:8px!important;box-shadow:none!important;
  font-family:var(--ms-reading-font)!important;font-weight:600!important
}
html.public-sketch-ui:root body:not(.creator-mode) :is(.submit-main,.tutorial-actions button.primary){
  border-radius:10px!important;box-shadow:0 1px 0 #c96055,0 3px 7px #26313f19!important;
  font-family:var(--ms-reading-font)!important
}
html.public-sketch-ui:root body:not(.creator-mode) :is(.submit-main,.tutorial-actions button.primary):hover:not(:disabled){
  transform:none;box-shadow:0 1px 0 #c96055,0 4px 10px #26313f26!important
}
html.public-sketch-ui:root body:not(.creator-mode) .submit-main:disabled{
  box-shadow:none!important
}
html.public-sketch-ui:root body:not(.creator-mode) .constraint-chip{
  transform:none;box-shadow:none!important
}
html.public-sketch-ui:root body:not(.creator-mode) :is(.constraint-meter,.tutorial-progress-track){
  border-color:#cbd6e3
}
html.public-sketch-ui:root body:not(.creator-mode) :is(#constraintMeterFill,.tutorial-progress-fill){
  background-image:none!important
}
html.public-sketch-ui:root body:not(.creator-mode) .toolbar .icon-btn[aria-pressed="true"]:not(.voice-btn){
  border-radius:8px!important;border-color:#d8ac4b!important
}
