/* Study Quest — books.css · V7.2.3 "The three books" (builder v723-shell)
 * The approved mocks: work/v9/v722/mocks/books.css (letopis.html, azbuka.html), shots work/v9/v722/shots/.
 *   1. the shell (js/books.js): the page-turn leaf, the Old Tongue words and their tooltip
 *   2. THE LETOPIS (.book-layer.lp-book, js/ui-codex.js): oxblood leather, gold tooling, plain warm parchment, ribbons
 *   3. THE AZBUKA (.az-layer, js/ui-azbuka.js): a small green linen primer, one page, red-and-black printing, thumb index
 *   4. compact (480 × 360) for both
 *   5. THE NAUKA (.nk-layer, js/ui-nauka.js; builder v723-nauka): deep-blue cloth, brass corners, flat vellum pages, index
 *      tabs with their keys, a two-page working spread (one page in a small window or compact mode)
 * Readability: body text ≥ 15 px (13 px compact) on plain parchment (no texture behind text), ink ≥ 7:1.
 */

/* ======================================================================================== 1. THE SHELL */
/* the page turn (js/books.js turn()): a leaf of two hinged segments over the block; the snapshots fill its faces */
/* (V7.2.3 fixer, LK-M4: the perspective lives in the leaf's own transform; a perspective on the host changed the book's
 * layers at the start and the landing of every turn, a long frame each) */
