/* Optional full-screen constellation layer. Remove its link for the compact backdrop. */
@media (min-width: 1051px) and (hover: hover) and (pointer: fine) {
  body,
  body:has(#content[data-page="tier-list"]) {
    background-image:
      var(--leyra-sky-pattern),
      url("./leyra-desktop-sky.svg"),
      radial-gradient(ellipse at 86% 9%, var(--leyra-sky-color), transparent 68%),
      radial-gradient(ellipse at 0% 85%, #6847923b, transparent 53%),
      radial-gradient(ellipse at 100% 83%, #6b459239, transparent 48%),
      linear-gradient(126deg, #1a1424 0%, #131019 46%, #171121 100%);
    background-size: min(950px, 72vw) auto, cover, cover, cover, cover, cover;
    background-repeat: no-repeat;
    background-position: right max(0px, calc((100% - 1550px) / 2)) top 54px, center, center, center, center, center;
    background-attachment: fixed;
  }
}
/* Mobile: paint the lower chart on the page rather than in a fixed layer.
   It leaves with the footer instead of jumping independently during overscroll. */
@media (max-width: 1050px), (hover: none), (pointer: coarse) {
  html { background-color: var(--bg, #100e16); }
  body,
  body:has(#content[data-page="tier-list"]) {
    --leyra-top-glow-height: 440px;
    --leyra-bottom-chart-height: min(100vh, 920px);
    background-image:
      var(--leyra-sky-pattern),
      radial-gradient(ellipse at 82% 0%, var(--leyra-sky-color), transparent 70%),
      url("./leyra-mobile-sky.svg"),
      radial-gradient(ellipse at 5% 88%, var(--leyra-sky-color), transparent 58%),
      radial-gradient(ellipse at 94% 92%, #60408627, transparent 53%);
    background-size:
      var(--leyra-sky-size) auto, 100% var(--leyra-top-glow-height),
      max(100%, 450px) var(--leyra-bottom-chart-height),
      100% var(--leyra-bottom-chart-height), 100% var(--leyra-bottom-chart-height);
    background-position: var(--leyra-sky-position), center top, center bottom, center bottom, center bottom;
    background-repeat: no-repeat;
    background-attachment: scroll;
  }
  body:has(#content[data-page="tier-list"]) { --leyra-top-glow-height: 345px; }
  @media (max-width: 720px) {
    body,
    body:has(#content[data-page="tier-list"]) { --leyra-top-glow-height: 295px; }
  }
  @supports (height: 100svh) {
    body,
    body:has(#content[data-page="tier-list"]) { --leyra-bottom-chart-height: min(100svh, 920px); }
  }
}
@media (forced-colors: active) {
  body, body:has(#content[data-page="tier-list"]) { background-image: none; }
  body::before { content: none; }
}
