:root {
  --earth-bg: #01030a;
  --earth-ink: #f3f8ff;
  --earth-muted: rgba(205, 222, 255, 0.74);
  --earth-blue: #30b8ff;
  --earth-cyan: #55f0ff;
  --earth-violet: #9d5cff;
  --earth-magenta: #ff55e8;
  --earth-panel: rgba(7, 12, 31, 0.76);
  --earth-line: rgba(119, 204, 255, 0.42);
}

html,
body.earth-page {
  min-height: 100%;
  overflow: hidden;
}

body.earth-page {
  background: #01030a;
  color: var(--earth-ink);
}

.earth-page .skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 90;
}

.earth-shell,
.earth-stage {
  min-height: 100svh;
}

.earth-shell {
  background:
    radial-gradient(circle at 18% 52%, rgba(105, 76, 255, 0.28), transparent 34%),
    radial-gradient(circle at 50% 47%, rgba(51, 178, 255, 0.2), transparent 33%),
    radial-gradient(circle at 72% 44%, rgba(255, 71, 232, 0.18), transparent 30%),
    linear-gradient(180deg, #02050e 0%, #01030a 100%);
}

.earth-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.earth-stage::before,
.earth-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.earth-stage::before {
  background:
    radial-gradient(ellipse at 9% 48%, rgba(44, 96, 255, 0.28), transparent 22%),
    radial-gradient(ellipse at 32% 48%, rgba(118, 64, 255, 0.16), transparent 18%),
    radial-gradient(circle at 21% 50%, rgba(148, 84, 255, 0.24), transparent 19%),
    radial-gradient(circle at 57% 48%, rgba(39, 191, 255, 0.16), transparent 22%),
    linear-gradient(90deg, transparent 0 46%, rgba(199, 72, 255, 0.28) 50%, transparent 54%),
    repeating-linear-gradient(90deg, transparent 0 72px, rgba(85, 240, 255, 0.035) 73px, transparent 74px);
  mix-blend-mode: screen;
}

.earth-stage::after {
  background:
    linear-gradient(90deg, rgba(1, 3, 10, 0.84), transparent 18%, transparent 78%, rgba(1, 3, 10, 0.7)),
    linear-gradient(180deg, rgba(1, 3, 10, 0.72), transparent 22%, rgba(1, 3, 10, 0.8));
}

.earth-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  cursor: grab;
  touch-action: none;
}

.earth-canvas:active {
  cursor: grabbing;
}

.earth-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.earth-scanline {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 6px);
  mix-blend-mode: screen;
  opacity: 0.18;
}

.earth-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(circle at 49% 50%, transparent 0 34%, rgba(1, 3, 10, 0.22) 52%, rgba(1, 3, 10, 0.72) 100%);
}

.earth-brand-badge,
.earth-hud,
.earth-node-panel,
.earth-status {
  position: absolute;
  z-index: 24;
  color: var(--earth-ink);
}

.earth-brand-badge {
  position: fixed;
  z-index: 44;
  left: max(10px, env(safe-area-inset-left));
  top: max(48px, env(safe-area-inset-top));
  min-width: 112px;
  height: 46px;
  display: grid;
  align-content: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.24), inset 0 0 20px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.earth-brand-badge p,
