Stable maps to Looijenga pairs