/* Agape Bible - the church books Library (public/library.js). Lists in the iOS style of ios.css; the reading view uses
   the Bible's own reading fonts, size and line spacing (--font-ar / --font-en, --fs, --lh-ar / --lh-en). */
.pv-inner.lib { max-width: 780px; margin-inline: auto; }
.lib .ios-group { margin-bottom: 18px; }
.lib .ios-head:first-child { margin-top: 4px; }
.lib-search { margin: 0 0 6px; }
.lib-row { min-height: 56px; padding-block: 9px; }
.lib-row-t { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.lib-row-t > b, .lib-row-t > span:not(.lib-tile):not(.lib-n) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lib-row b { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.lib-row small { display: block; margin-top: 2px; line-height: 1.35; overflow-wrap: anywhere; }
.lib-row-t > b + small, .lib-row-t > small { margin-top: 0; }
.lib-row-t:has(> b) { flex-direction: column; align-items: flex-start; gap: 2px; }
[lang="ar"] .lib-row b { font-family: var(--font-ar); font-size: 18px; font-weight: 700; }
[lang="en"] .lib-row b { font-family: var(--font-en); font-size: 18px; }
.lib-tile { position: relative; width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--tile); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12); color: #fff; }
.lib-tile::before { content: ""; position: absolute; inset: 6px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5C6.5 4 9 4 12 6c3-2 5.5-2 8-.5V19c-2.5-1.5-5-1.5-8 .5-3-2-5.5-2-8-.5z'/%3E%3Cpath d='M12 6v13.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5C6.5 4 9 4 12 6c3-2 5.5-2 8-.5V19c-2.5-1.5-5-1.5-8 .5-3-2-5.5-2-8-.5z'/%3E%3Cpath d='M12 6v13.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.lib-cat .lib-row-t > span:last-child { display: flex; flex-direction: column; }
.lib-cat + .ios-row::before { inset-inline-start: 62px; }
.lib-prog { flex: none; width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(var(--tint) var(--p), var(--fill) 0); -webkit-mask: radial-gradient(circle, transparent 11px, #000 12px); mask: radial-gradient(circle, transparent 11px, #000 12px); }

/* a book */
.lib-card { background: var(--row); border-radius: 18px; box-shadow: var(--card-shadow); padding: 16px; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.lib-card p { margin: 0; }
.lib-author { font-size: 16px; font-weight: 650; color: var(--tint); }
.lib-by, .lib-meta { font-size: 14px; color: var(--label-2); }
.lib-start, .lib-keep { min-height: 48px; border: 0; border-radius: 14px; font-family: var(--font-ui); font-size: 16px; font-weight: 650; cursor: pointer; padding: 8px 14px; overflow-wrap: anywhere; line-height: 1.35; }
.lib-start { margin-top: 8px; background: var(--tint); color: var(--row); box-shadow: 0 8px 20px rgba(138, 58, 22, .22); }
.lib-keep { background: var(--fill); color: var(--chrome-ink); font-size: 15px; font-weight: 600; }
.lib-keep.on { color: var(--label-2); }
.lib-keep:disabled { cursor: default; }
.lib-start:active, .lib-keep:not(:disabled):active { transform: scale(.98); }
.lib-n { flex: none; min-width: 28px; height: 28px; border-radius: 8px; background: var(--fill); color: var(--label-2); font-size: 13px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.lib-toc .lib-row { min-height: 50px; }
.lib-toc .lib-row-t > span:last-child { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
[lang="ar"] .lib-toc .lib-row-t > span:last-child { font-family: var(--font-ar); font-size: 17px; }
[lang="en"] .lib-toc .lib-row-t > span:last-child { font-family: var(--font-en); font-size: 17px; }
.lib-toc .lib-row.current .lib-n { background: var(--tint); color: var(--row); }
.lib-toc .lib-row.current .lib-row-t > span:last-child { color: var(--tint); font-weight: 700; }
.lib .srcline { font-family: var(--font-ui); font-size: 12px; text-align: center; margin: 14px 0 0; }
.lib .srcline a { color: var(--label-2); }

/* reading */
#pageView:has(.lib-chapter) .lt { font-size: 24px; line-height: 1.3; }
.lib-chapter .pg-pickers { display: flex; margin-bottom: 6px; }
.lib-jump { width: 100%; min-width: 0; }
.lib-text { font-family: var(--font-ar); font-size: var(--fs); line-height: var(--lh-ar, 1.95); text-align: justify; color: var(--ink); padding: 4px 4px 0; overflow-wrap: break-word; }
.lib-text[dir="ltr"] { font-family: var(--font-en); line-height: var(--lh-en, 1.7); text-align: start; hyphens: auto; }
.lib-text h2.lib-ch { font-size: 1.22em; line-height: 1.45; color: var(--accent); text-align: center; margin: .5em 0 .8em; font-weight: 700; }
.lib-text h3 { font-size: 1.06em; line-height: 1.5; color: var(--accent); margin: 1.2em 0 .4em; text-align: start; }
.lib-text p { margin: 0 0 .75em; }
.lib-text b { color: var(--accent-2, var(--accent)); }
.lib-text sup { font-size: .62em; line-height: 0; color: var(--label-2); }
.lib-text p.fn { font-size: .78em; line-height: 1.6; color: var(--label-2); border-top: .5px solid var(--hairline); padding-top: .5em; margin-top: 1em; }
.lib-text p.fn + p.fn { border-top: 0; padding-top: 0; margin-top: 0; }
.lib-text mark.lib-hit { background: rgba(233, 196, 106, .6); border-radius: 4px; padding: 0 1px; }
.lib-foot { margin-top: 28px; }
.lib-foot > span:empty { display: block; }

/* search results */
.lib-results .pv-sub { text-align: center; color: var(--label-2); }
.lib-hits { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.lib-hit-item { width: 100%; cursor: pointer; }
.lib-hit-item .ref { overflow-wrap: anywhere; }
.lib-hit-item .txt { font-size: 16px; line-height: 1.75; color: var(--ink); overflow-wrap: anywhere; }
.lib-hit-item[dir="ltr"] .txt { font-size: 17px; line-height: 1.55; }
.lib-more { align-self: center; min-height: 44px; padding: 0 22px; border-radius: 22px; }