.earth-brand-badge span,
.hud-header span,
.hud-header strong,
.hud-grid dt,
.earth-node-panel > p,
.earth-status {
  margin: 0;
  font-family: "Space Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.earth-brand-badge p {
  color: rgba(244, 248, 255, 0.76);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.earth-brand-badge h1,
.earth-brand-badge span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.earth-hud {
  z-index: 22;
  right: clamp(18px, 4vw, 48px);
  top: calc(106px + env(safe-area-inset-top));
  width: min(260px, calc(100vw - 36px));
  min-height: 365px;
  padding: 26px 24px 24px;
  background:
    linear-gradient(135deg, rgba(147, 86, 255, 0.18), transparent 28%),
    linear-gradient(315deg, rgba(48, 184, 255, 0.2), transparent 30%),
    var(--earth-panel);
  border: 1px solid rgba(167, 93, 255, 0.76);
  clip-path: polygon(0 8%, 8% 0, 64% 0, 70% 4%, 90% 4%, 100% 14%, 100% 91%, 91% 100%, 9% 100%, 0 91%);
  box-shadow: 0 0 34px rgba(157, 92, 255, 0.36), inset 0 0 32px rgba(48, 184, 255, 0.12);
  backdrop-filter: blur(18px) saturate(1.2);
}

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

.earth-hud::before {
  inset: 10px;
  border: 1px solid rgba(85, 240, 255, 0.34);
  clip-path: polygon(0 8%, 8% 0, 64% 0, 70% 5%, 88% 5%, 100% 17%, 100% 91%, 91% 100%, 9% 100%, 0 91%);
}

.earth-hud::after {
  left: 28px;
  right: 28px;
  bottom: 26px;
  height: 92px;
  background:
    radial-gradient(circle at 30px 48px, transparent 0 8px, rgba(255, 85, 232, 0.95) 9px 12px, transparent 13px),
    radial-gradient(circle at 30px 48px, transparent 0 24px, rgba(85, 240, 255, 0.78) 25px 27px, transparent 28px),
    radial-gradient(circle at 30px 48px, transparent 0 36px, rgba(157, 92, 255, 0.72) 37px 40px, transparent 41px),
    repeating-linear-gradient(90deg, rgba(85, 240, 255, 0.26) 0 3px, transparent 3px 8px);
  mask-image: linear-gradient(90deg, #000 0 48%, transparent 48% 56%, #000 56%);
  opacity: 0.8;
}

.earth-hud .hud-header::after {
  content: "";
  display: block;
  height: 26px;
  margin-top: 4px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, rgba(157, 92, 255, 0.95), rgba(85, 240, 255, 0.75), transparent);
  mask-image: linear-gradient(180deg, transparent 0 22%, #000 22% 68%, transparent 68%);
}

.hud-header {
  display: grid;
  gap: 18px;
  padding: 8px 0 22px;
  border-bottom: 1px solid rgba(157, 92, 255, 0.55);
}

.hud-header span {
  max-width: 150px;
  color: var(--earth-ink);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 21px;
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: 0;
}

.hud-header strong {
  color: #f9fbff;
  font-size: 10px;
}

.hud-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 24px 0 0;
  border-top: 1px solid rgba(85, 240, 255, 0.18);
}

.hud-grid::after {
  content: "";
  grid-column: 1 / -1;
  height: 58px;
  margin-top: 8px;
  background:
    radial-gradient(circle at 86% 38%, rgba(85, 240, 255, 0.8) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 60%, rgba(157, 92, 255, 0.7) 0 2px, transparent 3px),
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(85, 240, 255, 0.3) 7px 10px),
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(157, 92, 255, 0.26) 7px 10px);
  opacity: 0.44;
}

.hud-grid div {
  min-height: 46px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(157, 92, 255, 0.34);
}

.hud-grid div:nth-child(odd) {
  border-right: 1px solid rgba(157, 92, 255, 0.28);
}

.hud-grid dt {
  color: rgba(242, 246, 255, 0.88);
  font-size: 10px;
  line-height: 1.25;
}

.hud-grid dd {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.earth-node-panel {
  z-index: 25;
  left: var(--node-x, 52%);
  top: var(--node-y, 44%);
  width: min(292px, calc(100vw - 34px));
  padding: 26px 22px 18px;
  transform: translate(0, -44%);
  border: 1px solid rgba(85, 240, 255, 0.7);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(157, 92, 255, 0.84), rgba(31, 100, 196, 0.78) 62%, rgba(10, 33, 78, 0.9)),
    rgba(10, 18, 43, 0.9);
  box-shadow: 0 0 42px rgba(157, 92, 255, 0.48), inset 0 0 24px rgba(85, 240, 255, 0.18);
  backdrop-filter: blur(16px) saturate(1.25);
}

.earth-node-panel::before {
  content: "";
  position: absolute;
  left: -44px;
  top: 50%;
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 85, 232, 0.1), rgba(255, 85, 232, 0.95));
  box-shadow: 0 0 16px rgba(255, 85, 232, 0.8);
}

.earth-node-panel[hidden] {
  display: none;
}

