/* ==========================================================================
   TopNovel 官网样式 v2 ——「追更夜 · 绯夜」（2026-11-19，总台账 D48 / D49）
   - 书封决定颜色：首页主推、书籍详情头部背景 = 封面放大模糊；品牌色只点睛
   - 品牌符号：书签缎带（名次、标签、区块标题、按钮细节）
   - 英泰同一套字体：Taviraj（标题、数字、阅读正文）+ Anuphan（界面）
   - 设计稿：docs/官网设计稿_20261119/theme-v2.html、pages-v2.html
   ========================================================================== */

/* ---------- 字体（自托管，英泰分子集按字符范围加载） ---------- */
@font-face { font-family: "Taviraj"; font-weight: 500; font-display: swap; src: url("../fonts/taviraj-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Taviraj"; font-weight: 500; font-display: swap; src: url("../fonts/taviraj-500-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Taviraj"; font-weight: 700; font-display: swap; src: url("../fonts/taviraj-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Taviraj"; font-weight: 700; font-display: swap; src: url("../fonts/taviraj-700-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Taviraj"; font-weight: 800; font-display: swap; src: url("../fonts/taviraj-800-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Taviraj"; font-weight: 800; font-display: swap; src: url("../fonts/taviraj-800-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Anuphan"; font-weight: 400 700; font-display: swap; src: url("../fonts/anuphan-400-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Anuphan"; font-weight: 400 700; font-display: swap; src: url("../fonts/anuphan-400-700-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }

/* ---------- 设计令牌（绯夜；正文对比度均 ≥ 4.5） ---------- */
:root {
  --night: #141113; --night-2: #201B1E; --on-night: #F6F1EA; --on-night-2: #BDB3AC; --accent-on-night: #FF5C6E;
  --paper: #FAF7F2; --paper-2: #F1EBE3; --surface: #FFFFFF;
  --ink: #1A1618; --ink-2: #4A4347; --ink-3: #6F676B; --line: #E6DED4;
  --accent: #C42137; --accent-hover: #A5172C; --accent-ink: #B11D32;
  --gold: #E6AE55; --gold-ink: #8C5B10; --on-gold: #1A1618;
  --display: "Taviraj", Georgia, "Times New Roman", serif;
  --sans: "Anuphan", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  --gutter: 16px;
  --container: 1280px;
  --radius: 6px;
  --radius-cover: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow-cover: 0 1px 2px rgba(26, 22, 24, .12), 0 6px 14px -6px rgba(26, 22, 24, .28), 0 18px 32px -18px rgba(26, 22, 24, .45);
  --bookmark: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (min-width: 640px) { :root { --gutter: 28px; } }
@media (min-width: 960px) { :root { --gutter: 40px; } }

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
/* 内容短的页面把页脚推到视口底部 */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, p { margin: 0; }
.wrap { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(780px + 2 * var(--gutter)); }
.center { text-align: center; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--surface); padding: 8px 12px; }
.skip:focus { left: 8px; top: 8px; }
.night { position: relative; isolation: isolate; background: var(--night); color: var(--on-night); }
.night::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--grain); opacity: .07; mix-blend-mode: overlay; pointer-events: none; }

/* ---------- 书签缎带（品牌符号） ---------- */
.ribbon { display: inline-flex; align-items: center; gap: 6px; padding: 6px 18px 6px 10px; background: var(--accent); color: #fff; font: 700 .75rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%); }
:lang(th) .ribbon { text-transform: none; letter-spacing: 0; font-size: .8125rem; }
.mark { position: absolute; top: 0; right: 10px; z-index: 2; width: 30px; padding: 7px 0 13px; text-align: center; background: var(--gold); color: var(--on-gold); font: 800 1rem/1 var(--display); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 7px), 0 100%); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--radius); font: 600 .9375rem/1.2 var(--sans); text-align: center; cursor: pointer; transition: transform .15s var(--ease), background-color .15s, border-color .15s, color .15s; }
.btn svg { flex: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -12px var(--accent); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-light { color: var(--on-night); border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .05); }
.btn-light:hover { background: rgba(255, 255, 255, .12); }
.btn-line { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .875rem; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn-row.center { justify-content: center; }
.note-dark { width: 100%; font-size: .75rem; color: var(--on-night-2); }

/* ---------- 页头（深色） ---------- */
.lang-hint { background: var(--night-2); color: var(--on-night); text-align: center; font-size: .875rem; padding: 9px var(--gutter); }
.lang-hint a { color: var(--gold); font-weight: 600; }
.topbar { position: relative; z-index: 20; }
/* 页头外层（body > .night）带 isolation，不设层级时后面的首屏 .spot 会盖住页头弹出的二维码卡片 / 语言下拉（D74 发现） */
body > .night { z-index: 30; }
.topbar .row { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; min-height: 58px; padding: 0 var(--gutter); border-bottom: 0; } /* 书单行 .row 与页头同名且写在 .wrap 之后：在这里还原 .wrap 的左右留白、去掉上下内边距与下边框 */
.logo { display: inline-flex; align-items: center; gap: 9px; font: 700 1.3rem/1 var(--display); letter-spacing: -.01em; color: var(--on-night); }
.logo img { width: 30px; height: 30px; border-radius: 8px; }
.nav { order: 3; display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); border-top: 1px solid rgba(255, 255, 255, .08); }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; flex: none; display: inline-flex; align-items: center; min-height: 44px; color: var(--on-night-2); font-size: .9375rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current] { color: var(--on-night); }
.nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: var(--accent-on-night); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
@media (max-width: 639px) { .top-actions .btn-sm { padding: 0 12px; } }
/* 360 宽（安卓常见）及以下：页头收紧，保证 logo、语言、下载按钮同一行 */
@media (max-width: 399px) { .topbar .logo { gap: 7px; font-size: 1.15rem; } .topbar .logo img { width: 26px; height: 26px; } .topbar .row { column-gap: 8px; } .top-actions { gap: 6px; } .top-actions .btn-sm { padding: 0 10px; } }
@media (min-width: 960px) {
  .topbar .row { flex-wrap: nowrap; min-height: 68px; column-gap: 20px; }
  .nav { order: 0; width: auto; margin: 0 0 0 20px; padding: 0; border: 0; gap: 28px; align-self: stretch; }
  .nav a { min-height: 68px; }
  .nav a[aria-current]::after { bottom: 16px; }
}

/* 语言 / 地区下拉 */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius); color: var(--on-night-2); font-size: .875rem; font-weight: 600; cursor: pointer; user-select: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--on-night); border-color: rgba(255, 255, 255, .4); }
.lang-menu[open] .caret { transform: rotate(180deg); }
.lang-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 220px; margin: 0; padding: 6px; list-style: none; background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .45); }
.lang-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 6px 12px; border-radius: 4px; }
.lang-item:hover { background: var(--paper-2); }
.lang-item > span { display: grid; line-height: 1.3; }
.lang-item b { font-weight: 600; font-size: .9375rem; }
.lang-item small { color: var(--ink-3); font-size: .8rem; }
.lang-item[aria-current] { color: var(--accent-ink); cursor: default; }
@media (max-width: 639px) { .lang-menu .lm-long { display: none; } }
@media (min-width: 640px) { .lang-menu .lm-short { display: none; } }

/* ---------- 封面模糊背景（首页主推、书籍详情头） ---------- */
.spot, .bookhero { position: relative; overflow: hidden; isolation: isolate; }
.backdrop { position: absolute; inset: -12%; z-index: -3; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(44px) saturate(1.35) brightness(.62); transform: scale(1.08); }
.spot::before, .bookhero::before { content: ""; position: absolute; inset: 0; z-index: -2; background:
  linear-gradient(90deg, var(--night) 0%, color-mix(in srgb, var(--night) 78%, transparent) 42%, color-mix(in srgb, var(--night) 30%, transparent) 100%),
  linear-gradient(0deg, var(--night) 0%, transparent 40%); }
