*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%}
.rd{position:fixed;inset:0;overflow-y:auto;-webkit-overflow-scrolling:touch;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;transition:background .3s,color .3s}
.rd.t-white{background:#ffffff;color:rgba(0,0,0,.9)}
.rd.t-sepia{background:#f5f1e8;color:rgba(0,0,0,.9)}
.rd.t-green{background:#cce8d0;color:#2f3b32}
.rd.t-dark{background:#1a1a1c;color:rgba(255,255,255,.72)}
.rd-wrap{max-width:640px;margin:0 auto;padding:64px 20px 104px}
.rd-h{font-size:21px;font-weight:600;margin:14px 0 22px;line-height:1.5}
.rd-p{font-size:var(--fs,18px);line-height:var(--lh,1.8);margin:0;text-indent:2em}
.rd-p + .rd-p{margin-top:14px}
.rd-tip{text-align:center;padding:40px 0 12px;font-size:13px;opacity:.4}
.rd-top{position:fixed;top:0;left:0;right:0;height:52px;z-index:70;transition:transform .25s ease;background:inherit;box-shadow:0 1px 0 rgba(128,128,128,.1)}
.rd-top.hide{transform:translateY(-100%)}
.rd-bar{max-width:640px;margin:0 auto;height:100%;display:flex;align-items:center;padding:0 8px}
.rd-ico{width:42px;height:42px;display:flex;align-items:center;justify-content:center;background:none;border:none;color:inherit;cursor:pointer;flex-shrink:0;text-decoration:none}
.rd-ico svg{width:23px;height:23px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}
.rd-top .nm{flex:1;text-align:center;font-size:15px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 6px;opacity:.9}
.rd-bot{position:fixed;bottom:0;left:0;right:0;z-index:70;transition:transform .25s ease;background:inherit;box-shadow:0 -1px 0 rgba(128,128,128,.1);padding-bottom:env(safe-area-inset-bottom)}
.rd-bot.hide{transform:translateY(100%)}
.rd-bar2{max-width:640px;margin:0 auto}
.rd-prog{display:flex;align-items:center;gap:11px;padding:13px 18px 9px}
.rd-prog button{flex:1;height:38px;border-radius:8px;background:rgba(128,128,128,.09);border:none;color:inherit;font-size:13px;cursor:pointer;opacity:.9}
.rd-prog button:disabled{opacity:.35}
.rd-prog .mid{flex:1.25;text-align:center;background:none;opacity:.5;font-size:12px;font-variant-numeric:tabular-nums}
.rd-tabs{display:flex;padding:2px 0 6px}
.rd-tab{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 0;font-size:11px;background:none;border:none;color:inherit;cursor:pointer;opacity:.85;text-decoration:none}
.rd-tab svg{width:22px;height:22px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}
.rd-mask{position:fixed;inset:0;z-index:75;display:none}
.rd-mask.show{display:block}
.rd-set{position:fixed;left:0;right:0;bottom:0;z-index:80;transform:translateY(101%);transition:transform .25s ease;background:inherit;box-shadow:0 -6px 24px rgba(0,0,0,.1)}
.rd-set.show{transform:translateY(0)}
.rd-set-in{max-width:640px;margin:0 auto;padding:20px 20px calc(env(safe-area-inset-bottom) + 20px)}
.rd-row{display:flex;align-items:center;gap:11px;margin-bottom:16px}
.rd-row:last-child{margin-bottom:0}
.rd-row .lb{width:32px;font-size:13px;opacity:.55;flex-shrink:0}
.rd-btn{flex:1;height:40px;border-radius:10px;border:1px solid rgba(128,128,128,.25);background:none;color:inherit;font-size:14px;cursor:pointer}
.rd-fsv{width:40px;text-align:center;font-size:15px;font-variant-numeric:tabular-nums}
.rd-themes{display:flex;gap:14px;flex:1}
.rd-dot{width:38px;height:38px;border-radius:50%;cursor:pointer;border:2.5px solid transparent;box-shadow:0 0 0 1px rgba(128,128,128,.2)}
.rd-dot.on{border-color:#c8102e;box-shadow:none}
.rd-prog button{display:inline-flex;align-items:center;justify-content:center;gap:5px}
.rd-shelf svg{width:15px;height:15px;stroke:currentColor;stroke-width:1.7;fill:none;flex-shrink:0}
.rd-shelf.on{color:#c8102e}
.rd-shelf.on svg{fill:#c8102e;stroke:#c8102e}
.rd-pct{font-size:12px;opacity:.5;min-width:44px;text-align:right;font-variant-numeric:tabular-nums;flex-shrink:0;padding-right:6px}
.rd-side{display:none;width:58px;position:fixed;right:28px;top:50%;transform:translateY(-50%);flex-direction:column;gap:10px;z-index:60}
.rd-sbtn{width:58px;height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:rgba(127,127,127,.1);border:1px solid rgba(127,127,127,.16);border-radius:10px;font-size:11px;color:inherit;cursor:pointer;text-decoration:none;transition:.15s}
.rd-sbtn:hover{background:rgba(127,127,127,.18)}
.rd-sbtn svg{width:20px;height:20px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}
.rd-sbtn.on{color:#c8102e}
.rd-sbtn.on svg{fill:#c8102e;stroke:#c8102e}
@media(min-width:1000px){
  .rd-top{transform:none!important}
  .rd-bot{display:none}
  .rd-side{display:flex}
}
@media(min-width:1000px){
  .rd-wrap{margin:72px auto 40px;padding:40px 48px 56px;border-radius:12px;box-shadow:0 1px 3px rgba(20,20,20,.05),0 14px 36px rgba(20,20,20,.05)}
  .t-white .rd-wrap{background:#ffffff}
  .t-sepia .rd-wrap{background:#fbf7ef;box-shadow:0 1px 3px rgba(90,70,40,.06),0 14px 36px rgba(90,70,40,.05)}
  .t-green .rd-wrap{background:#d9efdc}
  .t-dark .rd-wrap{background:#242426;box-shadow:0 1px 3px rgba(0,0,0,.3),0 14px 36px rgba(0,0,0,.3)}
}
@media(min-width:1000px){
  .rd-bar{max-width:none;padding:0 30px}
  .rd-side{left:calc(50% + 340px);right:auto}
}
@media(min-width:1000px){
  .rd-wrap{max-width:700px}
  .t-white .rd-wrap{box-shadow:0 1px 2px rgba(0,0,0,.04),0 4px 18px rgba(0,0,0,.04)}
  .t-sepia .rd-wrap{box-shadow:0 1px 2px rgba(90,70,40,.04),0 4px 18px rgba(90,70,40,.04)}
  .t-dark .rd-wrap{box-shadow:0 1px 2px rgba(0,0,0,.25),0 4px 18px rgba(0,0,0,.25)}
  .rd-sbtn{background:#fff;border:1px solid rgba(0,0,0,.06);box-shadow:0 1px 3px rgba(0,0,0,.05)}
  .rd-sbtn:hover{background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.1)}
  .t-dark .rd-sbtn{background:#2a2a2c;border-color:rgba(255,255,255,.08);box-shadow:none}
  .rd-side{left:calc(50% + 370px)}
}
/* === 照起点真实参数: 色块明暗区分(无圆角无阴影), 正文800, PC不缩进 === */
@media(min-width:1000px){
  .rd.t-white{background:#e6e6e6}
  .rd.t-sepia{background:#ebe6da}
  .rd.t-green{background:#bfe0c4}
  .rd.t-dark{background:#0e0e10}
  .rd-wrap{max-width:860px;margin:64px auto 40px;padding:36px 32px 60px;border-radius:0!important;box-shadow:none!important}
  .t-white .rd-wrap{background:#ffffff}
  .t-sepia .rd-wrap{background:#f5f1e8}
  .t-green .rd-wrap{background:#cce8d0}
  .t-dark .rd-wrap{background:#1a1a1c}
  .rd-p{text-indent:0}
  .rd-side{left:calc(50% + 452px)}
}
/* 正文区精确对齐起点: 800宽 padding32, 顶栏分割线 */
@media(min-width:1000px){
  .rd-wrap{max-width:800px;margin:0 auto;padding:88px 32px 60px}
  .rd-top{box-shadow:0 1px 0 rgba(0,0,0,.06)}
  .rd-side{left:calc(50% + 420px)}
}

/* ===== 目录抽屉 v606j ===== */
.rd-toc{position:fixed;inset:0;z-index:80;visibility:hidden}
.rd-toc.show{visibility:visible}
.rd-toc-mask{position:absolute;inset:0;background:rgba(0,0,0,.4);opacity:0;transition:opacity .25s}
.rd-toc.show .rd-toc-mask{opacity:1}
.rd-toc-panel{position:absolute;top:0;left:0;height:100%;width:340px;max-width:82%;background:#f5f1e8;transform:translateX(-100%);transition:transform .25s ease;display:flex;flex-direction:column;box-shadow:2px 0 14px rgba(0,0,0,.14)}
.rd-toc.show .rd-toc-panel{transform:translateX(0)}
.rd-toc-hd{display:flex;align-items:baseline;justify-content:space-between;padding:18px 20px 14px;border-bottom:1px solid rgba(0,0,0,.08);flex:0 0 auto}
.rd-toc-nm{font-size:16px;font-weight:600;color:rgba(0,0,0,.88);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:70%}
.rd-toc-ct{font-size:12px;color:rgba(0,0,0,.45);flex:0 0 auto}
.rd-toc-list{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:2px 0}
.rd-toc-i{display:block;padding:12px 20px;font-size:15px;line-height:1.4;color:rgba(0,0,0,.78);border-bottom:1px solid rgba(0,0,0,.05);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rd-toc-i:active{background:rgba(0,0,0,.04)}
.rd-toc-i.on{color:#c0392b;font-weight:600}
/* 主题适配 */
.t-white .rd-toc-panel{background:#fff}
.t-green .rd-toc-panel{background:#cce8d0}
.t-dark .rd-toc-panel{background:#1a1a1c;box-shadow:2px 0 14px rgba(0,0,0,.5)}
.t-dark .rd-toc-hd{border-color:rgba(255,255,255,.1)}
.t-dark .rd-toc-nm{color:rgba(255,255,255,.86)}
.t-dark .rd-toc-ct{color:rgba(255,255,255,.4)}
.t-dark .rd-toc-i{color:rgba(255,255,255,.66);border-color:rgba(255,255,255,.06)}
.t-dark .rd-toc-i.on{color:#e67e6b}
@media(min-width:1000px){.rd-toc-panel{width:360px}}

/* 章节末尾上/下章导航(PC端主要,移动端也显示) */
.rd-chap-nav{display:flex;justify-content:center;gap:14px;margin:40px auto 24px;max-width:760px;padding:0 20px;flex-wrap:wrap}
.rd-chap-nav a,.rd-chap-nav span{padding:10px 24px;border:1px solid currentColor;border-radius:8px;font-size:15px;text-decoration:none;color:inherit;opacity:.8;transition:opacity .15s,background .15s}
.rd-chap-nav a:hover{opacity:1;background:rgba(125,125,125,.12)}
.rd-chap-nav .dis{opacity:.32;cursor:default}
@media(min-width:1000px){.rd-tip{display:none}}
