/* Study Quest — css/writer-nauka.css (V7.2.4, role v724-late: LATE-REQUESTS R1.1-R1.4, R5.3; js/writer-nauka.js)
 * The writer inside the Nauka: the Nauka's blue cloth as a thin frame round the writer with the book's tab strip along the
 * top; the sidebar's Cards; Book view (two pages side by side); the page buttons and the page turn's host. */

/* ---------------------------------------------------------------------------------------------- the frame and the tabs */
#wr-nkframe { display: none; position: fixed; inset: 0; z-index: 994;   /* just under the writer (995), over the HUD and the book layers (950) */
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.018) 0 2px, rgba(0, 0, 0, 0.03) 2px 4px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.015) 0 2px, rgba(0, 0, 0, 0.025) 2px 4px), linear-gradient(180deg, #1b2740, #15203a);
  box-shadow: inset 0 0 0 1px #05070c, inset 0 0 0 2px rgba(184, 149, 90, 0.35), inset 0 0 40px rgba(0, 0, 0, 0.45); }
body.writer-open #wr-nkframe { display: block; }
.wr-root.wr-innauka { inset: 34px 9px 9px 9px; border-radius: 2px 2px 3px 3px;
  box-shadow: 0 0 0 1px #05070c, 0 0 0 2px rgba(184, 149, 90, 0.45), 0 6px 22px rgba(0, 0, 0, 0.55); }
.wnk-band { position: absolute; left: 12px; right: 12px; top: 0; height: 34px; display: flex; align-items: flex-end; gap: 14px; }
.wnk-title { flex: none; align-self: center; font: 700 13px/1 var(--cx-font-title, Cinzel, serif); letter-spacing: 0.14em; text-transform: uppercase; color: #e2c48a;
  text-shadow: 0 1px 0 #000; white-space: nowrap; }
.wnk-title .ot { border-bottom-color: rgba(226, 196, 138, 0.55); }
.wnk-tabs { display: flex; gap: 3px; align-items: flex-end; min-width: 0; overflow: hidden; }
.wnk-tab { position: relative; display: flex; align-items: center; gap: 7px; height: 25px; padding: 0 11px 0 10px; border: 0; border-radius: 5px 5px 0 0; cursor: pointer; flex: none;
  background: linear-gradient(180deg, #2c3c5e, #22304d); color: #c9d3e6; font: 600 12.5px/1 "Avenir Next", Avenir, "Helvetica Neue", system-ui, sans-serif; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px #0b1222; }
.wnk-tab:hover { color: #f0f3f9; background: linear-gradient(180deg, #34476e, #283858); }
.wnk-tab i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
.wnk-tab.is-on { height: 29px; background: #121110; color: #f1eadc; box-shadow: 0 0 0 1px #05070c, inset 0 2px 0 var(--c); z-index: 2; }   /* joins the writer's top bar */
.wnk-tab.is-on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: #121110; }
.wnk-tab:focus-visible { outline: 2px solid #e2c48a; outline-offset: 1px; }
.wnk-where { margin-left: auto; align-self: center; font: 500 12px/1 "Avenir Next", Avenir, system-ui, sans-serif; color: #9fb0cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px), (max-height: 520px) {
  .wr-root.wr-innauka { inset: 26px 3px 3px 3px; }
  .wnk-band { left: 4px; right: 4px; height: 26px; gap: 6px; }
  .wnk-title, .wnk-where { display: none; }
  .wnk-tab { height: 20px; padding: 0 7px; font-size: 11px; gap: 5px; }
  .wnk-tab.is-on { height: 23px; }
  .wnk-tab .lbl { max-width: 54px; overflow: hidden; text-overflow: ellipsis; }
}
.wnk-tab .tiny { display: none; }
@media (max-width: 520px) { .wnk-tab .lbl { display: none; } .wnk-tab .tiny { display: inline; } .wnk-tab { padding: 0 6px; font-size: 10.5px; } }

/* ---------------------------------------------------------------------------------------------- the sidebar's Cards */
.wnk-cards { margin-top: 2px; }
.wnk-cards .wnk-link { display: flex; align-items: center; gap: 8px; margin: 0 4px 8px; }
.wnk-cards .wnk-link .wr-meta { flex: none; }
.wnk-cards select { flex: 1 1 auto; min-width: 0; font: 600 12px/1 var(--st-ui); color: var(--wr-ui-text); background: var(--wr-btn); border: 1px solid var(--wr-btn-line);
  border-radius: 3px; padding: 5px 6px; height: 27px; }
.wnk-cards input.wnk-q { width: calc(100% - 8px); margin: 0 4px 8px; box-sizing: border-box; font: 400 13px/1.3 var(--st-ui); color: #efe8da; background: #0f0e0d;
  border: 1px solid #3b3832; border-radius: 3px; padding: 5px 7px; }
.wnk-cards input.wnk-q::placeholder { color: #6f685d; opacity: 1; }
.wnk-cards .wnk-cmeta { margin: 0 4px 8px; font-size: 12px; }
.wr-side ol.wnk-list { margin: 0 0 10px; font-size: 13px; }
.wr-side ol.wnk-list li { white-space: normal; overflow: visible; padding-top: 4px; padding-bottom: 4px; line-height: 1.35; overflow-wrap: anywhere; }
.wr-side ol.wnk-list li.k-heading { color: #e3b562; font-weight: 600; margin-top: 4px; }
.wr-side ol.wnk-list li.k-card { color: #e8e1d3; border-left-color: rgba(227, 181, 98, 0.35); }
.wr-side ol.wnk-list li.k-child { color: #b8b0a2; font-size: 12.5px; }
.wr-side ol.wnk-list li.k-note { color: #a39c8f; font-style: italic; }
.wr-side ol.wnk-list li.wnk-none { cursor: default; font-style: italic; color: var(--wr-ui-meta); }
.wr-side .wnk-open { margin: 0 4px 18px; text-align: left; }
.wr-side .wnk-cards .hidden { display: none; }

/* ---------------------------------------------------------------------------------------------- the page buttons, the turn */
.wnk-pager { display: inline-flex; gap: 4px; align-items: center; }
.wr-root .wnk-pager button.wnk-pgbtn { padding: 3px 8px; font: 700 14px/1 var(--st-ui); min-width: 26px; }
.wnk-turnhost { grid-column: 2; grid-row: 3; position: relative; z-index: 3; pointer-events: none; min-height: 0; }
.wnk-snap { position: relative; overflow: hidden; background: #0d0c0b; }

/* ---------------------------------------------------------------------------------------------- Book view */
.wnk-book { grid-column: 2; grid-row: 3; position: relative; z-index: 2; min-height: 0; overflow: hidden; background: #0d0c0b; display: none; }
.wr-root.wnk-bookon .wnk-book { display: block; }
.wr-root.wnk-bookon .wr-desk { visibility: hidden; }
.wnk-spread { position: relative; margin: 18px auto 0;
  box-shadow: -1px 0 0 #e8dcc1, -2px 1px 0 #8a7a5c, -3px 1px 0 #ddd0b3, 1px 0 0 #e8dcc1, 2px 1px 0 #8a7a5c, 3px 1px 0 #ddd0b3, 0 2px 0 #ddd0b3, 0 3px 0 #8a7a5c, 0 10px 26px rgba(0, 0, 0, 0.55); }
.wnk-spread::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 36px; margin-left: -18px; z-index: 5; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 252, 240, 0) 0, rgba(60, 40, 10, 0.10) 40%, rgba(30, 20, 8, 0.30) 50%, rgba(60, 40, 10, 0.10) 60%, rgba(255, 252, 240, 0) 100%); }
.wnk-pg { position: absolute; top: 0; overflow: hidden; background: var(--st-page, #f4ecdb); cursor: text; }
.wnk-pg .wr-sheet { box-shadow: none !important; }
.wnk-pg.is-blank { background: linear-gradient(180deg, #e9dec5, #e2d5b8); cursor: default; }
.wnk-bcap { text-align: center; margin-top: 10px; font: 500 12.5px/1.3 var(--st-ui); color: var(--wr-ui-meta); padding: 0 12px; }
