#diagram-canvas {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  -webkit-user-select: none;
}

#diagram-canvas * {
  vector-effect: non-scaling-stroke;
}

#work-group .node {
  cursor: pointer;
}

#work-group .node.selected > .shape-path {
  stroke: var(--diagram-selection-color) !important;
  stroke-width: 2 !important;
}

.marquee-rect {
  fill: rgba(37, 99, 235, 0.1);
  stroke: var(--diagram-selection-color);
  stroke-width: 1;
  stroke-dasharray: 4;
}

.guide-line {
  stroke: var(--diagram-guide-color);
  stroke-width: 1;
  stroke-dasharray: 4;
}

.guide-line.center {
  stroke: var(--diagram-guide-center-color);
}

.selection-handle {
  fill: #fff;
  stroke: var(--diagram-selection-color);
  stroke-width: 1.5;
  cursor: pointer;
}
.selection-handle:hover {
  fill: var(--diagram-selection-color);
}
.selection-handle.nw-resize, .selection-handle.se-resize { cursor: nwse-resize; }
.selection-handle.ne-resize, .selection-handle.sw-resize { cursor: nesw-resize; }
.selection-handle.n-resize, .selection-handle.s-resize { cursor: ns-resize; }
.selection-handle.e-resize, .selection-handle.w-resize { cursor: ew-resize; }

.anchor-point {
  fill: #fff;
  stroke: var(--diagram-anchor-color);
  stroke-width: 2;
  cursor: crosshair;
  opacity: 0;
  transition: opacity var(--transition);
}

.node:hover .anchor-point, .anchor-point:hover {
  opacity: 1;
}

#inline-editor-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
}

.inline-input {
  position: absolute;
  pointer-events: auto;
  background: transparent;
  border: 1px dashed var(--diagram-selection-color);
  color: var(--diagram-node-text);
  font-family: var(--site-font);
  text-align: center;
  outline: none;
  resize: none;
  overflow: hidden;
  z-index: 100;
}

.context-menu {
  position: fixed;
  z-index: 100000;
  background: var(--site-surface, #ffffff);
  border: 1px solid var(--site-border, #cbd5e1);
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 6px 0;
  min-width: 180px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: var(--site-text, #1e293b);
  user-select: none;
}

.context-menu.hidden {
  display: none !important;
}

.context-menu .menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.context-menu .menu-item:hover {
  background: var(--site-hover, #f1f5f9);
  color: var(--site-accent, #2563eb);
}

.context-menu .menu-icon {
  margin-right: 8px;
  font-size: 14px;
}

.context-menu .shortcut {
  font-size: 11px;
  color: #94a3b8;
  margin-left: 16px;
}

.context-menu .menu-divider {
  height: 1px;
  background: var(--site-border, #e2e8f0);
  margin: 4px 0;
}
