@charset "UTF-8";
/* CSS Document */
@charset "UTF-8";
/* CSS Document */

.gg-container {
  --main-color: #000;
  --secondary-color: #111;
  --txt-color: #fff;
  --img-bg-color: rgba(240, 240, 240, 0.9);
  --backdrop-color: rgba(240, 240, 240, 0.9);
  --gap-length: 2px;
  --row-height: 200px;
  --column-width: 300px;
}
/*.gg-boxは追記したclass*/
.gg-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--column-width), 1fr));
  grid-auto-rows: minmax(var(--row-height) - 1vh);
  grid-gap: var(--gap-length);
  margin: 20px 0;
  gap: 8px;
}
.gg-box img {
  object-fit: cover;
  cursor: pointer;
  width: 100%;
  height: 100%;
  background: var(--img-bg-color);
  aspect-ratio: 4 / 3;
  
}

.gg-box img:hover {
  opacity: .98;
}

@media(min-width:478px) {
  [data-layout="horizo​​ntal"] img:nth-child(4n):not(:last-of-type) {
    grid-column-end: span 2;
    grid-row-end: span 1;
  }
  [data-layout="square"] img:nth-child(4n):not(:last-of-type) {
    grid-row-end: span 1;
    grid-column-end: span 1;
  }

/*.gg-boxは追記したclass*/
 .gg-box img:nth-of-type(4n):not(:last-of-type) {
    grid-row-end: span 2;
  }


/*表示枚数が少ない時用の個別調整*/
 .gg-box.count-1 {
    grid-auto-rows: minmax(500px, auto);
 }
/*
 .gg-box.count-4 img:nth-of-type(1),
 .gg-box.count-4 img:nth-of-type(3){
   grid-row-end: span 2;
 }
*/
 .gg-box.count-5 {
   grid-auto-rows: 230px;
 }
 .gg-box.count-5 img:nth-of-type(4n) {
    grid-row-end: span 1;
  }
 .gg-box.count-5 img:nth-of-type(3){
   grid-row-end: span 2;
 }
	
	
}

@media (min-width: 600px) {
.gg-container {
  --column-width: 260px;
}
	
	
/*.gg-boxは追記したclass*/
.gg-box {
    grid-template-columns: repeat(auto-fit, minmax(var(--column-width), 1fr));
	grid-auto-rows: auto;
	margin: 0 0 70px;
}
	
.gg-box.count-1 {
   grid-auto-rows: 400px;
 }
 .gg-box.count-2 {
   grid-template-columns: 1fr 1fr;
   grid-auto-rows: 100%;
 }
 .gg-box.count-3 {
   grid-template-columns: repeat(3, 1fr);
	  grid-auto-rows: minmax(400px, auto);
 }
 .gg-box.count-4 {
   grid-template-columns: 1fr 1fr;
 grid-auto-rows: auto;
 }

}
@media (min-width: 1300px) {
.gg-container {
  --column-width: 300px;
}
.gg-box.count-5 {
    grid-template-columns: repeat(auto-fit, minmax(var(--column-width), 1fr));
	grid-auto-rows: 320px;
}

}


.gg-container *[data-theme="dark"] {
  --main-color: #ddd;
  --secondary-color: #eee;
  --txt-color: #111;
  --img-bg-color: rgba(20, 20, 20, 0.9);
  --backdrop-color: rgba(30, 30, 30, 0.9)
}

/*モーダル*/
#gg-screen {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: var(--backdrop-color);
  background: #5f5f5f;
  z-index: 9999;
  text-align: center;
}
#gg-screen .gg-image {
  height: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
max-height: 100%;
}
#gg-screen .gg-image img {
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
 object-fit: contain;
}
.gg-btn {
  width: 35px;
  height: 35px;
  background: var(--main-color);
  color: var(--txt-color);
  text-align: center;
  line-height: 35px;
  cursor: pointer;
  -moz-transition: all .4s ease;
  -o-transition: all .4s ease;
  -webkit-transition: all .4s ease;
  transition: all .4s ease;
  font-size: 20px;
  box-sizing: border-box;
  padding-left: 2px;
  position: fixed;
  bottom: 10px;
}
.gg-btn:hover {
  background: var(--secondary-color);
}
.gg-close {
  top: 10px;
}
.gg-close, .gg-next {
  right: 10px;
}
.gg-prev {
  right: 50px;
}
.gg-prev, .gg-next {
  bottom: 10px;
}


@media(max-width:768px) {
  .gg-box {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
/*    grid-auto-rows: calc(var(--row-height) - 12vh);*/
    margin: 10px 0
  }

/*表示枚数が少ない時用の個別調整*/
 .gg-box.count-1 {
    grid-auto-rows: 300px;
 }
 .gg-box.count-4 {
    grid-auto-rows: auto;
 }
	
}
@media(max-width:450px) {
  .gg-box {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr))
  }
	
	
/*表示枚数が少ない時用の個別調整*/
 .gg-box.count-1 {
    grid-auto-rows: calc(var(--row-height) - 1vh);
 }
 .gg-box.count-3 img:nth-of-type(2){
   grid-row-end: span 2;
 }
 .gg-box.count-5 {
   grid-auto-rows: 120px;
 }
	
}