/* ------------------------------------------------------------------
   星际漂流 · Stellar Drift
   ------------------------------------------------------------------ */

:root {
  --bg: #02030a;
  --ink: #eef3ff;
  --ink-dim: rgba(221, 231, 255, 0.62);
  --ink-faint: rgba(205, 220, 255, 0.38);
  --line: rgba(184, 207, 255, 0.16);
  --line-strong: rgba(198, 218, 255, 0.32);
  --accent: #a8c6ff;
  --warm: #ffd4a1;
  --mono: "SFMono-Regular", "Cascadia Mono", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --sans: "Inter", "Helvetica Neue", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", sans-serif;
  --serif: "Cormorant Garamond", "Bodoni 72", Didot, "Times New Roman", Georgia, serif;
  --serif-zh: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC", "SimSun", serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  user-select: none;
}

body {
  position: relative;
  touch-action: none;
}

::selection {
  background: rgba(150, 185, 255, 0.28);
  color: #fff;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

button:focus-visible {
  outline: 1px solid rgba(230, 240, 255, 0.85);
  outline-offset: 4px;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(120% 100% at 50% 30%, #060a18 0%, #010208 70%);
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.intro .eyebrow,
.intro .title,
.intro .lede,
.intro .intro-main,
.intro .intro-footer {
  opacity: 0;
}

body.is-flying.mode-mouse #stage {
  cursor: none;
}

/* ------------------------------------------------------------------
   Inset instrument frame
   ------------------------------------------------------------------ */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
  background:
    linear-gradient(180deg, rgba(1, 2, 9, 0.5) 0%, rgba(1, 2, 9, 0.14) 13%, rgba(1, 2, 9, 0) 27%, rgba(1, 2, 9, 0) 62%, rgba(1, 2, 9, 0.2) 83%, rgba(1, 2, 9, 0.55) 100%),
    radial-gradient(70% 55% at 0% 100%, rgba(1, 2, 9, 0.4), transparent 65%),
    radial-gradient(60% 45% at 100% 0%, rgba(1, 2, 9, 0.3), transparent 65%);
}

body.is-flying .scrim {
  opacity: 1;
}

.frame {
  position: fixed;
  inset: 18px;
  z-index: 12;
  pointer-events: none;
  opacity: 0.75;
}

.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(186, 209, 255, 0.075);
}

.corner {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 0 solid rgba(201, 220, 255, 0.42);
}

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

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

.intro {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 7.5vw;
  transition: opacity 1.5s var(--ease), visibility 1.5s;
}

.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(125% 105% at 74% 40%, rgba(2, 4, 12, 0) 0%, rgba(2, 4, 12, 0.08) 46%, rgba(2, 4, 12, 0.7) 100%),
    linear-gradient(90deg, rgba(2, 4, 12, 0.94) 0%, rgba(2, 4, 12, 0.74) 32%, rgba(2, 4, 12, 0.12) 62%, rgba(2, 4, 12, 0.28) 100%),
    linear-gradient(180deg, rgba(2, 4, 12, 0.42) 0%, rgba(2, 4, 12, 0) 22%, rgba(2, 4, 12, 0) 72%, rgba(2, 4, 12, 0.55) 100%);
  pointer-events: none;
}

.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-copy {
  position: relative;
  z-index: 1;
  max-width: 590px;
  margin-top: -3vh;
}

.intro-aside {
  position: absolute;
  left: 34px;
  top: 50%;
  z-index: 1;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.38em;
  color: rgba(205, 220, 255, 0.25);
  white-space: nowrap;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.2;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(206, 221, 255, 0.52);
}

