/* 圣经阅读页 · 泥金手抄本版。只写覆盖样式，作用域 body.ms-reader（配合 body 上的 .ms-outer）。
   颜色、纸张、零件全部取自 css/manuscript.css 的 --ms-* 变量和 images/manuscript/ 素材；
   不改 .top-bar / .bottom-nav / .site-footer。bible.html 与 bible/ 下静态章节页共用。 */

/* ---------- 1. 作用域内把阅读器的深色变量换成羊皮纸墨色 ---------- */
body.ms-reader .b-layout,
body.ms-reader .b-verse-dialog{
  --reader-text:var(--ms-ink);--reader-muted:var(--ms-ink-2);--reader-line:var(--ms-rule);
  --gold-hi:var(--ms-gilt);--gold:var(--ms-gilt-hi);
  --msr-field:rgba(255,250,235,.6);--msr-paper:#f6e6cc;
  color:var(--ms-ink);
}
/* theme.css 的 body.utility-page{background:transparent} 会压过 .ms-outer，这里按同样的值补回外层背景 */
body.ms-reader{background:radial-gradient(ellipse 70% 56.25rem at 50% 32.5rem,rgba(196,150,90,.3),transparent 72%),linear-gradient(180deg,#33261a,#2b2014 56.25rem,#241a10)}
body.ms-reader .b-main{max-width:80rem;padding-inline:clamp(.625rem,2.2vw,2rem);background:none}
body.ms-reader .dy-backdrop__glow{background:linear-gradient(180deg,rgba(30,24,16,.12),transparent 20%,transparent 78%,#33261a 100%)}
body.ms-reader .b-layout *,body.ms-reader .b-layout *::before,body.ms-reader .b-layout *::after{box-sizing:border-box}

/* ---------- 2. 两张羊皮纸：左侧窄栏 + 右侧长书页 ---------- */
body.ms-reader .b-index,
body.ms-reader .b-reading{
  background:none;border-radius:0;border-style:solid;border-color:transparent;
  border-image:url(/images/manuscript/page-flat6.webp) 150 130 fill round;
  box-shadow:0 1.75rem 4.375rem -1.75rem rgba(12,6,0,.7),0 .375rem 1.125rem -.5rem rgba(12,6,0,.35);
  animation:msr-rise .9s var(--ms-ease) both;
}
body.ms-reader .b-reading{animation-delay:.08s}
@keyframes msr-rise{from{opacity:0;transform:translateY(1.125rem)}}
body.ms-reader .b-index{border-width:1.75rem 1.5rem;padding:0}
body.ms-reader .b-reading{
  --chapter-strip-gutter:clamp(2px,1.6vw,1.375rem);--reader-head-top:0px;
  max-width:none;border-width:clamp(2.75rem,6.4vw,5.75rem) clamp(2.375rem,5.6vw,5rem);
  padding:.25rem var(--chapter-strip-gutter) .75rem;
}
@media(min-width:981px){
  body.ms-reader .b-layout{grid-template-columns:16.75rem minmax(0,1fr);gap:1.375rem}
}

/* ---------- 3. 书页头：面包屑、复制/分享、泥金首字 + 章标题 ---------- */
body.ms-reader .b-reading-head{padding-bottom:0}
body.ms-reader .b-reading-head::before{display:none}
body.ms-reader .b-reading-head::after{content:"";display:block;width:min(30rem,88%);height:2.375rem;margin:1.125rem auto .375rem;background:url(/images/manuscript/divider.webp?v=3) center/contain no-repeat}
body.ms-reader .b-breadcrumb{color:var(--ms-ink-2);text-align:left}
body.ms-reader .b-breadcrumb a{color:var(--ms-ink-2);text-decoration-color:var(--ms-rule)}
body.ms-reader .b-breadcrumb a:hover{color:var(--ms-red)}
body.ms-reader .b-reading-tools{align-items:center;margin-bottom:1.375rem}
body.ms-reader .b-actions button{
  display:inline-flex;align-items:center;justify-content:center;gap:.375rem;min-height:2.375rem;padding:0 1rem;
  border:1px solid var(--ms-rule);border-radius:62.4375rem;background:var(--msr-field);color:var(--ms-ink-2);
  font-size:.9375rem;line-height:1;box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
  transition:background .5s var(--ms-ease),color .5s var(--ms-ease),transform .5s var(--ms-ease);
}
body.ms-reader #b-share svg{width:1rem;height:1rem;stroke-width:1.4}
body.ms-reader .b-reading #b-title{
  display:grid;grid-template-columns:auto minmax(0,auto);justify-content:center;align-items:center;column-gap:clamp(.75rem,1.8vw,1.5rem);
  margin:0;color:var(--ms-ink);font-weight:700;font-size:clamp(1.75rem,3.1vw,2.75rem);line-height:1.3;letter-spacing:.06em;
  text-shadow:0 1px 0 rgba(255,244,214,.9);
}
body.ms-reader .b-reading #b-title::before{
  content:"";grid-row:1/span 2;width:clamp(3.625rem,6.2vw,5.75rem);aspect-ratio:1;
  background:url(/images/manuscript/init-vine.webp?v=3) center/contain no-repeat;
  filter:drop-shadow(0 .25rem .5rem rgba(60,30,5,.3));
}
body.ms-reader #b-title .b-heading-name,body.ms-reader #b-title .b-heading-topic{display:block;grid-column:2;text-align:left}
body.ms-reader #b-title .b-heading-name{align-self:end}
body.ms-reader #b-title .b-heading-topic{align-self:start;margin-top:.2em;color:var(--ms-ink-2);font-size:.6em;font-weight:500;letter-spacing:.16em}

/* ---------- 4. 上一章 / 下一章：药丸 + 两侧金线 ---------- */
body.ms-reader .b-chapter-nav{
  background:linear-gradient(90deg,transparent,var(--msr-paper) var(--chapter-strip-gutter),var(--msr-paper) calc(100% - var(--chapter-strip-gutter)),transparent);border:0;padding-block:.75rem;margin-bottom:.625rem;gap:.875rem;
}
body.ms-reader .b-pagination{border:0;margin-top:.5rem;padding-top:0;gap:.875rem;align-items:center}
body.ms-reader :is(.b-chapter-nav,.b-pagination) :is(button,a:not(.b-current-chapter),span[aria-disabled]){
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:2.625rem;padding:0 1.25rem;
  border:1px solid var(--ms-rule);border-radius:62.4375rem;background:var(--msr-field);color:var(--ms-ink);
  font-size:1rem;line-height:1;white-space:nowrap;box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 2px .375rem -.1875rem rgba(90,55,10,.45);
  transition:background .5s var(--ms-ease),transform .5s var(--ms-ease),box-shadow .5s var(--ms-ease);
}
body.ms-reader :is(.b-chapter-nav,.b-pagination) :is(button:not(:disabled),a:not(.b-current-chapter)):hover{
  background:linear-gradient(180deg,#f3dc9a,var(--ms-gold));transform:translateY(-1px);
}
body.ms-reader :is(.b-chapter-nav,.b-pagination) :is(button,a):active{transform:scale(.98)}
body.ms-reader :is(.b-chapter-nav,.b-pagination) :is(#b-location,.b-current-chapter){
  display:flex;flex:1 1 0;align-items:center;justify-content:center;gap:.875rem;min-width:0;min-height:2.625rem;padding:0;border:0;background:none;
  color:var(--ms-ink);font-weight:600;letter-spacing:.06em;white-space:nowrap;
}
body.ms-reader :is(#b-location,.b-current-chapter)::before,
body.ms-reader :is(#b-location,.b-current-chapter)::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,var(--ms-rule))}
body.ms-reader :is(#b-location,.b-current-chapter)::after{transform:scaleX(-1)}
body.ms-reader .b-pagination:not(:has(.b-current-chapter)){justify-content:space-between}

/* ---------- 5. 章节导读：红字小标题 + 葡萄分隔线 ---------- */
body.ms-reader .b-chapter-overview{padding-top:.875rem}
body.ms-reader .b-reading .b-chapter-overview h2{
  display:flex;align-items:center;justify-content:center;gap:1rem;margin:0 0 .75rem;
  color:var(--ms-red);font-weight:600;font-size:clamp(1.375rem,2vw,1.6875rem);letter-spacing:.14em;
}
body.ms-reader .b-chapter-overview h2::before,
body.ms-reader .b-chapter-overview h2::after{content:"";width:clamp(2.25rem,7vw,5.25rem);height:1px;background:linear-gradient(90deg,transparent,var(--ms-rule))}
body.ms-reader .b-chapter-overview h2::after{transform:scaleX(-1)}
body.ms-reader .b-reading .b-chapter-overview h3{margin:1.375rem 0 .625rem;text-align:center;color:var(--ms-red);font-weight:600;letter-spacing:.08em}
body.ms-reader .b-chapter-overview p{color:var(--ms-ink);margin-bottom:.625rem}
/* 导读段落里的经文出处允许跟着正文折行，免得上一行被两端对齐拉散 */
body.ms-reader .b-chapter-overview p a.fit-line{display:inline!important;white-space:normal!important;text-wrap:wrap!important}
body.ms-reader .b-reading :is(.b-chapter-overview,.b-lesson-section,.b-unguided,.b-results) a{color:var(--ms-gilt);text-decoration:underline;text-decoration-color:var(--ms-rule);text-underline-offset:.25rem}
body.ms-reader .b-reading :is(.b-chapter-overview,.b-lesson-section,.b-unguided,.b-results) a:hover{color:var(--ms-red)}
body.ms-reader .b-chapter-overview::after,
body.ms-reader #b-content::after{content:"";display:block;width:min(35rem,90%);height:2.75rem;margin:1.625rem auto 1.375rem;background:url(/images/manuscript/divider.webp?v=3) center/contain no-repeat}

/* ---------- 6. 经文：红色节号 + 深棕正文 ---------- */
body.ms-reader .b-verses{color:var(--ms-ink)}
body.ms-reader .b-verses>p.b-verse{grid-template-columns:2em minmax(0,1fr);column-gap:.7em;margin:0 0 .45em;padding:2px .375rem 2px 0;border-radius:.5rem;transition:background .6s var(--ms-ease)}
body.ms-reader .b-verse sup{color:var(--ms-red);font-family:var(--ms-serif);font-weight:600;font-size:.82em;text-align:right;font-variant-numeric:lining-nums}
body.ms-reader .b-verse.target{background:rgba(196,156,92,.3);box-shadow:0 0 0 1px var(--ms-rule)}
body.ms-reader #b-content>p{color:var(--ms-ink-2);text-align:center}

/* 搜索结果（bible.html?q=…） */
body.ms-reader .b-results li{border-bottom:1px solid var(--ms-rule)}
body.ms-reader .b-results p{color:var(--ms-ink)}
/* fit-line.css 会把单行段落强制居中，检索结果统一靠左 */
html body.ms-reader .b-reading .b-results li p.is-single-line{text-align:left!important}
body.ms-reader mark{background:rgba(196,156,92,.45);color:inherit;border-radius:.1875rem;padding:0 .1em}
body.ms-reader .b-more,body.ms-reader #b-retry{border:1px solid var(--ms-rule);border-radius:62.4375rem;background:var(--msr-field);color:var(--ms-ink);padding:0 1.5rem}

/* ---------- 7. 侧栏 ---------- */
body.ms-reader .b-index{color:var(--ms-ink)}
body.ms-reader .b-index .b-progress{background:none;border:0;padding:.375rem .25rem .25rem}
body.ms-reader .b-index .b-progress::before{content:"";display:block;width:5.25rem;aspect-ratio:1;margin:0 auto .625rem;background:url(/images/manuscript/init-cross.webp?v=3) center/contain no-repeat;filter:drop-shadow(0 .25rem .5rem rgba(60,30,5,.3))}
body.ms-reader .b-progress .b-progress-title{color:var(--ms-ink-2);font-size:.9375rem;letter-spacing:.16em;font-weight:600}
body.ms-reader .b-progress #b-progress-location{color:var(--ms-ink);font-size:1.1875rem;font-weight:600}
body.ms-reader .b-progress .b-progress-state{justify-content:flex-start;color:var(--ms-ink-3)}
body.ms-reader .b-progress .b-progress-note{color:var(--ms-ink-3)}
body.ms-reader .b-index-controls{padding:0 2px .375rem;scrollbar-width:thin;scrollbar-color:var(--ms-rule) transparent}
/* 小节之间的葡萄线 */
body.ms-reader .rp-sidebar,
body.ms-reader .b-reader-settings{border:0;margin:0;padding:0}
body.ms-reader .rp-sidebar::before,
body.ms-reader .b-reader-settings::before{content:"";display:block;height:1.5rem;margin:.75rem 0;background:url(/images/manuscript/divider.webp?v=3) center/contain no-repeat}
body.ms-reader .rp-sidebar{color:var(--ms-ink);text-align:left}
body.ms-reader .rp-sidebar .rp-sidebar-header{display:block}
body.ms-reader .rp-sidebar .rp-summary-label{display:flex;justify-content:flex-start;align-items:center;gap:.5rem}
body.ms-reader .rp-sidebar .rp-label{margin:0;color:var(--ms-ink-2);font-weight:600;letter-spacing:.08em}
body.ms-reader .rp-sidebar .rp-badge{color:var(--ms-red)}
body.ms-reader .rp-sidebar .rp-compact{display:block;min-height:0;padding:.25rem 0 .625rem;color:var(--ms-ink);font-size:1.1875rem;font-weight:600;text-decoration:none}
body.ms-reader .b-index .rp-start,
body.ms-reader .b-index .b-progress .b-resume{
  min-height:3rem;border:0;border-radius:0;background:url(/images/manuscript/btn.webp) center/100% 100% no-repeat;
  color:#4a2c06;font-weight:600;font-size:1rem;letter-spacing:.14em;text-shadow:0 1px 0 rgba(255,240,190,.9);
  filter:drop-shadow(0 .25rem .375rem rgba(70,35,0,.3));transition:transform .5s var(--ms-ease),filter .5s var(--ms-ease);
}
body.ms-reader .b-index .rp-start:hover,
body.ms-reader .b-index .b-progress .b-resume:hover{background:url(/images/manuscript/btn.webp) center/100% 100% no-repeat;filter:drop-shadow(0 .375rem .5625rem rgba(70,35,0,.36)) brightness(1.06);transform:translateY(-1px)}
body.ms-reader .b-index .rp-start:active,body.ms-reader .b-index .b-resume:active{transform:scale(.98)}
body.ms-reader .rp-all,
body.ms-reader .b-directory-links>a{
  min-height:2.625rem;margin-top:.625rem;border:1px solid var(--ms-rule);border-radius:62.4375rem;background:var(--msr-field);color:var(--ms-ink-2);
  font-size:.9375rem;letter-spacing:.1em;box-shadow:inset 0 1px 0 rgba(255,255,255,.6);transition:background .5s var(--ms-ease),color .5s var(--ms-ease);
}
body.ms-reader .rp-all:hover,body.ms-reader .b-directory-links>a:hover{background:rgba(222,196,142,.45);color:var(--ms-ink)}
/* 设置：折叠标题、下拉框、字号字体 */
body.ms-reader .b-index summary{color:var(--ms-ink);font-size:1rem;font-weight:600;letter-spacing:.06em;min-height:2.5rem;padding:.375rem 0}
body.ms-reader .b-index summary::marker{color:var(--ms-gilt-hi)}
body.ms-reader .b-selectors{gap:.625rem}
body.ms-reader .b-selectors label,
body.ms-reader .b-font-tools>span:first-child,
body.ms-reader .b-type-tools>span{color:var(--ms-ink-2);font-size:.875rem;letter-spacing:.1em}
body.ms-reader .b-index select,
body.ms-reader .b-search input{
  background-color:var(--msr-field)!important;color:var(--ms-ink);border:1px solid var(--ms-rule);border-radius:.625rem;
  font-size:1rem;min-height:2.625rem;padding-block:.375rem;box-shadow:inset 0 1px .1875rem rgba(120,80,20,.14);
  transition:border-color .5s var(--ms-ease),background-color .5s var(--ms-ease);
}
body.ms-reader .b-index select:focus-visible,body.ms-reader .b-search input:focus-visible{outline:0;border-color:var(--ms-gilt-hi);background-color:rgba(255,252,242,.85)!important}
body.ms-reader .b-search input::placeholder{color:var(--ms-ink-3)}
body.ms-reader .b-appearance-settings,body.ms-reader .b-find,body.ms-reader .b-static-catalog{border-top:1px solid var(--ms-rule);margin-top:.75rem;padding-top:.25rem}
body.ms-reader .b-index .b-font-tools,
body.ms-reader .b-index .b-type-tools{grid-template-columns:repeat(4,minmax(0,1fr));gap:.3125rem;margin:2px 0 .75rem}
body.ms-reader .b-index :is(.b-font-tools,.b-type-tools) button,
body.ms-reader .b-find .b-topics button{
  min-width:0;min-height:2.375rem;padding:0 2px;border:1px solid var(--ms-rule);border-radius:62.4375rem;background:var(--msr-field);color:var(--ms-ink-2);
  font-size:.9375rem;font-weight:500;line-height:1;box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
  transition:background .5s var(--ms-ease),color .5s var(--ms-ease),border-color .5s var(--ms-ease);
}
body.ms-reader .b-index :is(.b-font-tools,.b-type-tools) button:hover{background:rgba(222,196,142,.4)}
body.ms-reader .b-index :is(.b-font-tools,.b-type-tools) button[aria-pressed="true"]{background:linear-gradient(180deg,#e9c66e,#c9983a);color:#3a2206;border-color:#a9781f;font-weight:700}
body.ms-reader .b-font-status,body.ms-reader .b-find .b-help{color:var(--ms-ink-3);font-size:.875rem}
body.ms-reader .b-find .b-search button{
  min-height:2.75rem;border:1px solid #a9781f;border-radius:62.4375rem;background:linear-gradient(180deg,#e9c66e,#c9983a);color:#3a2206;font-size:1rem;font-weight:600;letter-spacing:.12em;
}
body.ms-reader .b-static-catalog>a{color:var(--ms-gilt);font-size:1rem;text-decoration:underline;text-decoration-color:var(--ms-rule);text-underline-offset:.25rem}
body.ms-reader .b-catalog-grid a{border:1px solid var(--ms-rule);border-radius:.625rem;background:var(--msr-field);color:var(--ms-ink);transition:background .5s var(--ms-ease)}
body.ms-reader .b-catalog-grid a:hover{background:rgba(222,196,142,.45)}
body.ms-reader .b-catalog-grid small{color:var(--ms-ink-3)}
/* 侧栏底部插图（素材图 art-diary），只在桌面宽侧栏里出现 */
@media(min-width:981px){
  /* 侧栏内部滚动时，上沿淡出，不硬切文字 */
  body.ms-reader .b-index-controls{-webkit-mask-image:linear-gradient(transparent,#000 .875rem);mask-image:linear-gradient(transparent,#000 .875rem);padding-top:.375rem}
  body.ms-reader .b-index-controls::after{
    content:"";display:block;aspect-ratio:5/4;margin:1.125rem .375rem .5rem;border-radius:.875rem;
    background:url(/images/manuscript/art-diary.webp) 38% center/cover no-repeat;
    box-shadow:0 0 0 1.5px var(--ms-gold),0 0 0 .25rem var(--ms-gilt-hi),0 0 0 .3438rem var(--ms-gold),0 .75rem 1.375rem -.625rem rgba(60,30,5,.6);
  }
}

/* ---------- 8. 经文弹窗 ---------- */
body.ms-reader .b-verse-dialog{background:var(--ms-paper);border:1px solid var(--ms-gilt-hi);border-radius:1rem;box-shadow:0 0 0 .25rem rgba(196,156,92,.35),0 1.875rem 5rem -1.25rem rgba(12,6,0,.7)}
body.ms-reader .b-verse-dialog::backdrop{background:rgba(30,20,10,.6)}
body.ms-reader .b-verse-dialog-head::before{display:none}
body.ms-reader .b-verse-dialog-head h2{color:var(--ms-ink)}
body.ms-reader .b-verse-dialog-close{background:var(--msr-field);color:var(--ms-ink-2);border-radius:62.4375rem;padding-inline:1.125rem}
body.ms-reader .b-verse-dialog-content h3{color:var(--ms-red)}
body.ms-reader .b-popup-verse sup{color:var(--ms-red)}

/* ---------- 9. 平板和手机：侧栏折到书页上面 ---------- */
@media(max-width:980px){
  body.ms-reader .b-index.b-index--progress,body.ms-reader .b-index{padding:2px .25rem .375rem;border-width:1.625rem 1.375rem}
  body.ms-reader .b-index .b-progress::before,
  body.ms-reader .rp-sidebar::before{display:none}
  body.ms-reader .b-index .b-progress{padding:0 0 .25rem}
  body.ms-reader .rp-sidebar{padding:.625rem 0 0;border-top:1px solid var(--ms-rule)}
  body.ms-reader .b-reader-settings{grid-column:1/-1}
  body.ms-reader .b-reader-settings::before{margin:2px 0}
}
@media(max-width:640px){
  body.ms-reader .b-main{padding-inline:.5rem}
  body.ms-reader .b-layout{gap:.875rem}
  body.ms-reader .b-index.b-index--progress,body.ms-reader .b-index{border-width:1.375rem 1.125rem}
  body.ms-reader .b-reading{--chapter-strip-gutter:0px;border-width:1.4375rem 1.25rem;padding:0 0 .5rem}
  body.ms-reader .b-reading-tools{margin-bottom:.875rem}
  body.ms-reader .b-reading #b-title{column-gap:.625rem;font-size:1.5625rem;letter-spacing:.02em}
  body.ms-reader .b-reading #b-title::before{width:3.25rem}
  body.ms-reader :is(.b-chapter-nav,.b-pagination) :is(button,a:not(.b-current-chapter),span[aria-disabled]){min-height:2.5rem;padding:0 .75rem;font-size:.9375rem}
  body.ms-reader :is(.b-chapter-nav,.b-pagination){gap:.5rem}
  body.ms-reader :is(#b-location,.b-current-chapter){gap:.5rem;letter-spacing:0}
  body.ms-reader .b-verses>p.b-verse{grid-template-columns:1.6em minmax(0,1fr);column-gap:.5em;padding-right:0}
  body.ms-reader .b-layout>.b-actions button{background:var(--msr-field);border-color:var(--ms-rule);min-height:2.75rem}
}
@media(prefers-reduced-motion:reduce){
  body.ms-reader .b-index,body.ms-reader .b-reading{animation:none}
  body.ms-reader .b-layout *{transition:none!important}
}
body.ms-reader .b-find .b-search input{font-size:.9375rem}
@media(max-width:980px){body.ms-reader .b-find>summary{border:0;border-radius:0;padding:.375rem 0}}

/* ---------- 10. 配合 manuscript-chrome.css：顶栏下沿多出约 18px 葡萄藤花边，吸顶元素让开 ---------- */
body.ms-reader.ms-chrome .b-chapter-nav{top:calc(var(--reader-header-height,4.75rem) + 1rem)}
body.ms-reader.ms-chrome #b-reading,body.ms-reader.ms-chrome .b-verse{scroll-margin-top:calc(var(--reader-header-height,4.75rem) + 8.125rem)}
@media(min-width:981px){body.ms-reader.ms-chrome .b-index{top:calc(var(--reader-header-height,4.75rem) + 1.875rem)}}

/* ───────── 细节修正（detail-fix） ───────── */
/* 复制按钮补细线图标，与分享一致 */
body.ms-reader #b-copy{display:inline-flex;align-items:center;gap:.375rem}
body.ms-reader #b-copy::before{content:"";width:1rem;height:1rem;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Cpath d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Cpath d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2'/%3E%3C/svg%3E") center/contain no-repeat}

/* 宽屏修正：侧栏窄(≈240)，边宽 28/24 时顶边只一个单元被拉 1.4 倍；只改画框用的 border-image-width，不动布局 */
@media (min-width:900px){html body.ms-reader .b-index,html body.reader-page.ms-study .b-index{border-image-width:2.25rem 1.9375rem!important}}

/* ───────── 第三轮：排版 / 粘顶条 / 侧栏 / 手机顺序 ───────── */
/* 经文：约 20px，行距紧凑，节间 ~16px */
html body.reader-page.ms-reader .b-verses{gap:0;display:block}
html body.reader-page.ms-reader .b-verses>p.b-verse{font-size:1.25rem;line-height:1.75;margin:0 0 .625rem;padding:0 .375rem 0 0;grid-template-columns:2.2em minmax(0,1fr);column-gap:.6em}
html body.reader-page.ms-reader .b-verse sup{font-size:.78em;line-height:1.9}

/* 粘顶章节条：羊皮纸实底 + 底部细金线 + 淡阴影 */
html body.reader-page.ms-reader .b-chapter-nav{
  background:linear-gradient(90deg,transparent,#f7e9d4 var(--chapter-strip-gutter),#f7e9d4 calc(100% - var(--chapter-strip-gutter)),transparent);
  border:0;box-shadow:none;z-index:30;isolation:isolate;
  top:calc(var(--reader-header-height,6.25rem) - 1px);
}
/* 底部细金线 + 12px 羊皮纸渐隐 */
html body.reader-page.ms-reader .b-chapter-nav::before{content:"";position:absolute;left:var(--chapter-strip-gutter);right:var(--chapter-strip-gutter);bottom:0;height:1px;background:var(--ms-gilt-hi);pointer-events:none}
html body.reader-page.ms-reader .b-chapter-nav::after{content:"";position:absolute;left:var(--chapter-strip-gutter);right:var(--chapter-strip-gutter);top:100%;height:1.375rem;z-index:1;background:linear-gradient(#f7e9d4 0,#f7e9d4 55%,rgba(247,233,212,.55) 78%,rgba(247,233,212,0));pointer-events:none}

/* 手机：正文排最前，侧栏/设置沉到正文后；章节条压成一行 */
@media(max-width:980px){
  html body.reader-page.ms-reader .b-layout{display:flex;flex-direction:column}
  html body.reader-page.ms-reader .b-layout>.b-reading{order:-1}
  html body.reader-page.ms-reader .b-layout>.b-index{order:5;width:100%;align-self:stretch;position:static;max-height:none;overflow:visible}
  html body.reader-page.ms-reader .b-layout>:not(.b-reading):not(.b-index){order:6}
  html body.reader-page.ms-reader .b-chapter-nav{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.375rem;padding:.375rem 0;margin-bottom:.5rem;min-height:0;top:calc(var(--reader-header-height,4.5rem) - 1px)}
  html body.reader-page.ms-reader .b-chapter-nav>:is(a,button,span){min-height:2.25rem;padding:0 .75rem;font-size:.875rem}
  html body.reader-page.ms-reader .b-chapter-nav>:is(.b-current-chapter,#b-location){grid-column:2;grid-row:1;min-height:2.25rem;padding:0;font-size:.9375rem}
  html body.reader-page.ms-reader .b-chapter-nav>:is(.b-current-chapter,#b-location)::before,
  html body.reader-page.ms-reader .b-chapter-nav>:is(.b-current-chapter,#b-location)::after{display:none}
  html body.reader-page.ms-reader .b-chapter-nav>[rel=prev]{grid-column:1;grid-row:1}
  html body.reader-page.ms-reader .b-chapter-nav>[rel=next]{grid-column:3;grid-row:1}
  html body.reader-page.ms-reader .b-verses>p.b-verse{font-size:1.1875rem;margin-bottom:.5rem}
}

@media(max-width:640px){
  html body.reader-page.ms-reader .b-verses>p.b-verse{text-align:left;text-justify:auto}
  html body.reader-page.ms-reader .b-reading :is(.b-chapter-overview,.b-lesson-section) p{text-align:left}
  /* 页头标题区：羊皮纸半透明底板，浅色/深色背景都看得清 */
  html body.ms-chrome.ms-chrome.reader-page.ms-reader .b-intro{
    box-sizing:border-box;width:calc(100% - 2rem);margin:1.125rem auto;padding:1rem .875rem .875rem;border:1px solid var(--ms-gilt-hi);border-radius:.875rem;
    background:rgba(246,232,196,.88);-webkit-backdrop-filter:blur(.375rem);backdrop-filter:blur(.375rem);
    box-shadow:inset 0 0 0 .1875rem rgba(255,246,214,.6),0 .875rem 1.875rem -.875rem rgba(60,36,6,.55);
  }
  html body.ms-chrome.ms-chrome.reader-page.ms-reader .b-intro .b-title-lettering{color:var(--ms-gilt)!important;-webkit-text-fill-color:var(--ms-gilt)!important;text-shadow:0 1px 0 rgba(255,246,214,.9)!important}
  html body.ms-chrome.ms-chrome.reader-page.ms-reader .b-intro p{color:var(--ms-ink)!important;-webkit-text-fill-color:var(--ms-ink)!important;text-shadow:none!important}
  html body.ms-chrome.ms-chrome.reader-page.ms-reader .b-intro-ornament{color:var(--ms-gilt-hi)}
}

/* 宽屏修正：侧栏真边宽 36/30，与画框边高一致（单元数 1，顶边比≈1.02） */
@media (min-width:900px){html body.ms-reader .b-index,html body.ms-reader .b-index.b-index--progress{border-width:2.25rem 1.875rem!important;border-image-width:2.25rem 1.875rem!important}}

/* 花框统一：阅读页正文 = 全站主框；侧栏 = 小卡一档；整体宽度上限 1320 */
html body.ms-reader .b-reading{border-width:var(--ms-frame-y) var(--ms-frame-x)!important;border-image-width:var(--ms-frame-y) var(--ms-frame-x)!important}
html body.ms-reader .b-index,html body.ms-reader .b-index.b-index--progress{border-width:var(--ms-frame-sm-y) var(--ms-frame-sm-x)!important;border-image-width:var(--ms-frame-sm-y) var(--ms-frame-sm-x)!important}
html body.ms-reader .b-main{max-width:calc(var(--ms-page-max) + 2 * clamp(.625rem,2.2vw,2rem))}

/* 低高度窗口：侧栏花框/徽章/间距收小，让下面的工具区拿回高度（AGENTS.md v298） */
@media (min-width:981px) and (max-height:640px){
  html body.reader-page:is(.ms-study,.ms-reader) .b-index{border-width:1.125rem 1rem!important;border-image-width:1.125rem 1rem!important}
  html body.reader-page:is(.ms-study,.ms-reader) .b-index .b-progress{padding-top:0;padding-bottom:0}
  html body.reader-page:is(.ms-study,.ms-reader) .b-index .b-progress::after{display:none}
  html body.reader-page:is(.ms-study,.ms-reader) .b-index :is(.b-progress-state,.b-progress-note){display:none}
  html body.reader-page:is(.ms-study,.ms-reader) .b-index .b-progress-copy p{font-size:1rem;line-height:1.3;margin:2px 0}
  html body.reader-page:is(.ms-study,.ms-reader) .b-index .b-progress-chapter{font-size:1rem}
  html body.reader-page:is(.ms-study,.ms-reader) .b-index .b-progress :is(.b-resume,.rp-start){min-height:2.125rem;margin-top:.375rem;font-size:.875rem}
  html body.reader-page:is(.ms-study,.ms-reader) .b-index .b-progress-title{margin:0;font-size:.875rem}
}

/* ========== 左右栏等高 11-15（≥981px）：整列花框改由 .b-layout::before 画满行高，.b-index 自己无框，仍 sticky、内部滚动；删本段即回退 ==========
   Edit 时只追加；study 同名段在 manuscript-study.css */
@media(min-width:981px){
  html body.reader-page.ms-reader .b-layout{position:relative}
  html body.reader-page.ms-reader .b-layout::before{content:"";grid-column:1;grid-row:1;align-self:stretch;pointer-events:none;box-sizing:border-box;border-style:solid;border-width:2.25rem 1.9375rem;border-image:url(/images/manuscript/page-flat6.webp) 150 130 fill round;border-image-width:2.25rem 1.9375rem;box-shadow:0 1.75rem 4.375rem -1.75rem rgba(12,6,0,.7),0 .375rem 1.125rem -.5rem rgba(12,6,0,.35)}
  html body.reader-page.ms-reader .b-layout>.b-index{grid-column:1;grid-row:1;border-image:none!important;border-color:transparent!important;box-shadow:none!important;background:none!important}
  html body.reader-page.ms-reader .b-layout>.b-reading{grid-column:2;grid-row:1}
}
/* ========== /左右栏等高 ========== */

/* 搜索/复制等状态提示：原来是浅金字压在羊皮纸底上，几乎看不见 */
html:not(.ms-bg-dark) body.ms-reader.ms-chrome #b-status.b-status{color:#5a3008!important;text-align:center}
