/* 星空连线 · 样式（.g-constellate 前缀） */

.g-constellate {
  padding: 0;
  gap: 0;
}

.g-constellate .ct-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(65% 46% at 22% 16%, rgba(120, 150, 255, 0.17), transparent 62%),
    radial-gradient(58% 44% at 80% 74%, rgba(160, 110, 255, 0.14), transparent 62%),
    radial-gradient(46% 38% at 54% 36%, rgba(90, 200, 255, 0.09), transparent 62%),
    linear-gradient(180deg, #0b1224 0%, #080e1c 55%, #05070f 100%);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.g-constellate .ct-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  z-index: 0;
}

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

.g-constellate .ct-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  pointer-events: none;
}

.g-constellate .ct-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 13, 19, 0.5);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 11px;
  color: var(--dim);
  line-height: 1.2;
}

.g-constellate .ct-chip b {
  font-size: 15px;
  font-weight: 800;
  color: #dff0ff;
  font-variant-numeric: tabular-nums;
}

.g-constellate .ct-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.g-constellate .ct-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(121, 184, 255, 0.3);
  background: rgba(10, 13, 19, 0.55);
  color: #cfe4ff;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  touch-action: manipulation;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.1s ease;
}

.g-constellate .ct-btn:active {
  transform: scale(0.95);
  background: rgba(121, 184, 255, 0.16);
}

/* ---------------- 底部提示 ---------------- */

.g-constellate .ct-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(18px + var(--safe-b));
  z-index: 2;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: rgba(200, 226, 255, 0.55);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* ---------------- 星座完成卡 ---------------- */

.g-constellate .ct-card {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: min(84%, 300px);
  padding: 20px 16px 16px;
  text-align: center;
  border-radius: 18px;
  border: 1px solid rgba(121, 184, 255, 0.35);
  background: linear-gradient(180deg, rgba(18, 26, 46, 0.96), rgba(12, 17, 30, 0.97));
  box-shadow: 0 26px 60px -22px rgba(0, 0, 0, 0.9), 0 0 44px rgba(80, 150, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -46%);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.g-constellate .ct-card.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

.g-constellate .ct-card-badge {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #8fc4ff;
  margin-bottom: 7px;
}

.g-constellate .ct-card-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #eaf4ff;
  text-shadow: 0 0 18px rgba(121, 184, 255, 0.45);
}

.g-constellate .ct-card-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--faint);
}

.g-constellate .ct-card-intro {
  margin: 11px 0 16px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--dim);
}

.g-constellate .ct-card .btn { min-height: 44px; }

/* ---------------- 窄屏 ---------------- */

@media (max-width: 359px) {
  .g-constellate .ct-btn { padding: 0 11px; font-size: 11.5px; }
  .g-constellate .ct-hint { font-size: 11px; }
  .g-constellate .ct-card-title { font-size: 20px; }
}
