When Dr. Carol Marcus designed the Genesis Device, it was meant to be detonated on the surface of a planet or moon.
When Khan set off the Genesis device, it was aboard a ship inside the Mutara Nebula and not on the surface of a planet or moon.
Seconds after the Genesis device detonates, there is a planet that looks like it is covered in huge lava lakes.
Within days (hours?), that planet is capable of supporting life.
Did the device create the planet?
Did it terraform a planet within the Mutara Nebula?
Did it terraform the planetoid where stage 2 of the Genesis Project was conducted underground?
Please provide answers supported with quotes from canon sources.