.eyebrow span {
  display: block;
  width: 36px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.title {
  margin-top: 34px;
  font-weight: 400;
}

.title-zh {
  display: block;
  font-family: var(--serif-zh);
  font-size: clamp(58px, 7.6vw, 112px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0.11em;
  padding-left: 0.04em;
  background: linear-gradient(176deg, #ffffff 0%, #eef3ff 38%, #aebfe6 78%, #8297c4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 42px rgba(133, 168, 255, 0.13));
}

.title-en {
  display: block;
  margin-top: 22px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.78em;
  color: rgba(196, 213, 246, 0.46);
  white-space: nowrap;
}

.lede {
  margin-top: 40px;
  max-width: 390px;
  font-size: 13.5px;
  line-height: 2;
  letter-spacing: 0.055em;
  color: rgba(226, 235, 255, 0.7);
}

.lede em {
  display: block;
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 15.5px;
  font-style: italic;
  letter-spacing: 0.015em;
  color: rgba(209, 223, 250, 0.4);
}

.intro-main {
  margin-top: 38px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  height: 52px;
  padding: 0 25px;
  border: 1px solid rgba(196, 216, 255, 0.22);
  border-radius: 2px;
  background: rgba(8, 13, 26, 0.38);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease),
    color 0.5s var(--ease), box-shadow 0.6s var(--ease), opacity 0.4s;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
  opacity: 0.9;
}

.btn .arrow {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1;
  margin-left: 4px;
  transform: translateX(0);
  transition: transform 0.45s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(5px);
}

.btn:disabled {
  opacity: 0.34;
  cursor: default;
}

.btn-primary {
  background: rgba(234, 241, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.7);
  color: #060a15;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.28);
}

.btn-primary:hover:not(:disabled) {
  background: #fff;
  box-shadow: 0 0 55px rgba(163, 197, 255, 0.24), 0 14px 60px rgba(0, 0, 0, 0.35);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 20%, rgba(160, 195, 255, 0.34) 48%, transparent 76%);
  transform: translateX(-110%);
  transition: transform 0.85s var(--ease);
}

.btn-primary:hover::after {
  transform: translateX(110%);
}

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

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(214, 229, 255, 0.46);
}

.label-touch {
  display: none;
}

body.is-touch .label-mouse {
  display: none;
}

body.is-touch .label-touch {
  display: inline;
}

.fineprint {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: rgba(204, 219, 250, 0.36);
}

.fineprint::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: none;
  border: 1px solid rgba(194, 216, 255, 0.42);
  border-radius: 50%;
}

/* linking state */

.intro.is-linking .lede,
.intro.is-linking .intro-main {
  display: none;
}

.link-state {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(470px, 100%);
  margin-top: 38px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(7, 12, 24, 0.52);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: rise-in 0.8s var(--ease) both;
}

.orbit {
  position: relative;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid rgba(178, 205, 255, 0.2);
  border-radius: 50%;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.orbit::before {
  inset: 10px;
  border: 1px solid rgba(190, 214, 255, 0.42);
  background: rgba(168, 198, 255, 0.12);
}

.orbit::after {
  inset: -1px;
  border-top: 1px solid rgba(220, 235, 255, 0.85);
  animation: spin 2.2s linear infinite;
}

.link-copy {
  min-width: 0;
  flex: 1;
}

.link-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(240, 246, 255, 0.9);
}

.link-sub {
  margin-top: 6px;
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: rgba(203, 218, 248, 0.46);
}

.text-btn {
  flex: none;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(205, 220, 250, 0.45);
  padding: 6px 2px;
  transition: color 0.3s;
}

.text-btn:hover {
  color: rgba(240, 246, 255, 0.9);
}

.link-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  animation: rise-in 0.7s var(--ease) both;
}

.intro.is-link-error .orbit::after {
  animation: none;
  border-top-color: rgba(255, 190, 150, 0.8);
}

.intro.is-link-error .orbit::before {
  border-color: rgba(255, 195, 160, 0.5);
  background: rgba(255, 160, 110, 0.1);
}

.intro-footer {
  position: absolute;
  left: 7.5vw;
  right: 7.5vw;
  bottom: 34px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 15px;
  border-top: 1px solid rgba(184, 207, 255, 0.09);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: rgba(198, 214, 246, 0.35);
}

.intro-footer .coords {
  color: rgba(198, 214, 246, 0.42);
}

