body{isolation:isolate}.galaxy-background{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden}body>main,body>header,body>footer{position:relative;z-index:1}.galaxy-background b{position:absolute;width:clamp(105px,22vw,330px);aspect-ratio:1;background:url('https://images-assets.nasa.gov/image/PIA04230/PIA04230~small.jpg') center/cover no-repeat;opacity:.83;mask-image:radial-gradient(ellipse,#000 38%,transparent 72%)}.galaxy-background b:first-child{left:0;top:30%}.galaxy-background b:nth-child(2){right:0;bottom:5%;background-image:url('https://images-assets.nasa.gov/image/GSFC_20171208_Archive_e002154/GSFC_20171208_Archive_e002154~small.jpg')}.galaxy-background i{position:absolute;left:var(--x);top:var(--y);width:var(--s);height:var(--s);background:#8d53ac;clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%);animation:galaxy-twinkle 4s ease-in-out var(--d) infinite}.galaxy-background i:nth-of-type(3n){background:#b88435}@keyframes galaxy-twinkle{0%,100%{opacity:.28;transform:scale(.76)}50%{opacity:1;transform:scale(1.13)}}@media(prefers-reduced-motion:reduce){.galaxy-background b,.galaxy-background i{animation:none}}@media print{.galaxy-background{display:none}}
/* Full-bleed NASA photography under the light page areas. */
.galaxy-background {
 background:linear-gradient(135deg,rgba(233,204,247,.51),rgba(249,190,211,.56)),
 url("https://images-assets.nasa.gov/image/PIA08093/PIA08093~medium.jpg") center / cover no-repeat;
}
.galaxy-background b { display:none; }
body > main { background:transparent; }
main > .container, main.course-page { background:transparent; }
.galaxy-background i { z-index:1; }
@media print { .galaxy-background { display:none; } }

/* Readable text surfaces over the NASA photography. */
body:has(> .galaxy-background) main :is(.section-head,.directory-controls,.course-group > h2,.course-page > section > h2,.course-note,.note),
body:has(> .galaxy-background) main > :is(h1,h2,p),
body:has(> .galaxy-background) main > .container > :is(h1,h2,p),
body:has(> .galaxy-background) main > section:not(.hero):not(.intro):not(#spiritual-learning-promo) > :is(h1,h2,p) {
 background:#faf5fc;
 color:#362244;
 border-radius:10px;
 padding:clamp(12px,2vw,22px);
}
body:has(> .galaxy-background) main .section-head :is(p,.sub) { color:#51415d; }

#spiritual-learning-promo .eyebrow { color:#f6dda9; }

/* Clean lower edge behind the page footer. */
.galaxy-background { mask-image:linear-gradient(to bottom,#000 0%,#000 68%,transparent 92%); }

/* Mobile background performance: preserve celestial atmosphere without loading full-page NASA photography. */
@media(max-width:760px){
.galaxy-background{background:radial-gradient(ellipse at 12% 22%,rgba(153,111,186,.24),transparent 54%),radial-gradient(ellipse at 87% 72%,rgba(221,173,205,.20),transparent 57%),linear-gradient(135deg,#f0e4f7,#f9eff4 55%,#eee1f7);mask-image:none}
.galaxy-background i:nth-of-type(n+9){display:none}
.galaxy-background i{animation-duration:8s}
}
