[data-theme="stars"] {
  --page:#070e1a;
  --surface:#111e2d;
  --ui-ink:#f3e9d5;
  --ui-muted:#b0c0cf;
  --edge:#536477;
  --highlight:#d8c39b;
}

[data-theme="stars"] #sceneDialog .scene-head h1 {
  font-family:"Songti SC",STSong,SimSun,serif;
  font-weight:400;
  letter-spacing:.13em;
  color:#f4ead4;
}

[data-theme="stars"] #sceneDialog .scene-title .star-latin {
  color:#d8c39b;
  font:italic clamp(15px,2vw,24px)/1.2 Georgia,serif;
}

.constellation.stage {
  cursor:crosshair;
  border:1px solid #3c516b;
  border-radius:14px;
  background:
    var(--milky-way,none) center / 100% 100% no-repeat,
    radial-gradient(ellipse at 21% 82%,#b8936128,transparent 23%),
    radial-gradient(ellipse at 79% 23%,#5682a829,transparent 31%),
    radial-gradient(ellipse at 56% 53%,#213e6438,transparent 43%),
    #050b17;
}
.stage-frame:has(> .constellation) { border-radius:14px; }

.constellation::before {
  content:"";
  position:absolute;
  inset:7px;
  border:1px solid #a7bbcf19;
  border-radius:8px;
  pointer-events:none;
}

.constellation[data-mode="orbit"] { cursor:grab; }
.constellation[data-mode="orbit"]:active { cursor:grabbing; }
.constellation[data-mode="orbit"] .chart-star { pointer-events:none; }

.chart-ring {
  position:absolute;
  left:50%;
  top:50%;
  border:1px solid #aac5e128;
  border-radius:50%;
  pointer-events:none;
}

.star-quote {
  position:absolute;
  left:12px;
  right:12px;
  bottom:clamp(14px,4.2%,36px);
  color:#eee3cd;
  font:clamp(13px,1.6vw,20px)/1.4 "Songti SC",STSong,SimSun,serif;
  letter-spacing:.045em;
  text-align:center;
  pointer-events:none;
}

.chart-star {
  --shine:#b9e1ff;
  --haze:#76bafa75;
  display:grid;
  place-items:center;
  position:absolute;
  inset:50% auto auto 50%;
  width:44px;
  height:44px;
  transform:translate(-50%,-50%);
  background:transparent;
  border:0;
  border-radius:50%;
  padding:0;
  touch-action:none;
  -webkit-tap-highlight-color:transparent;
}

.star-spark {
  position:relative;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#f9fbff;
  box-shadow:0 0 4px 2px var(--shine),0 0 14px 7px var(--haze),0 0 26px 10px var(--haze);
  transition:transform .18s ease;
}

.star-spark::before,.star-spark::after {
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:28px;
  height:1px;
  transform:translate(-50%,-50%);
  background:linear-gradient(90deg,transparent,var(--shine),transparent);
}

.star-spark::after { transform:translate(-50%,-50%) rotate(90deg); }
.chart-star:is(.lit,.amber,.next) { --shine:#ffe2ab; --haze:#ffbd6575; }
.chart-star.next { z-index:1; }
.chart-star:is(.next,.hovered) .star-spark { transform:scale(1.33); }
.chart-star.next::after {
  content:"";
  position:absolute;
  inset:8px;
  border:1px solid #f5d7a9a8;
  border-radius:50%;
  animation:sagittarius-beacon 1.9s ease-out infinite;
}

@keyframes sagittarius-beacon {
  from { transform:scale(.72); opacity:.9; }
  to { transform:scale(1.22); opacity:.23; }
}

[data-theme="stars"] .star-controls button {
  color:#d7e1eb;
  border-color:#687e98;
}
[data-theme="stars"] .star-controls button[aria-pressed="true"] {
  color:#211d17;
  background:#e8d6af;
  border-color:#f1dfba;
}
.star-controls button[hidden] { display:none; }

#starHandoff {
  position:fixed;
  inset:0;
  width:100%;
  height:100dvh;
  max-width:none;
  max-height:none;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  overflow:hidden;
  background:radial-gradient(ellipse at 50% 52%,#13273f,#070e1b 50%,#03060f);
}
#starHandoff::backdrop { background:transparent; }
#starHandoff canvas { position:absolute; inset:0; width:100%; height:100%; }

@media (min-width:900px) and (orientation:landscape) {
  [data-theme="stars"] #sceneDialog .status:not(:empty) { text-align:left; }
}

@media (prefers-reduced-motion:reduce) {
  .star-spark { transition:none; }
  .chart-star.next::after { animation:none; }
}
