body {
  font-family: Inter, sans-serif;
  touch-action: pan-y;
}
.tool-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

/* ── Canvas ── */
#canvas-wrap {
  position: relative;
  width: 100%;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: crosshair;
  touch-action: none;
}
#doodle-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Tool buttons ── */
.tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 4px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: #374151;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  flex: 1;
  min-width: 0;
}
.tool-btn:hover {
  background: #f0fdf4;
  border-color: #6ee7b7;
}
.tool-btn.active {
  background: #ecfdf5;
  border-color: #059669;
  color: #065f46;
}
.tool-btn .icon {
  font-size: 18px;
  line-height: 1;
}

/* ── Colour swatches ── */
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s,
    border-color 0.15s;
  flex-shrink: 0;
}
.swatch:hover {
  transform: scale(1.15);
}
.swatch.active {
  border-color: #059669;
  transform: scale(1.15);
}

/* ── Size slider ── */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #e5e7eb;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #059669;
  cursor: pointer;
}

/* ── Action bar ── */
.act-btn {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.act-btn:hover {
  background: #f3f4f6;
}

/* ── Opacity preview dot ── */
#brush-preview {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #000;
  transition: all 0.2s;
  flex-shrink: 0;
}

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  color: #fff;
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  z-index: 99;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
