body {
  background-color: #EEEEEE;
  font-family: 'meiryo', sans-serif;
  font-weight: bold;
  color: #575757;
  padding: 0 !important;
  margin: 0 !important;
  overflow-x: hidden;
}

/* ====== ページヘッダー ====== */
.galleryPageHeader {
  text-align: left;
  padding: 60px 0 10px;
  margin-left: 190px;
}

.galleryPageTitle {
  width: 230px;
  height: auto;
  display: block;
  margin-bottom: 8px;
}

.galleryPageSub {
  font-size: 12px;
  color: #aaa;
  letter-spacing: 0.2em;
  margin: 0;
  text-transform: lowercase;
}

/* ====== フィルターボックス ====== */
.filterWrap {
  display: flex;
  justify-content: center;
  margin: 30px auto 20px;
  padding: 0 20px;
}

.filterBox {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.filterBox input[type="radio"] {
  display: none;
}

.filterBox label {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(200, 200, 200, 0.8);
  font-size: 13px;
  font-weight: bold;
  color: #575757;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  letter-spacing: 0.05em;
}

.filterBox label:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.filterBox input[type="radio"]:checked + label {
  background: #3D9EBF;
  color: #fff;
  border-color: #3D9EBF;
  box-shadow: 0 4px 15px rgba(61, 158, 191, 0.35);
}

.galleryGrid {
  columns: 4;
  column-gap: 10px;
  max-width: 1400px;
  margin: 10px auto 20px;
  padding: 0 20px;
}

.galleryItem {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 10px;
  break-inside: avoid; /* カラム途中で分割しない */
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.galleryItem.is-show {
  opacity: 1;
  transform: translateY(0);
  animation: fadeUp 0.4s ease both;
}

.galleryItem.is-hide {
  display: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.galleryItem img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  transition: transform 0.4s ease;
}

.galleryItem:hover img {
  transform: scale(1.03);
}

.galleryItemOverlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 12px;
  transition: background 0.3s ease;
  pointer-events: none;
  border-radius: 10px;
}

.galleryItem:hover .galleryItemOverlay {
  background: rgba(0, 0, 0, 0.25);
}

.galleryItemTag {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.galleryItem:hover .galleryItemTag {
  opacity: 1;
  transform: translateY(0);
}

.playIcon {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.galleryItem:hover .playIcon {
  opacity: 1;
}


/* ====== モーダル ====== */
.galleryModal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.galleryModal.is-open {
  display: flex;
}

.galleryModalBg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.82);
}

#galleryModalImg {
  position: relative;
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  z-index: 1;
}

.galleryModalCaption {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  max-width: 90vw;
  text-align: center;
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 18px;
  border-radius: 20px;
}

.galleryModalCaption:empty {
  display: none;
}

.galleryModalClose {
  position: absolute;
  top: 20px; right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
}

/* ====== コピーライト ====== */
.copyright {
  text-align: center;
  font-size: 11px;
  margin: 20px 0 30px;
  color: #aaa;
}

/* ====== タブレット（1024px以下） ====== */
@media screen and (max-width: 1024px) and (min-width: 769px) {
  .galleryGrid {
    columns: 3;
  }
}

/* ====== スマホ（768px以下） ====== */
@media screen and (max-width: 768px) {

  .galleryPageHeader {
    margin-left: 15px;
    padding: 30px 0 10px;
  }

  .galleryPageTitle {
    width: 140px;
  }

  .filterWrap {
    margin: 20px auto 15px;
  }

  .filterBox {
    gap: 8px;
  }

  .filterBox label {
    padding: 6px 14px;
    font-size: 12px;
  }

  .galleryGrid {
    columns: 2;
    column-gap: 8px;
    padding: 0 12px;
  }

  .galleryItem {
    margin-bottom: 8px;
  }

}
