Semiclassical unified description of wobbling motion in even-even and even-odd nuclei