/* The reader: themes/basic/library/reader.html (books and Akhand Jyoti: SCAN pages, TEXT articles, AI-AUDIO).
   Reading themes on .lr[data-theme] (light / sepia / dark); text size via --lr-size. Script: library--reader.js */

.lr {
  --lr-bg: #fbfaf9; --lr-paper: var(--white); --lr-ink: #292524; --lr-muted: var(--stone-500); --lr-line: var(--stone-200);
  --lr-size: 1.125rem;
  background: var(--lr-bg); color: var(--lr-ink); padding-bottom: var(--space-8);
  transition: background .3s ease, color .3s ease;
}
.lr[data-theme="sepia"] { --lr-bg: #efe4cf; --lr-paper: #f8f0de; --lr-ink: #3b2f22; --lr-muted: #7a6a55; --lr-line: #e0d1b6; }
.lr[data-theme="dark"] { --lr-bg: #141210; --lr-paper: #1d1a17; --lr-ink: #e7e1d8; --lr-muted: #a39b90; --lr-line: #2f2b27; }
.lr .container { background: none; }

/* ---- header */
.lr-head { background: linear-gradient(135deg, #1c1917, #3b1d12 70%, #7f1d1d); color: var(--white); padding: var(--space-5) 0 var(--space-5); }
.lr-crumbs ol { margin-bottom: var(--space-3); }
.lr-head__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3) var(--space-5); }
.lr .lr-title { margin: 0; color: var(--white); font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem); font-weight: var(--weight-light); line-height: 1.2; }
.lr-sub { margin: .35rem 0 0; color: rgba(255, 255, 255, .75); font-size: var(--text-sm); }
.lr-editions { position: relative; display: flex; align-items: center; margin: 0; }
.lr-editions i { position: absolute; left: .85rem; color: var(--saffron-300); pointer-events: none; }
.lr-editions select { height: 40px; padding: 0 2.2rem 0 2.3rem; border-radius: var(--radius-pill); border: 1px solid rgba(255, 255, 255, .25); background-color: rgba(255, 255, 255, .1); color: var(--white); font-size: var(--text-sm); }
.lr-editions select option { color: var(--ink); }

/* ---- toolbar (sticky) */
.lr-bar { position: sticky; top: var(--header-h); z-index: 30; background: color-mix(in srgb, var(--lr-paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--lr-line); }
.lr-bar__inner { display: flex; align-items: center; gap: var(--space-2); min-height: 58px; }
.lr-nav { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-width: 0; }
.lr-prefs { display: flex; align-items: center; gap: .35rem; }
.lr-tool {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 40px; padding: 0 .85rem; border-radius: 12px;
  border: 1px solid var(--lr-line); background: var(--lr-paper); color: var(--lr-ink); font-size: var(--text-sm); text-decoration: none; white-space: nowrap;
  transition: border-color var(--duration), color var(--duration), background var(--duration);
}
.lr-tool:hover { border-color: var(--saffron-500); color: var(--saffron-700); }
.lr-tool[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.lr-tool--icon { width: 40px; padding: 0; }
.lr-tool[aria-pressed="true"] { background: var(--saffron-100); border-color: var(--saffron-300); color: var(--saffron-800); }
.lr-a { font-weight: var(--weight-semibold); font-size: 1.1rem; line-height: 1; }
.lr-a--sm { font-size: .8rem; }
.lr-now { min-width: 0; max-width: 36ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lr-muted); font-size: var(--text-sm); }
.lr-page { display: flex; align-items: center; gap: .4rem; margin: 0; color: var(--lr-muted); font-size: var(--text-sm); }
.lr-page input { width: 4.2rem; height: 40px; border-radius: 10px; border: 1px solid var(--lr-line); background: var(--lr-paper); color: var(--lr-ink); text-align: center; font-variant-numeric: tabular-nums; }
.lr-page input:focus { outline: 0; border-color: var(--saffron-500); box-shadow: var(--focus-ring); }
.lr-themes { display: flex; gap: .25rem; padding: 0 .25rem; }
.lr-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--lr-line); padding: 0; cursor: pointer; }
.lr-swatch--light { background: #fff; }
.lr-swatch--sepia { background: #f3e5c8; }
.lr-swatch--dark { background: #1d1a17; }
.lr-swatch[aria-checked="true"] { border-color: var(--saffron-500); box-shadow: 0 0 0 2px var(--lr-paper), 0 0 0 4px var(--saffron-500); }
.lr-tool--toc { display: none; }

/* ---- layout: contents | page */
.lr-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(1.25rem, 1rem + 2vw, 2.5rem); align-items: start; padding-top: var(--space-5); }
.lr-toc { position: sticky; top: calc(var(--header-h) + 74px); max-height: calc(100vh - var(--header-h) - 92px); display: flex; flex-direction: column; gap: var(--space-3);
  background: var(--lr-paper); border: 1px solid var(--lr-line); border-radius: 18px; padding: var(--space-3); }
.lr-toc__head { display: flex; align-items: center; justify-content: space-between; padding: .2rem .35rem; }
.lr .lr-toc__head h2 { margin: 0; font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: .1em; text-transform: uppercase; color: var(--saffron-700); }
.lr-toc__head h2 span { color: var(--lr-muted); font-weight: var(--weight-regular); }
.lr-toc__close { display: none; }
.lr-toc__list { margin: 0; padding: 0 .1rem 0 0; list-style: none; overflow-y: auto; scrollbar-width: thin; flex: 1 1 auto; min-height: 0; }
.lr-toc__list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; padding: .5rem .6rem; border-radius: 10px; color: var(--lr-ink); font-size: var(--text-sm); line-height: 1.4; text-decoration: none; }
.lr-toc__list a:hover { background: color-mix(in srgb, var(--saffron-100) 60%, transparent); }
.lr-toc__list a[aria-current] { background: var(--saffron-100); color: var(--saffron-800); font-weight: var(--weight-semibold); box-shadow: inset 3px 0 0 var(--saffron-500); }
.lr[data-theme="dark"] .lr-toc__list a[aria-current] { background: rgba(248, 182, 0, .15); color: #fde68a; }
.lr-toc__p { color: var(--lr-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.lr-toc .nr-ad:empty { display: none; }
.lr-main { min-width: 0; }

/* ---- a scanned page: the stage (page + turn buttons), caption, pages panel */
.lr-stage { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: var(--space-2); }
.lr-sheet { position: relative; margin: 0; min-width: 0; display: flex; justify-content: center; }
.lr-sheet__scroll { width: 100%; max-width: 900px; overflow: auto; border-radius: 6px; scrollbar-width: thin; }
.lr-sheet__img { display: block; width: 100%; height: auto; margin: 0 auto; background: #fff; border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 24px 60px rgba(28, 25, 23, .18); cursor: pointer; user-select: none; -webkit-user-drag: none;
  transition: opacity .2s ease; }
.lr[data-fit="page"] .lr-sheet__scroll { max-width: none; }
.lr[data-fit="page"] .lr-sheet__img { width: auto; max-width: 100%; max-height: calc(100vh - var(--header-h) - 150px); }
.lr.is-zoomed .lr-sheet__scroll { max-width: none; max-height: calc(100vh - var(--header-h) - 120px); }
.lr.is-zoomed .lr-sheet__img { width: calc(100% * var(--lr-zoom, 1)); max-width: none; max-height: none; cursor: grab; }
.lr.is-zoomed[data-fit="page"] .lr-sheet__img { width: calc(min(100%, 640px) * var(--lr-zoom, 1)); }
.lr[data-theme="dark"] .lr-sheet__img { filter: brightness(.86) contrast(1.06); }
.lr[data-theme="sepia"] .lr-sheet__img { filter: sepia(.18); }
.lr-stage.is-loading .lr-sheet__img { opacity: .55; }
.lr-sheet__spinner { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 3px solid rgba(248, 182, 0, .25); border-top-color: var(--saffron-500); opacity: 0; pointer-events: none; animation: lr-spin .8s linear infinite; }
.lr-stage.is-loading .lr-sheet__spinner { opacity: 1; transition: opacity .2s .25s; }
@keyframes lr-spin { to { transform: rotate(360deg); } }
.lr-turn { position: sticky; top: 50vh; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--lr-line);
  background: var(--lr-paper); color: var(--lr-ink); font-size: 1.2rem; cursor: pointer; box-shadow: 0 6px 18px rgba(28, 25, 23, .12);
  transition: border-color var(--duration), color var(--duration), transform var(--duration); }
.lr-turn:hover:not(:disabled) { border-color: var(--saffron-500); color: var(--saffron-700); transform: scale(1.06); }
.lr-turn:disabled { opacity: .3; cursor: default; }
.lr-caption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem var(--space-4); max-width: 900px; margin: var(--space-3) auto 0; padding: 0 60px; color: var(--lr-muted); font-size: var(--text-sm); }
.lr-caption__t { margin: 0; min-width: 0; }
.lr-caption__t [data-lr-cap-page] { font-variant-numeric: tabular-nums; }
.lr-caption a { color: var(--color-link); }
.lr[data-theme="dark"] .lr-caption a { color: #fcd34d; }
.lr-caption__t a { font-weight: var(--weight-semibold); }
.lr-caption__img { font-size: var(--text-xs); white-space: nowrap; }
.lr-tip { margin: var(--space-2) 0 0; text-align: center; color: var(--lr-muted); font-size: var(--text-xs); }
.lr-pages { margin-top: var(--space-5); padding: var(--space-4); border-radius: 18px; background: var(--lr-paper); border: 1px solid var(--lr-line); }
.lr-pages__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.lr .lr-pages__head h2 { margin: 0; font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: .1em; text-transform: uppercase; color: var(--saffron-700); }
.lr-pages__head h2 span { color: var(--lr-muted); font-weight: var(--weight-regular); }
.lr-pages__grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--space-3); max-height: 60vh; overflow-y: auto; scrollbar-width: thin; }
.lr-pages__grid a { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 4px; border-radius: 8px; border: 2px solid transparent; color: var(--lr-muted); font-size: var(--text-xs); text-decoration: none; font-variant-numeric: tabular-nums; }
.lr-pages__grid img { width: 100%; height: auto; aspect-ratio: 90 / 128; object-fit: cover; background: var(--stone-100); border-radius: 3px; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.lr-pages__grid a:hover { border-color: var(--saffron-300); }
.lr-pages__grid a[aria-current] { border-color: var(--saffron-500); color: var(--saffron-800); font-weight: var(--weight-semibold); }
.lr-pages:not([hidden]) { display: block; }
.lr-pages__nums { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: .4rem; }
.lr-pages__nums a { display: grid; place-items: center; height: 40px; border-radius: 10px; border: 1px solid var(--lr-line); background: var(--lr-bg); color: var(--lr-ink);
  font-size: var(--text-sm); font-variant-numeric: tabular-nums; text-decoration: none; }
.lr-pages__nums a:hover { border-color: var(--saffron-500); color: var(--saffron-700); }
.lr-pages__nums a[aria-current] { background: var(--saffron-500); border-color: var(--saffron-500); color: var(--ink); font-weight: var(--weight-semibold); }
a.lr-turn { text-decoration: none; }
.lr-turn[aria-disabled="true"] { opacity: .3; cursor: default; }
.lr-sheet__img { -webkit-touch-callout: none; }

/* ---- an article */
.lr-paper { max-width: 760px; margin: 0 auto; padding: clamp(1.5rem, 1rem + 3vw, 3.5rem); background: var(--lr-paper); border: 1px solid var(--lr-line); border-radius: 20px; }
.lr .lr-article-title { margin: 0 0 var(--space-5); color: var(--lr-ink); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); font-weight: var(--weight-semibold); line-height: 1.3; }
.lr .lr-tools { margin: 0 0 var(--space-4); padding: 0; background: none; border: 0; box-shadow: none; min-height: 0; }
.lr-tools .awgp-playarticle-tools { justify-content: flex-start; }
.lr-text { max-width: none; font-size: var(--lr-size) !important; color: var(--lr-ink) !important; line-height: 1.85; }
.lr-text :is(p, span, div, li, font, td) { color: inherit !important; }
.lr-text :is(h1, h2, h3, h4) { color: var(--lr-ink) !important; }

.lr-cross { display: none; margin: calc(var(--space-4) * -1) 0 var(--space-4); font-size: var(--text-sm); }
.lr-cross a { color: var(--color-link); }
.lr[data-theme="dark"] .lr-cross a { color: #fcd34d; }

/* ---- header extras: badge, issue switcher; toolbar groups, menus */
.lr .lr-title a { color: inherit; text-decoration: none; }
.lr .lr-title a:hover { color: var(--saffron-300); }
.lr-badge { display: inline-flex; align-items: center; gap: .3rem; margin-right: .35rem; padding: .1rem .55rem; border-radius: var(--radius-pill); background: rgba(248, 182, 0, .18); color: #fde68a; font-weight: var(--weight-semibold); }
.lr-head__side { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.lr-bar__group { display: flex; gap: .35rem; }
.lr-tool--switch { background: var(--saffron-50); border-color: var(--saffron-300); color: var(--saffron-800); font-weight: var(--weight-semibold); }
.lr[data-theme="dark"] .lr-tool--switch { background: rgba(248, 182, 0, .12); color: #fde68a; border-color: rgba(248, 182, 0, .4); }
.lr-menu { position: relative; }
.lr-menu__list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 260px; max-width: 80vw; margin: 0; padding: .35rem; list-style: none;
  background: var(--white); border: 1px solid var(--stone-200); border-radius: 14px; box-shadow: 0 18px 40px rgba(28, 25, 23, .18); }
.lr-menu__list a { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; border-radius: 10px; color: var(--ink); font-size: var(--text-sm); text-decoration: none; word-break: break-all; }
.lr-menu__list a:hover { background: var(--saffron-50); }
.lr-menu__list small { color: var(--stone-500); white-space: nowrap; margin-left: auto; }
.lr-menu .lib-file__type, .lr .lib-file__type { padding: .2rem .4rem; border-radius: 6px; background: #b91c1c; color: #fff; font-size: .65rem; font-weight: var(--weight-semibold); }
.lr .lib-file__type--epub { background: #15803d; }
.lr .lib-file__type--mobi { background: #1d4ed8; }
.lr-toc__list a { grid-template-columns: 1.6rem minmax(0, 1fr) auto; }
.lr-toc__n { color: var(--saffron-600); font-size: var(--text-xs); font-variant-numeric: tabular-nums; padding-top: .15em; }

.lr-head__link { display: inline-flex; align-items: center; gap: .4rem; height: 40px; padding: 0 1rem; border-radius: var(--radius-pill); border: 1px solid rgba(255, 255, 255, .25);
  color: var(--white); font-size: var(--text-sm); text-decoration: none; white-space: nowrap; }
.lr-head__link:hover { background: rgba(255, 255, 255, .12); color: var(--white); }
.lr-head__link i { color: var(--saffron-300); }

/* ---- an issue: the months of its year, under the header */
.lr-months { margin-top: var(--space-4); border-top: 1px solid rgba(255, 255, 255, .12); padding-top: var(--space-3); }
.lr-months__inner { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) minmax(0, 10rem); gap: var(--space-3); align-items: center; }
.lr-months__step { display: flex; align-items: center; gap: .35rem; min-width: 0; color: rgba(255, 255, 255, .85); font-size: var(--text-sm); font-weight: var(--weight-semibold); text-decoration: none; }
.lr-months__step span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-months__step i { color: var(--saffron-300); }
.lr-months__step:hover { color: var(--white); }
.lr-months__step--next { justify-content: flex-end; }
.lr-months__track { display: flex; gap: .3rem; justify-content: center; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.lr-months__track::-webkit-scrollbar { display: none; }
.lr-months__pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .3rem; height: 34px; padding: 0 .8rem; border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .85); font-size: var(--text-sm); text-decoration: none; }
.lr-months__pill:hover { background: rgba(255, 255, 255, .12); color: var(--white); }
.lr-months__pill.is-active { background: var(--saffron-500); border-color: var(--saffron-500); color: var(--ink); font-weight: var(--weight-semibold); }
.lr-months__pill--year { font-weight: var(--weight-semibold); }
.lr-months__pill--year i { color: var(--saffron-300); }

/* ---- after reading: other editions, issues of the year, related books (always light) */
.lr-related { margin-top: var(--space-7); padding: var(--space-2) 0 var(--space-6); background: linear-gradient(180deg, var(--saffron-50), var(--white) 320px); color: var(--ink); border-top: 1px solid var(--stone-200); }
.lr-related .container { background: none; }
.lr-related .lib-section__title { margin-bottom: var(--space-4); }
.lr .lr-related .lib-section__title::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--stone-200); order: 1; }
.lr-related__all { order: 2; color: var(--color-link); font-size: var(--text-xs); letter-spacing: .04em; text-transform: none; text-decoration: none; white-space: nowrap; }
.lr-related .lib-section + .lib-section { margin-top: var(--space-7); }
.lib-edition.is-current { border-color: var(--saffron-500); background: var(--saffron-50); box-shadow: inset 0 0 0 1px var(--saffron-500); }
.lib-edition.is-current .lib-edition__go { color: var(--saffron-700); }
.lib-edition__count strong { color: var(--saffron-800); font-weight: var(--weight-semibold); }
.lr-year-row { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-4) var(--space-3); }
.lr-year-row .lib-issue__month { font-size: var(--text-sm); }
.lib-issue.is-current .lib-cover { outline: 3px solid var(--saffron-500); outline-offset: 3px; }
.lib-issue.is-current .lib-issue__month { color: var(--saffron-800); }

/* ---- an audio book */
.lr-audio { position: relative; isolation: isolate; overflow: hidden; max-width: 860px; margin: 0 auto; padding: clamp(1.25rem, 1rem + 2vw, 2.25rem); border-radius: 24px; color: var(--white);
  background: linear-gradient(160deg, rgba(28, 25, 23, .92), rgba(127, 29, 29, .88)), var(--lr-audio-bg, none) center / cover, #1c1917; }
.lr-audio__top { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--space-5); align-items: center; }
.lr-audio__kicker { margin: 0; color: #fde68a; font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: .08em; text-transform: uppercase; }
.lr .lr-audio__title { margin: .3rem 0 .2rem; color: var(--white); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem); font-weight: var(--weight-semibold); line-height: 1.25; }
.lr-audio__chapter { margin: 0; color: rgba(255, 255, 255, .75); font-size: var(--text-sm); }
.lr-audio__line { min-height: 5.2em; margin: var(--space-5) 0 var(--space-4); display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: clamp(1.05rem, 1rem + .5vw, 1.35rem); line-height: 1.55; color: var(--white); }
.lr-audio__seek { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); font-size: var(--text-xs); font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .8); }
.lr-audio__seek input { width: 100%; accent-color: var(--saffron-500); }
.lr-audio__ctrls { display: flex; align-items: center; justify-content: center; gap: var(--space-4); margin-top: var(--space-4); }
.lr-round { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: var(--white); font-size: 1.2rem; cursor: pointer; }
.lr-round small { position: absolute; bottom: 4px; font-size: .55rem; }
.lr-round:hover { background: rgba(255, 255, 255, .18); }
.lr-round--play { width: 68px; height: 68px; border: 0; background: var(--saffron-500); color: var(--ink); font-size: 2rem; box-shadow: 0 10px 30px rgba(248, 182, 0, .4); }
.lr-round--play:hover { background: #fbbf24; }
.lr-speed select { height: 36px; padding: 0 .6rem; border-radius: var(--radius-pill); border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: var(--white); font-size: var(--text-sm); }
.lr-speed option { color: var(--ink); }
.lr-audio-tabs { max-width: 860px; margin: var(--space-6) auto 0; }
.lr-audio-tabs .lr-paper { max-width: none; }
.lr .lib-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: var(--space-4); }
.lr .lib-tab { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border-radius: var(--radius-pill); border: 1px solid var(--lr-line); background: var(--lr-paper); color: var(--lr-ink); font-size: var(--text-sm); cursor: pointer; }
.lr .lib-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.lr-quiz button { margin: .25rem; padding: .5rem 1rem; border-radius: 10px; border: 1px solid var(--stone-300); background: var(--white); cursor: pointer; }
.lr--ai-audio .lr-layout { padding-top: var(--space-6); }

