/* アルバム部分モバイル用CSS */

/* 基本設定 */
p {
  padding: 0 1em;
}
.wrap {
  padding: 1em 2em;
  margin: 3em auto;
  width: 85%;
  max-width: 500px;
  background: #cbba92;
  box-sizing: border-box;
}

/* 一覧部分（タップ前）スタイル */
.album {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  padding-left: calc(10% / 3);/* 下記liのマージンと同じ幅の余白 */
}
.album li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: calc(10% / 3);
  width: 20vw;
  height: 20vw;
  overflow: hidden;
}
.illustTitle {
  display: none;
}
.thumb {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}
.thumb img {
  width: auto;
  height: 100%;
  transform: scale(2.5);
}
.link {
  display: none;
}

/* 拡大表示時スタイル */
li.active {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  position: fixed;
  top: 0;
  left: 0;
  padding: 2em;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  background: rgba(0,0,0,0.8);
  box-sizing: border-box;
  cursor: auto;
  z-index: 3;
}
.active .illustTitle {
  order: -1;
  display: block;
  padding: 1em;
  width: 100%;
  background: transparent;
  color: #e0dbce;
}
.active .thumb {
  flex-basis: 70%;
  margin-top: 5%;
  height: 80%;
  order: -2;
  padding: 1em;
  width: 100%;
  min-height: 70%;
  box-sizing: border-box;
}
li.active .thumb::before {
  content: '×';
  display: block;
  position: absolute;
  top: 0;
  right: 5%;
  padding: 1em;
  color: #ffffff;
  font-size: 2em;
  z-index: 2;
}
.active .thumb img {
  height: auto;
  max-height: 400px;
  width: auto;
  max-width: 90vw;
  animation: fadeIn .8s;
  transform: scale(1);
}
@keyframes fadeIn {
  from {
  opacity: .5;
  }
  to {
  opacity: 1;
  }
}


/* 戻る/次へリンク */
.active .link {
  flex-grow: 1;
  align-self: flex-end;
  visibility: visible;
  display: block;
  padding: 2em;
  width: 50%;
  background: url('arrow.png') center / 2em no-repeat;
  box-sizing: border-box;
}
.active .prev {
  transform: rotate(180deg);
}
.album li:first-of-type .prev {
  visibility: hidden;
}
.album li:last-of-type .next {
  visibility: hidden;
}

