/* The look of the map and the pages.
   Colors, the left rail, the orbits, the dock, search, the footer.
   Page copy stays in index.html. I don't put sentences in here. */
:root {
  --void: #07051A;
  --holo: #C77DFF;
  --holo-2: #9B5BD6;
  --sable: #6C3884;
  --sable-deep: #2A1040;
  --sable-bright: #C77DFF;
  --neon-pink: #E85AD0;
  --neon-cyan: #C77DFF;
  --sable-green: #5BCF7E;
  --sunset: #FF8A3D;
  --chrome: #F4E8FF;
  --white: #FBF7FF;
  --yellow: #FFC857;
  --yellow-soft: #FFE0A3;
  --plasma: #FFC857;
  --plasma-hot: #FFE9A8;
  --nebula: #120A28;
  --deck: #140B2A;
  --deck-2: #1B1036;
  --text: #FBF7FF;
  --text-2: #E4D4F5;
  --text-3: #A992C4;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .22);
  --sky: var(--sable-bright);
  --bio: var(--sable-green);
  --violet: var(--sable-bright);
  --accent: var(--plasma);
  --light: #E8B8FF;
  --phosphor: var(--neon-pink);
  --runelight: var(--plasma);
  --a: var(--plasma);
  --ldx: .55;
  --ldy: -.55;
  --lang: 45deg;
  /* glass morphism */
  --glass-bg: rgba(22, 12, 48, .38);
  --glass-bg-strong: rgba(16, 8, 36, .52);
  --glass-bg-soft: rgba(255, 255, 255, .06);
  --glass-border: rgba(255, 255, 255, .16);
  --glass-border-accent: rgba(199, 125, 255, .32);
  --glass-blur: 18px;
  --glass-sat: 1.4;
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, .2);
  --glass-shadow:
    0 10px 40px rgba(0, 0, 0, .38),
    0 0 48px -18px rgba(199, 125, 255, .28);
  --glass-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  /* Audiowide = 80s sci-fi titles; Exo 2 = readable body; Orbitron = HUD/meta */
  --display: "Audiowide", "Segoe UI", system-ui, sans-serif;
  --body: "Exo 2", "Segoe UI", sans-serif;
  --mono: "Orbitron", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --dock-w: min(560px, 44vw);
  --scroll-size: 8px;
  --scroll-track: rgba(10, 6, 28, .35);
  --scroll-thumb: rgba(255, 255, 255, .22);
  --scroll-thumb-hover: rgba(255, 200, 87, .45);
  --radius: 16px;
  --radius-hud: 14px;
}

