/* Five static study backgrounds. The original home/game art stays independent. */
body[data-study-background="classroom"] {
  --study-background-image: url("assets/section-backgrounds/01-clases-con-audio.webp");
}

body[data-study-background="cards"] {
  --study-background-image: url("assets/section-backgrounds/02-fichas-con-audio.webp");
}

body[data-study-background="treatment"] {
  --study-background-image: url("assets/section-backgrounds/03-tratamiento.webp");
}

body[data-study-background="medications"] {
  --study-background-image: url("assets/section-backgrounds/04-farmacos.webp");
}

body[data-study-background="visual"] {
  --study-background-image: url("assets/section-backgrounds/05-preparar-un-tema.webp");
}

body[data-view][data-study-background] .cosmos {
  background-color: #140f1e;
  background-image:
    linear-gradient(90deg, #140f1e47 0%, #140f1ead 38%, #140f1ecc 52%, #140f1ecc 70%, #140f1e73 100%),
    var(--study-background-image);
  background-position: center, right center;
  background-size: cover, cover;
  background-repeat: no-repeat;
  transition: none;
}

/* The images already contain stars; avoid a second layer over the artwork. */
body[data-view][data-study-background] .cosmos::after {
  content: none;
}

@media (max-width: 800px) {
  body[data-view][data-study-background] .cosmos {
    /* Keep the top/centre quiet and the subject visible near the lower right. */
    background-image:
      linear-gradient(180deg, #140f1ef5 0%, #140f1ed6 38%, #140f1e59 100%),
      var(--study-background-image);
    background-position: center, right bottom;
    background-size: cover, auto 68%;
  }
}

@media print {
  body[data-view][data-study-background] .cosmos {
    display: none;
  }
}
