A thin-film device incorporates: a substrate; an insulating layer, a
plurality of lower conductor layers, a dielectric film, an insulating
layer, a plurality of upper conductor layers and a protection film that
are stacked in this order on the substrate; and a plurality of terminal
electrodes. One of the terminal electrodes is connected to one of the
lower conductor layers. The one of the lower conductor layers has a
protruding portion that protrudes to extend more outward in a lateral
direction than a side surface of the insulating layer. The one of the
terminal electrodes has a concave portion that accommodates and touches
at least part of the protruding portion, and touches the side surface of
the insulating layer.