
.node {
  position: absolute; z-index: 3;
  border: 2px solid rgba(0,0,0,0.15);
  border-radius: 7px; display: flex; flex-direction: column;
  overflow: visible; cursor: pointer;
  container-type: size;
}
.node:hover { cursor: pointer; }
.node.focused {
  border-width: var(--focus-border-w, 3px);
  border-color: #4a9eff;
  box-shadow: 0 0 0 var(--focus-border-w, 3px) rgba(74,158,255,0.22), 0 4px 16px rgba(0,0,0,0.12);
}
.node.linked-highlight {
  outline: var(--focus-border-w, 3px) dashed #ff9800;
  outline-offset: 3px;
}

.node.group-merge-target {
  outline: var(--focus-border-w, 3px) dashed #4caf50;
  outline-offset: 3px;
}
.node-inner {
  position: relative;
  width: 100%; height: 100%; border-radius: 5px; overflow: hidden; display: flex; flex-direction: column;
  pointer-events: none;
}

.node-interstitial {
  position: absolute; inset: 0; z-index: 0;
  display: none; align-items: center; justify-content: center;
  pointer-events: none; user-select: none;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 55cqmin; font-weight: 900; line-height: 1;
  color: rgba(255,255,255,0.92);
  -webkit-text-stroke: 5px rgba(224,92,92,0.9);
  paint-order: stroke fill;
}
.node-interstitial.show { display: flex; }
.node-content {
  --node-content-pad: 10px;
  flex: 1; outline: none; background: transparent;
  font-family: 'Segoe UI', Tahoma, sans-serif; font-size: 14px;
  line-height: 1.6; color: #111; padding: var(--node-content-pad);
  overflow-y: auto; overflow-x: hidden;
  word-wrap: break-word; white-space: pre-wrap;
  tab-size: 4;
  pointer-events: none; cursor: inherit; user-select: none;
}
.node.editing .node-content { pointer-events: auto; cursor: text; user-select: text; }
.node.editing .node-image-block { z-index: 0; }
.node-content:empty::before { content: attr(data-placeholder); color: rgba(0,0,0,0.3); }
