.hero-map {
  width: min(920px, 100%);
  margin: 0 auto;
}

.map-frame {
  position: relative;
  height: 430px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, #061225, #091827);
  background-size: 32px 32px, 32px 32px, 100% 100%;
  box-shadow:
    inset 0 0 40px rgba(56, 189, 248, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.35);
}

.map-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.hero-line {
  stroke: rgba(56, 189, 248, 0.95);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.9));
  opacity: 0;
  transition: opacity 350ms ease;
  will-change: stroke-dashoffset, opacity;
}

.hero-line.is-visible {
  opacity: 1;
}

.hero-line.is-removing {
  opacity: 0;
}

.hero-node {
  position: absolute;

  /* ↓ Reduce size slightly */
  width: 130px;              /* was ~150 */
  min-height: 58px;          /* was ~70 */
  padding: 10px 14px;        /* slightly tighter */

  border-radius: 14px;

  color: #f8fafc;
  font-weight: 700;          /* slightly lighter than root */
  font-size: 13px;           /* slightly smaller text */

  text-align: center;
  display: grid;
  place-items: center;

  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.86);

  box-shadow: 0 0 18px rgba(14, 165, 233, 0.2);

  transform: translate(-50%, -50%) scale(0);
  opacity: 0;

  z-index: 2;

  transition:
    transform 520ms cubic-bezier(.2, .9, .2, 1.2),
    opacity 420ms ease;
}

.hero-node.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.node-main {
  left: 50%;
  top: 50%;

  width: 170px;           /* slightly larger */
  min-height: 58px;

  font-size: 15px;        /* slightly bigger */
  font-weight: 800;

  transform: translate(-50%, -50%) scale(1);
  opacity: 1;

  background: linear-gradient(180deg, #0ea5e9, #0284c7);

  box-shadow: 0 0 32px rgba(14, 165, 233, 0.9);

  z-index: 4;
}

.hero-node[data-tone="cyan"] {
  background: linear-gradient(180deg, #0891b2, #0e7490);
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.55);
}

.hero-node[data-tone="purple"] {
  background: linear-gradient(180deg, #7c3aed, #4c1d95);
  box-shadow: 0 0 26px rgba(168, 85, 247, 0.55);
}

.hero-node[data-tone="yellow"] {
  background: linear-gradient(180deg, #ca8a04, #713f12);
  box-shadow: 0 0 26px rgba(250, 204, 21, 0.45);
}

.hero-node[data-tone="green"] {
  background: linear-gradient(180deg, #16a34a, #14532d);
  box-shadow: 0 0 26px rgba(34, 197, 94, 0.45);
}

.hero-node[data-tone="pink"] {
  background: linear-gradient(180deg, #db2777, #831843);
  box-shadow: 0 0 26px rgba(244, 114, 182, 0.5);
}

.hero-node[data-tone="blue"] {
  background: linear-gradient(180deg, #2563eb, #1e3a8a);
  box-shadow: 0 0 26px rgba(96, 165, 250, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .hero-node,
  .hero-line {
    animation: none !important;
    transition: none !important;
  }
}