/* Butterfly Dreams only: keep the local submenu visually clean after selection.
   Keyboard focus remains visible through the shared solid focus outline. */
body.mpd-butterfly-template.mpd-module-original-scores .mpd-system-local-nav a::after {
  content: none !important;
  display: none !important;
}

body.mpd-butterfly-template.mpd-module-original-scores .mpd-system-local-nav a:focus:not(:focus-visible) {
  box-shadow: none !important;
  outline: none !important;
}

body.mpd-butterfly-template.mpd-module-original-scores .mpd-system-local-nav a:focus-visible {
  border-radius: 3px;
  box-shadow: inset 0 0 0 3px #b36d12 !important;
  outline: none !important;
}

/* Blend the final area of the hero into the paper behind the work-details
   card, avoiding a hard banner boundary without changing the hero layout. */
body.mpd-butterfly-template.mpd-module-original-scores .bd-hero {
  isolation: isolate;
  position: relative;
}

body.mpd-butterfly-template.mpd-module-original-scores .bd-hero::after {
  background: linear-gradient(
    180deg,
    rgba(251, 250, 247, 0) 0%,
    rgba(251, 250, 247, .34) 42%,
    rgba(251, 250, 247, .8) 78%,
    var(--bd-paper) 100%
  );
  bottom: 0;
  content: "";
  height: clamp(72px, 9vw, 120px);
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  z-index: 0;
}

body.mpd-butterfly-template.mpd-module-original-scores .bd-hero__inner {
  position: relative;
  z-index: 1;
}

/* Original compositions: match the Edition details card width and lower
   breathing room from the approved paid-score template at every viewport. */
body.mpd-butterfly-template.mpd-module-original-scores .bd-facts {
  margin: 0 auto 45px;
  max-width: 1116px;
  width: calc(100% - 64px);
}

@media (max-width: 720px) {
  body.mpd-butterfly-template.mpd-module-original-scores .bd-facts {
    margin-bottom: 25px;
    width: calc(100% - 40px);
  }
}

/* The Spanish canonical page is preserved as editorial source in production.
   Give its N1-N5 value the same compact, readable treatment without changing
   the legacy article structure. */
body[data-mpd-level-range].mpd-module-original-scores .mpd-level-canonical-fallback {
  align-items: center;
  background: #f5f1e9;
  border: 1px solid rgba(31, 43, 55, .18);
  border-radius: 999px;
  color: #1f2b37;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin: 8px 0 20px;
  min-height: 32px;
  padding: 6px 12px;
}

@media (max-width: 430px) {
  body[data-mpd-level-range].mpd-module-original-scores .mpd-level-canonical-fallback {
    font-size: 13px;
  }
}