/* ------------------------------------------------------------------
   HUD
   ------------------------------------------------------------------ */

.hud {
  position: fixed;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), visibility 0s 1.1s;
}

body.is-flying .hud {
  opacity: 1;
  visibility: visible;
  transition-delay: 0.55s, 0.55s, 0s;
}

#hud-top {
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 34px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85);
}

.brand-mark {
  width: 34px;
  height: 34px;
  color: rgba(218, 231, 255, 0.82);
}

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

.brand-text span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.3em;
  color: rgba(225, 236, 255, 0.8);
}

.brand-text small {
  font-size: 8.5px;
  letter-spacing: 0.19em;
  color: rgba(202, 220, 252, 0.52);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  pointer-events: auto;
}

.mode-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  margin-right: 6px;
  padding: 0 12px;
  border: 1px solid rgba(188, 211, 255, 0.18);
  border-radius: 999px;
  background: rgba(5, 9, 18, 0.46);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: rgba(220, 233, 255, 0.74);
  white-space: nowrap;
}

.chip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9fc0ff;
  box-shadow: 0 0 8px rgba(159, 192, 255, 0.85);
}

.mode-chip.is-auto .chip-dot {
  background: #88e0d0;
  box-shadow: 0 0 8px rgba(136, 224, 208, 0.7);
}

.mode-chip.is-warp {
  border-color: rgba(255, 204, 154, 0.32);
  color: rgba(255, 231, 205, 0.9);
}

.mode-chip.is-warp .chip-dot {
  background: var(--warm);
  box-shadow: 0 0 12px rgba(255, 196, 140, 0.9);
  animation: soft-pulse 1.1s ease-in-out infinite;
}

.mode-chip.is-lost .chip-dot {
  background: #ffb27a;
  box-shadow: 0 0 8px rgba(255, 159, 110, 0.7);
}

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  flex: none;
  border: 1px solid rgba(188, 211, 255, 0.18);
  border-radius: 50%;
  background: rgba(5, 9, 18, 0.42);
  color: rgba(220, 233, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.35s, color 0.35s, background 0.35s;
  pointer-events: auto;
}

.icon-btn:hover {
  border-color: rgba(216, 231, 255, 0.46);
  color: rgba(245, 249, 255, 0.95);
  background: rgba(20, 30, 52, 0.4);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.qmark {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1;
  transform: translateY(-0.5px);
}

.sound-slash {
  display: none;
}

body.sound-off .sound-wave {
  opacity: 0.12;
}

body.sound-off .sound-slash {
  display: block;
}

body.sound-off #btn-sound {
  color: rgba(214, 228, 255, 0.32);
}

/* heading tape */

.heading-tape {
  position: absolute;
  left: 50%;
  top: 20px;
  width: min(440px, 30vw);
  height: 48px;
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  background: radial-gradient(65% 120% at 50% 48%, rgba(2, 5, 12, 0.46), rgba(2, 5, 12, 0) 74%);
  opacity: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.65));
}

.tape-track {
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  will-change: transform;
}

.tape-tick {
  position: absolute;
  top: 21px;
  width: 1px;
  height: 5px;
  background: rgba(205, 222, 255, 0.42);
}

.tape-tick.major {
  top: 17px;
  height: 9px;
  background: rgba(221, 234, 255, 0.72);
}

.tape-tick span {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(220, 233, 255, 0.76);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

.tape-pointer {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg, rgba(238, 246, 255, 0.95), rgba(238, 246, 255, 0.06));
  transform: translateX(-50%);
}

.tape-pointer::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-right: 1px solid rgba(238, 246, 255, 0.85);
  border-bottom: 1px solid rgba(238, 246, 255, 0.85);
  transform: translate(-50%, 0) rotate(45deg);
}

/* planet navigation labels */

#planet-labels {
  position: fixed;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}

body.is-flying #planet-labels {
  opacity: 1;
}

