Anyone familiar with real estate law ?

** I'm not a lawyer nor a licensed realtor

Are you working with an agent or is this a FSBO?

A few issues here potentially:

Usually the appraisal is for the buyer and does not obligate the seller..it just means that the bank will only loan an amount up to the appraisal and it would be the buyer's responsibility to make up the difference.

Did your contract have a opt-out clause based upon appraisal?

Did the seller indicate they are taking back-up contracts?

Usually the deal isn't done until all negotiated contingencies are done. If there was a counter-offer following appraisal then the seller can decide not to accept the change and return the earnest money deposit as it should be held in escrow until closing and applied at that time.

State laws will give particular rules around handling of any deposits etc.