/* Agent labels stay inside the compact canvas at the bottom of their paths. */
.wr-journey-map-inner > [style*="animation:jn-c"] > span {
  top: -28px !important;
  left: 32px !important;
}
.wr-journey-map-inner > [style*="animation:jn-cdon-draper"] > span {
  left: auto !important;
  right: 34px !important;
}

/* Keep the six nodes readable when the chat would leave too little canvas.
   The existing .9/.85 scaling and 540/510px canvas heights remain in place. */
@media (max-width:1199px) {
  .wr-journeys .wr-journey-labels { display: none !important; }
  .wr-journeys .wr-journey-workspace.responsive-grid {
    grid-template-columns: minmax(0,1fr) !important;
    gap: 20px !important;
  }
  .wr-journeys .wr-journey-workspace > div { min-width: 0; }
  .wr-journeys .wr-journey-divider { display: none !important; }
  .wr-journeys .wr-journey-chat { min-height: 0; max-width: 100%; }
  .wr-journeys .wr-journey-chat::before {
    content: '01 · Describe it in chat';
    display: block;
    margin-bottom: 18px;
    font-size: 16px;
  }
  .wr-journeys .wr-journey-chat > div {
    height: auto !important;
    min-height: 300px;
  }
  .wr-journeys .wr-journey-map::before {
    content: '02 · Agents build it on the canvas';
    display: block;
    margin: 10px 0 18px;
    font-size: 16px;
  }
}

/* A fixed-coordinate diagram needs a reachable left edge while panning.
   Center it whenever it fits; start at zero whenever horizontal scroll is needed. */
@media (max-width:900px) {
  .wr-journeys .wr-journey-canvas {
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
  }
  .wr-journeys .wr-journey-map-inner {
    left: 0 !important;
    margin-left: max(0px, calc((100% - 760px) / 2)) !important;
  }
}