.planet-label {
  position: absolute;
  left: 0;
  top: 0;
  padding: 4px 9px 5px 15px;
  border-radius: 1px;
  background: linear-gradient(90deg, rgba(2, 6, 14, 0), rgba(2, 6, 14, 0.42) 20%, rgba(2, 6, 14, 0.28));
  font-family: var(--mono);
  white-space: nowrap;
  opacity: 0;
  will-change: transform;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}

.planet-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 9px;
  height: 1px;
  background: rgba(198, 219, 255, 0.45);
}

.planet-label::after {
  content: "";
  position: absolute;
  left: -2px;
  top: 5px;
  width: 4px;
  height: 4px;
  border: 1px solid rgba(205, 224, 255, 0.7);
  border-radius: 50%;
  background: rgba(4, 8, 18, 0.65);
}

.planet-label b {
  display: block;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(236, 244, 255, 0.82);
}

.planet-label .pl-meta {
  display: flex;
  gap: 8px;
  margin-top: 3px;
  font-size: 6.5px;
  letter-spacing: 0.14em;
  color: rgba(198, 218, 250, 0.5);
}

.planet-label .pl-dist {
  color: rgba(164, 204, 255, 0.58);
}

.planet-label.is-near b {
  color: rgba(255, 216, 174, 0.9);
}

.planet-label.is-near::after {
  border-color: rgba(255, 208, 160, 0.9);
  box-shadow: 0 0 8px rgba(255, 190, 130, 0.4);
}

.planet-label.is-near::before {
  background: rgba(255, 208, 160, 0.6);
}

/* reticle */

#reticle {
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  color: rgba(215, 230, 255, 0.72);
  text-align: center;
  transform: scale(1);
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.65));
  transition: opacity 1.2s var(--ease), transform 0.7s var(--ease), color 0.6s;
}

#reticle svg {
  width: 120px;
  height: 120px;
  transition: transform 0.8s var(--ease), opacity 0.6s;
}

.reticle-label {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.3em;
  color: rgba(210, 226, 255, 0.58);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  transition: color 0.4s;
}

body.is-warp #reticle {
  color: rgba(255, 224, 188, 0.72);
}

body.is-warp #reticle svg {
  transform: scale(1.22);
}

body.is-warp .reticle-label {
  color: rgba(255, 224, 190, 0.66);
}

/* velocity */

.velocity {
  left: 34px;
  bottom: 30px;
  width: 252px;
  font-family: var(--mono);
}

.v-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.v-label {
  font-size: 8px;
  letter-spacing: 0.3em;
  color: rgba(211, 226, 255, 0.65);
}

.v-state {
  padding: 3px 7px;
  border: 1px solid rgba(190, 213, 255, 0.22);
  font-size: 7px;
  letter-spacing: 0.18em;
  color: rgba(216, 231, 255, 0.66);
  transition: color 0.4s, border-color 0.4s;
}

body.is-warp .v-state {
  color: rgba(255, 225, 193, 0.85);
  border-color: rgba(255, 203, 153, 0.35);
}

.v-number {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
  height: 54px;
}

.v-number span {
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: rgba(242, 247, 255, 0.94);
  text-shadow: 0 0 28px rgba(160, 193, 255, 0.18);
}

.v-number em {
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.08em;
  color: rgba(202, 219, 250, 0.45);
}

.v-gauge {
  position: relative;
  height: 9px;
  margin-top: 11px;
  border-top: 1px solid rgba(192, 214, 255, 0.27);
}

.v-gauge b {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(197, 217, 255, 0.24) 0,
    rgba(197, 217, 255, 0.24) 1px,
    transparent 1px,
    transparent 25px
  );
  height: 5px;
  opacity: 0.7;
}

.v-gauge i {
  position: absolute;
  left: 0;
  top: -1px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(152, 186, 255, 0.2), rgba(232, 242, 255, 0.95));
  box-shadow: 0 0 12px rgba(171, 204, 255, 0.55);
  transform: scaleX(0.01);
  transform-origin: 0 50%;
  transition: transform 0.35s var(--ease), background 0.4s;
}

