/* =========================================================
   SOLARIS — naked-eye solar system
   A dependency-free, WebGL-rendered interactive atlas.
   ========================================================= */

:root {
  --bg: #02040a;
  --bg-deep: #010208;
  --ink: #f1eee6;
  --ink-soft: rgba(232, 236, 243, .72);
  --muted: rgba(196, 209, 226, .48);
  --faint: rgba(180, 198, 220, .28);
  --line: rgba(190, 215, 245, .13);
  --line-strong: rgba(205, 225, 250, .24);
  --accent: #e9b877;
  --accent-bright: #ffd6a0;
  --cyan: #83dcff;
  --live: #87efcf;
  --glass: rgba(7, 12, 22, .48);
  --font-display: "Bodoni 72", "Didot", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Songti SC", "STSong", serif;
  --font-ui: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 70% at 50% 45%, #07101d 0%, #03060d 54%, #010208 100%);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

::selection {
  color: #111;
  background: var(--accent);
}

.site {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
}

/* ---------------------------------------------------------
   Stage
   --------------------------------------------------------- */

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 85% 75% at 50% 46%, #07101c 0%, #02050b 60%, #010207 100%);
}

#space {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  outline: none;
}

#space:active { cursor: grabbing; }

.stage-glow {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(circle 16% at 50% 47%, rgba(255, 164, 79, .11), transparent 72%),
    radial-gradient(circle 42% at 50% 48%, rgba(73, 110, 174, .075), transparent 70%),
    radial-gradient(circle 30% at 76% 25%, rgba(91, 75, 144, .055), transparent 72%);
  mix-blend-mode: screen;
}

.galaxy {
  position: absolute;
  inset: -25%;
  z-index: 2;
  pointer-events: none;
  opacity: .7;
  background:
    linear-gradient(112deg, transparent 33%, rgba(106, 139, 194, .055) 43%, rgba(214, 172, 134, .035) 49%, rgba(86, 120, 178, .04) 55%, transparent 66%),
    radial-gradient(ellipse 36% 14% at 62% 44%, rgba(160, 185, 232, .05), transparent 70%);
  filter: blur(34px);
  transform: rotate(-3deg) scale(1.08);
  mix-blend-mode: screen;
}

.scanlines {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: .12;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .022) 0,
    rgba(255, 255, 255, .022) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: soft-light;
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: .052;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(1, 3, 8, .82), transparent 24%),
    linear-gradient(to bottom, rgba(1, 3, 8, .62), transparent 18%),
    radial-gradient(ellipse 76% 74% at 50% 47%, transparent 48%, rgba(1, 3, 8, .62) 100%);
}

.frame {
  position: absolute;
  inset: 18px;
  z-index: 6;
  pointer-events: none;
  opacity: .68;
}

.frame-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: rgba(213, 227, 245, .22);
  border-style: solid;
  border-width: 0;
}

.frame-corner.tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.frame-corner.tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.frame-corner.bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.frame-corner.br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

/* ---------------------------------------------------------
   Reveal choreography
   --------------------------------------------------------- */

.chrome {
  --mx: 0px;
  --my: 0px;
  --enter-x: 0px;
  --enter-y: 14px;
  opacity: 0;
  transform: translate3d(calc(var(--mx) + var(--enter-x)), calc(var(--my) + var(--enter-y)), 0);
  transition:
    opacity 1s var(--ease-out),
    transform 1.15s var(--ease-out);
  will-change: opacity, transform;
}

.is-exploring .chrome {
  opacity: 1;
  --enter-x: 0px;
  --enter-y: 0px;
  transition-delay: calc(var(--delay, 0) * 1ms);
}

