:root {
  --bg: #fffefd;
  --ink: #24211e;
  --muted: #9f9a92;
  --muted-2: #c8c4bd;
  --line: #eee9e1;
  --panel: rgba(255, 255, 255, .94);
  --active: #1f1c19;
  --blue: #1f5aa6;
  --blue-dark: #153f7a;
  --reader-font-scale: 1;
  --shadow: 0 18px 55px rgba(36, 31, 25, .12);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body:before,
body:after {
  content: "";
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 0;
  transition: opacity .18s ease;
  z-index: 18;
}

body:before {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(255, 254, 253, .88) 45%, rgba(255, 254, 253, 0) 100%);
  height: 118px;
  top: 0;
}

body:after {
  background: linear-gradient(0deg, var(--bg) 0%, rgba(255, 254, 253, .88) 45%, rgba(255, 254, 253, 0) 100%);
  bottom: 0;
  height: 126px;
}

body.edgeFade:before,
body.edgeFade:after { opacity: 1; }

body[data-reader-size="small"] { --reader-font-scale: .92; }
body[data-reader-size="normal"] { --reader-font-scale: 1; }
body[data-reader-size="large"] { --reader-font-scale: 1.12; }
body[data-reader-size="xlarge"] { --reader-font-scale: 1.24; }

header {
  background: rgba(255, 254, 253, .94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
  padding: 18px 24px 14px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.siteNav {
  align-items: center;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 12px 36px rgba(36, 31, 25, .07);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 110px 10px 0;
  max-width: calc(100% - 110px);
  padding: 5px;
  width: max-content;
}

.siteNav a,
.siteNav button,
.siteNav summary {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 11px;
  color: var(--blue);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 680;
  line-height: 1;
  list-style: none;
  padding: 10px 13px;
  text-decoration: none;
  white-space: nowrap;
}

.siteNav summary::-webkit-details-marker { display: none; }
.siteNav a:hover,
.siteNav button:hover,
.siteNav summary:hover { background: #f3f6f8; color: var(--blue-dark); }
.siteNav .active,
.siteNav details[open] > summary { background: var(--blue); color: #fff; }
.siteNav .homeItem { color: #736f68; font-weight: 540; }
.siteMenu { position: relative; }
.siteMenu summary { user-select: none; }
.siteMenuPanel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
  left: 0;
  min-width: 232px;
  padding: 7px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 30;
}
.siteMenuPanel a { border-radius: 9px; justify-content: space-between; width: 100%; }
.siteMenuPanel a small { color: var(--muted); font-size: 12px; font-weight: 720; margin-left: 20px; }
.signOut { color: var(--muted); font-size: 13px; position: absolute; right: 28px; text-decoration: none; top: 24px; }
.signOut:hover { color: var(--blue); text-decoration: underline; }
h1 { display: none; }

.mobileTocToggle,
.tocBackdrop {
  display: none;
}

button:focus-visible {
  border-color: #b8cce3;
  box-shadow: 0 0 0 3px rgba(31, 90, 166, .12);
  outline: 0;
}

main {
  display: block;
  min-height: 100vh;
  padding: 39px 82px 92px;
}

.sidebar {
  max-height: calc(100vh - 146px);
  overflow: auto;
  padding: 0 10px 34px 4px;
  position: fixed;
  left: 82px;
  scrollbar-width: thin;
  top: 128px;
  width: 300px;
}

.bookBreadcrumb {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  line-height: 1.45;
  margin: 0 0 58px;
}

.bookBreadcrumb a {
  align-items: baseline;
  color: var(--muted);
  display: flex;
  gap: 9px;
  min-width: 0;
  text-decoration: none;
}

.bookBreadcrumb a:hover {
  color: var(--active);
}

.bookBreadcrumb a.active {
  color: var(--active);
}

.bookBreadcrumb small {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats {
  color: var(--muted);
  font-size: 12px;
  margin: 12px 0 24px;
}

.bookTabs {
  display: grid;
  gap: 7px;
  margin: 0 0 30px;
}

.bookTab,
.tocPart,
.tocItem {
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}

.bookTab {
  border-radius: 9px;
  color: var(--muted);
  padding: 7px 8px;
}
.bookTab:hover,
.bookTab.active { background: #faf8f5; color: var(--active); }
.bookTab b { display: block; font-size: 14px; }
.bookTab span { color: var(--muted-2); display: block; font-size: 12px; margin-top: 2px; }

.sectionList { display: block; }
.outlineItem {
  color: var(--muted);
  display: block;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  margin: 0 0 20px;
  text-decoration: none;
}
.outlineItem:hover { color: var(--active); }
.tocPart,
.tocItem {
  border-radius: 8px;
  color: var(--muted-2);
  display: grid;
  gap: 11px;
  grid-template-columns: 52px minmax(0, 1fr);
  line-height: 1.35;
  margin: 0;
  padding: 6px 8px;
}
.tocPart { color: #b0aaa2; margin: 28px 0 9px; }
.tocPart span { font-size: 14px; font-weight: 720; }
.tocPart b { color: #4f4943; font-size: 16px; font-weight: 780; }
.tocItem span { color: #c8c3bb; font-size: 14px; font-weight: 760; text-align: right; }
.tocItem b { color: #beb8b0; font-size: 15px; font-weight: 720; }
.tocPart:hover,
.tocItem:hover { background: #faf8f5; color: #605a54; }
.tocPart.active,
.tocItem.active { background: transparent; color: var(--active); }
.tocPart.active b,
.tocItem.active b { color: var(--active); font-weight: 820; }

.empty {
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  padding: 16px;
}

.reader {
  margin-left: auto;
  margin-right: auto;
  max-width: 532px;
  min-height: 70vh;
  padding: 0 0 120px;
  position: relative;
  width: 100%;
}

.reader:before,
.reader:after {
  content: "";
  inset: 0 auto 0 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity .18s ease;
  width: 110px;
  z-index: 1;
}
.reader:before { background: linear-gradient(90deg, #fffefd 0, rgba(255, 254, 253, 0) 100%); }
.reader:after { background: linear-gradient(270deg, #fffefd 0, rgba(255, 254, 253, 0) 100%); left: auto; right: 0; }
.edgeFade .reader:before,
.edgeFade .reader:after { opacity: .34; }

.chapter { position: relative; z-index: 2; }
.articleKicker {
  color: #817b73;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.chapter h2 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 12px;
}
.articleMeta {
  color: #8e8982;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 58px;
}
.articleMeta span { color: #c5beb4; margin: 0 7px; }

.sourceNote {
  background: #fff8dd;
  border: 1px solid #f1dea6;
  border-radius: 10px;
  color: #806a2d;
  font-size: 14px;
  line-height: 1.45;
  margin: -28px 0 30px;
  padding: 10px 12px;
}

.chapterBody p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: calc(19px * var(--reader-font-scale));
  font-weight: 560;
  line-height: 1.86;
  margin: 0 0 29px;
  transition: background .16s ease, box-shadow .16s ease, opacity .16s ease;
}

body[data-reader-lang="zh"] .articleKicker,
body[data-reader-lang="zh"] .chapter h2,
body[data-reader-lang="zh"] .articleMeta,
body[data-reader-lang="zh"] .chapterBody h3,
body[data-reader-lang="zh"] .chapterBody p {
  font-family: "PingFang SC", "Noto Sans SC", "Geist Sans", -apple-system, BlinkMacSystemFont, "Hiragino Sans GB", "Microsoft YaHei UI", system-ui, sans-serif;
  letter-spacing: 0;
}
body[data-reader-lang="zh"] .chapter h2 {
  font-size: 20px;
  font-weight: 500;
}
body[data-reader-lang="zh"] .chapterBody h3,
.chapterBody h3 {
  color: var(--ink);
  display: block;
  font-size: calc(16px * var(--reader-font-scale));
  font-weight: 600;
  line-height: 1.4;
  margin: 46px 0 24px;
}
body[data-reader-lang="zh"] .chapterBody p {
  font-size: calc(15px * var(--reader-font-scale));
  font-weight: 500;
  line-height: 1.75;
  margin-bottom: 24px;
}

.chapterList {
  font-family: "PingFang SC", "Noto Sans SC", "Geist Sans", -apple-system, BlinkMacSystemFont, "Hiragino Sans GB", "Microsoft YaHei UI", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.75;
  list-style-position: outside;
  margin: -3px 0 36px 24px;
  padding: 0 0 0 10px;
}

.chapterList li {
  margin: 0 0 14px;
  padding-left: 2px;
}

.chapterBody .figureHeading {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 54px 0 28px;
}

.bookFigure {
  margin: 0 0 46px;
  max-width: calc(100vw - 96px);
  min-width: 320px;
  position: relative;
  width: var(--figure-width, 532px);
  left: 50%;
  transform: translateX(-50%);
}

.bookFigureCard {
  background: #fff;
  border: 1px solid rgba(36, 31, 25, .06);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(36, 31, 25, .08);
  display: block;
  margin: 0 auto;
  max-width: 100%;
  padding: 22px 8px 12px;
  position: relative;
  transition: box-shadow .15s ease, transform .15s ease;
}

.bookFigureCard:hover,
.bookFigure.resizing .bookFigureCard {
  box-shadow: 0 14px 42px rgba(36, 31, 25, .12);
}

.bookFigureCard img {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
  pointer-events: none;
  user-select: none;
  width: 100%;
}

.figureResizeHandle {
  bottom: 0;
  cursor: ew-resize;
  opacity: 0;
  position: absolute;
  top: 0;
  transition: opacity .14s ease;
  width: 86px;
  z-index: 3;
}

.figureResizeHandle:after {
  background: rgba(31, 90, 166, .22);
  border-radius: 999px;
  content: "";
  height: 54px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
}

.figureResizeHandle.left {
  background: linear-gradient(90deg, rgba(224, 239, 255, .72), rgba(224, 239, 255, 0));
  left: -72px;
}

.figureResizeHandle.left:after { right: 16px; }

.figureResizeHandle.right {
  background: linear-gradient(270deg, rgba(224, 239, 255, .72), rgba(224, 239, 255, 0));
  right: -72px;
}

.figureResizeHandle.right:after { left: 16px; }

.bookFigureCard:hover .figureResizeHandle,
.bookFigure.resizing .figureResizeHandle {
  opacity: 1;
}

.missingFigure {
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  margin: -8px 0 42px;
  padding: 18px;
  text-align: center;
}

.chapterBody .pageMarker {
  color: #b5aea5;
  font-family: inherit;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .04em;
  margin: 30px 0 12px;
  text-transform: uppercase;
}
.matchMark { background: #fff176; border-radius: 4px; padding: 0 2px; }
.bullWord { background: rgba(24, 112, 109, .12); border-radius: 4px; color: #0e6f55; font-weight: 760; padding: 0 2px; }
.bearWord { background: rgba(198, 60, 46, .12); border-radius: 4px; color: #b63428; font-weight: 760; padding: 0 2px; }
.tickerIcon {
  align-items: center;
  background: #17266d;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .72em;
  font-weight: 850;
  height: 1.28em;
  justify-content: center;
  line-height: 1;
  margin: 0 .18em;
  min-width: 1.28em;
  padding: 0 .28em;
  position: relative;
  top: -.08em;
  vertical-align: middle;
}

body[data-reader-font="source-serif"] .chapterBody p,
body[data-reader-font="source-serif"] .chapterBody h3,
body[data-reader-font="source-serif"] .chapter h2 {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
}

body[data-reader-font="source-rounded"] .chapterBody p,
body[data-reader-font="source-rounded"] .chapterBody h3,
body[data-reader-font="source-rounded"] .chapter h2 {
  font-family: "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei UI", system-ui, sans-serif;
}

body[data-reader-font="source-serif"] .chapterBody p,
body[data-reader-font="source-rounded"] .chapterBody p {
  font-size: calc(15px * var(--reader-font-scale));
  font-weight: 500;
  line-height: 1.75;
}
.paragraphFocus .chapterBody p:not(.focused),
.paragraphFocus .chapterBody li,
.paragraphFocus .chapterBody h3,
.paragraphFocus .chapterBody .bookFigure,
.paragraphFocus .chapterBody .figureHeading {
  opacity: .28;
  transition: opacity .16s ease;
}
.paragraphFocus .chapterBody p:hover,
.paragraphFocus .chapterBody p.focused {
  background: rgba(255, 249, 218, .72);
  border-radius: 8px;
  box-shadow: 0 0 0 8px rgba(255, 249, 218, .72);
  opacity: 1;
}

button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  padding: 9px 13px;
}
button:hover:not(:disabled) { background: #faf8f5; }
button:disabled { cursor: default; opacity: .42; }

.readerNav {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 12px 34px rgba(36, 31, 25, .1);
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 42px 0 0;
  max-width: 100%;
  padding: 8px 10px;
  position: relative;
  width: 100%;
  z-index: 2;
}
.readerNav button { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.readerNav span { color: var(--muted); font-size: 13px; white-space: nowrap; }

.readerDock {
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 999px;
  bottom: 18px;
  box-shadow: 0 18px 50px rgba(36, 31, 25, .18);
  display: flex;
  gap: 12px;
  left: 50%;
  padding: 9px 12px 9px 16px;
  position: fixed;
  transform: translateX(-50%);
  transition: opacity .1s ease, transform .1s ease;
  width: max-content;
  z-index: 40;
}
body:not(.dockPinned):not(.dockPeek) .readerDock {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(100% + 42px));
}
body.dockPeek:not(.dockPinned) .readerDock,
body:not(.dockPinned) .readerDock.panelOpen,
body:not(.dockPinned) .readerDock:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%);
}
.dockSpinner {
  border: 2px solid #d8d3cb;
  border-right-color: #332d27;
  border-radius: 50%;
  display: inline-block;
  height: 18px;
  width: 18px;
}
.readingToggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  gap: 10px;
  max-width: min(360px, 58vw);
  min-width: 0;
  padding: 5px 4px;
}
.readingToggle:hover { background: #f3f1ee; }
.dockTitle {
  display: block;
  font-size: 15px;
  font-weight: 780;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.languageToggle,
.settingsToggle {
  background: #f1efeb;
  border: 0;
  border-radius: 999px;
  font-weight: 820;
  padding: 10px 15px;
}
.languageToggle { min-width: 70px; }
.languageToggle.zh { background: #2f2b26; color: #fff; }
.settingsPanel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  bottom: calc(100% + 10px);
  box-shadow: 0 22px 70px rgba(36, 31, 25, .2);
  min-width: 312px;
  padding: 10px;
  position: absolute;
  right: 0;
  text-align: left;
}
.panelSection { border-bottom: 1px solid var(--line); padding: 8px 4px; }
.panelSection:last-child { border-bottom: 0; }
.panelLabel { color: var(--muted); font-size: 13px; font-weight: 780; margin: 4px 8px 7px; }
.fontMenuToggle,
.fontRow,
.fontSizePicker,
.toggleRow,
.feedbackButton {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 11px;
  color: var(--ink);
  display: grid;
  font-size: 13px;
  gap: 9px;
  grid-template-columns: 26px 1fr auto;
  line-height: 1.15;
  padding: 9px 8px;
  text-align: left;
  width: 100%;
}
.fontMenuToggle {
  grid-template-columns: 26px minmax(0, 1fr) auto 10px;
}
.fontMenuToggle span,
.fontRow span,
.toggleRow span {
  min-width: 0;
  overflow-wrap: normal;
  white-space: nowrap;
}
.fontMenuToggle small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.fontPicker { position: relative; }
.fontMenuToggle b {
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}
.fontMenu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(36, 31, 25, .16);
  left: calc(100% + 8px);
  min-width: 222px;
  padding: 8px;
  position: absolute;
  top: 0;
  z-index: 55;
}
.fontRow:hover,
.fontRow.active,
.fontMenuToggle:hover,
.toggleRow:hover,
.toggleRow.on,
.feedbackButton:hover { background: #f3f1ee; }
.fontRow { grid-template-columns: 32px 1fr 18px; }
.fontRow small { color: var(--muted); font-size: 12px; }
.fontSizePicker {
  align-items: center;
  grid-template-columns: 42px 1fr;
  margin-top: 8px;
}
.fontSizePicker > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}
.fontSizePicker > div {
  background: #f3f1ee;
  border-radius: 999px;
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 3px;
}
.fontSizeButton {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  padding: 7px 5px;
  white-space: nowrap;
}
.fontSizeButton.active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(36, 31, 25, .1);
  color: var(--ink);
}
.fontIcon { font-family: Georgia, "Times New Roman", serif; font-size: 19px; text-align: center; }
.fontBadge {
  align-items: center;
  background: #f1efeb;
  border-radius: 8px;
  display: inline-flex;
  font-size: 15px;
  height: 25px;
  justify-content: center;
  width: 25px;
}
.fontRow.active i:before {
  content: "\2713";
  font-weight: 800;
}
.toggleRow i {
  background: #d8d6d0;
  border-radius: 999px;
  display: block;
  height: 24px;
  position: relative;
  width: 44px;
}
.toggleRow i:after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  content: "";
  height: 20px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: left .15s ease;
  width: 20px;
}
.toggleRow.on i { background: #302b26; }
.toggleRow.on i:after { left: 22px; }

.toolIcon { color: #514b45; display: inline-block; height: 24px; position: relative; width: 24px; }
.toolIcon.dots { background: radial-gradient(circle, #514b45 1.5px, transparent 2px) 0 0 / 8px 8px; }
.toolIcon.focus:before { border: 2px solid #514b45; border-radius: 5px; content: ""; inset: 4px; position: absolute; }
.toolIcon.focus:after { background: #514b45; border-radius: 2px; content: ""; height: 12px; left: 10px; position: absolute; top: 6px; width: 4px; }
.toolIcon.guide:before { border: 2px solid #514b45; border-left: 0; border-right: 0; content: ""; height: 12px; left: 3px; position: absolute; top: 6px; width: 18px; }
.toolIcon.pin:before { border: 2px solid #514b45; border-radius: 50% 50% 45% 45%; content: ""; height: 12px; left: 7px; position: absolute; top: 3px; width: 10px; }
.toolIcon.pin:after { background: #514b45; content: ""; height: 9px; left: 11px; position: absolute; top: 13px; width: 2px; }
.toolIcon.palette:before { border: 2px solid #514b45; border-radius: 50%; content: ""; height: 16px; left: 3px; position: absolute; top: 4px; width: 16px; }
.toolIcon.palette:after { background: #514b45; border-radius: 50%; box-shadow: 6px 2px 0 #514b45, 3px 8px 0 #514b45; content: ""; height: 3px; left: 8px; position: absolute; top: 8px; width: 3px; }
#lineGuide {
  background: #26211d;
  border-radius: 999px;
  display: none;
  height: 10px;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  transition: opacity .12s ease;
  width: 10px;
  z-index: 31;
}
.lineGuideOn #lineGuide { display: block; }

@media (max-width: 980px) {
  header { padding: 10px 12px 9px; position: sticky; }
  .siteNav {
    flex-wrap: nowrap;
    margin: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    width: 100%;
  }
  .siteNav::-webkit-scrollbar { display: none; }
  .siteNav a,
  .siteNav button,
  .siteNav summary { flex: 0 0 auto; }
  .siteNav a,
  .siteNav button,
  .siteNav summary {
    font-size: 13px;
    padding: 10px 12px;
  }
  .siteMenuPanel {
    left: 12px;
    max-height: min(440px, calc(100vh - 76px));
    overflow: auto;
    position: fixed;
    right: 12px;
    top: 58px;
    z-index: 100;
  }
  .signOut { display: none; }
  main { display: block; padding: 22px 18px 96px; }
  .mobileTocToggle {
    align-items: center;
    background: rgba(255, 255, 255, .95);
    border: 1px solid var(--line);
    border-radius: 999px;
    bottom: 82px;
    box-shadow: 0 10px 28px rgba(36, 31, 25, .16);
    color: var(--ink);
    display: inline-flex;
    font: inherit;
    font-size: 14px;
    font-weight: 780;
    gap: 7px;
    left: 14px;
    padding: 10px 14px;
    position: fixed;
    z-index: 72;
  }
  .mobileTocToggle span { font-size: 16px; line-height: 1; }
  .tocBackdrop {
    background: rgba(36, 31, 25, .18);
    border: 0;
    bottom: 0;
    display: block;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    transition: opacity .16s ease;
    z-index: 68;
  }
  .tocBackdrop[hidden] { display: block; }
  .mobileTocOpen .tocBackdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar {
    background: rgba(255, 254, 253, .98);
    border-right: 1px solid var(--line);
    bottom: 0;
    box-shadow: 16px 0 50px rgba(36, 31, 25, .12);
    left: 0;
    max-height: none;
    overflow: auto;
    padding: 28px 18px 112px;
    position: fixed;
    top: 0;
    transform: translateX(-104%);
    transition: transform .18s ease;
    width: min(380px, 88vw);
    z-index: 70;
  }
  .mobileTocOpen .sidebar { transform: translateX(0); }
  .bookBreadcrumb { margin-bottom: 34px; }
  .tocPart,
  .tocItem {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 8px 7px;
  }
  .tocPart { margin-top: 22px; }
  .tocItem b,
  .tocPart b { font-size: 15px; }
  .reader { max-width: 680px; padding: 22px 0 120px; }
  .chapter h2 { font-size: 26px; }
  .chapterBody p,
  body[data-reader-lang="zh"] .chapterBody p { font-size: calc(18px * var(--reader-font-scale)); line-height: 1.9; }
  .bookFigure {
    max-width: calc(100vw - 44px);
    min-width: 0;
    width: min(var(--figure-width, 532px), calc(100vw - 44px));
  }
  .figureResizeHandle { display: none; }
  .readerDock { bottom: 10px; max-width: calc(100vw - 22px); }
  .dockTitle { display: none; }
  .settingsPanel { max-width: calc(100vw - 24px); right: 0; }
}

@media (max-width: 520px) {
  main { padding-left: 14px; padding-right: 14px; }
  .siteNav a,
  .siteNav button,
  .siteNav summary {
    font-size: 12px;
    padding: 9px 10px;
  }
  .reader { padding-top: 12px; }
  .chapter h2,
  body[data-reader-lang="zh"] .chapter h2 { font-size: 21px; }
  .articleMeta { margin-bottom: 38px; }
  .chapterBody p,
  body[data-reader-lang="zh"] .chapterBody p {
    font-size: calc(16px * var(--reader-font-scale));
    line-height: 1.82;
  }
  .mobileTocToggle {
    bottom: 76px;
    font-size: 13px;
    left: 10px;
    padding: 9px 12px;
  }
  .readerDock {
    gap: 7px;
    padding: 8px 10px;
  }
  .settingsToggle { padding: 9px 12px; }
  .settingsPanel {
    bottom: calc(100% + 8px);
    min-width: min(312px, calc(100vw - 24px));
  }
  .fontMenu {
    left: 0;
    top: calc(100% + 8px);
    width: 100%;
  }
}
