Medium modification of singly heavy baryons in a pion-mean-field approach