I think it is kind of misleading to say the mandate is upheld. In effect that is the case, but really it is deemed unconstitutional for Congress to mandate activity under the commerce clause. This is essentially a 1 percent tax increase on everyone, with a deduction if you buy health insurance. See:
Take a quick look at Footnote 11, which is on page 44 of the slip opinion: Those subject to the individual mandate may lawfully forgo health insurance and pay higher taxes, or buy health insurance and pay lower taxes. The only thing that they may not lawfully do is buy health insurance and not pay the resulting tax.
I compare it to a mortgage deduction. The court says it is not illegal to forgo insurance, so the "mandate" is not upheld