/* EPUB 的界面和文字排版独立于漫画阅读布局。 */
#EpubReader { --epub-paper: #fffdf8; --epub-ink: #252525; width: 100%; height: 100dvh; display: flex; flex-direction: column; background: var(--epub-paper); color: var(--epub-ink); }
#EpubReader[data-theme="dark"] { --epub-paper: #202329; --epub-ink: #e5e7eb; }
#EpubReader[data-theme="sepia"] { --epub-paper: #f3e7cf; --epub-ink: #453a2b; }
#EpubReader [hidden] { display: none !important; }
.epub-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem; padding: .65rem 1rem; border-bottom: 1px solid #8885; }
.epub-toolbar h1 { flex: 1; min-width: 6rem; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 1rem; font-weight: 600; }
.epub-toolbar label { display: flex; align-items: center; gap: .4rem; }
.epub-toolbar a, .epub-toolbar button, .epub-open, .epub-toolbar select { border: 1px solid #8888; border-radius: .4rem; padding: .45rem .7rem; background: var(--epub-paper); color: var(--epub-ink); cursor: pointer; }
.epub-toolbar button:disabled { opacity: .4; cursor: default; }
#EpubReader :focus-visible { outline: 2px solid #3674ba; outline-offset: 2px; }
.epub-open { position: relative; overflow: hidden; }
.epub-open:focus-within { outline: 2px solid #3674ba; }
#EpubFile { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
#EpubControls { justify-content: flex-start; font-size: .9rem; }
#EpubTOC { max-width: min(45vw, 30rem); }
#EpubWelcome { margin: auto; padding: 2rem; text-align: center; line-height: 2; }
#EpubWelcome h2 { font-size: 1.8rem; font-weight: 600; }
#EpubWelcome a { text-decoration: underline; }
#EpubStatus { margin: 0; padding: .25rem 1rem; text-align: center; }
#EpubStatus:empty { display: none; }
#EpubViewport { flex: 1; min-height: 0; width: 100%; overflow: hidden; }
#EpubNavigation { border-top: 1px solid #8885; border-bottom: 0; padding-bottom: max(.65rem, env(safe-area-inset-bottom)); }
#EpubPosition { flex: 1; text-align: center; font-size: .85rem; }
@media (max-width: 600px) { .epub-toolbar { padding: .5rem; gap: .4rem; } #EpubControls label:first-child { width: 100%; } #EpubTOC { max-width: none; min-width: 0; flex: 1; } }
