/* Library of Consciousness · Celestial path */
.celestial-library{position:relative;overflow:hidden;padding:76px 0 86px;background:
radial-gradient(circle at 35% 48%,rgba(250,199,0,.18),transparent 10%),
radial-gradient(circle at 12% 30%,rgba(70,89,150,.22),transparent 25%),
linear-gradient(145deg,#0e0718 0%,#1d0929 48%,#090712 100%);color:#fff8dc;border-top:1px solid rgba(250,199,0,.35)}
.celestial-library:before,.celestial-library:after{content:"";position:absolute;inset:0;pointer-events:none}
.celestial-library:before{opacity:.7;background-image:radial-gradient(circle,#fff8dc 0 1px,transparent 1.4px),radial-gradient(circle,#fac700 0 1px,transparent 1.5px);background-position:0 0,43px 71px;background-size:89px 89px,137px 137px}
.celestial-library:after{background:radial-gradient(ellipse at 100% 0%,rgba(109,73,145,.22),transparent 42%)}
.celestial-inner{position:relative;z-index:1}
.celestial-head{display:grid;grid-template-columns:1.15fr .85fr;gap:7vw;align-items:end;margin-bottom:30px}
.celestial-head h2{color:#fff7dc;margin:0;font-size:clamp(38px,5vw,72px)}
.celestial-head p{max-width:620px;color:rgba(255,248,220,.76)}
.celestial-library .eyebrow{color:#e7c95b}
.constellation-filters{display:flex;gap:8px;flex-wrap:wrap;margin:22px 0 28px}
.constellation-filter{border:1px solid rgba(250,199,0,.45);background:rgba(20,7,31,.76);color:#fff4c6;padding:10px 13px;font:600 9px/1.2 "Cinzel",serif;letter-spacing:.08em;text-transform:uppercase;cursor:pointer}
.constellation-filter[aria-pressed="true"],.constellation-filter:hover,.constellation-filter:focus-visible{background:#fac700;color:#320840;border-color:#fac700}
.celestial-stage{position:relative;display:grid;grid-template-columns:minmax(0,1.55fr) minmax(290px,.72fr);min-height:690px;border:1px solid rgba(250,199,0,.33);background:rgba(7,4,15,.38);box-shadow:0 28px 80px rgba(0,0,0,.35);backdrop-filter:blur(3px)}
.celestial-map{position:relative;min-height:690px;overflow:hidden}
.cosmos-orbit{position:absolute;left:50%;top:50%;border:1px solid rgba(229,201,121,.27);border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}
.cosmos-orbit.one{width:45%;aspect-ratio:1}.cosmos-orbit.two{width:68%;aspect-ratio:1}.cosmos-orbit.three{width:91%;aspect-ratio:1}
.cosmos-orbit:after{content:"";position:absolute;top:50%;left:-3px;width:6px;height:6px;border-radius:50%;background:#fac700;box-shadow:0 0 14px #fac700}
.cosmos-orbit.two:after{top:12%;left:77%}.cosmos-orbit.three:after{top:75%;left:91%}
.cosmos-sun{position:absolute;left:50%;top:50%;width:138px;height:138px;border:1px solid rgba(255,227,119,.8);border-radius:50%;transform:translate(-50%,-50%);display:grid;place-items:center;text-align:center;background:radial-gradient(circle,#fff7bd 0,#fac700 22%,#d49217 49%,rgba(219,147,18,.18) 70%,transparent 72%);box-shadow:0 0 35px rgba(250,199,0,.8),0 0 100px rgba(250,199,0,.32);color:#320840;font:700 9px/1.3 "Cinzel",serif;letter-spacing:.08em;text-transform:uppercase}
.cosmos-sun:before{content:"☉";display:block;font-size:47px;line-height:.8}
.cosmos-node{--node:#dfb83e;position:absolute;width:92px;min-height:92px;transform:translate(-50%,-50%);border:0;background:transparent;color:#fff6d0;cursor:pointer;text-align:center;font:600 10px/1.2 "Cinzel",serif;letter-spacing:.025em;transition:opacity .25s,transform .25s}
.cosmos-node:before{content:"✦";display:grid;place-items:center;width:43px;height:43px;margin:0 auto 7px;border:1px solid var(--node);border-radius:50%;background:rgba(16,7,27,.88);color:var(--node);font-size:17px;box-shadow:0 0 12px color-mix(in srgb,var(--node) 60%,transparent),inset 0 0 12px color-mix(in srgb,var(--node) 25%,transparent);animation:star-breathe 4s ease-in-out infinite}
.cosmos-node[data-access="public-domain"]{--node:#b6c88e}.cosmos-node[data-access="open-access"]{--node:#8ebad8}.cosmos-node[data-access="copyrighted"]{--node:#d7a849}.cosmos-node[data-access="school-created"]{--node:#d79bcf}
.cosmos-node:hover,.cosmos-node:focus-visible,.cosmos-node[aria-current="true"]{z-index:3;transform:translate(-50%,-50%) scale(1.09);color:#fff}
.cosmos-node[aria-current="true"]:before{background:var(--node);color:#1c0a28;box-shadow:0 0 28px var(--node)}
.cosmos-node.is-dim{opacity:.13;pointer-events:none}
@keyframes star-breathe{50%{box-shadow:0 0 22px color-mix(in srgb,var(--node) 80%,transparent),inset 0 0 18px color-mix(in srgb,var(--node) 32%,transparent)}}
.celestial-card{align-self:stretch;display:flex;flex-direction:column;padding:38px 32px;background:linear-gradient(160deg,rgba(255,250,240,.97),rgba(239,224,189,.96));color:#2f2130;border-left:1px solid rgba(250,199,0,.5)}
.celestial-card .catalog-state{align-self:flex-start;margin-bottom:20px;padding:7px 10px;background:#aab5a2;color:#1f2430;font:700 8px "Cinzel",serif;letter-spacing:.1em;text-transform:uppercase}
.celestial-card h3{font:600 clamp(28px,3vw,43px)/1.04 "Playfair Display SC",serif;color:#320840;margin:0 0 9px}
.celestial-card .celestial-sanskrit{min-height:30px;margin:0 0 22px;color:#6f5743;font-size:25px}
.celestial-card .celestial-collection{margin:0 0 20px;color:#805f21;font:600 9px "Cinzel",serif;letter-spacing:.12em;text-transform:uppercase}
.celestial-card .celestial-summary{font-size:19px;line-height:1.55}
.celestial-card .celestial-question{margin-top:auto;padding:19px 0;border-top:1px solid rgba(111,87,67,.3);font-style:italic}
.celestial-card .button{margin-top:18px;text-align:center}
.celestial-legend{display:flex;gap:18px;flex-wrap:wrap;margin-top:20px;color:#efe0bd;font:600 9px "Cinzel",serif;letter-spacing:.06em;text-transform:uppercase}
.celestial-legend span:before{content:"✦";margin-right:7px;color:var(--legend)}
.celestial-legend span:nth-child(1){--legend:#b6c88e}.celestial-legend span:nth-child(2){--legend:#8ebad8}.celestial-legend span:nth-child(3){--legend:#d7a849}.celestial-legend span:nth-child(4){--legend:#d79bcf}
.celestial-list-link{display:inline-block;margin-top:22px;color:#fff0ab;font:600 10px "Cinzel",serif;text-transform:uppercase;letter-spacing:.09em;text-underline-offset:5px}
@media(max-width:980px){.celestial-head{grid-template-columns:1fr}.celestial-stage{grid-template-columns:1fr}.celestial-map{min-height:610px}.celestial-card{min-height:480px;border-left:0;border-top:1px solid rgba(250,199,0,.5)}}
@media(max-width:620px){.celestial-library{padding:55px 0 65px}.constellation-filters{overflow-x:auto;flex-wrap:nowrap;padding-bottom:7px}.constellation-filter{flex:0 0 auto}.celestial-stage{margin-inline:-3vw}.celestial-map{min-height:540px}.cosmos-sun{width:104px;height:104px}.cosmos-node{width:74px;min-height:74px;font-size:8px}.cosmos-node:before{width:34px;height:34px;margin-bottom:5px}.celestial-card{padding:30px 23px;min-height:460px}}
@media(prefers-reduced-motion:reduce){.cosmos-node:before{animation:none}.cosmos-node{transition:none}}

/* V2 · immersive viewport and archival Hubble field */
.celestial-library{height:calc(100svh - 76px);min-height:620px;padding:22px 0 18px;isolation:isolate}
.celestial-library:before{inset:-18px;opacity:.48;background-image:url("https://upload.wikimedia.org/wikipedia/commons/c/c1/The_Hubble_Ultra_Deep_Field_%282006-12-1870%29.jpg");background-position:center;background-size:cover;filter:blur(5px) saturate(.7) hue-rotate(175deg);transform:scale(1.035);z-index:-2}
.celestial-library:after{background:linear-gradient(115deg,rgba(4,11,34,.87),rgba(22,7,40,.73) 54%,rgba(3,17,41,.89)),radial-gradient(circle at 35% 52%,rgba(250,199,0,.17),transparent 25%);z-index:-1}
.celestial-inner{height:100%;display:flex;flex-direction:column}
.celestial-head{grid-template-columns:1fr minmax(300px,.72fr);gap:4vw;margin-bottom:10px}
.celestial-head h2{font-size:clamp(30px,3.4vw,52px)}
.celestial-head p{margin:0;font-size:16px;line-height:1.35}
.constellation-filters{margin:7px 0 11px}
.celestial-stage{flex:1;min-height:0}
.celestial-map{min-height:0;height:100%}
.celestial-card{overflow:auto;scrollbar-width:none;padding:27px 27px}.celestial-card::-webkit-scrollbar{display:none}
.celestial-card h3{font-size:clamp(25px,2.5vw,38px)}
.celestial-card .celestial-summary{font-size:17px}
.celestial-card .celestial-question{margin-top:18px}
.celestial-legend{margin-top:8px}
.celestial-list-link{position:absolute;right:0;bottom:0;margin:0}
.space-credit{position:absolute;left:50%;bottom:0;transform:translateX(-50%);margin:0;color:rgba(255,248,220,.58);font:500 7px/1.3 "Cinzel",serif;letter-spacing:.06em;text-align:center;white-space:nowrap}
@media(max-width:980px){
 .celestial-library{height:calc(100svh - 70px);min-height:600px;padding:15px 0 12px}
 .celestial-head{display:block;margin-bottom:5px}.celestial-head h2{font-size:clamp(27px,6vw,40px)}
 .celestial-head>p{display:none}
 .constellation-filters{margin:4px 0 7px;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}.constellation-filters::-webkit-scrollbar{display:none}
 .celestial-stage{display:block;position:relative;min-height:0}
 .celestial-map{height:100%;min-height:0}
 .celestial-card{position:absolute;z-index:8;left:10px;right:10px;bottom:10px;min-height:0;max-height:38%;padding:18px 20px;border:1px solid rgba(250,199,0,.65);box-shadow:0 18px 42px rgba(0,0,0,.35)}
 .celestial-card .catalog-state{margin-bottom:7px}.celestial-card .celestial-collection{margin-bottom:7px}
 .celestial-card h3{font-size:25px;margin-bottom:3px}.celestial-card .celestial-sanskrit{min-height:0;margin-bottom:8px;font-size:20px}
 .celestial-card .celestial-summary{display:none}.celestial-card .celestial-question{display:none}
 .celestial-card .button{margin-top:7px;padding:10px 13px}
 .celestial-legend{display:none}.celestial-list-link{display:none}.space-credit{left:auto;right:4px;transform:none;font-size:6px}
}
@media(max-width:620px){
 .celestial-library{height:calc(100svh - 64px);min-height:560px;padding:10px 0}
 .celestial-library .wrap{width:94vw}
 .celestial-head .eyebrow{margin-bottom:5px}.celestial-head h2{font-size:25px}
 .constellation-filter{padding:8px 10px;font-size:8px}
 .celestial-stage{margin:0}
 .cosmos-sun{width:88px;height:88px;font-size:7px}.cosmos-sun:before{font-size:35px}
 .cosmos-node{width:66px;min-height:60px;font-size:7px;line-height:1.1}
 .cosmos-node:before{width:29px;height:29px;font-size:13px}
 .celestial-card{left:6px;right:6px;bottom:7px;max-height:35%;padding:14px 16px}
 .celestial-card h3{font-size:21px}.celestial-card .celestial-sanskrit{font-size:17px}
 .celestial-card .button{font-size:8px}
}
@media(max-height:690px) and (max-width:980px){
 .celestial-head h2{font-size:22px}.celestial-head .eyebrow{display:none}
 .constellation-filter{padding:7px 9px}
 .celestial-card{max-height:32%}
}

@media(min-width:981px){.celestial-library{height:calc(100svh - 115px)}}
.cosmos-fullscreen{position:absolute;right:0;top:0;z-index:12;border:1px solid rgba(250,199,0,.55);background:rgba(9,5,18,.72);color:#fff0ab;padding:9px 12px;font:600 8px/1 "Cinzel",serif;letter-spacing:.09em;text-transform:uppercase;cursor:pointer}
.cosmos-fullscreen:hover,.cosmos-fullscreen:focus-visible{background:#fac700;color:#320840}
body.cosmos-open{overflow:hidden}
.celestial-library.is-fullscreen{position:fixed;inset:0;z-index:300;height:100svh!important;min-height:0!important;padding-top:15px}
.celestial-library.is-fullscreen .cosmos-fullscreen{position:fixed;right:14px;top:14px}
@media(max-width:980px){.cosmos-fullscreen{right:0;top:0}.celestial-library.is-fullscreen{padding-top:10px}}
