Diffrent css for diffrent views

I’m facing an issue where I have a specific CSS class applied in my desktop view, but I don’t need that same styling in my tablet and mobile views. The problem is, I’m using shared classes on the client side, and if I remove the class for the tablet view, it also gets removed from the desktop view — which I don’t want.

Does anyone know how to fix this or handle it properly?