/* ---- pager, other editions */
.lr-pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); max-width: 860px; margin: var(--space-6) auto 0; }
.lr-pager__btn { display: flex; flex-direction: column; gap: .25rem; padding: var(--space-4) var(--space-5); border-radius: 16px; background: var(--lr-paper); border: 1px solid var(--lr-line); color: var(--lr-ink); text-decoration: none;
  transition: border-color var(--duration), transform var(--duration); }
.lr-pager__btn:hover { border-color: var(--saffron-500); transform: translateY(-2px); }
.lr-pager__btn--next { text-align: right; }
.lr-pager__btn[aria-disabled="true"] { visibility: hidden; }
.lr-pager__dir { color: var(--saffron-700); font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: .08em; text-transform: uppercase; }
.lr-pager__t { font-size: var(--text-base); font-weight: var(--weight-medium); line-height: 1.35; }
.lr-more { max-width: 860px; margin: var(--space-7) auto 0; }
.lr .lib-section__title { display: flex; align-items: center; gap: .6rem; margin: 0 0 var(--space-3); font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: .1em; text-transform: uppercase; color: var(--saffron-700); }
.lr-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.lr-chips .lib-lang { font-size: var(--text-sm); padding: .35rem .8rem; }

/* full screen: only the reader */
.lr:fullscreen { overflow-y: auto; }
.lr:fullscreen .lr-bar { top: 0; }
.lr:fullscreen .lr-toc { top: 74px; }