.v-gauge i::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f0f6ff;
  box-shadow: 0 0 10px rgba(210, 230, 255, 0.9);
}

body.is-warp .v-gauge i {
  background: linear-gradient(90deg, rgba(255, 185, 125, 0.25), rgba(255, 241, 222, 0.98));
  box-shadow: 0 0 16px rgba(255, 196, 140, 0.6);
}

.v-meta {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 9px;
  font-size: 8px;
  letter-spacing: 0.13em;
  color: rgba(203, 220, 251, 0.5);
}

.v-meta b {
  font-weight: 400;
  color: rgba(232, 241, 255, 0.9);
}

/* planet encyclopaedia card */

.planet-info {
  position: fixed;
  left: 34px;
  bottom: 152px;
  z-index: 24;
  width: 356px;
  padding: 18px 20px 16px;
  border: 1px solid rgba(192, 214, 255, 0.19);
  border-radius: 2px;
  background: linear-gradient(160deg, rgba(9, 15, 28, 0.86), rgba(4, 8, 17, 0.74));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), visibility 0s 0.7s;
  pointer-events: none;
}

.planet-info.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.pi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.2em;
  color: rgba(203, 220, 250, 0.48);
}

.pi-head #pi-range {
  color: rgba(170, 210, 255, 0.82);
}

.pi-name {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.06em;
  color: rgba(244, 248, 255, 0.96);
}

.pi-kind {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.22em;
  color: rgba(174, 204, 255, 0.6);
}

.pi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px 18px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid rgba(190, 212, 255, 0.12);
}

.pi-grid div:last-child {
  grid-column: 1 / -1;
}

.pi-grid dt {
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.14em;
  color: rgba(190, 211, 246, 0.38);
  white-space: nowrap;
}

.pi-grid dd {
  margin-top: 3px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: rgba(232, 241, 255, 0.88);
}

.pi-desc {
  margin-top: 13px;
  font-size: 10px;
  line-height: 1.85;
  color: rgba(203, 221, 250, 0.55);
}

.pi-source {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 6.5px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: rgba(180, 201, 236, 0.3);
}

body.planet-near #hints {
  opacity: 0 !important;
  transform: translateX(-50%) translateY(6px) !important;
}

/* hand preview */

#preview {
  right: 34px;
  bottom: 30px;
  width: 212px;
  opacity: 0;
  visibility: hidden;
}

body.mode-hand #preview {
  opacity: 1;
  visibility: visible;
  transition-delay: 0.9s, 0.9s, 0s;
}

.preview-frame {
  position: relative;
  width: 212px;
  height: 212px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(190, 213, 255, 0.18);
  background: #05080f;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.55), inset 0 0 40px rgba(0, 0, 0, 0.55);
}

.preview-frame video,
.preview-frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-frame video {
  filter: grayscale(1) contrast(1.02) brightness(0.82);
  opacity: 0.72;
  transform: scaleX(-1);
}

.preview-frame canvas {
  z-index: 3;
  opacity: 0.9;
}

.preview-tint {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 45%, rgba(58, 102, 180, 0.1) 0%, rgba(3, 7, 16, 0.62) 78%),
    linear-gradient(180deg, rgba(12, 24, 48, 0.18), rgba(2, 5, 12, 0.5));
  mix-blend-mode: multiply;
}

.preview-ring {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  color: rgba(192, 216, 255, 0.55);
}

.preview-arc {
  transform-origin: 50% 50%;
  animation: spin 7s linear infinite;
  opacity: 0.7;
}

body.hand-pinch .preview-arc {
  color: rgba(255, 218, 180, 0.9);
  animation-duration: 1.6s;
}

.preview-brand {
  position: absolute;
  left: 50%;
  bottom: 13px;
  z-index: 5;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.35em;
  color: rgba(205, 223, 255, 0.45);
}

.preview-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 6.8px;
  letter-spacing: 0.13em;
  color: rgba(203, 221, 252, 0.45);
  white-space: nowrap;
}

.preview-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #8fe3c8;
  box-shadow: 0 0 7px rgba(143, 227, 200, 0.8);
}

