/* Opt-in transparent header: one uncropped background starts behind the masthead
   and scrolls with the content. Shared dimensions stay intact; pages opt in individually. */
body.lm-transparent-header .lm-page-backdrop {
  display: flow-root;
  min-height: max(100svh, var(--lm-bg-height));
  background: #000 var(--lm-page-background) left top / 100% auto no-repeat;
}
body.lm-transparent-header :is(.lm-header, .lm-masthead, .lm-tagline-artwork, .lm-tagline-artwork img),
body.lm-transparent-header .lm-header :is(.lm-nav, .cf-lm-section-nav) {
  background-color: transparent;
}
body.lm-transparent-header .lm-starfield {
  min-height: 0;
  background: transparent;
}
body.lm-transparent-header .lm-starfield::before { content: none; }
@media (min-width: 801px) {
  html:not(.cf-mobile-layout-held) body.lm-transparent-header .lm-page-backdrop {
    min-height: max(100svh, var(--lm-bg-height-wide, var(--lm-bg-height)));
    background-image: var(--lm-page-background-wide, var(--lm-page-background));
  }
}
/* These pages use artwork on desktop and plain black on mobile. */
html.cf-mobile-layout-held body.lm-transparent-header .lm-page-backdrop {
  min-height: 0;
  background: #000;
}
@media (max-width: 800px) {
  body.lm-transparent-header .lm-page-backdrop {
    min-height: 0;
    background: #000;
  }
}

/* The Movies star field covers header and content without reserving the entire
   tall artwork. Keep this decorative background on mobile as well. */
html body.lm-transparent-header.lm-star-background .lm-page-backdrop,
html.cf-mobile-layout-held body.lm-transparent-header.lm-star-background .lm-page-backdrop {
  min-height: 0;
  background: #000 var(--lm-page-background) left top / 100% auto repeat-y;
}

/* Laptop compensation for scenic artwork behind the header.
   Ease back to the existing scale at 1600px; never enlarge the source above
   its native 1920px width. Foreground artwork and thumbnails are untouched. */
@media (min-width: 801px) and (max-width: 1599px) {
  html:not(.cf-mobile-layout-held) body.lm-transparent-header:not(.lm-star-background) .lm-page-backdrop {
    --lm-laptop-art-width: min(1600px, 120vw);
    min-height: max(100svh, calc(var(--lm-laptop-art-width) * .5625));
    background-size: var(--lm-laptop-art-width) auto;
  }
  /* Keep the right-hand characters, neon sign and lamp post in view. */
  html:not(.cf-mobile-layout-held) body:is(.lm-story-page, .lm-about-page) .lm-page-backdrop {
    background-position: center top;
  }
}
