/* SHABDA Books — shared styles for /books, /books/<slug>, /books/library and the reader.
   The parchment palette of My SHABDA (public/me.html), so the two read as one product.
   VijayaDV carries the Vedic accent marks (PUA) the source text uses — never substituted. */
@font-face { font-family: 'VijayaDV'; src: url('/books/fonts/VijayaDV.ttf') format('truetype'); font-display: block; }
/* VKG 2026-11-01: Vijaya for Telugu, Nandana for Kannada (as the app's pubspec.yaml);
   Noto (Google Fonts, linked from book.html and read.html) is the reserve. */
@font-face { font-family: 'VijayaTL'; src: url('/books/fonts/VijayaTL.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'NandanaKN'; src: url('/books/fonts/NandanaKN.ttf') format('truetype'); font-display: block; }
/* VKG 2026-11-05: "Clean server-rendered custom fonts on the customer's screen." A reader's device has
   no VijayaDV, so any text set in a device font showed the Vedic marks (PUA) and Indian scripts as boxes.
   'ShabdaScripts' is one family made of our own three fonts, each for its own script only (unicode-range).
   It stands FIRST in every font stack on these pages, so labels, the contents, headings, prose and
   buttons all draw Devanāgarī, Telugu and Kannada from this server; Latin falls through to the next font. */
@font-face { font-family: 'ShabdaScripts'; src: url('/books/fonts/VijayaDV.ttf') format('truetype'); font-display: block;
  unicode-range: U+0900-093B, U+093D-0965, U+0970-097B, U+097D, U+097F, U+1CD0-1CFF, U+A8E0-A8FF, U+E000-F8FF; }
/* VKG 2026-11-05: "preview sections should carry production quality". VijayaDV has no Devanāgarī
   digits ०-९, no ॼ ॾ and no nukta, so on phones every verse number fell to the device's own font.
   Those few glyphs come from our server too: Noto Serif Devanagari (OFL), subset to 5 KB. */
@font-face { font-family: 'ShabdaScripts'; src: url('/books/fonts/ShabdaDevaDigits.ttf') format('truetype'); font-display: block;
  unicode-range: U+093C, U+0966-096F, U+097C, U+097E; }
@font-face { font-family: 'ShabdaScripts'; src: url('/books/fonts/VijayaTL.ttf') format('truetype'); font-display: block; unicode-range: U+0C00-0C7F; }
@font-face { font-family: 'ShabdaScripts'; src: url('/books/fonts/NandanaKN.ttf') format('truetype'); font-display: block; unicode-range: U+0C80-0CFF; }
:root {
  --ink:#241C15; --muted:#6b5f4f; --parchment:#FAF6EE; --parchment-deep:#F0E9D8; --paper:#fff;
  --maroon:#7A2E2E; --gold:#B8863B; --line:#DCD2B8; --ok:#2F6B3A; --warn:#8A5A12; --err:#A23B3B; --hl:#FBE7A1;
}
*{box-sizing:border-box}
body{margin:0;background:var(--parchment);color:var(--ink);font-family:'ShabdaScripts','Iowan Old Style','Palatino Linotype',Georgia,serif;line-height:1.5}
a{color:var(--maroon)}
.sans,.meta,.btn,nav.crumbs{font-family:'ShabdaScripts','Helvetica Neue',Arial,sans-serif}
.dev{font-family:'VijayaDV','ShabdaScripts','Noto Serif Devanagari','Nirmala UI',serif}
header.top{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 1rem;border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,var(--parchment-deep),var(--parchment))}
header.top .brand{display:flex;align-items:baseline;gap:.6rem;text-decoration:none;color:var(--ink)}
header.top .brand .mark{font-size:1.5rem;color:var(--maroon)}
header.top .brand b{font-size:1.1rem}
nav.crumbs{font-size:.85rem;display:flex;gap:.9rem;flex-wrap:wrap}
.who{position:relative}
.avatar{width:2.3rem;height:2.3rem;border-radius:50%;background:var(--maroon);color:#fff;border:none;padding:0;font:600 1rem 'Helvetica Neue',Arial,sans-serif;cursor:pointer}
.signin-link{font:600 .85rem 'Helvetica Neue',Arial,sans-serif}
.menu{display:none;position:absolute;right:0;top:2.7rem;background:#fff;border:1px solid var(--line);border-radius:8px;padding:.9rem 1rem;min-width:15rem;z-index:20;
  font:.85rem 'Helvetica Neue',Arial,sans-serif;box-shadow:0 4px 14px rgba(0,0,0,.08)}
.menu.open{display:block}
.menu a{display:block;margin-top:.45rem}
main{max-width:980px;margin:0 auto;padding:1.25rem 1rem 4rem}
.meta{font-size:.86rem;color:var(--muted)}
.note{background:#fff;border:1px solid var(--line);border-left:3px solid var(--gold);border-radius:4px;padding:.9rem 1.1rem;margin:0 0 1.1rem;font-size:.95rem}
.banner{background:var(--maroon);color:#fff;border-radius:6px;padding:.9rem 1.1rem;margin:0 0 1.2rem;display:flex;flex-wrap:wrap;gap:.8rem;align-items:center;justify-content:space-between}
.banner a.btn{background:#fff;color:var(--maroon)}
.btn{display:inline-block;text-decoration:none;background:var(--maroon);color:#fff;border:none;border-radius:4px;padding:.55rem 1rem;font-size:.9rem;cursor:pointer}
.btn.ghost{background:transparent;color:var(--maroon);border:1px solid var(--line)}
.btn[disabled],.btn.off{opacity:.55;cursor:not-allowed}
.shelf{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:1.2rem}
.card{background:#fff;border:1px solid var(--line);border-radius:6px;overflow:hidden;display:flex;flex-direction:column;text-decoration:none;color:var(--ink)}
.cover{aspect-ratio:2/3;background:linear-gradient(160deg,var(--maroon),#4d1c1c);color:#F6E7C1;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:1rem;gap:.5rem}
.cover .ct{font-size:1.6rem;line-height:1.3}
.cover .cs{font:.8rem 'Helvetica Neue',Arial,sans-serif;letter-spacing:.06em;opacity:.85}
.cover.has-img{background:#FFF8EC;color:var(--maroon);justify-content:flex-start}
.cover .cimg{width:100%;max-height:65%;object-fit:contain}
.cover.full-art{padding:0;background:#FFF8EC;overflow:hidden}
.cover .cimg-full{width:100%;height:100%;object-fit:contain;display:block}   /* a 3:4 printed cover shows whole in the 2:3 box */
.card .body{padding:.7rem .8rem;display:flex;flex-direction:column;gap:.25rem}
.price{font:600 .8rem 'Helvetica Neue',Arial,sans-serif;color:var(--ok)}
.price.paid{color:var(--ink)}
.tag{display:inline-block;font:600 .72rem 'Helvetica Neue',Arial,sans-serif;padding:.05rem .45rem;border-radius:3px;border:1px solid var(--ok);color:var(--ok)}
.bookhead{display:grid;grid-template-columns:200px 1fr;gap:1.4rem;align-items:start}
@media (max-width:640px){.bookhead{grid-template-columns:1fr}.bookhead .cover{max-width:200px}}
h1{font-size:1.7rem;margin:.2rem 0 .3rem;font-weight:600}
h2{font-size:1.2rem;margin:1.4rem 0 .5rem}
.toc{list-style:none;padding:0;margin:0;columns:2 240px}
.toc li{break-inside:avoid;padding:.2rem 0;font:.9rem 'Helvetica Neue',Arial,sans-serif}
.toc .part{font-weight:600;margin-top:.5rem;color:var(--maroon)}
.lock{color:var(--muted)}
.verse{white-space:pre-line;font-size:1.35rem;line-height:1.8}
.preview-page{margin:.6rem 0}
.preview-page .sec-label{margin-bottom:.4rem}
.sample{background:#fff;border:1px solid var(--line);border-radius:6px;padding:1rem 1.2rem;margin:.6rem 0}
.state{text-align:center;color:var(--muted);font-family:'ShabdaScripts','Helvetica Neue',Arial,sans-serif;padding:2.5rem 1rem}
.err{color:var(--err)}
.progress{height:6px;background:var(--parchment-deep);border-radius:3px;overflow:hidden}
.progress span{display:block;height:100%;background:var(--gold)}
.row{display:flex;gap:1rem;align-items:center;justify-content:space-between;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:6px;padding:.9rem 1rem;margin:.6rem 0}
/* Reader */
.reader{display:grid;grid-template-columns:240px 1fr;gap:1.2rem}
@media (max-width:820px){.reader{grid-template-columns:1fr}.reader aside.chapters{max-height:40vh}}
aside.chapters{background:#fff;border:1px solid var(--line);border-radius:6px;padding:.6rem .8rem;max-height:80vh;overflow:auto;font:.88rem 'Helvetica Neue',Arial,sans-serif}
aside.chapters button{display:block;width:100%;text-align:left;background:none;border:none;padding:.25rem .3rem;cursor:pointer;font:inherit;color:var(--ink);border-radius:3px}
aside.chapters button.cur{background:var(--parchment-deep);font-weight:600}
aside.chapters button.locked{color:var(--muted)}
.toolbar{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-bottom:.8rem;font:.85rem 'Helvetica Neue',Arial,sans-serif}
.toolbar label{display:flex;gap:.3rem;align-items:center}
.tabs{display:flex;gap:.3rem;border-bottom:1px solid var(--line);margin-bottom:.8rem}
.tabs button{background:none;border:none;border-bottom:2px solid transparent;padding:.45rem .8rem;cursor:pointer;font:600 .9rem 'Helvetica Neue',Arial,sans-serif;color:var(--muted)}
.tabs button.on{color:var(--maroon);border-bottom-color:var(--maroon)}
.page{background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:6px;padding:1.2rem 1.4rem;min-height:12rem}
.page .text{font-size:calc(1.35rem * var(--scale,1));line-height:var(--lh,1.85);white-space:pre-line}
mark.mine{background:var(--hl);padding:0 .1em}
.ann{border-top:1px dashed var(--line);margin-top:1rem;padding-top:.8rem}
.ann h3{font-size:1rem;margin:.2rem 0;color:var(--maroon)}
.ann .abody{white-space:pre-line;font-size:calc(1.05rem * var(--scale,1));line-height:calc(var(--lh,1.85) - .15)}
.ann details summary{cursor:pointer;font:600 .9rem 'Helvetica Neue',Arial,sans-serif;color:var(--maroon)}
.marks .m{border:1px solid var(--line);border-radius:4px;padding:.5rem .7rem;margin:.4rem 0;display:flex;justify-content:space-between;gap:.6rem;font-size:.95rem}
.pager{display:flex;justify-content:space-between;margin-top:1rem}
textarea,input[type=text]{width:100%;padding:.5rem;font:inherit;border:1px solid var(--line);border-radius:4px}
/* MAP panel — the nine segments */
.map-title{font-size:1.1rem;margin:.2rem 0 .4rem;color:var(--maroon)}
.seg{border:1px solid var(--line);border-radius:6px;padding:.7rem .9rem;margin:.6rem 0;background:var(--parchment)}
.seg h3{font-size:1rem;margin:0 0 .3rem;display:flex;flex-wrap:wrap;gap:.45rem;align-items:baseline}
.seg .segn{display:inline-flex;width:1.6rem;height:1.6rem;border-radius:50%;background:var(--maroon);color:#fff;align-items:center;justify-content:center;font:600 .8rem 'Helvetica Neue',Arial,sans-serif}
.seg .srctag{font:600 .7rem 'Helvetica Neue',Arial,sans-serif;border:1px solid var(--gold);color:var(--warn);border-radius:3px;padding:0 .35rem}
.segrow{display:flex;flex-wrap:wrap;gap:.2rem .8rem;padding:.3rem 0;border-top:1px dashed var(--line);font-size:calc(1rem * var(--scale,1))}
.segrow .sa{font-size:calc(1.15rem * var(--scale,1))}
.segrow .detail{white-space:pre-line}
.segrow .tr{flex-basis:100%;font-size:calc(1.05rem * var(--scale,1))}   /* a MAP version's meaning, beneath its Sanskrit (Yajña Tattva te/hi, 2026-11-16) */
/* The donation line — free books only, very top and very bottom (VKG 2026-10-25) */
.donate-line{font-size:.85rem;text-align:center;padding:.35rem .8rem;margin:0 0 .9rem;background:var(--parchment-deep);border:1px solid var(--line);border-radius:4px;color:var(--ink)}
.donate-line[data-donate=bottom]{margin:1.2rem 0 0}
.donate-line a{font-weight:600}
.credits{font-size:.9rem;margin:.3rem 0}
/* Structured entries (Rāmāyaṇa Sukti Muktāhāra) and front-matter prose */
.prose{white-space:pre-line;font-size:calc(1.05rem * var(--scale,1));line-height:1.75}
.page .text.prose{font-family:'ShabdaScripts','Iowan Old Style','Palatino Linotype',Georgia,serif;font-size:calc(1.05rem * var(--scale,1))}
.entry-ref{font-weight:600;color:var(--maroon);font-size:.95rem;margin-bottom:.4rem}
.page .text.entry-verse{font-size:calc(1.6rem * var(--scale,1));line-height:1.9;margin:.2rem 0 .8rem}
.entry-en{font-size:calc(1.08rem * var(--scale,1));margin:.4rem 0}
.entry-speaker{font-size:.9rem;font-weight:600;margin:.6rem 0 .2rem}
.entry-ctx{font-size:calc(1rem * var(--scale,1));margin:.2rem 0 .6rem}
.entry-link{font-size:.82rem;word-break:break-all}
/* The Translation row (VKG 2026-11-06): English · తెలుగు · ಕನ್ನಡ · हिन्दी · मराठी */
.tr-row{display:flex;flex-wrap:wrap;gap:.3rem;margin:.5rem 0 .2rem}
.tr-row .seg-btn,#lang-set .seg-btn{font-family:'ShabdaScripts',system-ui,sans-serif}
.tr-note{margin:.1rem 0 .4rem}
.entry-en[lang],.entry-ctx[lang]{font-family:'ShabdaScripts','Noto Sans',system-ui,serif;line-height:1.75}

/* ── Reader settings, themes, scroll play (ported from Vaakya, 2026-11-04) ── */
body[data-theme=sepia]{--parchment:#F4ECD8;--parchment-deep:#E9DDC0;--paper:#FBF3DF;--ink:#3B2F22;--line:#D8C9A3}
body[data-theme=dark]{--parchment:#16130F;--parchment-deep:#221D17;--paper:#1E1A15;--ink:#E9E1D2;--muted:#B5A991;--line:#3A3229;--maroon:#E0A07A;--hl:#6B5418}
body[data-theme=dark] aside.chapters,body[data-theme=dark] .card,body[data-theme=dark] .row,body[data-theme=dark] .note,body[data-theme=dark] .menu{background:var(--paper);color:var(--ink)}
body[data-theme=dark] aside.chapters button{color:var(--ink)}
body[data-theme=dark] header.top{background:var(--parchment-deep)}
body.rd-focus header.top,body.rd-focus aside.chapters,body.rd-focus .rd-head .meta,body.rd-focus .tabs,body.rd-focus .credit-line{display:none}
body.rd-focus .reader{grid-template-columns:1fr}
.rd-head{display:flex;gap:.6rem;align-items:flex-start;justify-content:space-between}
.star{background:none;border:none;font-size:1.6rem;line-height:1;cursor:pointer;color:var(--gold);padding:.2rem}
.card .star{position:absolute;top:.3rem;right:.3rem;font-size:1.35rem;color:#F6E7C1;text-shadow:0 1px 2px rgba(0,0,0,.4)}
.card{position:relative}
.rd-settings{background:var(--paper);border:1px solid var(--line);border-radius:6px;padding:.8rem 1rem;margin:0 0 .9rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.7rem 1.2rem;font:.88rem 'Helvetica Neue',Arial,sans-serif}
.rd-settings[hidden]{display:none}
.rd-settings .grp{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}
.rd-settings .grp>span:first-child{min-width:6.5rem;color:var(--muted)}
.seg-btn{border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:4px;padding:.3rem .6rem;cursor:pointer;font:inherit}
.seg-btn.on{background:var(--maroon);color:#fff;border-color:var(--maroon)}
.rd-bar{position:fixed;left:50%;transform:translateX(-50%);bottom:max(.8rem,env(safe-area-inset-bottom));z-index:30;display:flex;gap:.25rem;align-items:center;
  background:var(--paper);border:1px solid var(--line);border-radius:999px;padding:.3rem .5rem;box-shadow:0 4px 18px rgba(0,0,0,.18);font:.85rem 'Helvetica Neue',Arial,sans-serif;max-width:calc(100vw - 1.2rem);flex-wrap:wrap;justify-content:center}
.rd-bar button{width:2.3rem;height:2.3rem;border-radius:50%;border:none;background:transparent;color:var(--ink);font-size:1rem;cursor:pointer}
.rd-bar button:hover{background:var(--parchment-deep)}
.rd-bar button.main{background:var(--maroon);color:#fff}
.rd-bar input[type=range]{width:6rem}
.rd-bar .rd-note{text-align:center;color:var(--muted);font-size:.75rem}
/* At rest the bar folds to its ▶ alone, see-through like Jalpa (rule 46.1, VKG 2026-11-14);
   hover, focus or a tap opens it, and it folds again after a few idle seconds. The note pill still shows. */
.rd-bar{transition:opacity .25s}
.rd-bar.rd-min{opacity:.45;padding:.2rem;gap:0;box-shadow:0 2px 8px rgba(0,0,0,.12)}
.rd-bar.rd-min>:not(#play):not(.rd-note){display:none}
main.reading{padding-bottom:6rem}
@media (max-width:520px){.rd-bar input[type=range]{width:4.5rem}.rd-bar button{width:2.1rem;height:2.1rem}}
.continue{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:.7rem;margin:.4rem 0 1.4rem}
.continue a{display:block;background:var(--paper);border:1px solid var(--line);border-radius:6px;padding:.7rem .9rem;text-decoration:none;color:var(--ink)}
.offers{display:flex;flex-direction:column;gap:.4rem;margin:.6rem 0}
.code-box{margin:.7rem 0}
.code-box summary{cursor:pointer;font-weight:600;color:var(--maroon)}
/* Dark theme: the accent is light, so text on it is dark (Council I 2.1; ~9:1). */
body[data-theme=dark] .btn:not(.ghost),body[data-theme=dark] .rd-bar button.main,body[data-theme=dark] .seg-btn.on,
body[data-theme=dark] .banner,body[data-theme=dark] .avatar,body[data-theme=dark] .seg .segn{color:#1E1A15}
body[data-theme=dark] .banner{background:var(--maroon)}
body[data-theme=dark] .banner a.btn{background:#1E1A15;color:var(--maroon)}
/* Council I 2.4: nothing under the 14 px floor (readable-text rule, 2026-10-16). */
.meta,.price,.tag,.cover .cs,nav.crumbs,.signin-link,.donate-line,.rd-note,.seg .srctag,.entry-link,.toc li{font-size:max(.875rem,14px)}
.rd-bar .rd-note{font-size:14px}
/* VKG 2026-11-14: "Scroller should be compact on the last section. Not too big and fixed in the lower
   half." A note ("The end of the book.") floats just above the bar as a small pill and leaves the bar
   one compact row, fixed at the bottom; it clears itself after a few seconds (read.js note()). */
/* VKG 2026-11-14: "Add a slider to control or set speed": the speed slider sits on the bar as a small
   pill just above it, so the bar itself stays one compact row; it folds away with the bar (.rd-min). */
.rd-bar .rd-speed{position:absolute;bottom:calc(100% + .4rem);left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:.4rem;width:max-content;max-width:calc(100vw - 2rem);
  white-space:nowrap;background:var(--paper);border:1px solid var(--line);border-radius:999px;padding:.2rem .7rem;box-shadow:0 2px 10px rgba(0,0,0,.15);font-size:14px;color:var(--muted)}
#rd-bar .rd-speed input[type=range]{display:inline-block;width:8rem}
#rd-bar .rd-note{bottom:calc(100% + 3rem)}
.rd-bar .rd-note{position:absolute;bottom:calc(100% + .4rem);left:50%;transform:translateX(-50%);flex-basis:auto;
  white-space:nowrap;max-width:calc(100vw - 2rem);overflow:hidden;text-overflow:ellipsis;background:var(--paper);
  border:1px solid var(--line);border-radius:999px;padding:.15rem .7rem;box-shadow:0 2px 10px rgba(0,0,0,.15);pointer-events:none}
/* Council I 2.5: on a phone the bar stays one row. The speed slider is not in the row: it sits in the
   .rd-speed pill above the bar (VKG 2026-11-14, "Add a slider to control or set speed"), shown on phones too. */
@media (max-width:520px){.rd-bar{flex-wrap:nowrap;gap:.1rem;padding:.25rem .35rem}.rd-bar input[type=range]{display:none}}
/* Pay buttons (migration 047): one row per offer, its label above its buttons. */
.offer-row{display:flex;flex-direction:column;gap:.3rem;margin:.5rem 0}
.offer-row .toolbar{display:flex;flex-wrap:wrap;gap:.4rem}

/* The locked view ends above the fixed reading bar, never under it (QA 2026-11-04). */
#locked{margin-bottom:5.5rem}
/* Script tabs: Sanskrit · IAST · Telugu · Kannada (VKG 2026-11-04). VijayaDV is the
   fallback in every script, so its PUA svara marks still draw (rule 20.5). */
.script-tabs{flex-wrap:wrap;margin-bottom:.6rem}
.script-tabs button{font-size:1rem}
/* The nine scripts of the reader's Script setting (reading_script.dart): each script's
   own font, then Noto, then VijayaDV last, so the PUA svara marks still draw. */
.f-deva{font-family:'VijayaDV','ShabdaScripts','Noto Serif Devanagari','Nirmala UI',serif}
.f-telu,.sc-telugu{font-family:'VijayaTL','ShabdaScripts','Noto Sans Telugu','Gautami','Nirmala UI','VijayaDV',serif}
.f-knda,.sc-kannada{font-family:'NandanaKN','ShabdaScripts','Noto Sans Kannada','Tunga','Nirmala UI','VijayaDV',serif}
.f-taml,.sc-tamil{font-family:'ShabdaScripts','Noto Sans Tamil','Latha','Nirmala UI','VijayaDV',sans-serif}
.f-mlym,.sc-malayalam{font-family:'ShabdaScripts','Noto Sans Malayalam','Kartika','Nirmala UI','VijayaDV',sans-serif}
.f-beng,.sc-bengali{font-family:'ShabdaScripts','Noto Sans Bengali','Vrinda','Nirmala UI','VijayaDV',sans-serif}
.f-gujr,.sc-gujarati{font-family:'ShabdaScripts','Noto Sans Gujarati','Shruti','Nirmala UI','VijayaDV',sans-serif}
.f-orya,.sc-odia{font-family:'ShabdaScripts','Noto Sans Oriya','Kalinga','Nirmala UI','VijayaDV',sans-serif}
/* Sized to sit beside VijayaDV, as the app sizes them. */
.page .text.sc-telugu{font-size:calc(1.35rem * 1.1 * var(--scale,1))}
.page .text.sc-tamil{font-size:calc(1.35rem * .88 * var(--scale,1))}
.page .text.sc-malayalam{font-size:calc(1.35rem * .9 * var(--scale,1))}
.page .text.sc-bengali,.page .text.sc-gujarati,.page .text.sc-odia{font-size:calc(1.35rem * .95 * var(--scale,1))}
#script-set .seg-btn{font-size:1rem}
.sc-iast{font-family:'ShabdaScripts','Iowan Old Style','Palatino Linotype','Gentium Plus','Noto Serif',Georgia,'VijayaDV',serif}
.page .text.sc-iast{font-size:calc(1.2rem * var(--scale,1))}

/* ── Full-page reading (VKG 2026-11-05: "like an app … a simple PDF will deliver the comfort") ──
   Only the text, on the whole screen. Four corners: Home (top left: back to the regular screen, to change
   the text or settings), Settings (top right), Previous (bottom left), Next (bottom right). Double tap
   switches between this and the regular screen; a left or right swipe turns the section. */
body.immersive header.top,body.immersive .rd-head,body.immersive #preview-note,body.immersive aside.chapters,
body.immersive #script-tabs-wrap,body.immersive .tabs,body.immersive .donate-line,body.immersive .rd-bar,
body.immersive:not(.pdf) #jalpa-launch,body.immersive .credit-line,body.immersive .page .pager{display:none!important}
/* Reading (VKG 2026-11-25): Jalpa takes no page space while the reader reads down; it comes back with the bar. */
/* VKG 2026-11-26 (iPhone): no Jalpa anywhere in the reader; it returns on leaving read mode. The Aa sheet
   covers nothing else: the floating Correct button waits until the sheet closes. */
body.pdf #jalpa-launch,body.pdf .jalpa-launch{display:none!important}
body.pdf:has(#settings.pdf-sheet:not([hidden])) .corr-fab{display:none!important}
.pdf-sheet .pdf-langs{display:flex;flex-wrap:wrap;gap:8px;flex:1}
.pdf-sheet .pdf-lang{min-height:48px;padding:0 14px;border-width:2px;border-radius:10px;font-size:1.05rem}
.pdf-sheet .pdf-lang.on{border-color:var(--maroon);color:var(--maroon);font-weight:700}
body.immersive main#content{max-width:none;margin:0;padding:0}
body.immersive .reader{display:block}
body.immersive .page{border:none;border-radius:0;box-shadow:none;margin:0;min-height:100vh;
  padding:max(3.2rem,env(safe-area-inset-top)) max(1.1rem,env(safe-area-inset-right)) 4.5rem max(1.1rem,env(safe-area-inset-left))}
body.immersive .page .text{max-width:46rem;margin-left:auto;margin-right:auto}
body.immersive #settings:not([hidden]){position:fixed;top:3.2rem;right:.6rem;left:.6rem;z-index:45;max-height:75vh;overflow:auto;
  background:var(--paper);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 28px rgba(0,0,0,.18);display:grid!important}
.im-corner{display:none}
body.immersive .im-corner{display:flex;align-items:center;justify-content:center;position:fixed;z-index:40;min-width:2.8rem;height:2.8rem;
  padding:0 .8rem;border-radius:1.4rem;border:1px solid var(--line);background:rgba(250,246,238,.92);color:var(--ink);
  font:600 .9rem 'Helvetica Neue',Arial,sans-serif;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.08)}
body.immersive .im-corner:disabled{opacity:.35}
#im-home{top:max(.6rem,env(safe-area-inset-top));left:max(.6rem,env(safe-area-inset-left))}
#im-settings{top:max(.6rem,env(safe-area-inset-top));right:max(.6rem,env(safe-area-inset-right))}
#im-prev{bottom:max(.8rem,env(safe-area-inset-bottom));left:max(.6rem,env(safe-area-inset-left))}
#im-next{bottom:max(.8rem,env(safe-area-inset-bottom));right:max(.6rem,env(safe-area-inset-right))}
#im-hint{display:none}
body.immersive #im-hint:not([hidden]){display:block;position:fixed;left:50%;transform:translateX(-50%);bottom:max(.9rem,env(safe-area-inset-bottom));z-index:39;
  font:.78rem 'Helvetica Neue',Arial,sans-serif;color:var(--muted);background:rgba(250,246,238,.92);padding:.3rem .7rem;border-radius:1rem}
body.immersive[data-theme=dark] .im-corner,body.immersive[data-theme=dark] #im-hint{background:rgba(30,26,22,.9);color:#eee}

body.immersive .page,body.immersive{touch-action:manipulation}   /* no double-tap zoom: double tap switches the screens */

/* Book Publication Module (VKG 2026-11-06, migration 052): the details panel, ratings, the staff form. */
.pub-dl{display:grid;grid-template-columns:minmax(8rem,12rem) 1fr;gap:.45rem 1rem;margin:.4rem 0 .6rem;font-size:.95rem}
.pub-dl dt{color:var(--muted)}
.pub-dl dd{margin:0}
.pub-works{margin:.2rem 0 .4rem;padding-left:1.1rem;font-size:.9rem}
.pub-stars{color:var(--gold);letter-spacing:.05em}
.pub-review{background:#fff;border:1px solid var(--line);border-radius:6px;padding:.8rem 1rem;margin:.6rem 0}
.pub-review p{margin:.4rem 0}
.pub-reply{border-left:3px solid var(--gold);padding-left:.8rem;margin-top:.5rem}
.pub-form,.pub-edit{display:flex;flex-direction:column;gap:.6rem;max-width:44rem}
.pub-form textarea,.pub-edit input,.pub-edit textarea,.pub-edit select,.pub-review textarea,.pub-review select{width:100%;box-sizing:border-box;font:inherit;padding:.45rem .55rem;border:1px solid var(--line);border-radius:4px;background:#fff}
.pub-edit label,.pub-review label{display:flex;flex-direction:column;gap:.2rem}
.pub-edit label.pub-check{flex-direction:row;align-items:center;gap:.5rem}
.pub-edit label.pub-check input{width:auto}
.pub-rate{border:1px solid var(--line);border-radius:4px;display:flex;flex-wrap:wrap;gap:.3rem 1rem}
.pub-rate label{color:var(--gold);cursor:pointer}
.pub-person{border:1px solid var(--line);border-radius:4px;display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:.4rem;padding:.6rem}
.pub-date{display:grid;grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));gap:.6rem}
.pub-table-wrap{overflow-x:auto}
.pub-table{border-collapse:collapse;width:100%;font-size:.9rem}
.pub-table th,.pub-table td{border-bottom:1px solid var(--line);padding:.45rem .5rem;text-align:left;vertical-align:top}
@media (max-width:600px){.pub-dl{grid-template-columns:1fr}.pub-dl dt{font-weight:600;margin-top:.4rem}}
/* 054: the Overview tabs and the contents list */
.pub-ov p{margin:.5rem 0}
.pub-ov-tabs{margin:.3rem 0 .4rem}
.pub-contents{margin:.1rem 0 .3rem;padding-left:1.3rem}
/* Join the SHABDA list (VKG 2026-11-06; list-join.js) */
.sl-box{background:#fff;border:1px solid var(--line);border-left:3px solid var(--gold);border-radius:6px;padding:1rem 1.2rem;margin:2rem auto 1rem;max-width:46rem}
.sl-title{margin:0 0 .3rem;font-size:1.2rem}
.sl-lead{margin:0 0 .8rem;font-size:.95rem;color:var(--muted)}
.sl-row{display:flex;flex-wrap:wrap;gap:.8rem;align-items:flex-end;margin:.4rem 0}
.sl-row label{display:flex;flex-direction:column;gap:.2rem;font-size:.9rem;flex:1 1 14rem}
.sl-row input,.sl-row select{font:inherit;font-size:1rem;padding:.5rem .6rem;border:1px solid var(--line);border-radius:4px;min-height:44px;box-sizing:border-box;width:100%}
.sl-row .btn{min-height:44px;flex:0 0 auto}
.sl-kinds{border:0;padding:0;margin:.6rem 0;display:flex;flex-wrap:wrap;gap:.4rem 1.2rem;font-size:.95rem}
.sl-kinds legend{padding:0;margin-bottom:.3rem;font-size:.9rem}
.sl-kinds label{display:flex;align-items:center;gap:.35rem;min-height:32px}
.sl-msg{min-height:1.4em;margin:.4rem 0 0;font-size:.95rem}
body[data-theme=dark] .sl-box{background:var(--paper);color:var(--ink)}
/* Share or invite (share.js, VKG 2026-11-07) */
.share-box{background:#fff;border:1px solid var(--line);border-left:3px solid var(--gold);border-radius:6px;padding:1rem 1.2rem;margin:1.4rem 0}
.share-box h2{margin:0 0 .3rem}
.share-langs{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center;margin:.5rem 0}
.share-msg{width:100%;font:inherit;font-size:1rem;padding:.6rem;border:1px solid var(--line);border-radius:4px;box-sizing:border-box}
.share-btns{display:flex;flex-wrap:wrap;gap:.5rem;margin:.6rem 0 .2rem}
body[data-theme=dark] .share-box{background:var(--paper);color:var(--ink)}

/* ── Shelf categories and languages (VKG 2026-11-07; docs/design/books_shelf_categories.html) ── */
:root{--cat-vvs:#23365E;--cat-mantra:#8A2F1B;--cat-prayoga:#2F5D3A;--cat-texts:#1F5A5E;--cat-more:#5d5346}
header.top{flex-wrap:wrap}
.home-btn{display:inline-flex;align-items:center;gap:.35rem;min-height:44px;padding:.35rem .8rem;border:1px solid var(--gold);border-radius:6px;
  color:var(--maroon);text-decoration:none;font-weight:600;font-size:.9rem;background:var(--paper)}
.home-btn span{font-size:1.15rem;color:var(--gold)}
.shelf-hero{position:relative;margin:0 -1rem 0;padding:2.4rem 1rem 3.8rem;text-align:center;color:#F6E7C1;border-radius:0 0 10px 10px;
  background:radial-gradient(120% 140% at 50% 0%,#8d3a32 0%,#5a1f1f 60%,#3d1414 100%)}
.shelf-hero::after{content:"";position:absolute;left:0;right:0;bottom:0;height:6px;background:repeating-linear-gradient(90deg,var(--gold) 0 14px,transparent 14px 20px)}
.shelf-hero h1{font-family:'Iowan Old Style','Palatino Linotype',Georgia,serif;font-size:2rem;margin:0;color:#F6E7C1}
.shelf-hero p{margin:.5rem auto 0;max-width:40rem;font-size:.98rem;opacity:.92}
.shelf-hero .orn{color:var(--gold);letter-spacing:.6em}
.shelf-lang{position:absolute;top:.7rem;right:1rem;display:flex;gap:.4rem;align-items:center;font-size:.85rem}
.shelf-lang select{font:inherit;font-size:.95rem;min-height:40px;padding:.2rem .5rem;border-radius:6px;border:1px solid var(--gold);background:#fff;color:#241C15}
.cat-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));gap:.8rem;margin:-2.6rem 0 1.8rem;position:relative;z-index:2}
.cat-tile{border:0;border-radius:12px;padding:1rem .9rem;text-align:left;cursor:pointer;color:#fff;box-shadow:0 6px 18px rgba(36,28,21,.18);
  display:flex;flex-direction:column;gap:.2rem;min-height:112px;font-family:'Helvetica Neue',Arial,sans-serif;transition:transform .15s,box-shadow .15s}
.cat-tile:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(36,28,21,.25)}
.cat-tile .g{font-size:1.5rem;line-height:1}.cat-tile .n{font-weight:700;font-size:1rem}.cat-tile .c{font-size:.82rem;opacity:.88}
.cat-tile.on{outline:3px solid var(--gold);outline-offset:2px}
.t-all{background:linear-gradient(150deg,#6b5f4f,#3f362b)}
.t-vvs{background:linear-gradient(150deg,#34508a,var(--cat-vvs))}
.t-mantra{background:linear-gradient(150deg,#b4492b,var(--cat-mantra))}
.t-prayoga{background:linear-gradient(150deg,#477f53,var(--cat-prayoga))}
.t-texts{background:linear-gradient(150deg,#2f7f84,var(--cat-texts))}
.t-more{background:linear-gradient(150deg,#857967,var(--cat-more))}
.cat-sec{margin:0 0 2.4rem}
.cat-head{display:flex;align-items:baseline;gap:.7rem;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:.4rem}
.cat-head h2{margin:0;font-size:1.4rem}
.cat-sa{color:var(--muted);font-size:1.05rem}
.cat-count{margin-left:auto;font:.85rem 'Helvetica Neue',Arial,sans-serif;color:var(--muted)}
.cat-bar{height:3px;width:56px;border-radius:2px;margin-top:-2px;background:var(--cat-more)}
.cat-sec[data-cat=vvs] .cat-bar{background:var(--cat-vvs)}.cat-sec[data-cat=mantra] .cat-bar{background:var(--cat-mantra)}
.cat-sec[data-cat=prayoga] .cat-bar{background:var(--cat-prayoga)}.cat-sec[data-cat=texts] .cat-bar{background:var(--cat-texts)}
.cat-desc{font:.92rem 'Helvetica Neue',Arial,sans-serif;color:var(--muted);margin:.45rem 0 1rem}
.cat-empty{display:flex;gap:.9rem;align-items:center;background:var(--paper);border:1px dashed var(--line);border-radius:10px;padding:1.1rem 1.2rem;
  font:.95rem 'Helvetica Neue',Arial,sans-serif;color:var(--muted)}
.cat-empty .g{font-size:1.8rem;color:var(--cat-prayoga)}
.cat-sec .shelf{gap:1.4rem}
.cat-sec .card{position:relative;border:0;border-radius:10px;box-shadow:0 2px 8px rgba(36,28,21,.08);transition:transform .15s,box-shadow .15s}
.cat-sec .card:hover{transform:translateY(-4px);box-shadow:0 10px 22px rgba(36,28,21,.16)}
.cat-sec .cover:not(.full-art){position:relative}
.cat-sec .cover:not(.full-art)::before{content:"";position:absolute;inset:9px;border:1px solid rgba(233,211,166,.55);border-radius:3px;pointer-events:none}
.cat-vvs .cover:not(.full-art){background:linear-gradient(165deg,#34508a,var(--cat-vvs))}
.cat-mantra .cover:not(.full-art){background:linear-gradient(165deg,#b4492b,var(--cat-mantra))}
.cat-prayoga .cover:not(.full-art){background:linear-gradient(165deg,#477f53,var(--cat-prayoga))}
.cat-texts .cover:not(.full-art){background:linear-gradient(165deg,#2f7f84,var(--cat-texts))}
@media (max-width:600px){
  .shelf-hero{padding-top:3.4rem}.shelf-hero h1{font-size:1.6rem}
  .cat-tiles{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:-2.2rem}.cat-tile{min-height:100px}
  .cat-sec .shelf{grid-template-columns:repeat(2,minmax(0,1fr));gap:.9rem}
  .home-btn{min-height:48px}
}

/* 061: Scriptures (VKG 2026-11-07) */
:root{--cat-scriptures:#5B2A6E}
.t-scriptures{background:linear-gradient(150deg,#7a4391,var(--cat-scriptures))}
.cat-sec[data-cat=scriptures] .cat-bar{background:var(--cat-scriptures)}
.cat-scriptures .cover:not(.full-art){background:linear-gradient(165deg,#7a4391,var(--cat-scriptures))}
:root{--cat-textbooks:#7A4A12}
.t-textbooks{background:linear-gradient(150deg,#a0682a,var(--cat-textbooks))}
.cat-sec[data-cat=textbooks] .cat-bar{background:var(--cat-textbooks)}
.cat-textbooks .cover:not(.full-art){background:linear-gradient(165deg,#a0682a,var(--cat-textbooks))}

/* Shelf order admin (062, VKG 2026-11-07): /books/publish#/shelf */
.shelf-order{list-style:none;padding:0;margin:1rem 0}
.so-row{display:grid;grid-template-columns:auto auto 1fr auto auto auto;gap:.6rem;align-items:center;background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:.55rem .7rem;margin:.4rem 0}
.so-row.dragging{opacity:.5}.so-row.drop{border-color:var(--gold);box-shadow:0 0 0 2px var(--gold) inset}.so-row.moved{background:#fff8e6}
.so-handle{cursor:grab;font-size:1.3rem;color:var(--muted);user-select:none}
.so-pos{font-weight:700;color:var(--maroon);min-width:1.6rem;text-align:right}
.so-sel{display:flex;flex-direction:column;font-size:.75rem;color:var(--muted)}
.so-sel select{font:inherit;font-size:.9rem;min-height:40px;color:var(--ink)}
.so-move .btn{min-width:44px;min-height:44px;padding:.2rem .5rem}
@media (max-width:700px){.so-row{grid-template-columns:auto 1fr auto;grid-template-areas:"pos title move" "s1 s1 s1" "s2 s2 s2"}
  .so-handle{display:none}.so-pos{grid-area:pos}.so-title{grid-area:title}.so-move{grid-area:move}
  .so-sel:nth-of-type(1){grid-area:s1}.so-sel:nth-of-type(2){grid-area:s2}.so-move .btn{min-width:56px;min-height:56px}}

/* Book page: the call to action under the cover and at the foot; the install box (VKG 2026-11-08). */
.cover-col{display:flex;flex-direction:column;gap:.7rem}
.cover-cta{margin:0}
.cover-cta .btn{display:block;text-align:center;white-space:normal;line-height:1.35}
.foot-cta{margin:2rem 0 1rem;padding:1rem 1.2rem;border:1px solid #e3d3b4;border-radius:8px;background:#FFF8EC;text-align:center}
.foot-cta p{margin:0 0 .6rem}
.install-box{margin:.8rem 0;padding:.8rem 1rem;border:1px dashed #c9a96a;border-radius:8px;background:#FFFCF5}
.install-box p{margin:.5rem 0 0}
@media (max-width:640px){.cover-col{max-width:260px}.bookhead .cover-col .cover{max-width:200px}}

/* List / Cards tabs (VKG 2026-11-08: "Default view LISTS; sortable column headers").
   Phone: rows become cards, the admin-panel pattern (data-label before each cell). */
.view-tabs{display:flex;border-bottom:2px solid var(--line);margin:1.4rem 0 1rem}
.view-tab{appearance:none;border:0;background:none;font:600 1.05rem 'Helvetica Neue',Arial,sans-serif;color:var(--muted);padding:.7rem 1.4rem;min-height:48px;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-2px}
.view-tab[aria-selected="true"]{color:var(--maroon);border-bottom-color:var(--maroon)}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.book-list{width:100%;border-collapse:collapse;background:var(--paper,#fff);border:1px solid var(--line);border-radius:10px;overflow:hidden;font-size:.95rem}
.book-list th{background:var(--parchment-deep);text-align:left;padding:.6rem .7rem;font-size:.85rem;color:var(--muted);white-space:nowrap;border-bottom:1px solid var(--line)}
.book-list .sort-h{all:unset;cursor:pointer;color:var(--ink);font-weight:700}
.book-list .sort-h:focus-visible{outline:2px solid var(--maroon);outline-offset:2px}
.book-list th[aria-sort="none"] .sort-h span{color:var(--muted);font-weight:400}
.book-list th:not([aria-sort="none"]) .sort-h span{color:var(--maroon)}
.book-list td{padding:.55rem .7rem;border-bottom:1px solid var(--line);vertical-align:middle}
.book-list tr:last-child td{border-bottom:0}
.book-list td.cv{width:60px}
.book-list td.cv .cover{width:44px;padding:0;gap:0;border-radius:3px;overflow:hidden}
.book-list td.cv .cover .ct,.book-list td.cv .cover .cs{display:none}
.book-list td.ttl a{color:inherit;text-decoration:none}
.book-list td.ttl strong{display:block;font-size:1.08rem}
.book-list td.ttl .meta{display:block}
.book-list .pill{display:inline-block;border-radius:999px;padding:.05rem .6rem;font-size:.8rem;color:#fff;margin:1px 0;white-space:nowrap}
.book-list .p-vvs{background:var(--cat-vvs)}.book-list .p-mantra{background:var(--cat-mantra)}.book-list .p-prayoga{background:var(--cat-prayoga)}
.book-list .p-texts{background:var(--cat-texts)}.book-list .p-scriptures{background:var(--cat-scriptures)}.book-list .p-textbooks{background:var(--cat-textbooks)}
.book-list .gap{color:var(--muted);font-style:italic}
.book-list td.ac .btn{white-space:nowrap;min-height:40px;line-height:1.5}
.book-list td.ac .btn.read{background:var(--cat-prayoga)}
.list-sort{display:none;gap:.5rem;align-items:center;flex-wrap:wrap;margin-bottom:.7rem}
.list-sort select{font-size:1rem;padding:.4rem;min-height:48px}
@media (max-width:780px){
  .book-list thead{display:none}
  .book-list,.book-list tbody,.book-list tr,.book-list td{display:block;width:100%}
  .book-list{background:none;border:0}
  .book-list tr{background:var(--paper,#fff);border:1px solid var(--line);border-radius:10px;margin-bottom:.8rem;padding:.6rem .8rem;display:grid;grid-template-columns:72px 1fr;column-gap:.8rem}
  .book-list td{border:0;padding:.2rem 0;grid-column:2}
  .book-list td.cv{grid-column:1;grid-row:1 / span 6;width:auto}
  .book-list td.cv .cover{width:72px}
  .book-list td[data-label]::before{content:attr(data-label);display:block;color:var(--muted);font-size:.8rem;text-transform:uppercase;letter-spacing:.03em}
  .book-list td.ac .btn{min-height:56px;line-height:2.4;padding:0 1.3rem;font-size:1.05rem}
  .list-sort{display:flex}
}

/* ── The trail, always in view (VKG 2026-11-13): SHABDA Home › SHABDA Books › the book. The header stays
   at the top while the page scrolls, so the way back is never lost, Settings open or not. ── */
header.top{position:sticky;top:0;z-index:40;justify-content:flex-start}
header.top .who{margin-left:auto}
header.top .trail-sep{color:var(--gold);font-size:1.2rem;line-height:1}
.book-crumb{display:inline-flex;align-items:center;gap:1rem;min-width:0}
.book-crumb a{font-weight:700;color:var(--maroon);text-decoration:none;font-size:1.1rem;min-height:44px;display:inline-flex;align-items:center;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:40vw}
.book-crumb a:hover,.book-crumb a:focus-visible{text-decoration:underline}
.book-crumb a[aria-current=page]{color:var(--ink)}
.book-crumb:empty{display:none}
@media (max-width:600px){.book-crumb a{max-width:70vw}}
/* Phone: the trail in one or two short rows, so the header that stays in view stays small. Shelf is the
   "SHABDA Books" crumb and My library / My SHABDA sit in the account menu, so the extra links step aside. */
@media (max-width:600px){
  header.top{gap:.35rem .5rem;padding:.4rem .6rem}
  header.top nav.crumbs{display:none}
  header.top .brand .mark{display:none}
  header.top .brand b{font-size:1rem}
  .home-btn{padding:.25rem .55rem}
  .ts-btn .ts-word{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .ts-btn{padding:.25rem .6rem}
}

/* ── Reading mode: only the text, with its page and text name (VKG 2026-11-13) ── */
.text.verse{width:fit-content;max-width:100%;margin-left:auto;margin-right:auto}
body.immersive .page .sec-extras,body.immersive .page .sec-count{display:none!important}
body.immersive .page .sec-meta{position:sticky;top:0;z-index:38;text-align:center;margin:0 -1rem .8rem;
  padding:max(.9rem,env(safe-area-inset-top)) 4.8rem .7rem;background:var(--paper);border-bottom:1px solid var(--line);font-size:max(.95rem,15px)}
body.immersive[data-theme=dark] .page .sec-meta{background:var(--parchment-deep)}
body.immersive .page{padding-bottom:5rem}

/* Discount code at the buy box (067). */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.disc-box{margin:.6rem 0}
.disc-box summary{cursor:pointer;color:var(--maroon);font-weight:600;min-height:44px;display:flex;align-items:center}
/* A text's title, Heading 1, on its first page (VKG 2026-11-13). */
.page h1.text-title{text-align:center;color:var(--maroon);font-size:clamp(1.7rem,4.5vw,2.4rem);margin:.6rem 0 1.2rem;line-height:1.3}
body[data-theme=dark] .page h1.text-title{color:var(--gold)}
/* The sticky header must not cover what a link or the reader scrolls into view. */
html{scroll-padding-top:5.5rem}
@media (max-width:600px){html{scroll-padding-top:7rem}}
html:has(body.immersive){scroll-padding-top:3.8rem}

/* Quick corrections (VKG 2026-11-15) — reviewers only; a sent item keeps a light shade (rule 43.8). */
.corr{margin-top:1rem;padding:.7rem .8rem;border:1px solid #D9CDA8;border-radius:8px;background:#FFFDF5}
.corr textarea,.corr input{width:100%;box-sizing:border-box;margin:.3rem 0 .5rem;font-size:1.05rem;padding:.4rem}
.corr-orig{padding:.3rem .4rem;background:#fff;border:1px dashed #D9CDA8;border-radius:4px;margin:.2rem 0 .5rem}
.corr-list{margin:.6rem 0 0;padding-left:1.4rem}
.corr-item{margin:.35rem 0}
.corr-item del{color:#8a2b2b}
.corr-item ins{color:#1f5f2a;text-decoration:none;font-weight:600}
.corr-item .meta{display:block}
.corr-accepted,.corr-rejected{opacity:.65}
mark.corr-mark{background:rgba(255,213,79,.45);border-bottom:2px dotted #b8860b;padding:0 .1em}
@media (prefers-color-scheme: dark){.corr{background:transparent}.corr-orig{background:transparent}}
.corr-fab{position:fixed;right:16px;bottom:6.5rem;z-index:60;min-height:48px;box-shadow:0 2px 8px rgba(0,0,0,.25)}
.corr-fab[hidden]{display:none}

/* Drawings of a practice, above its text (Yoga Śāstra Book 3) */
.bk-figs { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin: .5rem 0 1rem; }
.bk-fig { margin: 0; text-align: center; max-width: 100%; }
.bk-fig img { max-width: min(100%, 340px); height: auto; background: #fff; border-radius: 4px; }
.bk-fig figcaption { font-size: .9rem; margin-top: .25rem; }
/* Language on demand (rule 51, VKG 2026-11-16): the original first; transliteration and translations
   only when asked. Tap targets 56 px (rule 45); wraps at 390 px, never scrolls sideways (rule 44.3). */
.lod-toggle{min-height:44px}
.lod-panel{border:1px solid var(--line);border-radius:8px;padding:.6rem .8rem;margin:.3rem 0 .8rem;background:var(--paper);max-width:100%;box-sizing:border-box}
.lod-grp{border:0;margin:0 0 .6rem;padding:0;display:flex;flex-wrap:wrap;gap:.4rem;min-width:0}
.lod-grp legend{font-weight:700;margin-bottom:.3rem;padding:0}
.lod-grp .seg-btn{min-height:56px;min-width:56px}
.lod-ck{display:inline-flex;align-items:center;gap:.4rem;min-height:56px;padding:0 .7rem;border:1px solid var(--line);border-radius:6px;cursor:pointer;max-width:100%;flex-wrap:wrap}
.lod-ck input{width:22px;height:22px;accent-color:var(--maroon)}
.lod-act{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem}
.lod-act .btn{min-height:56px;min-width:120px}
.lod-translit{margin-top:.5rem;opacity:.92;overflow-wrap:anywhere}
.lod-tr{border-left:3px solid var(--line);padding-left:.7rem;margin:.6rem 0}
.lod-prose{white-space:pre-line;line-height:1.75;overflow-wrap:anywhere}
.lod-name{font-weight:700;margin:.2rem 0;font-size:.9rem}
.lod-missing{margin:.4rem 0}
body[data-theme=dark] .lod-panel{background:var(--paper);color:var(--ink)}

/* Per-language Notes (VKG 2026-11-17): one button per language under the text, and the MAP / Notes switcher. */
.notes-btns{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0 .5rem}
.notes-btns .btn,.notes-btns .seg-btn{min-height:44px}

/* ── Language and display, four steps (VKG 2026-11-20: "No one knows how to select a language") ── */
.lod-bar{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem 1rem;border:2px solid var(--maroon);border-radius:10px;
  padding:.6rem .8rem;margin:0 0 .8rem;background:var(--paper)}
.lod-now{flex:1 1 16rem;font-size:1rem;line-height:1.5}
.lod-bar .lod-toggle{min-height:56px;font-size:1.05rem;padding:0 1.2rem}
.lod-h{font-size:1.25rem;margin:.2rem 0 .8rem;color:var(--maroon)}
.lod-panel{border:2px solid var(--maroon)}
.lod-grp legend{font-size:1.08rem}
.lod-n{display:inline-flex;align-items:center;justify-content:center;width:1.8rem;height:1.8rem;border-radius:50%;
  background:var(--maroon);color:#fff;font-size:1rem;margin-right:.35rem}
.lod-ck.off{opacity:.55;cursor:not-allowed}
.lod-show-row{display:grid;grid-template-columns:1fr 1fr;gap:.7rem;width:100%}
.lod-show-row .lod-show{min-height:68px;font-size:1.15rem;font-weight:700;width:100%}
@media (max-width:600px){.lod-show-row{grid-template-columns:1fr}}
.lod-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.4rem;align-items:start}
.lod-cols .lod-c2>.lod-translit:first-child{margin-top:0}
.lod-cols .lod-c2>.lod-tr:first-child{margin-top:0}
@media (max-width:820px){.lod-cols{grid-template-columns:1fr}}
.lod-orig-off{display:none}
body[data-theme=dark] .lod-bar,body[data-theme=dark] .lod-panel{border-color:var(--gold)}
body[data-theme=dark] .lod-h{color:var(--gold)}
/* 🌐 Language and ⚙ Settings in the header that stays in view; Settings a sheet on a phone. */
.hdr-rd{display:inline-flex;gap:.35rem;margin-left:auto}
.hdr-rd .btn{min-height:44px;padding:.25rem .6rem;white-space:nowrap}
.hdr-rd + .who{margin-left:.35rem}
.set-head{display:flex;align-items:center;justify-content:space-between;gap:.6rem}
.set-head .btn{min-height:44px}
@media (max-width:820px){
  #settings:not([hidden]){position:fixed;top:4.6rem;left:.6rem;right:.6rem;z-index:45;max-height:78vh;overflow:auto;
    box-shadow:0 8px 28px rgba(0,0,0,.25)}
}
@media (max-width:600px){#settings:not([hidden]){top:6.4rem}}
body.immersive .hdr-rd{display:none}
/* Phone: Settings already holds Text size, so the reader's header drops the Aa button and keeps two rows. */
@media (max-width:600px){
  body:has(.hdr-rd) header.top .ts-btn{display:none!important}
  header.top .hdr-rd{display:none}   /* on a phone Settings sits in the Globe menu (rule 56) */
  body:has(.hdr-rd) header.top .book-crumb a{max-width:40vw}
}
/* The Globe (rule 56, VKG 2026-11-20): one reading language, beside the profile photo. */
.globe-btn{min-height:44px;padding:.2rem .55rem;white-space:nowrap}
.who{position:relative}
.globe-menu{right:0;min-width:15rem;display:none;flex-direction:column;gap:.25rem}
.globe-menu.open{display:flex}
.globe-opt{display:block;width:100%;text-align:left;min-height:48px;padding:.4rem .7rem;border:1px solid var(--line);border-radius:6px;
  background:var(--paper);color:var(--ink);font:inherit;cursor:pointer}
.globe-opt.on{background:var(--maroon);color:#fff;border-color:var(--maroon)}
.globe-tl{display:flex;gap:.45rem;align-items:center;min-height:48px}
.globe-tl input{width:22px;height:22px;accent-color:var(--maroon)}
.tabs[hidden]{display:none!important}
/* ── The Preface, one layout in every book (SOPS 6.11, VKG 2026-11-20) ── */
.preface{max-width:68ch;margin:0 auto 1rem;line-height:1.8;font-size:1.05rem}
.preface p{margin:0 0 1em}
.preface .pf-lead{font-size:1.1em}
.preface .pf-h{font-size:1.15rem;margin:1.6em 0 .7em;color:var(--maroon)}
.preface .pf-list{padding-left:2.4em;margin:0 0 1.3em}
.preface .pf-list li{margin:0 0 .85em;padding-left:.35em}
.preface .pf-dev{list-style-type:devanagari}
.preface .pf-sign{text-align:right;margin:2em 0 1em;font-weight:600;line-height:1.6}
.preface .pf-foot{font-size:.9em;color:var(--muted);border-top:1px solid var(--line);padding-top:.7em;margin-top:1.8em}
.pf-title{text-align:center;color:var(--maroon);font-size:clamp(1.6rem,4.5vw,2.2rem);margin:.4rem 0 1.4rem}
body[data-theme=dark] .preface .pf-h,body[data-theme=dark] .pf-title{color:var(--gold)}

/* ── The PDF-simple reader (VKG 2026-11-24; approved mock docs/mocks/books-reader-simple.html) ──────────
   One long scroll; one bar (← · ☰ · title · MAP · Aa) that hides while reading down; a fast-scroll handle on
   the right edge; Aa = text size + two line spacings; paragraphs with a small gap, never a blank line. */
.pdf-bar,.pdf-rail,.pdf-scrim{display:none}
body.pdf .pdf-bar{display:flex;position:fixed;left:0;right:0;top:0;z-index:40;align-items:center;gap:2px;height:52px;
  padding:0 max(6px,env(safe-area-inset-right)) 0 max(6px,env(safe-area-inset-left));background:var(--paper);border-bottom:1px solid var(--line);transition:transform .2s}
body.pdf .pdf-bar.pb-hide{transform:translateY(-100%)}
.pdf-bar .pb-btn{min-width:48px;height:48px;border:0;background:none;color:var(--ink);font-size:1.3rem;cursor:pointer;border-radius:8px;
  display:inline-flex;align-items:center;justify-content:center;text-decoration:none;padding:0 .5rem}
.pdf-bar .pb-aa{font-family:Georgia,serif}
.pdf-bar .pb-map{font:600 .95rem 'Helvetica Neue',Arial,sans-serif;color:var(--maroon)}
.pdf-bar .pb-map[hidden]{display:none}
.pdf-bar .pb-t{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;color:var(--muted);font-size:1rem}
body.pdf .page{padding-top:calc(60px + env(safe-area-inset-top))}
body.pdf .page .text{white-space:pre-line}
.page .text p.pp{margin:0 0 .45em}
.page .text p.pp:last-child{margin-bottom:0}
body.pdf .page .sec-meta{position:static;background:none;border:0;padding:0;margin:1.6em auto .5em;max-width:46rem;
  font:600 calc(1.15rem * var(--scale,1))/1.35 'ShabdaScripts','Iowan Old Style',Georgia,serif;color:var(--maroon)}
body.pdf .page .flow-sec:first-child .sec-meta{margin-top:.3em}
body.pdf .page .pf-title{max-width:46rem;margin-left:auto;margin-right:auto}
.flow-fin{text-align:center;margin:2rem 0}
body.pdf #flow-end{max-width:46rem;margin:1.5rem auto 0}
body.pdf .page{padding-bottom:40vh}
/* editors keep their tools and tabs (Settings → Editor tools) */
body.immersive.pdf.pdf-tools .tabs:not([hidden]){display:flex!important}
body.immersive.pdf.pdf-tools .page .sec-extras{display:block!important}
/* ☰ Contents: the chapter list as a drawer */
body.immersive.pdf.pdf-toc aside.chapters{display:block!important;position:fixed;top:0;bottom:0;left:0;width:min(86vw,380px);z-index:62;
  overflow:auto;background:var(--paper);padding:16px 8px 30px;box-shadow:6px 0 24px rgba(0,0,0,.2);max-height:none}
body.pdf .pdf-scrim:not([hidden]){display:block;position:fixed;inset:0;z-index:55;background:rgba(0,0,0,.25)}
/* Aa: a sheet from the foot */
body.pdf #settings.pdf-sheet{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:60;max-width:560px;margin:0 auto;display:block;
  border-radius:16px 16px 0 0;box-shadow:0 -6px 24px rgba(0,0,0,.18);padding:16px 20px calc(18px + env(safe-area-inset-bottom));font-size:1rem}
body.pdf #settings.pdf-sheet[hidden]{display:none}
.pdf-sheet .pdf-row{display:flex;align-items:center;gap:12px;margin-bottom:14px;flex-wrap:nowrap}
.pdf-sheet .pdf-row>span:first-child{min-width:6.5rem;color:var(--ink);font-weight:600}
.pdf-sheet input[type=range]{flex:1;min-width:0;height:40px;accent-color:var(--maroon)}
.pdf-sheet .pdf-a{font-family:Georgia,serif;color:var(--ink)}
.pdf-sheet .pdf-lh{flex:1;min-height:52px;border-width:2px;border-radius:10px;font-size:1rem}
.pdf-sheet .pdf-lh.on{border-color:var(--maroon);color:var(--maroon);font-weight:700}
.pdf-sheet .pdf-ed{font-size:.9rem;color:var(--muted)}
/* the fast-scroll handle */
body.pdf .pdf-rail{display:block;position:fixed;right:0;top:60px;bottom:10px;width:40px;z-index:41;pointer-events:none}
.pdf-thumb{position:absolute;right:5px;width:28px;height:48px;border-radius:14px;background:var(--maroon);color:#fff;font-size:13px;
  display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .3s;touch-action:none;cursor:grab}
.pdf-rail.show .pdf-thumb,.pdf-rail.drag .pdf-thumb{opacity:.85;pointer-events:auto}
.pdf-bubble{position:absolute;right:42px;transform:translateY(-50%);background:var(--ink);color:var(--paper);padding:8px 12px;border-radius:8px;
  font-size:15px;white-space:nowrap;display:none;max-width:70vw;overflow:hidden;text-overflow:ellipsis}
.pdf-rail.drag .pdf-bubble{display:block}
.pdf-bar .pb-globe{position:relative;display:inline-flex}
.pdf-bar .pb-globe .globe-btn{min-height:48px;border:0}
.pdf-bar .pb-globe .globe-menu{right:0;left:auto;top:100%}

/* VKG 2026-11-26 (all books): Save is off until a correction is made, and looks off; svara marks need room. */
#corr-save:disabled,#pf button[type=submit]:disabled{opacity:.35;filter:grayscale(1);cursor:not-allowed}
#corr-new{line-height:2.6}

/* VKG 2026-11-26: Continue reading carries the star and a remove button; list rows carry the star;
   the listing has a heading so a category tap lands somewhere visible. */
.continue a{position:relative;padding-right:6.2rem}
.continue .cont-acts{position:absolute;top:50%;right:.5rem;transform:translateY(-50%);display:flex;gap:.3rem;align-items:center}
.continue .star,.continue .cont-x,.book-list .star{min-width:44px;min-height:44px}
.cont-x{background:none;border:1px solid var(--line);border-radius:8px;font-size:1.1rem;color:var(--muted);cursor:pointer}
.cont-x:hover,.cont-x:focus-visible{color:var(--maroon);border-color:var(--maroon)}
.book-list td.ttl .star{float:right;font-size:1.4rem;padding:0;margin-left:.3rem}
.shelf-head{scroll-margin-top:90px;margin:1.2rem 0 .3rem}

/* ── The book page, as the mock VKG approved on 2026-11-24 (docs/mocks/books-reader-simple.html) ── */
.bk-hero{display:grid;grid-template-columns:170px 1fr;gap:1.2rem;align-items:start;margin-top:.5rem}
.bk-hero .cover{max-width:170px}
.bk-hero h1{font-size:1.75rem;line-height:1.25;margin:0 0 .25rem;font-weight:600}
.bk-en{font-size:1.05rem;color:var(--muted);margin:0 0 .6rem}
.bk-by{font-size:.95rem;margin:0 0 .25rem}
.bk-facts{font-size:.9rem;color:var(--muted);margin:0 0 .9rem}
.bk-btns{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center}
.bk-btns .btn{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:0 1.4rem;border-radius:26px;font-size:1.05rem;font-weight:600;border:2px solid var(--maroon)}
.bk-btns .btn.ghost{background:transparent;color:var(--maroon)}
.bk-btns .meta{flex-basis:100%;margin:.2rem 0 0}
.bk-price{font-size:.9rem;color:var(--muted);margin:.5rem 0 0}
main.bk-page{max-width:780px}
.bk-page h2{color:var(--maroon);font-size:1.25rem;margin:1.8rem 0 .6rem;padding-bottom:.35rem;border-bottom:1px solid var(--line)}
.bk-about{font-size:1.05rem;line-height:1.6;margin:0 0 .5rem}
.bk-pref .preface{max-width:none;margin:0}
.bk-pref .preface.pref-clip{max-height:15.5em;overflow:hidden;position:relative}
.bk-pref .preface.pref-clip::after{content:"";position:absolute;left:0;right:0;bottom:0;height:4em;background:linear-gradient(transparent,var(--parchment))}
.pref-more{margin-top:.3rem;background:none;border:0;color:var(--maroon);font-size:1rem;font-weight:600;cursor:pointer;padding:.5rem 0;min-height:44px}
.toc.bk-toc{columns:auto}
.toc.bk-toc li{border-bottom:1px solid var(--line);padding:0;font-size:1.1rem}
.toc.bk-toc li.part{border-bottom:0;padding:.9rem 0 .2rem;font-size:.95rem}
.toc.bk-toc a,.toc.bk-toc .lock{display:flex;justify-content:space-between;gap:.8rem;align-items:center;min-height:56px;padding:.6rem .25rem;text-decoration:none;color:var(--ink)}
.toc.bk-toc .lock{color:var(--muted)}
.toc.bk-toc .n{color:var(--muted);font-size:max(.875rem,14px);white-space:nowrap;text-align:right}
@media (max-width:520px){.bk-hero{grid-template-columns:110px 1fr;gap:.9rem}.bk-hero .cover{max-width:110px}.bk-hero h1{font-size:1.45rem}.bk-btns .btn{flex:1 1 auto}}
