.gallery_search{
  padding: 15px 10px 5px;
  margin-bottom: 50px;
  background-color: #fdf7ed;
  border-radius: 10px;
}

.gallery_search .search{
  margin-bottom: 10px;
}

.gallery_search .search p{
	font-size: 1.4rem;
	font-weight: 500;
	font-size: 1.4rem;
	padding-bottom: 5px;
	margin-bottom: 10px;
	border-bottom: 1px solid #4B4743;
}

.gallery_search .search ul{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery_search .search ul li{
   padding: 0 3px;
}

.gallery_search .search ul li label input{
  display: none;
}

.gallery_search .search ul li label{
  display: block;
  width: 100%;
  line-height: 2;
  color: #fff;
  font-size: 1.2rem;
  background: #cbcbcb;
  border-radius: 5px;
  padding: 0 3px;
}

.gallery_search .search ul li label span{
  display: inline-block;
  width: 100%;
  height: 100%;
  text-align: center;
  border-radius: 5px;
}

.gallery_search .search ul li label input:checked + span{
  color: #fff;
  background: #61BB7C;
}

@media screen and (min-width: 768px) {
  .gallery_search{
    padding: 20px 30px 10px;
    margin-bottom: 70px;
    border-radius: 10px;
  }
  
  .gallery_search .search p{
    font-size: 1.8rem;
	font-weight: 500;
  }
}

.gallery_list {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 10px;
  justify-items: center; /* 各要素を中央寄せ */
  align-items: stretch;
  padding: 0;
  margin: 0 auto;
  list-style: none;
}

.gallery_item {
  width: 100%;
  border-bottom: solid 1px #e0e2e3;
  padding-bottom: 10px;
  margin-bottom: 30px;
}

.gallery_item:hover img{
  transform: scale(1.05);
  transition-duration: 0.5s;
}

.gallery_item a:hover{
  color: #3f2e18c4;
  transition: 0.3s ease-in-out;
}

.gallery_item .img_wrapper{
  position: relative;
  display: inline-block;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  transition: all 0.3s ease-in-out;
  overflow: hidden;
  border-radius: 5px;
}

.gallery_item .img_wrapper img{
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  vertical-align: middle;
  object-fit: cover;
  transition-duration: 0.5s;
}

.gallery_item h2{
  font-size: 1.4rem;
  margin-bottom: 10px;
  padding-top: 10px;
  text-align: left;
}

.gallery_item .tag_list{
  width: 80%;
  display: flex;
  flex-wrap: wrap;
}

.gallery_item .tag_item{
  font-size: 1.2rem;
  margin: 0 15px 5px 0;
}

@media screen and (min-width: 600px) {
    .gallery_list {
	  display: grid;
	  grid-template-columns: repeat(2, 1fr);
	  gap: 10px;
	}
	
	.gallery_item {
	  max-width: 310px;
	  border-bottom: none;
      padding-bottom: none;
      margin-bottom: none;
	}
}

@media screen and (min-width: 768px) {
  .gallery_list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); /* 320pxはお好みで */
  }

  .gallery_item {
    width: 100%;
    max-width: 310px;  /* ギャラリーアイテム最大幅 */
  }

  .gallery_item h2{
    font-size: 1.6rem;
  }
}

/* 画像表示 */
.lg-toolbar {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;  /* ← 右左に分ける */
  align-items: flex-start;
  padding: 20px 30px 0 30px;
  z-index: 999999;
  background-color: #0d0a0a00 !important;
}

.lg-counter {
  order: 1;
  color: #fff;
  font-weight: bold;
  border-radius: 5px;
  padding: 6px 14px;
  font-size: 1.1em;
  margin-top: 0;
  margin-right: auto;
}

.lg-close {
  order: 2;
  position: static !important;
  margin-left: auto;
  width: 36px !important;
  height: 36px !important;
  color: #fff !important;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  font-size: 32px !important;
  opacity: 1 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 999999 !important;
}

.lg-outer.lg-visible{
  width: 100vw;
  height: 95vh;
}

.lg-backdrop{
  background-color: #00000099 !important;
}

.lg-outer .lg-thumb-outer{
  background-color: #0d0a0a00 !important;
}

body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object{
  padding: 8% 5%;
}

.lg-thumb.lg-group{
    margin: 10px auto 0;
}