.board {
  position: absolute;
  top: 44px; left: 52px; right: 0; bottom: 0;
  background-color: #edeae4;
  background-image: radial-gradient(circle, #b8b5ae 1px, transparent 1px);
  background-size: 24px 24px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
}
.board.grabbing { cursor: grabbing; }
.board.crosshair { cursor: crosshair; }

.world {
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  width: 0; height: 0;
}

.svg-connectors, .svg-draw {
  position: absolute;
  top: 0; left: 0;
  width: 8000px; height: 8000px;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}
.svg-draw { z-index: 2; }

/* Zoom controls */
.zoom-controls {
  position: absolute;
  bottom: 14px; right: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 200;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.zoom-btn {
  width: 30px; height: 30px;
  border-radius: 6px;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition: background .1s;
}
.zoom-btn:hover { background: #f0ede8; }
.zoom-level {
  font-size: 11px;
  color: #666;
  min-width: 40px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Tool hint */
.tool-hint {
  position: absolute;
  bottom: 14px; left: 14px;
  font-size: 10px;
  color: #999;
  z-index: 200;
  letter-spacing: .03em;
  pointer-events: none;
}

/* Frame navigation */
.frame-nav {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 5px;
  z-index: 200;
  background: rgba(26,26,24,0.88);
  border-radius: 20px;
  padding: 5px 10px;
  backdrop-filter: blur(4px);
  max-width: calc(100% - 40px);
  overflow-x: auto;
}
.frame-nav.visible { display: flex; }
.frame-nav-btn {
  border: none;
  border-radius: 14px;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s, transform .1s;
  opacity: .7;
}
.frame-nav-btn:hover { opacity: 1; transform: scale(1.05); }
.frame-nav-btn.active { opacity: 1; }
.frame-nav-item {
  display: flex;
  align-items: center;
  gap: 1px;
}
.frame-nav-arrow {
  background: none;
  border: none;
  color: rgba(255,255,255,.45);
  font-size: 7px;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  transition: color .12s;
  display: flex;
  align-items: center;
}
.frame-nav-arrow:hover { color: rgba(255,255,255,.9); }

/* Selection rectangle */
.selection-rect {
  position: absolute;
  border: 1.5px solid #4a90d9;
  background: rgba(74, 144, 217, 0.08);
  pointer-events: none;
  z-index: 310;
}
