body {
  font-family: sans-serif;
  background: #f4f4f4;
  margin: 0;
  padding: 1rem;
}
.home {
  padding: 0.5rem;
}
.header-flex {
  display: flex;
  align-items: center;
  gap: 1em; /* ナビとh1の間にスペース */
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.gallery article {
  background: #fff;
  padding: 0.5rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}
.gallery img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 4px;
}
.caption {
  margin-top: 0.5rem;
  font-size: 0.85em;
  color: #333;
}
.viewer {
  text-align: center;
}
.viewer figure {
  margin: 1rem auto;
}
.viewer img {
  max-width: 90%;
  height: auto;
}
.viewer figcaption {
  font-size: 1.6rem;
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: #222;
  line-height: 1.4;
}
.nav-links {
  margin: 1rem;
}
.nav-links a {
  margin: 0 1rem;
  text-decoration: none;
  font-weight: bold;
  color: #336699;
}
