.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.swatches {
  display: flex;
  gap: 6px;
}

.swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}

.swatch.active {
  border-color: var(--text);
  transform: scale(1.1);
}

.brush-size {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.brush-size input {
  width: 100px;
}

#eraser-btn.active,
#clear-btn.active {
  background: var(--bg);
}

.canvas-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  background:
    linear-gradient(45deg, rgba(128,128,128,0.06) 25%, transparent 25%, transparent 75%, rgba(128,128,128,0.06) 75%),
    linear-gradient(45deg, rgba(128,128,128,0.06) 25%, transparent 25%, transparent 75%, rgba(128,128,128,0.06) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
}

#board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.draw-label {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(10px, -50%);
  z-index: 4;
  padding: 3px 9px;
  border-radius: 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: left 0.05s linear, top 0.05s linear, opacity 0.2s ease;
  opacity: 1;
}

.draw-label.fading {
  opacity: 0;
}
