Prompt used

Build me a single self-contained HTML file: a gravity sandbox. A sun in the centre with a couple of orbiting planets. Let me click-drag to fling in a new planet with velocity, orbiting realistically under gravity with a fading trail. Bodies collide and merge. Slider for gravity strength, a reset button. No libraries, one HTML file.