What are media queries in HTML/CSS, and how do they work?

Media queries apply CSS styles conditionally based on device characteristics (e.g., width, height, orientation). This is essential for responsive design.

Example:

@media (max-width: 600px) {
  body {
    background-color: lightblue;
  }
}