/* ---------- Canvas ---------- */
.canvas-viewport {
  position: relative;
  /* Fills whatever room .app-body's flex row leaves it — the rest goes to
     .media-sidebar when it's open, or all of it when the sidebar is
     hidden (display: none removes it from the flex row entirely). */
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(var(--grid-dot) 1.3px, transparent 1.3px) 0 0 / 26px 26px,
    var(--bg);
  cursor: var(--cursor-black);
}
.canvas-viewport.panning { cursor: grabbing; }
.canvas-viewport.space-pan { cursor: grab; }

.marquee-rect {
  position: absolute;
  border: 1.4px solid var(--accent);
  background: rgba(59, 110, 246, 0.10);
  pointer-events: none;
  z-index: 15;
  display: none;
}
.marquee-rect.active { display: block; }

.canvas-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  transform-origin: 0 0;
  will-change: transform;
}

.link-layer {
  position: absolute;
  overflow: visible;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.node-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
}

.group-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
}

.hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--ink-soft);
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 5;
  white-space: nowrap;
}
.hint.faded { opacity: 0; }
