/*
═══════════════════════════════════════════════════════════════
SCISPARK · constellation-map · Wrap-screen star map
File: /public/components/constellation-map/constellation-map.css
Vercel URL: /components/constellation-map/constellation-map.css
═══════════════════════════════════════════════════════════════
*/

.constellation-map {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at center, #1f2746 0%, #0F172A 70%);
  border: 1px solid #2a3556;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.25);
}

.constellation-map svg {
  width: 100%;
  height: auto;
  display: block;
}

.constellation-map__caption {
  margin-top: 12px;
  font-family: var(--ff-mono, 'Geist Mono', ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C7CBDB;
  text-align: center;
}

.constellation-map__legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
  font-family: var(--ff-mono, 'Geist Mono', ui-monospace, monospace);
  font-size: 11px;
  color: #C7CBDB;
}
.constellation-map__legend span { display: inline-flex; align-items: center; gap: 6px; }
.constellation-map__legend .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #FACC15;
  box-shadow: 0 0 6px #FACC15;
}
.constellation-map__legend .dot.twinkle { background: #C4B5FD; box-shadow: 0 0 6px #C4B5FD; }
.constellation-map__legend .dot.dim     { background: #475569; box-shadow: none; }

/* Star markers inside SVG */
.cm-star {
  transition: filter 0.4s ease;
  cursor: pointer;
}
.cm-star--bright {
  fill: #FACC15;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.85));
}
.cm-star--twinkle {
  fill: #C4B5FD;
  filter: drop-shadow(0 0 5px rgba(196, 181, 253, 0.8));
  animation: cm-twinkle 1.6s ease-in-out infinite;
}
.cm-star--dim {
  fill: #475569;
  filter: none;
  opacity: 0.55;
}

@keyframes cm-twinkle {
  0%, 100% { opacity: 1;   transform-origin: center; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.78); }
}

.cm-link {
  stroke: rgba(250, 204, 21, 0.35);
  stroke-width: 1.2;
  fill: none;
}

@media (prefers-reduced-motion: reduce) {
  .cm-star--twinkle { animation: none; }
}

/* 3713 item 1 / 3700 C02-C06. Unmarked instances retain every rule above. */
[data-constellation-version="3700"]{max-width:100%;}
[data-constellation-version="3700"][hidden]{display:none!important;}
[data-constellation-version="3700"] .cm3700-panel{box-sizing:border-box;width:min(100%,calc(100vw - 32px),520px);margin:24px auto;padding:16px;border:1px solid var(--ink,#171413);border-radius:14px;background:var(--notes-summary-bg,#F5F0E4);color:var(--ink,#171413);box-shadow:none;cursor:default;}
[data-constellation-version="3700"] .cm3700-chart{display:block;width:100%;height:auto;aspect-ratio:10/7;overflow:visible;}
[data-constellation-version="3700"] .cm3700-chart+.cm3700-chart{margin-top:16px;}
[data-constellation-version="3700"] .cm3700-caption{margin-top:12px;font-size:1rem;line-height:1.5;text-align:center;}
[data-constellation-version="3700"] .cm3700-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 12px;margin-top:8px;font-size:.875rem;line-height:1.42857143;}
[data-constellation-version="3700"] .cm3700-legend>span{display:inline-flex;align-items:center;gap:6px;max-width:100%;overflow-wrap:anywhere;}
[data-constellation-version="3700"] .cm3700-key{width:16px;height:16px;flex:0 0 16px;}
[data-constellation-version="3700"] .cm3700-star{fill:none;stroke:var(--ink,#171413);stroke-width:2;opacity:1;cursor:default;}
[data-constellation-version="3700"] .cm3700-correct{fill:var(--notes-yellow-deep,var(--ink,#171413));}
[data-constellation-version="3700"] .cm3700-review{stroke-dasharray:3 2;}
[data-constellation-version="3700"] .cm3700-ring{fill:var(--notes-purple-mid,var(--ink,#171413));stroke:var(--ink,#171413);stroke-width:2;animation:cm3700-blink 1.6s ease-in-out infinite;}
[data-constellation-version="3700"] .cm3700-link{fill:none;stroke:var(--ink,#171413);stroke-width:1;}
[data-constellation-version="3700"] .cm3700-accessible{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
@keyframes cm3700-blink{0%,100%{opacity:1}50%{opacity:.65}}
@media(min-width:768px){[data-constellation-version="3700"] .cm3700-panel{padding:20px;}}
@media(prefers-reduced-motion:reduce){[data-constellation-version="3700"] .cm3700-ring{animation:none;transition:none;opacity:1;}}