* { box-sizing: border-box; }
html { background: var(--void); }
body {
  margin: 0; min-height: 100vh; color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background:
    radial-gradient(ellipse 58% 42% at 16% 24%, rgba(255, 200, 87, .11), transparent 62%),
    radial-gradient(ellipse 48% 36% at 82% 18%, rgba(199, 125, 255, .14), transparent 60%),
    radial-gradient(ellipse 62% 46% at 74% 76%, rgba(255, 200, 87, .1), transparent 64%),
    radial-gradient(ellipse 36% 28% at 52% 48%, rgba(255, 232, 168, .06), transparent 70%),
    radial-gradient(ellipse 50% 38% at 22% 82%, rgba(155, 91, 214, .12), transparent 64%),
    radial-gradient(ellipse 70% 48% at 50% 0%, rgba(155, 91, 214, .18), transparent 58%),
    radial-gradient(ellipse 40% 30% at 50% 55%, rgba(108, 56, 132, .16), transparent 70%),
    linear-gradient(180deg, #0C0722 0%, var(--void) 42%, #0A0618 100%);
}
/* A quiet wash. I kept the contrast low so it doesn't fight the planets. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 46% 30% at 28% 38%, rgba(255, 200, 87, .09), transparent 70%),
    radial-gradient(ellipse 34% 26% at 58% 22%, rgba(255, 232, 168, .06), transparent 72%),
    radial-gradient(ellipse 36% 30% at 68% 58%, rgba(199, 125, 255, .07), transparent 72%),
    radial-gradient(ellipse 30% 24% at 48% 74%, rgba(255, 200, 87, .07), transparent 74%),
    radial-gradient(circle at 12% 60%, rgba(199, 125, 255, .04) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 34%, rgba(255, 200, 87, .06) 0 1px, transparent 2px),
    radial-gradient(circle at 62% 18%, rgba(232, 208, 255, .04) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 88%, rgba(255, 200, 87, .055) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 70%, rgba(199, 125, 255, .04) 0 1px, transparent 2px),
    radial-gradient(circle at 24% 28%, rgba(255, 232, 168, .05) 0 1px, transparent 2px);
  opacity: .95;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 40%, transparent 45%, rgba(4, 2, 16, .5) 100%);
  opacity: .85;
}
img { max-width: 100%; display: block; }
a { color: var(--sky); }

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
*::-webkit-scrollbar { width: var(--scroll-size); height: var(--scroll-size); }
*::-webkit-scrollbar-track { background: var(--scroll-track); border-radius: 999px; }
*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb); border-radius: 999px;
  border: 2px solid transparent; background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; }
*::-webkit-scrollbar-corner { background: transparent; }
.sheet.card, .sheet-body {
  --scroll-thumb: color-mix(in oklab, var(--accent) 42%, transparent);
  --scroll-thumb-hover: color-mix(in oklab, var(--accent) 68%, transparent);
}
html.roster-open {
  --scroll-thumb: color-mix(in oklab, var(--plasma) 40%, transparent);
  --scroll-thumb-hover: color-mix(in oklab, var(--plasma) 65%, transparent);
}
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--plasma); outline-offset: 3px; }
em { font-style: normal; }

#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; transform: translateZ(0); }

/* Left rail. Glass, not a solid bar. */
.chrome { position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; padding: 12px; pointer-events: none; }
.chrome > * { pointer-events: auto; }
.chrome > .nav-home {
  width: 68px; height: 68px; border-radius: var(--radius);
  background: rgba(14, 8, 32, .82); border: 1px solid var(--line-strong);
  box-shadow: 0 0 24px -10px rgba(199, 125, 255, .45);
}
.site-nav {
  position: relative;
  display: flex; flex-direction: column; align-items: stretch; width: 56px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  padding: 8px 6px; overflow: hidden; border-radius: var(--radius);
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  transform-origin: top center;
  transition: width .45s var(--ease);
}
.site-nav::before, .site-nav::after { content: none; }
.site-nav.is-open { width: var(--nav-open-w, 180px); }
.nav-tools {
  display: flex; flex-direction: column; align-items: center; align-self: flex-start;
  width: 44px; flex: none; gap: 8px;
}
.nav-actions {
  position: relative; display: flex; flex-direction: row; align-items: center; justify-content: center;
  width: 28px; min-height: 28px; gap: 0; flex: none;
}
.nav-home { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; text-decoration: none; }
.nav-home img { width: 40px; height: auto; filter: drop-shadow(0 0 12px rgba(255, 200, 87, .4)) drop-shadow(0 0 18px rgba(199, 125, 255, .35)); transition: transform .4s var(--ease); }
.nav-home:hover img, .nav-home:focus-visible img { transform: scale(1.06); }
.nav-toggle {
  display: grid; place-items: center; width: 22px; height: 22px; padding: 0; margin: 0;
  border: 0; border-radius: 0; background: transparent; color: var(--text-3);
  box-shadow: none; cursor: pointer; flex: none; touch-action: manipulation;
  -webkit-appearance: none; appearance: none;
}
.nav-toggle:hover, .nav-toggle:focus-visible {
  color: var(--white); border: 0; outline: none; background: transparent; box-shadow: none;
}
.nav-toggle i {
  display: block; font-size: 12px; line-height: 1;
  transition: transform .35s var(--ease), opacity .3s ease;
}
.site-nav:not(.is-open) .nav-toggle {
  width: 22px; height: 18px; color: var(--text-3); opacity: .7;
  animation: navMorePulse 2.4s ease-in-out infinite;
}
.site-nav.is-open .nav-toggle i { transform: scaleY(-1); }
.nav-pin {
  display: grid; place-items: center; position: absolute; left: calc(100% + 4px); top: 0;
  width: 0; height: 28px; padding: 0; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; background: transparent;
  color: transparent; border-color: transparent;
  overflow: hidden; opacity: 0; pointer-events: none; flex: none; touch-action: manipulation;
  transition: width .35s var(--ease), opacity .3s ease, color .3s, background .3s, border-color .3s;
}
.nav-pin:hover { color: var(--white); border-color: var(--line-strong); }
.nav-pin svg { width: 14px; height: 14px; }
.site-nav.is-open .nav-pin {
  width: 28px; opacity: 1; pointer-events: auto;
  color: var(--text-3);
}
.nav-pin[aria-pressed="true"] { color: var(--sable-green); background: transparent; border-color: color-mix(in oklab, var(--sable-green) 45%, transparent); }
.nav-pin[aria-pressed="true"] .pin-head { fill: currentColor; }
.nav-more {
  display: none; place-items: center; width: 44px; height: 16px; margin-top: -2px;
  color: var(--text-3); font-size: 11px; line-height: 1; opacity: .55; pointer-events: none;
  transition: opacity .3s ease, transform .35s var(--ease);
}
.nav-more i { display: block; }
/* On a mouse, the rail opens by itself, so I hide the toggle. The pin shows up once it's open. */
@media (hover: hover) and (pointer: fine) {
  .nav-toggle { display: none; animation: none; }
  .site-nav:not(.is-open) .nav-actions {
    height: 0; min-height: 0; overflow: hidden; pointer-events: none;
  }
  .site-nav:not(.is-open) .nav-more {
    display: grid;
    animation: navMorePulse 2.4s ease-in-out infinite;
  }
  .site-nav.is-open .nav-more { display: none; }
  .site-nav.is-open .nav-pin {
    position: static; left: auto; width: 28px; opacity: 1; overflow: visible;
    pointer-events: auto; color: var(--text-3);
  }
}
@keyframes navMorePulse {
  0%, 100% { opacity: .4; transform: translateY(0); }
  50% { opacity: .85; transform: translateY(2px); }
}
.nav-panel {
  display: grid; grid-template-rows: 0fr; margin-top: 0; opacity: 0; pointer-events: none;
  transform: translateY(-4px); transform-origin: top center;
  transition: grid-template-rows .45s var(--ease), opacity .35s ease, transform .4s var(--ease), margin .4s var(--ease);
}
.nav-panel-inner { overflow: hidden; display: flex; flex-direction: column; gap: 2px; min-height: 0; max-height: min(70vh, calc(100dvh - 140px)); }
.site-nav.is-open .nav-panel { grid-template-rows: 1fr; margin-top: 14px; opacity: 1; transform: none; pointer-events: auto; }
.site-nav.is-open.is-settled .nav-panel-inner { overflow-y: auto; }
.site-nav .lens, .site-nav .nav-menu-btn {
  display: flex; align-items: center; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); cursor: pointer; text-decoration: none; text-align: left; white-space: nowrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; transition: color .3s, background .3s, box-shadow .3s;
}
.site-nav .lens:hover, .site-nav .nav-menu-btn:hover {
  color: var(--white); background: var(--glass-bg-soft);
  box-shadow: inset 0 0 0 1px var(--glass-border);
}
.site-nav .lens[aria-pressed="true"], .site-nav .lens[aria-current="page"], .nav-menu.has-current .nav-menu-btn, .nav-menu.open .nav-menu-btn {
  color: var(--white); background: rgba(199, 125, 255, .14);
  box-shadow: inset 0 0 0 1px var(--glass-border-accent), var(--glass-highlight);
}
.nav-menu { position: relative; display: flex; flex-direction: column; }
.nav-menu-btn { justify-content: space-between; gap: 12px; }
.nav-menu-btn::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transform: rotate(45deg); transition: transform .35s var(--ease), margin .35s var(--ease);
}
.nav-menu.open .nav-menu-btn::after { transform: rotate(-135deg); margin-top: 3px; }
.nav-dropdown {
  display: none; flex-direction: column; gap: 0; padding: 2px 0 4px 8px;
  font-family: var(--body); font-size: 14px; letter-spacing: 0; text-transform: none;
}
.nav-menu.open .nav-dropdown { display: flex; }
.nav-dropdown a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.nav-dropdown a:hover, .nav-dropdown a:focus-visible, .nav-dropdown a[aria-current="page"] { color: var(--white); background: rgba(199, 125, 255, .12); }
.nav-dropdown a.dd-child { position: relative; padding-left: 28px; font-size: 11.5px; }
.nav-dropdown a.dd-child::before { content: ""; position: absolute; left: 12px; top: 0; height: 50%; width: 10px; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }

/* The map. Sun, ellipses, planets, moons. */
.orrery { position: fixed; inset: 0; z-index: 10; overflow: hidden; }
.camera { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; }
.orbits { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; transform: translateZ(0); }
.orbits ellipse {
  fill: none; stroke: rgba(199, 125, 255, .32); stroke-width: 1.35; vector-effect: non-scaling-stroke; opacity: .95;
  filter: drop-shadow(0 0 8px rgba(155, 91, 214, .35));
}
.orbits ellipse.ring {
  stroke: rgba(199, 125, 255, .28); stroke-dasharray: none; stroke-width: 1.25;
  filter: drop-shadow(0 0 6px rgba(155, 91, 214, .3));
}
.bodies { position: absolute; inset: 0; }
.sys-title {
  /* Flush with bottom of collapsed .site-nav: chrome pad 12 + nav (8+44+8+0+8) */
  position: absolute; left: 0; right: 0; top: 12px; height: 68px; margin: 0;
  display: flex; align-items: flex-end; justify-content: center; text-align: center; z-index: 5; pointer-events: none;
  font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4.4vw, 58px); line-height: .95; letter-spacing: .04em; text-transform: uppercase; color: #FFF8FF;
  text-shadow: 0 0 28px rgba(199, 125, 255, .45); transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.sys-title em { color: inherit; font-style: inherit; text-shadow: inherit; }
.sys-status {
  display: block; margin-top: 10px;
  font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase;
  color: var(--sable-bright); text-shadow: 0 0 18px rgba(199, 125, 255, .4);
}
.sys-status::before { content: none; }
.focused .sys-title, .hub-preview .sys-title { opacity: 0; transform: translateY(-20px); }

/* Purple corona. I left the yellow in the background so the sun didn't turn into a second star. */
.sun {
  position: absolute; left: 0; top: 0; width: 120px; height: 120px; margin: -60px 0 0 -60px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(circle at 50% 50%, rgba(199, 125, 255, .35), rgba(155, 91, 214, .16) 42%, transparent 70%);
  display: grid; place-items: center;
}
.sun::before { content: ""; position: absolute; inset: -60%; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(circle, rgba(199, 125, 255, .24), rgba(108, 56, 132, .1) 48%, transparent 68%);
  animation: corona 7s ease-in-out infinite; }
.sun img {
  grid-area: 1 / 1; position: relative; z-index: 1; width: 74%; height: auto;
  filter: drop-shadow(0 0 16px rgba(199, 125, 255, .5));
  transition: transform .6s var(--ease), opacity .35s var(--ease);
  pointer-events: none;
}
.sun img.mark-color { opacity: 0; }
/* Real pointers only. iOS was sticking :hover and eating the first tap. */
@media (hover: hover) and (pointer: fine) {
  .sun:hover img, .sun:focus-visible img { transform: scale(1.06); }
  .sun:hover img.mark-white, .sun:focus-visible img.mark-white { opacity: 0; }
  .sun:hover img.mark-color, .sun:focus-visible img.mark-color { opacity: 1; }
}
@keyframes corona { 0%, 100% { transform: scale(1); opacity: .75; } 50% { transform: scale(1.06); opacity: .9; } }