.node-close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--earth-ink);
  cursor: pointer;
}

.node-close:focus-visible {
  outline: 2px solid var(--earth-cyan);
  outline-offset: 3px;
}

.earth-node-panel > p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
}

.earth-node-panel h2 {
  margin: 9px 36px 4px 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.18;
  letter-spacing: 0;
}

.earth-node-panel span {
  display: block;
  color: rgba(213, 240, 255, 0.84);
  font-family: "Space Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.earth-node-panel p[data-earth-node-description] {
  margin: 10px 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
}

.earth-node-panel ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.earth-node-panel li {
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
}

.earth-node-panel li + li::before {
  content: "/";
  margin-right: 6px;
  color: rgba(85, 240, 255, 0.76);
}

.earth-status {
  z-index: 22;
  right: clamp(18px, 4vw, 48px);
  bottom: max(20px, env(safe-area-inset-bottom));
  padding: 9px 16px;
  border: 1px solid rgba(85, 240, 255, 0.46);
  border-radius: 999px;
  background: rgba(7, 12, 31, 0.62);
  color: rgba(226, 241, 255, 0.82);
  box-shadow: 0 0 20px rgba(48, 184, 255, 0.22);
}

.earth-page .wb-nav {
  top: 0;
  z-index: 20;
  width: 100%;
  min-height: 28px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(170, 210, 255, 0.2);
  background: rgba(1, 3, 10, 0.36);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.earth-page .wb-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 40%;
  width: 26%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(85, 240, 255, 0.58), transparent);
}

.earth-page .wb-nav-inner {
  width: min(940px, calc(100% - 24px));
  min-height: 28px;
  margin-left: auto;
  margin-right: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}

.earth-page .wb-brand {
  display: none;
}

.earth-page .wb-nav-links {
  gap: 0;
}

.earth-page .wb-nav-links a {
  min-height: 28px;
  padding: 0 24px;
  border-radius: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(246, 250, 255, 0.86);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.earth-page .wb-nav-links a::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 9px;
  width: 1px;
  height: 10px;
  background: rgba(255, 255, 255, 0.42);
}

.earth-page .wb-nav-links a.active {
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--earth-magenta), 0 6px 16px rgba(157, 92, 255, 0.36);
}

.earth-page .nav-icon {
  display: none;
}

.earth-page .wb-nav-theme {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #fff;
}

.earth-page .vision-footer,
.earth-footer {
  display: none !important;
}

@media (max-width: 900px) {
  html,
  body.earth-page {
    overflow-y: auto;
  }

  .earth-stage {
    min-height: 100svh;
  }

  .earth-brand-badge {
    top: calc(74px + env(safe-area-inset-top));
    height: 38px;
  }

  .earth-brand-badge p {
    font-size: 18px;
  }

  .earth-hud {
    top: auto;
    right: 14px;
    left: 14px;
    bottom: calc(22px + env(safe-area-inset-bottom));
    width: auto;
    min-height: 168px;
    padding: 18px;
    clip-path: polygon(0 10%, 8% 0, 88% 0, 100% 18%, 100% 92%, 92% 100%, 0 100%);
  }

  .earth-hud::after {
    display: none;
  }

  .hud-header {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
  }

  .hud-header span {
    font-size: 13px;
    letter-spacing: 0.12em;
  }

  .hud-grid {
    margin-top: 12px;
  }

  .earth-node-panel {
    left: 14px !important;
    right: 14px;
    top: auto !important;
    bottom: calc(214px + env(safe-area-inset-bottom));
    width: auto;
    max-height: 28svh;
    overflow: auto;
    transform: none;
  }

  .earth-node-panel::before {
    display: none;
  }

  .earth-status {
    display: none;
  }

  .earth-page .wb-nav {
    top: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    min-height: 58px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(239, 244, 250, 0.9);
  }

  .earth-page .wb-nav-inner {
    width: 100%;
    min-height: 58px;
    margin: 0;
    justify-content: space-between;
  }

  .earth-page .wb-brand {
    display: inline-flex;
  }

  .earth-page .wb-nav-links,
  .earth-page .wb-nav-theme {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .earth-scanline {
    opacity: 0.1;
  }
}
