Lamellar nanoporous gold thin films with tunable porosity for ultrasensitive SERS detection in liquid and gas phase.