* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #f5f5f5;
  overflow: hidden;
  touch-action: none;
}

.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

#canvas {
  flex: 1;
  background: white;
  cursor: crosshair;
  touch-action: none;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px;
  background: white;
  border-top: 1px solid #e0e0e0;
  gap: 8px;
}

.tool-btn, .color-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: #f0f0f0;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-btn:active, .color-btn:active {
  transform: scale(0.9);
}

.tool-btn.active, .color-btn.active {
  background: #e0e0e0;
  box-shadow: 0 0 0 2px #007AFF;
}

.color-palette {
  display: flex;
  gap: 8px;
}

.color-btn {
  border: 2px solid transparent;
}

.color-btn.active {
  border-color: #007AFF;
}

.size-slider {
  padding: 8px 16px;
  background: white;
  border-top: 1px solid #e0e0e0;
}

input[type="range"] {
  width: 100%;
  height: 32px;
  -webkit-appearance: none;
  background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #007AFF;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
}
