Can CSS detect mobile vs desktop?

I use custom CSS and it looks great on desktop, but it’s an absolute disaster on the phone app.

Is there a CSS code I could wrap around my CSS so that it never runs on mobile? Or is there a setting somewhere in the Android app to disable custom CSS?

Try .is-mobile

That works for some things with that class, I ended up doing custom css by browser width

/* dont run if browser 600px wide */
@media screen and (max-width: 598px) and (min-width: 0px), (min-width: 602px) {

}