
body {
  margin: 0;
}
/* コンテンツ */
#contents {
  padding: 15px;
  transition: all 0.5s ease-in-out;
}
/* コンテンツ(オーバーレイ表示時) */
#contents.blur {
  filter: blur(5px);
}
/* ギャラリー */
.image_gallery {
  display:flex;
  flex-wrap:wrap;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  font-size: 12px;
}
/* サムネイル（共通） */
.image_gallery .thumb {
  width: 30%;
  margin-right: 5%;
  margin-bottom: 5%;
  overflow: hidden;
  position: relative;
}
.image_gallery .thumb:hover {
  opacity:0.8;
}
/* サムネイル（3列目） */
.image_gallery .thumb:nth-child(3n) {
  margin-right: 0;
}
/* サムネイルのタイトル */
.image_gallery .thumb::before {
  content: attr(title);
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  padding: 0.2em 0.5em;
}
/* サムネイルの写真 */
.image_gallery img {
  width: 100%;
  display: block;
}
/* 大きな写真（通常時） */
#largeImg {
  padding: 10px;
  background-color: #ffffff;
  border: 1px solid #eeeeee;
  box-shadow: 0 0 1px 1px rgba(0,0,0,0.3);
  box-sizing: border-box;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  opacity: 0;
  -webkit-transform: translate(-50%,-50%);
  transform: translate(-50%,-50%);
  transition: all 0.5s ease-in-out;
}
/* 大きな写真（表示時） */
#largeImg.active {
  width: 100%;
  max-width: 960px;
  height: auto;
  opacity: 1;
}
/* オーバーレイ（通常時） */
#overlay {
  background-color: rgba(0, 0, 0, 0.8);
  position: fixed;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  opacity: 0;
  -webkit-transform: translate(-50%,-50%);
  transform: translate(-50%,-50%);
  transition: all 0.5s ease-in-out;
}
/* オーバーレイ（表示時） */
#overlay.active {
  width: 100%;
  height: 100%;
  opacity: 1;
}
/* オーバーレイを閉じるボタン */
#close {
  position: fixed;
  top: 10px;
  right: 100px;
  width: 150px;
  height: 50px;
  background-color: #ffffff;
  box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.3);
  color: #808080;
  text-align:center;
  font-size: 2.0rem;
  appearance: none;
  outline: none;
  padding: 0.5em;
  cursor: pointer;
}
#close:hover {
  background-color: #CCCCCC;
}