/* Self-hosted Book Dash reader — one landscape page at a time, tap/swipe/arrows to
   turn with a page-flip animation. Scoped under .sr .book. */
/* Crawlable-but-hidden: every page image + text lives in the DOM for search
   engines (the visible reader shows one page at a time via book.js). */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:normal;border:0}
.sr .book{max-width:760px;margin:0 auto;position:relative}
.sr .book .frame{position:relative}
/* Native horizontal scroll-snap: one page at a time, browser lazy-loads the rest.
   Fixed, viewport-fitting height so every page (portrait or wide) stays in view. */
.sr .book .stage{height:clamp(300px,72vh,760px);background:#fff7fb;border:3px solid #ffe1ee;border-radius:18px;
  display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;scrollbar-width:none;box-shadow:0 12px 28px rgba(255,150,180,.2);
  cursor:pointer;-webkit-tap-highlight-color:transparent}
.sr .book .stage::-webkit-scrollbar{display:none}
.sr .book .stage .pg{flex:0 0 100%;width:100%;height:100%;object-fit:contain;scroll-snap-align:center;
  background:#fff7fb;user-select:none;-webkit-user-drag:none}

.sr .book .nav{position:absolute;top:0;bottom:0;display:flex;align-items:center;pointer-events:none}
.sr .book .nav.left{left:6px}
.sr .book .nav.right{right:6px}
.sr .book .arrow{pointer-events:auto;width:44px;height:44px;border-radius:50%;border:none;cursor:pointer;font-size:22px;font-weight:900;
  color:#fff;background:linear-gradient(180deg,#ffa9cf,#ff7eb3);box-shadow:0 4px 0 #ef5e98;display:flex;align-items:center;justify-content:center}
.sr .book .arrow:active{transform:translateY(2px);box-shadow:0 2px 0 #ef5e98}
.sr .book .arrow[disabled]{opacity:.3;cursor:default;box-shadow:0 4px 0 #ef5e98}

.sr .book .page-text{max-width:640px;margin:14px auto 0;font-size:17px;line-height:1.55;color:#5a4a6a;text-align:center;
  background:#fff;border:2px solid #ffe1ee;border-radius:16px;padding:14px 18px;box-shadow:0 6px 16px rgba(255,150,180,.14)}
.sr .book .page-text:empty,.sr .book .page-text[style*="display: none"]{display:none}
.sr .book .counter{text-align:center;margin-top:10px;font-size:13px;font-weight:800;color:#b3a3c4}

/* ---- 3-mode narration bar (Read / Read-along / Bedtime) ------------------ */
.sr .book .audio-bar{display:flex;flex-direction:column;align-items:center;gap:10px;margin:0 auto 14px}
.sr .book .mode-seg{display:inline-flex;gap:4px;padding:4px;background:#fff0f7;border:2px solid #ffe1ee;
  border-radius:999px;box-shadow:0 4px 12px rgba(255,150,180,.14);max-width:100%;flex-wrap:wrap;justify-content:center}
.sr .book .mode{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;cursor:pointer;
  border-radius:999px;padding:8px 15px;font-size:14px;font-weight:800;color:#a58bb8;line-height:1;
  -webkit-tap-highlight-color:transparent;transition:background .15s,color .15s}
.sr .book .mode .mi{font-size:16px}
.sr .book .mode.is-on{background:linear-gradient(180deg,#ffa9cf,#ff7eb3);color:#fff;box-shadow:0 3px 0 #ef5e98}
.sr .book .mode:not(.is-on):not([disabled]):hover{color:#ff7eb3}
.sr .book .mode[disabled]{opacity:.4;cursor:default}
.sr .book .audio-ctl{display:flex;align-items:center;gap:12px;min-height:46px}
.sr .book .audio-ctl[hidden]{display:none}
.sr .book .a-play{width:46px;height:46px;border-radius:50%;border:0;cursor:pointer;color:#fff;font-size:16px;
  background:linear-gradient(180deg,#9b8cff,#7c6cf0);box-shadow:0 4px 0 #5f4fd0;display:flex;align-items:center;justify-content:center}
.sr .book .a-play:active{transform:translateY(2px);box-shadow:0 2px 0 #5f4fd0}
.sr .book .a-hint{font-size:13px;font-weight:600;color:#8a7aa0;max-width:300px;text-align:left}