.preview-meta #hand-detail {
  color: rgba(148, 205, 255, 0.62);
}

body.hand-lost .preview-meta .dot {
  background: #ffb27a;
  box-shadow: 0 0 7px rgba(255, 178, 122, 0.8);
}

body.hand-lost .preview-meta #hand-detail {
  color: rgba(255, 196, 150, 0.75);
}

/* hints */

#hints {
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%) translateY(6px);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 17px;
  border: 1px solid rgba(187, 210, 255, 0.11);
  border-radius: 2px;
  background: rgba(5, 9, 19, 0.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.09em;
  color: rgba(208, 224, 252, 0.55);
  white-space: nowrap;
  opacity: 0;
}

body.is-flying #hints {
  opacity: 0;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

body.is-flying #hints.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#hints i {
  width: 1px;
  height: 10px;
  background: rgba(190, 213, 255, 0.16);
}

#hints b {
  font-weight: 400;
  color: rgba(232, 241, 255, 0.8);
  margin-right: 6px;
}

.hints-mouse,
.hints-touch {
  display: none;
}

body.mode-mouse .hints-hand {
  display: none;
}

body.mode-mouse .hints-mouse {
  display: flex;
  align-items: center;
  gap: 15px;
}

body.is-touch.mode-mouse .hints-mouse {
  display: none;
}

body.is-touch.mode-mouse .hints-touch {
  display: flex;
  align-items: center;
  gap: 15px;
}

body.is-touch .help-grid.help-mouse {
  display: none;
}

body.is-touch.mode-mouse .help-grid.help-touch {
  display: grid;
}

/* toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 126px;
  z-index: 60;
  max-width: min(520px, 88vw);
  padding: 12px 18px;
  border: 1px solid rgba(190, 214, 255, 0.17);
  border-radius: 2px;
  background: rgba(6, 11, 22, 0.76);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: rgba(226, 237, 255, 0.82);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0s 0.5s;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}

/* ------------------------------------------------------------------
   Cursor
   ------------------------------------------------------------------ */

#cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 65;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(240, 247, 255, 0.9);
  background: rgba(240, 247, 255, 0.18);
  box-shadow: 0 0 10px rgba(180, 211, 255, 0.45);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

#cursor span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 1px;
  background: #fff;
  transform: translate(-50%, -50%);
}

body.is-flying.mode-mouse #cursor {
  opacity: 0.75;
}

@media (pointer: coarse) {
  #cursor {
    display: none;
  }

  .label-mouse {
    display: none;
  }

  .label-touch {
    display: inline;
  }

  .help-grid.help-mouse {
    display: none;
  }

  body.mode-mouse .help-grid.help-touch {
    display: grid;
  }

  body.mode-mouse .hints-mouse {
    display: none;
  }

  body.mode-mouse .hints-touch {
    display: flex;
    align-items: center;
    gap: 15px;
  }
}

