I've come up with my own CSS selector to do just this.
.parent > .root:has(+ .paths > :not(:empty)) > div:last-child
I doubt this is much "cleaner", but I do believe this is a clearer notation.