After taking 10-point lead into the fourth quarter, 49ers wind up losing 31-20.