.bk-turning { }
/* the pages keep their own layers, so a leaf that lands or lifts reveals them without repainting the book */
.book-layer.lp-book .book-page, .nk-page, .az-pg { will-change: transform; }
.bk-face .book-page, .bk-face .nk-page, .bk-face .az-pg, .bk-under .book-page, .bk-under .nk-page, .bk-under .az-pg,
.bk-face .book-flow, .bk-face .az-flow, .bk-under .book-flow, .bk-under .az-flow { will-change: auto !important; }
.bk-leaf { position: absolute; z-index: 7; pointer-events: none; transform-style: preserve-3d; }
.bk-seg { position: absolute; top: 0; transform-style: preserve-3d; will-change: transform; }
.bk-face { position: absolute; inset: 0; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.bk-face--back { transform: rotateY(180deg); }
.bk-face__in { position: absolute; top: 0; }
.bk-face__in > *, .bk-under > * { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.bk-face__in--paper { background: radial-gradient(ellipse at 50% 45%, rgba(255, 248, 230, 0) 62%, rgba(140, 95, 40, 0.18) 100%), #ead9b4; }
/* V7.2.3 fixer (LK-M4): a lifted sheet has no gutter shadow, and nothing on the turning leaf needs a blur to paint (the
 * first frame of a turn paints four faces); the book's own decorations sit under the leaf (it is the top layer) */
.bk-face .book-page, .bk-face .nk-page, .bk-face .az-pg { box-shadow: none !important; }
.bk-face .book-page::after { display: none; }
.book-layer.lp-book .book-block .book-corner { z-index: 5; }
/* the light on the turning sheet: darker as it stands up, a highlight running along the bend */
.bk-shade { position: absolute; inset: 0; pointer-events: none; opacity: 0.05; will-change: opacity;
  background: linear-gradient(90deg, rgba(40, 22, 8, 0.38), rgba(40, 22, 8, 0.10) 40%, rgba(255, 246, 225, 0.22) 72%, rgba(40, 22, 8, 0.30)); }
.bk-face--back .bk-shade { background: linear-gradient(270deg, rgba(40, 22, 8, 0.38), rgba(40, 22, 8, 0.10) 40%, rgba(255, 246, 225, 0.22) 72%, rgba(40, 22, 8, 0.30)); }
/* its shadow sweeping the page beneath */
.bk-cast { position: absolute; z-index: 6; pointer-events: none; opacity: 0; transform-origin: left center; will-change: opacity, transform;
  background: linear-gradient(90deg, rgba(30, 14, 4, 0.45), rgba(30, 14, 4, 0.12) 35%, rgba(30, 14, 4, 0) 70%); }
.bk-under { position: absolute; z-index: 6; pointer-events: none; overflow: hidden; }
.lp-snap { position: absolute; inset: 0; overflow: hidden; }
.lp-snap > .book-page { position: absolute; }
.lp-snap > .book-view { position: absolute; }

/* the Old Tongue: a Slavic name in running text, with its tooltip (one shared tooltip element) */
.ot { border-bottom: 1px dotted currentColor; cursor: help; text-decoration: none; }
.ot:focus-visible { outline: 2px solid rgba(217, 176, 95, 0.8); outline-offset: 2px; border-radius: 2px; }
.tooltip.tooltip--ot { width: 360px; max-width: calc(100vw - 16px); padding: 14px 16px 13px; background: #15120f; color: #e8e1d3;
  border: 1px solid #3b3832; border-radius: 4px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6); }
.ot-tip .ot-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.ot-tip .ot-w { font: 700 19px/1.1 var(--cx-font-title); color: #f4d58c; letter-spacing: 0.04em; }
.ot-tip .ot-say { font: italic 400 14px/1 var(--cx-font-body); color: #c2baab; }
.ot-tip .ot-mean { display: block; margin: 6px 0 8px; font: italic 400 15.5px/1.4 var(--cx-font-body); color: #e8e1d3; }
.ot-tip .ot-mean b { font-style: normal; font-weight: 700; color: #e3b562; }
.ot-tip .ot-mean i { color: #e8e1d3; }
.ot-tip .ot-hr { border: 0; height: 1px; background: #3b3832; margin: 8px 0; }
.ot-tip .ot-use { font: 400 14.5px/1.45 var(--cx-font-body); color: #d9d1c2; }
.ot-tip .ot-use b { color: #f2ebdd; }
.ot-tip .ot-lbl { font: 700 10.5px/1 var(--cx-font-label, var(--cx-font-title)); letter-spacing: 0.12em; text-transform: uppercase; color: #a39c8f; margin-right: 6px; }
.ot-tip .ot-keys { margin-top: 8px; color: #a39c8f; font: 400 13px/1.5 var(--cx-font-num, sans-serif); }
.ot-k { display: inline-block; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 3px; text-align: center;
  font: 700 11.5px/19px var(--cx-font-num, sans-serif); background: #2e2a24; color: #e8e1d3; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35); vertical-align: 1px; }

/* ======================================================================================== 2. THE LETOPIS */
.book-layer.lp-book {
  --lp-gold: #d9b05f; --lp-gold-hi: #f4d58c; --lp-page: #efe1c1; --lp-ink: #22170d; --lp-ink-2: #4a3520; --lp-rubric: #7a1d10;
  --lp-rule: #cdb487; --lp-meta: #4f3f2c;   /* V7.2.3 fixer (LK-M3): meta ink 7.8:1 (was #5c4630, 6.8) */
}
.book-layer.lp-book .book { width: min(1180px, calc(100vw - 266px)); height: min(812px, calc(100vh - 40px)); margin-right: 214px; }
/* V7.2.3 fixer (the user: the world showed between the ribbons and under the key strip): the whole area behind the open
 * book is covered */
.book-layer.lp-book .book-backdrop { background: radial-gradient(ellipse 90% 80% at 50% 48%, rgba(4, 5, 7, 0.95), rgba(3, 3, 4, 0.985) 78%); }
/* the headbands where the leaves meet the spine (gold-and-oxblood silk), the page curving into the binding */
.book-layer.lp-book .lp-hb { position: absolute; left: 50%; width: 24px; height: 7px; margin-left: -12px; z-index: 5; border-radius: 3px; pointer-events: none;
  background: repeating-linear-gradient(90deg, #d9b05f 0 3px, #7a1d10 3px 6px); box-shadow: 0 0 0 1px #120403; }
.book-layer.lp-book .lp-hb--t { top: 53px; } .book-layer.lp-book .lp-hb--b { bottom: 25px; }
.book-layer.lp-book.is-single .lp-hb { display: none; }
.book-layer.lp-book .lp-gutter { position: absolute; top: 0; bottom: 0; left: 50%; width: 40px; margin-left: -20px; z-index: 3; pointer-events: none;
  background: var(--bw-gut, none), linear-gradient(90deg, rgba(255, 250, 235, 0) 0, rgba(255, 250, 235, 0.32) 22%, rgba(70, 40, 10, 0.14) 42%, rgba(40, 20, 6, 0.36) 50%, rgba(70, 40, 10, 0.14) 58%, rgba(255, 250, 235, 0.32) 78%, rgba(255, 250, 235, 0) 100%); }
.book-layer.lp-book.is-single .lp-gutter { display: none; }
/* the boards: oxblood leather, a gold fillet tooled inside the edge */
.book-layer.lp-book .book-cover.codex-frame {
  padding: 58px 22px 30px;
  border: 0;
  border-radius: 10px;
  background: var(--bw-cover, none), var(--bw-bind, none),   /* V7.4 lane K: book wear and the binding (css/wear.css) */
    radial-gradient(ellipse at 30% 20%, rgba(255, 200, 160, 0.08), rgba(0, 0, 0, 0) 60%),
    repeating-radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.05) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    linear-gradient(160deg, #5a1d16, #3d120d 60%, #2e0d09);
  box-shadow: 0 0 0 1px #120403, inset 0 0 0 2px rgba(255, 210, 170, 0.06), inset 0 0 40px rgba(0, 0, 0, 0.55), 0 5px 0 -1px #2a0b07, 0 6px 0 -1px #0c0302,
    0 30px 80px rgba(0, 0, 0, 0.75);   /* (V7.2.3 fixer: the board's thickness under the block) */
}
.book-layer.lp-book .book-cover.codex-frame::before {
  content: ''; position: absolute; inset: 8px; z-index: 0; pointer-events: none; background: none;
  border: 1px solid rgba(217, 176, 95, 0.55); border-radius: 6px; box-shadow: inset 0 0 0 4px rgba(217, 176, 95, 0.35);
}
.book-layer.lp-book .book-cover.codex-frame::after { display: none; }   /* V7.2.3 fixer (LK-M1): the old Codex rim drew a black double rule through the title */
.lp-fl { position: absolute; z-index: 1; width: 26px; height: 26px; pointer-events: none; background: var(--cx-orn-fleuron) center / contain no-repeat;
  filter: sepia(1) saturate(2.2) brightness(1.15); opacity: 0.9; }
.lp-fl--tl { left: 13px; top: 13px; } .lp-fl--tr { right: 13px; top: 13px; } .lp-fl--bl { left: 13px; bottom: 13px; } .lp-fl--br { right: 13px; bottom: 13px; }
.lp-head { position: absolute; left: 0; right: 0; top: 0; height: 58px; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 16px; }
.lp-name { font: 700 30px/1 'Grenze Gotisch', var(--cx-font-title); color: var(--lp-gold-hi); letter-spacing: 0.02em;
  text-shadow: 0 1px 0 #000, 0 0 18px rgba(244, 213, 140, 0.25); }
.lp-name .ot { border-bottom-color: rgba(244, 213, 140, 0.55); }
.lp-of { font: 700 14px/1 var(--cx-font-title); letter-spacing: 0.16em; color: var(--lp-gold-hi); text-transform: uppercase; white-space: nowrap;
  text-shadow: 0 1px 0 #000; padding-top: 4px; }   /* V7.2.3 fixer (the user: "of Mihailo" faint, across the line): bright, clear of the rules */
.lp-rule { position: relative; width: 120px; height: 9px; opacity: 0.95;
  background: linear-gradient(90deg, rgba(217, 176, 95, 0), #e3bd6c 35%, #e3bd6c 65%, rgba(217, 176, 95, 0)) center / 100% 1.5px no-repeat; }
.lp-rule::after { content: ''; position: absolute; left: 50%; top: 1px; width: 7px; height: 7px; margin-left: -3.5px; transform: rotate(45deg); background: #d9b05f; }
.lp-foot { position: absolute; left: 30px; right: 30px; bottom: 4px; height: 24px; z-index: 3; display: flex; align-items: center; justify-content: center;
  gap: 14px; font: 500 12.5px/1 'Avenir Next', 'Alegreya Sans', 'Helvetica Neue', sans-serif; color: #efdcc6; white-space: nowrap; overflow: hidden;
  background: #2e0d09; border-radius: 3px; box-shadow: inset 0 1px 0 rgba(217, 176, 95, 0.35), 0 0 0 1px #120403; }   /* V7.2.3 fixer (the user): its own solid band */
.lp-k { display: inline-block; min-width: 19px; height: 19px; padding: 0 4px; margin-right: 4px; border-radius: 3px; text-align: center;
  font: 700 11.5px/19px 'Avenir Next', 'Alegreya Sans', sans-serif; background: #2a0b08; color: #f4d58c; box-shadow: 0 0 0 1px rgba(217, 176, 95, 0.5); }
.book-layer.lp-book .book-spine { top: 58px; bottom: 30px; width: 30px; margin-left: -15px; background: linear-gradient(90deg, rgba(0, 0, 0, 0.7), rgba(255, 200, 150, 0.08) 50%, rgba(0, 0, 0, 0.75)), #3a0f0b; }
.book-layer.lp-book .book-cover .codex-clasp { display: none; }
/* the leaves: plain warm parchment (no fibres behind the text), the gutter's shade, a rubric margin line */
.book-layer.lp-book .book-block {
  box-shadow: -1px 0 0 #d8c59b, -2px 1px 0 #8f7348, -3px 1px 0 #cdb685, -4px 2px 0 #7d6038, 1px 0 0 #d8c59b, 2px 1px 0 #8f7348, 3px 1px 0 #cdb685,
    4px 2px 0 #7d6038, 0 2px 0 #cdb685, 0 3px 0 #7d6038, 0 6px 14px rgba(0, 0, 0, 0.5);
}
.book-layer.lp-book .book-page {
  color: var(--lp-ink);
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 248, 230, 0) 62%, rgba(140, 95, 40, 0.16) 100%), var(--lp-page);
}
/* the gutter's shade as a gradient (a blurred inset shadow cost a long frame whenever the page repainted) */
.book-layer.lp-book .book-page--l { box-shadow: 0 0 0 1px #1a0705;
  background: var(--bw-pl, none), linear-gradient(270deg, rgba(70, 40, 10, 0.22), rgba(70, 40, 10, 0.07) 14px, rgba(70, 40, 10, 0) 30px), radial-gradient(ellipse at 50% 45%, rgba(255, 248, 230, 0) 62%, rgba(140, 95, 40, 0.16) 100%), var(--lp-page); }
.book-layer.lp-book .book-page--r { box-shadow: 0 0 0 1px #1a0705;
  background: var(--bw-pr, none), linear-gradient(90deg, rgba(70, 40, 10, 0.22), rgba(70, 40, 10, 0.07) 14px, rgba(70, 40, 10, 0) 30px), radial-gradient(ellipse at 50% 45%, rgba(255, 248, 230, 0) 62%, rgba(140, 95, 40, 0.16) 100%), var(--lp-page); }
.book-layer.lp-book .book-page::before { display: none; }
.book-layer.lp-book .book-page::after { content: ''; position: absolute; top: 18px; bottom: 18px; width: 1px; background: rgba(122, 29, 16, 0.25); }
.book-layer.lp-book .book-page--l::after { left: 26px; right: auto; }
.book-layer.lp-book .book-page--r::after { right: 26px; left: auto; }
.book-layer.lp-book .book-flow { color: var(--lp-ink); }
.book-layer.lp-book .book-opener__t { color: var(--lp-rubric); }
/* V7.2.3 fixer (LK-L5a): the illuminated initial as the mock draws it: a lapis plate (or the chapter's dye) in a gold rim */
.book-layer.lp-book .codex-dropcap { border-radius: 3px; color: #f4d58c; text-shadow: 0 2px 0 #000;
  background: radial-gradient(circle at 30% 25%, #2d4f8f, #1f3a76 55%, #142650); box-shadow: 0 0 0 2px #d9b05f, 0 0 0 3px #3d120d, 0 0 0 5px #d9b05f; }
.book-layer.lp-book .codex-dropcap--verdigris { background: radial-gradient(circle at 30% 25%, #3f8d7c, #2c5a4f 55%, #1c3c34); }
.book-layer.lp-book .codex-dropcap--oxblood, .book-layer.lp-book .codex-dropcap--quartered { background: radial-gradient(circle at 30% 25%, #9a3424, #6a1d13 55%, #47120b); }
.book-layer.lp-book .book-lead .codex-dropcap { margin: 8px 14px 2px 5px; }
/* the ribbons: one dyed silk ribbon per chapter, its numeral, its name, its key */
.book-layer.lp-book .book-marks { top: 70px; margin-left: -4px; gap: 7px; }
.book-layer.lp-book .book-mark {
  width: 212px; height: 44px; padding: 0 14px 0 16px; gap: 8px; color: #f2e6cf;
  font: 700 13px/1 var(--cx-font-title); letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--_rib); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
  -webkit-clip-path: polygon(0 0, 100% 0, 91% 50%, 100% 100%, 0 100%); clip-path: polygon(0 0, 100% 0, 91% 50%, 100% 100%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15); transform: translateX(-6px);
}
.book-layer.lp-book .book-mark--oxblood { --_rib: linear-gradient(180deg, #8a2a1c, #6a1d13); }
.book-layer.lp-book .book-mark--lapis { --_rib: linear-gradient(180deg, #2a4a86, #1f3664); }
.book-layer.lp-book .book-mark--verdigris { --_rib: linear-gradient(180deg, #3f7d6d, #2c5a4f); }
.book-layer.lp-book .book-mark--gold { --_rib: linear-gradient(180deg, #826020, #664813); }   /* (round 2: a deeper gold, so its cream label reads at AA 4.5+) */
.book-layer.lp-book .book-mark--gold .book-mark__i { color: #fde9b0; }
.book-layer.lp-book .book-mark::after { background: linear-gradient(180deg, rgba(244, 213, 140, 0.9), rgba(244, 213, 140, 0) 2px); }
.book-layer.lp-book .book-mark__i { width: 26px; text-align: left; font: 700 13px/1 var(--cx-font-title); color: #f4d58c; }
.book-layer.lp-book .book-mark__t { font: inherit; letter-spacing: inherit; flex: 1; }
.book-layer.lp-book .lp-mark__k { margin: 0 12px 0 auto; background: rgba(0, 0, 0, 0.35); box-shadow: none; text-shadow: none; }
.book-layer.lp-book .book-mark:hover { transform: translateX(0); color: #fff6e2; }
.book-layer.lp-book .book-mark.is-active { transform: translateX(10px); color: #fff6e2; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px rgba(244, 213, 140, 0.9); }
.book-layer.lp-book .book-mark.is-active .book-mark__i { color: #fff1c4; text-shadow: 0 0 8px rgba(244, 213, 140, 0.7); }
.book-layer.lp-book .lp-close { top: 14px; right: 18px; z-index: 9; }
/* V7.2.3 fixer (critic LK-M2): the World spread of the approved mock: the road map, three figures, the zones explored, the
 * chronicle by date */
.lp-break { display: block; height: 0; }
.lp-right .book-h3:first-child, .lp-right > .book-keep:first-child .book-h3 { margin-top: 0; }
.lp-chron-w .book-h2 { margin-top: 18px; }
.lp-here { margin: 4px 0 0; font-size: 15px; line-height: 1.45; color: var(--lp-ink-2); }
.lp-map { position: relative; margin: 4px 0 14px; border-radius: 3px; overflow: hidden; break-inside: avoid; -webkit-column-break-inside: avoid; box-shadow: 0 0 0 1px var(--lp-rule); }
.lp-map__svg { display: block; width: 100%; height: auto; }
.lp-tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--lp-rule); border-bottom: 1px solid var(--lp-rule); margin: 0 0 12px; }
.lp-tally > div { padding: 10px 10px 9px; border-right: 1px solid var(--lp-rule); min-width: 0; }
.lp-tally > div:last-child { border-right: 0; }
.lp-tally b { display: block; font: 700 25px/1 'Alegreya', serif; color: var(--lp-ink); white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.lp-tally span { display: block; margin-top: 6px; font: 700 10.5px/1.2 var(--cx-font-title); letter-spacing: 0.1em; text-transform: uppercase; color: var(--lp-rubric); white-space: nowrap; }
.lp-zl { list-style: none; margin: 0 0 8px; padding: 0; }
.lp-zl li { display: grid; grid-template-columns: minmax(0, 1fr) 64px 132px 44px; gap: 10px; align-items: center; height: 29px; border-bottom: 1px solid rgba(205, 180, 135, 0.7);
  font-size: 16px; break-inside: avoid; -webkit-column-break-inside: avoid; }
.lp-zl__n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--lp-ink); }
.lp-zl__lv { font: 500 13px/1 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--lp-meta); }
.lp-zl__bar { height: 7px; border-radius: 4px; background: #d6c19a; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(74, 53, 32, 0.2); }
.lp-zl__bar i { display: block; height: 100%; background: #2c6a5a; border-radius: 4px; }
.lp-zl__p { text-align: right; font: 700 13px/1 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--lp-ink-2); }
/* V7.3 lane D (v73-subzones, LATE-REQUESTS 17b): a zone's parts found, "n of m" beside its percent */
.lp-zl li.lp-zl--ex { grid-template-columns: minmax(0, 1fr) 56px 96px 58px 40px; gap: 8px; }
.lp-zl__of { text-align: right; font: 600 12.5px/1 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--lp-ink-2); white-space: nowrap; }
.book-layer.lp-book.is-single .lp-zl li.lp-zl--ex { grid-template-columns: minmax(0, 1fr) 36px 56px 50px 32px; gap: 5px; }
.lp-chron { list-style: none; margin: 0; padding: 0; }
.lp-chron li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 14px; padding: 9px 0 10px; border-bottom: 1px solid rgba(205, 180, 135, 0.7); break-inside: avoid; -webkit-column-break-inside: avoid; }
.lp-chron__d b { display: block; font: 700 12px/1.25 var(--cx-font-title); letter-spacing: 0.08em; text-transform: uppercase; color: var(--lp-rubric); padding-top: 3px; }
.lp-chron__d small { display: block; font: 500 11.5px/1.3 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--lp-meta); margin-top: 3px; }
.lp-chron p { font-size: 16px; line-height: 1.42; margin: 0; color: var(--lp-ink); }
.lp-chron p b { color: var(--lp-rubric); font-weight: 700; }
.book-layer.lp-book.is-single .lp-map__svg { height: 150px; }
.book-layer.lp-book.is-single .lp-tally b { font-size: 18px; } .book-layer.lp-book.is-single .lp-tally span { font-size: 8.5px; letter-spacing: 0.06em; }
.book-layer.lp-book.is-single .lp-zl li { grid-template-columns: minmax(0, 1fr) 40px 70px 34px; height: 22px; font-size: 12.5px; gap: 6px; }
.book-layer.lp-book.is-single .lp-chron li { grid-template-columns: 50px minmax(0, 1fr); gap: 8px; padding: 5px 0; }
.book-layer.lp-book.is-single .lp-chron p { font-size: 12.5px; }
/* V7.2.3 fixer (critic L7): the lore notes in Collections */
.book-lore { list-style: none; margin: 0 0 12px; padding: 0; }
.book-lore li { padding: 6px 0 7px; border-bottom: 1px solid rgba(205, 180, 135, 0.7); break-inside: avoid; -webkit-column-break-inside: avoid; }
.book-lore__t { display: block; font-style: italic; color: var(--lp-ink); }
.book-lore__m { display: block; margin-top: 2px; font: 500 12.5px/1.3 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--lp-meta); }
/* Overview: the three clocks (V7.2.3 fixer, the user: the boxes squeezed their labels; the third gets the room it needs) */
.lp-clocks { margin: 4px 0 14px; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 0.92fr) minmax(0, 1.16fr); }
.lp-clocks .lp-clock { min-width: 0; padding: 14px 8px 12px 12px; border-top: 1px solid var(--lp-rule);
  border-bottom: 1px solid var(--lp-rule); border-right: 1px solid var(--lp-rule); }
.lp-clocks .lp-clock:nth-child(3) { border-right: 0; }
.lp-clocks .lp-nest, .lp-clocks .lp-nestlbl, .lp-clocks .lp-trio { grid-column: 1 / -1; }
/* the level and its bar, one line under it (the mock) */
.lp-xp { margin: 6px 0 12px; }
.lp-xp .book-h3 { margin: 4px 0 8px; }
.lp-xp__l { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font: 500 13px/1.35 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--lp-meta); }
.lp-xp__l span:last-child { text-align: right; }
.lp-clock__v { display: block; font: 700 31px/1 'Alegreya', serif; color: var(--lp-ink); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.lp-clock__v small { font-size: 18px; }
.lp-clock__k { display: block; margin-top: 7px; font: 700 11px/1.2 var(--cx-font-title); letter-spacing: 0.1em; text-transform: uppercase; color: var(--lp-rubric); white-space: nowrap; }
.lp-clock__d { display: block; margin-top: 6px; font: italic 400 14px/1.35 'Alegreya', serif; color: var(--lp-ink-2); }
.lp-clock--a .lp-clock__v { color: var(--lp-rubric); }
.lp-nest { position: relative; height: 34px; margin: 14px 0 4px; }
.lp-nest i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.lp-nest__p { right: 0; background: #d6c19a; box-shadow: inset 0 0 0 1px rgba(74, 53, 32, 0.25); }
.lp-nest__s { top: 5px !important; bottom: 5px !important; background: #8a6a3a; }
.lp-nest__a { top: 10px !important; bottom: 10px !important; background: #7a1d10; }
.lp-nestlbl { display: flex; justify-content: space-between; font: 500 13px/1.3 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--lp-meta); }
.lp-trio { display: flex; gap: 22px; margin: 12px 0 0; }
.lp-trio b { display: block; font: 700 18px/1.1 'Alegreya', serif; color: var(--lp-ink); white-space: nowrap; }
.lp-trio span { display: block; margin-top: 3px; font: 500 13px/1.3 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--lp-meta); }
.lp-lv { margin: 2px 0 10px; font: 400 15px/1 'Alegreya', serif; font-variant-numeric: lining-nums tabular-nums; }
.lp-lv__r { display: grid; grid-template-columns: 1.15fr 1fr 1.25fr 1.25fr 1.15fr; align-items: center; height: 26px; border-bottom: 1px solid rgba(205, 180, 135, 0.7);
  break-inside: avoid; -webkit-column-break-inside: avoid; }
.lp-lv__c { padding: 0 6px; text-align: right; white-space: nowrap; color: var(--lp-ink); overflow: hidden; }
.lp-lv__c:first-child, .lp-lv__c.lp-lv__dt, .lp-lv__c.lp-lv__l { text-align: left; }
.lp-lv__h { height: 24px; border-bottom: 2px solid var(--lp-rubric); }
.lp-lv__h .lp-lv__c { font: 700 10.5px/1 var(--cx-font-title); letter-spacing: 0.12em; text-transform: uppercase; color: var(--lp-rubric); }
.lp-lv__c.lp-lv__n { font: 700 15px/1 var(--cx-font-title); color: var(--lp-ink-2); }
.lp-lv__c.lp-lv__n small { font: 500 12.5px/1 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--lp-meta); letter-spacing: 0; }
.lp-lv__c.lp-lv__dt { color: var(--lp-meta); font-size: 14px; }
.lp-lv__c.lp-lv__a { color: var(--lp-rubric); font-weight: 700; }
.lp-lv__r.is-now { background: rgba(31, 58, 118, 0.08); }
.lp-lv__r.is-est .lp-lv__c { color: #4a3a28; }
.lp-lv__r.is-est .lp-lv__c.lp-lv__a { color: var(--lp-rubric); }
.lp-lv__r.is-tot { height: 32px; border-top: 2px solid var(--lp-rubric); border-bottom: 0; }
.lp-lv__r.is-tot .lp-lv__c { font-weight: 700; }
.lp-est { color: var(--lp-meta); }
.lp-cs { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; padding: 12px 16px; border-radius: 3px; background: #1a120c;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(217, 176, 95, 0.35); color: #e8e1d3; font: 500 14px/1.35 'Avenir Next', 'Alegreya Sans', sans-serif; }
.lp-cs__por { flex: none; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #4a3a2a, #1e150e 70%);
  box-shadow: 0 0 0 2px #6a5434, 0 0 0 3px #000; }
.lp-cs__who b { display: block; font: 700 15px/1.2 var(--cx-font-title); letter-spacing: 0.08em; text-transform: uppercase; color: #e3b562; }
.lp-cs__t { margin-left: auto; text-align: right; }
.lp-cs__t span { display: block; white-space: nowrap; }
.lp-cs__t em { font-style: normal; color: #f2a65a; }
/* a single page (a smaller window, compact): the head band shrinks, the ribbons ride on top with their keys */
.book-layer.lp-book.is-single .book { width: 100%; height: 100%; margin: 0; }
.book-layer.lp-book.is-single .book-cover.codex-frame { padding: 34px 8px 10px; border-radius: 6px; }
.book-layer.lp-book.is-single .book-cover.codex-frame::before { inset: 3px; }
.book-layer.lp-book.is-single .lp-fl, .book-layer.lp-book.is-single .lp-foot, .book-layer.lp-book.is-single .lp-rule { display: none; }
.book-layer.lp-book.is-single .lp-head { height: 34px; justify-content: flex-start; padding-left: 14px; gap: 8px; }
.book-layer.lp-book.is-single .lp-name { font-size: 19px; }
.book-layer.lp-book.is-single .lp-of { font-size: 10px; letter-spacing: 0.12em; }
.book-layer.lp-book.is-single .book-page--l::after { left: 12px; }
.book-layer.lp-book.is-single .book-marks { top: 4px; right: 44px; left: auto; margin: 0; z-index: 5; flex-direction: row; gap: 2px; }
.book-layer.lp-book.is-single .book-mark { width: 26px; height: 26px; padding: 0; justify-content: center; border-radius: 0 0 3px 3px; transform: none;
  -webkit-clip-path: none; clip-path: none; background: var(--_rib); }
.book-layer.lp-book.is-single .book-mark.is-active { transform: translateY(3px); }
.book-layer.lp-book.is-single .book-mark__i { width: auto; text-align: center; font: 700 12px/1 'Avenir Next', 'Alegreya Sans', sans-serif; color: #f4d58c; }
.book-layer.lp-book.is-single .lp-mark__k, .book-layer.lp-book.is-single .book-mark__t { display: none; }
.book-layer.lp-book.is-single .lp-close { top: 6px; right: 10px; width: 24px; height: 24px; }
.book-layer.lp-book.is-single .lp-clock__v { font-size: 22px; } .book-layer.lp-book.is-single .lp-clock__v small { font-size: 13px; }
.book-layer.lp-book.is-single .lp-clock__d { font-size: 12.5px; }
.book-layer.lp-book.is-single .lp-clocks .lp-clock { padding: 8px 6px 8px 8px; }
.book-layer.lp-book.is-single .lp-nest { height: 20px; margin-top: 8px; } .book-layer.lp-book.is-single .lp-nest__s { top: 3px !important; bottom: 3px !important; }
.book-layer.lp-book.is-single .lp-nest__a { top: 6px !important; bottom: 6px !important; }
.book-layer.lp-book.is-single .lp-trio { gap: 12px; } .book-layer.lp-book.is-single .lp-trio b { font-size: 15px; }
.book-layer.lp-book.is-single .lp-lv { font-size: 13.5px; } .book-layer.lp-book.is-single .lp-lv__r { height: 22px; } .book-layer.lp-book.is-single .lp-lv__c { padding: 0 3px; }
.book-layer.lp-book.is-single .lp-cs { flex-wrap: wrap; padding: 8px 10px; font-size: 12.5px; }
.book-layer.lp-book.is-single .lp-cs__t { margin-left: 0; text-align: left; }

/* ======================================================================================== 3. THE AZBUKA */
/* V7.2.3 fixer (the user, 16 Oct ~20:45): an open TWO-PAGE spread (a left and a right page, the binding between them;
 * a leaf turns over the spine from right to left), keeping the primer's own look: the smaller green-linen boards with
 * their stitching, red-and-black print, the A–Z thumb tabs on the outer edge, search and the chapter keys. The text runs in
 * pages (one CSS column per page). 480 × 360 (compact): one page. No texture behind any text: plain paper. */
.az-layer {
  --az-page: #f7f1e3; --az-ink: #1d1813; --az-ink-2: #4a3f33; --az-red: #a3260f; --az-rule: #dccfb3; --az-ochre: #b98a2e; --az-meta: #54473a;   /* meta 8.0:1 (LK-M3) */
  --az-out: 40px; --az-in: 34px; --az-head: 132px; --az-low: 36px;
  position: fixed; inset: 0; z-index: 950; display: flex; align-items: center; justify-content: center; padding: 20px 24px; box-sizing: border-box;
  opacity: 0; transition: opacity 0.22s ease;
}
.az-layer.is-open { opacity: 1; }
.az-layer.is-raised { z-index: 976; }   /* over the login screen / character select (glue 960, their windows 975) */
.az-layer *, .az-layer *::before, .az-layer *::after { box-sizing: border-box; }
.az-layer [hidden] { display: none !important; }
.az-srch input::-webkit-search-cancel-button, .az-srch input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
/* the world behind the open book is covered (the user: nothing shows through between the book's parts) */
.az-backdrop { position: absolute; inset: 0; background: radial-gradient(ellipse 90% 80% at 50% 48%, rgba(4, 5, 7, 0.95), rgba(3, 3, 4, 0.985) 78%); }
/* the boards: green linen, its stitching, the board's thickness under the block */
.az { position: relative; width: min(1200px, calc(100vw - 120px)); height: min(790px, calc(100vh - 50px)); border-radius: 6px 8px 8px 6px;
  background: var(--bw-cover, none), var(--bw-bind, none), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, rgba(0, 0, 0, 0) 1px 3px), repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    linear-gradient(170deg, #36553f, #284033);   /* V7.4 lane K: --bw-cover = book wear */
  box-shadow: 0 0 0 1px #0a120c, inset 0 0 0 2px rgba(255, 255, 255, 0.05), inset 0 0 26px rgba(0, 0, 0, 0.45), 0 5px 0 -1px #1a2a1f, 0 6px 0 -1px #0a120c, 0 30px 80px rgba(0, 0, 0, 0.75); outline: none; }
.az::before { content: ''; position: absolute; inset: 7px; border: 2px dashed rgba(185, 138, 46, 0.55); border-radius: 4px 6px 6px 4px; pointer-events: none; }
/* the headbands at the spine: little red-and-cream silk caps */
.az-hb { position: absolute; left: 50%; width: 22px; height: 7px; margin-left: -11px; z-index: 4; border-radius: 3px; pointer-events: none;
  background: repeating-linear-gradient(90deg, #a3260f 0 3px, #f2e6cf 3px 6px); box-shadow: 0 0 0 1px rgba(10, 18, 12, 0.8); }
.az-hb--t { top: 15px; } .az-hb--b { bottom: 37px; }
/* the text block: two pages, the gutter between them, a stack of page edges on the outer and lower sides */
.az-block { position: absolute; z-index: 5; left: 22px; right: 26px; top: 19px; bottom: 40px;
  box-shadow: -1px 0 0 #ebe2cd, -2px 1px 0 #8f8466, -3px 1px 0 #e3d8bf, -4px 2px 0 #7a7058, 1px 0 0 #ebe2cd, 2px 1px 0 #8f8466, 3px 1px 0 #e3d8bf, 4px 2px 0 #7a7058,
    0 2px 0 #e3d8bf, 0 3px 0 #8f8466, 0 4px 0 #ebe2cd, 0 5px 0 #7a7058, 0 8px 16px rgba(0, 0, 0, 0.45); }
.az-pg { position: absolute; top: 0; bottom: 0; width: 50%; background: var(--az-page); color: var(--az-ink); overflow: hidden;
  font-family: 'Iowan Old Style', Charter, Palatino, Georgia, serif; }
.az-pg--l { left: 0; border-radius: 3px 0 0 4px; box-shadow: inset 0 0 0 1px rgba(10, 18, 12, 0.6);
  background: var(--bw-pl, none), linear-gradient(270deg, rgba(60, 45, 20, 0.2), rgba(60, 45, 20, 0.06) 14px, rgba(60, 45, 20, 0) 30px), var(--az-page); }
.az-pg--r { right: 0; border-radius: 0 3px 4px 0; box-shadow: inset 0 0 0 1px rgba(10, 18, 12, 0.6);
  background: var(--bw-pr, none), linear-gradient(90deg, rgba(60, 45, 20, 0.2), rgba(60, 45, 20, 0.06) 14px, rgba(60, 45, 20, 0) 30px), var(--az-page); }
/* the page curving into the binding: a soft light ridge, then the shadow of the fold */
.az-gutter { position: absolute; top: 0; bottom: 0; left: 50%; width: 36px; margin-left: -18px; z-index: 1; pointer-events: none;
  background: var(--bw-gut, none), linear-gradient(90deg, rgba(255, 252, 240, 0) 0, rgba(255, 252, 240, 0.3) 20%, rgba(70, 50, 20, 0.12) 40%, rgba(30, 20, 8, 0.27) 50%, rgba(70, 50, 20, 0.12) 60%, rgba(255, 252, 240, 0.3) 80%, rgba(255, 252, 240, 0) 100%); }
/* the printed head of each page: the title (left) or the search (right), a double rule, the chapter tabs */
.az-top { position: absolute; top: 20px; height: 60px; display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--az-ink); padding-bottom: 6px; }
.az-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--az-ink); }
.az-pg--l .az-top { left: var(--az-out); right: var(--az-in); }
.az-pg--r .az-top { left: var(--az-in); right: var(--az-out); justify-content: flex-end; }
.az-run { margin-right: auto; font: italic 400 20px/1 'IM Fell English', 'Iowan Old Style', serif; color: var(--az-red); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.az-layer.is-small .az-run { display: none; }
/* the search hits: a list under the search box, over the right page (it stays while you type) */
.az-pg .az-hits { position: absolute; z-index: 4; top: 76px; right: var(--az-out); width: min(400px, calc(100% - var(--az-in) - var(--az-out))); max-height: 60%; overflow: auto;
  box-shadow: 0 10px 24px rgba(40, 25, 5, 0.28); }
.az-layer.is-small .az-pg .az-hits { top: 32px; right: 12px; width: calc(100% - 24px); max-height: 70%; }
.az-title { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.az-name { font: italic 400 33px/1 'IM Fell English', 'Iowan Old Style', serif; color: var(--az-red); white-space: nowrap; }
.az-name .ot { border-bottom-color: rgba(163, 38, 15, 0.5); }
.az-name--one { display: none; margin-right: auto; font-size: 18px; }
.az-sub { font: 400 14px/1.2 'IM Fell English SC', 'Iowan Old Style', serif; letter-spacing: 0.06em; color: var(--az-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.az-srch { display: flex; align-items: center; gap: 8px; width: 270px; max-width: calc(100% - 44px); height: 34px; padding: 0 10px; border: 1px solid #b9ab8c;
  border-radius: 17px; background: #fffaf0; color: #5a4c3c; }
.az-srch svg { flex: none; width: 14px; height: 14px; }
.az-srch input { flex: 1; min-width: 0; height: 30px; border: 0; outline: 0; background: transparent; color: var(--az-ink);
  font: 500 14px/1 'Avenir Next', 'Alegreya Sans', sans-serif; -webkit-appearance: none; appearance: none; }
.az-srch input::placeholder { color: #5a4c3c; opacity: 1; }
.az-srch .az-found { flex: none; font: 500 13px/1 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--az-ink-2); white-space: nowrap; }
.az-srch.has-q { border-color: var(--az-red); box-shadow: 0 0 0 3px rgba(163, 38, 15, 0.10); }
.az-k2, .az-layer .k2 { display: inline-block; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--az-ink-2); border-radius: 3px;
  font: 700 12px/18px 'Avenir Next', 'Alegreya Sans', sans-serif; text-align: center; background: #fffaf0; color: var(--az-ink); vertical-align: 1px; white-space: nowrap; }
.az-nw { white-space: nowrap; }   /* a key chip with its word or its full stop (never alone at a line's start) */
.az-srch .az-k2 { background: #ece2cc; border-color: transparent; }
.az-x { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 400 18px/1 'Avenir Next', sans-serif;
  color: var(--az-ink-2); border: 1px solid #b9ab8c; background: transparent; cursor: pointer; }
.az-x:hover { color: var(--az-red); border-color: var(--az-red); }
.az-chaps { position: absolute; top: 92px; height: 32px; display: flex; gap: 2px; flex-wrap: nowrap; overflow: hidden; align-items: flex-end; }
.az-chaps--l { left: var(--az-out); right: var(--az-in); }
.az-chaps--r { left: var(--az-in); right: var(--az-out); justify-content: flex-end; }
.az-chap { display: flex; align-items: center; gap: 0; padding: 6px 9px; border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer;
  font: 400 15px/1 'IM Fell English SC', 'Iowan Old Style', serif; color: var(--az-ink-2); white-space: nowrap; }
.az-chap .az-k2 { background: #ece2cc; border-color: transparent; font-size: 11px; min-width: 17px; height: 17px; line-height: 17px; padding: 0 4px; }
.az-chap:hover { color: var(--az-ink); }
.az-chap.is-on { color: var(--az-red); border-bottom-color: var(--az-red); }
.az-chap:focus-visible { outline: 2px solid var(--az-red); outline-offset: -2px; }
.az-folio { position: absolute; bottom: 10px; font: italic 400 13px/1 'IM Fell English', 'Iowan Old Style', serif; color: var(--az-ink-2); }
.az-pg--l .az-folio { left: var(--az-out); } .az-pg--r .az-folio { right: var(--az-out); }
/* the text: pages laid out as columns, turned by translateX (js/ui-azbuka.js geometry()) */
.az-view { position: absolute; z-index: 2; top: var(--az-head); bottom: var(--az-low); left: var(--az-out); right: var(--az-out); overflow: hidden; }
.az-flow { position: relative; height: 100%; column-fill: auto; -webkit-column-fill: auto; font-family: 'Iowan Old Style', Charter, Palatino, Georgia, serif;
  color: var(--az-ink); outline: none; will-change: transform; overflow-wrap: break-word; }
.az-flow > * { break-inside: auto; }
.az-flow .az-end { display: block; height: 1px; }
.az-break { break-before: column; -webkit-column-break-before: always; }
.az-layer:not(.is-small) .az-front-r { break-before: column; -webkit-column-break-before: always; }
/* the page corners turn the page (as the Letopis's) */
.az-corner { position: absolute; z-index: 5; bottom: 0; width: 38px; height: 38px; border: 0; padding: 0; background: none; cursor: pointer; }
.az-corner::before { content: ''; position: absolute; inset: 0; background: linear-gradient(var(--_d, 135deg), rgba(0, 0, 0, 0) 50%, #e9dfc8 50%, #d9cba9); transition: transform 0.15s ease; }
.az-corner--prev { left: 0; --_d: 225deg; } .az-corner--prev::before { transform-origin: left bottom; }
.az-corner--next { right: 0; } .az-corner--next::before { transform-origin: right bottom; }
.az-corner::after { position: absolute; bottom: 4px; font: 700 15px/1 'IM Fell English', serif; color: var(--az-red); opacity: 0.75; }
.az-corner--next::after { content: '\203A\FE0E'; right: 7px; } .az-corner--prev::after { content: '\2039\FE0E'; left: 7px; }
.az-corner:hover::before, .az-corner:focus-visible::before { transform: scale(1.18); }
.az-corner:focus { outline: none; } .az-corner[hidden] { display: none; }
/* the A–Z thumb index on the outer edge of the right page */
.az-thumbs { position: absolute; right: -22px; top: 132px; display: flex; flex-direction: column; gap: 3px; z-index: 2; }
.az-thumb { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 0 5px 5px 0; background: #e9dfc8; color: var(--az-ink); cursor: pointer;
  font: 400 13px/1 'IM Fell English SC', 'Iowan Old Style', serif; letter-spacing: -0.02em; box-shadow: 0 0 0 1px #0a120c, inset 4px 0 6px -4px rgba(0, 0, 0, 0.3); }
.az-thumb.is-on, .az-thumb:hover { background: var(--az-red); color: #fff7e6; width: 32px; }
/* the keys along the foot of the boards: their own solid band */
.az-foot { position: absolute; left: 22px; right: 26px; bottom: 6px; height: 26px; display: flex; align-items: center; justify-content: center; gap: 16px; z-index: 3;
  font: 500 12.5px/1 'Avenir Next', 'Alegreya Sans', sans-serif; color: #e3ecdf; white-space: nowrap; overflow: hidden; }
.az-foot .az-k2 { min-width: 18px; height: 18px; line-height: 16px; font-size: 11px; margin-right: 3px; background: #1d3024; color: #f2e6cf; border-color: rgba(185, 138, 46, 0.7); }
.az-foot__th { color: #c9d8c8; }
/* printing: black and red */
.az-layer h2.az-h2 { font: italic 400 30px/1.15 'IM Fell English', 'Iowan Old Style', serif; color: var(--az-ink); margin: 2px 0 8px; break-after: avoid; -webkit-column-break-after: avoid; }
.az-layer h3.az-h3 { font: 400 17px/1.1 'IM Fell English SC', 'Iowan Old Style', serif; letter-spacing: 0.04em; color: var(--az-red); margin: 14px 0 8px; break-after: avoid; -webkit-column-break-after: avoid; }
.az-layer .az-flow p { font-size: 16px; line-height: 1.55; margin: 0 0 10px; color: var(--az-ink); }
.az-layer .az-flow p.az-lead { font-size: 17px; }
.az-layer .az-meta, .az-layer .meta { font: 500 13px/1.4 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--az-meta); }
.az-layer .az-flow p.az-meta { font: 500 13px/1.45 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--az-meta); }   /* (LK-L5b: the mock's 13 px) */
.az-layer .az-redcap { float: left; font: italic 400 58px/0.86 'IM Fell English', serif; color: var(--az-red); margin: 6px 8px 0 0; }
.az-layer .az-sec { margin: 0 0 16px; }
.az-layer .az-sec + .az-sec { padding-top: 6px; border-top: 1px dotted #b9ab8c; }
/* the Handbook's pieces (ui-panels.js hb-*) in the primer's printing */
.az-layer .hb-h { margin: 14px 0 6px; font: 400 18px/1.15 'IM Fell English SC', 'Iowan Old Style', serif; letter-spacing: 0.03em; color: var(--az-red); break-after: avoid; -webkit-column-break-after: avoid; }
.az-layer .hb-list { font-size: 15px; line-height: 1.5; color: var(--az-ink); }
.az-layer .hb-list li { break-inside: avoid; -webkit-column-break-inside: avoid; }
.az-layer .hb-list li::before { color: var(--az-red); }
.az-layer .hb-list li:nth-child(even)::before { color: var(--az-ink-2); }
/* a table is printed as rows of blocks, so it can run on over a page (a real table does not break across columns) */
.az-flow table { display: block; width: 100%; margin: 2px 0 12px; font-size: 14px; }
.az-flow thead, .az-flow tbody { display: block; }
.az-flow tr { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(185, 171, 140, 0.6); break-inside: avoid; -webkit-column-break-inside: avoid; }
.az-flow th, .az-flow td { display: block; flex: 1 1 0; min-width: 0; padding: 0 !important; border: 0 !important; line-height: 1.4; }
/* columns keep their places from row to row (equal shares; an empty first heading = a narrow icon column) */
.az-flow th:first-child, .az-flow td:first-child { white-space: normal; }   /* (round 2: panels.css nowraps the first cell; in the book's flex rows that ran text into column 2) */
.az-flow table:has(> thead th:first-child:empty):not(.hb-cons) td:first-child, .az-flow table:has(> thead th:first-child:empty):not(.hb-cons) th:first-child { flex: 0 0 76px; }   /* a label column ([1] Meal) */
.az-flow .hb-cons td:first-child, .az-flow .hb-cons th:first-child { flex: 0 0 18px; }   /* the colour swatches: a narrow icon column */
.az-flow .hb-urls td:first-child { flex: 0 0 34%; }
.az-flow .hb-keys td:first-child, .az-flow .hb-keys th:first-child { flex: 0 0 104px; max-width: none; }
.az-flow .hb-keys td:nth-child(2), .az-flow .hb-keys th:nth-child(2) { flex: 0 0 64px; }
.az-flow .hb-keys td:nth-child(3), .az-flow .hb-keys th:nth-child(3) { flex: 1 1 0; }
.az-layer .hb-table th { color: var(--az-red); border-bottom-color: var(--az-ink); font-family: 'IM Fell English SC', 'Iowan Old Style', serif; font-weight: 400; font-size: 14px; letter-spacing: 0.03em; }
.az-layer .hb-table td { color: var(--az-ink); }
.az-layer .hb-table td small { color: var(--az-meta); }
.az-layer .hb-note { border-left-color: var(--az-red); background: rgba(185, 138, 46, 0.08); color: var(--az-ink-2); break-inside: avoid; -webkit-column-break-inside: avoid; }
.az-layer .hb-muted { color: var(--az-meta); font-style: italic; }
.az-layer code { padding: 0 4px; border-radius: 2px; background: rgba(58, 36, 18, 0.08); font-size: 12.5px; }
.az-layer kbd, .az-layer .kbd { display: inline-block; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--az-ink-2); border-radius: 3px;
  font: 700 12px/18px 'Avenir Next', 'Alegreya Sans', sans-serif; text-align: center; background: #fffaf0; color: var(--az-ink); box-shadow: none; vertical-align: 1px; }
.az-layer mark { background: rgba(185, 138, 46, 0.35); color: inherit; padding: 0 1px; border-radius: 2px; }
/* contents (left page) and Start here (right page) */
.az-toc { list-style: none; margin: 0; padding: 0; }
.az-toc li { display: grid; grid-template-columns: 42px 32px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dotted #b9ab8c; cursor: pointer; break-inside: avoid; -webkit-column-break-inside: avoid; }
.az-toc li:hover b { color: var(--az-red); }
.az-toc .rn { font: 400 18px/1 'IM Fell English SC', 'Iowan Old Style', serif; color: var(--az-red); text-align: right; white-space: nowrap; }   /* fixer B: VIII on one line (the column 42 px) */
.az-toc b { display: block; font: 600 17px/1.2 'Iowan Old Style', Charter, serif; color: var(--az-ink); }
.az-toc .meta { margin-top: 2px; }
.az-toc .az-k2 { font-size: 11px; }
.az-wood { width: 30px; height: 30px; }
.az-front-l .az-h3:first-child, .az-front-r .az-h3:first-child { margin-top: 2px; }
.az-start { border: 1px solid #b9ab8c; background: #fffaf0; padding: 14px 18px; border-radius: 2px; break-inside: avoid; -webkit-column-break-inside: avoid; }
.az-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.az-steps li { counter-increment: s; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; padding: 6px 0; font-size: 15.5px; line-height: 1.5; color: var(--az-ink); }
.az-steps li::before { content: counter(s); font: italic 400 22px/1 'IM Fell English', serif; color: var(--az-red); text-align: center; }
.az-layer .az-flow p.az-lost { margin-top: 14px; }
/* the keyboard picture (by book): it fits one page; a long label breaks with a hyphen */
.az-kb { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 10px; break-inside: avoid; -webkit-column-break-inside: avoid; }
.az-kb-row { display: flex; gap: 4px; }
.az-kb-k { position: relative; flex: 0 0 auto; width: 44px; height: 50px; border-radius: 4px; border: 1px solid #8a7c66; background: #fffaf0; padding: 3px 4px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.08); }
.az-kb-k b { font: 700 15px/1 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--az-ink); }
.az-kb-k span { position: absolute; left: 3px; right: 2px; bottom: 3px; font: 600 8.5px/1.05 'Avenir Next', 'Alegreya Sans', sans-serif; color: #4a3f33;
  -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
.az-kb-k.kb-fc { background: #fbe1cc; border-color: #c2410c; } .az-kb-k.kb-fc b { color: #9a3412; }
.az-kb-k.kb-nk { background: #dbe3f1; border-color: #2f5a9a; } .az-kb-k.kb-nk b { color: #1f3a76; }
.az-kb-k.kb-lp { background: #f2d9d2; border-color: #7a1d10; } .az-kb-k.kb-lp b { color: #7a1d10; }
.az-kb-k.kb-az { background: #d9e6dc; border-color: #2f4a37; } .az-kb-k.kb-az b { color: #2f4a37; }
.az-kb-k.kb-wasd { background: repeating-linear-gradient(135deg, #efe8d8 0 5px, #e2d8c2 5px 10px); border-style: dashed; }
.az-kb-k.kb-wasd b { color: #5c5242; }   /* (round 2: 5.4:1 on the stripes; still greyed) */
.az-kb-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 500 12.5px/1.2 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--az-ink-2); margin-bottom: 8px; }
.az-kb-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid; margin-right: 6px; vertical-align: -3px; }
.az-inbook { width: 100%; margin: 4px 0 8px; font-size: 14px; }
.az-flow .az-inbook td { line-height: 1.6; }
.az-flow .az-inbook td:first-child { flex: 0 0 96px; font: italic 400 17px/1.4 'IM Fell English', serif; color: var(--az-red); }
/* words of the Old Tongue */
.az-gl { list-style: none; margin: 0; padding: 0; }
.az-gl li { display: grid; grid-template-columns: 128px 1fr; gap: 14px; padding: 10px 6px 11px 0; border-bottom: 1px dotted #b9ab8c; break-inside: avoid; -webkit-column-break-inside: avoid; }
.az-gl .w { font: italic 400 23px/1.05 'IM Fell English', serif; color: var(--az-red); overflow-wrap: anywhere; }
.az-gl .w small { display: block; font: 500 12.5px/1.3 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--az-meta); font-style: normal; margin-top: 5px; }
.az-gl p { margin: 0 !important; font-size: 15px !important; line-height: 1.45 !important; }
.az-gl p.az-use { margin-top: 4px !important; color: var(--az-ink-2) !important; }
.az-gl li.hit { background: linear-gradient(90deg, rgba(185, 138, 46, 0.16), rgba(185, 138, 46, 0)); }
/* search results and the index */
.az-hits { border: 1px solid #b9ab8c; border-radius: 3px; background: #fffaf0; margin: 0; }
.az-hit { display: flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-bottom: 1px solid rgba(185, 171, 140, 0.5); cursor: pointer;
  font: 500 14px/1.3 'Avenir Next', 'Alegreya Sans', sans-serif; color: var(--az-ink); }
.az-hit:last-child { border-bottom: 0; }
.az-hit small { color: var(--az-meta); }
.az-hit .pg { margin-left: auto; color: var(--az-meta); white-space: nowrap; }
.az-hit.is-on, .az-hit:hover { background: rgba(185, 138, 46, 0.14); }
.az-idx-l { font: italic 400 26px/1 'IM Fell English', serif; color: var(--az-red); margin: 12px 0 4px; break-after: avoid; -webkit-column-break-after: avoid; }
.az-idx { margin: 0 0 6px; padding: 0; list-style: none; }
.az-idx li { break-inside: avoid; -webkit-column-break-inside: avoid; padding: 3px 0; font-size: 15px; line-height: 1.35; cursor: pointer; }
.az-idx li:hover { color: var(--az-red); }
.az-idx li small { color: var(--az-meta); font: 500 12px/1 'Avenir Next', 'Alegreya Sans', sans-serif; margin-left: 6px; }
.az-close-x { cursor: pointer; }
.az-snap { position: absolute; inset: 0; overflow: hidden; }
.az-snap > .az-pg { position: absolute; }

/* ======================================================================================== 4. COMPACT (480 × 360): one page */
body.sq-compact .az-layer, .az-layer.is-small { padding: 4px; --az-out: 12px; --az-in: 12px; --az-head: 62px; --az-low: 16px; }
body.sq-compact .az, .az-layer.is-small .az { height: calc(100vh - 8px); border-radius: 4px; }
body.sq-compact .az::before, .az-layer.is-small .az::before { inset: 3px; }
.az-layer.is-small .az-hb, .az-layer.is-small .az-foot, .az-layer.is-small .az-gutter { display: none; }
.az-layer.is-small .az-block { left: 7px; right: 16px; top: 7px; bottom: 7px; box-shadow: 1px 0 0 #ebe2cd, 2px 1px 0 #8f8466, 3px 1px 0 #e3d8bf, 0 2px 0 #e3d8bf, 0 3px 0 #8f8466; }
.az-layer.is-small .az-pg--l { display: none; }
.az-layer.is-small .az-pg--r { left: 0; width: 100%; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(10, 18, 12, 0.6); }
.az-layer.is-small .az-top { top: 6px; height: 26px; gap: 8px; padding-bottom: 3px; border-bottom-width: 1px; }
.az-layer.is-small .az-top::after { bottom: -3px; }
.az-layer.is-small .az-name--one { display: block; }
.az-layer.is-small .az-srch { width: 150px; height: 22px; padding: 0 6px; }
.az-layer.is-small .az-srch input { height: 20px; font-size: 11px; }
.az-layer.is-small .az-srch .az-k2 { min-width: 13px; height: 13px; line-height: 12px; font-size: 8.5px; padding: 0 2px; }
.az-layer.is-small .az-x { width: 20px; height: 20px; font-size: 13px; }
.az-layer.is-small .az-chaps { top: 38px; height: 20px; gap: 0; justify-content: flex-start; }
.az-layer.is-small .az-chap { padding: 3px 4px; font-size: 10px; }
.az-layer.is-small .az-chap .az-k2 { min-width: 12px; height: 12px; line-height: 11px; font-size: 8px; padding: 0 2px; }
.az-layer.is-small .az-folio { bottom: 2px; font-size: 9px; }
.az-layer.is-small .az-thumbs { right: -17px; top: 30px; gap: 1px; }
.az-layer.is-small .az-thumb { width: 19px; height: 15px; font-size: 8px; letter-spacing: -0.04em; }
.az-layer.is-small .az-thumb.is-on, .az-layer.is-small .az-thumb:hover { width: 21px; }
.az-layer.is-small .az-corner { width: 22px; height: 22px; }
.az-layer.is-small h2.az-h2 { font-size: 17px; margin-bottom: 4px; }
.az-layer.is-small h3.az-h3, .az-layer.is-small .hb-h { font-size: 12px; margin: 8px 0 4px; }
.az-layer.is-small .az-flow p { font-size: 12.5px; margin-bottom: 6px; line-height: 1.45; }
.az-layer.is-small .az-flow p.az-lead { font-size: 13px; }
.az-layer.is-small .az-flow p.az-meta { font-size: 10.5px; }
.az-layer.is-small .hb-list, .az-layer.is-small .az-flow table { font-size: 12px; }
.az-layer.is-small .az-start { display: none; }
.az-layer.is-small .az-toc li { padding: 3px 0; grid-template-columns: 18px 18px 1fr auto; gap: 6px; }
.az-layer.is-small .az-toc .rn { font-size: 11px; }
.az-layer.is-small .az-toc b { font-size: 13px; }
.az-layer.is-small .az-toc .meta { display: none; }
.az-layer.is-small .az-wood { width: 16px; height: 16px; }
.az-layer.is-small .az-kb-k { width: 28px; height: 28px; padding: 2px 3px; }
.az-layer.is-small .az-kb-k b { font-size: 11px; }
.az-layer.is-small .az-kb-k span { display: none; }
.az-layer.is-small .az-kb-row { gap: 3px; }
.az-layer.is-small .az-gl li { grid-template-columns: 1fr; gap: 2px; padding: 6px 0; }
.az-layer.is-small .az-gl .w { font-size: 17px; }
.az-layer.is-small .az-gl p { font-size: 12.5px !important; }
.az-layer.is-small .az-flow .az-inbook td:first-child { flex-basis: 64px; font-size: 13px; }
.az-layer.is-small .az-flow .az-k2, .az-layer.is-small .az-flow kbd, .az-layer.is-small .az-flow .kbd { min-width: 14px; height: 15px; line-height: 13px; font-size: 9px; padding: 0 3px; }
.az-layer.is-small .az-kb-legend { font-size: 10px; gap: 3px 10px; }
.az-layer.is-small .az-kb-legend i { width: 10px; height: 10px; margin-right: 4px; }
.az-layer.is-small .az { width: calc(100vw - 40px); margin-right: 18px; }
.az-layer.is-small .az-pg--r .az-folio { right: 26px; }
.az-layer.is-small .az-flow .hb-keys td:first-child { flex-basis: 70px; }
.az-layer.is-small .az-flow .hb-keys td:nth-child(2), .az-layer.is-small .az-flow .hb-keys th:nth-child(2) { flex-basis: 54px; }   /* (round 2: 'Dungeon' is 51 px at 12 px) */
.az-layer.is-small .az-flow table:has(> thead th:first-child:empty):not(.hb-cons) td:first-child, .az-layer.is-small .az-flow table:has(> thead th:first-child:empty):not(.hb-cons) th:first-child { flex-basis: 60px; }
@media (prefers-reduced-motion: reduce) {
  .az-layer { transition: none; }
}

/* ======================================================================================== 5. THE NAUKA */
.nk-layer {
  --nk-cloth: #1b2740; --nk-cloth-2: #15203a; --nk-brass: #b8955a; --nk-brass-hi: #e2c48a; --nk-page: #f4ecdb; --nk-page-2: #ece2cc;
  --nk-ink: #211a12; --nk-ink-2: #4e4031; --nk-meta: #54442f; --nk-rule: #d8c8a6; --nk-lapis: #2f5a9a; --nk-sel: rgba(47, 90, 154, 0.13); --nk-ember: #9a2f08;   /* V7.2.3 fixer (LK-M3): meta 8.0:1, due ink 6.4:1 */
  --nk-ui: "Avenir Next", Avenir, "Helvetica Neue", "Alegreya Sans", system-ui, sans-serif;
  --nk-read: "Iowan Old Style", Charter, Palatino, Georgia, serif;
  position: fixed; inset: 0; z-index: 950; display: flex; align-items: center; justify-content: center; padding: 20px 24px; box-sizing: border-box;
  opacity: 0; transition: opacity 0.22s ease;
}
.nk-layer.is-open { opacity: 1; }
.nk-layer *, .nk-layer *::before, .nk-layer *::after { box-sizing: border-box; }
.nk-backdrop { position: absolute; inset: 0; background: radial-gradient(ellipse 90% 80% at 50% 48%, rgba(4, 5, 7, 0.95), rgba(3, 3, 4, 0.985) 78%); }   /* V7.2.3 fixer: the world is covered */
.nk { position: relative; width: min(1320px, calc(100vw - 110px)); height: min(812px, calc(100vh - 70px)); border-radius: 6px 6px 8px 8px; outline: none;
  background: var(--bw-cover, none), var(--bw-bind, none), repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.018) 0 2px, rgba(0, 0, 0, 0.03) 2px 4px),   /* V7.4 lane K: --bw-cover = book wear (css/wear.css) */
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.015) 0 2px, rgba(0, 0, 0, 0.025) 2px 4px), linear-gradient(180deg, var(--nk-cloth), var(--nk-cloth-2));
  box-shadow: 0 0 0 1px #05070c, inset 0 0 0 1px rgba(184, 149, 90, 0.35), inset 0 0 30px rgba(0, 0, 0, 0.45), 0 5px 0 -1px #0e1628, 0 6px 0 -1px #05070c,
    0 30px 80px rgba(0, 0, 0, 0.7); }   /* (V7.2.3 fixer: the board's thickness) */
.nk .num { font-variant-numeric: tabular-nums; }
/* brass corner protectors */
.nk-corner { position: absolute; width: 46px; height: 46px; z-index: 8; pointer-events: none;
  background: linear-gradient(135deg, #f0d79e 0%, #c49a52 35%, #8a6428 70%, #5f4218 100%); box-shadow: inset 0 0 0 1px rgba(255, 240, 200, 0.35), 0 1px 0 #000; }
.nk-corner.tl { left: -3px; top: -3px; clip-path: polygon(0 0, 100% 0, 0 100%); border-radius: 6px 0 0 0; }
.nk-corner.tr { right: -3px; top: -3px; clip-path: polygon(0 0, 100% 0, 100% 100%); border-radius: 0 6px 0 0; }
.nk-corner.bl { left: -3px; bottom: -3px; clip-path: polygon(0 0, 100% 100%, 0 100%); border-radius: 0 0 0 8px; }
.nk-corner.br { right: -3px; bottom: -3px; clip-path: polygon(100% 0, 100% 100%, 0 100%); border-radius: 0 0 8px 0; }
.nk-corner::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #5f4218; box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.6); }
.nk-corner.tl::after { left: 10px; top: 10px; } .nk-corner.tr::after { right: 10px; top: 10px; }
.nk-corner.bl::after { left: 10px; bottom: 10px; } .nk-corner.br::after { right: 10px; bottom: 10px; }
/* the head band: the title, the index tabs (they rise from the band and join the page), the warning, the close button */
.nk-band { position: absolute; left: 0; right: 0; top: 0; height: 56px; display: flex; align-items: flex-end; padding: 0 22px; z-index: 3; }
.nk-title { position: relative; display: flex; align-items: center; gap: 12px; height: 56px; margin-right: 26px; flex: none; }
.nk-seal { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f0d79e, #b8955a 45%, #6f4e1c);
  box-shadow: 0 0 0 1px #05070c, inset 0 0 0 2px rgba(0, 0, 0, 0.25); display: grid; place-items: center; flex: none; }
.nk-seal svg { width: 20px; height: 20px; }
.nk-name { display: block; font: 700 22px/1 var(--cx-font-title); letter-spacing: 0.12em; text-transform: uppercase; color: var(--nk-brass-hi); text-shadow: 0 1px 0 #000; }
.nk-name .ot { border-bottom-color: rgba(226, 196, 138, 0.6); }
.nk-sub { display: block; margin-top: 4px; font: 500 12px/1 var(--nk-ui); letter-spacing: 0.06em; color: #9fb0cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.nk-tabs { display: flex; gap: 4px; align-items: flex-end; height: 56px; min-width: 0; }
.nk-tab { position: relative; display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px 0 15px; border: 0; border-radius: 6px 6px 0 0; cursor: pointer;
  background: linear-gradient(180deg, #2c3c5e, #22304d); color: #c9d3e6; font: 600 14px/1 var(--nk-ui); letter-spacing: 0.02em; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px #0b1222; transition: height 0.16s ease, background 0.16s ease; }
.nk-tab:hover { color: #f0f3f9; background: linear-gradient(180deg, #34476e, #283858); }
.nk-tab .nk-kc { background: rgba(0, 0, 0, 0.28); color: #e2c48a; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.4); }
.nk-tab.is-on { height: 44px; background: var(--nk-page); color: var(--nk-ink); box-shadow: 0 0 0 1px #0b1222, inset 0 2px 0 var(--c, var(--nk-lapis)); z-index: 2; }
.nk-tab.is-on .nk-kc { background: #dccfb1; color: var(--nk-ink); box-shadow: none; }
.nk-tab.is-on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 4px; background: var(--nk-page); }
.nk-tab i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
.nk-tab:focus-visible { outline: 2px solid var(--nk-brass-hi); outline-offset: 1px; }
.nk-right { margin-left: auto; margin-right: 26px; display: flex; align-items: center; gap: 14px; height: 56px; padding-bottom: 2px; color: #9fb0cf; font: 500 13px/1 var(--nk-ui); min-width: 0; }
.nk-saved { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* fixer-b (critics: "…on the …" ran under the seven tabs at 1440 x 900): the tabs never shrink under the note; the note takes
   the room left beside the ×, in up to two short lines (a warning like "The server does not answer" stays readable) */
.nk-layer:not(.is-small) .nk-tabs { flex-shrink: 0; }
/* ... and in a medium window (the book narrower than 1320 px) the tabs get slimmer, then show only the open tab's name (as in
   the small book), so the seven tabs and the × always fit the band (FB4: 1280, 1100, 1000 px) */
@media (max-width: 1269px) {
  .nk-layer:not(.is-small) .nk-tab { padding: 0 9px 0 10px; gap: 6px; }
  .nk-layer:not(.is-small) .nk-tab i { display: none; }
  .nk-layer:not(.is-small) .nk-title { margin-right: 14px; }
}
@media (max-width: 1169px) {
  .nk-layer:not(.is-small) .nk-tab .lbl { display: none; }
  .nk-layer:not(.is-small) .nk-tab.is-on .lbl { display: inline; }
}
.nk-layer:not(.is-small) .nk-saved { white-space: normal; font-size: 11px; line-height: 13px; text-align: right; min-width: 0;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.nk-x { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #e2c48a; font: 400 20px/1 var(--nk-ui); cursor: pointer;
  background: #101a2e; border: 0; box-shadow: 0 0 0 1px #b8955a; }
.nk-x:hover { color: #fff3d6; box-shadow: 0 0 0 1px #e2c48a; }
/* the spread: the block is the page turn's host (js/books.js turn()) */
.nk-block { position: absolute; z-index: 9; left: 16px; right: 16px; top: 56px; bottom: 32px; }   /* (V7.2.3 fixer, LK-M4: the turning leaf is the top layer of the book) */
.nk-spread { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr;
  /* V7.2.3 fixer (the user: "borders to look more like books"): the stack of page edges along the outer and lower sides */
  box-shadow: -1px 0 0 #e8dcc1, -2px 1px 0 #8a7a5c, -3px 1px 0 #ddd0b3, -4px 2px 0 #75674c, 1px 0 0 #e8dcc1, 2px 1px 0 #8a7a5c, 3px 1px 0 #ddd0b3, 4px 2px 0 #75674c,
    0 2px 0 #ddd0b3, 0 3px 0 #8a7a5c, 0 4px 0 #e8dcc1, 0 5px 0 #75674c, 0 8px 16px rgba(0, 0, 0, 0.45); }
/* the page curving into the binding: a soft light ridge, then the fold's shadow (over the pages' own gutter shade) */
.nk-spread::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 40px; margin-left: -20px; z-index: 2; pointer-events: none;
  background: var(--bw-gut, none), linear-gradient(90deg, rgba(255, 252, 240, 0) 0, rgba(255, 252, 240, 0.32) 22%, rgba(60, 40, 10, 0.14) 42%, rgba(30, 20, 8, 0.34) 50%, rgba(60, 40, 10, 0.14) 58%, rgba(255, 252, 240, 0.32) 78%, rgba(255, 252, 240, 0) 100%); }   /* V7.4 lane K: --bw-gut = the cracked spine */
.nk-layer.is-small .nk-spread { box-shadow: 1px 0 0 #e8dcc1, 2px 1px 0 #8a7a5c, 0 2px 0 #ddd0b3, 0 3px 0 #8a7a5c; }
.nk-layer.is-small .nk-spread::after { display: none; }
/* the headbands at the spine (brass-and-blue silk) */
.nk-hb { position: absolute; left: 50%; width: 24px; height: 7px; margin-left: -12px; z-index: 6; border-radius: 3px; pointer-events: none;
  background: repeating-linear-gradient(90deg, #b8955a 0 3px, #2f5a9a 3px 6px); box-shadow: 0 0 0 1px #05070c; }
.nk-hb--t { top: 51px; } .nk-hb--b { bottom: 27px; }
.nk-layer.is-small .nk-hb { display: none; }
.nk-page { position: relative; min-width: 0; min-height: 0; background: var(--nk-page); color: var(--nk-ink); overflow: hidden; box-shadow: 0 0 0 1px #0b1222; font-family: var(--nk-read); }
.nk-page.l { border-radius: 2px 0 0 3px; background: var(--bw-pl, none), linear-gradient(270deg, rgba(60, 40, 10, 0.13), rgba(60, 40, 10, 0) 26px), var(--nk-page); }   /* V7.4 lane K: --bw-pl / --bw-pr = wear */
.nk-page.r { border-radius: 0 2px 3px 0; background: var(--bw-pr, none), linear-gradient(90deg, rgba(60, 40, 10, 0.13), rgba(60, 40, 10, 0) 26px), var(--nk-page); }
.nk-in { position: absolute; inset: 0; overflow: auto; padding: 26px 34px 22px; scrollbar-width: thin; scrollbar-color: #c9b994 transparent; }
.nk-snap { position: absolute; inset: 0; overflow: hidden; }
.nk-snap > .nk-page { position: absolute; }
.nk-foot { position: absolute; left: 58px; right: 58px; bottom: 0; height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: 500 12.5px/1 var(--nk-ui); color: #9fb0cf; white-space: nowrap; overflow: hidden; }
.nk-foot .nk-kc { background: #101a2e; color: #e2c48a; box-shadow: 0 0 0 1px rgba(184, 149, 90, 0.5); margin-right: 5px; }
.nk-foot span { margin-right: 14px; }
.nk-kc { display: inline-block; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 3px; text-align: center; font: 700 11.5px/19px var(--nk-ui); vertical-align: 1px;
  background: #e4d7bb; color: var(--nk-ink); }
/* page parts */
.nk-h2 { font: 600 25px/1.2 var(--nk-read); margin: 0; letter-spacing: -0.005em; color: var(--nk-ink); }
.nk-h3 { font: 700 11.5px/1.2 var(--nk-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--nk-meta); margin: 0 0 10px; }
.nk-h3 .nk-cnt { letter-spacing: 0; text-transform: none; font-weight: 500; margin-left: 6px; }
.nk-gap { margin-top: 18px; }
.nk-meta { font: 500 13px/1.4 var(--nk-ui); color: var(--nk-meta); font-variant-numeric: tabular-nums; }
.nk-meta b { color: var(--nk-ink); }
.nk-lead { margin: 4px 0 14px; }
.nk-crumb { font: 500 13px/1.2 var(--nk-ui); color: var(--nk-meta); margin-bottom: 9px; }
.nk-crumb b { color: var(--nk-ink-2); font-weight: 600; }
.nk-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.nk-head__r { margin-left: auto; }
.nk-head--tight { align-items: baseline; margin-bottom: 8px; }
.nk-head--tight .nk-h3 { margin: 0; }
.nk-head--tight .nk-meta { margin-left: auto; text-align: right; }
.nk-q { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--nk-rule); font: 700 10px/1 var(--nk-ui); color: var(--nk-lapis); cursor: help; }
.nk-search { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 10px 0 12px; border: 1px solid var(--nk-rule); border-radius: 4px; background: #fbf6ea; color: var(--nk-meta); }
.nk-search svg { width: 15px; height: 15px; flex: none; }
.nk-search input { flex: 1; min-width: 0; height: 32px; border: 0; outline: 0; background: transparent; color: var(--nk-ink); font: 500 14px/1 var(--nk-ui); -webkit-appearance: none; appearance: none; }
.nk-search input::placeholder { color: #5a4c3c; opacity: 1; }
.nk-search input::-webkit-search-cancel-button, .nk-search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.nk-search .nk-kc { background: var(--nk-page-2); color: var(--nk-ink-2); }
.nk-search.has-q, .nk-search:focus-within { color: var(--nk-ink); border-color: var(--nk-lapis); box-shadow: 0 0 0 3px rgba(47, 90, 154, 0.12); }
.nk-search + .nk-h3 { margin-top: 18px; }
.nk-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.nk-btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border: 1px solid var(--nk-rule); border-radius: 4px; cursor: pointer;
  background: #fbf6ea; font: 600 13px/1 var(--nk-ui); color: var(--nk-ink-2); white-space: nowrap; }
.nk-btn:hover { border-color: #b9a681; color: var(--nk-ink); }
.nk-btn.pri { background: var(--nk-lapis); border-color: #24487e; color: #f4ecdb; }
.nk-btn.pri:hover { background: #366ab3; }
.nk-btn[disabled] { opacity: 0.5; cursor: default; }
.nk-btn .nk-kc { background: rgba(0, 0, 0, 0.08); color: inherit; min-width: 17px; height: 17px; line-height: 17px; font-size: 11px; }
.nk-btn.pri .nk-kc { background: #1d3c6b; color: #f4ecdb; }   /* V7.2.3 fixer (LK-M3): 9.3:1 (was 3.8) */
.nk-btn:focus-visible, .nk-layer [data-act]:focus-visible { outline: 2px solid var(--nk-lapis); outline-offset: 1px; }
.nk-later { margin: 8px 0 0; font-size: 12px; font-style: italic; }
.nk-rule { height: 1px; background: var(--nk-rule); margin: 16px 0; }
.nk-note { padding: 10px 12px; border: 1px solid var(--nk-rule); border-left: 3px solid var(--nk-lapis); border-radius: 3px; background: #fbf6ea; font: 500 13.5px/1.45 var(--nk-ui); color: var(--nk-ink-2); }
.nk-note b { color: var(--nk-ink); }
.nk-ico { width: 17px; height: 17px; flex: none; }
.nk-qi { width: 22px; height: 22px; flex: none; }
/* the folder tree */
.nk-tree { list-style: none; margin: 0; padding: 0; font: 500 15px/1.25 var(--nk-ui); color: var(--nk-ink-2); }
.nk-tree li { display: flex; align-items: center; gap: 9px; height: 33px; padding: 0 10px; border-radius: 3px; }
.nk-tree li[data-act] { cursor: pointer; }
.nk-tree li[data-act]:hover { background: rgba(47, 90, 154, 0.06); }
.nk-tree li .t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nk-tree li .t .nk-meta { font-size: 13px; }
.nk-tree li .c { margin-left: auto; flex: none; font: 500 12.5px/1 var(--nk-ui); color: var(--nk-meta); font-variant-numeric: tabular-nums; }
.nk-tree li.d1 { padding-left: 30px; }
.nk-tree li.is-sel { background: var(--nk-sel); color: var(--nk-ink); box-shadow: inset 3px 0 0 var(--nk-lapis); }
.nk-tree li.top { font-weight: 700; color: var(--nk-ink); }
.nk-tree .car { width: 10px; color: var(--nk-meta); font-size: 10px; flex: none; }
/* the library's chapter rows (and the essays) */
.nk-docs { list-style: none; margin: 0; padding: 0; }
.nk-docs li { display: grid; grid-template-columns: 22px minmax(0, 1fr) 44px 150px; align-items: center; gap: 12px; min-height: 28.6px; padding: 3px 8px;
  border-bottom: 1px solid rgba(216, 200, 166, 0.7); font: 500 14px/1.2 var(--nk-ui); color: var(--nk-ink); }
.nk-docs li[data-act] { cursor: pointer; }
.nk-docs li[data-act]:hover { background: rgba(47, 90, 154, 0.06); }
.nk-docs li.head { min-height: 28px; font: 700 10.5px/1 var(--nk-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--nk-meta); border-bottom: 1px solid var(--nk-rule); }
.nk-docs li .r, .nk-docs li.head .r { text-align: right; }
.nk-docs li .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nk-docs li .t small { color: var(--nk-meta); font-size: 12.5px; margin-left: 6px; }
.nk-docs li .due { font: 600 12.5px/1 var(--nk-ui); color: var(--nk-ember); text-align: right; font-variant-numeric: tabular-nums; }
.nk-docs li .due.zero { color: var(--nk-meta); font-weight: 500; }
.nk-docs li.is-sel { background: var(--nk-sel); }
.nk-docs--ess li { grid-template-columns: 22px minmax(0, 1fr) 70px 110px; }
.nk-docs .kn { display: grid; grid-template-columns: 1fr 34px; gap: 8px; align-items: center; font: 600 12px/1 var(--nk-ui); color: var(--nk-ink-2); text-align: right; }
.nk-mbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #e4d7bb; gap: 2px; min-width: 60px; }
.nk-mbar i { display: block; height: 100%; }
.nk-mbar .k { background: #2f5a9a; } .nk-mbar .l { background: #8aa3c9; }
.nk-sealmark { display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; background: var(--cx-orn-seal-lapis) center / contain no-repeat; }
/* today */
.nk-today { border: 1px solid var(--nk-rule); border-radius: 4px; background: #fbf6ea; padding: 14px 16px; }
.nk-today .row { display: flex; gap: 22px; align-items: flex-end; }
.nk-today .big { font: 600 34px/1 var(--nk-read); color: var(--nk-ink); }
.nk-today .big.sm { font-size: 24px; color: var(--nk-ink-2); }
.nk-today .row > div > .nk-meta { margin-top: 4px; }
.nk-today .go { margin-left: auto; text-align: right; }
.nk-today .go .nk-meta { margin-top: 6px; }
.nk-today .nk-note { border: 0; padding: 0; background: none; }
.nk-bar { margin-top: 12px; height: 6px; border-radius: 3px; background: #e4d7bb; overflow: hidden; }
.nk-bar i { display: block; height: 100%; background: var(--nk-lapis); border-radius: 3px; }
.nk-next { margin-top: 7px; }
.nk-recent, .nk-cards, .nk-figs, .nk-rated { list-style: none; margin: 0; padding: 0; }
.nk-recent li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 9px; align-items: center; min-height: 30px; font: 500 14px/1.2 var(--nk-ui); color: var(--nk-ink); border-bottom: 1px solid rgba(216, 200, 166, 0.6); }
.nk-recent li[data-act] { cursor: pointer; }
.nk-recent li[data-act]:hover { background: rgba(47, 90, 154, 0.06); }
.nk-recent li .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nk-cards li, .nk-figs li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; padding: 7px 4px; border-bottom: 1px solid rgba(216, 200, 166, 0.6); font: 500 14px/1.35 var(--nk-read); color: var(--nk-ink); }
.nk-figs li { grid-template-columns: 22px 74px minmax(0, 1fr); align-items: start; font-family: var(--nk-ui); font-size: 13.5px; }
.nk-cards .ch, .nk-figs .ch { font: 600 11.5px/1.5 var(--nk-ui); color: var(--nk-meta); }
.nk-cards small { display: block; color: var(--nk-ink-2); font-size: 13px; margin-top: 2px; }
.nk-layer mark { background: rgba(226, 196, 138, 0.55); color: inherit; padding: 0 1px; border-radius: 2px; }
/* chapters */
.nk-statgrid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--nk-rule); border-bottom: 1px solid var(--nk-rule); margin-top: 14px; }
.nk-statgrid > div { padding: 12px 10px 10px; border-right: 1px solid var(--nk-rule); }
.nk-statgrid > div:last-child { border-right: 0; }
.nk-statgrid b { display: block; font: 600 26px/1 var(--nk-read); color: var(--nk-ink); }
.nk-stack3 { display: flex; height: 18px; gap: 2px; margin: 10px 0 8px; }
.nk-stack3 i { display: block; height: 100%; }
.nk-stack3 i:first-child { border-radius: 4px 0 0 4px; }
.nk-stack3 i.rest, .nk-legend i.rest { flex: 1; background: #e4d7bb; box-shadow: inset 0 0 0 1px #c9b78f; border-radius: 0 4px 4px 0; }
.nk-legend { display: flex; gap: 16px; flex-wrap: wrap; font: 500 12.5px/1 var(--nk-ui); color: var(--nk-ink-2); }
.nk-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.nk-legend i.rest { flex: none; border-radius: 2px; }
.nk-legend--r { margin-top: 6px; }
.nk-hunt { display: flex; align-items: baseline; gap: 10px; }
.nk-hunt .big { font: 600 30px/1 var(--nk-read); }
.nk-mile { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--nk-rule); border-radius: 4px; background: #fbf6ea; margin-top: 10px; }
.nk-mile .s { width: 38px; height: 38px; flex: none; background: var(--cx-orn-seal-lapis) center / contain no-repeat; }
.nk-mile .s.gold { background-image: var(--cx-orn-seal-gold); }
.nk-mile .s.dim { opacity: 0.38; filter: grayscale(1); }
.nk-mile b { font: 600 15px/1.25 var(--nk-read); display: block; color: var(--nk-ink); }
.nk-chs { width: 100%; border-collapse: collapse; font: 500 13.5px/1.2 var(--nk-ui); table-layout: fixed; }
.nk-chs th { text-align: left; font: 700 10.5px/1 var(--nk-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nk-meta); padding: 0 6px 8px; border-bottom: 1px solid var(--nk-rule); }
.nk-chs th:nth-child(1) { width: 30px; } .nk-chs th:nth-child(3) { width: 126px; } .nk-chs th:nth-child(4) { width: 38px; }
.nk-chs th:nth-child(5) { width: 44px; } .nk-chs th:nth-child(6) { width: 54px; } .nk-chs th:nth-child(7) { width: 36px; }
.nk-chs th.r { text-align: right; }
.nk-chs td { height: 29.5px; padding: 0 6px; border-bottom: 1px solid rgba(216, 200, 166, 0.55); white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--nk-ink-2); }
.nk-chs tr[data-act] { cursor: pointer; }
.nk-chs tbody tr:hover td { background: rgba(47, 90, 154, 0.05); }
.nk-chs td.n { color: var(--nk-meta); text-align: right; }
.nk-chs td.t { overflow: hidden; text-overflow: ellipsis; color: var(--nk-ink); }
.nk-chs td.r { text-align: right; }
.nk-chs td.d { text-align: right; color: var(--nk-ember); font-weight: 600; }
.nk-chs td .zero { color: var(--nk-meta); font-weight: 500; }
.nk-chs tr.is-sel td { background: var(--nk-sel); }
.nk-chs .nk-mbar { width: 112px; }
.nk-play { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 22px; border-radius: 3px; border: 1px solid var(--nk-rule); color: var(--nk-lapis);
  font-size: 10px; background: #fbf6ea; cursor: pointer; padding: 0; }
.nk-play:hover { background: var(--nk-lapis); border-color: #24487e; color: #f4ecdb; }
/* quests & exercises */
.nk-ql { list-style: none; margin: 0 0 6px; padding: 0; }
.nk-ql li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 6px 8px 6px 6px; border-radius: 3px; }
.nk-ql li b { font: 600 15.5px/1.25 var(--nk-read); color: var(--nk-ink); }
.nk-ql li .nk-meta { margin-top: 2px; }
.nk-ql li.is-done b { color: var(--nk-meta); text-decoration: line-through; text-decoration-color: rgba(94, 78, 60, 0.5); }
.nk-ql li.is-locked { opacity: 0.6; }
.nk-ql .tag { font: 700 10px/1 var(--nk-ui); letter-spacing: 0.08em; color: var(--nk-meta); border: 1px solid var(--nk-rule); padding: 4px 5px 3px; border-radius: 2px; white-space: nowrap; }
.nk-qbar { height: 5px; background: #e4d7bb; border-radius: 3px; margin-top: 6px; width: min(220px, 100%); overflow: hidden; }
.nk-qbar i { display: block; height: 100%; background: var(--nk-lapis); border-radius: 3px; }
.nk-desk { margin: 8px 0 4px; padding: 10px 12px; border: 1px dashed #c9b78f; border-radius: 4px; background: #fbf6ea; }
.nk-desk b { display: block; font: 600 15px/1.25 var(--nk-read); color: var(--nk-ink); }
.nk-exrow { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 6px; }
.nk-exch { font-weight: 600; color: var(--nk-ink-2); }
.nk-ex { display: flex; flex-wrap: wrap; gap: 6px; }
.nk-desk .nk-ex { margin-top: 6px; }
.nk-chip { font: 600 12.5px/1 var(--nk-ui); padding: 5px 7px; border-radius: 3px; border: 1px solid var(--nk-rule); background: #fbf6ea; color: var(--nk-ink-2); cursor: pointer; font-variant-numeric: tabular-nums; }
.nk-chip:hover { border-color: #b9a681; color: var(--nk-ink); }
.nk-chip small { margin-left: 4px; font-size: 10.5px; color: var(--nk-meta); }
.nk-chip i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
/* V7.2.3 fixer (critic M3): the ledger's filters and the Repeat-list dot */
.nk-qf { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; flex-wrap: wrap; }
.nk-qfb { font: 600 12.5px/1 var(--nk-ui); padding: 6px 10px; border-radius: 14px; border: 1px solid var(--nk-rule); background: #fbf6ea; color: var(--nk-ink-2); cursor: pointer; }
.nk-qfb:hover { border-color: #b9a681; color: var(--nk-ink); }
.nk-qfb.is-on { background: var(--nk-lapis); border-color: #24487e; color: #f4ecdb; }
.nk-qfb:focus-visible { outline: 2px solid var(--nk-lapis); outline-offset: 1px; }
.nk-qf__k { margin-left: auto; }
.nk-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #9a2f08; box-shadow: 0 0 0 1.5px #fbf6ea; vertical-align: 1px; }
.nk-qf__k .nk-dot { margin-right: 4px; }
.nk-chip { position: relative; }
.nk-chip .nk-dot { position: absolute; top: -3px; right: -3px; }
.nk-layer.is-small .nk-qfb { font-size: 10px; padding: 3px 7px; }
.nk-layer.is-small .nk-qf__k { display: none; }
.nk-r1 { background: #a8321e; } .nk-r2 { background: #8a4f08; }   /* V7.2.3 fixer (LK-M3): white on Hard 6.6:1 (was 4.3) */ .nk-r3 { background: #2f7a68; } .nk-r4 { background: #2f5a9a; }
.nk-rphead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.nk-rphead .nk-h3 { margin: 0; }
.nk-rphead + .nk-h2 { margin-top: 2px; }
.nk-honest { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; margin: 0 0 12px; border: 1px solid #e0c99a; border-left: 3px solid #b06a12; border-radius: 3px; background: #fbf3e0; }
.nk-honest b { display: block; font: 600 15px/1.3 var(--nk-read); color: var(--nk-ink); margin-bottom: 2px; }
.nk-honest--big { padding: 14px 16px; }
.nk-honest--big b { font-size: 17px; }
.nk-rp { list-style: none; margin: 0; padding: 0; }
.nk-rp li { display: grid; grid-template-columns: 62px minmax(0, 1fr) 92px; gap: 14px; align-items: start; padding: 11px 6px; border-bottom: 1px solid rgba(216, 200, 166, 0.7); cursor: pointer; }
.nk-rp li:hover { background: rgba(47, 90, 154, 0.05); }
.nk-rp .no { font: 600 17px/1.2 var(--nk-read); color: var(--nk-ink); }
.nk-rp .tt { font: 500 15px/1.3 var(--nk-read); color: var(--nk-ink); }
.nk-rp .why { font: 500 12.5px/1.4 var(--nk-ui); color: var(--nk-meta); margin-top: 3px; }
.nk-rp .when { text-align: right; font: 600 13px/1.3 var(--nk-ui); color: var(--nk-ink-2); }
.nk-rp .when.now { color: var(--nk-ember); }
.nk-pill { display: inline-block; font: 700 11px/1 var(--nk-ui); padding: 3px 6px; border-radius: 2px; color: #fff; margin-right: 6px; vertical-align: 1px; }
.nk-empty { margin: 8px 0; }
.nk-qhint { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
/* exams, log */
.nk-bul { margin: 0; padding-left: 18px; font: 500 14px/1.6 var(--nk-ui); color: var(--nk-ink-2); }
.nk-exam .big { display: block; font: 600 26px/1.15 var(--nk-read); color: var(--nk-ink); margin-bottom: 4px; }
.nk-log { width: 100%; border-collapse: collapse; font: 500 13.5px/1.2 var(--nk-ui); }
.nk-log th { text-align: left; font: 700 10.5px/1 var(--nk-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nk-meta); padding: 0 6px 8px; border-bottom: 1px solid var(--nk-rule); }
.nk-log th.r, .nk-log td.r { text-align: right; }
.nk-log td { height: 28px; padding: 0 6px; border-bottom: 1px solid rgba(216, 200, 166, 0.55); color: var(--nk-ink-2); }
.nk-log tr.is-today td { color: var(--nk-ink); font-weight: 600; background: rgba(47, 90, 154, 0.06); }
.nk-rated li { display: grid; grid-template-columns: 44px 78px minmax(0, 1fr) 26px; gap: 8px; align-items: center; min-height: 28px; padding: 3px 4px; border-bottom: 1px solid rgba(216, 200, 166, 0.55); font: 500 13.5px/1.3 var(--nk-ui); color: var(--nk-ink); }
.nk-rated li.day { display: block; min-height: 0; padding: 12px 4px 4px; font: 700 10.5px/1 var(--nk-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--nk-meta); border-bottom: 1px solid var(--nk-rule); }
.nk-rated .tm, .nk-rated .ch { color: var(--nk-meta); font-size: 12.5px; }
.nk-rated .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--nk-read); font-size: 14px; }
.nk-rated .nk-pill { margin: 0; text-align: center; }
.tooltip.tooltip--nk { max-width: 360px; }
.cl-seal { color: #e3b562; font-weight: 700; }
/* one page (a small window, compact mode 480 × 360): the work first, then the page beside it */
.nk-layer.is-small { padding: 4px; }
.nk-layer.is-small .nk { width: calc(100vw - 8px); height: calc(100vh - 8px); border-radius: 4px; }
.nk-layer.is-small .nk-corner { width: 22px; height: 22px; }
.nk-layer.is-small .nk-corner::after { display: none; }
.nk-layer.is-small .nk-band { height: 50px; padding: 0 8px; flex-wrap: wrap; align-content: flex-end; }
.nk-layer.is-small .nk-title { height: 22px; margin: 4px 0 0; gap: 6px; flex: 1 0 100%; }
.nk-layer.is-small .nk-seal { width: 18px; height: 18px; }
.nk-layer.is-small .nk-seal svg { width: 11px; height: 11px; }
.nk-layer.is-small .nk-name { font-size: 13px; }
.nk-layer.is-small .nk-sub { display: none; }
.nk-layer.is-small .nk-tabs { height: 26px; gap: 2px; }
.nk-layer.is-small .nk-tab { height: 22px; padding: 0 5px; font-size: 10px; gap: 4px; }
.nk-layer.is-small .nk-tab.is-on { height: 26px; }
.nk-layer.is-small .nk-tab .lbl { display: none; }
.nk-layer.is-small .nk-tab.is-on .lbl { display: inline; }
.nk-layer.is-small .nk-tab i { display: none; }
.nk-layer.is-small .nk-tab .nk-kc { min-width: 14px; height: 14px; line-height: 14px; font-size: 9px; padding: 0 2px; }
.nk-layer.is-small .nk-right { position: absolute; right: 8px; top: 2px; height: 22px; margin: 0; font-size: 10px; }
.nk-layer.is-small .nk-saved { display: none; }
.nk-layer.is-small .nk-x { width: 20px; height: 20px; font-size: 14px; }
.nk-layer.is-small .nk-block { left: 5px; right: 5px; top: 50px; bottom: 18px; }
.nk-layer.is-small .nk-spread { grid-template-columns: 1fr; }
.nk-layer.is-small .nk-page.l { display: none; }
.nk-layer.is-small .nk-page.r { border-radius: 2px; background: var(--nk-page); }
.nk-layer.is-small .nk-in { padding: 8px 10px; }
.nk-layer.is-small .nk-foot { height: 18px; left: 8px; right: 8px; font-size: 9px; }
.nk-layer.is-small .nk-foot .hide-c { display: none; }
.nk-layer.is-small .nk-foot span { margin-right: 6px; }
.nk-layer.is-small .nk-foot .nk-kc { min-width: 13px; height: 13px; line-height: 13px; font-size: 8.5px; padding: 0 2px; margin-right: 3px; }
.nk-layer.is-small .nk-h2 { font-size: 15px; }
.nk-layer.is-small .nk-crumb { font-size: 9.5px; margin-bottom: 4px; }
.nk-layer.is-small .nk-meta { font-size: 10px; }
.nk-layer.is-small .nk-h3 { font-size: 8.5px; margin-bottom: 5px; }
.nk-layer.is-small .nk-btn { height: 20px; font-size: 9.5px; padding: 0 6px; gap: 4px; }
.nk-layer.is-small .nk-btn .nk-kc { display: none; }
.nk-layer.is-small .nk-search { height: 22px; }
.nk-layer.is-small .nk-search input { height: 20px; font-size: 10.5px; }
.nk-layer.is-small .nk-head { margin-bottom: 6px; }
.nk-layer.is-small .nk-docs li { grid-template-columns: 14px minmax(0, 1fr) 26px 74px; gap: 6px; min-height: 18px; padding: 1px 4px; font-size: 10.5px; }
.nk-layer.is-small .nk-docs li .t small { display: none; }
.nk-layer.is-small .nk-docs li .due { font-size: 10px; }
.nk-layer.is-small .nk-docs .kn { grid-template-columns: 1fr 26px; gap: 4px; font-size: 9.5px; }
.nk-layer.is-small .nk-mbar { height: 5px; min-width: 30px; }
.nk-layer.is-small .nk-ico { width: 12px; height: 12px; }
.nk-layer.is-small .nk-qi { width: 15px; height: 15px; }
.nk-layer.is-small .nk-tree { font-size: 11px; }
.nk-layer.is-small .nk-tree li { height: 20px; padding: 0 4px; gap: 5px; }
.nk-layer.is-small .nk-tree li.d1 { padding-left: 14px; }
.nk-layer.is-small .nk-today { padding: 6px 8px; }
.nk-layer.is-small .nk-today .big { font-size: 20px; }
.nk-layer.is-small .nk-today .big.sm { font-size: 15px; }
.nk-layer.is-small .nk-today .row { gap: 10px; }
.nk-layer.is-small .nk-statgrid b { font-size: 16px; }
.nk-layer.is-small .nk-statgrid > div { padding: 5px 6px; }
.nk-layer.is-small .nk-chs { font-size: 10.5px; }
.nk-layer.is-small .nk-chs td { height: 19px; padding: 0 3px; }
.nk-layer.is-small .nk-chs th { font-size: 8px; padding: 0 3px 4px; }
.nk-layer.is-small .nk-chs th:nth-child(3) { width: 50px; } .nk-layer.is-small .nk-chs .nk-mbar { width: 44px; }
.nk-layer.is-small .nk-chs th:nth-child(6), .nk-layer.is-small .nk-chs td:nth-child(6) { display: none; }
.nk-layer.is-small .nk-chs th:nth-child(1) { width: 18px; } .nk-layer.is-small .nk-chs th:nth-child(4) { width: 24px; }
.nk-layer.is-small .nk-chs th:nth-child(5) { width: 26px; } .nk-layer.is-small .nk-chs th:nth-child(7) { width: 22px; }
.nk-layer.is-small .nk-play { width: 18px; height: 15px; font-size: 8px; }
.nk-layer.is-small .nk-mile { padding: 5px 7px; gap: 7px; margin-top: 5px; }
.nk-layer.is-small .nk-mile .s { width: 22px; height: 22px; }
.nk-layer.is-small .nk-mile b { font-size: 11.5px; }
.nk-layer.is-small .nk-rp li { grid-template-columns: 34px minmax(0, 1fr) 54px; gap: 6px; padding: 5px 2px; }
.nk-layer.is-small .nk-rp .no { font-size: 12px; }
.nk-layer.is-small .nk-rp .tt { font-size: 11.5px; }
.nk-layer.is-small .nk-rp .why, .nk-layer.is-small .nk-rp .when { font-size: 10px; }
.nk-layer.is-small .nk-ql li b { font-size: 12px; }
.nk-layer.is-small .nk-ql li { padding: 3px 4px; gap: 6px; grid-template-columns: 16px minmax(0, 1fr) auto; }
.nk-layer.is-small .nk-honest { padding: 6px 8px; gap: 7px; }
.nk-layer.is-small .nk-honest b { font-size: 12px; }
.nk-layer.is-small .nk-rule { margin: 8px 0; }
.nk-layer.is-small .nk-exrow { grid-template-columns: 64px minmax(0, 1fr); }
.nk-layer.is-small .nk-chip { font-size: 10px; padding: 3px 5px; }
.nk-layer.is-small .nk-log, .nk-layer.is-small .nk-rated li { font-size: 10.5px; }
.nk-layer.is-small .nk-log td { height: 18px; }
.nk-layer.is-small .nk-rated li { grid-template-columns: 32px 54px minmax(0, 1fr) 20px; min-height: 18px; gap: 4px; }
.nk-layer.is-small .nk-rated .t { font-size: 11px; }
.nk-layer.is-small .nk-later { display: none; }
@media (prefers-reduced-motion: reduce) {
  .nk-layer, .nk-tab { transition: none; }
}

/* V7.2.3 fixer (LK-M4): a book lies fully open; the world and the HUD under its near-black backdrop are not painted
   (books.js cover(); on after the opening motion, off when a book starts to close). Everything in them is drawn under
   the book (z-index 950 over #world 1 and .hud 10), so nothing visible changes; the page turns keep 60 fps. */
html.sq-book-cover #hud, html.sq-book-cover #toast-layer { visibility: hidden; }
/* V7.3 (item 6): the world under an open book stays faintly in view round its edges; with the Hermit's Hood up it is gone */
html.sq-book-cover.sq-hood-up #world { visibility: hidden; }   /* (round 2: the toasts ghosted through the 0.985 backdrop; they sit under the book anyway) */

/* ======================================================================================== 6. V7.3: EVERY BOOK AS BIG AS THE SCREEN */
/* (lane S, builder v73-shell; docs/V7-3-UPDATES.md item 6; the user, 18 Oct ~14:10: "Let everything open big no matter but hermits
 * hood makes the background game really gone … So let all books open as big as the screen allows to maximize usability")
 * The Nauka, the Letopis and the Azbuka fill the window, a slim margin round them (8-18 px); no small window of a book. Below
 * ~980 x 600 css px a book shows one page (still the whole window). The game behind: a dark veil, the world faintly in view
 * round the edges; with the Hermit's Hood up (an item, js/engine-study.js hood) the world is gone (html.sq-hood-up). */
:root { --bk-gut: clamp(8px, 1.1vw, 18px); }
.nk-layer, .az-layer, .book-layer.lp-book { padding: 0; }
.nk { width: calc(100vw - 2 * var(--bk-gut)); height: calc(100vh - 2 * var(--bk-gut)); }
.nk-layer.is-small .nk { width: calc(100vw - 8px); height: calc(100vh - 8px); }
.az { width: calc(100vw - 2 * var(--bk-gut) - 34px); height: calc(100vh - 2 * var(--bk-gut)); margin-right: 22px; }
.az-layer.is-small .az, body.sq-compact .az { width: calc(100vw - 40px); height: calc(100vh - 8px); margin-right: 18px; }
.book-layer.lp-book .book { width: calc(100vw - 2 * var(--bk-gut) - 208px); height: calc(100vh - 2 * var(--bk-gut)); margin-right: 208px; }   /* the ribbons (212 px) hang off the fore-edge */
.book-layer.lp-book.is-single .book { width: calc(100vw - 40px); height: calc(100vh - 8px); margin-right: 32px; }
/* the veil: without the hood the world shows faintly round the book; with it (html.sq-hood-up) the room is dark */
.nk-backdrop, .az-backdrop, .book-layer.lp-book .book-backdrop { background: radial-gradient(ellipse 90% 80% at 50% 48%, rgba(4, 5, 7, 0.80), rgba(3, 3, 4, 0.90) 80%); }
html.sq-hood-up .nk-backdrop, html.sq-hood-up .az-backdrop, html.sq-hood-up .book-layer.lp-book .book-backdrop { background: #050506; }
/* the Nauka's four tabs: their names always show (there is room for four) */
@media (max-width: 1169px) { .nk-layer:not(.is-small) .nk-tab .lbl { display: inline; } }
.nk-tab .lbl.ot { border-bottom: 1px dotted rgba(226, 196, 138, 0.55); }
.nk-tab.is-on .lbl.ot { border-bottom-color: rgba(33, 26, 18, 0.45); }
/* the foot: the keys of the merged tabs (K course page, T writer, G the Letopis's Log), a quieter group */
.nk-foot-routes { margin-left: 6px; padding-left: 14px; border-left: 1px solid rgba(184, 149, 90, 0.35); opacity: 0.85; }
.nk-layer.is-small .nk-foot-routes { display: none; }
/* the Professions tab: the shelf is a link to the Library's Shelf view (THE ONE SHELF) */
.pf-shelflink { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 4px 0 18px; padding: 14px 16px; border-radius: 4px;
  background: rgba(184, 149, 90, 0.12); box-shadow: inset 0 0 0 1px rgba(122, 90, 42, 0.35); }
.pf-shelflink b { display: block; font: 600 16px/1.3 var(--nk-read, Georgia, serif); color: #211a12; margin-bottom: 3px; }
.pf-shelflink .nk-meta { display: block; }
.pf-shelflink .nk-btn { flex: none; }
/* the Letopis's Log (chapter VII): the last cards you rated */
.book-layer.lp-book .lp-rated { list-style: none; margin: 4px 0 14px; padding: 0; font-size: var(--book-small, 15px); }
.book-layer.lp-book .lp-rated__day { margin: 10px 0 3px; font: 700 12px/1.2 var(--cx-font-title, serif); letter-spacing: 0.12em; text-transform: uppercase; color: var(--lp-rubric, #7a1d10); break-after: avoid; }
.book-layer.lp-book .lp-rated__r { display: grid; grid-template-columns: 44px 78px 1fr 24px; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--book-hair, rgba(58, 34, 20, 0.22)); break-inside: avoid; }
.book-layer.lp-book .lp-rated__t { font-variant-numeric: tabular-nums; color: var(--lp-meta, #4f3f2c); }
.book-layer.lp-book .lp-rated__ch { color: var(--lp-meta, #4f3f2c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-layer.lp-book .lp-rated__f { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-layer.lp-book .lp-rated__g { justify-self: end; min-width: 22px; height: 20px; border-radius: 3px; text-align: center; font: 700 12px/20px var(--cx-font-num, sans-serif); color: #fff8ea; background: #6a5a44; }
.book-layer.lp-book .lp-g1 { background: #8a2a1c; } .book-layer.lp-book .lp-g2 { background: #8a6420; } .book-layer.lp-book .lp-g3 { background: #2c5a4f; } .book-layer.lp-book .lp-g4 { background: #1f3664; }
.book-layer.lp-book .lp-log14 .lp-lv__r { grid-template-columns: 1.4fr 0.8fr 0.9fr 0.8fr 0.9fr; }
.book-layer.lp-book .sy-lp .sy-mastery li[data-act] { cursor: pointer; }
.book-layer.lp-book .sy-lp .sy-mastery li.is-sel { background: rgba(122, 29, 16, 0.08); box-shadow: inset 3px 0 0 var(--lp-rubric, #7a1d10); }

/* 13 Nov 2026 (the known red W15): at 480x360 the Keys table's narrow columns ran "Dungeon" 3 px past its cell: one size smaller in the
   small window, and a long word may break inside its own cell (hyphenated) rather than run into the next column */
.az-layer.is-small .az-flow table { font-size: 13px; }
body.sq-compact .az-layer .az-flow table { font-size: 13px; }
.az-layer.is-small .az-flow th, .az-layer.is-small .az-flow td, body.sq-compact .az-layer .az-flow th, body.sq-compact .az-layer .az-flow td { white-space: normal; overflow-wrap: anywhere; hyphens: auto; }   /* (panels.css nowraps the keys table's 2nd column)*/
