/* 来源：paper-reader 227e4de `site/r/css/lib.css`，改动见 SOURCE.md
   书架、设置页、配对页（DESIGN §3、§11；原型 o01、o32、v-m0-shelf、v-m0-settings、d01）。颜色只用 tokens.css 的变量。 */

/* =====================================================================
   书架（DESIGN §3.1、§3.2）。页头（Q7）：data-mast="a" 宋体大字“书架”加 3px 粗线；"b" 小号字标加粗细双线
   ===================================================================== */
.shelf { padding-bottom: 48px; }
.sh-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 64px; }
/* “上传 PDF”、≡ 不被挤窄（系统字号 200% 时字会冲出胶囊、压到 ≡ 上；审查 BL4）：放不下就整组换到下一行，右对齐 */
.sh-top .btn-up, .sh-top .sh-set { flex: none; }
.sh-top .btn-up { margin-left: auto; }
.sh-t { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; letter-spacing: .08em; white-space: nowrap; }
.sh-rule { height: 3px; background: var(--rule-ink); }
html[data-mast="b"] .sh-top { min-height: 56px; }
html[data-mast="b"] .sh-t { font-family: var(--sans); font-size: .8125rem; letter-spacing: .22em; font-weight: 600; }
html[data-mast="b"] .sh-rule { box-shadow: 0 3px 0 var(--bg), 0 4px 0 var(--rule-ink); margin-bottom: 4px; }
.sh-empty { margin-top: 28px; color: var(--ink2); font-size: .9375rem; }
.sh-err { margin-top: 10px; font-size: .8125rem; line-height: 1.6; color: var(--ink); font-weight: 600; }
.row { position: relative; border-top: 1px solid var(--rule); }
.sh-list > .row:first-child, .sh-list > p + .row { border-top: 0; }
.bk { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.row-a { display: flex; flex-direction: column; gap: 3px; padding: 13px 0 14px; min-height: 64px; }
.row-a:active { background: var(--sel); }
.row .ti { font-family: var(--latin-serif), var(--serif); font-size: 1.0625rem; line-height: 1.5; overflow-wrap: anywhere; }
.row .ti:not(:lang(en)) { font-family: var(--serif); }
.row .mt { font-size: .8125rem; line-height: 1.5; color: var(--ink2); }
.row .pr { font-size: .8125rem; line-height: 1.5; color: var(--ink); }
.row .pr.strong { font-weight: 600; }
/* ⋯：自身 48×48，在格子的右栏里（不用负边距贴边，规则 2） */
.row-more { margin-top: 8px; }
/* 页头的“上传 PDF”：描边胶囊，自身 ≥48px 高 */
.btn-up { min-height: var(--tap); min-width: var(--tap); padding: 0 16px 0 12px; border-radius: var(--r-full); border: 1px solid var(--rule-ink); display: inline-flex; align-items: center; gap: 6px; font-size: .9375rem; font-weight: 600; white-space: nowrap; color: var(--ink); }
.btn-up svg { width: 20px; height: 20px; fill: currentColor; }
.btn-line.sm { padding: 0 12px; font-size: .8125rem; }
/* 内屏、横持：同一张列表，限宽 40em 居中（.wrap 已经限宽） */

/* 上传行（DESIGN §3.3；原型 o02）：名字一行、状态一行，按钮在右边；出错的字加粗（状态都写成字，不只靠颜色）。
   Q6：只有字（data-upbar="1" 时 lib/shelf.js 才画 .up-bar 细条） */
.up { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px 0 11px; }
.up-n { font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.up-n:lang(en) { font-family: var(--latin-serif); }
.up-s { font-size: .8125rem; line-height: 1.5; color: var(--ink2); font-variant-numeric: tabular-nums; }
.up.bad .up-s, .up[data-st="net"] .up-s { color: var(--ink); font-weight: 600; }
.up-b { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.up-bar { height: 2px; margin-top: 6px; background: var(--rule); }
.up-bar span { display: block; height: 100%; background: var(--ink2); }
/* 上次没传完：字一行、按钮一行（规则 1） */
.up-resume { padding: 10px 0 2px; font-size: .8125rem; line-height: 1.5; color: var(--ink2); }
.up-resume .ur-t span:lang(en) { font-family: var(--latin-serif); }
.up-resume .ur-b { display: flex; }

/* 一本书的 ⋯ 浮层（原型 o04、o05）：书名一行、各项一行；移出书架再点一次确认 */
.sh-book { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.5; padding: 10px 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.sh-book:lang(en) { font-family: var(--latin-serif); }
.sh-item.danger { color: var(--acc); font-weight: 600; }
.del-t { margin: 12px 0 16px; font-size: .9375rem; line-height: 1.7; }
.del-b { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btn-fill.danger { background: var(--acc); color: var(--on-acc); }
.ren-f { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }

/* =====================================================================
   设置页（DESIGN §11）：不写解释句（原型规则 11）
   ===================================================================== */
.set { margin-top: 18px; }
.set h3 { font-size: .8125rem; color: var(--ink2); font-weight: 500; margin-bottom: 4px; letter-spacing: .06em; }
.set .sh-row:last-of-type { border-bottom: 0; }
.set-val { margin-top: 6px; font-size: .9375rem; line-height: 1.6; }
.set-notice { color: var(--ink); }
.dev-list li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.dev-list small { color: var(--ink2); font-size: .75rem; }
.set-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.set-res { margin-top: 10px; font-size: .9375rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
.set-res.bad, .pair-res.bad { font-weight: 600; }

/* =====================================================================
   配对页（ARCHITECTURE §11：8 位码）
   ===================================================================== */
.pair-hint { color: var(--ink2); font-size: .875rem; }
.pair-f { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; max-width: 24rem; }
.pair-l { margin-top: 8px; font-size: .8125rem; color: var(--ink2); }
.pair-row { display: flex; gap: 8px; }
.pair-row .in { flex: 1; min-width: 0; }
.in-code { font-family: ui-monospace, "DejaVu Sans Mono", monospace; letter-spacing: .12em; text-transform: uppercase; font-size: 1.25rem; }
.pair-row .btn-fill { margin-top: 10px; }
.pair-res { min-height: 1.6em; margin-top: 8px; font-size: .9375rem; line-height: 1.6; }

/* 阅读页里取不到这本书时的几行字（read/index.js message） */
.read-msgs { padding-top: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.read-msg { font-size: .9375rem; line-height: 1.6; }
