* { margin: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; font-family: system-ui, sans-serif; background: #dcdde4; }
#view { display: block; touch-action: none; cursor: crosshair; }
#toolbar {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; align-items: center;
  background: #1e1f26; color: #e8e8ee; padding: 8px 12px; border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
}
#toolbar .tool {
  font-size: 18px; line-height: 1; background: none; border: none;
  padding: 5px 8px; border-radius: 6px; cursor: pointer;
}
#toolbar .tool:hover { background: #34363f; }
#toolbar .tool.active, #toolbar .tool.active:hover { background: #3b6cff; }
#toolbar input[type=color] {
  width: 34px; height: 30px; padding: 0; border: none; background: none; cursor: pointer;
}
#toolbar .chip {
  font-size: 11px; font-family: ui-monospace, monospace; color: #9aa0ae;
  background: #2a2c35; border: none; padding: 5px 8px; border-radius: 6px; cursor: pointer;
}
#toolbar .chip:hover { background: #34363f; color: #e8e8ee; }
#status {
  font-size: 12px; color: #9aa0ae; margin-left: 6px; min-width: 130px;
  text-align: right; font-variant-numeric: tabular-nums;
}
#hint {
  position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: #666; background: rgba(255, 255, 255, .75);
  padding: 3px 12px; border-radius: 8px; pointer-events: none; white-space: nowrap;
}
