/* Serene Ink-Wash Hero & Pure Mounted Parchment Book Cards */

/* Warm xuan paper with low-saturation bamboo at the edges. */
.hero {
  --search-green: #536F59;
  --search-paper: #FFFEFB;
  position: relative;
  overflow: hidden;
  --hero-art: url('/assets/hero-bg.webp?v=20261118-paper-bamboo');
  --hero-size: cover;
  --hero-position: center 48%;
  padding: 46px 20px 38px;
  text-align: center;
  color: var(--ink);
}

/* Browsing and reading notes share the warm paper and ink of the existing cards. */
.nav-cat-btn { display: inline-flex; white-space: nowrap; }
.overlay { max-height: min(86dvh, 46rem); overflow-y: auto; }
.shop .card-meta:empty { visibility: hidden; }
.shop .card-meta { background: #f4f1e9; color: #625b50; box-shadow: none; border: 0; font-size: 12.5px; }
.catalog-facets { display: grid; gap: 4px; margin: 0 0 12px; }
.catalog-facets nav, .catalog-facets nav > div { display: flex; align-items: baseline; gap: 2px 6px; }
.catalog-facets nav > div { flex-wrap: wrap; }
.catalog-facets b { flex: none; width: 2.8em; padding-block: 4px; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.catalog-facets a { padding: 4px 10px; border-radius: 5px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.catalog-facets a:hover, .catalog-facets a[aria-current] { color: var(--heading); background: #ebe5d8; }
.catalog-facets a[aria-current] { font-weight: 650; }
@media (min-width: 768px) { .overlay nav { grid-template-columns: repeat(3,minmax(0,1fr)); } .overlay nav a:nth-last-child(3) { border-bottom: 0; } }
@media (max-width: 480px) {
 .catalog-facets nav, .catalog-facets nav > div { gap: 2px; }
 .catalog-facets a { padding-inline: 7px; }
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--hero-art) var(--hero-position) / var(--hero-size) no-repeat;
  mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  width: calc(100% - 40px);
  max-width: var(--width);
  height: 1px;
  background: linear-gradient(90deg, transparent, #D4D8CC 18%, #D4D8CC 82%, transparent);
  transform: translateX(-50%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero h1 {
  font: 700 33px/1.38 var(--serif);
  letter-spacing: 3px;
  color: var(--heading);
  margin: 0 0 10px;
}
.hero-slogan {
  font-size: 13.5px;
  letter-spacing: 1.8px;
  color: var(--ink-2);
  margin: 0 0 24px;
}
.hero-search { position: relative; max-width: 660px; margin: 0 auto; }
.hero-form {
  display: flex;
  align-items: center;
  background: var(--search-paper);
  border: 1px solid #DFDBD1;
  border-radius: 12px;
  overflow: hidden;
  min-height: 48px;
  padding-left: 16px;
  box-shadow: 0 1px 2px rgba(82, 70, 50, .04);
}
.hero-form > svg { width: 17px; height: 17px; color: var(--muted); }
.hero-input { min-width: 0; flex: 1; border: 0; background: transparent; padding: 10px 12px; font-size: 15px; color: var(--ink); outline: none; }
.hero-input::placeholder { color: var(--muted); }
.hero-input:focus-visible { outline: none; }
.hero-form:focus-within { border-color: #849A87; box-shadow: 0 0 0 2px rgba(47, 93, 80, .14); }
.hero-btn {
  align-self: stretch;
  border: 0;
  background: var(--search-green);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 9px 28px;
}
.hero-btn:hover { background: #48654F; }
.hero-btn:active { background: #49634E; box-shadow: inset 0 1px 2px rgba(28, 52, 33, .12); }

.hero-hot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--ink-2);
}
.hero-hot > span { color: var(--ink-2); font-weight: 600; letter-spacing: .5px; margin-right: 2px; }
/* Both small labels take their shape from the fill; elevation belongs to .shop. */
.hero-hot a, .card-meta { border-radius: 999px; }
.hero-hot a {
  position: relative;
  isolation: isolate;
  max-width: 164px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: color-mix(in srgb, var(--ink-2) 70%, var(--search-green));
  font-size: 14px;
  line-height: 20px;
  padding: 4px 9px;
  text-underline-offset: 3px;
}
/* Inset the fill so the visible pill stays slimmer than its hit area. */
.hero-hot a::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 2px 0 3px;
  border-radius: inherit;
  background: linear-gradient(var(--search-paper), #F9F9F2);
  border: 1px solid rgba(83, 111, 89, .11);
  box-shadow: 0 1px 1px rgba(64, 74, 55, .09);
  pointer-events: none;
}
.hero-hot a:is(:hover, :focus-visible, :active) { color: var(--brand-dk); text-decoration: underline; }
.hero-hot a:is(:hover, :focus-visible)::before { background: linear-gradient(var(--search-paper), #F2F5ED); border-color: rgba(83, 111, 89, .26); }
.hero-hot a:active::before { background: #F2F5ED; box-shadow: none; }

/* Search suggestions */
.search-sug {
  display: none;
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  text-align: left;
  background: #FFFEFA;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 40px -12px rgba(8, 26, 25, .42);
  max-height: 380px;
  overflow-y: auto;
  z-index: 30;
}
.search-sug.open { display: block; }
.s-head, .s-empty { padding: 10px 15px; font-size: 13px; color: var(--ink-2); background: #F5F7F8; }
.search-sug a { display: flex; align-items: baseline; gap: 15px; padding: 11px 15px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.search-sug a:hover, .search-sug a.on { background: var(--surface-muted); }
.s-t { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.s-t em, .s-a em, .sr-t em, .sr-a em { font-style: normal; color: var(--heading); background: var(--surface-muted); padding: 0 2px; border-radius: 2px; }
.s-a, .s-c { color: var(--ink-2); font-size: 13px; }
.s-c { background: var(--surface-muted); color: var(--ink-2); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.search-sug a.s-all { justify-content: center; color: var(--ink-2); font-size: 13.5px; font-weight: 500; background: #FAF8F2; }
.search-sug a.s-all:hover, .search-sug a.s-all.on { color: var(--heading); background: var(--surface-muted); }

/* Misty Mountain Silhouette Book Cards (.shop) — Bamboo-Free Warm Centered Style */
.home-catalog { padding-top: 22px; }
.book-section { margin-bottom: 40px; }
.book-section:last-child { margin-bottom: 0; }
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }

.shop {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(3, 24px);
  align-content: center;
  align-items: center;
  justify-items: center;
  row-gap: 8px;
  text-align: center;
  min-width: 0;
  min-height: 128px;
  padding: 18px 14px;
  border: 1px solid #DED8CD;
  border-bottom-color: #D6CFC1;
  border-radius: 14px;
  background: linear-gradient(180deg, transparent 48%, rgb(170 128 24 / 5%)), #fff;
  box-shadow: 0 2px 0 #E0D9CB, 0 6px 11px -5px rgba(72, 60, 42, .23);
  overflow: hidden;
  transition: background-color .18s ease, transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.shop:focus-visible { background-color: #FAF6EE; }
@media (hover: hover) {
  .shop:hover { background-color: #FAF6EE; border-color: #CDC7BA; box-shadow: 0 2px 0 #DCD5C7, 0 7px 13px -5px rgba(72, 60, 42, .26); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .shop:hover { transform: translateY(-1px); }
}
.shop:active { transform: none; background-color: #EDE2D1; box-shadow: var(--control-pressed-shadow); }

@media (prefers-reduced-motion: reduce) {
  .shop { transition: none; }
}

.shop h3 {
  font: 700 16px/24px var(--serif);
  letter-spacing: .3px;
  min-width: 0;
  width: 100%;
  margin: 0;
  color: var(--heading);
  overflow: hidden;
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .16s ease;
}
.shop:hover h3 { color: var(--heading); }

.card-author {
  font-size: 12.5px;
  line-height: 1.6;
  min-height: 1.6em;
  margin: 0;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.card-author::before, .card-author::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 9px;
  height: 1px;
  margin: 0 7px;
  background: var(--line-soft);
  transform: translateY(-1px);
}
.card-author > span { font-size: 12.5px; color: var(--muted); margin-left: 2px; }

.card-meta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  height: 25px;
  padding-inline: 10px;
  background: linear-gradient(180deg, #F6F5F0, #F0EFEA);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  max-width: 100%;
  margin: 0;
  white-space: nowrap;
}
.card-meta > span + span::before { content: "·"; margin-right: 6px; color: var(--muted); }

/* Detail pages use a clear reading column beside a compact discovery rail. */
.detail-main { width: calc(100% - 40px); max-width: 1000px; padding-bottom: 52px; }
.detail-main > .crumb { padding: 14px 2px; font-size: 12px; line-height: 1.8; }
.book-head {
  position: relative;
  margin-top: 2px;
  padding: 24px 28px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FCFAF6 100%);
  box-shadow: var(--shadow-sm);
}
.book-head-main { min-width: 0; }
.book-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 0; margin: 13px 0 0; color: var(--ink-2); font-size: 13.5px; }
.book-meta-line > :not(:first-child) { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); }
.book-meta-line > span, .book-meta-line > time { white-space: nowrap; }
.book-meta-line .meta-latest {
  display: block;
  flex-basis: 100%;
  width: 100%;
  margin-left: 0 !important;
  padding-left: 0 !important;
  border-left: 0 !important;
  margin-top: 9px;
  color: var(--ink-2);
  font-size: 13.5px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.book-meta-line .meta-latest a {
  color: inherit;
  font-size: inherit;
  font-weight: normal;
  text-decoration: none;
}
.book-meta-line .meta-latest a:hover {
  color: var(--heading);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.book-updated { margin: 7px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.book-category-link { color: inherit; font-weight: normal; font-size: inherit; text-decoration: none; }
.book-category-link:hover { color: var(--heading); text-decoration: underline; text-underline-offset: 2px; }
.book-titleline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-top: 0; }
.book-title { font: 700 28px/1.36 var(--serif); letter-spacing: -0.2px; color: var(--heading); margin: 0; overflow-wrap: anywhere; }
.book-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0; margin: 0; font: 400 15px/1.5 var(--serif); color: var(--muted); }
.book-meta a { color: var(--ink); font-weight: 500; }
.book-meta a:hover { color: var(--heading); text-decoration: underline; text-underline-offset: 3px; }
.meta-author { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink); }
.author-seal { color: var(--muted); font-size: 13px; margin-left: 2px; }
.meta-status { color: var(--ink-2); }
.meta-date { color: var(--muted); }
.book-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 12px 0 0; }
.book-tags li { --tag-pad: 2px 9px; max-width: 100%; padding: var(--tag-pad); border: 1px solid var(--tag-border); border-radius: 999px; background: var(--tag-bg); color: var(--ink-2); font-size: 11.5px; line-height: 1.45; overflow-wrap: anywhere; }
.book-tags li:has(> a) { padding: 0; }
.book-tags li > a { display: block; padding: var(--tag-pad); border-radius: inherit; }
.book-tags li > a:is(:hover, :focus-visible) { color: var(--brand-dk); text-decoration: none; }
.detail-content { display: grid; grid-template-columns: minmax(0, 2.17fr) minmax(0, 1fr); align-items: start; gap: 12px; margin-top: 14px; }
.detail-primary, .detail-sidebar { min-width: 0; }
.detail-primary, .detail-sidebar { display: flex; flex-direction: column; gap: 14px; }
.detail-primary > .panel, .detail-sidebar > .panel, .detail-pair > .panel, .author-profile {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.detail-primary .panel-hd, .detail-sidebar .panel-hd, .detail-pair .panel-hd, .author-profile .panel-hd { min-height: 46px; padding: 11px 16px 10px; margin: 0; border: 0; border-bottom: 1px solid var(--line-soft); background: linear-gradient(90deg, #F7F2E7, #FCFBF7 82%); }
.detail-primary .panel-hd::after, .detail-sidebar .panel-hd::after, .detail-pair .panel-hd::after, .author-profile .panel-hd::after { display: none; }
.detail-content .panel-hd h2, .author-profile .panel-hd h2 { font: 700 17px/1.45 var(--serif); letter-spacing: 0; color: var(--heading); }
.detail-primary .panel-bd, .detail-sidebar .panel-bd, .detail-pair .panel-bd { padding: 14px 16px 16px; }
.archive-section .panel-bd, .author-profile .panel-bd { padding: 0; }
.download-section .panel-bd { padding-top: 14px; }
.detail-primary > .detail-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.intro p, .world-sec p, .audience-copy p { max-width: 72ch; font-size: 15px; line-height: 1.85; text-indent: 0; margin: 0 0 12px; color: var(--ink); overflow-wrap: anywhere; }
.intro p:last-child, .world-sec p:last-child, .audience-copy p:last-child { margin-bottom: 0; }
.intro .intro-resource { color: var(--ink-2); font-size: 13px; line-height: 1.8; }
.intro-resource a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.opening-section { scroll-margin-top: 76px; }
.opening-flow { list-style: none; margin: 0; padding: 0; }
.opening-flow li + li { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.opening-flow h3 { margin: 0 0 4px; color: var(--heading); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-size: 15px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.opening-flow p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.opening-flow p + p { margin-top: 6px; }
:is(.opening-group, .opening-flow) + .opening-group { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.opening-group-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 4px; margin-bottom: 9px; }
.opening-group-head h3 { margin: 0; color: var(--heading); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-size: 15px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.opening-range { color: var(--muted); font-size: 13px; line-height: 1.5; white-space: nowrap; margin-left: 6px; }
.opening-flow h4 { margin: 0 0 4px; color: var(--heading); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-size: 15px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.opening-group .opening-flow { list-style: disc outside; padding-inline-start: 1.25em; }
.opening-group .opening-flow li::marker { color: var(--muted); font-size: .75em; }
.opening-group .opening-flow li + li { margin-top: 9px; padding-top: 0; border-top: 0; }
.detail-primary .archive-tb, .detail-primary .archive-tb tbody { display: table; width: 100%; border-collapse: collapse; }
.detail-primary .archive-tb tbody { display: table-row-group; }
.detail-primary .archive-tb tr { display: table-row; border: 0; border-bottom: 1px solid var(--line-soft); }
.detail-primary .archive-tb tr:nth-child(odd) { border: 0; border-bottom: 1px solid var(--line-soft); }
.detail-primary .archive-tb tr:last-child { border-bottom: 0; }
.detail-primary .archive-tb th, .detail-primary .archive-tb td, .author-facts :is(th,td) { display: table-cell; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.detail-primary .archive-tb th { width: 96px; background: var(--surface-muted); color: var(--heading); font-size: 15px; font-weight: 500; white-space: nowrap; }
.author-facts th { width: 104px; background: var(--surface-muted); color: var(--heading); font-size: 15px; font-weight: 500; white-space: nowrap; }
.detail-primary .archive-tb td { color: var(--ink-2); background: #fff; font-size: 15px; font-weight: 400; line-height: 1.65; overflow-wrap: anywhere; }
.detail-primary .archive-tb td a { color: inherit; font-weight: normal; text-decoration: none; }
.detail-primary .archive-tb td a:hover { color: var(--heading); text-decoration: underline; text-underline-offset: 2px; }
.author-facts td { color: var(--ink); background: #fff; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.detail-primary .archive-tb tr:last-child > *, .author-facts tr:last-child > * { border-bottom: 0; }
.dl-box { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.dl-row { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; padding: 0; border: 0; }
.dl-format { color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
.dl-row > .dl-label { display: none; }
.download-link { --download-ink: #31594A; --download-border: #CFE0D8; --download-bg: #F1F6F3; --download-hover-bg: #E5EFE9; min-width: 164px; max-width: 100%; min-height: 44px; gap: 10px; padding: 8px 22px; border: 1px solid var(--download-border); border-radius: 8px; background: var(--download-bg); color: var(--download-ink); font: 400 16px/1.4 "Menu WenKai", "STKaiti", "KaiTi", var(--serif); letter-spacing: .04em; box-shadow: none; }
.download-link:hover { border-color: var(--download-border); background: var(--download-hover-bg); color: var(--download-ink); box-shadow: none; }
.download-link > span { white-space: nowrap; }
.dl-brand-icon { width: 22px; height: 22px; flex: 0 0 22px; object-fit: contain; }
.download-link-quark, .download-link[href^="https://pan.quark.cn/"] {
  --download-ink: #FFFFFF;
  --download-border: #3E7FE3;
  --download-bg: #4F8DF6;
  --download-hover-bg: #4383ED;
  background-image: linear-gradient(180deg, #5592FA, #4787F1);
  box-shadow: 0 2px 0 #3977D5, 0 4px 9px -5px rgba(48, 103, 191, .3), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.download-link-quark:hover, .download-link[href^="https://pan.quark.cn/"]:hover {
  background-image: linear-gradient(180deg, #4B8BF5, #397AE9);
  box-shadow: 0 2px 0 #316DCC, 0 4px 10px -5px rgba(48, 103, 191, .34), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.download-link-quark:active, .download-link[href^="https://pan.quark.cn/"]:active {
  background-image: linear-gradient(180deg, #3472DB, #4785EE);
  box-shadow: 0 1px 0 #316DCC, inset 0 1px 3px rgba(30, 73, 146, .2);
  transform: translateY(1px);
}
.download-link[href^="https://pan.baidu.com/"], .download-link[href^="https://yun.baidu.com/"] { --download-ink: #2563D8; --download-border: #C9D9FF; --download-bg: #F2F6FF; --download-hover-bg: #E8F0FF; }
.download-link[href^="https://www.alipan.com/"], .download-link[href^="https://alipan.com/"], .download-link[href^="https://www.aliyundrive.com/"], .download-link[href^="https://aliyundrive.com/"] { --download-ink: #6850CC; --download-border: #DCD3FA; --download-bg: #F7F4FF; --download-hover-bg: #EFE9FF; }
.download-link[href^="https://drive.uc.cn/"] { --download-ink: #B95512; --download-border: #F5D7BC; --download-bg: #FFF7EF; --download-hover-bg: #FFEDDC; }
.download-link[href^="https://cloud.189.cn/"] { --download-ink: #B6571B; --download-border: #F1D4BD; --download-bg: #FFF7F0; --download-hover-bg: #FFEDDE; }
.download-link[href^="https://115.com/"], .download-link[href^="https://www.115.com/"] { --download-ink: #246DC5; --download-border: #C9DFF7; --download-bg: #F2F8FF; --download-hover-bg: #E6F1FF; }
.download-link[href^="https://pan.xunlei.com/"] { --download-ink: #1477BE; --download-border: #BFE1F7; --download-bg: #F0FAFF; --download-hover-bg: #E0F3FF; }
.download-link[href^="https://www.123pan.com/"], .download-link[href^="https://123pan.com/"], .download-link[href^="https://www.123865.com/"] { --download-ink: #2869D0; --download-border: #CCDCFA; --download-bg: #F3F7FF; --download-hover-bg: #E7EFFF; }
.dl-empty { margin: 10px 0; color: var(--muted); }
.dl-tip { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.dl-tip a { color: var(--heading); text-decoration: underline; text-underline-offset: 3px; }
.people-dl, .faq-l { display: block; margin: 0; }
.dl-card { padding: 14px 0; border-bottom: 1px dashed var(--line-soft, #F0EEEA); }
.people-dl .dl-card:first-child, .faq-l .dl-card:first-child { padding-top: 3px; }
.people-dl .dl-card:last-child, .faq-l .dl-card:last-child { border-bottom: 0; padding-bottom: 2px; }
.people-dl dt { margin: 0; color: var(--heading); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-size: 15px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.person-tags { color: var(--muted); font: 400 12.5px/1.6 system-ui, sans-serif; }
.people-dl dd { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.people-dl p, .faq-l p { margin: 0 0 8px; }
.people-dl p:last-child, .faq-l p:last-child { margin-bottom: 0; }
.faq-l dt { margin: 0; color: var(--heading); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-size: 15px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.faq-l dd { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; font-weight: 400; line-height: 1.85; overflow-wrap: anywhere; }
.faq-l dd p { color: var(--ink-2); font-size: 15px; line-height: 1.85; margin: 0 0 8px; }
.faq-l dd p:last-child { margin-bottom: 0; }
.character-cloud-stage {
  --cloud-font: "Heading Ink", "STKaiti", KaiTi, var(--serif);
  --cloud-height: clamp(154px, 28vw, 186px);
  position: relative;
  display: grid;
  align-items: center;
  min-height: var(--cloud-height);
  min-width: 0;
}
.character-cloud-stage:has([data-mentions]:nth-child(11)) { --cloud-height: 244px; }
.character-cloud-canvas:not([hidden]) { display: block; width: 100%; height: var(--cloud-height); }
.character-cloud-stage[data-drawn] .character-cloud-words {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.character-cloud-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 8px 22px;
  min-width: 0;
  max-width: 490px;
  padding: 20px 0 24px;
  margin: 0 auto;
  list-style: none;
}
.character-cloud-words li {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink-2);
  font: 600 15px/1.3 var(--serif);
  text-align: center;
}
.compact-books, .side-categories { list-style: none; padding: 0; margin: 0; }
.detail-sidebar .related-section .panel-bd, .detail-sidebar .category-section .panel-bd, .detail-sidebar .latest-section .panel-bd, .detail-sidebar .ranking-section .panel-bd { padding: 6px 16px; }
.compact-books li, .side-categories li { display: grid; align-items: center; min-width: 0; min-height: 42px; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line-soft); }
.compact-books li { grid-template-columns: minmax(0, 1fr) minmax(0, 32%); }
.compact-books li.compact-more { grid-template-columns: minmax(0, 1fr); min-height: 36px; padding: 8px 0 2px; }
.compact-books li.compact-more a { display: flex; align-items: center; justify-content: center; gap: 4px; }
.compact-books li.compact-more a span { color: var(--muted); }
.compact-books li:last-child, .side-categories li:last-child { border-bottom: 0; }
.compact-books a, .side-categories a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 400; line-height: 1.6; }
.compact-books a:hover { color: var(--heading); }
.compact-books li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.ranking-books { counter-reset: ranking; }
.ranking-books li { grid-template-columns: 24px minmax(0, 1fr) minmax(0, 32%); }
.ranking-books li::before { counter-increment: ranking; content: counter(ranking, decimal-leading-zero); color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ranking-books li:nth-child(-n+3)::before { color: var(--heading); font-weight: 700; }
.side-categories { display: block; }
.side-categories li { grid-template-columns: minmax(0, 1fr) max-content; }
.side-categories li.is-active a { color: var(--heading); font-weight: 600; }
.side-categories li:hover a { color: var(--heading); }
.side-categories span { text-align: right; color: var(--muted); font-size: 12.5px; font-weight: 400; line-height: 1.6; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Category & Author Listing Headers */
.listing-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 18px 22px;
  margin: 0 0 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.listing-head h1 { font: 700 25px/1.4 var(--serif); color: var(--heading); margin: 0; }
.listing-head p { font-size: 13px; line-height: 1.75; margin: 7px 0 0; color: var(--ink-2); max-width: 720px; }
.listing-count { font-size: 13.5px; white-space: nowrap; color: var(--muted); }
.listing-count b { font-size: 15px; font-weight: 700; color: var(--heading); }
.catalog-main > .listing-head { padding: 2px 0 12px; margin-bottom: 6px; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.catalog-main:has(.cat-sort) > .listing-head p, .catalog-main:has(.cat-sort) > .listing-head .listing-count { display: none; }
.catalog-main > .list-toolbar { padding-bottom: 10px; margin-bottom: 12px; }

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.cat-sort {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}
.cat-sort a { padding: 4px 13px; border-radius: 999px; color: var(--ink-2); font-weight: 500; }
.cat-sort a:hover { color: var(--heading); }
.cat-sort a[aria-current] { background: #FFFEFA; color: var(--heading); font-weight: 700; box-shadow: 0 1px 3px rgba(62,48,26,.12); }
.page-position { margin-inline-start: auto; font-size: 13px; color: var(--muted); }

/* The author dossier and the book grid share the same outer edges. */
.author-main { --author-gutter: 16px; --author-blue: #315f94; --author-note: #646b75; --author-track: #e9edf2; max-width: 800px; padding-bottom: 32px; }
.author-heading { margin: 4px 0 18px; }
.author-heading > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.author-heading h1 { min-width: 0; margin: 0; font: 700 28px/1.4 var(--serif); overflow-wrap: anywhere; }
.author-heading span, .author-heading p { font-size: 14px; color: var(--ink-2); }
.author-heading p { margin: 6px 0 0; }
.author-heading p:empty { display: none; }
.author-sep { padding-inline: 9px; }
.author-main a:hover { text-decoration: underline; text-underline-offset: 3px; }
.author-summary { margin: 0; padding: 12px var(--author-gutter); border-bottom: 1px solid var(--line-soft); color: var(--ink); font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.author-facts { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
.author-discovery { min-width: 0; padding: 13px var(--author-gutter) 10px; border-top: 1px solid var(--line-soft); }
.ap-sub { margin: 16px 0 4px; color: var(--heading); font-size: 14px; line-height: 1.5; font-weight: 600; }
.author-discovery > :first-child { margin-top: 0; }
.ap-cats, .ap-rels { list-style: none; padding: 0; margin: 0; }
.ap-cats li { display: grid; grid-template-columns: 4.5em minmax(0,1fr) 6em; align-items: center; gap: 10px; min-height: 30px; font-size: 14px; }
.ap-cats li > span { text-align: right; }
.author-bar { display: block; width: 100%; height: 5px; appearance: none; border: 0; border-radius: 9px; overflow: hidden; background: var(--author-track); color: var(--author-blue); }
.author-bar::-webkit-progress-bar { background: var(--author-track); }
.author-bar::-webkit-progress-value { background: var(--author-blue); border-radius: 9px; }
.author-bar::-moz-progress-bar { background: var(--author-blue); border-radius: 9px; }
.ap-cats li > span, .ap-rels span { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--author-note); }
.author-profile a, .author-heading p a { color: var(--author-blue); }
.author-profile a:focus-visible { outline-color: var(--author-blue); }
.ap-rels a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 36px; padding-block: 7px; }
.ap-rels strong { min-width: 0; color: inherit; font-size: 14px; line-height: 1.55; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ap-rels span { flex: none; line-height: 1.55; text-align: right; }
.author-main .ap-rels a:hover, .author-main a.shop:hover { text-decoration: none; }
.ap-rels a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.author-works { margin-top: 24px; }
.author-works h2 { margin: 0 0 10px; font: 700 19px/1.5 var(--serif); }

/* Search Results Page */
.sr-wrap { max-width: 840px; }
.sr-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 4px 0 18px; }
.sr-h1 { min-width: 0; font: 700 25px/1.4 var(--serif); color: var(--heading); margin: 0; overflow-wrap: anywhere; }
.sr-h1 em { font-style: normal; color: var(--heading); }
.sr-meta { font-size: 13.5px; color: var(--muted); margin: 0; }
.sr-form {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  min-height: 48px;
  margin-bottom: 20px;
  padding-left: 14px;
  box-shadow: var(--shadow-sm);
}
.sr-form > svg { color: var(--muted); width: 17px; height: 17px; }
.sr-input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 11px 12px; outline: none; font-size: 14px; }
.sr-form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(89, 111, 128, .14); }
.sr-input:focus-visible { outline: none; }
.sr-btn {
  border: 0;
  background: var(--brand-dk);
  color: #fff;
  padding: 11px 25px;
  align-self: stretch;
  font-size: 14px;
  font-weight: 700;
}
.sr-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; box-shadow: var(--shadow-sm); }
.sr-item { border-bottom: 1px solid var(--line-soft); }
.sr-item:last-child { border: 0; }
.sr-item > a { display: block; padding: 14px 18px; }
.sr-item > a:hover { background: #F5F7F8; }
.sr-main { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.sr-t { flex: 1 1 auto; min-width: 0; font: 700 17px/1.48 var(--serif); color: var(--heading); display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.sr-card-meta { display: flex; align-items: baseline; flex-wrap: wrap; max-width: 100%; gap: 4px 10px; }
.sr-a { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.sr-c { font-size: 13px; color: var(--ink-2); background: var(--surface-muted); padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.sr-w { white-space: nowrap; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.sr-empty { text-align: center; padding: 50px 10px; color: var(--muted); font-size: 13px; }
.sr-empty > svg { width: 28px; height: 28px; color: var(--muted); }
.sr-empty b { display: block; font-size: 16px; margin: 14px 0 8px; font-weight: 500; color: var(--heading); }
.sr-empty p { line-height: 1.9; }
.sr-empty a { color: var(--heading); }

/* Responsive (320px - 1440px, zero overflow) */
@media (max-width: 900px) {
  .book-grid { gap: 11px; }
}
@media (max-width: 1000px) {
  .detail-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
  }
  .detail-primary,
  .detail-sidebar {
    display: contents;
  }
  .detail-content .panel,
  .detail-content .detail-pair {
    width: 100%;
    box-sizing: border-box;
  }
  .intro-panel, #introduction { order: 1; }
  .download-section, #download { order: 2; }
  .audience-section, #audience { order: 3; }
  .opening-section, #opening { order: 4; }
  .latest-section, #latest { order: 5; }
  .detail-pair, #people, #world { order: 6; }
  .character-cloud-panel, #character-cloud { order: 7; }
  .archive-section, #archive { order: 8; }
  .questions-section, #questions { order: 9; }
  #new-books { order: 10; }
  #completed-books { order: 11; }
  #ongoing-books { order: 12; }
  .related-section, #related { order: 13; }
  .category-section, #categories { order: 14; }
}
@media (max-width: 767px) {
  .hero {
    padding: 26px 14px 24px;
    --hero-art: url('/assets/hero-bg-mobile.webp?v=20261118-paper-bamboo');
    --hero-position: center top;
    --hero-size: 100% auto;
    min-height: 206px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .hero::after { width: calc(100% - 28px); }
  .hero h1 { font-size: 26px; letter-spacing: 1.5px; margin-bottom: 8px; }
  .hero-slogan { font-size: 13.5px; letter-spacing: 1px; margin-bottom: 18px; }
  .hero-form { min-height: 45px; padding-left: 11px; border-radius: 10px; }
  .hero-input { font-size: 14px; padding: 11px 10px; }
  .hero-btn { font-size: 14px; padding: 10px 21px; }
  .hero-hot { font-size: 13px; gap: 2px 6px; margin-top: 14px; }
  .hero-hot a { max-width: 134px; font-size: 13px; padding-inline: 8px; }

  .home-catalog { padding-top: 16px; }
  .book-section { margin-bottom: 22px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shop { min-height: 118px; padding: 14px 10px; border-radius: 12px; }
  .shop h3 { font-size: 15.5px; }
  .card-author { font-size: 13px; }
  .card-author::before, .card-author::after { width: 6px; margin: 0 5px; }
  .card-meta { font-size: 12px; gap: 5px; }
  .card-meta > span + span::before { margin-right: 5px; }

  .search-sug a { gap: 9px; padding: 11px 12px; font-size: 13.5px; }
  .s-c { display: none; }
  .s-a { font-size: 12px; }

  .detail-main { width: calc(100% - 16px); padding-bottom: 36px; }
  .detail-main > .crumb { padding: 14px 0 10px; font-size: 12px; }
  .book-head { padding: 20px 16px 20px; border-radius: 14px; background: linear-gradient(180deg, #FFFFFF 0%, #FAF8F4 100%); }
  .book-titleline { gap: 6px 12px; margin-top: 0; }
  .book-title { font-size: 25px; line-height: 1.35; letter-spacing: -0.2px; }
  .book-meta { font-size: 15px; }
  .book-eyebrow { font-size: 13.5px; margin-top: 12px; }
  .book-meta-line { gap: 6px 14px; }
  .book-meta-line > :not(:first-child) { margin-left: 0; padding-left: 0; border-left: 0; }
  .book-meta-line .meta-latest {
    display: block;
    flex-basis: 100%;
    width: 100%;
    margin-top: 8px;
    font-size: 13.5px;
    margin-left: 0 !important;
    padding-left: 0 !important;
    border-left: 0 !important;
  }
  .book-updated { font-size: 12.5px; margin-top: 6px; }
  .book-tags { gap: 6px; margin-top: 12px; }
  .book-tags li { --tag-pad: 2px 8px; font-size: 11px; }
  .detail-content { gap: 14px; margin-top: 14px; }
  .detail-primary > .panel, .detail-sidebar > .panel, .detail-pair > .panel { border-radius: 14px; }
  .detail-primary .panel-hd, .detail-sidebar .panel-hd, .detail-pair .panel-hd, .author-profile .panel-hd { min-height: 46px; padding: 11px 16px; }
  .detail-primary .panel-bd, .detail-sidebar .panel-bd, .detail-pair .panel-bd { padding: 14px 15px 16px; }
  .archive-section .panel-bd { padding: 0; }
  .download-section .panel-bd { padding: 14px 16px 16px; }
  .detail-content .panel-hd h2, .author-profile .panel-hd h2 { font-size: 17px; }
  .intro p, .world-sec p, .audience-copy p { font-size: 15px; line-height: 1.85; }
  .opening-flow p { font-size: 15px; line-height: 1.85; color: var(--ink-2); }
  .opening-flow h3, .opening-group-head h3 { font-size: 15px; line-height: 1.55; color: var(--heading); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-weight: 600; }
  .opening-flow h4 { font-size: 15px; line-height: 1.55; color: var(--heading); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-weight: 600; }
  .people-dl dt { font-size: 15px; line-height: 1.55; color: var(--heading); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-weight: 600; }
  .faq-l dt { font-size: 15px; line-height: 1.55; color: var(--heading); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-weight: 600; }
  .person-tags { font-size: 12.5px; }
  .people-dl dd, .faq-l dd { font-size: 15px; line-height: 1.85; margin-top: 6px; color: var(--ink-2); }
  .detail-primary .archive-tb tr { border-bottom: 1px solid var(--line-soft); }
  .detail-primary .archive-tb th { width: 90px; font-size: 14.5px; background: var(--surface-muted); color: var(--heading); padding: 9px 10px; font-weight: 500; }
  .author-facts th { width: 92px; font-size: 14.5px; background: var(--surface-muted); color: var(--heading); padding: 9px 10px; font-weight: 500; }
  .detail-primary .archive-tb td { font-size: 15px; color: var(--ink-2); background: #fff; padding: 9px 10px; }
  .author-facts td { font-size: 16px; }
  .dl-box { gap: 8px; padding: 0; }
  .download-link { min-width: 156px; }
  .latest-chapter-item .chapter-name { font-size: 15px; }
  .compact-books a, .side-categories a { font-size: 15px; }
  .compact-books li > span, .side-categories span { font-size: 12.5px; }
  .detail-sidebar .related-section .panel-bd, .detail-sidebar .category-section .panel-bd, .detail-sidebar .latest-section .panel-bd, .detail-sidebar .ranking-section .panel-bd { padding: 6px 14px; }

  .listing-head { padding: 15px 16px; gap: 12px; margin-bottom: 16px; }
  .listing-head h1 { font-size: 21px; }
  .listing-head p { font-size: 12px; }
  .catalog-main > .listing-head { padding: 2px 0 10px; margin-bottom: 5px; }
  .catalog-main > .list-toolbar { padding-bottom: 9px; margin-bottom: 12px; }
  .author-main { --author-gutter: 14px; }
  .author-heading h1 { font-size: 23px; }
  .author-heading { margin-bottom: 14px; }

  .sr-head { margin: 0 0 14px; }
  .sr-h1 { font-size: 22px; }
  .sr-form { margin-bottom: 16px; padding-left: 11px; }
  .sr-input { font-size: 13px; padding: 11px 9px; }
  .sr-btn { padding: 11px 18px; }
  .sr-item > a { padding: 12px 13px; }
  .sr-t { font-size: 15.5px; }
  .sr-card-meta { gap: 5px 8px; }
}
@media (max-width: 380px) {
  .book-title { font-size: 22px; }
  .book-meta-line { gap: 5px 8px; font-size: 12.5px; }
  .book-grid { gap: 8px; }
  .card-meta { font-size: 11px; gap: 4px; padding-inline: 6px; }
  .card-meta > span + span::before { margin-right: 4px; }
}
.detail-preview-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line, #e5dfd4);
  color: var(--ink-2, #5c554c);
  font-size: 13px;
}
.detail-preview-note { margin: 0 0 12px; color: var(--ink-2); font-size: 13px; line-height: 1.65; }
.detail-preview-nav > div { display: flex; flex-wrap: wrap; gap: 0 4px; }
.detail-preview-nav a { padding: 6px 9px; border-radius: 5px; }
.detail-preview-nav a:hover { background: rgba(91, 72, 46, .05); }
.detail-preview-nav a[aria-current="page"] {
  background: rgba(91, 72, 46, .09);
  color: var(--heading, #27231e);
  font-weight: 700;
}

/* Latest Chapters Section: Clean Vertical List in Sidebar */
.latest-section {
  scroll-margin-top: 76px;
}
.latest-chapter-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}
.latest-chapter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.latest-chapter-item:last-child {
  border-bottom: 0;
}
.latest-chapter-item .chapter-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
}
.latest-chapter-item .chapter-name:hover {
  color: var(--heading);
}
.latest-chapter-item.is-newest .chapter-name {
  color: var(--heading);
  font-weight: 600;
  font-size: 15px;
}
.latest-chapter-item .chapter-badge {
  display: none;
}