/* ---------------------------------------------------------
   Top bar
   --------------------------------------------------------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  min-height: 82px;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 32px 0 34px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  pointer-events: none;
  --enter-y: -12px;
}

.topbar > * { pointer-events: auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  color: var(--accent);
  filter: drop-shadow(0 0 14px rgba(233, 184, 119, .22));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .21em;
}

.brand-text small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  line-height: 1.2;
  letter-spacing: .27em;
}

.top-status {
  position: absolute;
  top: 29px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
  color: rgba(194, 211, 232, .43);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .18em;
  white-space: nowrap;
}

.top-status i {
  width: 1px;
  height: 8px;
  background: var(--line-strong);
}

.status-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px rgba(135, 239, 207, .75);
  animation: status-pulse 3.4s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: .45; box-shadow: 0 0 4px rgba(135, 239, 207, .2); }
  50% { opacity: 1; box-shadow: 0 0 9px rgba(135, 239, 207, .8); }
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding-top: 1px;
}

.chip,
.icon-btn {
  height: 32px;
  border: 1px solid var(--line);
  background: rgba(7, 13, 23, .34);
  color: rgba(225, 233, 243, .66);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  transition:
    color .3s ease,
    border-color .3s ease,
    background .3s ease;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: .08em;
  cursor: pointer;
}

.chip-led {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 7px rgba(233, 184, 119, .6);
  transition: background .3s ease, box-shadow .3s ease, opacity .3s ease;
}

.chip[aria-pressed="false"] {
  color: rgba(200, 213, 229, .32);
  border-color: rgba(190, 215, 245, .08);
}

.chip[aria-pressed="false"] .chip-led {
  background: rgba(190, 205, 225, .25);
  box-shadow: none;
}

.chip:hover,
.icon-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(22, 34, 52, .5);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn .ico-play { display: none; }
.icon-btn[aria-pressed="true"] .ico-pause { display: none; }
.icon-btn[aria-pressed="true"] .ico-play {
  display: block;
  fill: currentColor;
  stroke: none;
}

/* ---------------------------------------------------------
   Edge annotations
   --------------------------------------------------------- */

.edge-index {
  position: fixed;
  top: 31%;
  right: 30px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(177, 197, 221, .25);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .31em;
  writing-mode: vertical-rl;
  --enter-x: 8px;
}

.edge-index i {
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, transparent, rgba(198, 217, 240, .28), transparent);
}

/* ---------------------------------------------------------
   Info panel
   --------------------------------------------------------- */

.info-panel {
  position: fixed;
  top: clamp(125px, 15.5vh, 168px);
  left: 34px;
  z-index: 30;
  width: 318px;
  padding: 21px 23px 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(148deg, rgba(14, 23, 38, .68) 0%, rgba(5, 10, 18, .42) 58%, rgba(7, 12, 21, .52) 100%);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, .25),
    inset 0 1px 0 rgba(255, 255, 255, .035);
  backdrop-filter: blur(20px) saturate(132%);
  -webkit-backdrop-filter: blur(20px) saturate(132%);
  --enter-x: -14px;
  --delay: 160;
}

.info-panel::before,
.info-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.info-panel::before {
  top: -1px;
  left: -1px;
  width: 34px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(233, 184, 119, .45);
}

.info-panel::after {
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-top: 1px solid rgba(224, 235, 250, .28);
  border-right: 1px solid rgba(224, 235, 250, .28);
}

.info-glow {
  position: absolute;
  top: -44px;
  right: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  pointer-events: none;
  opacity: .15;
  background: radial-gradient(circle, var(--info-color, var(--accent)), transparent 70%);
  filter: blur(22px);
  transition: background .8s ease, opacity .8s ease;
}

.info-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.info-index {
  display: block;
  color: rgba(210, 222, 240, .36);
  font-family: var(--font-mono);
  font-size: 23px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.05em;
}

.info-type {
  padding-top: 2px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 7.5px;
  line-height: 1.65;
  letter-spacing: .15em;
  text-align: right;
}

.info-title {
  display: flex;
  align-items: baseline;
  gap: 11px;
  margin: 9px 0 13px;
}

.info-title span {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: .04em;
}

.info-title em {
  color: rgba(196, 213, 235, .34);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  line-height: 1;
  letter-spacing: .23em;
}

.info-desc {
  min-height: 61px;
  margin: 0;
  color: rgba(211, 222, 236, .57);
  font-size: 11.5px;
  font-weight: 300;
  line-height: 1.95;
  letter-spacing: .025em;
}

.info-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.info-stats div {
  min-width: 0;
  padding: 10px 0 9px;
  border-bottom: 1px solid rgba(190, 215, 245, .075);
}

.info-stats div:nth-child(odd) {
  border-right: 1px solid rgba(190, 215, 245, .075);
}

.info-stats div:nth-child(even) { padding-left: 2px; }

.info-stats dt {
  margin-bottom: 4px;
  color: rgba(183, 202, 226, .38);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .15em;
  white-space: nowrap;
}

