/* ---- Constellation mind-map ---- */
.learn-constellation {
  display: grid;
  gap: 0.75rem;
  animation: learnCardIn 0.4s ease both;
}
.learn-constellation[hidden] { display: none !important; }
.learn-constellation-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: space-between;
  align-items: flex-end;
}
.learn-constellation-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-style: italic;
  color: var(--alb-accent-deep);
}
.learn-constellation-head p {
  margin: 0;
  max-width: 36rem;
  color: var(--alb-muted);
  font-size: 0.92rem;
}
.learn-constellation-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.78rem;
  color: var(--alb-muted);
  font-weight: 700;
}
.learn-constellation-legend i.lg {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.25rem;
  vertical-align: middle;
}
.lg.done { background: #38bdf6; }
.lg.open { background: #0b6bcb; }
.lg.buy { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25); }
.lg.lock { background: #94a3b8; }

.learn-map-scroll {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid #1e3a5f;
  background:
    url("./images/panel-map.svg") center / cover no-repeat,
    radial-gradient(circle at 20% 30%, rgba(11, 107, 203, 0.35), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(124, 255, 178, 0.18), transparent 35%),
    linear-gradient(160deg, #07101c 0%, #102a43 55%, #0b1524 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35);
  min-height: 420px;
  max-height: min(70vh, 640px);
}
.map-edge {
  stroke: rgba(148, 163, 184, 0.35);
  stroke-width: 2;
  stroke-linecap: round;
}
.map-edge.is-lit {
  stroke: #3b9bff;
  stroke-width: 2.5;
  filter: url(#softGlow);
}
.map-edge.is-hot {
  stroke: #fbbf24;
  stroke-width: 2.5;
  stroke-dasharray: 6 5;
  animation: mapDash 1.2s linear infinite;
}
@keyframes mapDash {
  to { stroke-dashoffset: -22; }
}

.map-aura {
  fill: url(#mapGlow);
  opacity: 0;
}
.map-node.is-open .map-aura,
.map-node.is-done .map-aura,
.map-node.is-buy .map-aura {
  opacity: 1;
  animation: mapAura 2.8s ease-in-out infinite;
}
@keyframes mapAura {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.15); opacity: 0.95; }
}

.map-cell {
  fill: #1e293b;
  stroke: #64748b;
  stroke-width: 2;
  transition: fill 0.2s ease, stroke 0.2s ease;
}
.map-node.is-open .map-cell {
  fill: #0b6bcb;
  stroke: #7dd3fc;
}
.map-node.is-done .map-cell {
  fill: #0284c7;
  stroke: #7dd3fc;
}
.map-node.is-buy .map-cell {
  fill: #92400e;
  stroke: #fbbf24;
  animation: mapBuyPulse 1.6s ease-in-out infinite;
}
.map-node.is-current .map-cell {
  stroke: #fff;
  stroke-width: 3;
}
.map-node.is-lock .map-cell {
  fill: #0f172a;
  stroke: #475569;
  opacity: 0.75;
}
@keyframes mapBuyPulse {
  0%, 100% { filter: drop-shadow(0 0 2px #fbbf24); }
  50% { filter: drop-shadow(0 0 10px #fbbf24); }
}

.map-label {
  fill: #f8fafc;
  font-size: 9px;
  font-weight: 700;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  pointer-events: none;
}
.map-sub {
  fill: #94a3b8;
  font-size: 8px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  pointer-events: none;
}
.map-node.is-done .map-sub { fill: #7dd3fc; }
.map-node.is-buy .map-sub { fill: #fde68a; }
.map-node.is-open .map-sub { fill: #bae6fd; }

.map-node:hover .map-cell {
  transform-box: fill-box;
  transform-origin: center;
}

.graphics-edge {
  stroke-width: 2.5;
  stroke-dasharray: 7 6;
}

.graphics-gateway {
  cursor: pointer;
  outline: none;
}

.graphics-gateway-cell {
  fill: #0f172a;
  stroke: #475569;
  stroke-width: 3;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.graphics-gateway.is-buy .graphics-gateway-cell {
  fill: #713f12;
  stroke: #fbbf24;
  animation: mapBuyPulse 1.6s ease-in-out infinite;
}

.graphics-gateway.is-open .graphics-gateway-cell {
  fill: #075985;
  stroke: #67e8f9;
}

.graphics-gateway:focus .graphics-gateway-cell,
.graphics-gateway:hover .graphics-gateway-cell {
  stroke: #fff;
  stroke-width: 4;
}

.graphics-gateway-icon {
  fill: #38bdf8;
  stroke: #e0f2fe;
  stroke-width: 2;
}

.graphics-gateway.is-buy .graphics-gateway-icon {
  fill: #fbbf24;
}

.graphics-gateway-title,
.graphics-gateway-sub {
  fill: #f8fafc;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  pointer-events: none;
}

.graphics-gateway-title {
  font-size: 13px;
  font-weight: 800;
}

.graphics-gateway-sub {
  fill: #bae6fd;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.graphics-gateway.is-lock {
  opacity: 0.78;
}

.game-edge {
  stroke-width: 2.5;
  stroke-dasharray: 7 6;
}

.game-gateway {
  cursor: pointer;
  outline: none;
}

.game-gateway-cell {
  fill: #0f172a;
  stroke: #475569;
  stroke-width: 3;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.game-gateway.is-buy .game-gateway-cell {
  fill: #713f12;
  stroke: #fbbf24;
  animation: mapBuyPulse 1.6s ease-in-out infinite;
}

.game-gateway.is-open .game-gateway-cell {
  fill: #4c1d95;
  stroke: #c4b5fd;
}

.game-gateway:focus .game-gateway-cell,
.game-gateway:hover .game-gateway-cell {
  stroke: #fff;
  stroke-width: 4;
}

.game-gateway-icon {
  fill: #c084fc;
  stroke: #f3e8ff;
  stroke-width: 2;
}

.game-gateway.is-buy .game-gateway-icon {
  fill: #fbbf24;
}

.game-gateway-title,
.game-gateway-sub {
  fill: #f8fafc;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  pointer-events: none;
}

.game-gateway-title {
  font-size: 13px;
  font-weight: 800;
}

.game-gateway-sub {
  fill: #c4b5fd;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.game-gateway.is-lock {
  opacity: 0.78;
}

.software-edge {
  stroke-width: 2.5;
  stroke-dasharray: 7 6;
}

.software-gateway {
  cursor: pointer;
  outline: none;
}

.software-gateway-cell {
  fill: #0f172a;
  stroke: #475569;
  stroke-width: 3;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.software-gateway.is-buy .software-gateway-cell {
  fill: #713f12;
  stroke: #fbbf24;
  animation: mapBuyPulse 1.6s ease-in-out infinite;
}

.software-gateway.is-open .software-gateway-cell {
  fill: #065f46;
  stroke: #7dd3fc;
}

.software-gateway:focus .software-gateway-cell,
.software-gateway:hover .software-gateway-cell {
  stroke: #fff;
  stroke-width: 4;
}

.software-gateway-icon {
  fill: #38bdf6;
  stroke: #d1fae5;
  stroke-width: 2;
}

.software-gateway.is-buy .software-gateway-icon {
  fill: #fbbf24;
}

.software-gateway-title,
.software-gateway-sub {
  fill: #f8fafc;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  pointer-events: none;
}

.software-gateway-title {
  font-size: 13px;
  font-weight: 800;
}

.software-gateway-sub {
  fill: #7dd3fc;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.software-gateway.is-lock {
  opacity: 0.78;
}

.engineering-edge {
  stroke-width: 2.5;
  stroke-dasharray: 7 6;
}

.engineering-gateway {
  cursor: pointer;
  outline: none;
}

.engineering-gateway-cell {
  fill: #0f172a;
  stroke: #475569;
  stroke-width: 3;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.engineering-gateway.is-buy .engineering-gateway-cell {
  fill: #713f12;
  stroke: #fbbf24;
  animation: mapBuyPulse 1.6s ease-in-out infinite;
}

.engineering-gateway.is-open .engineering-gateway-cell {
  fill: #831843;
  stroke: #f9a8d4;
}

.engineering-gateway:focus .engineering-gateway-cell,
.engineering-gateway:hover .engineering-gateway-cell {
  stroke: #fff;
  stroke-width: 4;
}

.engineering-gateway-icon {
  fill: #f472b6;
  stroke: #fce7f3;
  stroke-width: 2;
}

.engineering-gateway.is-buy .engineering-gateway-icon {
  fill: #fbbf24;
}

.engineering-gateway-title,
.engineering-gateway-sub {
  fill: #f8fafc;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  pointer-events: none;
}

.engineering-gateway-title {
  font-size: 13px;
  font-weight: 800;
}

.engineering-gateway-sub {
  fill: #f9a8d4;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.engineering-gateway.is-lock {
  opacity: 0.78;
}

