@charset "UTF-8";
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  -ms-scroll-chaining: none;
      overscroll-behavior: none;
}

body {
  background: #f7edd1;
}

.book-wrapper {
  padding-top: 5%;
  margin: 0 auto;
  position: relative;
  z-index: 0;
  overflow: visible;
  -webkit-transition: width 0.35s ease;
  transition: width 0.35s ease;
}
@media (max-width: 576px) {
  .book-wrapper {
    padding-top: 10%;
  }
}
@media (max-height: 460px) {
  .book-wrapper {
    padding-top: 4%;
  }
}

.container-book {
  width: 90vw;
  max-width: 1920px;
  margin: 0 auto;
}
@media (max-width: 576px) {
  .container-book {
    width: 90vw;
  }
}
.container-book {
  -webkit-transition: -webkit-transform 0.35s ease;
  transition: -webkit-transform 0.35s ease;
  transition: transform 0.35s ease;
  transition: transform 0.35s ease, -webkit-transform 0.35s ease;
}
.container-book .flip-book {
  width: 100%;
  background: #000;
  background: transparent;
}

.stf__wrapper .stf__block {
  background: transparent;
}

.page {
  background-color: hsl(35, 55%, 98%);
  color: hsl(35, 35%, 35%);
  border: solid 1px hsl(35, 20%, 70%);
  padding: 0;
  overflow: hidden;
  -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.5);
          box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.5);
}
.page.--left {
  border-right: 0;
}
.page.--left::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  background: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.22)), color-stop(30%, rgba(0, 0, 0, 0.16)), color-stop(70%, rgba(0, 0, 0, 0.08)), to(rgba(0, 0, 0, 0)));
  background: linear-gradient(to left, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.16) 30%, rgba(0, 0, 0, 0.08) 70%, rgba(0, 0, 0, 0) 100%);
  -webkit-filter: blur(1px);
          filter: blur(1px);
}
.page.--right {
  border-left: 0;
}
.page.--right::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  background: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.22)), color-stop(30%, rgba(0, 0, 0, 0.16)), color-stop(70%, rgba(0, 0, 0, 0.08)), to(rgba(0, 0, 0, 0)));
  background: linear-gradient(to right, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.16) 30%, rgba(0, 0, 0, 0.08) 70%, rgba(0, 0, 0, 0) 100%);
  -webkit-filter: blur(1px);
          filter: blur(1px);
}
.page .page-content {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: stretch;
      -ms-flex-align: stretch;
          align-items: stretch;
}
.page .page-content .page-image {
  -webkit-box-flex: 1;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}
.page .page-content .page-image img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
}
.page .page-content .page-text {
  height: 100%;
  -webkit-box-flex: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
  font-size: 80%;
  text-align: justify;
  margin-top: 10px;
  padding-top: 10px;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  border-top: solid 1px hsl(35, 55%, 90%);
}
.page.--left {
  border-right: 0;
  -webkit-box-shadow: inset -7px 0 30px -7px rgba(0, 0, 0, 0.4);
          box-shadow: inset -7px 0 30px -7px rgba(0, 0, 0, 0.4);
}
.page.--right {
  border-left: 0;
  -webkit-box-shadow: inset 7px 0 30px -7px rgba(0, 0, 0, 0.4);
          box-shadow: inset 7px 0 30px -7px rgba(0, 0, 0, 0.4);
}
.page.hard {
  background-color: hsl(35, 50%, 90%);
  border: solid 1px hsl(35, 20%, 50%);
}
.page.page-cover {
  background-color: hsla(35, 45%, 80%, 0);
  color: hsl(35, 35%, 35%);
  border: solid 1px hsla(35, 20%, 50%, 0);
}
.page.page-cover.page-cover-top {
  -webkit-box-shadow: inset 0px 0 30px 0px rgba(36, 10, 3, 0.5), -2px 0 5px 2px rgba(0, 0, 0, 0.4);
          box-shadow: inset 0px 0 30px 0px rgba(36, 10, 3, 0.5), -2px 0 5px 2px rgba(0, 0, 0, 0.4);
}
.page.page-cover.page-cover-bottom {
  -webkit-box-shadow: inset 0px 0 30px 0px rgba(36, 10, 3, 0.5), 10px 0 8px 0px rgba(0, 0, 0, 0.4);
          box-shadow: inset 0px 0 30px 0px rgba(36, 10, 3, 0.5), 10px 0 8px 0px rgba(0, 0, 0, 0.4);
}