/* ------------------------------------------------------------------
   Help / fatal
   ------------------------------------------------------------------ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 4, 10, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.modal-card {
  position: relative;
  width: min(720px, 92vw);
  max-height: 88vh;
  overflow: auto;
  padding: 42px 46px 34px;
  border: 1px solid rgba(192, 214, 255, 0.19);
  border-radius: 2px;
  background: rgba(7, 11, 22, 0.88);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
  animation: rise-in 0.55s var(--ease) both;
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 18px;
  font-size: 11px;
}

.modal-card h2 {
  margin-top: 20px;
  font-family: var(--serif-zh);
  font-size: 31px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: rgba(244, 248, 255, 0.95);
}

.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 28px;
  border: 1px solid rgba(190, 212, 255, 0.1);
  background: rgba(190, 212, 255, 0.1);
}

.help-grid > div {
  padding: 22px 22px 24px;
  background: #080d18;
}

.help-grid span {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: rgba(150, 186, 255, 0.55);
}

.help-grid b {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(234, 242, 255, 0.9);
}

.help-grid p {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.8;
  color: rgba(201, 218, 248, 0.46);
}

body.mode-mouse .help-hand,
body.mode-intro .help-hand {
  display: none;
}

body.mode-hand .help-mouse {
  display: none;
}

.help-grid.help-touch {
  display: none;
}

.modal-note {
  margin-top: 24px;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: rgba(196, 214, 246, 0.35);
}

.file-warning {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background: radial-gradient(80% 80% at 50% 42%, #080d1a 0%, #010208 74%);
  text-align: center;
}

.file-warning b {
  font-family: var(--serif-zh);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: rgba(240, 246, 255, 0.94);
}

.file-warning span {
  display: block;
  max-width: 480px;
  margin-top: 16px;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.03em;
  color: rgba(206, 222, 250, 0.52);
}

.fatal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: radial-gradient(80% 80% at 50% 40%, #070b16 0%, #010208 70%);
  text-align: left;
}

.fatal h2 {
  margin-top: 18px;
  font-family: var(--serif-zh);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.fatal p:last-child {
  margin-top: 16px;
  max-width: 440px;
  font-size: 12px;
  line-height: 1.9;
  color: rgba(205, 222, 250, 0.5);
}

/* ------------------------------------------------------------------
   Animations
   ------------------------------------------------------------------ */

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes soft-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.intro.is-ready .eyebrow,
.intro.is-ready .title,
.intro.is-ready .lede,
.intro.is-ready .intro-main {
  animation: rise-in 1.25s var(--ease) both;
  opacity: 1;
}

.intro.is-ready .eyebrow { animation-delay: 0.15s; }
.intro.is-ready .title { animation-delay: 0.28s; }
.intro.is-ready .lede { animation-delay: 0.44s; }
.intro.is-ready .intro-main { animation-delay: 0.58s; }
.intro.is-ready .intro-footer { animation: rise-in 1.3s var(--ease) 0.9s both; opacity: 1; }

.intro.is-ready .link-state {
  animation: rise-in 0.7s var(--ease) both;
}

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

@media (max-width: 1180px) {
  .heading-tape {
    display: none;
  }
}

@media (max-width: 900px) {
  .intro {
    padding: 0 6vw;
  }

  .intro-aside {
    display: none;
  }

  .intro-footer {
    left: 6vw;
    right: 6vw;
  }

  .title-zh {
    font-size: clamp(52px, 10vw, 84px);
  }

  #hud-top {
    padding: 22px 24px;
  }

  .velocity {
    left: 24px;
    bottom: 24px;
  }

  #preview {
    right: 24px;
    bottom: 24px;
  }

  .intro-footer .coords {
    display: none;
  }
}