/* Planets. */
.planet { position: absolute; left: 0; top: 0; padding: 0; border: 0; background: none; cursor: pointer; color: var(--text); touch-action: manipulation; will-change: transform; }
/* The globe hangs out of its box. The focus ring was drawing a stray corner, so I kill the outline. */
.planet:focus, .planet:focus-visible { outline: none; }
.planet .globe {
  --pc: var(--sable-bright);
  position: relative; display: block; width: var(--ps); height: var(--ps); margin-left: calc(var(--ps) / -2); margin-top: calc(var(--ps) / -2);
  border-radius: 50%; overflow: hidden; background: var(--nebula) center / cover no-repeat;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--pc) 45%, transparent), 0 0 calc(var(--ps) * .35) -4px color-mix(in oklab, var(--pc) 70%, transparent);
  transition: box-shadow .5s var(--ease);
}
/* Lit from the sun. Bright side toward the center, night side away. */
.planet .globe::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at var(--lx, 30%) var(--ly, 40%), rgba(255, 255, 255, .22), transparent 38%), radial-gradient(circle at calc(100% - var(--lx, 30%)) calc(100% - var(--ly, 40%)), rgba(2, 4, 10, .78), transparent 62%); }
.planet .globe.glyph { display: grid; place-items: center; background: radial-gradient(circle at 35% 35%, color-mix(in oklab, var(--pc) 45%, #120A28), #0A0618 75%); color: var(--pc); }
.planet .globe.glyph svg {
  width: 46%; height: 46%; position: relative; z-index: 1; overflow: visible;
}
.planet .globe.glyph i { position: relative; z-index: 1; font-size: calc(var(--ps) * .38); line-height: 1; }
/* Hover grow stays on real pointers, and only while the camera is home.
   A stuck :hover plus the old 0.6s transform ease was pulsing the globe
   once the camera started chasing it. */
@media (hover: hover) and (pointer: fine) {
  html:not(.focused):not(.hub-preview) .planet:hover .globe,
  html:not(.focused):not(.hub-preview) .planet:focus-visible .globe {
    transform: scale(1.08);
    box-shadow: 0 0 0 1px var(--pc), 0 0 calc(var(--ps) * .7) 0 color-mix(in oklab, var(--pc) 60%, transparent);
  }
}
.planet .pl-label { position: absolute; left: 50%; top: calc(var(--ps) / 2 + 12px); transform: translateX(-50%); white-space: nowrap; text-align: center; pointer-events: none;
  opacity: var(--reveal, .55); transition: opacity .4s; }
.pl-name { display: block; font-family: var(--display); font-weight: 400; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: #FBF7FF; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.pl-tag { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--plasma); }
.planet.active .pl-label { opacity: 0; }

/* Moons. Characters around Elders, extensions around their planet. */
.moon { position: absolute; left: 0; top: 0; width: var(--ms); height: var(--ms); margin: calc(var(--ms) / -2) 0 0 calc(var(--ms) / -2); padding: 0; border: 0; border-radius: 50%;
  background: var(--mc, var(--sable-bright)) center / cover no-repeat; cursor: pointer; will-change: transform;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--mc) 70%, transparent), 0 0 12px -2px var(--mc); transition: box-shadow .3s, opacity .6s; }
.moon.dot { pointer-events: none; }
.moon:hover, .moon:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 22px 2px var(--mc); z-index: 999 !important; }
.moon.project-moon {
  display: grid; place-items: center; overflow: visible; pointer-events: none;
  background-color: color-mix(in oklab, var(--mc) 22%, #0A0618);
  background-size: cover; background-position: 50% 40%;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--mc) 55%, transparent), 0 0 14px -2px var(--mc);
  transition: box-shadow .35s var(--ease), filter .35s var(--ease), opacity .35s;
}
.moon.project-moon.has-globe {
  /* keep globe circular while labels sit outside */
  background-clip: padding-box;
}
.moon.project-moon.glyph-moon { color: var(--mc); }
.moon.project-moon.glyph-moon svg { width: 46%; height: 46%; }
.moon.project-moon.glyph-moon i { font-size: calc(var(--ms) * .4); line-height: 1; }
.moon.project-moon.is-expanded {
  pointer-events: auto;
  box-shadow: 0 0 0 2px #fff, 0 0 22px 2px var(--mc);
}
.moon.project-moon .moon-name {
  position: absolute; left: 50%;
  /* local gap shrinks with zoom so after camera+counter-scale it sits ~10px under the moon */
  top: calc(100% + (10px / max(var(--cam-s, 1), 0.001)));
  /* cancel camera zoom so chips stay ~screen-constant size */
  transform: translateX(-50%) scale(calc(1 / max(var(--cam-s, 1), 0.001)));
  transform-origin: top center;
  padding: 4px 10px; border-radius: var(--radius-hud);
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: var(--glass-highlight);
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; white-space: nowrap; pointer-events: none; opacity: 0;
  /* max-width is in pre-counter-scale space — multiply so screen cap stays ~70vw */
  max-width: calc(min(72vw, 200px) * var(--cam-s, 1));
  overflow: hidden; text-overflow: ellipsis;
  transition: opacity .25s var(--ease);
}
.moon.project-moon.is-expanded .moon-name { opacity: 1; }
.planet.hub-open .globe {
  transform: scale(1.06);
  box-shadow: 0 0 0 1px var(--pc), 0 0 calc(var(--ps) * .7) 0 color-mix(in oklab, var(--pc) 55%, transparent);
}
.moon-label {
  position: fixed; z-index: 70; pointer-events: none; padding: 4px 10px; border-radius: var(--radius-hud);
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px) saturate(1.35); backdrop-filter: blur(14px) saturate(1.35);
  box-shadow: var(--glass-highlight), var(--glass-shadow);
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #fff;
  opacity: 0; transform: translate(-50%, -150%); transition: opacity .2s; white-space: nowrap;
}
.moon-label.on { opacity: 1; }

/* The meteor. Purple body, yellow glow, same rings as the characters. */
.meteor {
  position: absolute; left: 0; top: 0; width: var(--ms); height: var(--ms);
  margin: calc(var(--ms) / -2) 0 0 calc(var(--ms) / -2); pointer-events: none; will-change: transform;
  border-radius: 45% 40% 50% 42%;
  background:
    radial-gradient(circle at 38% 32%, #FFE9A8 0%, #C77DFF 32%, #9B5BD6 58%, #6C3884 82%, #2A1040 100%);
  box-shadow:
    0 0 5px 1px rgba(255, 200, 87, .9),
    0 0 12px 3px rgba(255, 200, 87, .45),
    0 0 18px 4px rgba(199, 125, 255, .55),
    0 0 28px 6px rgba(108, 56, 132, .28);
}
.meteor::before {
  content: ""; position: absolute; inset: -40%; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(circle, rgba(255, 200, 87, .42), transparent 55%),
    radial-gradient(circle, rgba(199, 125, 255, .28), transparent 72%);
  animation: meteorEmber 2.4s ease-in-out infinite;
}
.meteor::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 374.4%; height: 48%;
  transform: translate(-92%, -50%); pointer-events: none; z-index: -1;
  border-radius: 40%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(108, 56, 132, .08) 22%,
    rgba(155, 91, 214, .4) 52%,
    rgba(199, 125, 255, .65) 72%,
    rgba(255, 200, 87, .9) 90%,
    #FFE9A8 100%);
  filter: blur(1.4px); opacity: .9;
}
@keyframes meteorEmber {
  0%, 100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.12); opacity: 1; }
}