.spot::after, .bookhero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--grain); opacity: .08; mix-blend-mode: overlay; pointer-events: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* 首页主推 */
.spot-grid { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "kicker kicker" "cover info" "hook hook" "cta cta" "next next"; gap: 14px 16px; padding-top: 18px; padding-bottom: 22px; align-items: end; } /* 只设上下：左右留白由 .wrap 提供（简写会把它清掉） */
.spot-kicker { grid-area: kicker; font: 500 .75rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--on-night-2); }
.spot-kicker b { color: var(--gold); font-weight: 700; }
:lang(th) .spot-kicker { text-transform: none; letter-spacing: 0; font-size: .8125rem; }
.spot-cover { grid-area: cover; position: relative; animation: rise .8s var(--ease) both .05s; }
.spot-cover img, .bh-cover img { width: 100%; aspect-ratio: 300 / 414; object-fit: cover; border-radius: var(--radius-cover); box-shadow: 0 30px 60px -22px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08); }
.spot-info { grid-area: info; animation: rise .7s var(--ease) both; }
.spot-title { margin: 10px 0 6px; font: 800 clamp(1.625rem, .9rem + 3.6vw, 4.5rem)/1.02 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.spot-title a:hover { color: var(--gold); }
:lang(th) .spot-title { line-height: 1.3; letter-spacing: 0; font-size: clamp(1.5rem, .9rem + 3vw, 3.75rem); }
.spot-meta { font-size: .8125rem; color: var(--on-night-2); }
.spot-hook { grid-area: hook; max-width: 38em; color: var(--on-night-2); font-size: .9375rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; animation: rise .7s var(--ease) both .12s; }
.spot-cta { grid-area: cta; display: flex; flex-wrap: wrap; gap: 10px; animation: rise .7s var(--ease) both .2s; }
.spot-cta .btn { flex: 1 1 100%; }
.spot-next { grid-area: next; display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
.spot-next::-webkit-scrollbar { display: none; }
.spot-next a { flex: none; display: grid; grid-template-columns: auto 150px; gap: 12px; align-items: center; color: var(--on-night-2); font-size: .8125rem; line-height: 1.35; }
.spot-next a:hover { color: var(--on-night); }
.spot-next .thumb-book img { aspect-ratio: auto; }
.spot-next span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spot-next small { display: block; color: var(--gold); font-weight: 700; letter-spacing: .1em; font-size: .6875rem; }
/* 接口不可用时的品牌首屏(没有书) */
.spot--brand .spot-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "kicker" "info" "cta"; padding-top: 40px; padding-bottom: 44px; }
/* 封面：清晰边框 + 层次阴影（D73，11-20 用户改：去掉书脊渐变与书页厚度，「图要有边界和阴影」）
   边框画在 ::after 上（压在图片上方、不占尺寸）；浅色底用深色细边，深色底用浅色细边，避免封面边缘融进背景 */
.spot-cover, .bh-cover, .card .cv, .row .cv, .pin-cv, .thumb-book { position: relative; border-radius: var(--radius-cover); }
.pin-cv { box-shadow: var(--shadow-cover); }
.spot-cover::after, .bh-cover::after, .card .cv::after, .row .cv::after, .pin-cv::after, .thumb-book::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(26, 22, 24, .14);
}
/* 深色底：首页轮播、详情页、Top 10、排行前三名深色卡、轮播缩略图 */
.spot-cover::after, .bh-cover::after, .card.t10 .cv::after, .thumb-book::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.spot-cover img, .bh-cover img { border-radius: 6px; box-shadow: 0 2px 4px rgba(0, 0, 0, .45), 0 14px 28px -10px rgba(0, 0, 0, .7), 0 34px 64px -24px rgba(0, 0, 0, .9); }
.spot-cover::after, .bh-cover::after { bottom: auto; aspect-ratio: 300 / 414; }
.card.t10 .cv { box-shadow: 0 2px 4px rgba(0, 0, 0, .45), 0 12px 24px -10px rgba(0, 0, 0, .75); }
.thumb-book { display: block; width: 56px; aspect-ratio: 300 / 414; border-radius: 3px; overflow: hidden; box-shadow: 0 2px 4px rgba(0, 0, 0, .5), 0 6px 12px -4px rgba(0, 0, 0, .6); background: rgba(255, 255, 255, .08); }
.thumb-book img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.spot-cover .mark { z-index: 2; }
.pin-rank { z-index: 2; }
/* 首页轮播（D72）：各页叠在同一格里，只显示当前页（淡入淡出）；缩略图兼作页码，右侧左右箭头 + 暂停 */
.spot--carousel .spot-grid { grid-template-areas: "kicker kicker" "cover info" "hook hook" "cta cta"; }
.spot-slides { display: grid; }
/* 平滑切换：背景图 0.7s 交叉过渡；文字区旧页先淡出、新页稍后淡入（不叠字）；固定的品牌标语不动；入场浮起动画只在首次进入时播 */
.spot-slide { grid-area: 1 / 1; min-width: 0; visibility: hidden; }
.spot-slide.is-active, .spot-slide.is-leaving { visibility: visible; }
.spot-slide .backdrop { opacity: 0; transition: opacity .7s var(--ease); will-change: opacity; transform: translateZ(0); }
.spot-slide.is-active .backdrop { opacity: 1; }
.spot-slide .spot-grid > :not(.spot-kicker) { opacity: 0; transform: translateY(6px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.spot-slide.is-active .spot-grid > :not(.spot-kicker) { opacity: 1; transform: none; transition: opacity .45s var(--ease) .16s, transform .5s var(--ease) .16s; }
.spot-slide.is-leaving .spot-kicker { visibility: hidden; }
.spot-slide .spot-cover, .spot-slide .spot-info, .spot-slide .spot-hook, .spot-slide .spot-cta { animation: none; }
.spot--carousel:not(.is-switched) .spot-slide.is-active .spot-cover { animation: rise .8s var(--ease) both .05s; }
.spot--carousel:not(.is-switched) .spot-slide.is-active .spot-info { animation: rise .7s var(--ease) both; }
.spot--carousel:not(.is-switched) .spot-slide.is-active .spot-hook { animation: rise .7s var(--ease) both .12s; }
.spot--carousel:not(.is-switched) .spot-slide.is-active .spot-cta { animation: rise .7s var(--ease) both .2s; }
.spot-ctrl { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; position: relative; }
.spot-ctrl::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid rgba(255, 255, 255, .1); }
.spot-ctrl .spot-next { flex: 1; min-width: 0; padding-top: 14px; border-top: 0; }
.spot-next a { position: relative; opacity: .62; transition: opacity .2s; }
.spot-next a:hover, .spot-next a[aria-current] { opacity: 1; }
.spot-next a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 2px; background: var(--gold); }
.spot-arrows { flex: none; display: flex; gap: 6px; padding-top: 14px; }
.spot-arrow { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%; background: rgba(255, 255, 255, .06); color: var(--on-night); cursor: pointer; transition: background .15s, border-color .15s; }
.spot-arrow:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); }
.spot-arrow:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.spot-pause .ic-play { display: none; }
.spot-pause[aria-pressed="true"] .ic-play { display: block; }
.spot-pause[aria-pressed="true"] .ic-pause { display: none; }
@media (max-width: 639px) { .spot-pause { display: none; } .spot-ctrl .spot-next a { grid-template-columns: auto 120px; gap: 10px; } .spot-ctrl .spot-next .thumb-book { width: 48px; } }
@media (prefers-reduced-motion: reduce) { .spot-slide .backdrop, .spot-slide .spot-grid > * { transition: none !important; } }
.spot-lead { margin-top: 12px; max-width: 36em; color: var(--on-night-2); }
@media (min-width: 640px) { .spot-cta .btn { flex: 0 0 auto; } .spot-grid { grid-template-columns: 180px minmax(0, 1fr); } }
@media (min-width: 960px) {
  .spot-grid { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "kicker cover" "info cover" "hook cover" "cta cover" "next next"; column-gap: 80px; row-gap: 18px; padding-top: 56px; padding-bottom: 28px; align-items: start; }
  .spot-cover { align-self: center; }
  .spot-title { margin-top: 16px; }
  .spot-hook { font-size: 1.0625rem; }
  .spot-next { gap: 32px; padding-top: 18px; margin-top: 18px; }
  .spot--carousel .spot-grid { grid-template-areas: "kicker cover" "info cover" "hook cover" "cta cover"; padding-bottom: 20px; }
  .spot-ctrl { gap: 24px; padding-bottom: 24px; }
  .spot-ctrl .spot-next { margin-top: 0; padding-top: 18px; gap: 20px; overflow: visible; }
  .spot-ctrl .spot-next a { flex: 1 1 0; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: start; align-content: start; font-size: .875rem; } /* 竖排卡片：封面在上、名次与书名在下，6 本平分整排宽度（D133） */
  .spot-ctrl .spot-next .thumb-book { width: 100%; }
  .spot-ctrl .spot-next span { -webkit-line-clamp: 3; } /* 名次 1 行 + 书名最多 2 行 */
  .spot-next a[aria-current]::after { top: -19px; }
  .spot-arrows { padding-top: 18px; gap: 8px; }
  .spot-arrow { width: 42px; height: 42px; }
  .spot--brand .spot-grid { padding-top: 72px; padding-bottom: 72px; }
}

/* ---------- 面包屑 ---------- */
.crumbs { display: flex; gap: 8px; padding-top: 14px; font-size: .8125rem; color: var(--on-night-2); white-space: nowrap; overflow: hidden; }
.crumbs > * + *::before { content: "/"; margin-right: 8px; opacity: .5; }
.crumbs > :last-child { overflow: hidden; text-overflow: ellipsis; }
.crumbs a:hover { color: var(--on-night); }
.crumbs--light { color: var(--ink-3); }
.crumbs--light a:hover { color: var(--accent-ink); }