.info-stats dd {
  margin: 0;
  color: rgba(237, 240, 244, .82);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  white-space: nowrap;
}

.info-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 9.5px;
  letter-spacing: .1em;
  cursor: pointer;
}

.text-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
  transition: transform .35s var(--ease-out);
}

.text-btn:hover svg { transform: translate(2px, -2px); }

.focus-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(184, 203, 225, .36);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .09em;
  white-space: nowrap;
}

.focus-state i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  border: 1px solid rgba(185, 204, 226, .36);
}

.focus-state.is-focused {
  color: var(--accent);
}

.focus-state.is-focused i {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 7px rgba(233, 184, 119, .6);
}

.info-panel.is-swapping .info-desc,
.info-panel.is-swapping .info-stats {
  animation: info-in .5s var(--ease-out) both;
}

@keyframes info-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------
   Scale + telemetry
   --------------------------------------------------------- */

.scale-hud {
  position: fixed;
  left: 35px;
  bottom: 32px;
  z-index: 20;
  width: 118px;
  color: rgba(179, 199, 223, .3);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: .12em;
  --enter-y: 10px;
}

.scale-line {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 7px;
  border-top: 1px solid rgba(185, 205, 228, .25);
}

.scale-line i {
  width: 1px;
  height: 4px;
  background: rgba(185, 205, 228, .25);
}

.scale-line i:nth-child(2),
.scale-line i:nth-child(4) { height: 2px; opacity: .55; }

.scale-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}

.telemetry {
  position: fixed;
  right: 34px;
  bottom: 33px;
  z-index: 20;
  display: flex;
  gap: 24px;
  --enter-y: 10px;
}

.telemetry div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 46px;
}

.telemetry span {
  color: rgba(179, 199, 223, .28);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: .11em;
}

.telemetry strong {
  color: rgba(220, 231, 243, .62);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}

/* ---------------------------------------------------------
   Body dock
   --------------------------------------------------------- */

.body-dock {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 35;
  width: min(920px, calc(100vw - 420px));
  transform: translate3d(-50%, var(--enter-y), 0);
  --enter-y: 20px;
  --delay: 90;
}

.is-exploring .body-dock {
  transform: translate3d(-50%, 0, 0);
}

.dock-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 8px;
  color: rgba(183, 202, 226, .3);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .18em;
}

.dock-keys { opacity: .62; }

.dock-track {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 76px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(16, 25, 40, .54), rgba(5, 10, 18, .42));
  box-shadow:
    0 18px 50px rgba(0, 0, 0, .24),
    inset 0 1px 0 rgba(255, 255, 255, .035);
  backdrop-filter: blur(20px) saturate(128%);
  -webkit-backdrop-filter: blur(20px) saturate(128%);
  overflow-x: auto;
  scrollbar-width: none;
}

.dock-track::-webkit-scrollbar { display: none; }

.dock-track::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  width: 22%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(233, 184, 119, .45), transparent);
  pointer-events: none;
}

.dock-item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 4px 7px;
  border: 0;
  border-right: 1px solid rgba(190, 215, 245, .055);
  background: transparent;
  color: rgba(206, 219, 234, .46);
  cursor: pointer;
  transition: color .3s ease, background .3s ease;
}

.dock-item:last-child { border-right: 0; }

.dock-item::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--body, var(--accent));
  box-shadow: 0 0 8px var(--body, var(--accent));
  transform: translateX(-50%);
  transition: width .4s var(--ease-out);
}

.dock-item:hover {
  color: rgba(238, 243, 249, .85);
  background: rgba(139, 171, 214, .035);
}

.dock-item[aria-current="true"] {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0));
}

.dock-item[aria-current="true"]::after { width: 56%; }

.dock-num {
  position: absolute;
  top: 4px;
  left: 6px;
  color: rgba(180, 198, 220, .2);
  font-family: var(--font-mono);
  font-size: 6px;
  letter-spacing: .02em;
}

