.map-stage.balanced {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(190px, 230px) minmax(250px, 1fr);
  align-items: center;
  column-gap: 46px;
  width: max-content;
  min-width: 100%;
  min-height: 420px;
  padding: 46px 54px;
}

.map-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 240px;
  z-index: 1;
}

.map-side.left { align-items: flex-end; }
.map-side.right { align-items: flex-start; }

.map-branch {
  display: flex;
  align-items: center;
  gap: 30px;
}

.map-branch.left { flex-direction: row-reverse; }
.map-branch.right { flex-direction: row; }

.map-children {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.node-stack {
  width: 205px;
  display: flex;
  flex-direction: column;
}

.map-node {
  width: 100%;
  min-height: 47px;
  border-radius: 10px;
  border: 1px solid #d9e6f3;
  background: #fff;
  box-shadow: 0 5px 16px rgba(23, 58, 93, .06);
}

.map-node.root {
  background: linear-gradient(145deg, #2f7bff, #18b6c4);
  border: 0;
  border-radius: 18px;
  width: 205px;
  min-height: 72px;
  cursor: default;
}

.map-node.branch {
  border-left: 5px solid var(--node-color);
}

.map-side.left .map-node {
  border-left: 1px solid #d9e6f3;
  border-right: 5px solid var(--node-color);
}

.map-node-detail {
  max-height: 210px;
  overflow: auto;
  margin-top: 8px;
  padding: 10px 11px;
  border: 1px solid #d8e6f4;
  border-left: 3px solid var(--node-color, #3478f6);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(23, 58, 93, .06);
}

.map-node-detail p {
  margin: 0;
  color: #46586b;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.map-node-detail small {
  display: none;
}

.map-line {
  stroke: #b6cbe1;
  stroke-width: 2;
}

@media (max-width: 900px) {
  .map-stage.balanced {
    grid-template-columns: minmax(205px, 1fr) minmax(165px, 195px) minmax(205px, 1fr);
    column-gap: 22px;
    min-height: 340px;
    padding: 28px 24px;
  }

  .node-stack,
  .map-node.root {
    width: 175px;
  }

  .map-side {
    min-width: 185px;
    gap: 18px;
  }

  .map-branch {
    gap: 18px;
  }

  .map-children {
    gap: 14px;
  }
}
