:root{
      --bg: #d8d8d8;
      --shadow: rgba(0,0,0,.35);
      --ease: cubic-bezier(.77,0,.18,1);

      --book-w: 20px;
      --book-h: 280px;
      --book-t: 35px;

      --open-pad: 24px;
      --open-scale-max: 1; 
    }

    *{ box-sizing:border-box; }
    body{
      margin:0;
      height:100vh;
      background: var(--bg);
      overflow:hidden;
  	  font-family: "Noto Sans TC", 'Microsoft JhengHei', 'Lato', sans-serif;
    }

    .stage{
      display: flex;
	  align-items: center;
	  justify-content: center;
      width:100%;
      height:100%;
      perspective: auto;
    }

    /* 左側主視覺 */
    .hero{
      user-select:none;
      pointer-events:none;
      opacity:.98;
    }
    .hero .title{
      font-size: 42px;
      font-weight: 800;
      letter-spacing:.08em;
      color: #1a1a1a;
      margin: 0 0 10px 0;
    }
    .hero img{
      max-width: 300px;
    }

    /* 書架可橫向捲動，顯示很多本 */
    .shelf-wrap{
      padding: 90px 60px;
      overflow-x:auto;
      overflow-y:hidden;
      scrollbar-width: thin;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
    }
    .shelf{
      height:100%;
      display:flex;
      align-items:center;
      gap: 120px; 
      transform-style:preserve-3d;
      padding-right: 120px;
    }

    .book{
      position:relative;
      flex: 0 0 auto;
      height: var(--book-h);
      width: var(--book-w);
      scroll-snap-align: center;

      --tx: 0px;
      --ty: 0px;
      --scale: 1;
      transform: translate3d(var(--tx), var(--ty), 0) scale(var(--scale));
      transform-origin: center center;
      transition: transform 650ms var(--ease);
      will-change: transform;
      touch-action: manipulation;
    }

    /* 書本本體 */
    .book__model{
      width: var(--book-w);
      height: var(--book-h);
      position:relative;
      transform-style:preserve-3d;
      transform: translateZ(var(--z, 0px));
      transition: transform 650ms var(--ease);
      filter: drop-shadow(0 26px 38px var(--shadow));
      cursor:pointer;
      user-select:none;
      outline: none;
      overflow: visible;
    }

    /* hover(只在未開啟時) */
    .book:not(.is-open) .book__model:hover{
      transform: translateZ(calc(var(--z, 0px) + 38px)) translateY(-20px);
      filter: drop-shadow(0 34px 48px rgba(0,0,0,.42));
      transition-duration: 240ms;
    }

    .book__model::before{
      content:"";
      position:absolute;
      left: calc(var(--book-t) * -0);
      top: calc(var(--book-t) * -0.8);
      width: calc(100% + var(--book-t) * .05);
      height: calc(var(--book-t) * 0.8);
      transform: skewX(-49deg);
      transform-origin: left bottom;
      border-radius: 3px;
      background:linear-gradient(180deg, #4d0404, #3b0505);
      opacity: .95;
      pointer-events:none;
      z-index: 0;
    }

    /* 書名 */
    .float-title{
      position:absolute;
      left: 58px;
      top: -30px;
      height: auto;
      display:flex;
      z-index: 5;
      cursor: pointer;
      user-select:none;
      writing-mode: vertical-rl;
      text-orientation: mixed;
      font-size: 14px;
      letter-spacing: .05em;
		line-height: 1.2;
      color: #111;
      overflow:hidden;
		white-space: nowrap;
    }
    .book.is-open .float-title{ opacity:0; pointer-events:none; }

    .cover.back{
      filter: brightness(.88);
      z-index: 1;
    }

    .face{
      position:absolute;
      inset:0;
      border-radius: 3px;
      backface-visibility: hidden;
      z-index: 3;
    }

    .cover{
      background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(0,0,0,.12)),
                  linear-gradient(180deg, #6a0000, #2c0000);
    }
    .cover::after{
      content:"";
      position:absolute;
      inset:0;
      border-radius: 3px;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
      pointer-events:none;
    }

    .cover.front::before{
      content:"";
      position:absolute;
      top:0;
      right:0;
      width: 12px;
      height:100%;
      background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,.32));
      border-radius: 0 6px 6px 0;
      pointer-events:none;
    }

    /* 內頁 */
    .pages{
      background: linear-gradient(90deg, rgba(0,0,0,.06), rgba(0,0,0,0) 24%),
                  #f8f7f4;
      box-shadow: inset 0 0 14px rgba(0,0,0,.12);
      overflow:hidden;
      opacity: 0;
      transition: opacity 280ms ease;
      z-index: 2;
    }

    .spine{
      position:absolute;
      left: 100%;
      top:0;
      width: var(--book-t);
      height:100%;
      border-radius: 0;
      background:
        linear-gradient(60deg, rgba(255,255,255,.26), rgba(255,255,255,0) 28%),
        linear-gradient(180deg, #ff2424, #7a0000);
      transform: skewY(-40deg);
      transform-origin: left bottom;
      opacity: .98;
    }
    

    .spine-text{ display:none; }

    .front{
      transform-origin: right center;
      transform: translateZ(1px) rotateY(0deg);
      transition: transform 650ms var(--ease);
      z-index: 4;
    }

    .book.is-open{ z-index: 2000; }
    .book.is-open .book__model{
      transform: translateZ(52px);
      cursor: default;
    }
    .book.is-open .front{
      transform: translateZ(1px) rotateY(155deg);
    }
    .book.is-open .pages{
      opacity: 1;
      transition-delay: 180ms;
    }

    /* 內頁內容*/
    .pages-inner{
      position:absolute;
      inset: 14px 14px 14px 14px;
      border-radius: 10px;
      background:#fff;
      overflow:hidden;
      box-shadow: 0 10px 30px rgba(0,0,0,.18);
    }
    iframe.book-frame{
      width:100%;
      height:100%;
      border:0;
      background:#fff;
    }

    /* 關閉按鈕 */
    .close{
      position:absolute;
      top: 10px;
      right: 8px;
      width: 36px;
      height: 36px;
      border:0;
      border-radius: 999px;
      background: rgba(0,0,0,.7);
      color:#fff;
      font-size: 36px;
      line-height: 36px;
      cursor:pointer;
      opacity:0;
      pointer-events:none;
      transition: opacity 200ms ease;
      z-index: 10;
    }
    .book.is-open .close{
      opacity:1;
      pointer-events:auto;
    }

    .overlay{
      position:fixed;
      inset:0;
      background: rgba(0,0,0,.55);
      backdrop-filter: blur(2px);
      opacity:0;
      pointer-events:none;
      transition: opacity 250ms ease;
      z-index: 1500;
    }
    .overlay.is-on{
      opacity:1;
      pointer-events:auto;
    }

    .reader{
      position: fixed;
      inset: 2.5vh 2.5vw;
      background: #fff;
      border-radius: 18px;
      overflow: hidden;
      box-shadow: 0 30px 120px rgba(0,0,0,.45);
      z-index: 2600;
      opacity: 0;
      pointer-events: none;
      will-change: transform, opacity;

      --rx: 0px;
      --ry: 0px;
      --sx: 1;
      --sy: 1;
      transform: translate3d(var(--rx), var(--ry), 0) scale3d(var(--sx), var(--sy), 1);
      transform-origin: top left;
      transition: transform 650ms var(--ease), opacity 180ms ease;
    }
    .reader.is-on{
      opacity: 1;
      pointer-events: auto;
      transform: translate3d(0,0,0) scale3d(1,1,1);
    }
    .reader iframe{
      width: 100%;
      height: 100%;
      border: 0;
      background: #fff;
    }
    .reader .reader-close{
      position: absolute;
      top: 14px;
      right: 14px;
      width: 42px;
      height: 42px;
      border: 0;
      border-radius: 999px;
      background: rgba(0,0,0,.72);
      color: #fff;
      font-size: 30px;
		line-height: 1px;
      cursor: pointer;
      z-index: 2;
    }
    .reader .reader-close:focus{ outline: 2px solid rgba(0,0,0,.35); outline-offset: 2px; }

    body.modal-open .shelf-wrap{
      overflow: hidden;
    }

    /* 無障礙：減少動作 */
    @media (prefers-reduced-motion: reduce){
      .book, .book__model, .front, .pages, .overlay, .reader { transition:none !important; }
    }

/*內頁*/
.bookbg{
	height: auto;
	overflow: auto!important;
}
.title-img{
	margin-left: -5rem;
	margin-right: -1.05rem;
}
.page{
	background:rgba(255,255,255,.4);
	padding: 1rem;
}
.page .title{
	font-size: 3rem;
	text-align: center;
	font-weight: 400;
	margin: 1rem 0;
}
.listlink a{
	  text-decoration: none;
}
.list {
	  color: #fff;
	  font-size: 15px;
	  padding: 2px 10px;
	  line-height: 22px;
	  margin: 5px;
	font-weight: 400;
	text-indent: -26px;
	padding-left: 26px;
	}
	.list .badge {
	  font-family: Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
	  color: #fff;
	  text-align: center;
	  white-space: nowrap;
	  vertical-align: middle;
	  background-color: #545454;
	  border-radius: 50%;
	  font-size: 12px;
	  width: 20px;
	  height: 20px;
	  line-height: 21px;
	  font-weight: 500;
	  padding: 0;
	  margin-right: 5px;
	  flex-shrink: 0;
		text-indent: 0;
	}
	.list p {
	  margin-bottom: 0;
	  flex-shrink: 1;
	}
	.list:hover {
	  color: #ffd52d;
	  border-radius: 0;
	}
.brief{
	line-height: 1.8;
	margin: 0 10rem;
}
main{
	padding: 1rem 3rem;
	line-height: 1.8;
	font-size: 1.1rem;
}
.article .row{
	margin: 3rem 0;
}
.article h3{
	font-size: 1.6rem;
	line-height: 1.6;
}
.article p{
	font-size: 1.1rem;
	line-height: 2;
}

    .swiper {
      width: 100%;
      height: 100%;
		padding-bottom: 2rem;
    }

    .swiper-slide {
      text-align: center;
      font-size: 18px;
      background: #444;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .swiper-slide img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
	  aspect-ratio: 4 / 3
    }
	.swiper-pagination-bullet {
		opacity: var(--swiper-pagination-bullet-inactive-opacity, 1);
	}
	.swiper-pagination-bullet-active {
	  background: #fff;
	}
	.img-caption{
		position: absolute;
		display: inline-block;
		padding: .45rem .75rem .65rem;
		background:rgba(0,0,0,.8);
		color:#fff;
		top:0;
		left:0;
		font-size: .9rem;
	}
	.titlemenu{
		position: fixed;
		display: flex;
		justify-content: center;
		width: 100%;
		top:0;
		background: rgba(205,205,205,.9);
		z-index: 99;
	}
.titlemenu a{
		display: flex;
	align-items: center;
	text-decoration: none;
	padding:1.5rem 2rem;
}
.titlemenu a:hover img{
	transform: scale(1.2);
}
.titlemenu a:first-child:hover .title{
	color: #265581;
}
.titlemenu a:nth-child(2):hover > .title{
	color: #0f7137;
}
.titlemenu a:nth-child(3):hover > .title{
	color: #ef903b;
}
.titlemenu a:nth-child(4):hover > .title{
	color: #e96072;
}
	.titlemenu img{
		max-height: 80px;
		margin-right: 1rem;
	transition: all 1s;
	}
.titlemenu .title{
	display: block;
	color: #111;
	font-weight: 600;
	font-size: 1.3rem;
	line-height: 1.2;
}
.titlemenu .en{
	font-weight: 400;
	font-size: .9rem;
	display: block;
	font-family: "Gill Sans";
	letter-spacing: 1px;
}

@media screen and (max-width:996px) {
	.title-img{
	margin-left: 0;
	margin-right: 0;
	}
	.brief{
		margin: 0 1rem;
	}
	main{
		padding:0;
	}
	.article .row{
		margin: 1rem 0;
	}
	.page .title{
	font-size: 1.5rem;
	}
	.mx-00{
		margin-left: 0!important;
		margin-right: 0!important;
	}
}