/* ---- sizes: contents become a drawer */
@media (max-width: 991.98px) {
  .lr-layout { grid-template-columns: minmax(0, 1fr); }
  .lr-tool--toc { display: inline-flex; }
  .lr-toc { position: fixed; inset: 0 auto 0 0; top: 0; z-index: 1060; width: min(86vw, 360px); max-height: none; border-radius: 0 18px 18px 0;
    transform: translateX(-105%); transition: transform .3s var(--ease); box-shadow: 20px 0 60px rgba(0, 0, 0, .25); }
  .lr.toc-open .lr-toc { transform: none; }
  .lr-toc__close { display: inline-flex; }
  .lr-scrim { position: fixed; inset: 0; z-index: 1055; background: rgba(28, 25, 23, .45); }
  .lr-scrim[hidden] { display: none; }
}
@media (max-width: 1199.98px) {
  .lr-year-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 14%; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; }
}
@media (max-width: 767.98px) {
  .lr-year-row { grid-auto-columns: 30%; }
  .lr-bar__inner { flex-wrap: wrap; gap: .35rem; padding-top: .4rem; padding-bottom: .4rem; }
  .lr-nav { order: 3; flex-basis: 100%; }
  .lr-prefs { margin-left: auto; }
  .lr-tool span { display: none; }
  .lr-nav .lr-tool { width: 40px; padding: 0; }
  .lr-now { max-width: 60vw; }
  .lr-paper { border-radius: 14px; padding: 1.25rem; }
  .lr-pager { grid-template-columns: 1fr 1fr; gap: var(--space-2); }
  .lr-pager__btn { padding: var(--space-3); }
  .lr-pager__t { font-size: var(--text-sm); }
  .lr-head__row { align-items: stretch; flex-direction: column; }
  .lr-editions select { width: 100%; }
  .lr-cross { display: block; }
  .lr-bar__group { order: 1; }
  .lr-nav { order: 2; flex: 1 1 auto; flex-basis: auto; justify-content: flex-end; }
  .lr-prefs { order: 3; flex-basis: 100%; justify-content: center; margin-left: 0; }
  .lr [data-lr-fit], .lr [data-lr-zoom], .lr [data-lr-full] { display: none; }
  .lr-page input { width: 3.4rem; }
  .lr-stage { grid-template-columns: minmax(0, 1fr); }
  .lr-turn { display: none; }
  .lr-caption { padding: 0; }
  .lr-head__side { width: 100%; }
  .lr-head__link { flex: 1 1 auto; justify-content: center; }
  .lr-months__inner { grid-template-columns: auto minmax(0, 1fr) auto; }
  .lr-months__step span { display: none; }
  .lr-months__track { justify-content: flex-start; }
  .lr-audio__top { grid-template-columns: 84px minmax(0, 1fr); gap: var(--space-3); }
  .lr-prefs { flex-wrap: wrap; justify-content: flex-end; }
}
@media print {
  .lr-head { background: none; color: #000; padding: 0 0 8pt; }
  .lr .lr-title, .lr-sub { color: #000 !important; }
  .lr-layout { display: block; padding-top: 0; }
  .lr-toc, .lr-scrim { display: none !important; }
  .lr-paper { border: 0; padding: 0; background: none; }
  .lr { background: none; --lr-ink: #000; }
}
@media print {
  .lr-turn, .lr-caption__img, .lr-pages, .lr-audio__ctrls, .lr-audio__seek { display: none !important; }
  .lr-stage { display: block; }
  .lr-sheet__img { box-shadow: none; max-height: none !important; width: 100% !important; }
}
@media (prefers-reduced-motion: reduce) {
  .lr, .lr-toc, .lr-sheet__img { transition: none; }
  .lr-sheet__spinner { animation: none; }
}