/* The dock. One section is a page. JS shows the one that matches. */
.worlds { position: relative; z-index: 20; }
.world { --w: var(--sky); }
.w-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.w-back { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 4px 0 0; border: 0; border-radius: 0; background: transparent; color: var(--text-3); cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.w-back svg { width: 14px; height: 14px; }
.w-back:hover { color: var(--plasma); }
.w-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--w);
  padding: 4px 12px; border-radius: 999px; border: 1px solid var(--glass-border);
  background: color-mix(in oklab, var(--w) 12%, var(--glass-bg-soft));
  -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
  box-shadow: var(--glass-highlight);
}
.w-title { margin: 0 0 18px; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3.2vw, 48px); line-height: 1.05; letter-spacing: .03em; text-transform: uppercase; color: #FBF7FF; outline: none; }
.w-title em, .w-h em { color: var(--w); text-shadow: 0 0 30px color-mix(in oklab, var(--w) 40%, transparent); }
.w-title-brand { margin: -8px 0 10px; font-size: 0; line-height: 0; letter-spacing: 0; text-transform: none; color: transparent; }
.w-brand {
  display: block; width: min(100%, 420px); height: auto; margin: 0;
  filter: drop-shadow(0 0 28px color-mix(in oklab, var(--w, var(--plasma)) 35%, transparent));
}
.w-h { margin: 30px 0 12px; font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .03em; text-transform: uppercase; color: #FBF7FF; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.world p, .w-p { margin: 0 0 14px; color: var(--text-2); font-family: var(--body); font-size: 15.5px; line-height: 1.7; font-weight: 400; }
.world strong { color: #fff; }
.w-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 6px; }
.w-btn, .world .btn, .world .stamp-btn {
  position: relative;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px; text-decoration: none; cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #fff;
  border: 1px solid var(--glass-border);
  background: color-mix(in oklab, var(--w) 16%, var(--glass-bg-soft));
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: var(--glass-highlight), 0 0 24px -12px color-mix(in oklab, var(--w) 70%, transparent);
  transition: background .3s, box-shadow .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.w-btn::before, .world .btn::before, .world .stamp-btn::before { content: none; }
.w-btn:hover, .w-btn:focus-visible,
.world .btn:hover, .world .btn:focus-visible,
.world .stamp-btn:hover, .world .stamp-btn:focus-visible {
  color: var(--void); background: var(--w); border-color: color-mix(in oklab, var(--w) 80%, white);
  box-shadow: 0 0 28px -4px var(--w);
  transform: translateY(-1px);
}
.w-chip {
  display: inline-flex; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--glass-border); font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--w);
  background: var(--glass-bg-soft); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.w-card {
  position: relative; margin: 0 0 16px; padding: 22px 22px 18px; border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 42%),
    color-mix(in oklab, var(--w) 10%, var(--glass-bg));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-highlight), 0 0 50px -28px var(--w);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
}
.w-card .h3, .w-card h2, .w-card h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: .03em; text-transform: uppercase; color: #FBF7FF; }
.w-card::before { content: ""; position: absolute; inset: -1px; pointer-events: none; border-radius: var(--radius);
  --c: color-mix(in oklab, var(--w) 90%, white);
  background:
    linear-gradient(var(--c), var(--c)) left top / 14px 1px no-repeat, linear-gradient(var(--c), var(--c)) left top / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 14px 1px no-repeat, linear-gradient(var(--c), var(--c)) right top / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 14px 1px no-repeat, linear-gradient(var(--c), var(--c)) left bottom / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 14px 1px no-repeat, linear-gradient(var(--c), var(--c)) right bottom / 1px 14px no-repeat;
}
.w-stack { display: grid; gap: 4px; margin-top: 18px; }
.ext-status { margin: 0 0 6px !important; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--bio) !important; }
.ext-status.dev { color: var(--yellow) !important; }
.ext-features { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.ext-features li { position: relative; padding-left: 20px; color: var(--text-2); }
.ext-features li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--w); }
.ext-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.text-link { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.fineprint { font-size: 13.5px; color: var(--text-3) !important; }
/* Contact form. */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: var(--glass-bg); color: #fff; font: 15px/1.5 var(--body);
  caret-color: var(--plasma);
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: var(--glass-highlight);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--w);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--w) 22%, transparent), 0 0 24px -10px var(--w);
}
.field small { color: var(--text-3); font-size: 13px; }

/* The roster grid itself is in card.css. This is just the page around it. */

/* Orbit view. The dock sits beside the planet instead of covering the map. */
.js .worlds {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--dock-w); padding: 72px clamp(20px, 2.4vw, 36px) 90px;
  overflow-y: auto; overscroll-behavior: contain;
  background:
    linear-gradient(90deg, rgba(7, 5, 26, 0), color-mix(in oklab, var(--glass-bg-strong) 70%, transparent) 10%, var(--glass-bg-strong)),
    linear-gradient(180deg, color-mix(in oklab, var(--w, var(--plasma)) 14%, transparent), transparent 160px);
  border-left: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  box-shadow:
    -28px 0 60px -28px color-mix(in oklab, var(--w, var(--plasma)) 30%, transparent),
    var(--glass-highlight);
  transform: translateX(105%); opacity: 0; transition: transform .8s var(--ease), opacity .6s var(--ease);
}
.js .worlds::before { content: none; display: none; }
.js .focused .worlds, .js.focused .worlds { transform: none; opacity: 1; }
.js .world { display: none; }
.js .world.active { display: block; animation: materialize .9s var(--ease) both; }
.js .world-home { display: none !important; }
@keyframes materialize {
  0% { opacity: 0; filter: brightness(2.2) blur(3px); clip-path: inset(0 0 100% 0); }
  60% { opacity: 1; filter: brightness(1.25) blur(.5px); }
  100% { opacity: 1; filter: none; clip-path: inset(0 0 0 0); }
}