@media (max-width: 680px) {
  .frame {
    inset: 10px;
  }

  .intro {
    padding: 0 22px;
  }

  .intro::before {
    background:
      radial-gradient(120% 85% at 60% 36%, rgba(2, 4, 12, 0.18), rgba(2, 4, 12, 0.62) 100%),
      linear-gradient(180deg, rgba(2, 4, 12, 0.52) 0%, rgba(2, 4, 12, 0.16) 40%, rgba(2, 4, 12, 0.42) 78%, rgba(2, 4, 12, 0.74) 100%);
  }

  .intro-copy {
    max-width: 100%;
    margin-top: 0;
  }

  .eyebrow {
    font-size: 8px;
    letter-spacing: 0.24em;
  }

  .title {
    margin-top: 26px;
  }

  .title-zh {
    font-size: clamp(46px, 15vw, 68px);
    letter-spacing: 0.08em;
  }

  .title-en {
    margin-top: 16px;
    font-size: 8.5px;
    letter-spacing: 0.52em;
  }

  .lede {
    margin-top: 28px;
    font-size: 12.5px;
    max-width: 320px;
  }

  .lede em {
    font-size: 13.5px;
  }

  .intro-main {
    margin-top: 30px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    max-width: 340px;
  }

  .btn {
    justify-content: space-between;
    height: 50px;
    padding: 0 20px;
  }

  .fineprint {
    font-size: 8px;
  }

  .link-state {
    gap: 13px;
    padding: 14px;
    margin-top: 30px;
  }

  .link-sub {
    font-size: 9.5px;
  }

  .text-btn {
    font-size: 8px;
  }

  .intro-footer {
    display: none;
  }

  .intro-aside {
    display: none;
  }

  #hud-top {
    padding: 18px 18px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .brand-text span {
    font-size: 8px;
    letter-spacing: 0.22em;
  }

  .brand-text small {
    font-size: 7.5px;
  }

  .mode-chip {
    display: none;
  }

  .top-actions {
    gap: 6px;
  }

  .icon-btn {
    width: 30px;
    height: 30px;
  }

  .icon-btn svg {
    width: 17px;
    height: 17px;
  }

  .velocity {
    left: 18px;
    bottom: 20px;
    width: 192px;
  }

  .v-number {
    height: 42px;
  }

  .v-number span {
    font-size: 36px;
  }

  .v-meta {
    gap: 12px;
    font-size: 7px;
  }

  .v-gauge b {
    background-size: auto;
  }

  #preview {
    right: 18px;
    bottom: 20px;
    width: 128px;
  }

  .preview-frame {
    width: 128px;
    height: 128px;
  }

  .preview-meta {
    font-size: 5.8px;
    gap: 4px;
  }

  #hints {
    bottom: 150px;
    padding: 8px 12px;
    font-size: 7px;
    gap: 10px;
    max-width: 92vw;
    overflow: hidden;
  }

  body.mode-hand #hints {
    bottom: 172px;
  }

  body.mode-hand .toast {
    bottom: 210px;
  }

  .preview-meta {
    display: none;
  }

  .planet-label b {
    font-size: 7.5px;
    letter-spacing: 0.16em;
  }

  .planet-label .pl-meta {
    display: none;
  }

  .planet-info {
    left: 18px;
    right: 18px;
    bottom: 165px;
    width: auto;
    max-height: 46vh;
    overflow: auto;
    padding: 14px 16px 13px;
  }

  .pi-name {
    font-size: 30px;
  }

  .pi-grid {
    gap: 9px 14px;
  }

  .pi-grid dd {
    font-size: 9.5px;
  }

  .pi-desc {
    font-size: 9.5px;
  }

  #hints b {
    margin-right: 4px;
  }

  .hints-hand,
  body.mode-mouse .hints-mouse {
    gap: 10px;
  }

  .toast {
    bottom: 200px;
    font-size: 10px;
  }

  #reticle {
    width: 92px;
    height: 92px;
    margin: -46px 0 0 -46px;
  }

  #reticle svg {
    width: 92px;
    height: 92px;
  }

  .modal-card {
    padding: 34px 24px 26px;
  }

  .modal-card h2 {
    font-size: 26px;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }

  .help-grid > div {
    padding: 18px;
  }

  .help-grid p {
    font-size: 10.5px;
  }
}

@media (max-height: 680px) and (min-width: 681px) {
  .intro-copy {
    margin-top: 0;
  }

  .title-zh {
    font-size: clamp(48px, 6vw, 82px);
  }

  .lede {
    margin-top: 24px;
  }

  .intro-main {
    margin-top: 24px;
  }

  .intro-footer {
    bottom: 22px;
  }

  .intro-aside {
    display: none;
  }
}

.no-anim *,
.no-anim *::before,
.no-anim *::after {
  animation: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .intro.is-ready .eyebrow,
  .intro.is-ready .title,
  .intro.is-ready .lede,
  .intro.is-ready .intro-main,
  .intro.is-ready .intro-footer,
  .link-state,
  .link-actions,
  .modal-card {
    animation: none;
  }

  .orbit::after,
  .preview-arc {
    animation: none;
  }

  .intro.is-ready .eyebrow,
  .intro.is-ready .title,
  .intro.is-ready .lede,
  .intro.is-ready .intro-main,
  .intro.is-ready .intro-footer {
    opacity: 1;
  }
}
