.v2-mindmap {
  min-height: 60vh;
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(194, 73, 53, 0.5);
  overflow: auto;
}

.v2-mindmap__zoom {
  position: sticky;
  top: 8px;
  left: calc(100% - 92px);
  z-index: 5;
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: rgba(245, 249, 239, 0.82);
  border: 1px solid rgba(31, 47, 42, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.v2-mindmap__zoom .v2-btn {
  padding: 6px 10px;
  border-radius: 999px;
  line-height: 1;
  min-width: 38px;
}

.v2-mindmap__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.v2-mindmap__nodes {
  position: relative;
  min-height: 60vh;
}

.v2-mindmap__edge {
  fill: none;
  stroke: rgba(194, 73, 53, 0.8);
  stroke-width: 2;
  transition: stroke .2s ease, stroke-width .2s ease;
}

.v2-mindmap__edge.is-pulse {
  stroke: rgba(194, 73, 53, 1);
  stroke-width: 3;
}

.mindmap-node {
  position: absolute;
  width: 220px;
  background: #fffdf8;
  border: 1px solid rgba(31, 47, 42, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
  cursor: grab;
  user-select: none;
  animation: node-appear .2s ease both;
}

.mindmap-node.is-selected {
  outline: 2px solid rgba(194, 73, 53, 0.55);
}

.mindmap-node.is-dragging {
  cursor: grabbing;
}

.mindmap-node.is-done .mindmap-node__title-text {
  text-decoration: line-through;
  color: rgba(31, 47, 42, 0.6);
}

/* Нумерация этапа (1, 1.2) — «красная нить», не зависит от feature flags */
.node-full-code {
  color: #c24935;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-right: 2px;
}

.mindmap-node__knot {
  color: var(--accent-thread);
  font-size: 14px;
}

.mindmap-node.is-done .mindmap-node__knot {
  animation: knot-pop .3s ease;
}

.mindmap-node__title {
  margin: 6px 0;
  font-size: 0.95rem;
}

.mindmap-node__description {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(31, 47, 42, 0.8);
}

@keyframes node-appear {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes knot-pop {
  from { transform: scale(0) rotate(0deg); opacity: 0; }
  to { transform: scale(1) rotate(360deg); opacity: 1; }
}

@media (max-width: 768px) {
  .v2-mindmap {
    min-height: 68vh;
  }
  .v2-mindmap__nodes {
    min-height: 68vh;
  }
  .mindmap-node {
    width: 170px;
    padding: 8px 10px;
  }
  .mindmap-node__title {
    font-size: 0.86rem;
  }
  .mindmap-node__description {
    font-size: 0.74rem;
  }
}
