/* The library (docs/LIBRARY.md, "Reading pages"). Book text arrives as classes only — t-* from the book's EPUB
   semantics, c-* from its own class names, b-* ids — written by LibraryHtml; this file is the only styling it gets.
   Sizes that change (progress bars) are set from js/library.js, never in a style attribute. */

.lib-page { padding-bottom: 3rem; }

.lib-notice { margin: 1.5rem 0; padding: 1rem 1.25rem; border: 1px solid var(--nr-rule); border-radius: 6px; color: var(--nr-ink); background: #f6f8f9; }
.lib-credit, .lib-edition { margin-top: 2.5rem; font-size: .9rem; color: var(--nr-muted); }
.lib-edition p { margin: 0 0 .4rem; max-width: 46rem; }

/* ---- covers ---- */

.lib-cover { display: block; width: 100%; aspect-ratio: 2 / 3; height: auto; object-fit: cover; border-radius: 4px; background: #e9edf0; box-shadow: 0 1px 2px rgba(15, 37, 61, .18), 0 6px 18px rgba(15, 37, 61, .10); }
.lib-cover-type { display: flex; flex-direction: column; justify-content: space-between; padding: 12% 10%; color: #fff; font-family: var(--nr-serif); text-align: center; overflow: hidden; }
.lib-cover-title { font-size: 1.05rem; font-weight: 600; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
.lib-cover-author { font-family: var(--nr-sans); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.lib-cover-large .lib-cover-title { font-size: 1.8rem; }
.lib-cover-large .lib-cover-author { font-size: .85rem; }
.lib-tone-0 { background: #0f253d; }
.lib-tone-1 { background: #0b6f75; }
.lib-tone-2 { background: #7a3e2e; }
.lib-tone-3 { background: #4b3a6b; }
.lib-tone-4 { background: #3d5a3a; }
.lib-tone-5 { background: #6b5320; }

/* ---- /books ---- */

.lib-search { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.25rem; }
.lib-search input[type="search"] { flex: 1 1 16rem; min-width: 0; }
.lib-search input, .lib-search select, .lib-search button { padding: .55rem .75rem; border: 1px solid #c6d0d8; border-radius: 6px; font: inherit; background: #fff; color: var(--nr-ink); }
.lib-search select { flex: 0 1 auto; max-width: 100%; }
.lib-search button { background: var(--nr-ink); border-color: var(--nr-ink); color: #fff; font-weight: 600; }

.lib-chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.lib-chips a { display: inline-block; padding: .25rem .7rem; border-radius: 999px; background: #eef3f5; color: var(--nr-ink); text-decoration: none; font-size: .9rem; }
.lib-chips a:hover { background: #dfe8ec; }

.lib-count { color: var(--nr-muted); font-size: .9rem; margin: 0 0 .75rem; }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 1.75rem 1.25rem; list-style: none; padding: 0; margin: 0; }
.lib-card-link { display: flex; flex-direction: column; gap: .35rem; color: inherit; text-decoration: none; }
.lib-card-link .lib-cover { margin-bottom: .35rem; transition: transform .15s ease; }
.lib-card-link:hover .lib-cover, .lib-card-link:focus-visible .lib-cover { transform: translateY(-3px); }
.lib-card-title { font-family: var(--nr-serif); font-weight: 600; font-size: 1.02rem; line-height: 1.25; color: var(--nr-ink); }
.lib-card-author { font-size: .88rem; color: var(--nr-muted); }
.lib-card-meta { font-size: .8rem; color: var(--nr-muted); }

.lib-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; color: var(--nr-muted); }

.lib-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.lib-continue { margin: .5rem 0 2rem; }

/* A row of books with a place: Continue reading and My books. */
.lib-continue-list, .lib-mine { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.lib-continue-list { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.lib-shelf-item { display: flex; flex-direction: column; gap: .5rem; padding: .75rem; border: 1px solid var(--nr-rule); border-radius: 8px; background: #fff; }
.lib-shelf-link { display: flex; gap: .9rem; color: inherit; text-decoration: none; }
.lib-shelf-link .lib-cover { flex: 0 0 4.5rem; width: 4.5rem; }
.lib-shelf-link .lib-cover-type { padding: .5rem .2rem; }
.lib-shelf-link .lib-cover-title { font-size: .6rem; }
.lib-shelf-link .lib-cover-author { font-size: .5rem; }
.lib-shelf-about { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.lib-bar { display: block; height: 4px; border-radius: 2px; background: #e3e9ed; overflow: hidden; margin-top: .25rem; }
.lib-bar > span { display: block; height: 100%; width: 0; background: var(--nr-teal-ink); }
.lib-shelf-actions { display: flex; justify-content: flex-end; gap: 1rem; font-size: .85rem; }
.lib-shelf-remove { border: 0; background: none; padding: 0; color: #9b2c2c; text-decoration: underline; cursor: pointer; font: inherit; }
.lib-mine { grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); }

/* "Add to My books" on a card: over the top of the cover, shown on hover or keyboard focus (always on touch screens,
   which have no hover). Drawn by js/library.js; a book in My books shows "In My books", and "Remove" on hover. */
.lib-card { position: relative; }
.lib-card-shelf {
    position: absolute; top: .5rem; left: .5rem; right: .5rem; z-index: 1;
    display: flex; align-items: center; justify-content: center; gap: .35rem;
    padding: .4rem .5rem; border: 0; border-radius: 6px;
    background: rgba(255, 255, 255, .95); color: var(--nr-ink);
    font: 600 .8rem/1.2 var(--nr-sans, inherit); cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 37, 61, .25);
    opacity: 0; transition: opacity .15s ease;
}
.lib-card:hover .lib-card-shelf, .lib-card:focus-within .lib-card-shelf, .lib-card-shelf:focus-visible { opacity: 1; }
.lib-card-shelf:focus-visible { outline: 2px solid var(--nr-teal-ink); outline-offset: 2px; }
.lib-card-shelf-on { background: var(--nr-teal-ink); color: #fff; }
.lib-card-shelf-undo { display: none; }
.lib-card-shelf-on:hover { background: #9b2c2c; }
.lib-card-shelf-on:hover .lib-card-shelf-text, .lib-card-shelf-on:hover .bi { display: none; }
.lib-card-shelf-on:hover .lib-card-shelf-undo { display: inline; }
@media (hover: none) { .lib-card-shelf { opacity: 1; } }

/* The small remove button in the corner of a book in Continue reading and the workspace. */
.lib-shelf-item-removable { position: relative; padding-right: 2.25rem; }
.lib-shelf-x {
    position: absolute; top: .4rem; right: .4rem;
    width: 1.75rem; height: 1.75rem; display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: transparent; color: var(--nr-muted); cursor: pointer;
}
.lib-shelf-x:hover, .lib-shelf-x:focus-visible { background: #f3e3e3; color: #9b2c2c; }
.ra-books-list { margin: .75rem 0; }
.ra-books-links { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; }

/* ---- a book's page ---- */

.lib-book { display: grid; grid-template-columns: minmax(10rem, 17rem) 1fr; gap: 2.5rem; margin-top: 1rem; }
@media (max-width: 640px) {
    .lib-book { grid-template-columns: 1fr; gap: 1.25rem; }
    .lib-book-cover { max-width: 12rem; }
}
.lib-book-title { font-family: var(--nr-serif); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 .4rem; color: var(--nr-ink); }
.lib-book-subtitle { font-family: var(--nr-serif); font-size: 1.25rem; font-style: italic; color: var(--nr-muted); margin: 0 0 .75rem; }
.lib-book-people { margin: 0 0 .2rem; font-size: 1.05rem; }
.lib-book-others { font-size: .95rem; color: var(--nr-muted); }
.lib-book-facts { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; padding: 0; margin: 1rem 0; color: var(--nr-muted); font-size: .9rem; }
.lib-book-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.25rem 0 .5rem; }
.lib-button { display: inline-block; padding: .65rem 1.2rem; border: 1px solid var(--nr-ink); border-radius: 6px; background: #fff; color: var(--nr-ink); font-weight: 600; text-decoration: none; font: inherit; font-weight: 600; cursor: pointer; }
.lib-button-primary { background: var(--nr-ink); color: #fff; }
.lib-button:hover { text-decoration: none; filter: brightness(1.08); }
.lib-book-place { color: var(--nr-teal-ink); font-size: .92rem; margin: 0 0 1rem; }
.lib-book-summary { font-family: var(--nr-serif); font-size: 1.2rem; line-height: 1.5; margin: 1.25rem 0 .75rem; }
.lib-book-description { font-family: var(--nr-serif); font-size: 1.05rem; line-height: 1.6; max-width: 42rem; }
.lib-book-shelves { margin-top: 1.5rem; }
.lib-book-shelves dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--nr-muted); margin-top: .75rem; }
.lib-book-shelves dd { margin: .35rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.lib-tag { display: inline-block; padding: .2rem .65rem; border-radius: 999px; background: #eef3f5; color: var(--nr-ink); font-size: .88rem; text-decoration: none; }
.lib-tag:hover { background: #dfe8ec; }

.lib-contents { margin-top: 2.5rem; max-width: 46rem; }
.lib-contents-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--nr-rule); }
.lib-contents-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--nr-rule); }
.lib-contents-list a { color: var(--nr-ink); text-decoration: none; }
.lib-contents-list a:hover { text-decoration: underline; }
.lib-contents-list .lib-depth-1 { padding-left: 1.25rem; }
.lib-contents-list .lib-depth-2 { padding-left: 2.5rem; }
.lib-contents-list .lib-depth-3 { padding-left: 3.75rem; }
.lib-contents-list .lib-matter a { color: var(--nr-muted); }
.lib-contents-list .lib-current a { font-weight: 700; }
.lib-contents-time { flex: none; color: var(--nr-muted); font-size: .82rem; }

/* ---- the reading page ---- */

html.lib-dark, html.lib-dark body { background: #15191d; }
/* The site's own header keeps its paper under its dark words; without it the Dark page showed through and the
   links, logo and tagline were dark on dark. (The sections bar already has its own background.) */
html.lib-dark .nr-header { background: var(--nr-paper); }
.lib-reader { --lib-paper: #ffffff; --lib-ink: #1d2730; --lib-muted: #5d6b79; --lib-rule: #dde3e8; --lib-link: #0b6f75; --lib-size: 1.18rem;
              background: var(--lib-paper); color: var(--lib-ink); min-height: 100vh; padding: 0 1rem 4rem; }
.lib-theme-sepia { --lib-paper: #f6efdf; --lib-ink: #3b2f20; --lib-muted: #7a6a52; --lib-rule: #e3d7bd; --lib-link: #7a4b16; }
.lib-theme-dark { --lib-paper: #15191d; --lib-ink: #d9dee3; --lib-muted: #95a1ad; --lib-rule: #2c343b; --lib-link: #6fd3d8; }
.lib-size-0 { --lib-size: .98rem; }
.lib-size-1 { --lib-size: 1.08rem; }
.lib-size-2 { --lib-size: 1.18rem; }
.lib-size-3 { --lib-size: 1.3rem; }
.lib-size-4 { --lib-size: 1.45rem; }
.lib-size-5 { --lib-size: 1.65rem; }

.lib-progress { position: sticky; top: 0; z-index: 5; height: 3px; margin: 0 -1rem; background: transparent; }
.lib-progress > span { display: block; height: 100%; width: 0; background: var(--nr-teal); }

.lib-reader-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; max-width: 42rem; margin: 0 auto; padding: 1rem 0; border-bottom: 1px solid var(--lib-rule); font-size: .9rem; }
.lib-reader-book { display: inline-flex; gap: .5rem; align-items: baseline; color: var(--lib-ink); text-decoration: none; min-width: 0; }
.lib-reader-book:hover strong { text-decoration: underline; }
.lib-reader-by, .lib-reader-where { color: var(--lib-muted); }
.lib-reader-tools { display: inline-flex; gap: .35rem; }
.lib-reader-tool { height: 2.25rem; padding: 0 .7rem; border: 1px solid var(--lib-rule); border-radius: 6px; background: transparent; color: var(--lib-ink); font: inherit; cursor: pointer; }
.lib-reader-tool[aria-expanded="true"], .lib-reader-tool[aria-pressed="true"] { border-color: var(--lib-link); color: var(--lib-link); }

/* Display: how the page looks (js/library.js keeps the choices in "library:settings"). */
.lib-display { flex-basis: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .75rem 1.25rem; padding: .9rem 0 .25rem; }
.lib-display[hidden] { display: none; }
.lib-display-group { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.lib-display-name { flex: 0 0 4.5rem; color: var(--lib-muted); font-size: .85rem; }
.lib-display button { min-width: 2.25rem; height: 2.25rem; padding: 0 .55rem; border: 1px solid var(--lib-rule); border-radius: 6px; background: transparent; color: var(--lib-ink); font: inherit; font-size: .85rem; cursor: pointer; }
.lib-display [data-lib-size] { font-family: var(--nr-serif); font-weight: 600; }
.lib-display .lib-display-serif { font-family: var(--nr-serif); }
.lib-display .lib-display-sans { font-family: var(--nr-sans); }
.lib-display button[aria-pressed="true"] { border-color: var(--lib-link); box-shadow: inset 0 0 0 1px var(--lib-link); }
.lib-display button:disabled { opacity: .4; cursor: default; }
.lib-display-note { grid-column: 1 / -1; margin: 0; color: var(--lib-muted); font-size: .8rem; }
.lib-reader-page { white-space: nowrap; }
.lib-reader-shelf { height: 2.25rem; padding: 0 .7rem; border: 1px solid var(--lib-rule); border-radius: 6px; background: transparent; color: var(--lib-ink); font: inherit; cursor: pointer; }
.lib-reader-shelf[aria-pressed="true"] { border-color: var(--lib-link); color: var(--lib-link); }
.lib-swatch { display: inline-block; width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); vertical-align: middle; }
.lib-swatch-light { background: #fff; }
.lib-swatch-sepia { background: #f6efdf; }
.lib-swatch-dark { background: #15191d; }
.lib-theme-dark .lib-swatch { border-color: rgba(255, 255, 255, .45); }

.lib-turn { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 42rem; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--lib-rule); }
.lib-turn a { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; border: 1px solid var(--lib-rule); border-radius: 8px; color: var(--lib-ink); text-decoration: none; }
.lib-turn a:hover { border-color: var(--lib-link); }
.lib-turn-next { text-align: right; grid-column: 2; }
.lib-turn-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lib-muted); }
.lib-turn-title { font-family: var(--nr-serif); font-weight: 600; }

/* ---- the book's own text ---- */

.lib-text { max-width: 38em; margin: 2rem auto 0; font-family: var(--nr-serif); font-size: var(--lib-size); line-height: 1.65; overflow-wrap: break-word; hyphens: auto; }

/* Display choices. */
.lib-font-sans .lib-text, .lib-font-sans .lib-text h2, .lib-font-sans .lib-text h3, .lib-font-sans .lib-text h4,
.lib-font-sans .lib-text h5, .lib-font-sans .lib-text h6 { font-family: var(--nr-sans); }
.lib-spacing-compact .lib-text { line-height: 1.45; }
.lib-spacing-relaxed .lib-text { line-height: 1.95; }
.lib-width-narrow .lib-text { max-width: 31em; }
.lib-width-wide .lib-text { max-width: 48em; }
.lib-width-wide .lib-reader-head, .lib-width-wide .lib-turn { max-width: 56rem; }

/* js/library.js reads the screen's height with the browser's bars showing from this (Pages). */
.lib-screen-probe { position: fixed; top: 0; left: 0; width: 0; height: 100vh; height: 100svh; visibility: hidden; pointer-events: none; }
/* Pages: js/library.js sets the height and the column width (from script) and turns by moving the text sideways. */
.lib-layout-pages .lib-text { overflow: hidden; column-fill: auto; margin-top: 1.25rem; }
.lib-layout-pages .lib-text img { max-height: calc(var(--lib-page-height, 80vh) * .85); width: auto; }
.lib-layout-pages .lib-text figure, .lib-layout-pages .lib-text img { break-inside: avoid; }
.lib-layout-pages .lib-text h2, .lib-layout-pages .lib-text h3 { break-after: avoid; }
.lib-layout-pages .lib-turn { margin-top: 1.25rem; }
.lib-layout-pages { padding-bottom: 1rem; }
@media (min-width: 1100px) {
    .lib-layout-pages.lib-width-wide .lib-text { max-width: min(80em, 100%); }
    .lib-layout-pages.lib-width-wide .lib-reader-head, .lib-layout-pages.lib-width-wide .lib-turn { max-width: min(80em, 100%); }
}
.lib-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; max-width: 42rem; margin: .75rem auto 0; color: var(--lib-muted); font-size: .9rem; }
.lib-pager[hidden] { display: none; }
.lib-pager button { width: 2.5rem; height: 2.5rem; border: 1px solid var(--lib-rule); border-radius: 50%; background: transparent; color: var(--lib-ink); cursor: pointer; }
.lib-pager button:hover { border-color: var(--lib-link); color: var(--lib-link); }

/* Full screen: only the book and its own bar. */
html.lib-focus .nr-header, html.lib-focus .nr-sections, html.lib-focus .nr-footer, html.lib-focus .nr-skip { display: none !important; }
html.lib-focus .lib-reader { min-height: 100vh; }
.lib-text a { color: var(--lib-link); }
.lib-text p { margin: 0; text-indent: 1.5em; }
.lib-text h2 + p, .lib-text h3 + p, .lib-text h4 + p, .lib-text header + p, .lib-text hgroup + p, .lib-text hr + p,
.lib-text blockquote + p, .lib-text figure + p, .lib-text .t-epigraph + p, .lib-text section > p:first-child { text-indent: 0; }
.lib-text h2, .lib-text h3, .lib-text h4, .lib-text h5, .lib-text h6 { font-family: var(--nr-serif); color: var(--lib-ink); text-align: center; font-weight: 600; line-height: 1.25; margin: 2.5em 0 1.5em; }
.lib-text h2 { font-size: 1.6em; }
.lib-text h3 { font-size: 1.3em; }
.lib-text h4 { font-size: 1.1em; }
.lib-text > section > :first-child, .lib-text > section > hgroup:first-child > :first-child { margin-top: 1em; }
.lib-text hgroup { margin: 2.5em 0 1.5em; text-align: center; }
.lib-text hgroup > * { margin: 0; }
.lib-text hgroup > * + * { margin-top: .35em; font-size: 1.15em; font-weight: 400; font-style: italic; }
.lib-text .t-subtitle { font-style: italic; font-weight: 400; }
.lib-text hr { width: 25%; margin: 1.5em auto; border: 0; border-top: 1px solid var(--lib-rule); opacity: 1; }
.lib-text blockquote { margin: 1em 2em; }
.lib-text blockquote p { text-indent: 0; }
.lib-text blockquote p + p { margin-top: .5em; }
.lib-text figure { margin: 1.5em auto; text-align: center; }
.lib-text img { max-width: 100%; height: auto; }
.lib-text figcaption { font-size: .85em; font-style: italic; color: var(--lib-muted); margin-top: .5em; }
.lib-text table { margin: 1em auto; border-collapse: collapse; }
.lib-text td, .lib-text th { padding: .2em .5em; vertical-align: top; }
.lib-text abbr { text-decoration: none; }
.lib-text .t-roman, .lib-text .t-initialism { font-variant-numeric: normal; letter-spacing: .02em; }
.lib-missing-picture { display: block; margin: 1.5em auto; padding: .75em 1em; max-width: 30em; border: 1px dashed var(--lib-rule); border-radius: 6px; font-size: .9em; font-style: italic; color: var(--lib-muted); text-align: center; }

/* Epigraphs, letters, diaries. */
.lib-text .t-epigraph { margin: 1.5em 0 1.5em auto; max-width: 75%; font-style: italic; text-align: right; }
.lib-text .t-epigraph p { text-indent: 0; }
.lib-text .t-epigraph cite { display: block; font-style: normal; margin-top: .3em; }
.lib-text .t-letter { margin: 1.5em 1.5em; }
.lib-text .t-letter p { text-indent: 0; }
.lib-text .t-letter p + p { text-indent: 1.5em; }
.lib-text .t-salutation, .lib-text .t-sender, .lib-text .t-recipient, .lib-text .t-letter header p { text-indent: 0; }
.lib-text .t-letter header { margin-bottom: 1em; }
.lib-text .t-valediction, .lib-text .t-signature { display: block; text-align: right; text-indent: 0; margin-top: .5em; }
.lib-text .t-signature { font-variant: small-caps; }
.lib-text .t-postscript { margin-top: 1em; }
.lib-text .t-diary-entry { margin: 1.5em 0; }
.lib-text .c-half-page { margin: 3em 0; }
.lib-text .t-dedication, .lib-text .t-copyright-page, .lib-text .t-imprint, .lib-text .t-colophon { text-align: center; }
.lib-text .t-dedication p, .lib-text .t-copyright-page p, .lib-text .t-imprint p, .lib-text .t-colophon p { text-indent: 0; margin-top: 1em; }

/* Verse: each line is a span; a c-i1…c-i6 line is indented that many steps. Lines that run long hang. */
.lib-text .t-poem p, .lib-text .t-verse p, .lib-text .t-song p, .lib-text .t-hymn p { text-indent: 0; margin: 1em 0 0; text-align: left; }
.lib-text .t-poem, .lib-text .t-verse, .lib-text .t-song, .lib-text .t-hymn { width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; }
.lib-text .t-poem p > span, .lib-text .t-verse p > span, .lib-text .t-song p > span, .lib-text .t-hymn p > span { display: block; padding-left: 1em; text-indent: -1em; }
.lib-text .t-poem p > br, .lib-text .t-verse p > br, .lib-text .t-song p > br, .lib-text .t-hymn p > br { display: none; }
.lib-text p > span.c-i1 { padding-left: 2em; }
.lib-text p > span.c-i2 { padding-left: 3em; }
.lib-text p > span.c-i3 { padding-left: 4em; }
.lib-text p > span.c-i4 { padding-left: 5em; }
.lib-text p > span.c-i5 { padding-left: 6em; }
.lib-text p > span.c-i6 { padding-left: 7em; }

/* Plays: speakers, and the stage directions between the lines. */
.lib-text .t-drama table, .lib-text .t-scene table { width: 100%; margin: 1em 0; }
.lib-text .t-persona { font-variant: small-caps; letter-spacing: .02em; }
.lib-text td.t-persona { width: 22%; padding-right: 1em; text-align: right; white-space: nowrap; }
.lib-text .t-stage-direction { font-style: italic; }
.lib-text .t-stage-direction .t-persona { font-style: normal; }
.lib-text .t-dramatis-personae ul { list-style: none; padding: 0; text-align: center; }

/* Notes: the numbers in the text, and the notes at the end with their way back. */
.lib-text .t-noteref { font-size: .7em; vertical-align: super; line-height: 0; text-decoration: none; padding: 0 .1em; }
.lib-text .t-endnotes ol { padding-left: 1.5em; }
.lib-text .t-endnotes li { margin-bottom: .75em; }
.lib-text .t-endnotes p { text-indent: 0; }
.lib-text .t-backlink { font-size: .85em; text-decoration: none; }

@media (max-width: 640px) {
    .lib-text { margin-top: 1.25rem; }
    .lib-text blockquote, .lib-text .t-letter { margin-left: 1em; margin-right: 0; }
    .lib-text .t-epigraph { max-width: 90%; }
    .lib-text td.t-persona { white-space: normal; width: 28%; }
    .lib-turn { grid-template-columns: 1fr; }
    .lib-turn-next { grid-column: 1; }
}

@media print {
    .lib-reader-head, .lib-turn, .lib-progress { display: none; }
    .lib-reader { background: #fff; color: #000; }
}

/* Listen to this chapter (docs/LISTENING.md, "Books"): a bar under the reader's header. */
.lib-listen { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; max-width: var(--lib-measure, 42rem); margin: 0 auto 1rem; padding: .6rem .8rem; border: 1px solid var(--lib-rule); border-radius: 10px; color: var(--lib-ink); }
.lib-listen-play { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.25rem; padding: .25rem .9rem; border: 1px solid var(--lib-ink); border-radius: 999px; background: transparent; color: var(--lib-ink); font: inherit; font-weight: 600; cursor: pointer; }
.lib-listen-play[aria-pressed="true"] { background: var(--lib-ink); color: var(--lib-paper); }
.lib-listen-play:disabled { opacity: .6; cursor: progress; }
.lib-listen-status { flex: 1 1 12rem; min-height: 1.3em; color: var(--lib-muted); font-size: .9rem; }
.lib-listen-audio { flex: 1 1 100%; width: 100%; height: 2.5rem; }
.lib-listen-note { flex: 1 1 100%; margin: 0; color: var(--lib-muted); font-size: .8rem; }
.lib-listen-note a { color: var(--lib-link); }
html.lib-focus .lib-listen { margin-top: 1rem; }
