/* 玩家星途 · 鸟瞰全图 */

.sj-page {
  --sj-gold: #f5c878;
  --sj-rose: #f090a8;
  --sj-jade: #7ed99a;
  --sj-azure: #72c8ff;
  --sj-violet: #b094ff;
  --sj-amber: #f0b050;
  --sj-moon: #d8eeff;
  --sj-bg: #161022;
  --sj-ink: rgba(22, 16, 34, 0.92);
  --sj-text: #fff8f2;
  --sj-muted: rgba(255, 244, 236, 0.72);
  --sj-vvh: 100dvh;
  min-height: var(--sj-vvh);
  background:
    radial-gradient(ellipse 120% 85% at 50% -8%, rgba(176, 148, 255, 0.28), transparent 58%),
    radial-gradient(ellipse 85% 60% at 0% 100%, rgba(245, 200, 120, 0.16), transparent 52%),
    radial-gradient(ellipse 75% 55% at 100% 8%, rgba(240, 144, 168, 0.12), transparent 48%),
    linear-gradient(180deg, #221836 0%, #161022 55%, #120e1a 100%);
  color: var(--sj-text);
  font-family: 'Noto Serif SC', 'PingFang SC', serif;
  overflow: hidden;
}

.sj-page .hub-bg__orb--1 {
  background: radial-gradient(circle, rgba(176, 148, 255, 0.32), transparent 68%);
}

.sj-page .hub-bg__orb--2 {
  background: radial-gradient(circle, rgba(245, 200, 120, 0.24), transparent 68%);
}

.sj-app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: var(--sj-vvh);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .sj-app {
    max-width: none;
  }
}

.sj-loading {
  text-align: center;
  padding: 48px 16px;
  color: var(--sj-muted);
}

/* Header */
.sj-head {
  flex-shrink: 0;
  padding: 10px 14px 6px;
  padding-top: max(10px, env(safe-area-inset-top));
}

.sj-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--sj-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.sj-back:hover {
  color: var(--sj-gold);
}

.sj-head__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.sj-head__title {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 400;
  margin: 0;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff5e8, var(--sj-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sj-head__sub {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--sj-muted);
  letter-spacing: 0.06em;
}

.sj-head__stats {
  text-align: right;
  font-size: 0.72rem;
  color: var(--sj-muted);
  line-height: 1.45;
}

.sj-head__stats strong {
  display: block;
  font-size: 0.95rem;
  color: var(--sj-gold);
  font-weight: 600;
}

/* Toolbar */
.sj-toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 8px;
  flex-wrap: wrap;
}

.sj-hint {
  flex: 1;
  min-width: 140px;
  font-size: 0.72rem;
  color: var(--sj-muted);
}

.sj-hint.is-focus {
  color: var(--sj-rose);
}

.sj-zoom {
  display: flex;
  gap: 4px;
}

.sj-zoom__btn,
.sj-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: var(--sj-text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
}

.sj-zoom__btn:hover,
.sj-btn:hover {
  border-color: var(--sj-gold);
  color: var(--sj-gold);
}

.sj-btn--primary {
  border-color: rgba(240, 184, 106, 0.45);
  background: rgba(240, 184, 106, 0.12);
  color: var(--sj-gold);
}

/* Stage · 明亮星空底，暖色光晕 */
.sj-stage-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  margin: 0 8px;
  border-radius: 16px;
  border: 1px solid rgba(245, 200, 120, 0.28);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(120, 80, 150, 0.38), rgba(36, 26, 54, 0.82)),
    radial-gradient(ellipse at 18% 88%, rgba(245, 200, 120, 0.14), transparent 46%),
    radial-gradient(ellipse at 88% 14%, rgba(176, 148, 255, 0.12), transparent 42%),
    linear-gradient(165deg, rgba(48, 34, 68, 0.72), rgba(28, 20, 42, 0.88));
  box-shadow:
    inset 0 0 36px rgba(176, 148, 255, 0.1),
    inset 0 0 20px rgba(245, 200, 120, 0.08),
    0 8px 28px rgba(0, 0, 0, 0.2);
}

.sj-stage-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.65;
  background:
    radial-gradient(ellipse 70% 50% at 50% 46%, rgba(255, 248, 236, 0.08) 0%, transparent 58%),
    radial-gradient(ellipse 92% 68% at 50% 50%, transparent 62%, rgba(36, 26, 52, 0.1) 100%);
  border-radius: inherit;
}