.dock-orb {
  position: relative;
  display: block;
  width: 21px;
  height: 21px;
  margin-top: 1px;
  border-radius: 50%;
  background-color: var(--body);
  background:
    radial-gradient(circle at 34% 27%, rgba(255, 255, 255, .7) 0%, rgba(255, 255, 255, .18) 13%, transparent 34%),
    radial-gradient(circle at 60% 62%, var(--body) 0%, color-mix(in srgb, var(--body) 56%, #05070c) 100%);
  box-shadow:
    inset -3px -3px 7px rgba(0, 0, 0, .55),
    0 0 12px color-mix(in srgb, var(--body) 25%, transparent);
  transition: transform .35s var(--ease-out), box-shadow .35s ease;
}

.dock-orb::before {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: border-color .3s ease, transform .35s var(--ease-out);
}

.dock-item:hover .dock-orb { transform: translateY(-2px) scale(1.06); }

.dock-item[aria-current="true"] .dock-orb {
  box-shadow:
    inset -3px -3px 7px rgba(0, 0, 0, .5),
    0 0 16px color-mix(in srgb, var(--body) 48%, transparent);
}

.dock-item[aria-current="true"] .dock-orb::before {
  border-color: color-mix(in srgb, var(--body) 42%, transparent);
  transform: scale(.86);
}

.dock-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: inherit;
  font-size: 9.5px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: .12em;
  white-space: nowrap;
}

.dock-name em {
  color: rgba(177, 196, 219, .26);
  font-family: var(--font-mono);
  font-size: 5.5px;
  font-style: normal;
  letter-spacing: .13em;
}

.dock-item[aria-current="true"] .dock-name em {
  color: color-mix(in srgb, var(--body) 56%, rgba(210, 222, 235, .4));
}

/* ---------------------------------------------------------
   Hint, cursor, toast
   --------------------------------------------------------- */

.hint {
  position: fixed;
  left: 50%;
  bottom: 126px;
  z-index: 21;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(190, 207, 227, .37);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: .08em;
  white-space: nowrap;
  transform: translate3d(-50%, 0, 0);
  --enter-y: 8px;
  pointer-events: none;
  transition: opacity .8s ease;
}

.hint.is-muted { opacity: .18 !important; }

.hint-mouse {
  position: relative;
  display: inline-block;
  width: 11px;
  height: 16px;
  border: 1px solid rgba(190, 207, 227, .4);
  border-radius: 7px;
}

.hint-mouse i {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 1px;
  height: 4px;
  background: rgba(190, 207, 227, .55);
  transform: translateX(-50%);
  animation: scroll-cue 2.4s ease-in-out infinite;
}

@keyframes scroll-cue {
  0%, 100% { opacity: .2; transform: translate(-50%, 0); }
  45% { opacity: .9; transform: translate(-50%, 3px); }
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(226, 235, 246, .22);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  transition:
    width .25s var(--ease-out),
    height .25s var(--ease-out),
    border-color .25s ease,
    background .25s ease,
    opacity .4s ease;
  mix-blend-mode: screen;
}

.cursor i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(245, 240, 230, .9);
  box-shadow: 0 0 7px rgba(245, 240, 230, .6);
  transform: translate(-50%, -50%);
}

.is-exploring .cursor { opacity: 1; }

.cursor.is-hover {
  width: 40px;
  height: 40px;
  border-color: rgba(233, 184, 119, .75);
  background: rgba(233, 184, 119, .045);
}

.cursor.is-down {
  width: 18px;
  height: 18px;
  border-color: rgba(233, 184, 119, .9);
}

.toast {
  position: fixed;
  bottom: 118px;
  left: 50%;
  z-index: 80;
  padding: 9px 15px;
  border: 1px solid var(--line);
  background: rgba(6, 11, 20, .82);
  color: rgba(229, 235, 243, .78);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .08em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .35s ease, transform .35s var(--ease-out);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------------------------------------------------
   Scene labels
   --------------------------------------------------------- */

.labels {
  position: fixed;
  inset: 0;
  z-index: 15;
  overflow: hidden;
  pointer-events: none;
}

.body-label {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border: 0;
  background: transparent;
  color: rgba(234, 241, 250, .8);
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: .13em;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .95), 0 0 14px rgba(0, 0, 0, .7);
  pointer-events: auto;
  cursor: pointer;
  opacity: 1;
  transition: color .25s ease, opacity .35s ease;
  will-change: transform;
}

.labels.has-focus .body-label { opacity: .17; }
.labels.has-focus .body-label.is-selected,
.labels.has-focus .body-label:hover,
.labels.has-focus .body-label.is-hovered { opacity: 1; }
.labels.has-focus .body-label.is-hidden { opacity: 0; }

