body.canvas-batch-ready .canvas-toolrail .node-tool:not(.canvas-batch-tool):not(.canvas-module-tool):not(.canvas-edit-tool) {
  display: none !important;
}

.canvas-module-tool {
  color: #4f68ca;
  border-color: #d7def6 !important;
  background: #fff !important;
}

.canvas-module-tool:hover {
  color: #315bd8;
  border-color: #92a8ef !important;
  background: #f3f6ff !important;
}

.canvas-module-node {
  position: absolute;
  z-index: 26;
  width: 322px;
  box-sizing: border-box;
  overflow: visible;
  color: #252930;
  background: rgba(255, 255, 255, 0.99);
  border: 1px solid #dce1ea;
  border-radius: 15px;
  box-shadow: 0 15px 36px rgba(43, 53, 78, 0.14);
  pointer-events: all;
  user-select: none;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif;
}

.canvas-module-node.selected,
.canvas-module-node:focus-within,
.canvas-module-node[data-connected="true"] {
  border-color: #718ef0;
  box-shadow: 0 0 0 1px rgba(83, 116, 230, 0.18), 0 18px 42px rgba(43, 53, 78, 0.16);
}

.canvas-module-header {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid #eceff4;
  cursor: grab;
}

.canvas-module-header:active { cursor: grabbing; }
.canvas-module-grip { color: #a9b0bc; font-size: 14px; }
.canvas-module-caption { flex: 1; font-size: 12px; font-weight: 720; }
.canvas-module-connected { color: #7a8494; font-size: 9px; font-weight: 500; }

.canvas-module-delete {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  color: #949ba6;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.canvas-module-delete:hover,
.canvas-module-row-delete:hover,
.canvas-module-image-delete:hover {
  color: #b44c39;
  background: #fff1ee;
}

.canvas-module-controls {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #edf0f4;
}

.canvas-module-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: #f1f3f7;
}

.canvas-module-switch button {
  min-height: 31px;
  border: 0;
  border-radius: 7px;
  color: #69717e;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.canvas-module-switch button.is-active {
  color: #315bd8;
  background: #fff;
  box-shadow: 0 2px 7px rgba(43, 53, 78, 0.11);
}

.canvas-module-content { padding: 11px 12px 5px; }

.canvas-module-rows {
  overflow: hidden;
  border: 1px solid #e1e5ec;
  border-radius: 9px;
  background: #fff;
}

.canvas-module-row {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  min-height: 43px;
  border-bottom: 1px solid #edf0f4;
}

.canvas-module-row:last-child { border-bottom: 0; }

.canvas-module-row-number {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 7px;
  color: #4167dd;
  background: #eef3ff;
  font-size: 10px;
  font-weight: 720;
}

.canvas-module-row-input {
  width: 100%;
  height: 36px;
  border: 0;
  outline: none;
  padding: 0 7px;
  color: #292d33;
  background: transparent;
  font-size: 11px;
}

.canvas-module-row-delete,
.canvas-module-image-delete {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 7px;
  color: #9aa1ac;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
}

.canvas-module-images {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.canvas-module-image,
.canvas-module-image-add {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  margin: 0;
  border: 1px solid #e1e5ec;
  border-radius: 9px;
  background: #f5f7fa;
}

.canvas-module-image img { width: 100%; height: 100%; display: block; object-fit: cover; }

.canvas-module-image-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  color: #fff;
  background: rgba(24, 27, 33, 0.72);
}

.canvas-module-image-add {
  display: grid;
  place-items: center;
  border-style: dashed;
  color: #5470d5;
  cursor: pointer;
  font-size: 18px;
}

.canvas-module-footer {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
}

.canvas-module-count {
  border-radius: 16px;
  padding: 6px 10px;
  color: #3c61d5;
  background: #eef3ff;
  font-size: 10px;
  font-weight: 700;
}

.canvas-module-helper { color: #9299a4; font-size: 9px; }

.canvas-module-add,
.canvas-module-connect {
  min-height: 28px;
  border: 1px solid #dce1e9;
  border-radius: 8px;
  padding: 0 10px;
  color: #59616e;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
}

.canvas-module-add:hover,
.canvas-module-connect:hover {
  color: #315bd8;
  border-color: #8fa5ed;
  background: #f4f7ff;
}

.canvas-module-connect {
  color: #3d61d2;
  border-color: #cfd9fa;
  background: #f4f7ff;
}

.canvas-module-port {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  border: 2px solid #5f7feb;
  border-radius: 50%;
  padding: 0;
  background: #fff;
  cursor: crosshair;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92);
}

.canvas-module-port:hover { background: #5f7feb; }
.canvas-module-port-input { left: -11px; }
.canvas-module-port-output { right: -11px; }

.canvas-batch-builder > .canvas-module-port-input {
  top: 50%;
  z-index: 8;
}

body.canvas-module-linking [data-canvas-batch-builder],
body.canvas-module-linking [data-canvas-module-node] {
  outline: 3px solid rgba(82, 118, 235, 0.35);
  outline-offset: 4px;
}

body.canvas-module-linking [data-canvas-batch-builder]::after {
  content: "松开或点击主体即可连接";
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  color: #315bd8;
  background: rgba(239, 244, 255, 0.72);
  font-size: 15px;
  font-weight: 750;
  pointer-events: none;
}

.canvas-module-edges {
  position: absolute;
  z-index: 20;
  inset: 0 auto auto 0;
  width: 2400px;
  height: 1800px;
  overflow: visible;
  pointer-events: none;
}

.canvas-module-edges path {
  fill: none;
  stroke: #718ef0;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.canvas-module-edges path.is-preview {
  stroke-dasharray: 6 6;
  opacity: 0.76;
}

.canvas-module-notice {
  position: absolute;
  z-index: 90;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 14px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid #dce2ed;
  border-radius: 10px;
  padding: 9px 14px;
  color: #4c5563;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 28px rgba(39, 49, 74, 0.15);
  font-size: 11px;
  transition: 0.18s ease;
}

.canvas-module-notice[data-visible="true"] { transform: translate(-50%, 0); opacity: 1; }
.canvas-module-notice[data-tone="success"] { color: #277a54; border-color: #bfe3d2; }
.canvas-module-notice[data-tone="error"] { color: #b34b35; border-color: #efc8bf; }
