CSS is so good these days. Just figured out that you can use media queries to detect whether a PWA is running in standalone mode and act accordingly without resorting to JS. We have it so good compared to what it was even a few years ago.