.body-label.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.body-label .label-dot {
  width: 4px;
  height: 4px;
  border: 1px solid var(--body, var(--accent));
  border-radius: 50%;
  box-shadow: 0 0 6px color-mix(in srgb, var(--body, var(--accent)) 55%, transparent);
  transition: background .25s ease, transform .25s ease;
}

.body-label .label-meta {
  color: rgba(192, 209, 230, .4);
  font-family: var(--font-mono);
  font-size: 6.8px;
  letter-spacing: .04em;
}

.body-label::before {
  content: "";
  width: 14px;
  height: 1px;
  margin-right: -1px;
  background: linear-gradient(90deg, var(--body, var(--accent)), transparent);
  opacity: .58;
  order: -1;
}

.body-label:hover,
.body-label.is-hovered,
.body-label.is-selected {
  color: var(--ink);
}

.body-label:hover .label-dot,
.body-label.is-hovered .label-dot,
.body-label.is-selected .label-dot {
  background: var(--body, var(--accent));
  transform: scale(1.4);
}

.body-label.is-selected .label-meta { color: color-mix(in srgb, var(--body, var(--accent)) 65%, transparent); }

/* ---------------------------------------------------------
   Intro
   --------------------------------------------------------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  background: transparent;
  transition: opacity 1s var(--ease-io), filter 1s var(--ease-io), transform 1.2s var(--ease-io);
}

.intro-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 4, 10, .95) 0%, rgba(2, 4, 10, .82) 28%, rgba(2, 4, 10, .28) 60%, rgba(2, 4, 10, .52) 100%),
    radial-gradient(ellipse 65% 80% at 31% 50%, rgba(2, 4, 10, .35), transparent 72%),
    linear-gradient(to top, rgba(1, 2, 6, .7), transparent 24%);
}

.intro-grid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 58%;
  opacity: .55;
  background-image:
    linear-gradient(rgba(180, 205, 235, .038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 205, 235, .038) 1px, transparent 1px);
  background-size: 86px 86px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .8), transparent 78%);
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .8), transparent 78%);
}

.intro-scan {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  opacity: .3;
  background: linear-gradient(90deg, transparent 4%, rgba(233, 184, 119, .35) 30%, rgba(133, 220, 255, .3) 55%, transparent 92%);
  filter: blur(.3px);
  animation: intro-scan 9s linear infinite;
}

@keyframes intro-scan {
  0% { transform: translateY(-2vh); opacity: 0; }
  12% { opacity: .24; }
  78% { opacity: .18; }
  100% { transform: translateY(102vh); opacity: 0; }
}

.intro-inner {
  position: absolute;
  top: 50%;
  left: clamp(28px, 8vw, 124px);
  z-index: 3;
  width: min(650px, 76vw);
  transform: translateY(-50%);
}

.intro-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
  color: rgba(192, 208, 229, .46);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .26em;
  line-height: 1.6;
  animation: intro-rise 1.2s var(--ease-out) .1s both;
}

.intro-kicker i {
  display: inline-block;
  width: 31px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(233, 184, 119, .55);
}

.intro-title {
  position: relative;
  margin: 0;
  animation: intro-rise 1.25s var(--ease-out) .2s both;
}

.title-main {
  display: block;
  width: fit-content;
  background: linear-gradient(175deg, #fffaf0 2%, #eee4d2 40%, #c5b9a5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(67px, 11.2vw, 158px);
  font-weight: 400;
  line-height: .8;
  letter-spacing: .045em;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .42));
}

.title-cn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  margin-top: 23px;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: clamp(11px, 1.25vw, 15px);
  font-weight: 400;
  letter-spacing: .7em;
  line-height: 1.5;
}

.title-cn::before {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(233, 184, 119, .55);
}

.intro-copy {
  max-width: 430px;
  margin: 28px 0 31px;
  color: rgba(220, 228, 238, .55);
  font-size: 13px;
  font-weight: 300;
  line-height: 2.06;
  letter-spacing: .045em;
  animation: intro-rise 1.25s var(--ease-out) .32s both;
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  animation: intro-rise 1.25s var(--ease-out) .44s both;
}

.enter-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 174px;
  height: 50px;
  padding: 0 18px;
  overflow: hidden;
  border: 1px solid rgba(233, 184, 119, .65);
  background: rgba(233, 184, 119, .06);
  color: #f2e8d8;
  font-size: 11px;
  letter-spacing: .18em;
  cursor: pointer;
  transition:
    color .45s ease,
    border-color .45s ease,
    background .45s ease;
}

.enter-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-101%);
  transition: transform .55s var(--ease-out);
}

.enter-btn > * { position: relative; z-index: 1; }

.enter-btn:not(:disabled):hover {
  color: #10131a;
  border-color: var(--accent-bright);
  background: rgba(233, 184, 119, .12);
}

.enter-btn:not(:disabled):hover::before { transform: translateX(0); }

.enter-btn:disabled {
  color: rgba(218, 226, 237, .3);
  border-color: rgba(190, 215, 245, .13);
  cursor: wait;
  background: rgba(255, 255, 255, .01);
}

.enter-arrow {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1;
  transition: transform .45s var(--ease-out);
}

.enter-btn:not(:disabled):hover .enter-arrow {
  transform: translate(3px, -3px);
}

.intro-note {
  color: rgba(182, 201, 225, .3);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: .08em;
}

.load-state {
  width: 285px;
  margin-top: 37px;
  animation: intro-rise 1.25s var(--ease-out) .54s both;
}

.load-line {
  position: relative;
  height: 1px;
  overflow: hidden;
  background: rgba(185, 205, 228, .14);
}

.load-line span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(233, 184, 119, .5), var(--accent-bright));
  box-shadow: 0 0 8px rgba(233, 184, 119, .4);
  transition: width .45s var(--ease-out);
}

.load-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: rgba(185, 203, 225, .32);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .08em;
}

.intro.is-ready .load-state {
  opacity: .6;
}

.intro.is-ready .enter-btn {
  animation: button-glow 3.2s ease-in-out infinite;
}

@keyframes button-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(233, 184, 119, 0); }
  50% { box-shadow: 0 0 28px rgba(233, 184, 119, .12); }
}

@keyframes intro-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-side {
  position: absolute;
  top: 50%;
  right: 36px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(188, 207, 230, .25);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .28em;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

.intro-side i {
  width: 1px;
  height: 27px;
  background: rgba(190, 210, 233, .2);
}

.intro-bottom {
  position: absolute;
  right: 36px;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  left: 36px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  color: rgba(181, 200, 222, .27);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .15em;
}

.intro.is-leaving {
  opacity: 0;
  filter: blur(9px);
  transform: scale(1.015);
  pointer-events: none;
}

/* ---------------------------------------------------------
   Fallback / noscript
   --------------------------------------------------------- */

