:root {
  color-scheme: dark;
  --reader-dark: #10272c;
  --reader-paper: #f7f4ed;
  --reader-gold: #e5bb84;
  --reader-line: #dce7e026;
  --reader-muted: #b0c3bf;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: var(--reader-dark);
  color: var(--reader-paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a, input { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--reader-gold); }
button { cursor: pointer; }
button:disabled { opacity: .35; cursor: default; }
a { color: inherit; text-decoration: none; }
.eta-reader { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 280px; overflow: hidden; }
.reader-skip { position: fixed; top: -70px; left: 15px; z-index: 100; padding: 12px; background: var(--reader-paper); color: var(--reader-dark); }
.reader-skip:focus { top: 12px; }
.reader-header { flex: 0 0 auto; min-height: 82px; display: flex; align-items: center; gap: 22px; padding: 14px max(22px, env(safe-area-inset-right)) 14px max(22px, env(safe-area-inset-left)); background: #11292e; border-bottom: 1px solid var(--reader-line); z-index: 3; }
.reader-brand { display: block; flex-shrink: 0; padding: 10px 15px; border-radius: 3px; background: var(--reader-paper); }
.reader-brand img { display: block; width: 126px; height: auto; }
.reader-heading { min-width: 0; }
.reader-heading h1 { margin: 0 0 5px; font-family: 'Barlow Semi Condensed', sans-serif; font-size: 23px; font-weight: 600; line-height: 1; }
.reader-heading p { margin: 0; color: var(--reader-muted); font-size: 11px; line-height: 1.4; }
.reader-tools { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.reader-tool { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--reader-line); background: #ffffff04; color: var(--reader-paper); border-radius: 3px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.reader-tool:hover, .reader-tool[aria-expanded="true"], .reader-tool[aria-pressed="true"] { background: #d7c09a1c; border-color: #e5bb8466; }
.reader-icon { width: 17px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; font-weight: 400; }
.reader-fullscreen-icon { width: 16px; height: 16px; background: linear-gradient(currentColor,currentColor) left top / 6px 1px, linear-gradient(currentColor,currentColor) left top / 1px 6px, linear-gradient(currentColor,currentColor) right top / 6px 1px, linear-gradient(currentColor,currentColor) right top / 1px 6px, linear-gradient(currentColor,currentColor) left bottom / 6px 1px, linear-gradient(currentColor,currentColor) left bottom / 1px 6px, linear-gradient(currentColor,currentColor) right bottom / 6px 1px, linear-gradient(currentColor,currentColor) right bottom / 1px 6px; background-repeat: no-repeat; }
.reader-download { background: var(--reader-gold); color: var(--reader-dark); border-color: var(--reader-gold); }
.reader-download:hover { background: #efd0a4; color: var(--reader-dark); }
.reader-close { font-size: 27px; display: flex; align-items: center; justify-content: center; width: 43px; min-height: 43px; color: var(--reader-muted); }
.reader-close:hover { color: white; }
.reader-layout { display: flex; flex: 1 1 auto; min-height: 0; min-width: 0; position: relative; }
.reader-main { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 24px 44px; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #3c5550 0%, #203c3e 45%, #10272c 90%); }
.reader-book-shell { width: 100%; height: 100%; max-width: 1500px; position: relative; }
.reader-book { width: 100%; height: 100%; min-width: 0 !important; min-height: 0 !important; visibility: hidden; transition: transform .5s ease; }
.reader-book.is-ready { visibility: visible; }
.reader-book:not(.stf__parent) .reader-page { display: none; }
.reader-page { background: #fff; overflow: hidden; }
.reader-page img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; }
.reader-book .stf__block { filter: drop-shadow(0 14px 22px #0007); }
.reader-message { position: absolute; z-index: 5; top: 14px; left: 50%; transform: translateX(-50%); max-width: min(90%, 600px); padding: 10px 18px; border: 1px solid var(--reader-line); border-radius: 3px; background: #10272cf2; color: var(--reader-paper); text-align: center; font-size: 12px; }
.reader-message.is-error { border-color: #e5bb8480; }
.reader-fallback { position: absolute; inset: 30px; z-index: 6; text-align: center; background: var(--reader-dark); padding-top: 40px; }
.reader-fallback a { text-decoration: underline; color: var(--reader-gold); }
.reader-contents { width: 286px; min-width: 286px; background: #10272c; border-right: 1px solid var(--reader-line); overflow: auto; overscroll-behavior: contain; z-index: 4; scrollbar-color: #58716d #10272c; }
.reader-contents-head { position: sticky; top: 0; background: #10272cf5; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--reader-line); }
.reader-contents-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.reader-contents-head button { width: 36px; height: 36px; background: none; border: 0; color: var(--reader-muted); font-size: 24px; }
.reader-contents ol { list-style: none; margin: 0; padding: 8px; }
.reader-contents li button { display: flex; align-items: center; width: 100%; text-align: left; gap: 14px; padding: 10px; color: var(--reader-paper); border: 1px solid transparent; border-radius: 3px; background: none; }
.reader-contents li button:hover { background: #ffffff08; }
.reader-contents li button[aria-current="page"] { background: #e5bb8414; border-color: #e5bb8466; }
.reader-contents img { width: 51px; height: 72px; object-fit: contain; background: #fff; border: 1px solid #ffffff28; }
.reader-contents small { display: block; margin-bottom: 5px; color: var(--reader-gold); font-size: 10px; }
.reader-contents strong { font-weight: 500; font-size: 12px; line-height: 1.45; }
.reader-footer { flex: 0 0 auto; min-height: 76px; padding: 12px max(22px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; border-top: 1px solid var(--reader-line); background: #11292e; }
.reader-hint, .reader-page-title { margin: 0; color: var(--reader-muted); font-size: 11px; line-height: 1.5; }
.reader-page-title { text-align: right; color: #d6e2dd; }
.reader-navigation { display: flex; align-items: center; justify-content: center; gap: 15px; }
.reader-nav-button { display: inline-flex; align-items: center; justify-content: center; width: 43px; height: 43px; border: 1px solid var(--reader-line); background: #ffffff03; border-radius: 50%; color: var(--reader-gold); font-size: 23px; }
.reader-nav-button:hover:enabled { background: #e5bb8420; border-color: #e5bb8466; }
.reader-page-form { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--reader-muted); }
.reader-page-form input { width: 45px; height: 37px; padding: 5px; text-align: center; color: var(--reader-paper); background: #ffffff0a; border: 1px solid var(--reader-line); border-radius: 2px; appearance: textfield; -moz-appearance: textfield; }
.reader-page-form input::-webkit-inner-spin-button { appearance: none; }
.reader-page-form button { color: var(--reader-gold); width: 30px; height: 37px; background: none; border: none; font-size: 18px; }
.reader-zoom { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #122a2f; color: var(--reader-paper); overflow: hidden; }
.reader-zoom[open] { display: flex; flex-direction: column; }
.reader-zoom::backdrop { background: #10272c; }
.reader-zoom-header { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 16px; padding: 12px 22px; border-bottom: 1px solid var(--reader-line); }
.reader-zoom-header h2 { margin: 0; font-size: 14px; font-weight: 500; }
.reader-zoom-tools { display: flex; align-items: center; gap: 6px; }
.reader-zoom-tools button { width: 42px; height: 42px; background: #ffffff08; border: 1px solid var(--reader-line); color: var(--reader-paper); border-radius: 3px; font-size: 22px; }
.reader-zoom-tools output { min-width: 55px; text-align: center; font-size: 12px; color: var(--reader-gold); }
.reader-zoom-scroll { flex: 1; min-height: 0; overflow: auto; padding: 25px; background: #20383c; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; }
.reader-zoom-scroll img { display: block; width: var(--zoom-width, 100%); max-width: none; height: auto; margin: 0 auto; box-shadow: 0 12px 40px #0005; background: #fff; }
@media (max-width: 1080px) {
  .reader-header { gap: 14px; padding-inline: 16px; }
  .reader-heading p { max-width: 180px; }
  .reader-tool { padding-inline: 10px; font-size: 11px; }
  .reader-hint { max-width: 180px; }
}
@media (max-width: 820px) {
  .reader-header { min-height: 72px; flex-wrap: wrap; gap: 13px; }
  .reader-brand img { width: 100px; }
  .reader-brand { padding: 8px 10px; }
  .reader-heading h1 { font-size: 20px; }
  .reader-heading p { display: none; }
  .reader-tool { width: 42px; height: 42px; padding: 10px; }
  .reader-tool > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .reader-tools { gap: 5px; }
  .reader-close { width: 35px; }
  .reader-contents { position: absolute; inset: 0 auto 0 0; box-shadow: 20px 0 45px #0007; }
  .reader-main { padding: 20px; }
  .reader-footer { min-height: 70px; grid-template-columns: 1fr auto 1fr; gap: 8px; padding-inline: 16px; }
  .reader-hint { font-size: 10px; }
  .reader-page-title { font-size: 10px; }
}
@media (max-width: 600px) {
  .reader-header { padding: 12px 13px; gap: 8px; }
  .reader-heading { margin-left: 5px; }
  .reader-tools { width: 100%; justify-content: space-between; margin-top: 4px; }
  .reader-tool { width: auto; flex: 1 1 auto; padding: 7px 9px; gap: 5px; font-size: 10px; min-height: 39px; }
  .reader-tool > span:last-child { position: static; width: auto; height: auto; clip-path: none; }
  .reader-close { position: absolute; right: 13px; top: 9px; min-height: 36px; }
  .reader-icon { width: 15px; font-size: 20px; }
  .reader-fullscreen-icon { width: 14px; height: 14px; }
  .reader-main { padding: 16px 9px; }
  .reader-footer { grid-template-columns: 1fr; padding: 10px 12px max(10px, env(safe-area-inset-bottom)); gap: 7px; }
  .reader-hint { display: none; }
  .reader-navigation { grid-row: 1; gap: 23px; }
  .reader-nav-button { width: 39px; height: 39px; }
  .reader-page-title { min-height: 15px; text-align: center; }
  .reader-message { width: max-content; font-size: 11px; }
  .reader-zoom-header { align-items: stretch; flex-direction: column; padding: 12px; gap: 9px; }
  .reader-zoom-header h2 { font-size: 12px; }
  .reader-zoom-tools { justify-content: space-between; }
  .reader-zoom-tools button { width: 40px; height: 38px; }
  .reader-zoom-scroll { padding: 14px 10px; }
}
@media (max-height: 500px) and (min-width: 601px) {
  .reader-header { min-height: 55px; padding-block: 7px; }
  .reader-heading p, .reader-hint, .reader-page-title { display: none; }
  .reader-footer { min-height: 55px; grid-template-columns: 1fr; padding-block: 6px; }
  .reader-main { padding-block: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .reader-book { transition: none; }
}
