Luke Wright's 82 guides Sussex home despite late wobble