Clockwork Planet (Light Novel) Vol. 4 by Yuu Kamiya
The Earth has died, but the entire planet has been reconstructed using gears and clockwork. One thousand years later, a mysterious black box crashes into the house of a high school gearhead named Naoto Miura, a machine otaku who is obsessed with tinkering. The box contains the broken body of an automaton girl. When Naoto repairs the automaton and she becomes his clockwork companion, Naoto's world will never be the same again.