Cozy mysteries, also referred to as "cozies", are a subgenre of crime fiction in which sex and violence are downplayed or treated humorously, and the crime and detection take place in a small, socially intimate community. The term was first coined in the late 20th century when various writers produced work in an attempt to re-create the Golden Age of Detective Fiction.
The detectives in such stories are nearly always amateurs (village policeman Hamish Macbeth, featured in a series of novels by M. C. Beaton, is a notable exception) and are frequently women. These characters are typically well educated, intuitive, and hold jobs (e.g., caterer, innkeeper, librarian, teacher, dog trainer, shop owner, reporter) that bring them into constant contact with other residents of their community and the surrounding region. Like other amateur detectives, they typically have a contact on the police force who can give them access to important information about the case at hand, but the contact is typically a spouse, lover, friend, or family member rather than a former colleague. Dismissed by the authorities in general as nosy busybodies (particularly if they are middle-aged or elderly women), the detectives in cozy mysteries are thus left free to eavesdrop, gather clues, and use their native intelligence and intuitive "feel" for the social dynamics of the community to solve the crime.
The murderers in cozies are typically neither psychopaths nor serial killers, and, once unmasked, are usually taken into custody without violence. They are generally members of the community where the murder occurs and able to hide in plain sight, and their motives—greed, jealousy, revenge—are often rooted in events years, or even generations, old. The murderers are typically rational and often highly articulate, enabling them to explain, or elaborate on, their motives after their unmasking.
The supporting characters in cozy mysteries are often very broadly drawn and used as comic relief. The accumulation of such characters in long-running cozy mystery series, such as those of Charlotte MacLeod, frequently creates a stock company of eccentrics, among whom the detective stands out as the most (perhaps only) truly sane person.
One subtle joke in such series is how the main character constantly becomes embroiled in so many high-profile cases, often by accident. A long-running joke about the series Murder, She Wrote was how the main character/detective had to be the actual murderer in every case, because, "No matter where she goes, somebody dies!"