Hyper Suprime-Cam view of the CMASS galaxy sample. Halo mass as a function of stellar mass, size, and Sérsic index