Anyone familiar with real estate law ?

As long as the seller isn't holding your deposit, you should be safe to get it back. A third party escrow agent is one of the better situations.

Point blank I'd ask your agent, WHO has the EMD? Then you'll know.

Once you attempt to negotiate a new lower price, the original deal is technically dead. The refusal of new offer is the final nail in that coffin. Should have been paperwork to memorialize the new offer with the sellers refusal.

Back up offers are normal course of business in real estate.