Two novel lead(II) carboxyphosphonates with a layered and a 3D framework structure: syntheses, crystal structures, reversible dehydration/hydration, and luminescence properties.