The weight gain and bloating speak to not enough elimination through the kidneys. That calls for drinking enough salted water. A general recommendation is 1/4 tsp unprocessed salt per liter of water, and a minimum of 2 liters of water per day. This needs to be personalized.
The constipation is easily remedied with magnesium. What do you mean by "magnesium throws things off?"