/* 星座收集 · 专属样式（夜空由 Canvas 绘制；选择器统一 .g-stargaze 前缀） */

.g-stargaze { gap: 10px; }

/* ---------------- 顶部信息 ---------------- */
.g-stargaze .sg-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: none;
  min-height: 34px;
}
.g-stargaze .sg-info-left { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.g-stargaze .sg-today-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
}
.g-stargaze .sg-today-season { font-size: 10.5px; color: var(--faint); letter-spacing: 0.02em; }
.g-stargaze .sg-progress {
  flex: none;
  font-size: 11.5px;
  color: var(--dim);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------------- 夜空画布 ---------------- */
.g-stargaze .sg-board-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
}
.g-stargaze .sg-host {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #0a1226;
  box-shadow:
    0 22px 54px -26px rgba(0, 0, 0, 0.95),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 0 5px rgba(121, 184, 255, 0.025);
  touch-action: manipulation;
  cursor: crosshair;
}
.g-stargaze .sg-host canvas { display: block; border-radius: inherit; }

/* ---------------- 工具 / 提示 ---------------- */
.g-stargaze .sg-tools { display: flex; gap: 8px; flex: none; }
.g-stargaze .sg-tools .btn { flex: 1; min-height: 44px; }
.g-stargaze .sg-hint { text-align: center; flex: none; }

/* ---------------- 图鉴 ---------------- */
.sg-atlas {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 8, 16, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease both;
}
.sg-atlas-card-box {
  width: min(100%, 420px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  padding: 16px;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(121, 184, 255, 0.14), transparent 55%),
    linear-gradient(180deg, #121a2e, #0b1120);
  box-shadow: 0 34px 80px -18px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: popIn 0.24s cubic-bezier(0.22, 1.1, 0.36, 1) both;
}
.sg-atlas-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.sg-atlas-head .dialog-title { margin-bottom: 0; }
.sg-atlas-sub { font-size: 11px; color: var(--faint); margin-top: 3px; font-variant-numeric: tabular-nums; }
.sg-atlas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.sg-atlas-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px 6px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.028);
  color: var(--faint);
  touch-action: manipulation;
  transition: transform 0.1s, border-color 0.16s, background 0.16s;
}
.sg-atlas-card:active { transform: scale(0.96); }
.sg-atlas-mini { display: block; width: 100%; height: 50px; }
.sg-atlas-mini svg { display: block; width: 100%; height: 100%; }
.sg-atlas-name { font-size: 10.5px; font-weight: 600; line-height: 1.2; }
.sg-atlas-season { font-size: 9px; color: var(--faint); line-height: 1.2; }
.sg-atlas-card.collected {
  border-color: rgba(121, 184, 255, 0.35);
  background: linear-gradient(160deg, rgba(121, 184, 255, 0.13), rgba(121, 184, 255, 0.03));
}
.sg-atlas-card.collected .sg-atlas-name { color: var(--text); }
.sg-atlas-card.collected .sg-atlas-season { color: var(--accent); }
.sg-atlas-card.fresh {
  border-color: var(--accent);
  animation: sgFresh 1.1s ease-in-out infinite alternate;
}
@keyframes sgFresh {
  from { box-shadow: 0 0 0 0 rgba(121, 184, 255, 0.28); }
  to { box-shadow: 0 0 0 4px rgba(121, 184, 255, 0.10); }
}
.sg-atlas-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--faint);
}

/* ---------------- 小屏 ---------------- */
@media (max-height: 720px) {
  .g-stargaze { gap: 8px; }
  .g-stargaze .sg-hint { display: none; }
  .g-stargaze .sg-atlas-mini { height: 44px; }
}
