@Media to cover slim browser windows

I'm ripping my hair out trying to get a CSS stylesheet to apply when the broswer window is below a certain aspect ratio.

Today I use:

   @media (min-aspect-ratio: 9/16) {
        .MyClass {
            color: Blue;
        }
    }

    @media (min-aspect-ratio: 16/9) {
        .MyClass {
            color: Red;
        }
    }

However, when the window becomes less than 423px * 752px, the styling drops. How can I define the ratio for when the windows is slimmer?

Also, the reason I'm using aspect-ratio is so that I can code for any device, no matter their pixel density with vh and vw measurements.