A thin-film device comprises: a substrate; a flattening film made of an
insulating material and disposed on the substrate; and a capacitor
provided on the flattening film. The capacitor incorporates: a lower
conductor layer disposed on the flattening film; a dielectric film
disposed on the lower conductor layer; and an upper conductor layer
disposed on the dielectric film. The thickness of the dielectric film
falls within a range of 0.02 to 1 .mu.m inclusive and is smaller than the
thickness of the lower conductor layer. The surface roughness in maximum
height of the top surface of the flattening film is smaller than that of
the top surface of the substrate and equal to or smaller than the
thickness of the dielectric film. The surface roughness in maximum height
of the top surface of the lower conductor layer is equal to or smaller
than the thickness of the dielectric film.