Lifetime and size of shallow magma bodies controlled by crustal-scale magmatism