.fallback {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  background:
    radial-gradient(ellipse 58% 50% at 50% 46%, rgba(24, 39, 62, .55), transparent 70%),
    linear-gradient(180deg, #040811, #010207);
}

.fallback[hidden] { display: none; }

.fallback-orbit {
  position: relative;
  width: 84px;
  height: 84px;
  margin-bottom: 30px;
  border: 1px solid rgba(233, 184, 119, .16);
  border-radius: 50%;
  transform: rotate(-19deg) scaleY(.38);
}

.fallback-orbit::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(233, 184, 119, .25);
  border-radius: 50%;
}

.fallback-orbit i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #ffe6bc, #e9a958 48%, #7b3a11);
  box-shadow: 0 0 30px rgba(233, 169, 88, .3);
  transform: translate(-50%, -50%) scaleY(2.6) rotate(19deg);
}

.fallback-orbit b {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(131, 220, 255, .6);
}

.fallback .intro-kicker { margin-bottom: 20px; animation: none; }
.fallback h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 400;
  letter-spacing: .04em;
}
.fallback p:not(.intro-kicker) {
  max-width: 460px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 12px;
  line-height: 2;
}
.fallback .enter-btn { animation: none; }

.noscript {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: .05em;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1250px) {
  .edge-index { display: none; }
  .telemetry { gap: 18px; }
  .body-dock { width: min(820px, calc(100vw - 330px)); }
}

@media (max-width: 1080px) {
  .top-status { display: none; }
  .scale-hud { display: none; }
  .telemetry { display: none; }
  .body-dock { width: min(780px, calc(100vw - 48px)); }
  .info-panel { width: 292px; left: 24px; }
  .hint { bottom: 118px; }
}

@media (max-width: 900px) {
  .topbar { padding-left: 24px; padding-right: 24px; }
  .info-panel { top: 116px; }
  .intro-inner { left: 7vw; }
  .intro-side { display: none; }
}