/* Read, and also what you get with JavaScript off. One column, everything visible. */
.lens-read .orrery { display: none; }
html:not(.js) .orrery { display: none; }
.lens-read .worlds, html:not(.js) .worlds {
  position: relative; inset: auto; width: auto; max-width: 860px; margin: 0 auto;
  padding: 110px clamp(18px, 4vw, 40px) 120px;
  transform: none; opacity: 1; background: none; overflow: visible;
}
@media (min-width: 761px) {
  .lens-read .worlds, html:not(.js) .worlds { padding-left: 108px; }
}
.lens-read .world, html:not(.js) .world { display: block !important; margin-bottom: 28px; padding-top: 10px; animation: none; }
/* In Read I show About, the game, extensions, Support, then contact.
   The roster and the privacy page stay their own screens. Without JS they stay in the scroll. */
.lens-read #roster, .lens-read #privacy { display: none !important; }
.lens-read .w-back, html:not(.js) .w-back { display: none; }
.lens-read .home-title, html:not(.js) .home-title { font-size: clamp(40px, 6vw, 72px); }

/* Dividers in Read. Same trails as the map, drawn in when they scroll in. */
.starlane { display: none; }
.lens-read .starlane, html:not(.js) .starlane {
  display: block;
  width: min(100%, 860px);
  height: 88px;
  margin: 6px auto 44px;
  overflow: visible;
  filter:
    drop-shadow(0 0 5px color-mix(in oklab, var(--plasma) 55%, transparent))
    drop-shadow(0 0 18px color-mix(in oklab, var(--sable-bright) 40%, transparent));
}
.starlane path:not(.spark) {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.starlane .body,
.starlane .spark {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.starlane.is-grown path:not(.spark) { animation: starlaneDraw 2.0s cubic-bezier(.2,.75,.2,1) forwards; }
.starlane.is-grown path:not(.spark):nth-of-type(2) { animation-delay: .25s; }
.starlane.is-grown path:not(.spark):nth-of-type(3) { animation-delay: .45s; }
.starlane.is-grown .body {
  animation: starlaneBody .45s var(--ease) forwards;
  animation-delay: 1.2s;
}
.starlane.is-grown .body:nth-of-type(1) { animation-delay: 1.0s; }
.starlane.is-grown .body:nth-of-type(2) { animation-delay: 1.25s; }
.starlane.is-grown .body:nth-of-type(3) { animation-delay: 1.5s; }
.starlane.is-grown .spark {
  animation: starlaneSpark .35s ease forwards;
  animation-delay: 1.55s;
}
@keyframes starlaneDraw { to { stroke-dashoffset: 0; } }
@keyframes starlaneBody {
  from { opacity: 0; transform: scale(.35); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes starlaneSpark {
  from { opacity: 0; transform: scale(.2) rotate(20deg); }
  to { opacity: .9; transform: scale(1) rotate(0deg); }
}
html:not(.js) .starlane path:not(.spark) { stroke-dashoffset: 0; }
html:not(.js) .starlane .body,
html:not(.js) .starlane .spark { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .starlane path:not(.spark) { stroke-dashoffset: 0; animation: none !important; }
  .starlane .body, .starlane .spark { opacity: 1; animation: none !important; }
}

/* Footer. Icons stay small. A missing stylesheet once blew these up to full size. */
.foot { position: fixed; left: 96px; bottom: 18px; z-index: 60; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lens-read .foot, html:not(.js) .foot { position: relative; left: auto; bottom: auto; justify-content: center; padding: 30px 16px 40px; }
.socials { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.socials a {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--text-2);
  border: 1px solid var(--glass-border); background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: var(--glass-highlight);
  transition: color .3s, border-color .3s, box-shadow .3s, background .3s, transform .3s var(--ease);
}
.socials a:hover, .socials a:focus-visible {
  color: #fff; border-color: color-mix(in oklab, var(--plasma) 55%, white);
  background: color-mix(in oklab, var(--plasma) 16%, var(--glass-bg-soft));
  box-shadow: 0 0 22px -4px var(--plasma), var(--glass-highlight); transform: translateY(-2px);
}
.socials svg { width: 19px; height: 19px; }
.foot-link, .foot-copy { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); text-decoration: none; }
.foot-link:hover { color: #fff; }
.focused .foot { opacity: .35; transition: opacity .4s; }
.focused .foot:hover, .focused .foot:focus-within { opacity: 1; }

/* Marmotia map. Sits over the page when I click the globe a second time. */
.map-view {
  width: min(720px, 94vw); max-width: none; max-height: min(92vh, 860px); padding: 18px 18px 22px; margin: auto;
  border: 1px solid var(--glass-border); border-radius: 18px; color: var(--text); overflow: hidden;
  background: color-mix(in oklab, var(--glass-bg-strong) 88%, #07051A);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-shadow), var(--glass-highlight), 0 0 80px -28px color-mix(in oklab, var(--plasma) 45%, transparent);
}
.map-view::backdrop {
  background: color-mix(in oklab, var(--void) 68%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.25); backdrop-filter: blur(14px) saturate(1.25);
}
.map-view-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px;
}
.map-view-title {
  margin: 0; font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--plasma);
  text-shadow: 0 0 28px color-mix(in oklab, var(--plasma) 40%, transparent);
}
.map-view .icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; cursor: pointer; border-radius: 10px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); transition: color .3s, border-color .3s, background .3s;
}
.map-view .icon-btn svg { width: 18px; height: 18px; }
.map-view .icon-btn:hover, .map-view .icon-btn:focus-visible {
  color: #fff; border-color: color-mix(in oklab, var(--plasma) 55%, white);
  background: color-mix(in oklab, var(--plasma) 14%, transparent);
}
.map-view-stage {
  margin: 0; display: grid; place-items: center;
  overflow: hidden; border-radius: 12px; cursor: zoom-in;
}
.map-view-stage.is-zoomed { cursor: zoom-out; }
.map-view-stage img {
  display: block; width: min(100%, min(72vh, 640px)); height: auto;
  filter: drop-shadow(0 0 36px color-mix(in oklab, var(--plasma) 40%, transparent));
  transform: scale(1); transform-origin: 50% 50%;
  transition: transform .45s var(--ease);
  will-change: transform;
}
.map-view-stage.is-zoomed img { transform: scale(2.15); }

/* The character card has to beat the dock and the map. */
.sheet.card { z-index: 100; }
.map-view { z-index: 110; }
.card .plate { font-family: var(--display); font-weight: 400; letter-spacing: .04em; text-transform: uppercase; font-size: 15px; }
.card .plate-text { letter-spacing: .03em; text-transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01s !important; }
  body::before { opacity: .2; }
}

/* Roster takes the screen the way a page does, with the map still behind it. */
html.roster-open, html.roster-open body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
.js.roster-open .orrery { position: fixed; opacity: 0; pointer-events: none; }
.js.roster-open .worlds {
  position: relative; inset: auto; left: auto; right: auto; top: auto; bottom: auto;
  width: auto; height: auto; min-height: calc(100dvh - 88px); overflow: visible;
  /* same galaxy void as the orbit page — purple nebula + soft plasma, not flat navy */
  background:
    radial-gradient(ellipse 52% 40% at 18% 12%, color-mix(in oklab, var(--plasma) 10%, transparent), transparent 62%),
    radial-gradient(ellipse 48% 36% at 82% 8%, color-mix(in oklab, var(--sable-bright) 14%, transparent), transparent 60%),
    radial-gradient(ellipse 60% 44% at 70% 78%, color-mix(in oklab, var(--plasma) 8%, transparent), transparent 64%),
    radial-gradient(ellipse 40% 30% at 28% 72%, color-mix(in oklab, var(--holo-2) 12%, transparent), transparent 66%),
    color-mix(in oklab, var(--void) 92%, transparent);
  transform: none; opacity: 1;
}
/* Desktop. Leave room so the dock doesn't slide under the rail. */
@media (min-width: 761px) {
  .js.roster-open .worlds { padding: 28px clamp(20px, 4vw, 72px) 48px 108px; }
  html.nav-expanded.js.roster-open .worlds { padding-left: calc(var(--nav-w, 56px) + 40px); }
  html.nav-expanded.lens-read .worlds { padding-left: calc(var(--nav-w, 56px) + 40px); }
}
.js.roster-open #roster { max-width: 1180px; margin: 0 auto; }
.js.roster-open .sys-title { opacity: 0; }
.js.roster-open .foot,
.js.roster-open.focused .foot {
  position: relative; left: auto; bottom: auto; opacity: 1; justify-content: center;
  padding: 28px 16px 40px; margin: 0;
}

/* Phones. The nav goes across the top and the pages use the full width under it. */
@media (max-width: 760px) {
  :root { --dock-w: 100vw; --nav-bar-h: 56px; }
  .chrome {
    left: 0; right: 0; bottom: auto; top: 0;
    width: 100%; padding: 8px 12px;
    display: block; pointer-events: none;
  }
  .chrome > * { pointer-events: auto; }
  /* hug logo + chevron only — closed panel must not affect intrinsic width */
  .site-nav {
    display: inline-flex; flex-direction: column; align-items: flex-start;
    width: fit-content; min-width: 0; max-width: calc(100vw - 24px);
    max-height: min(78dvh, calc(100dvh - 16px));
    padding: 4px; overflow: hidden;
    transition: width .45s var(--ease);
    box-shadow: 0 12px 40px -16px rgba(4, 2, 16, .75), 0 0 32px -14px rgba(199, 125, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .06);
  }
  .site-nav:not(.is-open) {
    width: fit-content !important; /* beat leftover inline width from open animation */
  }
  .site-nav.is-open {
    width: var(--nav-open-w, 200px);
    overflow: hidden;
  }
  /* keep closed menu labels out of width calculation */
  .site-nav:not(.is-open) .nav-panel {
    position: absolute; left: 0; top: 100%;
    width: 0; height: 0; margin: 0; padding: 0; overflow: hidden;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: none;
  }
  .site-nav.is-open .nav-panel {
    position: relative; left: auto; top: auto;
    width: auto; height: auto; visibility: visible;
  }
  .nav-tools {
    flex-direction: row; align-items: center; justify-content: flex-start;
    align-self: flex-start; width: fit-content; flex: none; gap: 0;
  }
  .nav-home { width: 36px; height: 36px; border-radius: 10px; }
  .nav-home img { width: 30px; }
  .nav-actions { width: fit-content; min-width: 0; min-height: 0; height: auto; }
  .site-nav:not(.is-open) .nav-toggle {
    width: 22px; height: 18px; border: 0; opacity: .75;
    animation: navMorePulse 2.4s ease-in-out infinite;
  }
  .site-nav .lens, .site-nav .nav-menu-btn { font-size: 11px; }
  .nav-panel-inner { max-height: min(60dvh, calc(100dvh - 120px)); }
  .nav-pin, .nav-more { display: none !important; }
  html.nav-expanded .foot { opacity: 0; pointer-events: none; }
  .sys-title { height: calc(var(--nav-bar-h) + 24px); }
  .focused .foot { display: none; }
  .js.roster-open .foot, .js.roster-open.focused .foot { display: flex; opacity: 1; pointer-events: auto; }
  /* full-width page under the top nav row (crumbs + roster included) */
  html.js.roster-open .worlds,
  html.js.roster-open.nav-expanded .worlds {
    position: relative; inset: auto; top: auto; height: auto; min-height: calc(100dvh - 72px);
    border-radius: 0; transform: none; overflow: visible;
    padding: calc(var(--nav-bar-h) + 12px) 16px 48px !important;
  }
  .js .worlds {
    top: auto; height: 64vh; border-radius: 12px 12px 0 0;
    padding: 18px 16px 80px; transform: translateY(105%);
    background: rgba(14, 8, 32, .96); border-top: 1px solid var(--line-strong); border-left: 0;
    box-shadow: 0 -20px 40px -24px rgba(199, 125, 255, .25);
  }
  html.nav-expanded.js .worlds { padding-left: 16px; padding-right: 16px; }
  .js.focused .worlds { transform: none; }
  html.lens-read .worlds, html.js.lens-read .worlds,
  html.nav-expanded.lens-read .worlds {
    position: relative; inset: auto; width: auto; max-width: 860px; height: auto; margin: 0 auto;
    padding: calc(var(--nav-bar-h) + 16px) clamp(16px, 4vw, 28px) 72px !important;
    transform: none; opacity: 1; overflow: visible;
    border: 0; border-radius: 0; background: none; box-shadow: none;
  }
  .lens-read .home-title { font-size: clamp(32px, 9vw, 52px); }
  /* The title hangs below the globe. On a phone that is the thing people tap. */
  .planet .pl-label,
  .moon.project-moon.is-expanded .moon-name { pointer-events: auto; }
}

.planet.faded .pl-label { opacity: 0; }
.planet.faded { pointer-events: none; }

/* Search. Dark glass, green type, like a terminal sitting on the map. */
.site-search {
  position: fixed; inset: 0; z-index: 55; display: flex; align-items: flex-end; justify-content: stretch;
  background: rgba(4, 2, 16, .4);
  -webkit-backdrop-filter: blur(8px) saturate(1.2); backdrop-filter: blur(8px) saturate(1.2);
}
.site-search[hidden] { display: none; }
.site-search:not([hidden]) { display: flex; animation: search-scrim .4s ease; }
.site-search:not([hidden]) .term { animation: search-rise .46s cubic-bezier(.16, 1, .3, 1); }
@keyframes search-scrim { from { background-color: transparent; backdrop-filter: blur(0); } }
@keyframes search-rise { from { transform: translateY(100%); } }
.term {
  --term-g: var(--sable-green);
  width: 100%; max-height: min(42vh, 380px); overflow: auto;
  padding: 14px clamp(16px, 4vw, 48px) 18px;
  border-radius: 18px 18px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .1), transparent 48px),
    linear-gradient(180deg, color-mix(in oklab, var(--sable-green) 10%, transparent), transparent 56px),
    var(--glass-bg-strong);
  border-top: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  box-shadow:
    0 -28px 50px -16px rgba(0, 0, 0, .55),
    var(--glass-highlight),
    0 -10px 36px -18px color-mix(in oklab, var(--sable-green) 22%, transparent);
  font-family: var(--body);
  color: var(--text-2);
}
.term-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.term-title {
  margin: 0; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--term-g); text-shadow: 0 0 16px color-mix(in oklab, var(--sable-green) 40%, transparent);
}
.term-close {
  min-height: 28px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--glass-border); background: var(--glass-bg-soft); color: var(--text-3); cursor: pointer;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.term-close:hover {
  color: #fff; border-color: color-mix(in oklab, var(--sable-green) 55%, var(--plasma));
}
.term-line {
  display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  box-shadow:
    var(--glass-highlight),
    0 0 36px -16px color-mix(in oklab, var(--sable-green) 35%, var(--plasma) 20%);
}
.term-prompt {
  flex: none; color: var(--term-g); font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  text-shadow: 0 0 12px color-mix(in oklab, var(--sable-green) 45%, transparent);
}
.term-prompt::before { content: "> "; opacity: .75; }
#site-search {
  flex: 1; min-width: 0; height: 40px; border: 0; background: transparent;
  color: #fff; caret-color: var(--term-g);
  font: 16px/1.4 var(--body); outline: none;
}
#site-search::placeholder { color: var(--text-3); }
#site-search::-webkit-search-decoration, #site-search::-webkit-search-cancel-button { -webkit-appearance: none; }
.term-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.term-results li {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; cursor: pointer; border-radius: 10px;
  border-left: 2px solid transparent; color: var(--text-2); font-family: var(--body);
}
.term-results li[aria-selected="true"], .term-results li:hover {
  background: color-mix(in oklab, var(--sable-green) 10%, rgba(199, 125, 255, .08));
  color: #fff; border-left-color: var(--term-g);
}
.term-results img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--line-strong); }
.term-results .s-glyph {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center;
  color: var(--term-g); font-family: var(--mono); font-size: 14px;
}
.term-results .s-name { font-family: var(--body); font-size: 15px; }
.term-results .s-kind {
  margin-left: auto; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3);
}
.term-empty { margin: 0 0 6px; color: var(--text-3); font-family: var(--body); font-size: 14px; }
.term-empty::before { content: none; }
.term-jumps { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.term-jumps-label {
  margin: 0 0 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-3);
}
.term-jump-row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.term-jump-row button {
  min-height: 28px; padding: 0; border: 0; border-radius: 0; cursor: pointer;
  color: var(--text-2); background: transparent;
  font-family: var(--body); font-size: 14px; letter-spacing: 0;
}
.term-jump-row button:hover { color: #fff; }
.term.nohit .term-line { animation: nohit .45s ease; border-color: #FF7A9A; box-shadow: 0 0 28px -10px #FF7A9A; }
@keyframes nohit { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.search-open .sys-title { opacity: .28; }
.search-open .foot { opacity: 0; pointer-events: none; }
@media (max-width: 760px) {
  .pl-name { font-size: 12px; }
  .pl-tag { font-size: 9px; letter-spacing: .12em; }
}
