body {
  margin: 0;
  font-family: sans-serif;
  display: flex;
  height: 100vh;
  overflow: hidden;
}
#book-title {
  position: fixed;
  top: -44px;
  left: 0;
  width: 100%;
  margin: 0;
  font-size: 16px;
  padding: 10px;
  text-align: center;
  z-index: 9;
  color: #FFF;
  background: rgba(0, 0, 0, .6);
  transition: all .3s ease-in-out;
  opacity: 0;
}
@media (max-width: 768px) {
  #book-title {
    font-size: 13px;
    padding: 10px 0;
  }
}
#book-title.on {
  top: 0;
  opacity: 1;
}
#sidebar {
  background: #333;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}
#thumbToggle {
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  position: fixed;
  top: 20vh;
  left: 0;
  background: rgba(0, 0, 0, .6);
  padding: 15px 10px;
  border-radius: 0 10px 10px 0;
  transition: all .3s ease-in-out;
}
#thumbToggle span {
  display: none;
}
@media (max-width: 768px) {
  #thumbToggle {
    padding: 10px;
    top: 50%;
    transform: translateY(-50%);
  }
}
#thumbToggle.on {
  left: 300px;
}
#thumbToggle.on svg {
  display: none;
}
#thumbToggle.on span {
  display: block;
}
@media (max-width: 768px) {
  #thumbToggle.on {
    left: 50%;
  }
}
#thumbnails {
  position: absolute;
  left: 0;
  top: 20vh;
  bottom: 0;
  width: 300px;
  background: rgba(0, 0, 0, .6);
  overflow-y: auto;
  transition: transform 0.3s ease-in-out;
  transform: translateX(-100%);
  z-index: 9;
  height: 60vh;
  padding: 20px;
  box-sizing: border-box;
  border-radius: 0 0 25px 0;
}
@media (max-width: 768px) {
  #thumbnails {
    width: 50%;
    top: 16vh;
    height: 65vh;
  }
}
#thumbnails ul {
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
#thumbnails ul li {
  width: 50%;
  list-style: none;
  padding: 0;
  margin: 0;
}
#thumbnails ul li:first-child, #thumbnails ul li:last-child {
  width: 100%;
  padding-left: 50%;
  box-sizing: border-box;
}
#thumbnails.show {
  transform: translateX(0);
}
#thumbnails img {
  width: 100%;
  margin-bottom: 10px;
  cursor: pointer;
  border: 2px solid transparent;
}
#thumbnails img.active {
  border-color: #333;
}
#book-container {
  flex: 1;
  position: relative;
  background: #EEE;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
@media (max-width: 768px) {
	#book-container {
		height: 100dvh;
	}
}

#flipbook {
  width: 100%; /* 横幅を100%にして、画面いっぱいに広がるように */
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.3s;
  margin-left: 0 !important;
  position: absolute;
  top: 0;
  left: 0;
 /* cursor: grab;*/
	animation: fade 1s ease-in-out forwards;
	opacity: 0;
}
@keyframes fade{
	0%{
		opacity: 0;
	}
	100%{
		opacity: 1;
	}
}
#flipbook.dragging {
  cursor: grabbing;
}
#flipbook .page {
  display: flex;
  justify-content: center;
  align-items: center;
}
#flipbook .page img {
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}
#controls-wrap {
  position: fixed;
  bottom: -75px;
  left: 0;
  background: rgba(0, 0, 0, .6);
  width: 100%;
  height: 75px;
  transition: all .3s ease-in-out;
  opacity: 0;
}
@media (max-width: 768px) {
  #controls-wrap {
    height: 50px;
  }
}
#controls-wrap.on {
  bottom: 0;
  opacity: 1;
}
#controls {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  justify-content: center;
}
#controls button {
  margin: 0 5px;
  padding: 8px 12px;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
}
@media (max-width: 768px) {
  #controls {
    bottom: 0;
    left: 55%;
  }
  #controls button {
    padding: 5px 2px;
  }
}
#controls button svg {
  width: 30px;
  height: 30px;
}
/* スマホ対応 */
/*
@media (max-width: 768px) {
  #flipbook {
   width: 400px;
    height: 600px;
  }
  #flipbook .page {
   width: 400px;
    height: 600px;
  }
}
*/
.download {
  background: rgba(0, 0, 0, .6);
  border-radius: 0 10px 0 0;
  vertical-align: middle;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 98;
  text-align: center;
  font-weight: bold;
  padding: 10px 10px 5px 10px;
}
@media (max-width: 768px) {
  .download {
    padding: 10px;
  }
}
#thumbnails ul li img.active {
  border: 2px solid red;
}
#thumbnails ul li:nth-child(even) img.active {
  border-right: none;
}
#thumbnails ul li:nth-child(odd) img.active {
  border-left: none;
}
#intro {
  position: fixed;
  background: rgba(0, 0, 0, .8);
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  z-index: 99;
}
#intro .move {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  z-index: 999;
  background: #FFF;
  padding: 50px 25px;
  box-sizing: border-box;
  border-radius: 10px;
  animation: fadein .75s ease-in-out;
}
#intro .move.disapper{
	  animation: fadeout .75s ease-in-out;
}
@media (max-width: 768px) {
  #intro .move {
    width: 265px;
    padding: 25px 15px;
  }
}
@keyframes fadein {
  0% {
    opacity: 0;
    top: 60%;
  }
  100% {
    opacity: 1;
    top: 50%;
  }
}
@keyframes fadeout {
  0% {
			    opacity: 1;
    top: 50%;
  }
  100% {
    opacity: 0;
    top: 60%;
  }
}
#intro .move i {
  position: absolute;
  top: -20px;
  right: -20px;
  background: #FFF;
  font-style: normal;
  color: #000;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  line-height: 40px;
  vertical-align: middle;
  text-align: center;
  cursor: pointer;
}
#intro img {
  max-width: 55%;
  display: block;
  margin: 0 auto;
}
#intro .move p {
  text-align: center;
}
@media (max-width: 768px) {
  #intro .move p {
    font-size: 14px;
  }
  #intro img {
    max-width: 55%;
  }
}