.toolbar {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  margin-top: 5%;
}
@media (max-height: 460px) {
  .toolbar {
    margin-top: 3.5%;
    margin-bottom: 1%;
  }
}
@media (max-height: 300px) {
  .toolbar {
    margin-top: 0%;
    margin-bottom: 1%;
  }
}
.toolbar {
  position: relative;
  z-index: 1000;
  will-change: transform;
  /* 只在 zoom 時變成 fixed 底部 */
}
.toolbar.toolbar--zoomed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 9999; /* 直接用極大值，避免翻頁層級壓過 */
  padding-bottom: env(safe-area-inset-bottom); /* iOS safe area */
  margin-top: 0;
}
@media (max-height: 460px) {
  .toolbar.toolbar--zoomed {
    bottom: 1.5%;
  }
}
@media (max-height: 300px) {
  .toolbar.toolbar--zoomed {
    bottom: 1%;
  }
}
.toolbar .toolbar-wrap {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}
.toolbar .toolbar-wrap .btn-zoom, .toolbar .toolbar-wrap .btn-prev, .toolbar .toolbar-wrap .btn-next, .toolbar .toolbar-wrap .btn-firstPage, .toolbar .toolbar-wrap .btn-lastPage, .toolbar .toolbar-wrap .btn-temp {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  width: clamp(40px, 5vw, 50px);
  height: clamp(40px, 5vw, 50px);
  border-radius: 50%;
  background: rgba(230, 29, 29, 0.5);
  margin: 0 7px;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  -webkit-transition: background 0.3s;
  transition: background 0.3s;
}
@media (max-width: 480px) {
  .toolbar .toolbar-wrap .btn-zoom, .toolbar .toolbar-wrap .btn-prev, .toolbar .toolbar-wrap .btn-next, .toolbar .toolbar-wrap .btn-firstPage, .toolbar .toolbar-wrap .btn-lastPage, .toolbar .toolbar-wrap .btn-temp {
    margin: 0 3px;
  }
}
.toolbar .toolbar-wrap .btn-zoom:hover, .toolbar .toolbar-wrap .btn-prev:hover, .toolbar .toolbar-wrap .btn-next:hover, .toolbar .toolbar-wrap .btn-firstPage:hover, .toolbar .toolbar-wrap .btn-lastPage:hover, .toolbar .toolbar-wrap .btn-temp:hover {
  background: rgba(230, 29, 29, 0.8);
}
.toolbar .toolbar-wrap .btn-zoom img, .toolbar .toolbar-wrap .btn-prev img, .toolbar .toolbar-wrap .btn-next img, .toolbar .toolbar-wrap .btn-firstPage img, .toolbar .toolbar-wrap .btn-lastPage img, .toolbar .toolbar-wrap .btn-temp img {
  width: 50%;
  height: 50%;
  -o-object-fit: contain;
     object-fit: contain;
}
.toolbar .toolbar-wrap .btn-temp {
  opacity: 0;
  cursor: default;
}
@media (max-width: 480px) {
  .toolbar .toolbar-wrap .btn-temp {
    display: none;
  }
}
.toolbar .toolbar-state {
  display: none;
}

.zoom-bar {
  position: fixed;
  bottom: 70px;
  left: 50%;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
  z-index: 1100;
  width: clamp(180px, 30vw, 260px);
  height: 24px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 0.25s ease;
  transition: opacity 0.25s ease;
}
.zoom-bar__track {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  overflow: visible;
}
.zoom-bar__thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(230, 29, 29, 0.9);
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
          box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
}

/* zoom-bar 上拖曳時不要被瀏覽器當作捲動/縮放手勢 */
.zoom-bar,
.zoom-bar__track,
.zoom-bar__thumb {
  -ms-touch-action: none;
      touch-action: none;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.zoom-bar__track {
  position: relative;
}

.zoom-bar__thumb {
  position: absolute;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  cursor: -webkit-grab;
  cursor: grab;
}

.zoom-bar__thumb:active {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}