.pb-canvas-host {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  user-select: none;
}
.pb-canvas-svg {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}
.pb-canvas-svg:focus-visible {
  outline: 2px solid #438d78;
  outline-offset: -3px;
  border-radius: inherit;
}
.pb-node, .pb-edge { outline: none; }
.pb-node { cursor: grab; }
.pb-node:active { cursor: grabbing; }
.pb-edge { cursor: pointer; }
.pb-node-text, .pb-edge-label {
  font-family: "Segoe UI", Arial, sans-serif;
  pointer-events: none;
  user-select: none;
}
.pb-node-text { font-weight: 620; letter-spacing: -.2px; }
.pb-edge-label { font-weight: 600; }
.pb-node-body { transition: stroke .12s; }
.pb-node:focus-visible .pb-node-body, .pb-node.is-selected .pb-node-body {
  stroke: #176758;
  stroke-width: 2.3px;
}
.pb-edge.is-selected .pb-wire, .pb-edge:focus-visible .pb-wire { stroke-width: 2.3px; }
.pb-edge:focus-visible .pb-wire-hit { stroke: #176758; stroke-opacity: .16; stroke-width: 7px; }
.pb-edge.is-selected .pb-label-body, .pb-edge:focus-visible .pb-label-body { stroke: #176758; }
.pb-edge.pb-insert-target .pb-wire { stroke: #176758; stroke-width: 4px; vector-effect: non-scaling-stroke; }
.pb-edge.pb-insert-target .pb-label-body { fill: #e2f3eb; stroke: #176758; stroke-width: 1.5px; }
.pb-handle { opacity: 0; pointer-events: none; cursor: crosshair; }
.pb-node:hover .pb-handle,
.pb-canvas-host:not(.multi-selected) .pb-node.is-selected .pb-handle,
.pb-node:focus-visible .pb-handle,
[data-tool="connect"] .pb-handle,
.is-connecting .pb-handle { opacity: 1; pointer-events: all; }
.pb-handle:hover circle:last-child { fill: #176758; stroke: #fff; stroke-width: 2px; }
.pb-handle:focus-visible { outline: none; }
.pb-handle:focus-visible circle:last-child { stroke: #153c79; stroke-width: 3px; fill: #cde8ff; }
.pb-resize-controls { pointer-events: none; }
.pb-resize-frame { fill: none; stroke: #176758; stroke-width: .8px; stroke-opacity: .55; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.pb-resize-grip { transform: scale(var(--pb-control-scale,1)); pointer-events: all; }
.pb-resize-grip:is([data-resize="nw"],[data-resize="se"]) { cursor: nwse-resize; }
.pb-resize-grip:is([data-resize="ne"],[data-resize="sw"]) { cursor: nesw-resize; }
.pb-grip-face { fill: white; stroke: #176758; stroke-width: 1.5px; }
.pb-resize-grip:hover .pb-grip-face { fill: #d6efe6; }
.pb-route-grip { transform: scale(var(--pb-control-scale,1)); cursor: move; outline: none; }
.pb-route-grip:hover .pb-grip-face { fill: #d6efe6; }
.pb-route-grip:focus-visible .pb-grip-face { fill: #cde8ff; stroke: #153c79; stroke-width: 2.5px; }
.pb-canvas-host.placing-shape :is(.pb-canvas-svg, .pb-canvas-svg *),
.pb-canvas-host[data-tool="connect"] :is(.pb-canvas-svg, .pb-canvas-svg *),
.pb-canvas-host.is-connecting :is(.pb-canvas-svg, .pb-canvas-svg *) { cursor: crosshair; }
.pb-canvas-host[data-tool="pan"] :is(.pb-canvas-svg, .pb-canvas-svg *),
.pb-canvas-host.space-pan :is(.pb-canvas-svg, .pb-canvas-svg *) { cursor: grab; }
.pb-canvas-host.is-panning :is(.pb-canvas-svg, .pb-canvas-svg *) { cursor: grabbing; }
.pb-marquee {
  fill: #408f79;
  fill-opacity: .10;
  stroke: #176758;
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.pb-alignment-guide {
  stroke: #9256bd;
  stroke-width: 1.4px;
  stroke-dasharray: 5 3;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.pb-canvas-edit {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  display: block;
  margin: 0;
  padding: 0;
  user-select: text;
}
.editing-text .pb-node-text, .editing-text .pb-edge-label { visibility: hidden; }
.pb-canvas-edit input, .pb-canvas-edit textarea {
  display: block;
  box-sizing: border-box;
  resize: none;
  width: 100%;
  margin: 0;
  padding: 2px 4px;
  border: 1px solid #277763;
  border-radius: 4px;
  background: #fffefa;
  color: #25352d;
  outline: 2px solid #1767582e;
  outline-offset: 1px;
  font: 600 15px/1.19 "Segoe UI", Arial, sans-serif;
  letter-spacing: -.2px;
}
.pb-canvas-edit ::selection { background: #cde9db; color: #14362c; }

.pb-connection-picker {
  position: fixed; inset: auto; z-index: 100;
  box-sizing: border-box; display: flex; flex-direction: column;
  width: 174px; margin: 0; padding: 5px; overflow: hidden;
  color: #202727; background: #fff; border: 1px solid #d1d9d3; border-radius: 9px;
  box-shadow: 0 5px 18px #1a30251c, 0 1px 3px #1a302512;
  font: 500 13px/1.3 Inter, "Segoe UI", Arial, sans-serif;
  user-select: none;
}
.pb-connection-picker::backdrop { background: transparent; pointer-events: none; }
.pb-connection-picker-heading {
  flex: none; padding: 5px 7px 8px; margin-bottom: 3px; border-bottom: 1px solid #e5e9e5;
  color: #596660; font-size: 11px; font-weight: 600;
}
.pb-connection-picker-list { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.pb-connection-picker button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 5px 8px;
  color: inherit; background: transparent; border: 0; border-radius: 4px; font: inherit; text-align: left;
  cursor: pointer; touch-action: manipulation;
}
.pb-connection-picker button:hover { background: #f0f4f0; }
.pb-connection-picker button:focus-visible { background: #edf4ef; outline: 2px solid #176758; outline-offset: -2px; }
.pb-connection-picker button:active { background: #dcece1; }
.pb-connection-picker svg { display: block; width: 22px; height: 17px; flex: none; fill: none; stroke: #426657; stroke-width: 1.55; }
@media (pointer: coarse) {
  .pb-connection-picker button { min-height: 40px; }
}

:root[data-theme="dark"] {
  --pb-accent: #83d7bc;
  --pb-control-bg: #202a2d;
  --pb-hover-bg: #334840;
  --pb-focus: #b3d9ff;
}
[data-theme="dark"] .pb-canvas-svg:focus-visible { outline-color: var(--pb-accent); }
[data-theme="dark"] :is(.pb-node:focus-visible,.pb-node.is-selected) .pb-node-body,
[data-theme="dark"] :is(.pb-edge:focus-visible,.pb-edge.is-selected,.pb-edge.pb-insert-target) .pb-label-body,
[data-theme="dark"] .pb-edge.pb-insert-target .pb-wire,
[data-theme="dark"] .pb-edge:focus-visible .pb-wire-hit,
[data-theme="dark"] .pb-resize-frame { stroke: var(--pb-accent); }
[data-theme="dark"] .pb-edge.pb-insert-target .pb-label-body { fill: var(--pb-hover-bg); }
[data-theme="dark"] .pb-handle circle:last-child,
[data-theme="dark"] .pb-grip-face { fill: var(--pb-control-bg); stroke: var(--pb-accent); }
[data-theme="dark"] .pb-handle:hover circle:last-child,
[data-theme="dark"] :is(.pb-resize-grip,.pb-route-grip):hover .pb-grip-face { fill: var(--pb-accent); stroke: #193e32; }
[data-theme="dark"] .pb-handle:focus-visible circle:last-child,
[data-theme="dark"] .pb-route-grip:focus-visible .pb-grip-face { fill: #233b50; stroke: var(--pb-focus); }
[data-theme="dark"] .pb-marquee { fill: var(--pb-accent); stroke: var(--pb-accent); }
[data-theme="dark"] .pb-alignment-guide { stroke: #d7a8ff; }
[data-theme="dark"] .pb-canvas-edit :is(input,textarea) {
  background: #222b2e; color: #f0f4f2; border-color: var(--pb-accent); outline-color: #83d7bc50;
}
[data-theme="dark"] .pb-canvas-edit ::selection { background: #436b5e; color: #fff; }
[data-theme="dark"] .pb-connection-picker { color: #edf1ef; background: #252c30; border-color: #52605e; box-shadow: 0 5px 18px #0006; }
[data-theme="dark"] .pb-connection-picker-heading { color: #bccbc4; border-color: #47504d; }
[data-theme="dark"] .pb-connection-picker button:is(:hover,:focus-visible,:active) { background: var(--pb-hover-bg); }
[data-theme="dark"] .pb-connection-picker button:focus-visible { outline-color: var(--pb-accent); }
[data-theme="dark"] .pb-connection-picker svg { stroke: #a1cbb9; }