.sj-stage {
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

.sj-stage-wrap.is-zoom-only,
.sj-stage-wrap.is-zoom-only .sj-stage {
  cursor: default;
}

.sj-stage-wrap.is-zoom-only .sj-stage {
  touch-action: pinch-zoom;
}

.sj-stage.is-dragging {
  cursor: grabbing;
}

.sj-canvas {
  transform-origin: 0 0;
  will-change: transform;
  shape-rendering: geometricPrecision;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

.sj-canvas__bg {
  pointer-events: none;
  opacity: 0.82;
  mix-blend-mode: normal;
  filter: saturate(1.18) contrast(1.02) brightness(1.2);
}

.sj-canvas__wash {
  pointer-events: none;
  opacity: 0.32;
}

.sj-district {
  fill: rgba(176, 148, 255, 0.1);
  stroke-width: 1.2;
  opacity: 0.62;
  transition: opacity 0.35s ease, stroke-width 0.35s ease, fill 0.35s ease;
}

.sj-district__glyph {
  fill: rgba(245, 200, 120, 0.38);
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 28px;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  opacity: 0.55;
}

.sj-district__label {
  fill: rgba(245, 230, 236, 0.62);
  font-size: 11px;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  letter-spacing: 0.18em;
  pointer-events: none;
}

.sj-page.is-focus .sj-district {
  opacity: 0.18;
}

.sj-page.is-focus .sj-district.is-lit {
  opacity: 0.75;
  stroke-width: 2;
}

.sj-link {
  fill: none;
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.4s ease, stroke-width 0.3s ease;
}

.sj-page.is-focus .sj-link.is-lit {
  opacity: 0.85;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 6px currentColor);
}

.sj-link--cp { stroke: var(--sj-rose); }
.sj-link--sworn { stroke: var(--sj-jade); }
.sj-link--team { stroke: var(--sj-azure); }
.sj-link--class { stroke: var(--sj-violet); }
.sj-link--guild { stroke: var(--sj-amber); }
.sj-link--player { stroke: var(--sj-moon); opacity: 0.35; }

/* Nodes */
.sj-node {
  cursor: pointer;
  transition: opacity 0.35s ease;
}

.sj-page.is-focus .sj-node:not(.is-me):not(.is-lit) {
  opacity: 0.22;
}

.sj-node__ring {
  fill: rgba(0, 0, 0, 0.5);
  stroke-width: 2;
  transition: stroke-width 0.25s ease, filter 0.25s ease;
}

.sj-node--moon .sj-node__ring { stroke: var(--sj-moon); }
.sj-node--gold .sj-node__ring { stroke: var(--sj-gold); }
.sj-node--rose .sj-node__ring { stroke: var(--sj-rose); }
.sj-node--jade .sj-node__ring { stroke: var(--sj-jade); }
.sj-node--azure .sj-node__ring { stroke: var(--sj-azure); }
.sj-node--violet .sj-node__ring { stroke: var(--sj-violet); }
.sj-node--amber .sj-node__ring { stroke: var(--sj-amber); }

.sj-node.is-me .sj-node__ring {
  stroke: var(--sj-gold);
  stroke-width: 3;
}

.sj-node.is-me.sj-node--hl-radiant .sj-node__ring {
  filter: drop-shadow(0 0 14px rgba(240, 184, 106, 0.85));
}

.sj-node.is-me.sj-node--hl-equipped .sj-node__ring {
  filter: drop-shadow(0 0 8px rgba(240, 184, 106, 0.45));
  stroke-width: 2.5;
}

.sj-node.is-me.sj-node--hl-basic .sj-node__ring,
.sj-node.is-me.sj-node--hl-none .sj-node__ring {
  stroke: rgba(240, 184, 106, 0.45);
  stroke-width: 2;
  filter: none;
}

.sj-node.is-me.sj-node--hl-basic .sj-node__name,
.sj-node.is-me.sj-node--hl-none .sj-node__name {
  fill: rgba(240, 184, 106, 0.72);
  font-weight: 500;
}

.sj-node.is-me.sj-node--hl-radiant .sj-node__pulse {
  animation: sj-pulse 2s ease-in-out infinite;
}

.sj-node.is-me.sj-node--hl-equipped .sj-node__pulse--soft {
  animation: sj-pulse-soft 2.8s ease-in-out infinite;
}

@keyframes sj-pulse {
  0%, 100% { r: 36; opacity: 0.35; }
  50% { r: 48; opacity: 0.08; }
}

@keyframes sj-pulse-soft {
  0%, 100% { opacity: 0.22; }
  50% { opacity: 0.06; }
}

.sj-node.is-me .sj-node__pulse {
  /* 仅 radiant / equipped 节点会渲染 pulse 元素 */
}

.sj-node__pulse {
  fill: none;
  stroke: var(--sj-gold);
  stroke-width: 1.5;
  opacity: 0.25;
}

.sj-node--hl-showcase:not(.is-me) .sj-node__ring {
  stroke-dasharray: 4 3;
  opacity: 0.85;
}

.sj-node--hl-radiant:not(.is-me) .sj-node__ring {
  filter: drop-shadow(0 0 6px rgba(200, 230, 255, 0.35));
}

.sj-node__peer-glow {
  fill: none;
  stroke: rgba(200, 230, 255, 0.35);
  stroke-width: 1;
  opacity: 0.5;
}

.sj-node__clip img,
.sj-node image {
  pointer-events: none;
  image-rendering: auto;
}

.sj-node__emoji {
  font-size: 22px;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.sj-node__name {
  fill: rgba(245, 230, 236, 0.88);
  font-size: 10px;
  font-family: 'Noto Serif SC', serif;
  text-anchor: middle;
  pointer-events: none;
}

/* 头像下铭牌 · foreignObject（双行 5+5 字，碰撞避让） */
.sj-node__label-fo {
  overflow: visible;
  pointer-events: none;
  transition: opacity 0.16s ease, visibility 0.16s ease;
}

.sj-node__label-fo.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.sj-node__label-leader {
  stroke: rgba(245, 230, 236, 0.32);
  stroke-width: 1;
  stroke-dasharray: 2.5 2.5;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.sj-node__label-leader.is-hidden {
  opacity: 0;
}

.sj-node__label-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  padding: 1px 5px 2px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(8, 6, 14, 0.78), rgba(8, 6, 14, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  box-sizing: border-box;
  transform-origin: center top;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.sj-node__label-line {
  display: block;
  width: 100%;
  font-family: 'Noto Serif SC', serif;
  font-size: 9.5px;
  line-height: 1.22;
  letter-spacing: 0.02em;
  color: rgba(245, 235, 248, 0.92);
  text-align: center;
  white-space: nowrap;
}

.sj-node__label-sub {
  display: block;
  width: 100%;
  margin-top: 1px;
  font-size: 7.5px;
  line-height: 1.15;
  color: rgba(200, 180, 220, 0.72);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sj-node__label-pill.is-me {
  border-color: rgba(240, 184, 106, 0.42);
  background: linear-gradient(180deg, rgba(28, 18, 8, 0.88), rgba(12, 8, 4, 0.72));
}

.sj-node__label-pill.is-me .sj-node__label-line {
  color: #ffe8b8;
  font-weight: 600;
  font-size: 10px;
}

.sj-node__label-pill.is-glow {
  border-color: rgba(240, 184, 106, 0.35);
  box-shadow: 0 0 10px rgba(240, 184, 106, 0.18);
}

.sj-node__label-pill.is-compact {
  opacity: 0.82;
}

.sj-node__label-pill.is-compact .sj-node__label-line {
  font-size: 9px;
}

.sj-node__label-pill--cp-side {
  padding: 1px 3px;
  border-radius: 5px;
}

.sj-node__label-pill--cp-side .sj-node__label-line {
  font-size: 8.5px;
}

.sj-node__label-pill.is-offset {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.42);
}

.sj-node:hover .sj-node__label-pill,
.sj-node.is-hover .sj-node__label-pill,
.sj-node.is-lit .sj-node__label-pill,
.sj-node.is-focused .sj-node__label-pill,
.sj-node.is-me .sj-node__label-pill {
  opacity: 1;
}

.sj-node.is-focused .sj-node__label-pill,
.sj-node.is-hover .sj-node__label-pill {
  transform: scale(1.05);
  border-color: rgba(240, 184, 106, 0.48);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.sj-node:hover .sj-node__label-pill,
.sj-node.is-lit .sj-node__label-pill,
.sj-node.is-me .sj-node__label-pill {
  opacity: 1;
  z-index: 2;
}

.sj-node.is-me .sj-node__name {
  fill: var(--sj-gold);
  font-weight: 600;
  font-size: 11px;
}

.sj-node__class {
  fill: rgba(200, 180, 220, 0.72);
  font-size: 8px;
  font-family: 'Noto Serif SC', serif;
  text-anchor: middle;
  pointer-events: none;
}

.sj-demo-players {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
}

.sj-demo-players__label {
  font-size: 11px;
  color: rgba(245, 230, 236, 0.55);
}

.sj-demo-chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 95, 0.35);
  color: var(--sj-gold);
  font-size: 11px;
  text-decoration: none;
}

.sj-demo-chip:hover {
  background: rgba(212, 175, 95, 0.12);
}

.sj-tour {
  position: relative;
  z-index: 4;
  margin: 0 12px 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(155, 123, 255, 0.35);
  background: linear-gradient(135deg, rgba(30, 22, 48, 0.92), rgba(12, 16, 28, 0.95));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.sj-tour__title {
  margin: 0 0 8px;
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 1.1rem;
  color: var(--sj-gold);
}

.sj-tour__steps {
  margin: 0 0 10px;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--sj-muted);
}

.sj-tour__steps strong {
  color: var(--sj-text);
}

.sj-tour__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Sidebar */
.sj-side {
  position: absolute;
  top: 12px;
  right: 12px;
  width: min(220px, 42vw);
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 6, 14, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  pointer-events: none;
  z-index: 5;
}

.sj-page.is-focus .sj-side {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.sj-side__kicker {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--sj-rose);
  margin: 0 0 6px;
}

.sj-side__title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
}

.sj-side__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sj-side__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.sj-side__item.is-lit {
  background: rgba(240, 184, 106, 0.1);
  border: 1px solid rgba(240, 184, 106, 0.25);
}

.sj-side__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sj-side__dot--cp { background: var(--sj-rose); }
.sj-side__dot--sworn { background: var(--sj-jade); }
.sj-side__dot--team { background: var(--sj-azure); }
.sj-side__dot--class { background: var(--sj-violet); }
.sj-side__dot--guild { background: var(--sj-amber); }
.sj-side__dot--player { background: var(--sj-moon); }

.sj-side__actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Footer legend */
.sj-foot {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px 14px 14px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  font-size: 0.68rem;
  color: var(--sj-muted);
}

.sj-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sj-legend__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* L2 Modal */
.sj-l2 {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.sj-l2.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sj-l2__sheet {
  width: min(420px, 100%);
  max-height: 92vh;
  max-height: 92dvh;
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(240, 184, 106, 0.25);
  background: linear-gradient(180deg, #1a0e22 0%, #0a0608 100%);
  padding: 16px 16px max(20px, env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
}

.sj-l2.is-open .sj-l2__sheet {
  transform: translateY(0);
}

.sj-l2__close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  color: var(--sj-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.sj-l2__hero {
  text-align: center;
  padding: 8px 0 16px;
}

.sj-l2__avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid var(--sj-gold);
  box-shadow: 0 0 24px rgba(240, 184, 106, 0.45);
  object-fit: cover;
}

.sj-l2__name {
  margin: 10px 0 4px;
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 1.5rem;
  color: var(--sj-gold);
}

.sj-l2__meta {
  font-size: 0.78rem;
  color: var(--sj-muted);
}

.sj-l2__rings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.sj-l2__aspect {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.72rem;
  cursor: pointer;
}

.sj-l2__aspect:hover {
  border-color: rgba(240, 184, 106, 0.35);
}

.sj-l2__aspect span:first-child {
  font-size: 1.2rem;
}

.sj-l2__link {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: var(--sj-gold);
  font-size: 0.82rem;
  text-decoration: none;
}

@media (min-width: 900px) {
  .sj-stage-wrap {
    margin: 0 14px;
  }

  .sj-side {
    width: 240px;
  }
}

.sj-node--placeholder .sj-node__ring {
  stroke-dasharray: 4 3;
  opacity: 0.75;
}

.sj-node__initial {
  fill: var(--sj-muted);
  font-size: 14px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
}

.sj-link--pending {
  stroke-dasharray: 6 5;
  opacity: 0.55;
}

.sj-empty-banner {
  margin: 0 14px 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(155, 123, 255, 0.12);
  border: 1px solid rgba(155, 123, 255, 0.28);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.sj-empty-banner p {
  margin: 0;
  flex: 1;
  min-width: 12rem;
  color: var(--sj-muted);
}

.sj-map-status {
  margin: 0 14px 8px;
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  border: 1px solid rgba(240, 184, 106, 0.22);
  background: linear-gradient(135deg, rgba(240, 184, 106, 0.08), rgba(12, 8, 18, 0.6));
}

.sj-map-status--none {
  border-color: rgba(155, 123, 255, 0.28);
  background: rgba(155, 123, 255, 0.1);
}

.sj-map-status--basic {
  border-color: rgba(200, 180, 220, 0.25);
}

.sj-map-status--equipped {
  border-color: rgba(240, 184, 106, 0.35);
}

.sj-map-status__glyph {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 1.35rem;
  color: var(--sj-gold);
  line-height: 1;
}

.sj-map-status p {
  margin: 0;
  flex: 1;
  min-width: 10rem;
  color: var(--sj-muted);
}

.sj-btn--compact {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.sj-brief__upgrade {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--sj-gold);
  background: rgba(240, 184, 106, 0.08);
  border: 1px dashed rgba(240, 184, 106, 0.28);
}

.sj-stage-wrap.is-panning {
  cursor: grabbing;
}

.sj-l2__aspect.is-lit {
  border-color: var(--sj-gold);
  box-shadow: 0 0 10px rgba(240, 184, 106, 0.25);
}

.sj-l2__aspect.is-lit span:first-child {
  color: var(--sj-gold);
}

.sj-l2__aspect.is-active {
  outline: 2px solid rgba(240, 184, 106, 0.55);
  outline-offset: 2px;
}

.sj-l2__detail {
  margin: 0.75rem 0 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(8, 10, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 4.5rem;
}

.sj-l2__detail-empty {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.7;
  text-align: center;
}

.sj-l2__detail-head {
  margin-bottom: 0.45rem;
}

.sj-l2__detail-head strong {
  display: block;
  font-size: 0.92rem;
}

.sj-l2__detail-state {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  opacity: 0.85;
}

.sj-l2__detail-state--dim {
  opacity: 0.65;
}

.sj-l2__detail-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.sj-l2__detail-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sj-l2__detail-note {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  opacity: 0.9;
}

.sj-zone-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.sj-zone-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  text-decoration: none;
  color: var(--sj-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 10, 18, 0.35);
}

.sj-zone-chip.is-active {
  color: var(--sj-gold);
  border-color: rgba(240, 184, 106, 0.45);
  background: rgba(240, 184, 106, 0.1);
}

.sj-views {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0;
}

.sj-view-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 14, 22, 0.55);
  color: var(--sj-muted);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: none;
}

.sj-view-chip__glyph {
  font-family: 'Ma Shan Zheng', cursive;
  color: rgba(240, 184, 106, 0.75);
  font-size: 0.95rem;
  line-height: 1;
}

.sj-view-chip.is-active {
  color: var(--sj-gold);
  border-color: rgba(240, 184, 106, 0.4);
}

/* 星图视角 · 精美下拉 */
.sj-map-select {
  position: relative;
  z-index: 16;
}

.sj-stage-wrap > .sj-map-select {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  max-width: min(240px, calc(100% - 20px));
}

.sj-map-select__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 168px;
  padding: 8px 12px 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(240, 184, 106, 0.35);
  background: linear-gradient(145deg, rgba(18, 14, 28, 0.92), rgba(8, 10, 18, 0.88));
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 240, 210, 0.08);
  backdrop-filter: blur(10px);
  color: rgba(248, 244, 238, 0.95);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.sj-map-select__trigger:hover,
.sj-map-select__trigger:focus-visible {
  border-color: var(--sj-gold);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.sj-map-select__trigger--gold { border-color: rgba(240, 184, 106, 0.42); }
.sj-map-select__trigger--moon { border-color: rgba(176, 196, 255, 0.32); }
.sj-map-select__trigger--amber { border-color: rgba(245, 180, 90, 0.34); }
.sj-map-select__trigger--rose { border-color: rgba(255, 140, 170, 0.34); }
.sj-map-select__trigger--azure { border-color: rgba(120, 190, 255, 0.34); }
.sj-map-select__trigger--jade { border-color: rgba(120, 210, 170, 0.34); }
.sj-map-select__trigger--violet { border-color: rgba(190, 150, 255, 0.34); }

.sj-map-select__glyph {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 1.15rem;
  color: #fff8ec;
  background: rgba(240, 184, 106, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sj-map-select__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sj-map-select__label {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sj-map-select__sub {
  font-size: 0.64rem;
  color: rgba(232, 240, 255, 0.55);
  letter-spacing: 0.06em;
}

.sj-map-select__chev {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  opacity: 0.72;
}

.sj-map-select__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 220px;
  max-height: min(52vh, 360px);
  overflow: auto;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(240, 184, 106, 0.28);
  background: linear-gradient(165deg, rgba(16, 12, 24, 0.98), rgba(6, 4, 12, 0.96));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
}

.sj-map-select__menu[hidden] {
  display: none !important;
}

.sj-map-select__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: rgba(240, 244, 255, 0.92);
  cursor: pointer;
  text-align: left;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.sj-map-select__item:hover,
.sj-map-select__item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.sj-map-select__item.is-active {
  background: rgba(240, 184, 106, 0.12);
  border-color: rgba(240, 184, 106, 0.32);
}

.sj-map-select__item-glyph {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 1.05rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sj-map-select__item--gold .sj-map-select__item-glyph { color: #ffe8b8; background: rgba(120, 90, 20, 0.35); }
.sj-map-select__item--moon .sj-map-select__item-glyph { color: #dfe8ff; background: rgba(40, 56, 110, 0.35); }
.sj-map-select__item--amber .sj-map-select__item-glyph { color: #ffe0b0; background: rgba(110, 70, 20, 0.35); }
.sj-map-select__item--rose .sj-map-select__item-glyph { color: #ffd0e0; background: rgba(110, 40, 60, 0.35); }
.sj-map-select__item--azure .sj-map-select__item-glyph { color: #cce8ff; background: rgba(30, 70, 120, 0.35); }
.sj-map-select__item--jade .sj-map-select__item-glyph { color: #c8ffe8; background: rgba(30, 90, 70, 0.35); }
.sj-map-select__item--violet .sj-map-select__item-glyph { color: #ead8ff; background: rgba(70, 40, 110, 0.35); }

.sj-map-select__item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sj-map-select__item-label {
  font-size: 0.82rem;
  font-weight: 650;
}

.sj-map-select__item-desc {
  font-size: 0.68rem;
  color: rgba(232, 240, 255, 0.52);
  line-height: 1.3;
}

body.sj-mobile .sj-stage-wrap > .sj-map-select {
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  max-width: min(210px, calc(100% - 56px));
}

body.sj-mobile .sj-map-select__trigger {
  min-width: 0;
  padding: 7px 10px 7px 8px;
}

body.sj-mobile .sj-map-select__label {
  font-size: 0.8rem;
}

.sj-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.sj-district.is-dimmed {
  opacity: 0.22;
}

.sj-district.is-focus {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(240, 184, 106, 0.35));
}

@media (max-width: 480px) {
  .sj-side {
    top: auto;
    bottom: 8px;
    right: 8px;
    left: 8px;
    width: auto;
  }
}

/* 顶栏双链 */
.sj-head__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 4px;
}

.sj-back--sub {
  opacity: 0.75;
}

/* 横屏全屏 · 手机（不再遮挡竖屏，仅作可选提示样式保留） */
.sj-rotate-hint {
  display: none !important;
}

.sj-rotate-hint[hidden] {
  display: none !important;
}

.sj-rotate-hint__inner {
  max-width: 280px;
}

.sj-rotate-hint__icon {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.sj-rotate-hint__sub {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--sj-muted);
  line-height: 1.5;
}

/* 手机 · 直接全屏展示星图，默认近景高清 */
body.sj-mobile .sj-app {
  max-width: none;
  width: 100vw;
  height: 100dvh;
}

body.sj-mobile .sj-head {
  padding: max(6px, env(safe-area-inset-top)) 10px 4px;
}

body.sj-mobile .sj-chrome,
body.sj-mobile .sj-chrome--galaxy {
  display: flex !important;
}

body.sj-mobile .sj-immersive-hide {
  display: none !important;
}

body.sj-mobile .sj-stage-wrap,
body.sj-mobile .sj-stage-wrap--galaxy {
  flex: 1;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

body.sj-mobile:not(.sj-landscape-mobile):not(.sj-browser-fullscreen) .sj-stage-wrap,
body.sj-mobile:not(.sj-landscape-mobile):not(.sj-browser-fullscreen) .sj-stage-wrap--galaxy {
  min-height: calc(100dvh - 88px);
}

body.sj-mobile:not(.sj-landscape-mobile):not(.sj-browser-fullscreen) .sj-stage-wrap::before {
  opacity: 0.55;
}

body.sj-mobile:not(.sj-landscape-mobile):not(.sj-browser-fullscreen) .sj-canvas__bg {
  opacity: 0.78;
}

body.sj-mobile .sj-toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 6px;
  flex-wrap: nowrap;
}

body.sj-mobile .sj-hint,
body.sj-mobile .sj-views,
body.sj-mobile .sj-demo-players,
body.sj-mobile .sj-demo-tour,
body.sj-mobile .sj-foot {
  display: none !important;
}

body.sj-mobile .sj-galaxy-toolbar {
  display: flex !important;
  flex-shrink: 0;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 6px;
}

body.sj-mobile .sj-galaxy-toolbar .sj-hint {
  display: none;
}

body.sj-mobile .sj-galaxy-toolbar .sj-zoom {
  margin-left: auto;
}

body.sj-mobile .sj-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

body.sj-mobile .sj-zoom__btn,
body.sj-mobile .sj-btn {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

body.sj-mobile .sj-node__label-line {
  font-size: 10.5px;
}

body.sj-mobile .sj-node__label-pill.is-me .sj-node__label-line {
  font-size: 11px;
}

body.sj-mobile .sj-node__name {
  font-size: 12px;
}

body.sj-mobile .sj-node.is-me .sj-node__name {
  font-size: 13px;
}

body.sj-mobile .sj-node__class {
  font-size: 9px;
}

body.sj-mobile .sj-stage,
body.sj-mobile .sj-stage-wrap.is-zoom-only .sj-stage {
  touch-action: none;
  cursor: grab;
}

body.sj-mobile .sj-stage.is-dragging,
body.sj-mobile .sj-stage-wrap.is-panning .sj-stage {
  cursor: grabbing;
}

/* 手机横屏 · 左侧竖条（返回/搜索/缩放/全屏），星图占满剩余区域 */
body.sj-landscape-mobile .sj-app {
  flex-direction: row;
  align-items: stretch;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body.sj-landscape-mobile .sj-side-dock {
  flex-shrink: 0;
  width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding:
    max(4px, env(safe-area-inset-top))
    4px
    max(4px, env(safe-area-inset-bottom))
    max(4px, env(safe-area-inset-left));
  background: rgba(6, 4, 10, 0.72);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(240, 184, 106, 0.14);
  z-index: 3;
}

body.sj-landscape-mobile .sj-head {
  padding: 0;
  width: 100%;
  background: none !important;
}

body.sj-landscape-mobile .sj-chrome,
body.sj-landscape-mobile .sj-chrome--galaxy {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  padding: 0;
}

body.sj-landscape-mobile .sj-chrome__stats {
  display: none !important;
}

body.sj-landscape-mobile .sj-map-status,
body.sj-landscape-mobile .sj-empty-banner {
  display: none !important;
}

body.sj-landscape-mobile .sj-galaxy-toolbar,
body.sj-landscape-mobile .sj-toolbar {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  width: 100%;
  flex-shrink: 0;
}

body.sj-landscape-mobile .sj-galaxy-toolbar .sj-zoom,
body.sj-landscape-mobile .sj-toolbar__actions {
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
  width: 100%;
}

body.sj-landscape-mobile .sj-toolbar__actions .sj-btn {
  display: none;
}

body.sj-landscape-mobile .sj-zoom {
  flex-direction: column;
  gap: 4px;
}

body.sj-landscape-mobile .sj-zoom__btn {
  width: 40px;
  min-width: 40px;
  padding: 0;
}

body.sj-landscape-mobile .sj-stage-wrap,
body.sj-landscape-mobile .sj-stage-wrap--galaxy,
body.sj-browser-fullscreen .sj-stage-wrap,
body.sj-browser-fullscreen .sj-stage-wrap--galaxy {
  flex: 1;
  min-height: 0 !important;
  height: auto;
  align-self: stretch;
  margin: 0;
  border-radius: 0;
  border: none;
}

body.sj-browser-fullscreen .sj-page {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

body.sj-browser-fullscreen .sj-stage,
body.sj-landscape-mobile .sj-stage {
  height: 100%;
  min-height: 0;
}

body.sj-landscape-mobile.sj-landscape-ready.sj-immersive .sj-head {
  background: none !important;
  padding: 0;
}

body.sj-landscape-mobile.sj-landscape-ready.sj-immersive .sj-immersive-hide.sj-toolbar,
body.sj-landscape-mobile.sj-landscape-ready.sj-immersive .sj-immersive-hide.sj-galaxy-toolbar {
  display: flex !important;
}

.sj-icon-btn--fs {
  display: none;
}

body.sj-landscape-mobile .sj-icon-btn--fs {
  display: inline-flex;
}

body.sj-landscape-mobile:not(.sj-browser-fullscreen):not(.sj-standalone) .sj-icon-btn--fs {
  animation: sj-fs-pulse 2.4s ease-in-out infinite;
  border-color: rgba(240, 184, 106, 0.85);
  box-shadow: 0 0 16px rgba(240, 184, 106, 0.35);
}

@keyframes sj-fs-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

body.sj-browser-fullscreen .sj-side-dock,
body.sj-standalone .sj-side-dock {
  background: rgba(6, 4, 10, 0.88);
}

body.sj-browser-fullscreen .sj-chrome-hint,
body.sj-standalone .sj-chrome-hint {
  display: none !important;
}

/* 横屏/全屏 · 与全局明亮底一致，仅略增对比 */
body.sj-landscape-mobile .sj-stage-wrap,
body.sj-landscape-mobile .sj-stage-wrap--galaxy,
body.sj-browser-fullscreen .sj-stage-wrap,
body.sj-browser-fullscreen .sj-stage-wrap--galaxy {
  box-shadow:
    inset 0 0 32px rgba(176, 148, 255, 0.12),
    inset 0 0 16px rgba(245, 200, 120, 0.1);
}

body.sj-mobile .sj-stage-wrap::before,
body.sj-landscape-mobile .sj-stage-wrap::before,
body.sj-browser-fullscreen .sj-stage-wrap::before {
  opacity: 0.45;
}

body.sj-mobile .sj-canvas__bg,
body.sj-landscape-mobile .sj-canvas__bg,
body.sj-browser-fullscreen .sj-canvas__bg {
  opacity: 0.88;
  filter: saturate(1.2) contrast(1.02) brightness(1.22);
}

body.sj-landscape-mobile .sj-canvas__wash--galaxy,
body.sj-browser-fullscreen .sj-canvas__wash--galaxy {
  opacity: 0.3;
}

body.sj-landscape-mobile .sj-galaxy-band,
body.sj-browser-fullscreen .sj-galaxy-band {
  opacity: 0.62;
}

body.sj-landscape-mobile .sj-planet.is-dim,
body.sj-browser-fullscreen .sj-planet.is-dim {
  opacity: 0.58;
}

body.sj-landscape-mobile .sj-district,
body.sj-browser-fullscreen .sj-district {
  opacity: 0.68;
}

body.sj-browser-fullscreen .hub-bg,
body.sj-landscape-mobile .hub-bg {
  opacity: 0.38;
}

body.sj-browser-fullscreen .sj-stage-wrap.is-zoom-only .sj-stage,
body.sj-landscape-mobile .sj-stage-wrap.is-zoom-only .sj-stage {
  touch-action: none;
  cursor: grab;
}

.sj-chrome-hint {
  position: fixed;
  left: 56px;
  right: max(8px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(8, 6, 14, 0.92);
  border: 1px solid rgba(240, 184, 106, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
}

.sj-chrome-hint[hidden] {
  display: none !important;
}

.sj-chrome-hint__text {
  flex: 1 1 180px;
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--sj-muted);
}

.sj-chrome-hint__text strong {
  color: var(--sj-gold);
}

.sj-chrome-hint__btn,
.sj-chrome-hint__fs {
  flex-shrink: 0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
}

.sj-chrome-hint__btn {
  border: 1px solid rgba(245, 230, 236, 0.2);
  background: transparent;
  color: var(--sj-muted);
}

.sj-chrome-hint__fs {
  border: 1px solid rgba(240, 184, 106, 0.55);
  background: linear-gradient(145deg, rgba(240, 184, 106, 0.18), rgba(28, 16, 36, 0.95));
  color: #ffe4b8;
}

body.sj-page.sj-landscape-ready .sj-app {
  max-width: none;
  width: 100vw;
}

body.sj-page.sj-landscape-ready .sj-stage-wrap,
body.sj-page.sj-landscape-ready .sj-stage-wrap--galaxy {
  flex: 1;
  min-height: 0;
}

@media (orientation: landscape), (min-width: 768px) {
  .sj-app {
    max-width: none;
    width: 100vw;
  }

  .sj-stage-wrap,
  .sj-stage-wrap--galaxy {
    flex: 1;
    min-height: 0;
  }
}

/* L0 寰宇银河 */
.sj-head--galaxy .sj-head__title {
  background: linear-gradient(135deg, #e8d4ff, #f0b86a);
  -webkit-background-clip: text;
  background-clip: text;
}

.sj-galaxy-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0 12px 8px;
}

.sj-galaxy-toolbar .sj-hint {
  margin: 0;
}

.sj-galaxy-toolbar .sj-zoom {
  align-self: flex-end;
}

/* 星图 · 圆形图标按钮 */
.sj-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(240, 184, 106, 0.38);
  background: linear-gradient(145deg, rgba(28, 16, 36, 0.96), rgba(8, 6, 14, 0.94));
  color: var(--sj-gold);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  flex-shrink: 0;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease,
    background 0.2s ease;
}

.sj-icon-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.sj-icon-btn:hover {
  border-color: rgba(240, 184, 106, 0.72);
  box-shadow:
    0 0 22px rgba(240, 184, 106, 0.22),
    0 4px 18px rgba(0, 0, 0, 0.45);
  color: #ffe4b8;
}

.sj-icon-btn:active {
  transform: scale(0.94);
}

.sj-icon-btn.is-active {
  background: linear-gradient(145deg, rgba(240, 184, 106, 0.22), rgba(28, 16, 36, 0.95));
  border-color: var(--sj-gold);
  box-shadow: 0 0 24px rgba(240, 184, 106, 0.28);
}

.sj-icon-btn--sm {
  width: 34px;
  height: 34px;
}

.sj-icon-btn--sm svg {
  width: 16px;
  height: 16px;
}

.sj-chrome--galaxy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding-bottom: 4px;
}

.sj-head--galaxy .sj-chrome--galaxy {
  display: flex;
}

.sj-chrome__stats {
  flex: 1;
  text-align: center;
  min-width: 0;
}

/* 搜索抽屉 · 点击图标才出现 */
.sj-search-drawer {
  position: absolute;
  inset: 0;
  z-index: 24;
  pointer-events: none;
}

.sj-search-drawer.is-open {
  pointer-events: auto;
}

.sj-search-drawer__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 2, 8, 0.62);
  opacity: 0;
  cursor: default;
  transition: opacity 0.28s ease;
}

.sj-search-drawer.is-open .sj-search-drawer__backdrop {
  opacity: 1;
}

.sj-search-drawer__sheet {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  padding: 12px 14px 10px;
  border-radius: 18px;
  border: 1px solid rgba(240, 184, 106, 0.32);
  background: linear-gradient(165deg, rgba(16, 10, 24, 0.98), rgba(6, 4, 10, 0.96));
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(240, 184, 106, 0.1);
  transform: translateY(-16px) scale(0.98);
  opacity: 0;
  transition:
    transform 0.28s ease,
    opacity 0.28s ease;
}

.sj-search-drawer.is-open .sj-search-drawer__sheet {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.sj-search-drawer__field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sj-search-drawer__field-icon {
  display: flex;
  color: var(--sj-gold);
  opacity: 0.85;
  flex-shrink: 0;
}

.sj-search-drawer__field-icon svg {
  width: 18px;
  height: 18px;
}

.sj-search-drawer__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--sj-text);
  font-family: 'Noto Serif SC', serif;
  font-size: 0.92rem;
  outline: none;
  padding: 0.35rem 0;
}

.sj-search-drawer__input::placeholder {
  color: rgba(245, 230, 236, 0.42);
}

.sj-search-drawer__drop {
  margin: 8px 0 0;
  padding: 4px 0 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  max-height: min(42vh, 280px);
  overflow: auto;
}

.sj-search-drawer__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0.6rem 0.5rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--sj-text);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}

.sj-search-drawer__item:hover {
  background: rgba(240, 184, 106, 0.1);
}

.sj-search-drawer__item-emoji {
  font-size: 1.15rem;
}

.sj-search-drawer__item-name {
  flex: 1;
  font-weight: 600;
}

.sj-search-drawer__item-meta {
  font-size: 0.72rem;
  color: var(--sj-muted);
}

/* 聚焦浮层 · 邻域人数 */
.sj-galaxy-focus-backdrop {
  position: absolute;
  inset: 0;
  z-index: 10;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(4, 8, 16, 0.38);
  cursor: pointer;
}

.sj-galaxy-focus-backdrop[hidden],
.sj-galaxy-focus[hidden],
.sj-search-drawer[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.sj-galaxy-focus {
  position: absolute;
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 12;
  padding: 12px 14px 14px;
  border-radius: 18px;
  border: 1px solid rgba(240, 184, 106, 0.32);
  background: linear-gradient(165deg, rgba(14, 10, 22, 0.96), rgba(6, 4, 12, 0.94));
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 230, 180, 0.08);
  backdrop-filter: blur(12px);
  max-width: min(440px, 94vw);
  max-height: min(72vh, 520px);
  overflow: auto;
}

.sj-galaxy-focus__section-title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 184, 106, 0.82);
}

.sj-galaxy-focus__loading {
  margin: 0;
  padding: 16px 0;
  text-align: center;
  color: var(--sj-muted);
  font-size: 0.82rem;
}

.sj-gx-map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sj-gx-map-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 88px;
  padding: 8px 6px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 12, 24, 0.65);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.sj-gx-map-card__thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  filter: saturate(1.05);
}

.sj-gx-map-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 6, 12, 0.15) 0%, rgba(4, 6, 12, 0.82) 72%, rgba(4, 6, 12, 0.92) 100%);
}

.sj-gx-map-card__glyph {
  position: relative;
  z-index: 1;
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 1.35rem;
  line-height: 1;
  color: rgba(255, 248, 236, 0.95);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.sj-gx-map-card__label {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(232, 240, 255, 0.92);
}

.sj-gx-map-card--gold { border-color: rgba(240, 184, 106, 0.35); }
.sj-gx-map-card--moon { border-color: rgba(176, 196, 255, 0.28); }
.sj-gx-map-card--amber { border-color: rgba(245, 180, 90, 0.32); }
.sj-gx-map-card--rose { border-color: rgba(255, 140, 170, 0.32); }
.sj-gx-map-card--azure { border-color: rgba(120, 190, 255, 0.32); }
.sj-gx-map-card--jade { border-color: rgba(120, 210, 170, 0.32); }
.sj-gx-map-card--violet { border-color: rgba(190, 150, 255, 0.32); }

.sj-gx-map-card:hover,
.sj-gx-map-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--sj-gold);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.sj-galaxy-focus__preview {
  animation: sj-focus-in 0.22s ease;
}

.sj-gx-map-preview__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(232, 240, 255, 0.78);
  font-size: 0.78rem;
  cursor: pointer;
}

.sj-gx-map-preview__back:hover {
  color: var(--sj-gold);
}

.sj-gx-map-preview__frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(240, 184, 106, 0.28);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.sj-gx-map-preview__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: pointer;
}

