/* Shared low-weight desert background and deepest midnight-blue controls. */
:root { --ew-midnight-button: #04152c; }
html body.ew-earth-chapters,
html body.ew-prelude-page {
  min-height: 100vh;
  background-color: #04152c !important;
  background-image:
    linear-gradient(180deg, rgba(2, 16, 35, .40), rgba(2, 16, 35, .28) 42%, rgba(2, 16, 35, .52)),
    url("earth-wakens-bg-low.jpg") !important;
  background-position: center center, center 46%;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
html body.ew-earth-chapters { isolation: isolate; }
html body.ew-earth-chapters #root,
html body.ew-earth-chapters .landing,
html body.ew-earth-chapters .home-intro,
html body.ew-earth-chapters .chapter-heading,
html body.ew-earth-chapters .reading,
html body.ew-earth-chapters .ask-page,
html body.ew-earth-chapters footer,
html body.ew-prelude-page > header,
html body.ew-prelude-page > main,
html body.ew-prelude-page > footer {
  background-color: transparent !important;
  background-image: none !important;
}
html body.ew-earth-chapters .ew-final {
  background: rgba(2, 17, 36, .28) !important;
}
html body.ew-earth-chapters .site-header {
  background: rgba(3, 18, 39, .90) !important;
  border-bottom-color: #62799288 !important;
}
html body.ew-earth-chapters .invitation {
  background: rgba(3, 19, 40, .78) !important;
}
html body.ew-earth-chapters :is(
  button,
  .button,
  .chapter-buttons a,
  .ew-chapter-list a,
  .page-turn a,
  .back-link,
  .text-link,
  .ew-info-links a,
  .ew-journey-chapters a,
  .page-back,
  .ew-prelude-chapter-link
),
html body.ew-prelude-page :is(
  button,
  .button,
  .chapter-buttons a,
  .ew-chapter-list a,
  .page-turn a,
  .back-link,
  .text-link,
  .ew-info-links a,
  .ew-journey-chapters a,
  .page-back,
  .ew-prelude-chapter-link
) {
  background-color: var(--ew-midnight-button) !important;
  background-image: linear-gradient(180deg, #0b2746 0%, #061a33 50%, #031020 100%) !important;
  border-color: #526c86 !important;
  color: #f4efe2 !important;
  box-shadow: inset 0 1px 2px #ffffff26, 0 4px 12px #0008 !important;
}
html body.ew-earth-chapters :is(
  button:hover,
  .button:hover,
  .chapter-buttons a:hover,
  .ew-chapter-list a:hover,
  .page-turn a:hover,
  .text-link:hover
),
html body.ew-prelude-page :is(
  button:hover,
  .button:hover,
  .chapter-buttons a:hover,
  .ew-chapter-list a:hover,
  .page-turn a:hover,
  .text-link:hover,
  .ew-info-links a:hover,
  .ew-journey-chapters a:hover,
  .page-back:hover,
  .ew-prelude-chapter-link:hover
) {
  background-image: linear-gradient(180deg, #123356 0%, #08213d 50%, #04162a 100%) !important;
  filter: brightness(1.12);
}
html body.ew-earth-chapters .ew-final-layout .chapter-number,
html body.ew-earth-chapters .ew-living-chapters > a.ew-number {
  background: #04152c !important;
  color: #f4efe2 !important;
  border-color: #8196aa !important;
}
html body.ew-prelude-page::before { animation: none !important; background: none !important; filter: none !important; }
@media (prefers-reduced-motion: reduce) {
  html body.ew-earth-chapters,
  html body.ew-prelude-page { background-attachment: scroll; }
}
html body.ew-earth-chapters .chapter-buttons { background: transparent !important; }
html body.ew-earth-chapters :is(
  .ew-chapters a,
  .ew-template-chapters a,
  .ew-template-number,
  .home-next a,
  .illustration-note-link,
  .ew-questions-button,
  .ew-email-button,
  .ew-final .ew-explain,
  .ew-final .ew-prelude-top
) {
  background-color: var(--ew-midnight-button) !important;
  background-image: linear-gradient(180deg, #0b2746 0%, #061a33 50%, #031020 100%) !important;
  border-color: #526c86 !important;
  color: #f4efe2 !important;
  box-shadow: inset 0 1px 2px #ffffff26, 0 4px 12px #0008 !important;
}
html body.ew-earth-chapters .ew-chapters a:hover,
html body.ew-earth-chapters .ew-template-chapters a:hover,
html body.ew-earth-chapters .home-next a:hover,
html body.ew-earth-chapters .illustration-note-link:hover,
html body.ew-earth-chapters .ew-questions-button:hover,
html body.ew-earth-chapters .ew-email-button:hover {
  background-image: linear-gradient(180deg, #123356 0%, #08213d 50%, #04162a 100%) !important;
}
