*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:"Noto Serif TC","PingFang TC","Microsoft JhengHei",serif;background:#241d18;color:#2d241e}.ebook-reader-body{overflow:hidden}.ebook-shell{height:100vh;display:grid;grid-template-rows:auto 1fr auto;background:radial-gradient(circle at top,#5c4738,#201914)}.ebook-toolbar{display:flex;align-items:center;gap:16px;padding:10px 14px;background:rgba(20,15,12,.92);color:#fff;box-shadow:0 2px 12px rgba(0,0,0,.35);z-index:5}.ebook-exit{color:#f4dfad;text-decoration:none}.ebook-toolbar-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ebook-tools{display:flex;gap:6px;flex-wrap:wrap}.ebook-tools button,.ebook-toc-close{border:1px solid rgba(255,255,255,.25);background:#49372c;color:#fff;border-radius:8px;padding:7px 10px;cursor:pointer}.ebook-stage{position:relative;display:flex;align-items:center;justify-content:center;padding:18px 64px;min-height:0}.ebook-page{width:min(920px,100%);height:min(78vh,760px);background:#fffdf6;border-radius:6px;box-shadow:0 18px 60px rgba(0,0,0,.45);padding:clamp(28px,5vw,64px);overflow:hidden;position:relative;font-size:22px;line-height:1.9;transition:transform .28s ease,opacity .28s ease}.ebook-page.flip-next{transform:perspective(1200px) rotateY(-7deg);opacity:.5}.ebook-page.flip-prev{transform:perspective(1200px) rotateY(7deg);opacity:.5}.ebook-page h1,.ebook-page h2,.ebook-page h3{line-height:1.4}.ebook-page img{max-width:100%;height:auto}.ebook-cover{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;height:100%;background:linear-gradient(145deg,#6d1427,#a77a2d);color:#fff;padding:8%}.ebook-cover.has-image{background-size:cover;background-position:center}.ebook-cover-overlay{background:rgba(40,15,15,.55);padding:40px;border-radius:14px}.ebook-cover h1{font-size:2.2em;margin:.2em 0}.ebook-toc-page ol{padding-left:1.5em}.ebook-toc-page button{border:0;background:none;color:#6d1427;text-align:left;font:inherit;cursor:pointer;padding:4px}.ebook-nav{position:absolute;top:50%;transform:translateY(-50%);width:46px;height:70px;border:0;border-radius:10px;background:rgba(0,0,0,.45);color:#fff;font-size:42px;cursor:pointer}.ebook-prev{left:10px}.ebook-next{right:10px}.ebook-footer{text-align:center;color:#f6e8cc;padding:7px}.ebook-toc-drawer{position:fixed;inset:0;background:rgba(0,0,0,.55);display:none;z-index:20}.ebook-toc-drawer.open{display:block}.ebook-toc-panel{width:min(420px,88vw);height:100%;background:#fffdf6;padding:28px;overflow:auto}.ebook-toc-close{float:right;background:#6d1427}.ebook-toc-panel button.chapter-jump{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #eadfcb;background:none;padding:12px 4px;font-size:17px;cursor:pointer}.ebook-source{display:none}.chapter-title{font-size:1.45em;color:#6d1427;margin-top:0}.chapter-continuation{font-size:.8em;color:#887568;margin-left:.4em}@media(max-width:700px){.ebook-toolbar{align-items:flex-start;flex-wrap:wrap}.ebook-toolbar-title{order:1;width:100%}.ebook-tools{order:2;width:100%}.ebook-stage{padding:10px 42px}.ebook-page{height:calc(100vh - 150px);padding:26px 22px;font-size:19px;line-height:1.75}.ebook-nav{width:34px;height:58px;font-size:32px}.ebook-prev{left:3px}.ebook-next{right:3px}.ebook-cover h1{font-size:1.75em}}

/* v1.0.2 compatibility fallbacks */
.ebook-page{width:920px;max-width:100%;height:78vh;max-height:760px;padding:40px}
.ebook-toc-panel{width:420px;max-width:88vw}
.ebook-error,.ebook-empty{padding:30px;text-align:center;color:#6d1427}
.ebook-page table{width:100%;border-collapse:collapse;font-size:.9em}
.ebook-page th,.ebook-page td{border:1px solid #ddcfb9;padding:6px;vertical-align:top}
@media(max-width:700px){.ebook-page{width:100%;max-height:none;padding:26px 22px}}

/* v1.0.4 mobile pagination and viewport fixes */
.ebook-shell{height:var(--ebook-height,100vh)}
.ebook-stage{overflow:hidden}
.ebook-toc-page li{margin-bottom:.45em}
.ebook-toc-page button{white-space:normal;overflow-wrap:anywhere;word-break:break-word;max-width:100%}
@media(max-width:700px){
  .ebook-shell{height:var(--ebook-height,100vh)}
  .ebook-stage{padding:10px 42px;min-height:0}
  .ebook-page{height:100%;max-height:none;min-height:0;overflow:hidden;padding:24px 22px}
  .ebook-toolbar{gap:10px;padding:10px 14px}
  .ebook-tools{gap:6px}
  .ebook-tools button{padding:7px 11px}
  .ebook-toc-page h2{margin-top:0}
  .ebook-toc-page ol{margin-bottom:0;padding-left:1.35em}
  .ebook-toc-page li{padding-right:0}
  .ebook-toc-page button{display:block;width:100%;line-height:1.55}
}


/* v1.0.5 actual-height pagination */
.ebook-measure-page{border-radius:0!important;box-shadow:none!important;}
.ebook-page p{margin-top:0;margin-bottom:.72em;}
.ebook-page h2.chapter-title{margin-bottom:.8em;}
.ebook-page figure{margin:0 0 .8em;max-height:82%;overflow:hidden;}
.ebook-page figure img,.ebook-page>img{max-height:70%;object-fit:contain;}
.ebook-toc-page ol{list-style-position:outside;}
.ebook-toc-page li{padding-left:.18em;}
@media(max-width:700px){
  .ebook-page{padding:24px 24px 42px;}
  .ebook-page p{margin-bottom:.62em;}
  .ebook-page h2.chapter-title{margin-bottom:.68em;}
  .ebook-toc-page ol{padding-left:1.55em;}
}

/* v1.0.6 exact inner-height pagination */
.ebook-page-inner{width:100%;height:100%;max-height:100%;overflow:hidden;box-sizing:border-box;}
.ebook-measure-inner{background:#fffdf6;box-shadow:none;border:0;padding:0;margin:0;}
.ebook-toc-page h2{margin-top:0;margin-bottom:.75em;}
.ebook-toc-page ol{margin-top:0;}
.ebook-toc-page li{break-inside:avoid;page-break-inside:avoid;}
@media(max-width:700px){
  .ebook-page{padding:24px 24px 54px;}
  .ebook-page-inner{height:100%;max-height:100%;}
  .ebook-toc-page button{line-height:1.5;padding:2px 0 4px;}
  .ebook-toc-page li{margin-bottom:.3em;}
}
