/* 微信读书式沉浸阅读增强（仅手机端文章页） */
:root {
  --reader-font: 18px;
  --reader-line: 1.9;
  --reader-bg: #f4ecdb;
  --reader-fg: #3a3227;
}
.reader-progress {
  display: none;
  position: fixed; left: 0; top: 0; height: 3px; width: 100%;
  background: rgba(0,0,0,.06); z-index: 60;
}
.reader-progress span { display: block; height: 100%; width: 0; background: var(--accent, #9b2f38); transition: width .1s linear; }
.reader-fab {
  display: none;
  position: fixed; right: 16px; bottom: 22px; z-index: 61;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: var(--accent, #9b2f38); color: #fff; font-size: 17px; letter-spacing: .05em;
  box-shadow: 0 6px 20px rgba(0,0,0,.22); cursor: pointer;
}
.reader-panel {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 62;
  background: rgba(28,26,24,.96); color: #f2ede3;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 24px rgba(0,0,0,.25);
}
.reader-panel-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reader-panel-row + .reader-panel-row { margin-top: 10px; }
.reader-panel button {
  min-width: 46px; padding: 7px 10px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06);
  color: #f2ede3; font-size: 13px; cursor: pointer;
}
.reader-panel button:active { background: rgba(255,255,255,.18); }
.reader-panel .reader-label { font-size: 12px; opacity: .7; }
.reader-panel .reader-sep { width: 1px; height: 20px; background: rgba(255,255,255,.2); }
.reader-panel .reader-exit { margin-left: auto; border-color: var(--accent, #9b2f38); }
.reader-bg-btn { width: 34px; min-width: 34px; height: 34px; border-radius: 50% !important; padding: 0 !important; }
.reader-bg-btn.active { outline: 2px solid #f2ede3; outline-offset: 2px; }
.reader-bg-paper { background: #f4ecdb !important; }
.reader-bg-white { background: #fff !important; }
.reader-bg-green { background: #dfe9d6 !important; }
.reader-bg-night { background: #1b1a18 !important; }
.reader-panel-hidden { display: none !important; }

@media (max-width: 820px) {
  .reader-progress, .reader-fab, .reader-panel { display: block; }
  body.reader-on .site-header,
  body.reader-on .site-footer,
  body.reader-on .comments,
  body.reader-on .post-nav,
  body.reader-on .article-meta,
  body.reader-on .article-lead,
  body.reader-on .back-link { display: none !important; }
  body.reader-on .main-content { padding: 0 !important; }
  body.reader-on .article-head { padding: 28px 18px 18px !important; border: none !important; margin: 0 !important; }
  body.reader-on .article-head h1 { font-size: 22px !important; }
  body.reader-on .prose {
    font-size: var(--reader-font) !important;
    line-height: var(--reader-line) !important;
    color: var(--reader-fg) !important;
  }
  body.reader-on { background: var(--reader-bg) !important; }
  body.reader-on .wrap { color: var(--reader-fg); }
  body.reader-on .article-end { color: var(--reader-fg); opacity: .5; }
  body.reader-night .reader-panel { background: rgba(20,19,18,.97); }
}