.sj-gx-map-preview__badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.sj-gx-map-preview__badge--gold { background: rgba(120, 90, 20, 0.72); color: #fff4d8; }
.sj-gx-map-preview__badge--moon { background: rgba(40, 56, 110, 0.72); color: #e8f0ff; }
.sj-gx-map-preview__badge--amber { background: rgba(110, 70, 20, 0.72); color: #ffe8c8; }
.sj-gx-map-preview__badge--rose { background: rgba(110, 40, 60, 0.72); color: #ffe8f0; }
.sj-gx-map-preview__badge--azure { background: rgba(30, 70, 120, 0.72); color: #dff0ff; }
.sj-gx-map-preview__badge--jade { background: rgba(30, 90, 70, 0.72); color: #e8fff4; }
.sj-gx-map-preview__badge--violet { background: rgba(70, 40, 110, 0.72); color: #f0e8ff; }

.sj-gx-map-preview__cap {
  margin: 10px 0 4px;
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 1.05rem;
  color: var(--sj-gold);
}

.sj-gx-map-preview__hint {
  margin: 0 0 12px;
  font-size: 0.72rem;
  color: var(--sj-muted);
  line-height: 1.45;
}

@keyframes sj-focus-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.sj-mobile .sj-gx-map-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.sj-mobile .sj-galaxy-focus {
  max-height: min(68vh, 480px);
}

.sj-galaxy-focus__bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.sj-galaxy-focus__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.sj-galaxy-focus__close {
  flex-shrink: 0;
  margin-top: 2px;
  min-width: 44px;
  min-height: 44px;
  color: rgba(232, 240, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
}

.sj-galaxy-focus__close:hover {
  color: #fff8f2;
  border-color: rgba(240, 184, 106, 0.35);
  background: rgba(240, 184, 106, 0.08);
}

.sj-galaxy-focus__emoji {
  font-size: 2rem;
  line-height: 1;
}

.sj-galaxy-focus__title {
  margin: 0;
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--sj-gold);
}

.sj-galaxy-focus__meta {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--sj-muted);
}

.sj-galaxy-focus__neighbors {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sj-galaxy-focus__empty {
  font-size: 0.78rem;
  color: var(--sj-muted);
  padding: 4px 0;
}

.sj-galaxy-focus__neighbor {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--sj-text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  text-align: left;
}

.sj-galaxy-focus__neighbor:hover {
  border-color: rgba(240, 184, 106, 0.25);
  background: rgba(240, 184, 106, 0.06);
}

.sj-galaxy-focus__neighbor-name {
  flex: 1;
  font-weight: 600;
}

.sj-galaxy-focus__neighbor-meta {
  font-size: 0.72rem;
  color: var(--sj-muted);
}

.sj-galaxy-focus__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sj-galaxy-link {
  stroke: rgba(240, 184, 106, 0.35);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
  pointer-events: none;
}

.sj-planet.is-focused .sj-planet__body {
  stroke: var(--sj-gold);
  stroke-width: 3;
  filter: drop-shadow(0 0 16px rgba(240, 184, 106, 0.65));
}

.sj-planet.is-focused .sj-planet__glow {
  fill: rgba(240, 184, 106, 0.2);
  animation: sj-planet-pulse 2s ease-in-out infinite;
}

.sj-planet.is-neighbor .sj-planet__name,
.sj-planet.is-neighbor .sj-planet__sub {
  fill: rgba(245, 230, 236, 0.95);
  opacity: 1;
}

.sj-planet.is-neighbor .sj-planet__body {
  stroke-width: 2.5;
}

.sj-planet.is-dim {
  opacity: 0.55;
}

.sj-stage-wrap--galaxy {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  border-radius: 12px;
  margin: 0 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sj-canvas--galaxy {
  transform-origin: 0 0;
  display: block;
  /* 勿用 width/height 100%：与 MeixierViewport 的 scale 叠算会只露出地图一角 */
}

.sj-galaxy-band {
  fill: none;
  stroke-width: 1.5;
  opacity: 0.55;
}

.sj-galaxy-band--gold {
  stroke: rgba(245, 200, 120, 0.62);
}

.sj-galaxy-band--violet {
  stroke: rgba(176, 148, 255, 0.55);
}

.sj-planet__glow {
  fill: rgba(176, 148, 255, 0.2);
  animation: sj-planet-pulse 3s ease-in-out infinite;
}

.sj-planet__body {
  fill: url(#sj-planet-grad);
  fill: rgba(48, 36, 68, 0.72);
  stroke: rgba(245, 200, 120, 0.72);
  stroke-width: 2;
}

.sj-planet__emoji {
  text-anchor: middle;
  font-size: 28px;
  dominant-baseline: middle;
}

.sj-planet__name {
  text-anchor: middle;
  fill: var(--sj-text);
  font-size: 13px;
  font-weight: 600;
}

.sj-planet__sub {
  text-anchor: middle;
  fill: var(--sj-muted);
  font-size: 11px;
}

.sj-planet:hover .sj-planet__body {
  stroke: var(--sj-gold);
  filter: drop-shadow(0 0 12px rgba(240, 184, 106, 0.45));
}

.sj-planet--mine .sj-planet__body {
  stroke: var(--sj-gold);
  stroke-width: 2.5;
}

.sj-planet--hl-radiant .sj-planet__glow {
  fill: rgba(240, 184, 106, 0.18);
  animation: sj-planet-pulse 2.2s ease-in-out infinite;
}

.sj-planet--hl-equipped .sj-planet__glow {
  fill: rgba(240, 184, 106, 0.1);
}

.sj-planet--hl-basic.sj-planet--mine .sj-planet__body {
  stroke: rgba(240, 184, 106, 0.45);
}

.sj-canvas__wash--galaxy {
  opacity: 0.38;
}

.sj-side__progress {
  margin: 8px 0 10px;
}

.sj-side__progress-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sj-side__progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(240, 184, 106, 0.5), var(--sj-gold));
  border-radius: inherit;
  transition: width 0.35s ease;
}

.sj-side__progress-hint {
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: var(--sj-muted);
}

.sj-side__progress-hint strong {
  color: var(--sj-gold);
}

@keyframes sj-planet-pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
  }
}

.sj-galaxy-legend {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 4px 14px 10px;
  font-size: 0.72rem;
  color: var(--sj-muted);
}

/* CP 对节点 */
.sj-node--cp-pair .sj-node__cp-bridge {
  stroke: var(--sj-rose);
  stroke-width: 2;
  opacity: 0.7;
}

.sj-node__ring--cp {
  fill: rgba(232, 120, 152, 0.15);
  stroke: var(--sj-rose);
  stroke-width: 1.5;
}

.sj-node__name--cp {
  font-size: 9px;
  text-anchor: middle;
}

/* CP 详情弹层 */
.sj-cp {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background: rgba(4, 2, 8, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sj-cp.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sj-cp__sheet {
  width: min(720px, 100%);
  max-height: min(88vh, 520px);
  overflow: auto;
  border-radius: 16px 16px 12px 12px;
  background: linear-gradient(180deg, rgba(28, 20, 38, 0.98), rgba(12, 10, 18, 0.98));
  border: 1px solid rgba(232, 120, 152, 0.35);
  padding: 16px 14px 18px;
  position: relative;
}

.sj-cp__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  color: var(--sj-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.sj-cp__title {
  margin: 0 0 4px;
  text-align: center;
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--sj-rose);
}

.sj-cp__sub {
  margin: -6px 0 12px;
  text-align: center;
  font-size: 0.76rem;
  color: var(--sj-muted);
  line-height: 1.45;
}

.sj-cp-map-decor__star {
  fill: rgba(232, 120, 152, 0.35);
}

.sj-cp-map-decor__title {
  fill: rgba(245, 230, 236, 0.55);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.sj-node__cp-pending {
  text-anchor: middle;
  fill: var(--sj-muted);
  font-size: 9px;
}

.sj-node--cp-pair:hover .sj-node__ring--cp {
  stroke: var(--sj-gold);
  filter: drop-shadow(0 0 8px rgba(240, 184, 106, 0.4));
}

.sj-cp__cols {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
}

.sj-cp__col {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(8, 10, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sj-cp__heart {
  align-self: center;
  font-size: 1.5rem;
  opacity: 0.85;
}

.sj-cp__avatar {
  border-radius: 50%;
  border: 2px solid rgba(232, 120, 152, 0.45);
  object-fit: cover;
}

.sj-cp__name {
  margin: 8px 0 4px;
  font-size: 0.95rem;
}

.sj-cp__stat {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: var(--sj-muted);
}

.sj-cp__thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  min-height: 72px;
  margin-bottom: 8px;
}

.sj-cp__thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sj-cp__empty {
  font-size: 0.75rem;
  color: var(--sj-muted);
  line-height: 72px;
}

.sj-cp__link {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--sj-gold);
  text-decoration: none;
}

@media (orientation: landscape) and (max-height: 500px) {
  .sj-cp__sheet {
    max-height: 92vh;
  }

  .sj-head {
    padding-top: max(6px, env(safe-area-inset-top));
  }

  .sj-toolbar,
  .sj-galaxy-toolbar {
    padding-bottom: 4px;
  }
}

/* 横屏沉浸 · 仅保留退出 + 统计，星图全屏可拖缩放 */
.sj-chrome {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.sj-chrome .sj-icon-btn--exit {
  flex-shrink: 0;
}

body.sj-landscape-ready.sj-immersive .sj-chrome:not(.sj-chrome--galaxy) {
  display: flex;
}

body.sj-landscape-ready.sj-immersive .sj-immersive-hide {
  display: none !important;
}

body.sj-landscape-ready.sj-immersive .hub-bg {
  opacity: 0.42;
}

body.sj-landscape-ready.sj-immersive .sj-app {
  max-width: none;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

body.sj-landscape-ready.sj-immersive .sj-head {
  flex-shrink: 0;
  padding: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 4px
    max(10px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(6, 4, 10, 0.88), rgba(6, 4, 10, 0.35));
}

body.sj-landscape-ready.sj-immersive .sj-stage-wrap,
body.sj-landscape-ready.sj-immersive .sj-stage-wrap--galaxy {
  flex: 1;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  border: none;
}

body.sj-landscape-ready.sj-immersive .sj-district__label,
body.sj-landscape-ready.sj-immersive .sj-district__glyph,
body.sj-landscape-ready.sj-immersive .sj-cp-map-decor__title {
  opacity: 0;
  pointer-events: none;
}

/* 竖屏也占满视口，保留精简顶栏 */
body.sj-immersive:not(.sj-landscape-ready) .sj-app {
  max-width: none;
  width: 100vw;
}

body.sj-immersive:not(.sj-landscape-ready) .sj-stage-wrap,
body.sj-immersive:not(.sj-landscape-ready) .sj-stage-wrap--galaxy {
  flex: 1;
  min-height: 55vh;
  margin: 0 4px;
  border-radius: 12px;
}

body.sj-immersive:not(.sj-landscape-ready) .sj-toolbar,
body.sj-immersive:not(.sj-landscape-ready) .sj-foot {
  flex-shrink: 0;
}

.sj-exit {
  color: var(--sj-text);
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

.sj-exit:hover {
  color: var(--sj-gold);
}

.sj-chrome__stats {
  text-align: right;
  font-size: 0.72rem;
  color: var(--sj-muted);
  line-height: 1.35;
}

.sj-chrome__stats strong {
  display: block;
  font-size: 0.92rem;
  color: var(--sj-gold);
}

.sj-district--drill:hover {
  filter: drop-shadow(0 0 10px rgba(240, 184, 106, 0.35));
}

/* 节点基本信息弹层 */
.sj-brief {
  position: fixed;
  inset: 0;
  z-index: 115;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background: rgba(4, 2, 8, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sj-brief.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sj-brief__sheet {
  width: min(420px, 100%);
  border-radius: 16px 16px 12px 12px;
  background: linear-gradient(180deg, rgba(24, 18, 32, 0.98), rgba(10, 8, 16, 0.98));
  border: 1px solid rgba(240, 184, 106, 0.28);
  padding: 16px 14px 18px;
  position: relative;
}

.sj-brief__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  color: var(--sj-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.sj-brief__hero {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.sj-brief__avatar {
  border-radius: 50%;
  border: 2px solid rgba(240, 184, 106, 0.45);
  object-fit: cover;
  flex-shrink: 0;
}

.sj-brief__name {
  margin: 0 0 4px;
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--sj-gold);
}

.sj-brief__meta,
.sj-brief__tag,
.sj-brief__stat {
  margin: 0 0 4px;
  font-size: 0.78rem;
  color: var(--sj-muted);
}

.sj-brief__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sj-brief__loading {
  text-align: center;
  color: var(--sj-muted);
  margin: 1rem 0;
}

/* L0 完美星球 · 地球仪 */
.sj-stage-wrap--globe {
  background: transparent;
  border: none;
  box-shadow: none;
  margin: 0;
  border-radius: 0;
}

.sj-stage-wrap--globe::before {
  display: none;
}

.sj-globe-stage {
  position: absolute;
  inset: 0;
  touch-action: none;
}

.sj-globe-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.sj-globe-id-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  --sj-globe-id-fs: 12px;
}

.sj-globe-zone-id {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  font-family: ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, Consolas, monospace;
  font-size: var(--sj-globe-id-fs);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fffdf6;
  text-shadow:
    0 0 1px #000,
    0 1px 0 #000,
    0 -1px 0 #000,
    1px 0 0 #000,
    -1px 0 0 #000,
    0 2px 4px rgba(0, 0, 0, 0.92);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  white-space: nowrap;
  user-select: none;
  will-change: left, top, opacity;
}

.sj-globe-zone-id.is-hover {
  color: #fff8ec;
  transform: translate(-50%, -50%) scale(1.06);
}

.sj-globe-zone-id.is-selected {
  color: #fff4d0;
  transform: translate(-50%, -50%) scale(1.14);
  text-shadow:
    0 0 2px #000,
    0 0 10px rgba(255, 210, 120, 0.75),
    0 2px 5px rgba(0, 0, 0, 0.95);
}

body.sj-mobile .sj-globe-id-layer {
  --sj-globe-id-fs: 13px;
}

body.sj-mobile .sj-globe-zone-id {
  font-weight: 900;
  letter-spacing: 0;
}

body.sj-mobile .sj-globe-stage,
body.sj-landscape-mobile .sj-globe-stage {
  inset: 5% 6% 12% 6%;
}

body.sj-mobile .sj-globe-canvas,
body.sj-landscape-mobile .sj-globe-canvas {
  max-width: none;
  max-height: none;
}

.sj-globe-zoom-dock {
  position: absolute;
  right: max(10px, env(safe-area-inset-right, 0px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.sj-globe-zoom-dock__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(176, 148, 255, 0.35);
  background: rgba(8, 12, 24, 0.82);
  color: rgba(232, 240, 255, 0.95);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
}

.sj-globe-zoom-dock__btn svg {
  width: 22px;
  height: 22px;
}

.sj-globe-zoom-dock__btn:hover {
  border-color: var(--sj-gold);
  color: var(--sj-gold);
}

.sj-globe-zoom-dock__btn:active {
  transform: scale(0.96);
}

body.sj-mobile .sj-globe-zoom-dock__btn {
  width: 40px;
  height: 40px;
}

body.sj-mobile .sj-globe-zoom-dock__btn svg {
  width: 20px;
  height: 20px;
}

.sj-globe-stage.is-loading::after {
  content: '正在加载 3D 地球仪…';
  position: absolute;
  z-index: 4;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: rgba(232, 240, 255, 0.9);
  background: rgba(8, 12, 24, 0.88);
  border: 1px solid rgba(120, 180, 255, 0.22);
  pointer-events: none;
}

.sj-globe-stats {
  width: 100%;
  padding: 0 4px 8px;
}

.sj-globe-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

.sj-globe-canvas:active {
  cursor: grabbing;
}

/* 旧版 HTML 浮层标签已废弃，文字改 WebGL Sprite 贴球面 */
.sj-globe-zone-labels,
.sj-globe-float-label {
  display: none !important;
}

.sj-globe-zone-labels {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.sj-globe-zone-label {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1.1;
  text-align: center;
  color: rgba(255, 252, 245, 0.94);
  font-weight: 600;
  pointer-events: none;
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.95),
    0 1px 3px rgba(0, 0, 0, 0.85);
  max-width: 5.5em;
  opacity: 0.9;
}

.sj-globe-zone-label__id {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sj-globe-zone-label__name {
  font-weight: 500;
  font-size: 0.88em;
  opacity: 0.92;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.sj-globe-zone-label.is-hover {
  opacity: 1;
  color: #fff;
  z-index: 2;
}

.sj-globe-zone-label.is-selected {
  opacity: 1;
  color: #fff8e8;
  z-index: 3;
  text-shadow:
    0 0 6px rgba(255, 200, 120, 0.55),
    0 0 4px rgba(0, 0, 0, 0.95),
    0 1px 3px rgba(0, 0, 0, 0.85);
}

.sj-globe-float-label {
  position: absolute;
  z-index: 6;
  transform: translate(-50%, calc(-100% - 10px));
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(8, 12, 24, 0.88);
  border: 1px solid rgba(176, 148, 255, 0.35);
  color: #fff8f2;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.sj-globe-float-label strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
}

.sj-globe-float-label span {
  color: rgba(232, 240, 255, 0.72);
}

.sj-globe-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 16px;
  text-align: center;
  color: #ffd4d4;
  font-size: 0.9rem;
  background: rgba(8, 10, 20, 0.72);
}

.sj-globe-stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.sj-globe-stats__cell {
  text-align: center;
  padding: 8px 4px;
  border-radius: 10px;
  background: rgba(176, 148, 255, 0.1);
  border: 1px solid rgba(245, 200, 120, 0.2);
}

.sj-globe-stats__cell em {
  display: block;
  font-style: normal;
  font-size: 1rem;
  color: var(--sj-gold);
  font-weight: 700;
}

.sj-globe-stats__cell span {
  font-size: 0.65rem;
  color: var(--sj-muted);
}

.sj-globe-stats__sel,
.sj-globe-stats__hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--sj-muted);
  line-height: 1.45;
  text-align: center;
}

.sj-globe-stats__sel strong {
  color: var(--sj-text);
}

body.sj-mobile .sj-globe-stats {
  display: block !important;
  order: 3;
}

body.sj-mobile .sj-galaxy-toolbar--globe {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  padding: 0;
}

body.sj-landscape-mobile .sj-globe-stats {
  display: none !important;
}

body.sj-landscape-mobile .sj-galaxy-toolbar--globe {
  display: flex !important;
  flex-direction: column;
}

.sj-galaxy-legend--globe {
  justify-content: center;
  gap: 12px;
  font-size: 0.72rem;
  flex-wrap: wrap;
}

.sj-galaxy-legend--globe .sj-globe-heat-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sj-globe-heat-legend__bar {
  width: 72px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1e4a72 0%, #3a8a6a 35%, #c99840 68%, #e85830 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sj-side-dock--globe + .sj-stage-wrap--globe .sj-galaxy-focus {
  max-width: min(92vw, 360px);
}

@media (min-width: 768px) {
  .sj-globe-stats {
    max-width: 320px;
  }

  .sj-stage-wrap--globe .sj-galaxy-focus {
    position: absolute;
    right: 12px;
    top: 12px;
    bottom: auto;
    left: auto;
    max-height: 70vh;
    overflow: auto;
    z-index: 12;
  }
}

.sj-icon-btn--shot svg {
  width: 1.15em;
  height: 1.15em;
}

.sj-icon-btn.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

.sj-capture-toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 12000;
  max-width: min(92vw, 360px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(10, 18, 32, 0.94);
  border: 1px solid rgba(120, 180, 255, 0.22);
  color: #e8f0ff;
  font-size: 0.85rem;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.sj-capture-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sj-capture-toast[data-kind='error'] {
  border-color: rgba(255, 120, 120, 0.35);
  color: #ffd4d4;
}

.sj-capture-preview {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.sj-capture-preview.is-open {
  display: flex;
}

.sj-capture-preview__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(4, 8, 16, 0.82);
  cursor: pointer;
}

.sj-capture-preview__sheet {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(12, 20, 36, 0.96);
  border: 1px solid rgba(120, 180, 255, 0.2);
}

.sj-capture-preview__hint {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(232, 240, 255, 0.75);
  text-align: center;
}

.sj-capture-preview__img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 10px;
  background: #070d18;
}

.sj-capture-preview__close {
  align-self: center;
}

