/* 4KJax shared sky: drifting starfield + shooting stars (technique from Ordo's Deep space theme).
   Needs <div class="shooting-stars" aria-hidden="true"> with three <i> children right after <body>,
   and html (not body) painting the page background, or body's background covers these -1 layers. */
  body::before, body::after { content: ""; position: fixed; z-index: -1; pointer-events: none; }
  body::before { top: -300px; left: -300px; right: 0; bottom: 0; background: radial-gradient(1.2px 1.2px at 25px 40px, #fff, transparent 2px), radial-gradient(1px 1px at 140px 90px, rgba(255,255,255,.8), transparent 2px), radial-gradient(1.6px 1.6px at 220px 210px, #e0f2fe, transparent 2.5px), radial-gradient(1px 1px at 80px 250px, rgba(255,255,255,.7), transparent 2px), radial-gradient(1.3px 1.3px at 270px 30px, #cffafe, transparent 2px), radial-gradient(.8px .8px at 190px 150px, rgba(255,255,255,.6), transparent 1.6px), radial-gradient(1.4px 1.4px at 45px 180px, #fff, transparent 2.4px), radial-gradient(1px 1px at 250px 120px, rgba(255,255,255,.85), transparent 2px), radial-gradient(1.8px 1.8px at 110px 15px, rgba(165,243,252,.95), transparent 3px), radial-gradient(1px 1px at 170px 270px, rgba(255,255,255,.75), transparent 2px); background-size: 300px 300px; animation: stars-a 90s linear infinite; opacity: 0.35; }
  body::after { top: -500px; left: 0; right: -500px; bottom: 0; background: radial-gradient(1px 1px at 60px 120px, rgba(255,255,255,.55), transparent 2px), radial-gradient(1px 1px at 330px 400px, rgba(186,230,253,.6), transparent 2px), radial-gradient(.8px .8px at 420px 60px, rgba(255,255,255,.5), transparent 1.6px); background-size: 500px 500px; animation: stars-b 160s linear infinite; opacity: 0.5; }
  @keyframes stars-a { to { transform: translate3d(300px, 300px, 0); } }
  @keyframes stars-b { to { transform: translate3d(-500px, 500px, 0); } }
  @media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; } }


/* Shooting stars: a few streaks that flare across the sky now and then, each on its own long cycle. */
  .shooting-stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
  .shooting-stars i { position: absolute; left: var(--x); top: var(--y); width: 150px; height: 2px; border-radius: 2px; opacity: 0;
    background: linear-gradient(90deg, rgba(103,232,249,0), rgba(207,250,254,0.9) 85%, #fff);
    filter: drop-shadow(0 0 6px rgba(103,232,249,0.9));
    transform: rotate(var(--a)) translateX(0); animation: shoot var(--t) linear var(--d) infinite; }
  .shooting-stars i::after { content: ""; position: absolute; right: -2px; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 3px rgba(103,232,249,0.9); }
  @keyframes shoot { 0% { opacity: 0; transform: rotate(var(--a)) translateX(0); } 0.6% { opacity: 1; } 3% { opacity: 1; } 4% { opacity: 0; transform: rotate(var(--a)) translateX(95vw); } 100% { opacity: 0; transform: rotate(var(--a)) translateX(95vw); } }
  @media (prefers-reduced-motion: reduce) { .shooting-stars { display: none; } }