/* ---------- 书籍详情头 ---------- */
.bh-grid { display: grid; grid-template-columns: 116px minmax(0, 1fr); grid-template-areas: "cover info" "cta cta"; gap: 18px 16px; padding: 16px 0 28px; align-items: end; }
.bh-cover { grid-area: cover; position: relative; animation: rise .8s var(--ease) both; }
.bh-cover .cover-ph { aspect-ratio: 300 / 414; border-radius: var(--radius-cover); }
.bh-info { grid-area: info; animation: rise .7s var(--ease) both .05s; }
.bh-tags { margin-bottom: 10px; font: 700 .6875rem/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
:lang(th) .bh-tags { text-transform: none; letter-spacing: 0; font-size: .8125rem; }
.bh-title { margin-bottom: 8px; font: 800 clamp(1.5rem, .95rem + 3vw, 3.75rem)/1.05 var(--display); letter-spacing: -.02em; text-wrap: balance; }
:lang(th) .bh-title { line-height: 1.3; letter-spacing: 0; }
.bh-author { margin-bottom: 12px; font-size: .9375rem; color: var(--on-night-2); }
.bh-facts { display: flex; flex-wrap: wrap; row-gap: 2px; list-style: none; margin: 0 0 0 -21px; padding: 0; clip-path: inset(0 0 0 21px); font-size: .8125rem; color: var(--on-night-2); }
/* 每项前都有分隔线、整行左移一条分隔线宽(10+1+10)再裁掉: 折行后行首的分隔线落在裁掉的区域里, 不会出现「| 9 free chapters」 */
.bh-facts li::before { content: ""; display: inline-block; width: 1px; height: 11px; margin: 0 10px; vertical-align: -1px; background: rgba(255, 255, 255, .28); }
.bh-facts .is-free { color: var(--gold); font-weight: 700; }
.bh-cta { grid-area: cta; display: flex; flex-wrap: wrap; gap: 10px; animation: rise .7s var(--ease) both .15s; }
.bh-cta .btn { flex: 1 1 100%; }
@media (min-width: 640px) {
  .bh-grid { grid-template-columns: 200px minmax(0, 1fr); grid-template-areas: "cover info" "cover cta"; grid-template-rows: auto 1fr; column-gap: 40px; padding: 28px 0 44px; align-items: start; }
  .bh-info { align-self: end; }
  .bh-cta .btn { flex: 0 0 auto; }
  .bh-facts { font-size: .875rem; }
}
@media (min-width: 960px) { .bh-grid { grid-template-columns: 250px minmax(0, 1fr); column-gap: 56px; padding: 36px 0 56px; } }

/* ---------- 浅色页面通用 ---------- */
.page-head { padding: 26px 0 6px; }
.page-title { font: 800 clamp(1.75rem, 1.2rem + 2vw, 3rem)/1.15 var(--display); letter-spacing: -.015em; text-wrap: balance; }
:lang(th) .page-title { line-height: 1.4; letter-spacing: 0; }
.page-lead { margin-top: 10px; max-width: 44em; color: var(--ink-2); font-size: 1.0625rem; }
.block { padding-top: 36px; }
.empty { padding: 40px 0; text-align: center; color: var(--ink-3); }
.notice { margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--paper-2); color: var(--ink-2); font-size: .9375rem; }
.prose p { color: var(--ink-2); }
.prose p + p { margin-top: 1em; }
.bullets { margin: 12px 0 0; padding-left: 1.2em; color: var(--ink-2); }
.bullets li { margin-bottom: 6px; }
.section-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font: 700 clamp(1.25rem, 1.05rem + .8vw, 1.625rem)/1.25 var(--display); }
.section-h::before { content: ""; flex: none; width: 10px; height: 20px; background: var(--accent); clip-path: var(--bookmark); }
@media (min-width: 960px) { .block { padding-top: 48px; } .page-head { padding-top: 36px; } }

/* 居中功能页（下载、404、503、已下架） */
.center-page { padding-top: 48px; padding-bottom: 8px; text-align: center; } /* 只设上下，左右留白由 .wrap 提供 */
.center-page .app-icon { width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 22px; box-shadow: var(--shadow-cover); }
.center-page .page-title { margin-bottom: 10px; }
.center-page .page-lead { margin: 0 auto 22px; }
.center-page .btn-row { justify-content: center; }
.center-page .small { margin-top: 12px; }

/* ---------- 频道切换、榜单标签 ---------- */
.chan { display: flex; gap: 26px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.chan a { position: relative; flex: none; display: inline-flex; align-items: center; min-height: 50px; color: var(--ink-3); font-weight: 600; font-size: .9375rem; }
.chan a:hover { color: var(--ink); }
.chan a[aria-current] { color: var(--ink); }
.chan a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent); }
.tabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; padding: 14px 0 4px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--ink-3); font-weight: 600; font-size: .9375rem; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--accent-ink); }
.tabs a[aria-current]::before { content: ""; width: 8px; height: 15px; background: var(--accent); clip-path: var(--bookmark); }
@media (min-width: 960px) { .tabs { -webkit-mask-image: none; mask-image: none; } }

