/* The reader of transcribed manuscripts (reader/): layout only; colours from the theme (--ink, --muted, --line, --accent, currentColor). */
main.texts-wide { max-width: 76rem; }
.tx-reader { padding: .6rem; scroll-margin-top: 4.5rem; }
.tx-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-bottom: .75rem; }
.tx-pageno { display: inline-flex; align-items: center; gap: .3rem; }
.tx-pageno input { width: 4.5rem; }
.tx-body { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; }
.tx-reader.with-page .tx-body { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 767.98px) { .tx-reader.with-page .tx-body { grid-template-columns: 1fr; } .tx-page { order: -1; } }
.tx-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .6rem; padding-top: .7rem; border-top: 1px solid var(--line, currentColor); }
@media (max-width: 575.98px) { .tx-foot .btn span { display: none; } }
/* swiping on a phone (js/reader.js, swipe): the text turns like a page; the pills at the edges show the target page */
.tx-text { touch-action: pan-y pinch-zoom; }
.tx-reader { overflow-x: clip; }
.tx-swipe { position: fixed; top: 50%; z-index: 1010; display: flex; align-items: center; gap: .35rem; padding: .55rem .8rem; border-radius: 2rem; background: rgba(60, 64, 70, .92); color: #fff; font-size: .95rem; font-variant-numeric: tabular-nums; box-shadow: 0 2px 10px rgba(0, 0, 0, .5); pointer-events: none; opacity: 0; transform: translateY(-50%); transition: background-color .12s; }
.tx-swipe-prev { left: 8px; }
.tx-swipe-next { right: 8px; flex-direction: row-reverse; }
.tx-swipe.is-ready { background: #198754; }
.tx-text { min-width: 0; padding: .25rem 0 .5rem; }
.tx-verse { display: flex; justify-content: center; flex-wrap: nowrap; gap: 2px; margin: 0 0 .8rem; }
.tx-cell { display: flex; flex-direction: column; align-items: center; width: var(--cw); padding: 0; border: 0; background: none; color: inherit; border-radius: .3rem; }
.tx-sp { display: block; width: var(--cw); height: var(--ch); background-repeat: no-repeat; border-radius: .25rem; }
.tx-sp-c { display: block; width: 100%; height: 100%; }
.tx-sp.ink { background-color: var(--ink, currentColor); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.tx-nom { font-family: var(--font-cjk), serif; font-size: 1.9rem; line-height: 1.1; color: var(--ink, currentColor); }   /* the owner: the entered character */
.tx-nom svg { width: 1em; height: 1em; vertical-align: -.12em; }   /* an IDS, drawn: about the size of a character */
.tx-nom svg, .tx-note-g svg { color: var(--accent, currentColor); }   /* a drawn IDS stands out from the real characters by its colour */
.tx-nom-w { font-size: .45em; color: var(--muted, currentColor); margin-left: .05em; }   /* the usual form beside the form of the copy */
.tx-nom.todo { color: var(--muted, currentColor); }   /* the character not confirmed by shape yet (shapes.html): grey */
.tx-nom.open { color: var(--accent, currentColor); opacity: .7; }   /* the full-width ？ of an open character: the accent colour, a little faint */
.tx-text.owner-view { touch-action: auto; }
.owner-view .tx-qn { font-size: 1.15rem; }
.tx-qs { display: block; flex: none; margin-top: .1rem; border-radius: .15rem; }   /* the owner: the reading on the scan */
.nom-ic { font-family: var(--font-cjk), serif; font-style: normal; }
.tx-qn { font-size: 1rem; line-height: 1.25; margin-top: .15rem; white-space: nowrap; color: var(--ink, currentColor); }   /* the size of the text of the page */
@media (max-width: 575.98px) { .tx-qn { font-size: .875rem; letter-spacing: -.01em; } }   /* 14px: larger, and long readings of neighbours run together in the narrow cells of a phone */
.tx-cell:hover, .tx-cell.on, .tx-cell.pinned { background: color-mix(in srgb, var(--accent, currentColor) 12%, transparent); }
.tx-cell:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 1px; }
.tx-page { position: sticky; top: 4.5rem; margin: 0; }
.tx-page-inner { position: relative; border: 1px solid var(--line, currentColor); border-radius: .4rem; overflow: hidden; }
.tx-page img { display: block; width: 100%; height: auto; }
.tx-boxes { position: absolute; inset: 0; pointer-events: none; }
.tx-box { position: absolute; border-radius: 2px; }
.tx-box.on, .tx-box.pinned { outline: 2px solid var(--accent, currentColor); background: color-mix(in srgb, var(--accent, currentColor) 15%, transparent); }
.tx-message { margin: 1rem 0 .5rem; text-align: center; color: var(--muted, currentColor); }
.tx-copies { max-width: 36rem; }
/* the popover of a token (everybody), the Nôm and the editor (the owner) */
.tx-pop { position: absolute; z-index: 1050; width: max-content; max-width: min(26rem, calc(100vw - 16px)); padding: .6rem; box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .18); }
.tx-pop-head { display: flex; gap: .75rem; align-items: flex-start; }
.tx-ctx { position: relative; flex: 0 0 auto; background-repeat: no-repeat; border-radius: .3rem; border: 1px solid var(--line, currentColor); }
.tx-ctx-mark { position: absolute; border: 2px solid var(--accent, currentColor); border-radius: 3px; }
.tx-pop-info { min-width: 5rem; }
.tx-pop-glyph { font-family: var(--font-cjk), serif; font-size: 2.6rem; line-height: 1.1; }
.tx-pop-glyph svg, .tx-prev svg, .tx-form svg { width: 1em; height: 1em; vertical-align: -.12em; }
.tx-pop-qn { font-size: 1.2rem; }
.tx-pop-note, .tx-pop-checked { color: var(--muted, currentColor); max-width: 14rem; }
.badge-unsure { display: inline-block; margin-top: .2rem; padding: 0 .35rem; border: 1px dashed var(--accent, currentColor); border-radius: .3rem; font-size: .72rem; color: var(--accent, currentColor); }
.tx-pop-actions { display: flex; gap: .35rem; justify-content: flex-end; margin-top: .5rem; }
.tx-edit { display: grid; gap: .25rem; margin-top: .5rem; min-width: 15rem; }
.tx-edit label { margin: .2rem 0 0; color: var(--muted, currentColor); }
.tx-row { display: flex; gap: .4rem; align-items: center; }
.tx-edit .form-control, .tx-edit .form-select { font-size: 1.1rem; }   /* readable on the phone */
.tx-edit .tx-in-glyph { font-size: 1.4rem; }
.tx-in-glyph { font-family: var(--font-cjk), serif; font-size: 1.2rem; }
.tx-prev { font-family: var(--font-cjk), serif; font-size: 1.6rem; min-width: 1.6rem; }
.tx-forms { display: flex; flex-wrap: wrap; gap: .25rem; }
.tx-form { font-family: var(--font-cjk), serif; font-size: 1.1rem; padding: .05rem .4rem; }
.tx-form small { font-family: system-ui, sans-serif; font-size: .65rem; color: var(--muted, currentColor); }
.tx-cands { display: flex; flex-direction: column; gap: .2rem; margin: .25rem 0; }
.tx-cand { display: flex; gap: .3rem; align-items: center; }
.tx-cand-g {  font-size: 1.5rem; line-height: 1.2; min-width: 2.6rem; padding: .1rem .45rem; }
.tx-cand-g svg { width: 1em; height: 1em; vertical-align: -.12em; }
.tx-cand-ids {  font-size: 1.05rem; padding: .15rem .45rem; flex: 1; text-align: left; }
html .tx-pop .btn.tx-cand-g:not(.btn-close):not(.btn-link), html .tx-pop .btn.tx-cand-ids:not(.btn-close):not(.btn-link), html .tx-pop .btn.tx-form:not(.btn-close):not(.btn-link) { font-family: var(--font-cjk), serif; font-style: normal; font-weight: 400; }   /* over the serif of the theme's buttons */
html .tx-pop .btn.tx-cand-g:not(.btn-close):not(.btn-link) { font-size: 1.6rem; line-height: 1.2; }
html .tx-pop .btn.tx-cand-ids:not(.btn-close):not(.btn-link) { font-size: 1.15rem; }
.tx-err { color: var(--accent, currentColor); }
/* the owner's frame, in two halves (on the cell: the mask of the sprite would clip it): bottom in the accent colour = the reading not confirmed (qn_checked: unsure, no character,
   readings.html not done); right in the colour of the text = the shape not confirmed (reader/shapes.html). Both are independent. */
.show-unsure .tx-cell { position: relative; }
.show-unsure .tx-cell.unsure::after, .show-unsure .tx-cell.shape-open::after { content: ""; position: absolute; inset: 0; border: 2px dashed transparent; border-radius: .3rem; pointer-events: none; }
.show-unsure .tx-cell.unsure::after { border-bottom-color: var(--accent, #b8262e); }
.show-unsure .tx-cell.shape-open::after { border-right-color: var(--ink, currentColor); }
.tx-ctx { cursor: grab; touch-action: none; user-select: none; overflow: hidden; }
.tx-ctx.dragging { cursor: grabbing; }
.tx-punct { color: var(--muted, currentColor); }
.tx-in-punct { width: 5rem; flex: 0 0 auto; }
.tx-pop-modern { color: var(--muted, currentColor); }
.tx-qn.modern { color: var(--accent, currentColor); }   /* the text gives the modern reading: it differs from the one written in the copy */
.tx-qn.has-fn { text-decoration: underline dotted var(--accent, currentColor); text-decoration-thickness: 2px; text-underline-offset: .22em; }   /* a footnote belongs to this reading */
.tx-fn { font-size: .62em; margin-left: .05em; color: var(--accent, currentColor); }
.tx-notes { max-width: 34rem; margin: 1.2rem auto 0; padding-left: 1.6rem; color: var(--ink, currentColor); }
.tx-notes li::marker { color: var(--accent, currentColor); }
.tx-note-g { font-family: var(--font-cjk), serif; font-size: 1.5em; vertical-align: -.15em; }
.tx-note-g svg { width: 1em; height: 1em; vertical-align: -.1em; }
/* while a page loads (loading(), loaderEl(), card() in js/reader.js): an empty place for the text */
.tx-loading { min-height: 60vh; }
/* the loading page: in the empty place of the text, sticky in the middle of the screen; a turning ring and one line, no box */
.tx-loader { position: sticky; top: calc(50vh - 1.5rem); display: flex; flex-direction: column; align-items: center; gap: .35rem; max-width: min(16rem, 86vw); margin: 0 auto; padding-top: 2rem; text-align: center; color: #8a8a8a; font-size: .8rem; line-height: 1.35; pointer-events: none; }
.tx-loader[hidden] { display: none; }
.tx-loader-ring { width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 2px solid rgba(138, 138, 138, .25); border-top-color: #8a8a8a; animation: tx-spin .8s linear infinite; }
@keyframes tx-spin { to { transform: rotate(360deg); } }
.tx-loader-hint { font-size: .72rem; animation: tx-fade .8s ease both; }
.tx-loader-hint[hidden] { display: none; }
@keyframes tx-fade { from { opacity: 0; } to { opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .tx-loader-ring { animation-duration: 2.4s; } .tx-loader-hint { animation: none; } }
/* the translations (a passage below its last verse) */
.tx-tr { max-width: 36rem; margin: -.3rem auto 1.2rem; padding: .3rem .85rem; border-left: 3px solid color-mix(in srgb, var(--accent, currentColor) 45%, transparent); border-radius: 0 .4rem .4rem 0; }
.tx-tr p { margin: 0; font-style: italic; color: var(--muted, currentColor); font-size: .95rem; line-height: 1.45; }
.tx-tr-ok { font-style: normal; color: var(--accent, currentColor); }
.tx-tr.editable { cursor: pointer; }
.tx-tr.editable:hover, .tx-tr.editable:focus-visible { background: color-mix(in srgb, var(--accent, currentColor) 8%, transparent); outline: none; }
.tx-tr .tx-tr-edit { cursor: auto; padding: .2rem 0; }
.tx-tr-split { width: auto; max-width: 13rem; }
.no-trans .tx-tr, .no-trans .tx-tr-note { display: none; }
.tx-verse.tx-pass-on { background: color-mix(in srgb, var(--accent, currentColor) 7%, transparent); border-radius: .4rem; }
.tx-tr-note { margin: 1rem auto 0; text-align: center; color: var(--muted, currentColor); }
.tx-tr p.tx-tr-vi { font-style: normal; color: var(--ink, currentColor); font-size: .92rem; margin-bottom: .15rem; }
