@charset "UTF-8";

.gallery {
  padding-top: 100px;
  padding-bottom: 15px;
}

.gallery-group-heading {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}

.gallery-group-heading h3 {
  flex-shrink: 0;
  font-size: 20px;
  letter-spacing: .08em;
}

.gallery-group-heading > span {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.gallery-group-heading > p {
  font-size: 11px;
  color: #64798a;
  letter-spacing: .05em;
}

.gallery-featured-grid,
.gallery-detail-grid,
.gallery-kyogen-grid {
  display: grid;
  gap: 24px;
  align-items: start;
}

.gallery-featured-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px;
}

.gallery-kyogen-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-photo {
  min-width: 0;
}

.gallery-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: var(--pale);
}

.gallery-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-featured-grid .gallery-frame {
  height: 410px;
}

.gallery-detail-grid .gallery-frame {
  height: 340px;
}

.gallery-photo--small img {
  max-width: min(100%, 200px);
}

.gallery-kyogen-grid .gallery-frame {
  height: 430px;
}

.gallery-photo figcaption {
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--red);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: .04em;
}

.gallery-group--kyogen {
  margin-top: 52px;
}

@media (max-width: 1100px) {
  .gallery-featured-grid .gallery-frame { height: 350px; }
  .gallery-detail-grid .gallery-frame { height: 300px; }
  .gallery-kyogen-grid .gallery-frame { height: 350px; }
}

@media (max-width: 850px) {
  .gallery { padding-top: 80px; }
  .gallery-featured-grid,
  .gallery-detail-grid,
  .gallery-kyogen-grid { gap: 18px; }
  .gallery-featured-grid .gallery-frame { height: 285px; }
  .gallery-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-detail-grid > .gallery-photo:first-child {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 360px;
    justify-self: center;
  }
  .gallery-detail-grid .gallery-frame { height: 320px; }
  .gallery-kyogen-grid .gallery-frame { height: 290px; }
}

@media (max-width: 700px) {
  .gallery { padding-top: 65px; padding-bottom: 0; }
  .gallery-group-heading { gap: 14px; margin-bottom: 22px; }
  .gallery-group-heading h3 { font-size: 18px; }
  .gallery-group-heading > p { font-size: 10px; }
  .gallery-featured-grid { grid-template-columns: 1fr; gap: 28px; }
  .gallery-featured-grid .gallery-frame { height: auto; }
  .gallery-featured-grid img { width: 100%; max-height: none; }
  .gallery-detail-grid { gap: 22px 14px; margin-top: 28px; }
  .gallery-detail-grid .gallery-frame { height: 290px; padding: 10px; }
  .gallery-kyogen-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 340px;
    margin-inline: auto;
  }
  .gallery-kyogen-grid .gallery-frame { height: auto; }
  .gallery-kyogen-grid img { width: 100%; max-height: none; }
  .gallery-photo figcaption { margin-top: 10px; font-size: 10px; }
  .gallery-group--kyogen { margin-top: 40px; }
}

@media (max-width: 450px) {
  .gallery-detail-grid .gallery-frame { height: 230px; }
}

@media print {
  .gallery { padding-top: 35px; padding-bottom: 20px; }
  .gallery-photo { break-inside: avoid; }
  .gallery-frame { padding: 6px; }
  .gallery-featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery-detail-grid > .gallery-photo:first-child { grid-column: auto; max-width: none; }
  .gallery-kyogen-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; }
  .gallery-featured-grid .gallery-frame { height: 240px; }
  .gallery-detail-grid .gallery-frame { height: 190px; }
  .gallery-kyogen-grid .gallery-frame { height: 240px; }
  .gallery-frame img { width: auto; max-height: 100%; }
}