/* ---------- 书架（横滑） ---------- */
.shelf { padding-top: 36px; }
/* 屏幕外的书架 / 热门榜延后绘制，降低首页、题材页首屏渲染开销（D69）；预留高度避免滚动条跳动 */
.shelf, .top10 { content-visibility: auto; contain-intrinsic-size: auto 530px; }
.shelf-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.shelf-head h2 { display: flex; align-items: center; gap: 10px; min-width: 0; font: 700 clamp(1.3rem, 1.05rem + 1vw, 1.875rem)/1.2 var(--display); letter-spacing: -.01em; }
.shelf-head h2::before { content: ""; flex: none; width: 10px; height: 20px; background: var(--accent); clip-path: var(--bookmark); }
.shelf-more { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; color: var(--accent-ink); font-weight: 600; font-size: .875rem; }
.shelf-more::after { content: "\2192"; transition: transform .15s var(--ease); }
.shelf-more:hover::after { transform: translateX(3px); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 38%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px; scroll-padding: 0 var(--gutter); }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; min-width: 0; }
.card .cv { position: relative; display: block; aspect-ratio: 300 / 414; overflow: hidden; border-radius: var(--radius-cover); background: var(--paper-2); box-shadow: var(--shadow-cover); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.card .cv img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .cv { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(26, 22, 24, .14), 0 12px 22px -8px rgba(26, 22, 24, .34), 0 26px 44px -20px rgba(26, 22, 24, .5); }
/* 封面下方的书名 / 标签 / 简介参照题材页书单（.row-title / .row-meta / .row-intro）：衬线粗体书名，标签在前、连载状态在后，简介正文色 */
.card-t { margin-top: 12px; font: 700 1rem/1.3 var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
:lang(th) .card-t { line-height: 1.5; }
.card-t a:hover { color: var(--accent-ink); }
.card-g { margin-top: 4px; font-size: .8125rem; line-height: 1.45; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } /* 最多 2 个标签 + 状态，窄卡片标签长时放到 3 行，状态排最后也不被截掉 */
.card-g span { white-space: nowrap; } /* 单个标签不在中间折行（如 Heart-broken） */
/* 书卡简介：直接显示在卡片上（最多 3 行），不用点进详情页才看得到 */
.card-i { margin-top: 6px; font-size: .875rem; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cover-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: linear-gradient(160deg, var(--night-2), var(--night)); color: var(--gold); font: 800 2.5rem/1 var(--display); }
@media (min-width: 640px) { .rail { grid-auto-columns: 22%; gap: 18px; } .shelf { padding-top: 44px; } }
@media (min-width: 960px) { .rail { grid-auto-columns: calc((100% - 6 * 22px) / 7); gap: 22px; } .shelf { padding-top: 56px; } }

/* 热门榜 Top 10：深色整条 + 金色描边衬线大数字 */
.top10 { margin-top: 44px; padding: 36px 0 30px; }
.top10 .shelf-head h2::before { background: var(--gold); }
.top10 .shelf-more { color: var(--gold); }
.top10 .rail { grid-auto-columns: 64%; }
/* 数字只和封面同行、贴封面底边；书名、标签排在封面下方，不被数字压住，封面顶端对齐 */
.t10 { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; align-items: start; }
.t10 > div { display: contents; }
.t10 .cv, .t10 .card-t, .t10 .card-g, .t10 .card-i { grid-column: 2; }
.t10-n { grid-row: 1; grid-column: 1; align-self: end; position: relative; z-index: 0; margin-right: -16px; font: 800 6.25rem/.78 var(--display); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 2px var(--gold); }
.t10 .cv { z-index: 1; }
.t10 .card-t { color: var(--on-night); }
.t10 .card-t a:hover { color: var(--gold); }
.t10 .card-g, .t10 .card-i { color: var(--on-night-2); }
@media (min-width: 640px) { .top10 .rail { grid-auto-columns: 33%; } }
@media (min-width: 960px) { .top10 { margin-top: 64px; padding: 48px 0 40px; } .top10 .rail { grid-auto-columns: calc((100% - 4 * 22px) / 5); } .t10-n { font-size: 8.5rem; } }

/* ---------- 书单行（排行、题材） ---------- */
.rows { display: grid; margin-top: 8px; }
.row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.row--ranked { grid-template-columns: 32px 84px minmax(0, 1fr); }
.row .cv { display: block; aspect-ratio: 300 / 414; overflow: hidden; border-radius: var(--radius-cover); background: var(--paper-2); box-shadow: var(--shadow-cover); }
.row .cv img { width: 100%; height: 100%; object-fit: cover; }
.row-rank { font: 800 1.75rem/1 var(--display); color: var(--ink-3); padding-top: 4px; }
.row-rank.is-top { color: var(--accent-ink); }
.row-title { margin-bottom: 4px; font: 700 1.125rem/1.3 var(--display); }
.row-title a:hover { color: var(--accent-ink); }
:lang(th) .row-title { line-height: 1.5; }
.row-meta { font-size: .8125rem; color: var(--ink-3); }
.row-intro { margin-top: 6px; font-size: .9375rem; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 640px) {
  .row { grid-template-columns: 104px minmax(0, 1fr); gap: 22px; }
  .row--ranked { grid-template-columns: 54px 104px minmax(0, 1fr); }
  .row-rank { font-size: 2.6rem; }
  .row-title { font-size: 1.25rem; }
  .row-intro { -webkit-line-clamp: 3; }
}
@media (min-width: 960px) { .rows--2 { grid-template-columns: 1fr 1fr; column-gap: 56px; } }

/* ---------- 排行瀑布流（小红书 / Pinterest 式两列） ---------- */
/* D94（参考图）浅色卡片：封面在上，下面书名（2 行）、简介（2 行）、标签胶囊、作者
   D96 / D97（11-20 用户）：卡片上部是正常封面、铺满卡宽，卡片宽度由封面决定；封面下面的文字区背景是封面的放大模糊图 + 白色遮罩
   手机两列瀑布流（单数名次左列、双数右列，模板拆好）；平板 / 桌面一行多列、按名次从左到右（.pins-col 拆开，靠卡片的 order） */
.pins { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; margin-top: 14px; }
.pins-col { display: grid; gap: 10px; align-content: start; }
.pin { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; background: var(--surface); border-radius: 10px;
  box-shadow: 0 1px 2px rgba(26, 22, 24, .06), 0 8px 18px -10px rgba(26, 22, 24, .28); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.pin:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(26, 22, 24, .08), 0 18px 32px -16px rgba(26, 22, 24, .42); }
/* 文字区的模糊背景：放大裁边（避免模糊后边缘发白），遮罩让文字区接近白色、仍透出封面色调 */
.pin-bg { position: absolute; inset: -20%; z-index: -2; pointer-events: none; }
.pin-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(30px) saturate(1.3); transform: scale(1.05); }
.pin::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: rgba(255, 255, 255, .8); }
/* 封面：铺满卡宽、贴卡片顶部（卡片圆角裁切），正常显示不模糊 */
.pin-stage { position: relative; }
.pin-cv { position: relative; aspect-ratio: 300 / 414; overflow: hidden; background: var(--paper-2); }
.pin-cv img { width: 100%; height: 100%; object-fit: cover; }
.pin-cv::after { box-shadow: none; }
.pin-rank { position: absolute; top: 0; left: 8px; z-index: 2; min-width: 26px; padding: 5px 4px 11px; text-align: center; background: rgba(20, 17, 19, .82); color: var(--on-night); font: 800 .875rem/1 var(--display); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 6px), 0 100%); }
.pin-body { flex: 1; padding: 10px 10px 12px; }
.pin-t { font: 600 .9375rem/1.35 var(--sans); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pin-t a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* 整张卡可点 */
.pin:hover .pin-t a { color: var(--accent-ink); }
.pin-t a:focus-visible { outline: none; }
.pin:has(.pin-t a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pin-intro { margin-top: 6px; font-size: .8125rem; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 标签胶囊：半透明白底，压在模糊背景上也清楚；连载状态用金色系区分 */
.pin-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 3.4em; overflow: hidden; }
.pin-tag { max-width: 100%; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 1px rgba(26, 22, 24, .06); color: var(--accent-ink); font-size: .6875rem; font-weight: 600; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin-tag--status { background: color-mix(in srgb, var(--gold) 22%, #fff); color: var(--gold-ink); }
.pin-by { margin-top: 8px; font-size: .75rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 前三名：金色名次 + 金色细描边 */
.pin--top { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 75%, transparent), 0 8px 18px -10px rgba(26, 22, 24, .28); }
.pin--top .pin-cv { margin: 1.5px 1.5px 0; border-radius: 9px 9px 0 0; }
.pin--top .pin-rank { min-width: 32px; padding: 7px 5px 14px; background: var(--gold); color: var(--on-gold); font-size: 1.125rem; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
/* 平板 / 桌面：一行多列，按名次从左到右；同一行的卡片等高 */
@media (min-width: 600px) {
  .pins { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px 16px; align-items: stretch; }
  .pins-col { display: contents; }
  .pin-body { padding: 12px 12px 14px; }
}
@media (min-width: 960px) {
  .pins { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 26px 20px; margin-top: 20px; }
  .pin-rank { left: 10px; min-width: 28px; padding: 6px 5px 12px; font-size: .9375rem; }
  .pin--top .pin-rank { min-width: 34px; padding: 8px 6px 15px; font-size: 1.25rem; }
  .pin-body { padding: 12px 14px 16px; }
  .pin-t { font-size: 1rem; }
}

/* ---------- 题材总览 ---------- */
/* 题材栏 + 书单（11-20 用户要求：题材放左侧、不显示书数）
   手机 / 平板：书单上方一排横滑标签（按频道分组）；桌面 ≥960：左侧竖排栏，滚动时吸顶 */
.glayout { display: grid; gap: 6px; margin-top: 10px; }
.gnav { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 6px var(--gutter) 10px; -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
.gnav::-webkit-scrollbar { display: none; }
.gnav-group { flex: none; display: flex; align-items: center; gap: 8px; }
.gnav-h { flex: none; color: var(--ink-3); font: 700 .6875rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.gnav ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.gnav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .875rem; transition: border-color .15s, color .15s, background .15s; }
.gnav a:hover { border-color: var(--accent); color: var(--accent-ink); }
.gnav a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.glist .shelf-head { margin-top: 8px; }
@media (min-width: 960px) {
  .glayout { grid-template-columns: 196px minmax(0, 1fr); column-gap: 48px; align-items: start; margin-top: 24px; }
  .gnav { position: sticky; top: 20px; display: block; overflow: visible; margin: 0; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .gnav-group { display: block; }
  .gnav-group + .gnav-group { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
  .gnav-h { margin: 0 0 8px 14px; }
  .gnav ul { display: grid; gap: 2px; }
  .gnav a { display: flex; min-height: 40px; padding: 0 12px 0 11px; background: transparent; border: 0; border-left: 3px solid transparent; border-radius: 0 var(--radius) var(--radius) 0; font-size: .9375rem; }
  .gnav a:hover { background: var(--paper-2); color: var(--ink); }
  .gnav a[aria-current] { background: var(--surface); border-left-color: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
  .glist .shelf-head { margin-top: 0; }
  .glist .rows { margin-top: 0; }
  .glist .rows--2 { column-gap: 40px; }
}

/* ---------- 详情正文区 ---------- */
.synopsis { max-width: 46em; font-size: 1.0625rem; line-height: 1.75; color: var(--ink-2); }
.synopsis p + p { margin-top: 1em; }
:lang(en) .synopsis > p:first-child::first-letter { float: left; margin: .06em .12em 0 0; font: 800 3.3em/.8 var(--display); color: var(--accent-ink); }
.toc { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.toc li { break-inside: avoid; }
.toc a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.toc .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toc a:hover .t { color: var(--accent-ink); }
.toc .free { flex: none; font: 700 .6875rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); }
:lang(th) .toc .free { text-transform: none; letter-spacing: 0; font-size: .8125rem; }
.toc .is-locked a { color: var(--ink-3); }
.toc .lock { flex: none; display: inline-flex; color: var(--ink-3); }
@media (min-width: 960px) { .toc--2 { columns: 2; column-gap: 56px; } }

/* ---------- 阅读页 ---------- */
.reader { max-width: calc(700px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.rd-head { padding: 26px 0 26px; text-align: center; }
.rd-book { font: 700 .75rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
:lang(th) .rd-book { text-transform: none; letter-spacing: 0; font-size: .8125rem; }
.rd-title { margin-top: 10px; font: 700 clamp(1.625rem, 1.2rem + 1.6vw, 2.5rem)/1.2 var(--display); text-wrap: balance; }
:lang(th) .rd-title { line-height: 1.45; }
.rd-mark { width: 12px; height: 22px; margin: 18px auto 0; background: var(--accent); clip-path: var(--bookmark); }
.rd-text { font: 500 var(--rd-size, clamp(1.125rem, 1.05rem + .3vw, 1.25rem))/1.85 var(--display); color: var(--rd-ink, #2A2426); overflow-wrap: break-word; hyphens: auto; }
.rd-text p { margin: 0 0 1.2em; }
:lang(th) .rd-text { line-height: 2.05; }
.rd-nav { display: grid; grid-template-columns: 1fr auto 1fr; margin: 36px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font: 600 .875rem/1.2 var(--sans); }
.rd-nav a, .rd-nav span { display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 0 4px; }
.rd-nav a:hover { color: var(--accent-ink); }
.rd-nav .toc-link { justify-content: center; padding: 0 22px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.rd-nav .next { justify-content: flex-end; text-align: right; }
.rd-nav .is-locked { color: var(--ink-3); }

/* ---------- 阅读页体验（D69，11-20 体验评审） ---------- */
/* 章节计数「Free chapter 3 of 9」 */
.rd-count { margin: 28px 0 0; text-align: center; color: var(--ink-3); font: 600 .75rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
/* 连续阅读：已接上下一章的章节，隐藏它自己的章末导航 / 卡片，只留一条分隔 */
.rd-chapter.is-continued .rd-nav, .rd-chapter.is-continued .continue, .rd-chapter.is-continued .rd-teaser, .rd-chapter.is-continued .rd-teaser-unlock { display: none; }
.rd-chapter.is-continued::after { content: ""; display: block; width: 40px; height: 1px; margin: 44px auto 8px; background: var(--line); }
.rd-chapter + .rd-chapter .rd-head { padding-top: 34px; }
.rd-loading { padding: 28px 0; text-align: center; color: var(--ink-3); font: 600 .8125rem/1 var(--sans); }
/* 末免费章锁章提示条：只在手机显示（桌面有深色卡片） */
.rd-teaser { display: none; }
@media (max-width: 639px) {
  .rd-teaser { display: flex; align-items: center; gap: 12px; margin: 28px 0 0; padding: 14px 14px 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); }
  .rd-teaser-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--paper-2); color: var(--accent-ink); }
  .rd-teaser-t { flex: 1; min-width: 0; font: 600 .875rem/1.4 var(--sans); color: var(--ink); }
  .rd-teaser-btn { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 .8125rem/1 var(--sans); }
  /* 手机正文不自动断字（窄屏频繁断词影响阅读）；正文标题上方的书名与面包屑重复，手机上省掉 */
  .rd-text { hyphens: manual; }
  .rd-head .rd-book { display: none; }
}
/* 锁章解锁方式（D70）：金币解锁 · VIP 免费读全部 · 查看 VIP */
.unlock { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin-top: 16px; font: 600 .8125rem/1.3 var(--sans); color: var(--ink-2); }
.unlock-i { display: inline-flex; align-items: center; gap: 6px; }
.unlock-i svg { flex: none; color: var(--ink-3); }
.unlock-i.is-vip, .unlock-i.is-vip svg { color: var(--gold-ink); }
.unlock-link { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.unlock-link::after { content: " \2192"; }
.unlock--dark { color: var(--on-night-2); }
.unlock--dark .unlock-i svg { color: var(--on-night-2); }
.unlock--dark .unlock-i.is-vip, .unlock--dark .unlock-i.is-vip svg { color: var(--gold); }
.unlock--dark .unlock-link { color: var(--on-night); }
.block .unlock, .toc-banner .unlock { justify-content: flex-start; }
.rd-teaser-unlock { display: none; }
@media (max-width: 639px) { .rd-teaser-unlock { display: block; } .rd-teaser-unlock .unlock { margin-top: 10px; justify-content: flex-start; } }
/* 目录上方说明条（有锁章的书） */
.toc-banner { margin: 6px 0 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); }
.toc-banner-t { font: 700 1rem/1.35 var(--display); }
.toc-banner .unlock { margin-top: 8px; }
.toc-banner .btn { margin-top: 14px; }
/* 沉浸式阅读菜单（D71）：默认只显示正文；点正文弹出顶栏 + 底栏，点 Aa 再弹出字号 / 背景设置 */
.rd-top, .rd-dock { position: fixed; left: 0; right: 0; z-index: 40; background: var(--paper); background: color-mix(in srgb, var(--paper) 96%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); transition: transform .22s var(--ease); }
.rd-top { top: 0; border-bottom: 1px solid var(--line); transform: translateY(-100%); }
.rd-dock { bottom: 0; border-top: 1px solid var(--line); transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom); }
html.rd-menu-open .rd-top, html.rd-menu-open .rd-dock { transform: none; box-shadow: 0 0 24px rgba(0, 0, 0, .08); }
.rd-top-in, .rd-dock-in, .rd-settings { max-width: calc(700px + 2 * var(--gutter)); margin: 0 auto; }
.rd-top-in { display: flex; align-items: center; gap: 4px; min-height: 54px; padding: 0 var(--gutter) 0 calc(var(--gutter) - 10px); }
.rd-top-back { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius); color: var(--ink); }
.rd-top-back:hover { background: var(--paper-2); }
.rd-top-t { min-width: 0; display: grid; }
.rd-top-book { font: 700 .9375rem/1.25 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-top-ch { font: 500 .75rem/1.3 var(--sans); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-progress { height: 3px; margin: 0 var(--gutter); border-radius: 3px; background: var(--line); overflow: hidden; }
.rd-progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.rd-dock-in { padding: 10px 0 4px; }
.rd-dock-btns { display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px 6px 0; }
.rd-dock-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; border: 0; border-radius: var(--radius); background: transparent; color: var(--ink); font: 600 .6875rem/1.1 var(--sans); cursor: pointer; }
.rd-dock-btn:hover { background: var(--paper-2); }
.rd-dock-btn[aria-disabled="true"] { opacity: .3; pointer-events: none; }
.rd-aa-ic { font: 700 1.125rem/20px var(--display); }
.rd-aa[aria-expanded="true"] { color: var(--accent-ink); }
.rd-settings[hidden] { display: none; } /* display:grid 会盖掉 hidden 属性，这里补回 */
.rd-settings { display: grid; gap: 14px; padding: 16px var(--gutter) 8px; border-bottom: 1px solid var(--line); }
.rd-set-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rd-set-label { width: 100%; color: var(--ink-3); font: 700 .6875rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.rd-set-row button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 56px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 .875rem/1 var(--sans); cursor: pointer; }
.rd-set-row button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-ink); }
/* 背景：色块按钮 */
.rd-set-row .rd-bg { flex-direction: column; gap: 5px; min-width: 0; flex: 1; padding: 8px 4px; border-radius: var(--radius); font-size: .75rem; }
.rd-swatch { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.rd-swatch--paper { background: #FAF7F2; } .rd-swatch--sepia { background: #F3E8D2; } .rd-swatch--mint { background: #E2EDDF; } .rd-swatch--night { background: #141113; border-color: rgba(255, 255, 255, .25); }
/* 平板 / 桌面（≥600）：设置面板改成「Settings」按钮正上方的小浮层，按钮与色块缩小；底栏压矮 */
@media (min-width: 600px) {
  .rd-dock-in { position: relative; padding-top: 8px; }
  .rd-dock-btn { min-height: 46px; }
  .rd-settings { position: absolute; bottom: calc(100% + 10px); left: calc(62.5% - 140px); width: 280px; max-width: none; margin: 0; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .35); }
  .rd-settings::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: translateX(-50%) rotate(45deg); }
  .rd-set-row { gap: 6px; }
  .rd-set-label { font-size: .625rem; }
  .rd-set-row button { min-width: 40px; min-height: 32px; padding: 0 10px; font-size: .8125rem; }
  .rd-set-row .rd-bg { flex: 1; gap: 4px; padding: 6px 2px; font-size: .6875rem; }
  .rd-swatch { width: 20px; height: 20px; }
}
/* 第一次进入时的点击提示 */
.rd-hint { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 39; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 999px; background: rgba(20, 17, 19, .88); color: var(--on-night); font: 600 .8125rem/1.3 var(--sans); text-align: center; transform: translateX(-50%); animation: rd-hint 3.2s var(--ease) forwards; pointer-events: none; }
@keyframes rd-hint { 0% { opacity: 0; transform: translate(-50%, 8px); } 10%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rd-top, .rd-dock { transition: none; } .rd-hint { animation-duration: 0s; animation-delay: 3s; } }
/* 正文可点（打开菜单），不显示点击高亮 */
.rd-stream .rd-text { -webkit-tap-highlight-color: transparent; cursor: default; }
/* 字号（只作用于正文） */
html[data-rd-size="s"] { --rd-size: 1rem; }
html[data-rd-size="l"] { --rd-size: clamp(1.3125rem, 1.25rem + .3vw, 1.4375rem); }
/* 阅读主题（只在章节页的 <html> 上设置，见布局头部的内联脚本） */
html[data-rd-theme="sepia"] { --paper: #F3E8D2; --paper-2: #EADCC1; --surface: #F8F0DF; --line: #DDCDAE; --rd-ink: #3B2F22; }
html[data-rd-theme="mint"] { --paper: #E2EDDF; --paper-2: #D4E3D0; --surface: #ECF3E9; --line: #C3D6BE; --rd-ink: #22301F; }
html[data-rd-theme="night"] { --paper: #141113; --paper-2: #221C1F; --surface: #1D181B; --line: #352D31; --ink: #EDE6DE; --ink-2: #CFC5BC; --ink-3: #9F948D; --accent-ink: #FF7A8A; --rd-ink: #D9D1C8; color-scheme: dark; }
/* 末免费章 / 锁章：深色卡片 */
.cont { margin: 36px 0; padding: 34px 22px 30px; text-align: center; border-radius: var(--radius); overflow: hidden; }
.cont .rd-mark { margin: 0 auto 18px; }
.cont h2, .cont h1 { margin-bottom: 10px; font: 700 clamp(1.375rem, 1.1rem + 1vw, 2rem)/1.25 var(--display); text-wrap: balance; }
:lang(th) .cont h2, :lang(th) .cont h1 { line-height: 1.45; }
.cont p { max-width: 30em; margin: 0 auto 20px; color: var(--on-night-2); }
.cont .note-dark { margin: 12px auto 0; }
.cont .rd-book { display: block; margin-bottom: 8px; color: var(--gold); }
.lock-mark { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; color: var(--gold); }

/* ---------- 分页 ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px; padding: 32px 0 8px; font: 700 1.0625rem/1 var(--display); }
.pager a, .pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 8px; color: var(--ink-2); }
.pager a:hover { color: var(--accent-ink); }
.pager [aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.pager .pg-step { font: 600 .875rem/1 var(--sans); color: var(--ink); }
/* 列表分批加载时隐藏分页（HTML 里保留给搜索引擎 / 无 JS），只显示加载提示 */
.pager.is-lazy { display: none; }
.lazy-status { padding: 28px 0 8px; text-align: center; color: var(--ink-3); font: 600 .8125rem/1 var(--sans); }

/* ---------- 金币 / VIP 商品卡（字段与后台 SKU 详情一一对应） ---------- */
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.product { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 24px 16px 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.product p { margin: 0; }
.product.is-recommend { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.product-badge { position: absolute; top: 0; right: 12px; max-width: 70%; padding: 6px 9px 12px; background: var(--accent); color: #fff; font: 700 .6875rem/1 var(--sans); letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 6px), 0 100%); }
.product-name { padding-right: 36px; font: 800 1.375rem/1.15 var(--display); }
.product-sub { color: var(--ink-2); font-size: .875rem; }
.product-bonus { color: var(--gold-ink); font-weight: 700; font-size: .875rem; }
.product-price { margin-top: 10px !important; font: 700 1.25rem/1.2 var(--sans); }
.product-original { margin-right: 6px; color: var(--ink-3); font-size: .875rem; font-weight: 400; }
.product-footer { margin: auto -16px -16px !important; padding: 8px 12px; background: var(--paper-2); color: var(--accent-ink); font-size: .8125rem; font-weight: 600; }
.product .muted.small { margin-top: 6px; font-size: .8125rem; line-height: 1.45; }
.store-buy { margin-top: 22px; }
/* 网页充值（D88）：金币卡付款按钮贴卡片下部；付款方式文字标注；登录回来时选中的那一档高亮 */
.product-pay { margin-top: auto; padding-top: 14px; }
.product-pay .btn { width: 100%; }
.product--pay .product-footer { margin-top: 12px !important; }
.product.is-picked { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); scroll-margin-top: 96px; }
.pay-methods { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 18px; color: var(--ink-3); font-size: .8125rem; line-height: 1.5; }
.pay-marks { display: inline-flex; gap: 6px; }
.pay-mark { padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .75rem; white-space: nowrap; }
.pay-flash.is-error { border-left-color: var(--accent); }
.product-offer { margin-top: 6px !important; padding: 6px 8px; border-radius: 4px; background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold-ink); font-size: .8125rem; font-weight: 700; line-height: 1.4; }
.vip-active a { font-weight: 600; color: var(--accent-ink); }
.stat-form { margin: 0; }
.shelf-more.linkish { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; font-size: .875rem; color: var(--accent-ink); cursor: pointer; }
.pay-card-flash { margin-top: 8px !important; color: var(--accent-ink); font-size: .8125rem; font-weight: 600; line-height: 1.4; }
/* 付款结果小框（D100）：付款回来后在商品页弹出；无 JS 时是非模态 <dialog open>（固定居中），有 JS 时 showModal 带遮罩 */
.pay-modal { position: fixed; inset: 0; z-index: 60; width: min(calc(100vw - 32px), 360px); height: fit-content; max-height: calc(100vh - 32px); margin: auto; padding: 28px 22px 22px; overflow: auto;
  border: 0; border-radius: 14px; background: var(--surface); color: var(--ink); text-align: center; box-shadow: 0 24px 60px -18px rgba(20, 17, 19, .55), 0 0 0 1px rgba(26, 22, 24, .06); }
.pay-modal:focus { outline: none; }
.pay-modal::backdrop { background: rgba(20, 17, 19, .5); }
.pay-modal-x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--ink-3); }
.pay-modal-x:hover { background: var(--paper-2); color: var(--ink); }
.pay-modal-t { margin-top: 4px; font: 700 1.25rem/1.3 var(--display); }
.pay-modal-body > p { margin-top: 8px; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); }
.pay-modal-big { font: 800 1.375rem/1.3 var(--display); color: var(--ink) !important; }
.pay-modal-actions { margin-top: 18px !important; }
.pay-modal-actions .btn { min-width: 140px; }
.pay-modal-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 10px; border-radius: 50%; }
.pay-modal-icon.is-ok { background: color-mix(in srgb, #1f9d55 14%, transparent); color: #1f7a45; }
.pay-modal-icon.is-unknown { background: var(--paper-2); color: var(--ink-3); }
.pay-modal-icon.is-fail { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-ink); }
.pay-spinner { display: inline-block; width: 40px; height: 40px; margin-bottom: 12px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: pay-spin .9s linear infinite; }
/* 付款票据（D101） */
.pay-receipt { margin: 14px 0 4px; padding: 4px 14px; border-radius: 10px; background: var(--paper-2); text-align: left; font-size: .875rem; }
.pay-receipt > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pay-receipt > div:last-child { border-bottom: 0; }
.pay-receipt dt { flex: none; color: var(--ink-3); }
.pay-receipt dd { margin: 0; min-width: 0; text-align: right; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pay-receipt dd small { display: block; font-weight: 400; color: var(--ink-3); font-size: .75rem; }
.pay-receipt .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8125rem; }
.pay-modal.is-idle .pay-spinner { animation: none; border-top-color: var(--line); }
@keyframes pay-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pay-spinner { animation-duration: 2.4s; } }
.store-panel { padding-top: 24px; }
.store-swipe { position: relative; }
/* 金币 / VIP 分段切换条（D102）：选中的一边有滑块（金币红、VIP 金）；--p 0→1 由 site.js 按滑动进度设置，滑块跟手移动 */
.store-seg { --p: 0; position: relative; display: grid; grid-template-columns: 1fr 1fr; max-width: 440px; margin: 16px 0 6px; padding: 5px; border-radius: 999px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.store-seg-thumb { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px; background: var(--accent);
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--accent) 80%, transparent); transform: translateX(calc(var(--p) * 100%));
  transition: transform .28s var(--ease), background-color .28s var(--ease), box-shadow .28s var(--ease); }
.store-seg[data-current="vip"] .store-seg-thumb { background: linear-gradient(135deg, #E9C46A, var(--gold)); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--gold) 85%, transparent); }
.store-seg.is-dragging .store-seg-thumb { transition: background-color .28s var(--ease); }
.store-seg a { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 999px; color: var(--ink-2); font-weight: 700; font-size: 1.0625rem; letter-spacing: .01em; transition: color .2s var(--ease); }
.store-seg a:hover { color: var(--ink); }
.store-seg a[aria-current] { color: #fff; }
.store-seg[data-current="vip"] a[aria-current] { color: var(--on-gold); }
.store-seg a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .store-seg-thumb { transition: none; } }
.store-panel[hidden] { display: none; }
/* 金币 / VIP 左右滑动切换（11-20）：有 JS 时 site.js 给轨道加 is-swipe；高度跟随当前那一块，免得 VIP 下面留出金币那么高的空白 */
.store-track { position: relative; }
.store-track.is-swipe { display: flex; align-items: flex-start; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; transition: height .25s ease; }
.store-track.is-swipe::-webkit-scrollbar { display: none; }
.store-track.is-swipe > .store-panel { flex: 0 0 100%; min-width: 0; padding-bottom: 28px; scroll-snap-align: start; scroll-snap-stop: always; }
@media (prefers-reduced-motion: reduce) { .store-track.is-swipe { transition: none; } }
/* VIP：划线价放大（11-20），日均价标签（周卡 / 月卡「相当于每天多少钱」） */
.store-panel[data-panel="vip"] .product-original { margin-right: 8px; color: var(--ink-2); font-size: 1.125rem; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.product-per-day { align-self: flex-start; margin-top: 8px !important; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent-ink); font-size: .8125rem; font-weight: 700; line-height: 1.3; }
.footer-links.inline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links.inline a { color: var(--accent-ink); font-weight: 600; }
@media (min-width: 640px) { .products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }

/* ---------- 联系、删号 ---------- */
.info-list { margin: 18px 0 0; }
.info-list > div { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info-list dt { font-weight: 700; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
:lang(th) .info-list dt { text-transform: none; letter-spacing: 0; }
.info-list dd { margin: 0; overflow-wrap: anywhere; }
.info-list a { color: var(--accent-ink); font-weight: 600; }
.shots { display: flex; gap: 12px; overflow-x: auto; }

/* ---------- 卖点 ---------- */
.feats { display: grid; gap: 18px; padding-top: 48px; }
.feat b { display: block; margin-bottom: 6px; font: 800 1.75rem/1 var(--display); color: var(--accent-ink); }
.feat h3 { margin-bottom: 4px; font: 700 1.125rem/1.3 var(--display); }
.feat p { color: var(--ink-2); font-size: .9375rem; }
.feats-title { grid-column: 1 / -1; }
@media (min-width: 640px) { .feats { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (min-width: 960px) { .feats { grid-template-columns: repeat(4, 1fr); gap: 40px; padding-top: 72px; } }

/* ---------- 下载引导条 ---------- */
.get { margin-top: 48px; overflow: hidden; }
.get-grid { position: relative; display: grid; gap: 18px; padding: 36px var(--gutter) 36px 34px; } /* 右侧补回 .wrap 留白；左侧留给书签缎带 */
.get-grid::before { content: ""; position: absolute; left: 0; top: 0; width: 22px; height: 64px; background: var(--accent); clip-path: var(--bookmark); }
.get img { width: 56px; height: 56px; border-radius: 14px; }
.get h2 { margin-bottom: 6px; font: 700 clamp(1.5rem, 1.1rem + 1.4vw, 2.4rem)/1.15 var(--display); }
.get p { max-width: 34em; color: var(--on-night-2); }
@media (min-width: 640px) { .get-grid { grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: 44px var(--gutter) 44px 40px; } }
@media (min-width: 960px) { .get { margin-top: 72px; } }

/* ---------- 下载二维码（D74） ----------
   只在宽屏（≥960）且能悬停的设备显示：手机扫不了自己的屏幕。页头「Get the app」、首屏「Get it on Google Play」悬停 / 聚焦弹出；
   底部深色下载条、下载页常驻。手机上外壳 .qr-pop 透明（display: contents），按钮布局不受影响 */
.qr-pop { display: contents; }
.qr-pop-card, .get-qr, .download-qr { display: none; }
.qr { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; background: #fff; border-radius: 10px; box-shadow: 0 10px 28px -10px rgba(0, 0, 0, .45); }
.qr picture { display: block; }
.qr img { display: block; max-width: none; border-radius: 3px; } /* 不受全局 img max-width:100% 约束（弹出卡片按按钮宽度收缩时会被压小） */
.qr-cap { max-width: 156px; text-align: center; font: 600 .75rem/1.35 var(--sans); color: #4A4347; }
@media (min-width: 960px) and (hover: hover) {
  .qr-pop { position: relative; display: inline-flex; }
  .qr-pop-card { display: block; width: max-content; position: absolute; top: calc(100% + 12px); left: 50%; z-index: 30; pointer-events: none; opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s linear .18s; }
  .qr-pop-card::before { content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; background: #fff; transform: translateX(-50%) rotate(45deg); }
  .top-actions .qr-pop-card { left: auto; right: 0; transform: translate(0, 6px); } /* 页头按钮靠右，卡片右对齐不出屏 */
  .top-actions .qr-pop-card::before { left: auto; right: 34px; transform: rotate(45deg); }
  .top-actions .qr-pop:hover .qr-pop-card, .top-actions .qr-pop:focus-within .qr-pop-card { transform: none; }
  .qr-pop:hover .qr-pop-card, .qr-pop:focus-within .qr-pop-card { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
  .qr-pop--up .qr-pop-card { top: auto; bottom: calc(100% + 12px); transform: translate(-50%, -6px); }
  .qr-pop--up .qr-pop-card::before { top: auto; bottom: -6px; }
  .get-grid { grid-template-columns: auto 1fr auto auto; }
  .get-qr { display: block; }
  .get-qr .qr { padding: 8px; }
  .get .get-qr img { width: 96px; height: 96px; border-radius: 3px; } /* 下载条里 .get img 是给 App 图标的 56px 规则，二维码单独指定 */
  .download-qr { display: block; margin-top: 28px; }
}

/* ---------- 页脚（浅色扁平） ---------- */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); color: var(--ink-2); font-size: .875rem; }
main + .site-footer { margin-top: 48px; }
main:has(> .get:last-child) + .site-footer { margin-top: 0; }
/* 手机阅读页（免费章节）只留正文和章节导航：不显示末免费章的跳转 App 卡片和页脚（11-20 用户要求）；锁章页不受影响 */
@media (max-width: 639px) { body[data-page-type="chapter"] .continue, body[data-page-type="chapter"] .site-footer { display: none; } body[data-page-type="chapter"] .rd-nav { margin-bottom: 24px; } }
.footer-main { display: grid; gap: 14px 32px; padding-top: 20px; padding-bottom: 14px; }
.footer-brand .logo { color: var(--ink); font-size: 1.05rem; }
.footer-brand .logo img { width: 26px; height: 26px; border-radius: 7px; }
.footer-brand p { margin-top: 6px; color: var(--ink-3); font-size: .8125rem; line-height: 1.5; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.footer-nav a:hover { color: var(--accent-ink); }
.footer-social { list-style: none; margin: 10px 0 0; padding: 0; display: flex; gap: 8px; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink-2); }
.footer-social a:hover, .footer-social a:focus-visible { color: var(--accent-ink); border-color: currentColor; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 24px; padding-top: 10px; padding-bottom: 14px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .8rem; }
/* 宽屏: 帮助与条款链接靠右（11-23 用户要求）；手机单栏仍从左排 */
@media (min-width: 640px) { .footer-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } .footer-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 18px; } }

/* ---------- Cookie ---------- */
.cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; padding: 14px 16px; background: var(--surface); border-radius: var(--radius); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .35); border: 1px solid var(--line); }
.cookie p { margin: 0 0 10px; font-size: .875rem; color: var(--ink-2); }
.cookie p a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.cookie-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media (min-width: 640px) { .cookie { left: auto; right: 20px; bottom: 20px; max-width: 420px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- 账号：页头右上角登录模块（未登录 / 已登录） ---------- */
.signin { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--radius); color: var(--on-night); font-size: .875rem; font-weight: 600; background: rgba(255, 255, 255, .04); }
.signin:hover { background: rgba(255, 255, 255, .12); }
.user-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 2px 8px 2px 2px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; color: var(--on-night-2); }
.ava { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(140deg, var(--accent), #7A1424); color: #fff; font: 700 .875rem/1 var(--sans); overflow: hidden; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava--lg { width: 72px; height: 72px; font-size: 1.75rem; box-shadow: 0 0 0 3px var(--gold); }
.user-btn .vip-dot { position: absolute; left: 22px; top: -2px; width: 12px; height: 16px; background: var(--gold); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%); }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 260px; padding: 8px; background: var(--surface, #fff); color: var(--ink); border-radius: var(--radius); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .45); }
.um-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); }
.um-head b { display: block; font-weight: 700; }
.um-head small { color: var(--ink-3); font-size: .8rem; }
.um-coins { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; padding: 10px 12px; background: var(--paper-2); border-radius: 4px; font-size: .875rem; }
.um-coins b { font: 800 1.125rem/1 var(--display); color: var(--gold-ink); }
.um-link { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 10px; border-radius: 4px; font-size: .9375rem; }
.um-link:hover { background: var(--paper-2); }
.um-link.danger { color: var(--accent-ink); }
.top-actions-wrap { position: relative; }
@media (max-width: 639px) { .signin .si-text { display: none; } .signin { padding: 0 9px; } .user-btn .caret { display: none; } }

/* ---------- 登录页 ---------- */
.auth { display: grid; place-items: center; padding: 40px 0 56px; }
.auth-card { width: 100%; max-width: 420px; padding: 32px 24px 26px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .35); }
.auth-card .rd-mark { margin: 0 auto 16px; }
.auth-card h1 { font: 800 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.2 var(--display); margin-bottom: 8px; }
:lang(th) .auth-card h1 { line-height: 1.4; }
.auth-card .lead { color: var(--ink-2); margin-bottom: 22px; }
.auth-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; margin-bottom: 10px; border-radius: var(--radius); font: 600 .9375rem/1 var(--sans); }
.auth-btn svg { flex: none; }
.auth-google { background: #fff; color: #1F1F1F; border: 1px solid #747775; }
.auth-google:hover { background: #F7F8F8; }
.auth-facebook { background: #1877F2; color: #fff; border: 1px solid #1877F2; }
.auth-facebook:hover { background: #166FE5; }
.auth-note { margin-top: 14px; padding: 10px 12px; border-left: 3px solid var(--gold); background: var(--paper-2); color: var(--ink-2); font-size: .8125rem; text-align: left; }
.auth-terms { margin-top: 14px; color: var(--ink-3); font-size: .8125rem; }
.auth-terms a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 个人页 ---------- */
.ph-name { margin-top: 12px; font: 800 clamp(1.375rem, 1.15rem + .8vw, 1.75rem)/1.2 var(--display); }
.ph-id { margin-top: 4px; color: var(--on-night-2); font-size: .875rem; }
.ph-badge { display: inline-flex; margin-top: 10px; }
.linked { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.linked li { display: flex; align-items: center; gap: 12px; min-height: 54px; border-bottom: 1px solid var(--line); }
.linked .st { margin-left: auto; font-size: .8125rem; font-weight: 700; color: var(--ink-3); }
.linked .st.on { color: var(--gold-ink); }

/* ---------- 书架页 ---------- */
.lib-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; margin-top: 18px; }
.lib-item { position: relative; min-width: 0; }
.lib-item .cv { position: relative; display: block; aspect-ratio: 300 / 414; overflow: hidden; border-radius: var(--radius-cover); background: var(--paper-2); box-shadow: var(--shadow-cover); }
.lib-item .cv img { width: 100%; height: 100%; object-fit: cover; }
.lib-progress { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; background: linear-gradient(0deg, rgba(20, 17, 19, .88), transparent); color: #fff; font-size: .75rem; font-weight: 600; }
.lib-rm { position: absolute; top: 6px; right: 6px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(20, 17, 19, .7); color: #fff; cursor: pointer; }
.lib-item .card-t { margin-top: 10px; }
.lib-item .btn { width: 100%; margin-top: 8px; min-height: 38px; font-size: .8125rem; }
@media (min-width: 640px) { .lib-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; } }
@media (min-width: 960px) { .lib-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* 详情页「加入书架」 */
.btn-shelf { color: var(--on-night); border-color: rgba(255, 255, 255, .3); background: transparent; }
.btn-shelf.is-in { color: var(--gold); border-color: var(--gold); }

/* ---------- 账号：落地补充（11-20，T048-2；设计稿用 button，这里页头菜单用 <details>，不靠 JS 也能用） ---------- */
.user-menu-wrap { position: relative; }
.user-menu-wrap > summary { list-style: none; cursor: pointer; }
.user-menu-wrap > summary::-webkit-details-marker { display: none; }
.user-menu-wrap > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.user-menu-wrap[open] .caret { transform: rotate(180deg); }
.user-menu form { margin: 0; }
.user-menu button.um-link { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.user-menu .um-link[aria-current] { font-weight: 700; }
.signin:focus-visible, .auth-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.auth-methods { display: grid; gap: 10px; }
.auth-form { margin: 0; }
.auth-google-slot { display: flex; justify-content: center; min-height: 44px; }
.auth-btn { border: 0; cursor: pointer; }
.auth-btn[disabled] { opacity: .55; cursor: default; }
.auth-error { margin: 0 0 16px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--paper-2); color: var(--accent-ink); font-size: .875rem; text-align: left; }
.auth-status { margin: 4px 0 0; color: var(--ink-2); font-size: .875rem; }
.auth-status[hidden] { display: none; }
.auth-cancel { color: var(--accent-ink); }

/* ---------- T048-3 个人页补充 ---------- */
.ph-main { min-width: 0; }
.ph-name { overflow-wrap: anywhere; }
.ph-badge--vip { background: var(--gold); color: var(--on-gold); }
.linked .lk-fb { display: inline-flex; color: #1877F2; }
.linked .lk-badge { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; background: var(--ink); color: var(--paper); font: 700 .6875rem/1 var(--sans); }

/* ---------- T048-4 书架补充 ---------- */
/* 详情页: 已登录时「Add to library」是表单, 表单本身当一个按钮参与 .bh-cta 的排列 */
.bh-shelf { display: flex; flex: 1 1 100%; margin: 0; }
.bh-shelf .btn { flex: 1 1 auto; }
.btn-shelf:hover { background: rgba(255, 255, 255, .1); }
.btn-shelf.is-in:hover { background: rgba(255, 255, 255, .06); }
.btn-shelf:focus-visible, .lib-rm:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.bh-flash { width: 100%; padding: 8px 12px; border-left: 3px solid var(--gold); background: rgba(255, 255, 255, .08); color: var(--on-night); font-size: .875rem; }
.bh-flash.is-error { border-left-color: var(--accent); }
@media (min-width: 640px) { .bh-shelf { flex: 0 0 auto; } }
/* 书架页 */
.lib-flash { border-left-color: var(--gold); }
.lib-flash.is-error { border-left-color: var(--accent); }
.lib-rm-form { margin: 0; }
.lib-rm:hover { background: var(--accent); }
.lib-item .cv .cover-ph { position: absolute; inset: 0; }
.lib-progress { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-empty { padding-bottom: 8px; }

/* ---------- 个人页（D107）：左栏个人信息卡片，右栏按类型分模块；手机上下排列 ---------- */
.acct-layout { display: grid; gap: 16px; padding-top: 20px; padding-bottom: 8px; }
.acct-card { position: relative; overflow: hidden; padding: 0 20px 20px; border-radius: 14px; text-align: center; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 28px -20px rgba(26, 22, 24, .45); }
/* 卡片顶部的渐变色带（D107 用户「个人信息的背景颜色换下」：由整块深色改为浅色卡片 + 顶部色带），头像压在色带下沿 */
.acct-cover { display: block; height: 76px; margin: 0 -20px; background:
  radial-gradient(120% 140% at 85% 0%, color-mix(in srgb, var(--gold) 55%, transparent) 0%, transparent 55%),
  linear-gradient(135deg, var(--accent) 0%, #7A1424 100%); }
/* 有头像（D108）：色带用头像放大模糊图，压一层轻微暗色让白边头像更突出；没有头像保留上面的渐变 */
.acct-cover { position: relative; overflow: hidden; }
.acct-cover.has-img { background: var(--night-2); }
.acct-cover img { position: absolute; inset: -40%; width: 180%; height: 180%; object-fit: cover; filter: blur(22px) saturate(1.35) brightness(.85); }
.acct-cover.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 17, 19, .05), rgba(20, 17, 19, .25)); }
.acct-card .ava--lg { position: relative; margin: -38px auto 0; box-shadow: 0 0 0 4px var(--surface), 0 6px 16px -6px rgba(26, 22, 24, .45); }
.acct-card .ph-name { color: var(--ink); }
.acct-card .ph-id { color: var(--ink-3); }
.acct-card .ph-badge { margin-top: 10px; }
.acct-mini { display: flex; justify-content: center; gap: 0; margin: 18px 0 0; border-top: 1px solid var(--line); padding-top: 14px; }
.acct-mini > div { flex: 1; }
.acct-mini > div + div { border-left: 1px solid var(--line); }
.acct-mini dt { color: var(--ink-3); font-size: .75rem; }
.acct-mini dd { margin: 2px 0 0; font: 800 1.375rem/1.2 var(--display); color: var(--ink); }
.acct-signout { margin: 18px 0 0; }
.acct-main { display: grid; gap: 16px; min-width: 0; }
.acct-main > .notice { margin: 0; }
.acct-grid { display: grid; gap: 16px; }
.acct-mod { padding: 18px 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.acct-mod-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acct-mod-h { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
:lang(th) .acct-mod-h { text-transform: none; letter-spacing: 0; font-size: .9375rem; }
.acct-big { margin: 8px 0 4px; font: 800 2rem/1.1 var(--display); }
.acct-big--text { font-size: 1.375rem; line-height: 1.25; }
.acct-mod .btn-sm { margin-top: 12px; }
.acct-mod .stat-form { display: inline-block; }
.acct-mod--row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.acct-mod--row .btn-sm { margin-top: 0; flex: none; }
.acct-mod--danger { border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.acct-mod .linked { margin-top: 10px; }
.del-pending { color: var(--accent-ink); font-weight: 600; }
/* 订单记录（D106）：一行一单，点开看票据 */
.orders { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--line); }
.order { border-bottom: 1px solid var(--line); }
.order summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; cursor: pointer; list-style: none; }
.order summary::-webkit-details-marker { display: none; }
.order summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.order-main { display: grid; min-width: 0; }
.order-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-main small { color: var(--ink-3); font-size: .8125rem; }
.order-side { display: grid; justify-items: end; gap: 2px; flex: none; }
.order-side b { font-weight: 700; }
.ord-st { padding: 1px 8px; border-radius: 999px; font-size: .6875rem; font-weight: 700; background: var(--paper-2); color: var(--ink-3); }
.ord-st--paid { background: color-mix(in srgb, #1f9d55 14%, transparent); color: #1f7a45; }
.ord-st--pending { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-ink); }
.ord-st--failed, .ord-st--refunded { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-ink); }
.order[open] summary, .order details[open] summary { border-bottom: 1px dashed var(--line); }
.order .pay-receipt { margin: 10px 0 14px; }
.acct-orders .page-title { margin: 6px 0 4px; }
/* 网页注销（D105）：手动输入 DELETE */
.del-box { margin-top: 32px; padding: 20px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 12px; background: var(--surface); scroll-margin-top: 90px; }
.del-box .section-h { margin-top: 0; }
.del-box p + p, .del-box p + form { margin-top: 10px; }
.del-form { display: grid; gap: 8px; max-width: 360px; margin-top: 14px; }
.del-form label { font-weight: 600; font-size: .9375rem; }
.del-form input { min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font: 600 1rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.del-form input::placeholder { color: var(--ink-3); opacity: .45; font-weight: 400; }
.del-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.del-form button[disabled] { opacity: .45; cursor: not-allowed; }
@media (min-width: 720px) { .acct-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) {
  .acct-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 32px; }
  .acct-side { position: sticky; top: 88px; }
}
.btn.acct-delete { border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); background: transparent; color: var(--accent-ink); }
.btn.acct-delete:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
