/* WayOfLearning default application background.
   Custom user backgrounds keep precedence through .has-custom-background. */
:where(.wol-app-screen, .wol-app-shell):not(.has-custom-background) {
  background-color: #071a35 !important;
  background-image:
    linear-gradient(180deg, rgba(2, 10, 30, 0.10) 0%, rgba(2, 10, 30, 0.24) 100%),
    url('/assets/wayoflearning-default-background.webp') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

/* The generated image is already dark and saturated. Keep the sky theme
   slightly softer behind white/translucent study cards without washing it out. */
:where(.wol-app-screen, .wol-app-shell).theme-sky:not(.has-custom-background) {
  background-image:
    linear-gradient(180deg, rgba(219, 242, 255, 0.04) 0%, rgba(4, 25, 55, 0.18) 100%),
    url('/assets/wayoflearning-default-background.webp') !important;
}

/* iOS does not consistently support fixed background attachment. The image
   remains full-cover and stable rather than triggering Safari repaint glitches. */
@supports (-webkit-touch-callout: none) {
  :where(.wol-app-screen, .wol-app-shell):not(.has-custom-background) {
    background-attachment: scroll !important;
    background-position: center top !important;
  }
}
