/* Книги: полка и читалка (webapp/assets/books.js, reader.js). Слова, предложения и шторки общие с библиотекой (app.css). */
.bk-prog{height:4px;border-radius:2px;background:var(--surface-2);overflow:hidden;margin-top:6px}
.bk-prog i{display:block;height:100%;background:var(--lang);border-radius:2px;transition:width .3s}
.bk-top{display:grid;gap:2px;min-width:0}
.bk-top b{font-size:17px;line-height:1.3}
.reader.bk-page{font-size:var(--bk-fs,19px);min-height:40vh}
.reader.bk-page p{margin:0 0 .8em}
.reader.bk-page .bk-h{font:700 1.05em/1.4 var(--f-body);margin:.2em 0 .9em;text-wrap:balance}
.reader.bk-page blockquote{margin:0 0 .8em;padding-left:14px;border-left:3px solid var(--line)}
.reader.bk-page .bk-v{padding-left:14px;font-style:italic}
.bk-wait{animation:dim .9s ease-in-out infinite alternate}
.bk-nav{display:flex;align-items:center;gap:10px;position:sticky;bottom:0;z-index:5;background:var(--bg);margin-inline:-2px;padding:10px 2px calc(10px + env(safe-area-inset-bottom, 0px) + var(--tg-safe-area-inset-bottom, 0px));border-top:1px solid var(--line)}
.bk-nav .btn:first-child{min-width:48px;font-size:20px}
.bk-nav .btn.primary{margin-left:auto;white-space:nowrap}
.bk-where .small{white-space:nowrap}
.bk-where{flex:1 1 auto;min-width:0;text-align:center}
.bk-where .bk-prog{margin-top:4px}
.bk-menu{max-height:70vh}
.bk-toc{display:grid;gap:4px}
.bk-toc button{display:flex;justify-content:space-between;align-items:baseline;gap:12px;text-align:left;border:0;border-radius:10px;background:none;color:inherit;font:inherit;padding:9px 10px;cursor:pointer}
.bk-toc button:hover{background:var(--surface-2)}
.bk-toc button[aria-current]{background:var(--lang-soft);color:var(--lang-ink);font-weight:600}
.bk-toc small{color:var(--muted);white-space:nowrap;font-family:var(--f-mono);font-size:12px}
.bk-toc span{min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body:has(.bk-nav) .sheet{bottom:0}
body.tts-wait .rtools [data-a="bkPlay"]{animation:dim .7s ease-in-out infinite alternate}