@media (max-width: 760px) {
  .frame { inset: 10px; }
  .topbar {
    min-height: 66px;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px 0 16px;
    gap: 8px;
    align-items: center;
  }

  .brand { gap: 7px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-text strong { font-size: 14px; letter-spacing: .16em; }
  .brand-text small { display: none; }

  .top-actions { gap: 4px; padding-top: 0; }
  .chip {
    height: 29px;
    padding: 0 7px;
    gap: 4px;
    font-size: 8px;
    letter-spacing: .02em;
  }
  .chip-led { width: 3px; height: 3px; }
  .icon-btn { width: 29px; height: 29px; }
  .icon-btn svg { width: 14px; height: 14px; }

  .cursor { display: none; }

  .labels { z-index: 16; }
  .body-label {
    padding: 3px 5px;
    font-size: 8.5px;
    letter-spacing: .08em;
    gap: 4px;
  }
  .body-label::before { width: 6px; }
  .body-label .label-meta { display: none; }

  .info-panel {
    top: auto;
    right: 12px;
    bottom: calc(130px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    width: auto;
    padding: 15px 17px 13px;
    background: linear-gradient(155deg, rgba(11, 19, 32, .86), rgba(4, 8, 15, .78));
    backdrop-filter: blur(22px) saturate(130%);
    -webkit-backdrop-filter: blur(22px) saturate(130%);
    --enter-x: 0px;
    --enter-y: 18px;
    --delay: 200;
  }

  .info-glow { width: 100px; height: 100px; top: -34px; }
  .info-index { font-size: 20px; }
  .info-type { font-size: 6.5px; }
  .info-title { margin: 6px 0 9px; gap: 9px; }
  .info-title span { font-size: 26px; }
  .info-title em { font-size: 7px; }
  .info-desc {
    min-height: 0;
    display: -webkit-box;
    overflow: hidden;
    font-size: 10.5px;
    line-height: 1.8;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .info-stats { margin-top: 11px; }
  .info-stats div { padding: 7px 0; }
  .info-stats dt { font-size: 6.5px; margin-bottom: 2px; }
  .info-stats dd { font-size: 9.5px; }
  .info-foot { margin-top: 10px; }
  .text-btn { font-size: 9px; }
  .focus-state { font-size: 6.5px; }

  .body-dock {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 16px);
    --enter-y: 16px;
  }
  .body-dock::after {
    content: "";
    position: absolute;
    right: 1px;
    bottom: 1px;
    z-index: 2;
    width: 42px;
    height: 66px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(4, 8, 15, .92));
  }
  .dock-label { padding: 0 4px 6px; font-size: 6.5px; }
  .dock-keys { display: none; }
  .dock-track {
    height: 66px;
    padding: 6px;
    justify-content: flex-start;
  }
  .dock-track::before { left: 6%; width: 30%; }
  .dock-item {
    flex: 0 0 64px;
    gap: 3px;
    padding: 4px 2px 6px;
  }
  .dock-num { top: 3px; left: 4px; font-size: 5.5px; }
  .dock-orb { width: 18px; height: 18px; margin-top: 3px; }
  .dock-name { font-size: 9px; letter-spacing: .08em; }
  .dock-name em { font-size: 5px; }
  .hint { display: none; }

  .intro-wash {
    background:
      linear-gradient(90deg, rgba(2, 4, 10, .9), rgba(2, 4, 10, .68) 52%, rgba(2, 4, 10, .52)),
      linear-gradient(to top, rgba(1, 2, 6, .85), transparent 35%);
  }
  .intro-grid { width: 100%; background-size: 64px 64px; opacity: .38; }
  .intro-inner {
    top: 45%;
    left: 20px;
    width: calc(100vw - 40px);
  }
  .intro-kicker {
    gap: 9px;
    margin-bottom: 20px;
    font-size: 6.5px;
    letter-spacing: .17em;
  }
  .intro-kicker i { width: 20px; }
  .title-main {
    font-size: clamp(50px, 17vw, 88px);
    letter-spacing: .035em;
  }
  .title-cn { margin-top: 18px; font-size: 10px; gap: 11px; letter-spacing: .52em; }
  .title-cn::before { width: 18px; }
  .intro-copy {
    max-width: 290px;
    margin: 22px 0 25px;
    font-size: 11px;
    line-height: 1.95;
  }
  .intro-actions { gap: 13px; flex-wrap: wrap; }
  .enter-btn { width: 154px; height: 46px; gap: 13px; font-size: 10px; }
  .intro-note { font-size: 6.5px; letter-spacing: .03em; }
  .load-state { width: min(250px, 76vw); margin-top: 30px; }
  .load-meta { font-size: 6px; }
  .intro-bottom {
    right: 20px;
    bottom: calc(15px + env(safe-area-inset-bottom, 0px));
    left: 20px;
    font-size: 6px;
    letter-spacing: .1em;
  }
  .intro-bottom span:last-child { display: none; }
  .toast { bottom: 102px; font-size: 7px; padding: 8px 12px; }
}

@media (max-width: 420px) {
  .brand-text strong { font-size: 12px; }
  .chip { padding: 0 6px; font-size: 7.5px; }
  .chip-led { display: none; }
  .top-actions { gap: 3px; }
  .info-panel { bottom: calc(122px + env(safe-area-inset-bottom, 0px)); }
  .info-desc { -webkit-line-clamp: 2; }
  .info-stats div:nth-child(3),
  .info-stats div:nth-child(4) { display: none; }
  .dock-item { flex-basis: 58px; }
  .dock-name { font-size: 8.5px; }
}

@media (max-height: 700px) and (min-width: 761px) {
  .info-panel { top: 104px; padding-top: 16px; padding-bottom: 14px; }
  .info-desc { min-height: 0; font-size: 10.5px; line-height: 1.8; }
  .info-stats { margin-top: 12px; }
  .info-stats div { padding: 7px 0; }
  .info-foot { margin-top: 10px; }
  .body-dock { bottom: 14px; }
  .body-dock .dock-track { height: 68px; }
  .hint { bottom: 104px; }
  .intro-copy { margin: 20px 0 22px; }
  .load-state { margin-top: 25px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .topbar {
    min-height: 56px;
    padding: calc(9px + env(safe-area-inset-top, 0px)) 14px 0 16px;
  }
  .brand-text small,
  .top-status,
  .edge-index,
  .scale-hud,
  .telemetry,
  .hint { display: none; }

  .info-panel {
    top: 62px;
    right: auto;
    bottom: auto;
    left: 14px;
    width: 238px;
    padding: 12px 14px 10px;
  }
  .info-index { font-size: 18px; }
  .info-type { font-size: 6px; }
  .info-title { margin: 4px 0 6px; }
  .info-title span { font-size: 23px; }
  .info-title em { font-size: 6px; }
  .info-desc,
  .info-stats { display: none; }
  .info-foot { margin-top: 5px; }
  .info-glow { width: 90px; height: 90px; }

  .body-dock {
    right: 12px;
    bottom: 8px;
    left: auto;
    width: min(580px, calc(100vw - 288px));
    transform: translate3d(0, var(--enter-y), 0);
  }
  .is-exploring .body-dock { transform: translate3d(0, 0, 0); }
  .body-dock .dock-label { display: none; }
  .dock-track { height: 58px; padding: 4px 6px; }
  .dock-item { padding: 2px; }
  .dock-num { display: none; }
  .dock-orb { width: 16px; height: 16px; margin-top: 1px; }
  .dock-name { font-size: 8px; }
  .dock-name em { font-size: 4.5px; }

  .intro-inner {
    top: 46%;
    left: 22px;
    width: min(520px, 58vw);
  }
  .intro-kicker { margin-bottom: 12px; }
  .title-main { font-size: clamp(48px, 8vw, 72px); }
  .title-cn { margin-top: 10px; font-size: 10px; letter-spacing: .48em; }
  .intro-copy { display: none; }
  .intro-actions { margin-top: 16px; }
  .intro-note { display: none; }
  .load-state { width: 230px; margin-top: 16px; }
  .intro-bottom { display: none; }
}

@media (max-width: 700px) and (max-height: 520px) and (orientation: landscape) {
  .info-panel { display: none; }
  .body-dock {
    right: 12px;
    left: 12px;
    width: calc(100vw - 24px);
  }
}

@media (pointer: coarse) {
  .cursor { display: none; }
  #space { cursor: default; }
  [data-action="parallax"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .intro-scan { display: none; }
  .status-dot { animation: none; opacity: .8; }
  .intro.is-ready .enter-btn { animation: none; }
}
