/* The canvas carries the spectacle; the interface stays quiet and precise. */
:root{color-scheme:dark;--ink:#e7eeef;--muted:#80939e;--hairline:#a4c5d320;--accent:#e7c58e;--accent-rgb:231,197,142;--panel:#071019e8}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:#03060d;color:var(--ink);font-family:system-ui,-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;overflow:hidden;-webkit-font-smoothing:antialiased}
body[data-view="alpha"]{--accent:#9bd8e8;--accent-rgb:155,216,232}
body[data-view="hole"]{--accent:#cab3ed;--accent-rgb:202,179,237}
button,a{-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;cursor:pointer;border:1px solid var(--hairline);background:#0c1720aa;border-radius:10px;padding:10px 15px;transition:color .2s,border-color .2s,background .2s,box-shadow .2s}
button:hover{border-color:rgba(var(--accent-rgb),.46);background:#15242ddd}
button:disabled{cursor:wait}
a{color:inherit;text-decoration:none}
button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:5px}
svg{display:block}

/* Atmospheric frame. No pointer interception or animated CSS filters. */
#space{position:fixed;inset:0;background:radial-gradient(ellipse at 26% 54%,#11334025,transparent 50%),radial-gradient(ellipse at 77% 30%,#253d6226,transparent 42%),radial-gradient(ellipse at 76% 72%,#3e1b411b,transparent 34%)}
#space::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,#03060d88 0%,transparent 22%,transparent 70%,#03060d80 100%),radial-gradient(ellipse at 50% 46%,transparent 43%,#01030a50 100%)}
canvas{display:block;touch-action:none}
#space canvas{transition:opacity .4s}
header{position:fixed;inset:0 0 auto;z-index:5;height:108px;padding:0 44px;display:flex;align-items:center;justify-content:space-between;pointer-events:none}
header>*{pointer-events:auto}
.brand{display:flex;align-items:center;gap:13px;font-size:15px;font-weight:480;letter-spacing:.09em;color:#e4e9e8}
.brand>span{display:grid;place-items:center;width:40px;height:40px;border:1px solid #afc9d145;border-radius:50%;color:#d0dedb;font:32px Georgia;background:radial-gradient(circle at 30% 20%,#b2d2d611,#0c182311);box-shadow:inset 0 0 14px #b6e0ed08}
.top-actions{display:flex;align-items:center;gap:18px}
#directory{display:flex;align-items:center;gap:10px;padding:10px 15px;font-size:12px;letter-spacing:.08em;background:#0c162085;border-color:#adcad326;min-height:40px}
#directory svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.2;opacity:.8}
.intro{position:fixed;left:45px;top:113px;pointer-events:none;z-index:2;transition:opacity .6s}
.eyebrow{font-size:9px;font-weight:500;letter-spacing:.24em;color:#8eabb6;line-height:1.8}
.intro .eyebrow{font-size:8px;letter-spacing:.3em;color:#79929e}
.view-tools{position:fixed;right:166px;top:35px;display:flex;gap:6px;z-index:5}
.view-tools button{width:38px;height:38px;padding:0;font-size:15px;border-color:#a4c5d318;background:#0c162066;color:#a5bcc4}
.view-tools button:hover,.view-tools button[aria-pressed="true"]{color:var(--accent);border-color:rgba(var(--accent-rgb),.4);background:#12252e}
body.hole-locked .view-tools #home,body.hole-locked #zoom-in,body.hole-locked #zoom-out,body.solar-locked .view-tools #home,body.solar-locked #zoom-in,body.solar-locked #zoom-out,body.alpha-locked .view-tools #home,body.alpha-locked #zoom-in,body.alpha-locked #zoom-out{display:none}
body.hole-locked .intro,body.solar-locked .intro,body.alpha-locked .intro{opacity:.6}

/* Three destinations in one dock; icon shapes remain legible at a small size. */
.destinations{position:fixed;z-index:6;left:50%;bottom:28px;transform:translateX(-50%);display:flex;gap:6px;width:min(790px,calc(100% - 64px));padding:7px;border:1px solid #acc6d329;border-radius:22px;background:linear-gradient(135deg,#12212ae8,#050d16eb 65%);box-shadow:0 20px 60px #0006,inset 0 1px #e9f2f508;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.destinations button{--nav-rgb:231,197,142;position:relative;display:flex;align-items:center;justify-content:center;gap:18px;flex:1;min-width:0;padding:16px 22px 16px 16px;border:1px solid transparent;border-radius:15px;background:transparent;text-align:left;color:#d1dce0;isolation:isolate}
.destinations button[data-view="alpha"]{--nav-rgb:155,216,232}
.destinations button[data-view="hole"]{--nav-rgb:202,179,237}
.destinations button::before{content:"";position:absolute;left:22px;right:22px;bottom:0;height:1px;background:linear-gradient(90deg,transparent,rgba(var(--nav-rgb),.7),transparent);opacity:0;transition:opacity .3s}
.destinations button:hover,.destinations button[aria-current="true"]{background:linear-gradient(135deg,rgba(var(--nav-rgb),.10),rgba(var(--nav-rgb),.025));border-color:rgba(var(--nav-rgb),.19);color:#f3f5f0;box-shadow:inset 0 1px rgba(var(--nav-rgb),.045)}
.destinations button:hover::before,.destinations button[aria-current="true"]::before{opacity:1}
.destinations button:focus-visible{outline-color:rgb(var(--nav-rgb));outline-offset:2px}
.destination-icon{width:44px;height:44px;flex:0 0 44px;fill:none;stroke:rgb(var(--nav-rgb));stroke-width:1;opacity:.65;transition:opacity .3s,transform .45s cubic-bezier(.2,.7,.2,1)}
.destinations button:hover .destination-icon,.destinations button[aria-current="true"] .destination-icon{opacity:1;transform:rotate(-7deg)}
.destination-icon .icon-faint{opacity:.35}
.destination-icon .icon-core{fill:rgb(var(--nav-rgb));stroke:none;opacity:.85}
.destination-icon .icon-point{fill:rgb(var(--nav-rgb));stroke:#0c151e;stroke-width:1.5}
.destination-icon .icon-bright{stroke-width:2;opacity:.85}
.nav-copy{display:block;white-space:nowrap}
.nav-copy>span{display:block;font-size:19px;font-weight:470;letter-spacing:.04em;line-height:1.35}
.nav-copy small{display:block;margin-top:6px;font-size:10px;letter-spacing:.14em;color:#78929f;transition:color .3s}
.destinations button:hover small,.destinations button[aria-current="true"] small{color:rgba(var(--nav-rgb),.72)}
.nav-index{position:absolute;right:11px;top:9px;font:8px ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.08em;color:rgba(var(--nav-rgb),.36)}

/* Scene labels and local hover affordances. */
#labels{position:fixed;inset:0;pointer-events:none;z-index:2}
.celestial-label{position:absolute;transform:translate(-50%,0);pointer-events:auto;white-space:nowrap;padding:7px 11px;border:1px solid transparent;border-radius:9px;background:transparent;font-size:11px;line-height:1.4;text-shadow:0 2px 10px #000;box-shadow:none}
.celestial-label small{display:none}
.celestial-label.major{text-align:center}
.celestial-label.dim{color:#8b9da5}
.celestial-label:hover,.celestial-label.is-hovered{background:#0c1b26dc;border-color:rgba(var(--accent-rgb),.35);color:var(--accent)!important}
.line-label{transform:translate(0,-50%);text-align:left!important;white-space:normal;min-width:190px;max-width:min(350px,47vw);padding:9px 14px;transition:opacity .35s,background .2s,border-color .2s}
.line-label::before{content:"";position:absolute;left:-24px;top:50%;width:24px;height:1px;background:linear-gradient(90deg,rgba(var(--accent-rgb),.4),rgba(var(--accent-rgb),.1));pointer-events:none}
.line-label span{display:block;color:#788f9b;font-size:9px;letter-spacing:.13em;line-height:1.3}
.line-label small{display:block;font-size:14px;font-weight:450;color:#dfe9ea;letter-spacing:.025em;margin-top:5px;line-height:1.5}
.line-label:hover small,.celestial-label.is-hovered small{color:var(--accent)}
.neighbor-label{transform:translate(-50%,0);text-align:center;min-width:76px;max-width:120px;white-space:normal;padding:8px 4px}
.neighbor-label span{display:block;font-size:8px;color:#607b89;letter-spacing:.08em}
.neighbor-label small{display:block;font-size:10px;line-height:1.5;color:#a7bec8;margin-top:4px}
#planet-tooltip{position:fixed;z-index:4;pointer-events:none;padding:13px 17px;border:1px solid rgba(var(--accent-rgb),.27);border-radius:12px;background:#08131ded;box-shadow:0 12px 32px #0007;font-size:12px;color:#e3eeeb;max-width:280px;line-height:1.7}
#planet-tooltip strong{display:block;font-size:10px;color:var(--accent);font-weight:450;letter-spacing:.04em;margin-bottom:4px}
#region-halos{position:fixed;inset:0;pointer-events:none;z-index:1}
.region-halo{--region-rgb:231,197,142;position:absolute;border-radius:50%;border:1px solid transparent;opacity:0;transition:opacity .35s,border-color .35s,box-shadow .35s;background:radial-gradient(ellipse,transparent 48%,rgba(var(--region-rgb),.018) 75%,rgba(var(--region-rgb),.045) 94%,transparent)}
.region-halo[data-region="alpha"]{--region-rgb:155,216,232}
.region-halo[data-region="hole"]{--region-rgb:202,179,237}
.region-halo.active{opacity:1;border-color:rgba(var(--region-rgb),.2);box-shadow:0 0 30px rgba(var(--region-rgb),.08),inset 0 0 38px rgba(var(--region-rgb),.05)}
.region-halo span{position:absolute;left:50%;bottom:3%;transform:translate(-50%,50%);background:#08121cdd;color:rgb(var(--region-rgb));border:1px solid rgba(var(--region-rgb),.23);border-radius:20px;padding:8px 19px;font-size:11px;letter-spacing:.14em;white-space:nowrap}

/* In-scene chapter details. */
.chapter-back{position:fixed;z-index:5;left:45px;top:174px;font-size:11px;color:#92aab5;background:#0b172075;padding:9px 14px;letter-spacing:.05em}
#chapter-detail{position:fixed;z-index:3;left:55%;right:6%;top:176px;bottom:150px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#54738050 transparent;padding:8px 12px 26px 34px;opacity:0;transform:translateX(40px);pointer-events:none;transition:opacity .6s ease .1s,transform .8s cubic-bezier(.2,.7,.2,1);border-left:1px solid rgba(var(--accent-rgb),.17)}
body.detail-open #chapter-detail{opacity:1;transform:translateX(0);pointer-events:auto}
.detail-heading{position:relative;padding-bottom:22px;margin-bottom:9px}
.detail-heading::after{content:"";position:absolute;left:0;bottom:0;width:38px;height:1px;background:var(--accent);opacity:.5}
#detail-book{margin:0 0 10px;color:var(--accent);font-size:9px;letter-spacing:.22em}
#chapter-detail h2{font-size:clamp(23px,2.1vw,31px);font-weight:430;letter-spacing:.025em;line-height:1.5;margin:0;color:#eef2f0}
#detail-count{display:block;font-size:10px;letter-spacing:.09em;color:#698590;margin-top:13px}
#detail-count:empty{display:none}
.resource{position:relative;display:block;padding:19px 28px 19px 0;border-bottom:1px solid #a3c5d117;min-height:65px;transition:color .2s,background .2s,padding .2s}
.resource::after{content:"↗";position:absolute;right:7px;top:50%;transform:translateY(-50%);font-size:17px;color:#526f7c;transition:color .2s,transform .2s}
.resource:hover{color:var(--accent);background:linear-gradient(90deg,rgba(var(--accent-rgb),.04),transparent);padding-left:9px}
.resource:hover::after{color:var(--accent);transform:translate(2px,calc(-50% - 2px))}
.resource .num{color:#6e919f;font:9px ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.12em}
.resource h3{font-size:15px;font-weight:440;line-height:1.7;margin:5px 0 0;letter-spacing:.015em}
.resource p{display:none}
.empty{border:1px dashed #9db3c126;border-radius:12px;margin-top:24px;padding:23px;color:#8198a4;font-size:13px;line-height:1.9}

/* Full resource directory, with matching surface treatment. */
dialog{position:fixed;z-index:7;top:120px;bottom:150px;margin:0 30px 0 auto;width:480px;max-width:calc(100% - 28px);max-height:calc(100dvh - 270px);overflow:auto;color:var(--ink);border:1px solid #a3bfce30;border-radius:20px;background:linear-gradient(150deg,#14232df8,#07121bf8);padding:26px 28px;box-shadow:0 24px 100px #0009;scrollbar-width:thin;scrollbar-color:#54738050 transparent}
dialog::backdrop{background:#01071080;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
.panel-head{display:flex;justify-content:space-between;align-items:center}
.panel-head #close{margin-left:auto;background:transparent;border:0;font-size:25px;padding:0 5px;min-width:36px;min-height:36px;color:#849ca8}
h2{font-size:26px;font-weight:450;line-height:1.5;margin:8px 0 18px}
#panel-desc,#panel-kicker{display:none}
#panel-tabs{display:flex;flex-wrap:wrap;gap:7px;margin:22px 0 6px}
#panel-tabs button{font-size:11px;padding:9px 13px;background:#0a172199}
#panel-tabs .active{border-color:rgba(var(--accent-rgb),.45);color:var(--accent);background:rgba(var(--accent-rgb),.08)}
.chapter-link{width:100%;display:block;text-align:left;margin:9px 0;padding:16px}
.chapter-link small{display:block;color:#829ba7;font-size:11px;margin-top:6px}
.credits{font-size:9px;color:#405f70;margin-top:23px;line-height:1.7}
.credits a:hover{color:#9fbcc9}
#fallback{position:fixed;z-index:2;left:24px;right:24px;top:46%;text-align:center;padding:20px;color:#b9d7dc;font-size:13px;line-height:1.8}

/* Loading, errors, and constrained viewports. */
.scene-loading #space canvas{opacity:0}
.scene-loading #space::after{content:"";position:absolute;z-index:2;left:calc(50% - 16px);top:calc(50% - 16px);width:32px;height:32px;border:1px solid #9bbec52b;border-top-color:#adc6ca;border-radius:50%;animation:scene-spinner 1s linear infinite}
.scene-loading .destinations button{opacity:.45;cursor:wait}
.scene-loading #labels{visibility:hidden}
@keyframes scene-spinner{to{transform:rotate(360deg)}}
@media(max-width:900px){.destinations{width:calc(100% - 52px)}.destinations button{gap:12px;padding-left:12px;padding-right:18px}.nav-copy>span{font-size:17px}.destination-icon{width:38px;height:38px;flex-basis:38px}}
@media(max-width:700px){
 header{height:82px;padding:0 20px}.brand{font-size:13px;gap:10px;letter-spacing:.045em}.brand>span{width:34px;height:34px;font-size:28px}#directory{font-size:11px;gap:7px;padding:9px 11px;min-height:38px}#directory svg{width:12px;height:12px}
 .intro{left:22px;top:89px}.intro .eyebrow{font-size:7px;letter-spacing:.22em}.view-tools{right:20px;top:128px;max-width:36px;flex-wrap:wrap;justify-content:flex-end;gap:5px}.view-tools button{width:34px;height:34px;font-size:14px}
 .destinations{left:12px;right:12px;bottom:max(14px,env(safe-area-inset-bottom));width:auto;transform:none;padding:5px;gap:4px;border-radius:19px}.destinations button{flex-direction:column;gap:6px;padding:10px 4px 11px;border-radius:14px;text-align:center}.destination-icon{width:28px;height:28px;flex-basis:28px}.nav-copy>span{font-size:13px;letter-spacing:.01em}.nav-copy small{font-size:8px;margin-top:4px;letter-spacing:.07em}.nav-index{font-size:7px;right:7px;top:8px}.destinations button::before{left:13px;right:13px}
 .celestial-label{font-size:9px;min-height:36px}.line-label{min-width:0;width:47vw;max-width:47vw;padding:7px 10px}.line-label::before{left:-17px;width:17px}.line-label span{font-size:8px}.line-label small{font-size:11px;margin-top:3px;line-height:1.5}.neighbor-label{min-width:52px;max-width:76px;padding:6px 2px}.neighbor-label span{font-size:7px}.neighbor-label small{font-size:9px;line-height:1.5}
 .chapter-back{left:22px;top:139px;font-size:10px;padding:8px 11px;min-height:36px}#chapter-detail{left:51%;right:13px;top:190px;bottom:135px;padding:8px 0 20px 15px}#chapter-detail h2{font-size:19px;line-height:1.5;letter-spacing:.015em}#detail-book{font-size:8px;margin-bottom:10px;letter-spacing:.13em}#detail-count{font-size:8px;margin-top:10px}.detail-heading{padding-bottom:19px;margin-bottom:2px}.detail-heading::after{width:26px}#chapter-detail .resource{padding:14px 15px 14px 0;min-height:64px}#chapter-detail .resource h3{font-size:12px;line-height:1.75}#chapter-detail .resource .num{font-size:8px;letter-spacing:.06em}.resource::after{font-size:13px;right:1px}.resource:hover{padding-left:0}.empty{font-size:11px;padding:16px 12px}
 body.detail-open .view-tools{display:none}#planet-tooltip{font-size:11px;max-width:230px;padding:11px 14px}.region-halo span{font-size:10px;padding:7px 13px;letter-spacing:.07em}
 dialog{top:109px;bottom:135px;margin:0 13px;width:calc(100% - 26px);max-height:calc(100dvh - 244px);padding:21px;border-radius:18px}.panel-head #close{min-width:40px;min-height:40px}#panel-tabs button{min-height:42px}h2{font-size:22px}
}
@media(max-height:700px) and (min-width:701px){header{height:84px}.intro{top:85px}.view-tools{top:24px}.destinations{bottom:18px;padding:5px}.destinations button{padding-top:12px;padding-bottom:12px}.chapter-back{top:132px}#chapter-detail{top:134px;bottom:130px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}.scene-loading #space::after{border-top-color:#adc6ca;border-right-color:#adc6ca}}

@media(max-height:760px) and (min-width:701px){.line-label{padding:4px 12px}.line-label span{font-size:8px}.line-label small{font-size:12px;margin-top:2px}}
@media(max-height:560px){header{height:54px}.intro{top:55px}.view-tools{top:12px}.view-tools button{height:30px;width:30px}.destinations{bottom:10px;padding:4px;width:min(650px,calc(100% - 48px))}.destinations button{padding:8px 12px}.destination-icon{width:29px;height:29px;flex-basis:29px}.nav-copy>span{font-size:14px}.nav-copy small{font-size:8px;margin-top:3px}.line-label{padding:3px 9px}.line-label span{display:none}.line-label small{font-size:10px;margin:0;line-height:1.4}.chapter-back{top:87px}#chapter-detail{top:90px;bottom:98px}#chapter-detail h2{font-size:20px}.detail-heading{padding-bottom:10px;margin-bottom:2px}#detail-count{margin-top:5px}.resource{padding-top:10px;padding-bottom:10px;min-height:49px}}

/* Persistent edition switch and filing links, clear of the navigation dock. */
.catalog-link{display:flex;align-items:center;justify-content:center;min-height:40px;padding:10px 15px;border:1px solid #adcad326;border-radius:10px;background:#0c162085;color:#cbd6d8;font-size:12px;letter-spacing:.08em;white-space:nowrap;transition:color .2s,border-color .2s,background .2s}
.catalog-link:hover{color:var(--accent);border-color:rgba(var(--accent-rgb),.46);background:#15242ddd}
.view-tools{right:264px}
.site-filing{position:fixed;z-index:6;right:24px;bottom:max(7px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:18px;font-size:10px;line-height:18px;color:#92a2ac}
.site-filing a{display:flex;align-items:center;gap:5px;white-space:nowrap}.site-filing img{width:14px;height:14px;object-fit:contain}.site-filing a:hover{color:#d3dedf}
.destinations{bottom:42px}
@media(min-width:701px){#chapter-detail{bottom:164px}}
@media(max-width:700px){.top-actions{gap:7px}.catalog-link{font-size:11px;min-height:38px;padding:9px 10px}.view-tools{right:20px}.site-filing{right:15px;bottom:max(7px,env(safe-area-inset-bottom));flex-direction:column;align-items:flex-end;gap:1px;font-size:9px;line-height:16px}.site-filing img{width:12px;height:12px}.destinations{bottom:calc(50px + env(safe-area-inset-bottom))}#chapter-detail{bottom:174px}dialog{bottom:174px;max-height:calc(100dvh - 283px)}}
@media(max-width:360px){header{padding:0 12px}.brand{font-size:11px;gap:7px}.brand>span{width:29px;height:29px;font-size:25px}.catalog-link,#directory{padding:8px;font-size:10px}}
@media(max-height:560px) and (min-width:701px){.destinations{bottom:34px}#chapter-detail{bottom:122px}}


/* Wide solar chapter map: the Sun introduces two rows of four chapters. */
#solar-map-guide{display:none;position:fixed;z-index:1;left:0;right:0;top:var(--solar-map-top);height:var(--solar-map-height);pointer-events:none}
@media(min-width:900px) and (min-aspect-ratio:4/3){
 body.solar-map-open #solar-map-guide{display:block;animation:solar-map-reveal .65s ease both}
 #solar-map-guide::before{content:"";position:absolute;left:24%;top:3%;bottom:3%;width:1px;background:linear-gradient(transparent,#e7c58e24 25%,#e7c58e24 75%,transparent)}
 .solar-map-start{position:absolute;left:12.5%;top:3%;transform:translateX(-50%);text-align:center}
 .solar-map-start span,.solar-map-book span{font-size:11px;letter-spacing:.22em;color:#d7bb8b;font-weight:450}
 .solar-map-start small,.solar-map-book small{font-size:9px;letter-spacing:.12em;color:#6e8793}
 .solar-map-start small{display:block;margin-top:8px}
 .solar-map-book{position:absolute;left:27%;right:7%;display:flex;align-items:center;gap:15px}
 .solar-map-book::after{content:"";height:1px;flex:1;background:linear-gradient(90deg,#e7c58e22,transparent)}
 .solar-map-one{top:0}.solar-map-two{top:50%}
 .solar-map-label.line-label{transform:translate(-50%,0);text-align:center!important;min-width:0;width:15.8vw;max-width:260px;padding:7px 7px 9px;border-radius:10px}
 .solar-map-label.line-label::before{display:none}
 .solar-map-label.line-label span{font-size:10px;letter-spacing:.16em;color:#8299a6}
 .solar-map-label.line-label small{font-size:14px;font-weight:430;line-height:1.65;letter-spacing:.025em;margin-top:8px;text-wrap:balance}
}
@media(min-width:900px) and (max-height:800px) and (min-aspect-ratio:4/3){
 .solar-map-label.line-label small{font-size:12px;margin-top:5px}.solar-map-label.line-label span{font-size:9px}
 .solar-map-label.line-label{padding-top:4px}.solar-map-start span,.solar-map-book span{font-size:10px}
}
@keyframes solar-map-reveal{from{opacity:0}to{opacity:1}}
