You should see if the `mutiple_layouts` plugin provides what you want.
Of course, your theme can always make whatever check it wants and load an appropriate CSS file. For instance several of the standard themes have the CSS scheme selectable by an option.
As to the "class", that could be a unique tag or some data placed in the "custom data" field.