/* ==========================================================================
   三只猫书屋 / meow-novel
   手绘涂鸦风小说主题 · 奶油白 + 明黄 + 黑色粗描边
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root{
  --paper:#FFF8E7;
  --paper-2:#FFF1CF;
  --card:#FFFDF7;
  --ink:#1A1611;
  --accent:#FFD84D;
  --accent-2:#FF9E3D;
  --tint-1:#FFD84D;
  --tint-2:#FFBDB0;
  --tint-3:#A9DDCB;
  --tint-4:#C8C2F6;
  --muted:#7B6E5C;
  --line:var(--ink);
  --line-w:3px;
  --shadow-color:var(--ink);
  --on-accent:#1A1611;
  --on-cover:#1A1611;
  --cover-glow:rgba(255,255,255,.55);
  --dot:rgba(26,22,17,.14);

  --radius:18px;
  --radius-sm:12px;
  --shadow:5px 5px 0 var(--shadow-color);
  --shadow-sm:3px 3px 0 var(--shadow-color);
  --header-h:70px;
  --wrap:1120px;

  --font-body:-apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-head:"LXGW WenKai Screen", "LXGW WenKai", "Kaiti SC", "KaiTi", "STKaiti", "Songti SC", serif;
  --font-round:"Yuanti SC", "YouYuan", "Hiragino Maru Gothic ProN", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif:"Songti SC", "SimSun", "Noto Serif SC", "Source Han Serif SC", serif;

  --reader-size:var(--reader-size-base, 18px);
  --reader-lh:var(--reader-lh-base, 1.9);
  --ease:cubic-bezier(.2,.8,.25,1);
}

/* 猫咪配色：奶油橘猫（默认） */
html[data-cat="orange"]{
  --paper:#FFF8E7; --paper-2:#FFF1CF; --card:#FFFDF7;
  --ink:#1A1611; --accent:#FFD84D; --accent-2:#FF9E3D;
  --tint-1:#FFD84D; --tint-2:#FFBDB0; --tint-3:#A9DDCB; --tint-4:#C8C2F6;
  --muted:#7B6E5C; --dot:rgba(26,22,17,.13);
}
/* 猫咪配色：薄荷狸花 */
html[data-cat="mint"]{
  --paper:#F7FBF1; --paper-2:#EAF4DE; --card:#FDFFF9;
  --ink:#17211A; --accent:#CDE9A4; --accent-2:#79BE84;
  --tint-1:#CDE9A4; --tint-2:#BFE3D2; --tint-3:#FFE28A; --tint-4:#D9D3F7;
  --muted:#5F7364; --dot:rgba(23,33,26,.12);
}
/* 猫咪配色：深夜黑猫 */
html[data-cat="ink"]{
  --paper:#16130F; --paper-2:#1F1B15; --card:#1C1812;
  --ink:#F7EFDD; --accent:#FFD84D; --accent-2:#FFB03A;
  --tint-1:#5E4C22; --tint-2:#5C3A31; --tint-3:#2A5147; --tint-4:#3B3760;
  --muted:#B5A78E; --line:var(--ink); --shadow-color:rgba(0,0,0,.65);
  --dot:rgba(247,239,221,.10); --on-accent:#1A1611;
  --on-cover:#F7EFDD; --cover-glow:rgba(0,0,0,.5);
}

/* 英文界面：换成拉丁优先的字体栈，避免中文宋体渲染西文 */
html[lang="en"]{
  --font-head:"Trebuchet MS", "Segoe UI", "Gill Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif:Georgia, "Iowan Old Style", "Songti SC", "Noto Serif SC", "SimSun", serif;
  --font-round:"Trebuchet MS", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
html[lang="en"] .hero-title{ letter-spacing:-.015em; }
html[lang="en"] .brand-name{ letter-spacing:0; }
html[lang="en"] .chapter-title{ letter-spacing:0; }
html[lang="en"] .reader{ text-indent:0; }
html[lang="en"] .reader-bar{ gap:10px; }
html[lang="en"] .rb-group{ gap:3px; }
html[lang="en"] .rb-label{ font-size:10.5px; letter-spacing:0; margin-right:0; }
html[lang="en"] .rb-btn{ padding:3px 7px; font-size:12px; }
html[lang="en"] .rb-btn--icon{ padding:3px 6px; }
html[lang="en"] .rb-btn--icon .icon{ width:14px; height:14px; }

html[data-outline="medium"]{ --line-w:2px; }
html[data-outline="thin"]{ --line-w:1.5px; }
html[data-heading="round"]{ --font-head:var(--font-round); }
html[data-heading="serif"]{ --font-head:var(--font-serif); }

/* ---------- 2. 基础重置 ---------- */
*,*::before,*::after{ box-sizing:border-box; }
[hidden]{ display:none !important; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  background-color:var(--paper);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.75;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
html[data-texture="on"] body{
  background-image:
    radial-gradient(circle at 14% 4%, color-mix(in srgb, var(--accent) 34%, transparent) 0, transparent 32%),
    radial-gradient(var(--dot) 1px, transparent 1px);
  background-size:auto, 22px 22px;
  background-attachment:fixed, fixed;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; }
h1,h2,h3,h4{ margin:0; font-family:var(--font-head); font-weight:800; line-height:1.25; letter-spacing:.01em; }
p{ margin:0; }
ul,ol{ margin:0; padding:0; list-style:none; }
::selection{ background:var(--accent); color:var(--on-accent); }

.icon{ width:20px; height:20px; flex:none; display:inline-block; vertical-align:middle; }
.dot{ opacity:.5; margin:0 6px; }
.wrap{ width:100%; max-width:var(--wrap); margin:0 auto; padding:0 24px; }
.site-main{ flex:1 0 auto; }
.skip-link{
  position:absolute; left:-9999px; top:0; z-index:200;
  background:var(--accent); color:var(--on-accent); padding:10px 18px; border-radius:0 0 12px 0;
}
.skip-link:focus{ left:0; }
:focus-visible{ outline:3px dashed var(--accent-2); outline-offset:3px; }

/* ---------- 3. 通用组件 ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 22px;
  background:var(--card);
  color:var(--ink);
  border:var(--line-w) solid var(--line);
  border-radius:999px;
  font-weight:800;
  font-size:15px;
  box-shadow:var(--shadow-sm);
  cursor:pointer;
  transition:transform .16s var(--ease), box-shadow .16s var(--ease), background .16s;
  white-space:nowrap;
}
.btn:hover{ transform:translate(-2px,-2px); box-shadow:5px 5px 0 var(--shadow-color); }
.btn:active{ transform:translate(2px,2px); box-shadow:1px 1px 0 var(--shadow-color); }
.btn--primary{ background:var(--accent); color:var(--on-accent); }
.btn--ghost{ background:transparent; }
.btn--sm{ padding:7px 14px; font-size:13px; }
.btn--shelf.is-saved{ background:var(--accent); color:var(--on-accent); }
.btn .icon{ width:18px; height:18px; }

.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px;
  background:var(--card);
  border:var(--line-w) solid var(--line);
  border-radius:12px;
  box-shadow:2px 2px 0 var(--shadow-color);
  cursor:pointer;
  transition:transform .15s var(--ease);
}
.icon-btn:hover{ transform:translateY(-2px) rotate(-3deg); }
.icon-btn .icon{ width:19px; height:19px; }

.chip{
  display:inline-flex; align-items:center;
  padding:3px 11px;
  font-size:12.5px; font-weight:700;
  border:2px solid var(--line);
  border-radius:999px;
  background:var(--card);
  white-space:nowrap;
}
.chip--book{ background:var(--accent); color:var(--on-accent); }
.chip--hot{ background:var(--accent-2); color:var(--on-accent); }
.chip--ghost{ background:transparent; color:var(--muted); border-color:color-mix(in srgb, var(--line) 55%, transparent); }

.sticker{
  display:inline-block;
  padding:5px 15px;
  font-size:12.5px; font-weight:800; letter-spacing:.08em;
  background:var(--accent); color:var(--on-accent);
  border:2.5px solid var(--line);
  border-radius:999px;
  box-shadow:2px 2px 0 var(--shadow-color);
}
.sticker--tilt{ transform:rotate(-2.5deg); }

.section{ padding-top:56px; padding-bottom:56px; scroll-margin-top:calc(var(--header-h) + 20px); }
.section-head{ display:flex; flex-wrap:wrap; align-items:baseline; gap:10px 16px; margin-bottom:26px; }
.section-title{
  font-size:clamp(24px,3.6vw,32px);
  display:inline-flex; align-items:center;
}
.section-title .hl{
  position:relative;
  padding:0 4px;
  background-image:linear-gradient(transparent 58%, var(--accent) 58%, var(--accent) 94%, transparent 94%);
  background-repeat:no-repeat;
  background-size:100% 100%;
}
.section-note{ font-size:13.5px; color:var(--muted); }

.link-btn{
  background:none; border:none; padding:0;
  font-size:13px; font-weight:700; color:var(--muted);
  text-decoration:underline; text-underline-offset:4px; text-decoration-style:wavy;
  cursor:pointer;
}
.link-btn:hover{ color:var(--ink); }

.empty-card{
  border:var(--line-w) dashed var(--line);
  border-radius:var(--radius);
  padding:38px 26px;
  text-align:center;
  background:color-mix(in srgb, var(--card) 70%, transparent);
}
.empty-card h3{ font-size:20px; margin-bottom:6px; }
.empty-card p{ color:var(--muted); font-size:14px; }
.empty-cat{ width:88px; height:88px; margin:0 auto 12px; }
.ec-stroke{ fill:none; stroke:var(--ink); stroke-width:3.4; stroke-linecap:round; stroke-linejoin:round; }
.catalog-empty{ text-align:center; color:var(--muted); padding:26px 0; font-size:14px; }

.pager{ display:flex; justify-content:center; gap:14px; margin-top:34px; }

.prose-clamp{ max-height:9.6em; overflow:hidden; position:relative; }
.prose-clamp::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:3em;
  background:linear-gradient(transparent, var(--paper));
}

/* ---------- 4. 顶部导航 ---------- */
.read-progress{
  position:fixed; left:0; right:0; top:calc(var(--header-h) - 2px);
  height:4px; z-index:65; background:transparent; pointer-events:none;
}
.read-progress i{
  display:block; height:100%; width:0;
  background:var(--accent-2);
  border-radius:0 4px 4px 0;
  box-shadow:0 0 0 1px color-mix(in srgb, var(--line) 30%, transparent);
  transition:width .1s linear;
}
body:not(.is-post) .read-progress{ display:none; }

.site-header{
  position:sticky; top:0; z-index:60;
  background:color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter:blur(10px) saturate(1.1);
  border-bottom:var(--line-w) solid var(--line);
}
.header-inner{
  max-width:var(--wrap); margin:0 auto; padding:0 24px;
  height:var(--header-h);
  display:flex; align-items:center; gap:18px;
}
.brand{ display:flex; align-items:center; gap:10px; flex:none; }
.brand-mark{
  width:38px; height:38px; flex:none;
  background:var(--accent);
  border:var(--line-w) solid var(--line);
  border-radius:12px 14px 11px 15px;
  box-shadow:2px 2px 0 var(--shadow-color);
  transform:rotate(-4deg);
  display:grid; place-items:center;
  transition:transform .2s var(--ease);
}
.brand:hover .brand-mark{ transform:rotate(4deg) scale(1.05); }
.brand-mark svg{ width:26px; height:26px; }
.bm-ear,.bm-head{ fill:var(--card); stroke:var(--line); stroke-width:3; stroke-linejoin:round; }
.brand-text{ display:flex; flex-direction:column; line-height:1.1; min-width:0; }
.brand-name{ font-family:var(--font-head); font-size:19px; font-weight:800; letter-spacing:.02em; white-space:nowrap; }
.brand-sub{ font-size:11px; color:var(--muted); margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:190px; }

.site-nav{ display:flex; align-items:center; gap:4px; margin-left:auto; }
.nav-link{
  position:relative;
  padding:8px 12px;
  font-size:14.5px; font-weight:700;
  border-radius:10px;
  transition:background .15s;
}
.nav-link:hover{ background:var(--paper-2); }
.nav-link.is-active::after{
  content:""; position:absolute; left:12px; right:12px; bottom:2px; height:4px;
  background:var(--accent); border-radius:3px; transform:rotate(-1.2deg);
}
.nav-foot{ display:none; }

.header-tools{ display:flex; align-items:center; gap:8px; margin-left:auto; }
.site-nav + .header-tools{ margin-left:0; }

.cat-switch{
  display:flex; align-items:center; gap:2px;
  padding:3px;
  background:var(--paper-2);
  border:2.5px solid var(--line);
  border-radius:999px;
}
.cat-chip{
  width:34px; height:30px; padding:0;
  background:none; border:none; cursor:pointer;
  display:grid; place-items:center;
  border-radius:999px;
  transition:background .15s, transform .15s var(--ease);
}
.cat-chip svg{ width:26px; height:26px; }
.cat-chip:hover{ transform:translateY(-2px) rotate(-6deg); }
.cat-chip.is-active{ background:var(--card); box-shadow:inset 0 0 0 2px var(--line); }
.cf-ear{ fill:var(--cf,#FFB05C); stroke:currentColor; stroke-width:2.8; stroke-linejoin:round; }
.cf-head{ fill:var(--cf,#FFB05C); stroke:currentColor; stroke-width:2.8; stroke-linejoin:round; }
.cf-stripe{ fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; opacity:.55; }
.cf-eye{ fill:currentColor; }
.cf-eye--glow{ fill:#FFD84D; }
.cf-nose{ fill:currentColor; }
.cat-chip[data-cat-btn="orange"]{ --cf:#FFB462; color:#3A2A16; }
.cat-chip[data-cat-btn="mint"]{ --cf:#B9DAA6; color:#25402F; }
.cat-chip[data-cat-btn="ink"]{ --cf:#3A342C; color:#E9DFC8; }

.menu-btn{ display:none; }
.menu-btn .icon-close{ display:none; }
body.nav-open .menu-btn .icon-menu{ display:none; }
body.nav-open .menu-btn .icon-close{ display:block; }

/* ---------- 5. 首页 Hero ---------- */
.hero{ padding:52px 0 24px; position:relative; overflow:hidden; }
.hero-grid{
  max-width:var(--wrap); margin:0 auto; padding:0 24px;
  display:grid; grid-template-columns:1.15fr .85fr; gap:20px; align-items:center;
}
.hero-copy{ position:relative; z-index:2; }
.hero-title{
  font-size:clamp(38px,6.4vw,72px);
  line-height:1.05;
  margin:16px 0 12px;
  letter-spacing:.01em;
}
.hero-title-line{
  display:inline-block;
  text-shadow:4px 4px 0 color-mix(in srgb, var(--accent) 85%, transparent);
}
.hero-underline{ display:block; width:min(320px,72%); height:14px; margin-top:2px; color:var(--accent-2); }
.hero-desc{
  font-size:clamp(15px,1.7vw,17.5px);
  color:var(--muted);
  max-width:44ch;
  line-height:1.85;
}
.hero-actions{ display:flex; flex-wrap:wrap; gap:12px; margin:24px 0 26px; }
.hero-stats{ display:flex; gap:26px; }
.hero-stats li{ display:flex; flex-direction:column; line-height:1.2; }
.hero-stats strong{ font-family:var(--font-head); font-size:26px; }
.hero-stats span{ font-size:11.5px; color:var(--muted); letter-spacing:.06em; }

.hero-art{ position:relative; min-height:300px; display:grid; place-items:center; }
.hero-blob{
  position:absolute; inset:6% 2% 4% 6%;
  background:var(--accent);
  border:var(--line-w) solid var(--line);
  border-radius:58% 42% 46% 54% / 48% 52% 48% 52%;
  transform:rotate(-5deg);
  opacity:.9;
}
html[data-cat="ink"] .hero-blob{ opacity:.85; }
.hero-cat{ position:relative; width:min(100%,330px); height:auto; }
.hc-fill{ fill:var(--card); stroke:var(--ink); stroke-width:4; stroke-linejoin:round; stroke-linecap:round; }
.hc-ear{ fill:var(--card); }
.hc-line{ fill:none; stroke:var(--ink); stroke-width:4; stroke-linecap:round; stroke-linejoin:round; }
.hc-whisker{ stroke-width:3.2; }
.hc-nose{ fill:var(--ink); }
.hc-text{ stroke:var(--ink); stroke-width:2.4; stroke-linecap:round; opacity:.5; }
.hc-book-bg{ fill:var(--accent); stroke:var(--ink); stroke-width:4; stroke-linejoin:round; }
.hc-spark{ fill:var(--accent-2); stroke:var(--ink); stroke-width:2.6; stroke-linejoin:round; }
.hero-tag{
  position:absolute;
  padding:5px 12px;
  font-size:12px; font-weight:800;
  background:var(--card);
  border:2.5px solid var(--line);
  border-radius:999px;
  box-shadow:2px 2px 0 var(--shadow-color);
  white-space:nowrap;
}
.hero-tag--1{ top:10%; right:2%; transform:rotate(7deg); background:var(--tint-2); color:var(--on-cover); }
.hero-tag--2{ bottom:16%; left:-2%; transform:rotate(-6deg); }
.hero-tag--3{ bottom:2%; right:8%; transform:rotate(3deg); background:var(--accent); color:var(--on-accent); }

/* 我的书架条 */
.shelf-strip{ background:var(--paper-2); border-top:2.5px dashed var(--line); border-bottom:2.5px dashed var(--line); padding:22px 0; }
.shelf-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.shelf-title{ display:flex; align-items:center; gap:8px; font-size:17px; }
.shelf-title .icon{ width:18px; height:18px; color:var(--accent-2); }
.shelf-grid{ display:flex; gap:10px; overflow-x:auto; padding-bottom:6px; scrollbar-width:thin; }
.shelf-card{
  display:flex; align-items:center; gap:10px;
  padding:9px 14px 9px 10px;
  background:var(--card);
  border:2.5px solid var(--line);
  border-radius:12px;
  box-shadow:2px 2px 0 var(--shadow-color);
  flex:none;
  transition:transform .15s var(--ease);
}
.shelf-card:hover{ transform:translateY(-2px); }
.shelf-card-dot{ width:26px; height:26px; border-radius:8px; background:var(--accent); border:2px solid var(--line); flex:none; }
.shelf-card-name{ font-size:13.5px; font-weight:700; white-space:nowrap; }
.shelf-card-del{
  width:22px; height:22px; border-radius:50%;
  border:2px solid var(--line); background:var(--card);
  display:grid; place-items:center; cursor:pointer; flex:none;
}
.shelf-card-del .icon{ width:11px; height:11px; }

/* ---------- 6. 书籍卡片 ---------- */
.book-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(196px, 1fr));
  gap:26px 22px;
}
.book-card{
  display:flex; flex-direction:column; gap:12px;
  transform:rotate(var(--r,0deg));
  transition:transform .2s var(--ease);
}
.book-card:nth-child(4n+1){ --r:-.8deg; }
.book-card:nth-child(4n+3){ --r:.7deg; }
.book-card:hover{ transform:translateY(-6px) rotate(0deg); }
.book-cover{
  position:relative;
  display:block;
  aspect-ratio:3 / 4;
  background:var(--tint-1);
  border:var(--line-w) solid var(--line);
  border-radius:8px 16px 10px 14px;
  box-shadow:var(--shadow);
  padding:20px 16px;
  overflow:hidden;
  transition:box-shadow .2s var(--ease);
}
.book-card:hover .book-cover{ box-shadow:9px 9px 0 var(--shadow-color); }
.book-card:nth-child(4n+2) .book-cover{ background:var(--tint-2); }
.book-card:nth-child(4n+3) .book-cover{ background:var(--tint-3); }
.book-card:nth-child(4n) .book-cover{ background:var(--tint-4); }
.book-cover::before{
  content:""; position:absolute; inset:0;
  background-image:repeating-linear-gradient(-45deg, color-mix(in srgb, var(--line) 8%, transparent) 0 2px, transparent 2px 9px);
  pointer-events:none;
}
.book-cover::after{
  content:""; position:absolute; left:0; top:0; bottom:0; width:12px;
  border-right:2px solid color-mix(in srgb, var(--line) 60%, transparent);
  background:color-mix(in srgb, var(--line) 10%, transparent);
}
.book-cover-tape{
  position:absolute; top:-6px; left:50%; width:64px; height:18px;
  transform:translateX(-50%) rotate(-3deg);
  background:color-mix(in srgb, var(--paper) 55%, var(--card));
  border:1.5px solid color-mix(in srgb, var(--line) 40%, transparent);
  opacity:.8;
}
.book-cover-cat{
  position:absolute; top:14px; right:12px;
  width:26px; height:26px; display:grid; place-items:center;
  color:color-mix(in srgb, var(--on-cover) 65%, transparent);
}
.book-cover-cat .icon{ width:20px; height:20px; }
.book-cover-name{
  position:relative;
  display:block;
  margin-top:14px;
  padding-left:6px;
  font-family:var(--font-head);
  font-size:clamp(19px,2.4vw,26px);
  font-weight:800;
  line-height:1.25;
  color:var(--on-cover);
  text-shadow:1.5px 1.5px 0 var(--cover-glow);
  word-break:break-word;
  transform:rotate(-1.5deg);
  max-height:5.2em;
  overflow:hidden;
}
.book-cover-rule{ display:block; width:34px; height:4px; background:var(--on-cover); border-radius:3px; margin:12px 0 0 6px; opacity:.7; transform:rotate(-2deg); }
.book-cover-count{
  position:absolute; left:24px; bottom:14px;
  font-size:11.5px; font-weight:800; letter-spacing:.06em;
  color:var(--on-cover);
  background:color-mix(in srgb, var(--card) 55%, transparent);
  border:1.5px solid color-mix(in srgb, var(--line) 45%, transparent);
  border-radius:999px; padding:2px 9px;
}
.book-info{ display:flex; align-items:center; justify-content:space-between; gap:6px; padding:0 3px; }
.book-name{ font-family:var(--font-head); font-size:16px; line-height:1.35; }
.book-meta{ font-size:12.5px; color:var(--muted); }
.book-state{
  font-size:10.5px; font-weight:700; letter-spacing:.04em;
  color:var(--muted);
  border:1.5px dashed color-mix(in srgb, var(--line) 40%, transparent);
  border-radius:999px; padding:1px 7px;
}

/* ---------- 7. 更新列表 ---------- */
.section--updates{ background:color-mix(in srgb, var(--paper-2) 55%, transparent); border-top:2.5px dashed var(--line); }
.update-list{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; }
.update-item{
  display:flex; gap:16px; align-items:flex-start;
  padding:16px 18px;
  background:var(--card);
  border:var(--line-w) solid var(--line);
  border-radius:14px 18px 13px 19px;
  box-shadow:var(--shadow-sm);
  transition:transform .16s var(--ease), box-shadow .16s var(--ease);
}
.update-item:hover{ transform:translate(-2px,-2px); box-shadow:6px 6px 0 var(--shadow-color); }
.update-thumb{
  width:64px; height:82px; flex:none;
  border:2.5px solid var(--line);
  border-radius:6px 12px 8px 10px;
  background:var(--tint-1);
  overflow:hidden;
  display:grid; place-items:center;
}
.update-item:nth-child(4n+2) .update-thumb{ background:var(--tint-2); }
.update-item:nth-child(4n+3) .update-thumb{ background:var(--tint-3); }
.update-item:nth-child(4n) .update-thumb{ background:var(--tint-4); }
.update-thumb img{ width:100%; height:100%; object-fit:cover; }
.update-thumb-doodle{
  font-family:var(--font-head); font-size:26px; font-weight:800;
  color:color-mix(in srgb, var(--on-cover) 75%, transparent);
  transform:rotate(-4deg);
}
.update-body{ min-width:0; flex:1; }
.update-tags{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:5px; }
.update-title{ font-size:17.5px; line-height:1.45; }
.update-title a{ background-image:linear-gradient(transparent 72%, color-mix(in srgb, var(--accent) 70%, transparent) 72%); background-size:0% 100%; background-repeat:no-repeat; transition:background-size .25s var(--ease); }
.update-title a:hover{ background-size:100% 100%; }
.update-foot{ display:flex; align-items:center; font-size:12.5px; color:var(--muted); margin-top:6px; }
.update-cta{ display:inline-flex; align-items:center; gap:2px; font-weight:700; color:var(--ink); }
.update-cta .icon{ width:14px; height:14px; }

/* ---------- 8. 页面标题（列表页） ---------- */
.page-hero{ padding:46px 0 10px; }
.page-title{ font-size:clamp(30px,5vw,46px); margin:14px 0 10px; }
.page-desc{ color:var(--muted); font-size:14.5px; max-width:52ch; }

/* ---------- 9. 书籍详情页 ---------- */
.book-hero{ position:relative; padding:44px 0 40px; background:color-mix(in srgb, var(--paper-2) 60%, transparent); border-bottom:2.5px dashed var(--line); overflow:hidden; }
.book-hero-inner{ display:grid; grid-template-columns:220px 1fr; gap:40px; align-items:center; }
.book-hero-cover{
  position:relative;
  aspect-ratio:3 / 4;
  background:var(--accent);
  border:var(--line-w) solid var(--line);
  border-radius:10px 18px 12px 16px;
  box-shadow:7px 7px 0 var(--shadow-color);
  padding:20px 16px;
  transform:rotate(-2deg);
  overflow:hidden;
  display:block;
}
.book-hero-cover.has-image{ padding:0; background:var(--paper-2); }
.book-hero-cover.has-image .bhc-name,
.book-hero-cover.has-image .bhc-paw,
.book-hero-cover.has-image .bhc-lines{ display:none; }
.book-hero-cover img{ width:100%; height:100%; object-fit:cover; }
.bhc-tape{ position:absolute; top:-6px; left:50%; width:78px; height:20px; transform:translateX(-50%) rotate(-3deg); background:color-mix(in srgb, #fff 60%, var(--paper)); border:1.5px solid color-mix(in srgb, var(--line) 40%, transparent); opacity:.85; }
.bhc-name{
  display:block; margin-top:12px;
  font-family:var(--font-head); font-size:clamp(22px,2.6vw,30px); font-weight:800;
  color:var(--on-cover); line-height:1.25;
  text-shadow:2px 2px 0 var(--cover-glow);
  transform:rotate(-1.5deg);
  max-height:4.6em; overflow:hidden;
}
.bhc-paw{ position:absolute; right:12px; top:14px; color:color-mix(in srgb, var(--on-cover) 55%, transparent); }
.bhc-paw .icon{ width:22px; height:22px; }
.bhc-lines{
  position:absolute; left:24px; right:24px; bottom:26px; height:38px;
  background-image:repeating-linear-gradient(to bottom, color-mix(in srgb, var(--on-cover) 30%, transparent) 0 2px, transparent 2px 12px);
}
.book-hero-body{ min-width:0; }
.book-hero-title{ font-size:clamp(28px,4.4vw,44px); margin:14px 0 12px; }
.book-hero-meta{ display:flex; flex-wrap:wrap; gap:7px; margin-bottom:16px; }
.book-hero-desc{ color:var(--muted); font-size:14.5px; line-height:1.9; max-width:60ch; }
.book-hero-desc .prose-clamp{ max-height:none; overflow:visible; height:auto; }
.book-hero-desc .prose-clamp::after{ display:none; }
.book-hero-fallback{ color:var(--muted); }
.book-hero-desc:has(.prose-clamp) .book-hero-fallback{ display:none; }
.book-hero-actions{ display:flex; flex-wrap:wrap; gap:10px; margin-top:22px; }
.book-hero-stripes{
  position:absolute; right:-40px; bottom:-40px; width:220px; height:220px;
  background:repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent) 45%, transparent) 0 10px, transparent 10px 22px);
  border-radius:50%; opacity:.6;
}

.catalog-head{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:12px; margin-bottom:18px;
  padding-bottom:14px; border-bottom:2.5px dashed var(--line);
}
.catalog-title-wrap{ display:flex; align-items:baseline; gap:12px; }
.catalog-title{ font-size:24px; }
.catalog-count{ font-size:12.5px; color:var(--muted); }
.catalog-tools{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.catalog-search{
  display:flex; align-items:center; gap:8px;
  padding:8px 14px;
  background:var(--card);
  border:2.5px solid var(--line);
  border-radius:999px;
  box-shadow:2px 2px 0 var(--shadow-color);
  min-width:210px;
}
.catalog-search .icon{ width:16px; height:16px; color:var(--muted); }
.catalog-search input{
  border:none; background:none; outline:none; width:100%;
  font-size:13.5px; color:var(--ink); font-family:inherit;
}
.catalog-sort{
  padding:8px 12px;
  background:var(--card);
  border:2.5px solid var(--line);
  border-radius:12px;
  font-size:13px; font-weight:700; font-family:inherit;
  box-shadow:2px 2px 0 var(--shadow-color);
  cursor:pointer;
  color:var(--ink);
}
.chapter-list{ display:flex; flex-direction:column; gap:8px; }
.chapter-item a{
  display:flex; align-items:center; gap:10px;
  padding:13px 16px;
  background:var(--card);
  border:2.5px solid var(--line);
  border-radius:12px;
  transition:transform .14s var(--ease), background .14s;
}
.chapter-item a:hover{ transform:translateX(4px) rotate(-.3deg); background:var(--paper-2); }
.ch-mark{ color:var(--accent-2); display:grid; place-items:center; }
.ch-mark .icon{ width:16px; height:16px; }
.ch-title{ flex:1; min-width:0; font-size:15px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ch-badge{
  font-size:10.5px; font-weight:800; letter-spacing:.05em;
  padding:1px 7px; border-radius:999px;
  background:var(--accent); color:var(--on-accent);
  border:1.5px solid var(--line);
}
.ch-badge--top{ background:var(--accent-2); }
.ch-date{ font-size:12px; color:var(--muted); flex:none; }

.section--other{ padding-top:20px; }
.other-books{ display:flex; flex-wrap:wrap; gap:10px; }
.other-book{
  display:inline-flex; align-items:baseline; gap:8px;
  padding:9px 16px;
  background:var(--card);
  border:2.5px solid var(--line);
  border-radius:999px;
  box-shadow:2px 2px 0 var(--shadow-color);
  transition:transform .15s var(--ease);
}
.other-book:hover{ transform:translateY(-3px) rotate(-1deg); }
.other-book-name{ font-size:14px; font-weight:700; }
.other-book-count{ font-size:11.5px; color:var(--muted); }

.section--tip{ padding-top:0; }
.tip-card{
  display:flex; gap:16px; align-items:flex-start;
  padding:22px 24px;
  background:color-mix(in srgb, var(--accent) 22%, var(--card));
  border:var(--line-w) dashed var(--line);
  border-radius:var(--radius);
}
.tip-cat{ color:var(--accent-2); flex:none; }
.tip-cat .icon{ width:28px; height:28px; }
.tip-title{ font-size:16px; margin-bottom:6px; }
.tip-text{ font-size:13.5px; color:var(--muted); line-height:1.85; }

/* ---------- 10. 阅读页 ---------- */
.chapter{ padding-bottom:20px; }
.chapter-wrap{ width:100%; max-width:790px; margin:0 auto; padding:26px 24px 60px; }
.crumbs{
  display:flex; flex-wrap:wrap; align-items:center; gap:6px;
  font-size:12.5px; color:var(--muted); margin-bottom:22px;
}
.crumbs a:hover{ color:var(--ink); text-decoration:underline; text-decoration-style:wavy; text-underline-offset:4px; }
.crumb-sep{ opacity:.45; }
.crumb-now{ color:var(--ink); font-weight:700; }

.chapter-head{ margin-bottom:20px; }
.chapter-labels{ display:flex; flex-wrap:wrap; gap:7px; margin-bottom:14px; }
.chapter-title{ font-size:clamp(26px,4.4vw,38px); line-height:1.28; }
.chapter-meta{ display:flex; flex-wrap:wrap; align-items:center; font-size:12.5px; color:var(--muted); margin-top:12px; }

.reader-bar{
  position:sticky; top:calc(var(--header-h) - 1px); z-index:50;
  display:flex; align-items:center; gap:14px;
  margin:22px 0 26px;
  padding:9px 14px;
  background:color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter:blur(8px);
  border:2.5px solid var(--line);
  border-radius:999px;
  box-shadow:2px 2px 0 var(--shadow-color);
  flex-wrap:wrap;
  row-gap:2px;
}
.reader-bar::-webkit-scrollbar{ display:none; }
.rb-group{ display:flex; align-items:center; gap:4px; flex:none; }
.rb-group--end{ margin-left:auto; }
.rb-label{ font-size:11px; color:var(--muted); margin-right:2px; letter-spacing:.04em; }
.rb-btn{
  background:none; border:2px solid transparent; border-radius:999px;
  padding:3px 9px; font-size:12.5px; font-weight:700;
  cursor:pointer; white-space:nowrap;
  transition:background .14s, border-color .14s;
}
.rb-btn:hover{ background:var(--paper-2); border-color:color-mix(in srgb, var(--line) 35%, transparent); }
.rb-btn.is-active{ background:var(--accent); color:var(--on-accent); border-color:var(--line); }
.rb-btn--icon{ display:inline-flex; align-items:center; gap:4px; }
.rb-btn--icon .icon{ width:15px; height:15px; }
.rb-btn.is-saved{ background:var(--accent); color:var(--on-accent); border-color:var(--line); }

.reader{
  font-size:var(--reader-size);
  line-height:var(--reader-lh);
  font-family:var(--font-serif);
  letter-spacing:.01em;
  word-break:break-word;
  color:var(--ink);
}
html[data-reader-font="sans"] .reader{ font-family:var(--font-body); }
html[data-reader-font="round"] .reader{ font-family:var(--font-round); }
html[data-reader-font="serif"] .reader{ font-family:var(--font-serif); }
.reader p{ margin:0 0 1.05em; }
html[data-indent="on"] .reader > p{ text-indent:2em; }
.reader h2,.reader h3,.reader h4{ margin:1.8em 0 .7em; font-size:1.18em; }
.reader h2{ font-size:1.3em; }
.reader a{ color:var(--ink); text-decoration:underline; text-decoration-color:var(--accent-2); text-decoration-thickness:2px; text-underline-offset:3px; }
.reader a:hover{ background:var(--accent); color:var(--on-accent); text-decoration:none; }
.reader img{
  margin:1.6em auto;
  border:var(--line-w) solid var(--line);
  border-radius:10px;
  box-shadow:5px 5px 0 var(--shadow-color);
}
.reader blockquote{
  margin:1.6em 0; padding:14px 18px;
  border-left:6px solid var(--accent-2);
  background:color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius:0 12px 12px 0;
  color:var(--ink);
  font-size:.97em;
}
.reader blockquote p:last-child{ margin-bottom:0; }
.reader hr{
  border:none; height:14px; margin:2.2em 0;
  background-image:radial-gradient(var(--accent-2) 2px, transparent 2px);
  background-size:14px 14px; background-position:center;
  opacity:.7;
}
.reader ul,.reader ol{ margin:1em 0 1.2em; padding-left:1.4em; }
.reader ul{ list-style:none; }
.reader ul li{ position:relative; padding-left:14px; margin-bottom:.4em; }
.reader ul li::before{ content:"•"; position:absolute; left:0; color:var(--accent-2); font-weight:900; }
.reader ol{ list-style:decimal; }
.reader li{ margin-bottom:.4em; }
.reader code{
  font-size:.9em; padding:1px 5px;
  background:var(--paper-2); border:1.5px solid color-mix(in srgb, var(--line) 30%, transparent);
  border-radius:5px;
}
.reader pre{
  padding:14px 16px; overflow:auto;
  background:var(--paper-2); border:2.5px solid var(--line); border-radius:12px;
  font-size:.86em; line-height:1.7;
}
.reader pre code{ border:none; background:none; padding:0; }
.reader table{ width:100%; border-collapse:collapse; margin:1.4em 0; font-size:.92em; }
.reader th,.reader td{ border:2px solid var(--line); padding:8px 10px; text-align:left; }
.reader th{ background:var(--paper-2); }

.chapter-end{
  margin:46px 0 26px; padding:28px 22px;
  text-align:center;
  background:color-mix(in srgb, var(--paper-2) 70%, transparent);
  border:var(--line-w) dashed var(--line);
  border-radius:var(--radius);
}
.chapter-end-cat{ position:relative; width:100px; margin:0 auto 10px; }
.chapter-end-cat svg{ width:100%; height:auto; }
.ce-stroke{ fill:none; stroke:var(--ink); stroke-width:3.4; stroke-linecap:round; stroke-linejoin:round; }
.ce-fish{ position:absolute; right:-14px; top:-2px; width:22px; height:12px; background:var(--accent-2); border:2px solid var(--line); border-radius:50% 50% 50% 50% / 60% 60% 40% 40%; transform:rotate(-16deg); }
.ce-fish::after{ content:""; position:absolute; right:-9px; top:2px; border:6px solid transparent; border-left-color:var(--line); }
.chapter-end-title{ font-family:var(--font-head); font-size:19px; font-weight:800; letter-spacing:.14em; }
.chapter-end-note{ font-size:13px; color:var(--muted); margin-top:8px; }
.chapter-end-actions{ display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin-top:18px; }

.chapter-nav{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:26px; }
.nav-card{
  display:flex; align-items:center; gap:10px;
  padding:14px 16px;
  background:var(--card);
  border:2.5px solid var(--line);
  border-radius:12px;
  box-shadow:2px 2px 0 var(--shadow-color);
  transition:transform .15s var(--ease);
  min-width:0;
}
.nav-card:hover{ transform:translateY(-3px); }
.nav-card--next{ flex-direction:row-reverse; text-align:right; }
.nav-card-icon{ display:grid; place-items:center; color:var(--accent-2); flex:none; }
.nav-card-icon .icon{ width:18px; height:18px; }
.nav-card-body{ display:flex; flex-direction:column; min-width:0; }
.nav-card-label{ font-size:11px; color:var(--muted); letter-spacing:.06em; }
.nav-card-title{ font-size:13.5px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chapter-foot-note{ display:flex; align-items:center; gap:8px; margin-top:26px; font-size:11.5px; color:var(--muted); }
.chapter-foot-note .icon{ width:14px; height:14px; color:var(--accent-2); }

/* 目录抽屉 */
.toc-drawer{
  position:fixed; top:0; right:0; bottom:0; z-index:85;
  width:min(380px,90vw);
  background:var(--paper);
  border-left:var(--line-w) solid var(--line);
  display:flex; flex-direction:column;
  transform:translateX(102%);
  transition:transform .3s var(--ease);
  box-shadow:-6px 0 0 color-mix(in srgb, var(--shadow-color) 40%, transparent);
}
.toc-drawer.is-open{ transform:translateX(0); }
.toc-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:18px 18px 12px;
  border-bottom:2.5px dashed var(--line);
}
.toc-book{ display:flex; flex-direction:column; min-width:0; }
.toc-eyebrow{ font-size:10.5px; letter-spacing:.2em; color:var(--muted); }
.toc-book-name{ font-family:var(--font-head); font-size:19px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.toc-filter{ padding:12px 18px 6px; }
.toc-filter input{
  width:100%; padding:9px 13px;
  border:2.5px solid var(--line); border-radius:999px;
  background:var(--card); color:var(--ink);
  font-size:13px; font-family:inherit; outline:none;
}
.toc-list{ flex:1; overflow-y:auto; padding:8px 12px 12px; }
.toc-link{
  display:flex; align-items:center; gap:8px;
  padding:10px 12px;
  font-size:13.5px;
  border-radius:9px;
  border:2px solid transparent;
  overflow:hidden;
}
.toc-link:hover{ background:var(--paper-2); }
.toc-link.is-current{ background:var(--accent); color:var(--on-accent); border-color:var(--line); font-weight:700; }
.toc-link span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.toc-num{ font-size:11px; color:var(--muted); flex:none; width:20px; }
.toc-link.is-current .toc-num{ color:var(--on-accent); opacity:.7; }
.toc-foot{ padding:12px 18px 18px; border-top:2.5px dashed var(--line); }
.toc-foot .btn{ width:100%; justify-content:center; }
.toc-mask{
  position:fixed; inset:0; z-index:84;
  background:color-mix(in srgb, #000 45%, transparent);
  backdrop-filter:blur(2px);
}
body.lock{ overflow:hidden; }

/* 移动端阅读底栏 */
.reading-dock{
  position:fixed; left:0; right:0; bottom:0; z-index:45;
  display:none;
  padding:8px 12px calc(8px + env(safe-area-inset-bottom));
  gap:8px;
  background:color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter:blur(10px);
  border-top:var(--line-w) solid var(--line);
}
.dock-btn{
  flex:1; display:flex; align-items:center; justify-content:center; gap:5px;
  padding:10px 8px;
  font-size:13px; font-weight:700;
  background:var(--card);
  border:2.5px solid var(--line);
  border-radius:12px;
  box-shadow:2px 2px 0 var(--shadow-color);
  cursor:pointer;
}
.dock-btn .icon{ width:16px; height:16px; }
.dock-btn--primary{ background:var(--accent); color:var(--on-accent); }
.dock-btn.is-disabled{ opacity:.4; }

.resume-toast{
  position:fixed; left:50%; bottom:24px; transform:translateX(-50%);
  z-index:70;
  display:flex; align-items:center; gap:10px;
  padding:10px 12px 10px 18px;
  background:var(--card);
  border:var(--line-w) solid var(--line);
  border-radius:999px;
  box-shadow:4px 4px 0 var(--shadow-color);
  font-size:13px;
  animation:toast-in .3s var(--ease);
}
@keyframes toast-in{ from{ opacity:0; transform:translate(-50%,14px); } to{ opacity:1; transform:translate(-50%,0); } }
.resume-text b{ color:var(--accent-2); }
.resume-go{
  background:var(--accent); color:var(--on-accent);
  border:2px solid var(--line); border-radius:999px;
  padding:3px 12px; font-size:12px; font-weight:800; cursor:pointer;
}
.resume-close{ background:none; border:none; padding:2px; cursor:pointer; color:var(--muted); display:grid; place-items:center; }
.resume-close .icon{ width:14px; height:14px; }

/* ---------- 11. 归档 ---------- */
.archive-list{ position:relative; }
.archive-year{
  display:inline-block; margin:26px 0 12px;
  font-family:var(--font-head); font-size:22px; font-weight:800;
  padding:2px 14px; background:var(--accent); color:var(--on-accent);
  border:2.5px solid var(--line); border-radius:999px; transform:rotate(-1.5deg);
}
.archive-item{
  position:relative;
  display:flex; align-items:baseline; gap:12px;
  padding:11px 12px 11px 26px;
  border-left:2.5px dashed color-mix(in srgb, var(--line) 35%, transparent);
  margin-left:6px;
}
.archive-dot{
  position:absolute; left:-7px; top:18px;
  width:10px; height:10px; border-radius:50%;
  background:var(--accent); border:2px solid var(--line);
}
.archive-date{ font-size:12px; color:var(--muted); flex:none; width:92px; }
.archive-title{ flex:1; font-size:15px; font-weight:600; min-width:0; }
.archive-title:hover{ text-decoration:underline; text-decoration-style:wavy; text-underline-offset:4px; text-decoration-color:var(--accent-2); }
.archive-book{ font-size:12px; color:var(--muted); flex:none; }

/* ---------- 12. 碎碎念 ---------- */
.memo-list{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:22px; }
.memo-card{
  position:relative;
  padding:26px 22px 18px;
  background:var(--card);
  border:var(--line-w) solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  transform:rotate(-.5deg);
}
.memo-card:nth-child(even){ transform:rotate(.6deg); background:color-mix(in srgb, var(--accent) 16%, var(--card)); }
.memo-pin{ position:absolute; top:-9px; left:24px; width:44px; height:14px; background:color-mix(in srgb, var(--paper) 55%, var(--card)); border:1.5px solid color-mix(in srgb, var(--line) 40%, transparent); transform:rotate(-4deg); }
.memo-body{ font-size:14.5px; line-height:1.9; }
.memo-date{ display:block; margin-top:12px; font-size:11.5px; color:var(--muted); }

/* ---------- 13. 404 ---------- */
.notfound{ padding:50px 0 70px; }
.notfound-inner{ display:grid; grid-template-columns:1fr 1fr; gap:30px; align-items:center; max-width:920px; }
.notfound-art{ position:relative; }
.nf-line{ fill:none; stroke:var(--ink); stroke-width:4; stroke-linecap:round; stroke-linejoin:round; }
.nf-fill{ fill:var(--card); stroke:var(--ink); stroke-width:4; stroke-linejoin:round; }
.nf-ear{ fill:var(--accent); }
.nf-nose{ fill:var(--ink); }
.nf-whisker{ stroke-width:3; }
.nf-paw{ fill:var(--card); }
.nf-spark{ fill:var(--accent-2); stroke:var(--ink); stroke-width:2.4; }
.nf-sticker{
  position:absolute; top:0; right:2%;
  font-family:var(--font-head); font-size:44px; font-weight:800;
  padding:4px 18px;
  background:var(--accent); color:var(--on-accent);
  border:var(--line-w) solid var(--line); border-radius:14px;
  box-shadow:5px 5px 0 var(--shadow-color);
  transform:rotate(9deg);
}
.notfound-title{ font-size:clamp(26px,4vw,38px); }
.notfound-desc{ color:var(--muted); margin:14px 0 24px; font-size:14.5px; }
.notfound-actions{ display:flex; flex-wrap:wrap; gap:10px; }

/* ---------- 14. 搜索 ---------- */
.search-modal{
  position:fixed; inset:0; z-index:90;
  background:color-mix(in srgb, #12100C 55%, transparent);
  backdrop-filter:blur(4px);
  padding:12vh 16px 16px;
  overflow-y:auto;
}
.search-panel{
  max-width:640px; margin:0 auto;
  background:var(--paper);
  border:var(--line-w) solid var(--line);
  border-radius:var(--radius);
  box-shadow:8px 8px 0 color-mix(in srgb, #000 35%, transparent);
  overflow:hidden;
}
.search-head{ display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:2.5px dashed var(--line); }
.search-doodle{ color:var(--accent-2); display:grid; place-items:center; }
.search-input{
  flex:1; border:none; background:none; outline:none;
  font-size:16px; font-family:inherit; color:var(--ink);
}
.search-hint{ padding:14px 18px 4px; font-size:12px; color:var(--muted); }
.search-results{ max-height:52vh; overflow-y:auto; padding:8px 10px 12px; }
.search-result{
  display:block; padding:10px 12px; border-radius:10px; border:2px solid transparent;
}
.search-result:hover,.search-result:focus{ background:var(--paper-2); border-color:color-mix(in srgb, var(--line) 30%, transparent); }
.search-result-title{ display:block; font-size:14px; font-weight:700; }
.search-result-meta{ display:block; font-size:11.5px; color:var(--muted); margin-top:2px; }
.search-empty{ padding:22px 4px; text-align:center; color:var(--muted); font-size:13px; }

/* 回到顶部 */
.to-top{
  position:fixed; right:18px; bottom:18px; z-index:44;
  width:42px; height:42px;
  display:grid; place-items:center;
  background:var(--accent); color:var(--on-accent);
  border:var(--line-w) solid var(--line);
  border-radius:50%;
  box-shadow:3px 3px 0 var(--shadow-color);
  cursor:pointer;
  transition:transform .15s var(--ease);
}
.to-top:hover{ transform:translateY(-3px) rotate(-6deg); }
body.is-post .to-top{ bottom:78px; }

/* ---------- 14.5 广告位 ---------- */
.ad-slot{ margin:26px auto; }
.ad-slot--inline{ margin:20px 0 26px; }
.ad-inner{
  position:relative;
  padding:16px 14px;
  border:2.5px dashed color-mix(in srgb, var(--line) 32%, transparent);
  border-radius:16px;
  background:color-mix(in srgb, var(--card) 60%, transparent);
  text-align:center;
  overflow:visible;
}
.ad-label{
  position:absolute; top:0; left:14px;
  transform:translateY(-50%);
  font-size:10px; letter-spacing:.16em;
  color:var(--muted);
  background:var(--paper);
  padding:1px 7px;
  border-radius:4px;
  z-index:2;
}
.ad-slot img,.ad-slot ins,.ad-slot iframe{ max-width:100%; }
.ad-slot iframe{ display:block; margin:0 auto; border:0; }
.ad-slot video,.ad-slot canvas{ max-width:100%; height:auto; }
@media (max-width:720px){
  html[data-ad-mobile="off"] .ad-slot{ display:none; }
  .ad-slot{ margin:20px auto; }
}

/* ---------- 15. 页脚 ---------- */
.site-footer{
  margin-top:40px;
  border-top:var(--line-w) solid var(--line);
  background:color-mix(in srgb, var(--paper-2) 60%, transparent);
}
.footer-inner{
  max-width:var(--wrap); margin:0 auto; padding:34px 24px 26px;
  text-align:center; position:relative;
}
.footer-cat{ width:96px; margin:0 auto 12px; opacity:.9; }
.footer-cat svg{ width:100%; height:auto; }
.fc-body{ fill:var(--card); stroke:var(--ink); stroke-width:3.2; stroke-linejoin:round; }
.fc-ear{ fill:var(--card); stroke:var(--ink); stroke-width:3.2; stroke-linejoin:round; }
.fc-eye{ fill:none; stroke:var(--ink); stroke-width:2.8; stroke-linecap:round; }
.fc-nose{ fill:var(--ink); }
.fc-zzz{ fill:none; stroke:var(--accent-2); stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round; }
.fc-line{ fill:none; stroke:var(--ink); stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.fc-whisker{ stroke-width:2.4; }
.footer-line{ font-size:13.5px; color:var(--muted); }
.footer-meta{ font-size:12px; color:var(--muted); margin-top:8px; }
.footer-meta a{ text-decoration:underline; text-underline-offset:3px; }
.footer-icp{ font-size:11.5px; color:var(--muted); margin-top:6px; }
.footer-stripes{
  height:10px; margin-top:22px;
  background:repeating-linear-gradient(45deg, var(--accent) 0 10px, transparent 10px 20px);
  border-top:2px solid var(--line);
  opacity:.7;
}

/* ---------- 16. 响应式 ---------- */
@media (max-width: 1000px){
  .hero-grid{ grid-template-columns:1fr; gap:8px; }
  .hero-art{ order:-1; min-height:0; }
  .hero-cat{ width:min(74%,260px); }
  .hero-blob{ inset:2% 18% 2% 18%; }
  .hero-tag--1{ right:6%; }
  .hero-tag--2{ left:2%; }
  .book-hero-inner{ grid-template-columns:160px 1fr; gap:26px; }
  .notfound-inner{ grid-template-columns:1fr; }
  .update-list{ grid-template-columns:1fr; }
  .notfound-art{ max-width:340px; margin:0 auto; }
}

@media (max-width: 860px){
  .site-nav{
    position:fixed; top:var(--header-h); left:0; right:0;
    flex-direction:column; align-items:stretch; gap:2px;
    padding:14px 18px calc(20px + env(safe-area-inset-bottom));
    background:var(--paper);
    border-bottom:var(--line-w) solid var(--line);
    box-shadow:0 8px 0 color-mix(in srgb, var(--shadow-color) 25%, transparent);
    transform:translateY(-120%);
    transition:transform .28s var(--ease);
    z-index:58;
    display:none;
  }
  body.nav-open .site-nav{ display:flex; transform:translateY(0); }
  .nav-link{ font-size:16px; padding:12px 10px; border-radius:10px; }
  .nav-link.is-active::after{ left:10px; right:auto; width:42px; bottom:8px; }
  .nav-link + .nav-link{ border-top:1.5px dashed color-mix(in srgb, var(--line) 25%, transparent); }
  .nav-foot{ display:flex; align-items:center; gap:8px; margin-top:12px; padding-top:12px; border-top:2.5px dashed var(--line); font-size:12px; color:var(--muted); }
  .nav-foot-cat{ color:var(--accent-2); }
  .menu-btn{ display:inline-flex; }
  .header-tools{ margin-left:auto; }
  .brand-sub{ display:none; }
  .cat-switch{ padding:2px; }
  .cat-chip{ width:30px; height:26px; }
  .cat-chip svg{ width:23px; height:23px; }
  .icon-btn{ width:36px; height:36px; border-radius:10px; }
  .icon-btn .icon{ width:17px; height:17px; }
}

@media (max-width: 720px){
  :root{ --header-h:58px; --line-w:2.5px; --shadow:4px 4px 0 var(--shadow-color); --shadow-sm:2px 2px 0 var(--shadow-color); }
  body{ font-size:15.5px; }
  .wrap{ padding:0 16px; }
  .hero{ padding:26px 0 12px; }
  .hero-grid{ padding:0 16px; }
  .hero-title{ font-size:clamp(32px,10vw,46px); }
  .hero-desc{ font-size:14.5px; }
  .hero-actions{ margin:18px 0 20px; gap:9px; }
  .btn{ padding:10px 18px; font-size:14px; }
  .hero-stats{ gap:18px; }
  .hero-stats strong{ font-size:22px; }
  .hero-cat{ width:min(64%,210px); }
  .hero-tag{ font-size:11px; padding:4px 10px; }
  .hero-tag--3{ display:none; }
  .section{ padding-top:36px; padding-bottom:36px; }
  .section-head{ margin-bottom:18px; }
  .book-grid{ grid-template-columns:repeat(2,1fr); gap:18px 14px; }
  .book-cover{ padding:14px 12px; border-radius:6px 12px 8px 10px; }
  .book-cover-name{ font-size:19px; margin-top:10px; }
  .book-cover-count{ left:18px; bottom:10px; font-size:10.5px; }
  .book-cover-cat{ top:10px; right:9px; }
  .update-item{ padding:12px; gap:12px; }
  .update-thumb{ width:52px; height:68px; }
  .update-title{ font-size:15.5px; }
  .update-cta{ display:none; }
  .page-hero{ padding:28px 0 4px; }
  .book-hero{ padding:26px 0 28px; }
  .book-hero-inner{ grid-template-columns:112px 1fr; gap:16px; align-items:start; }
  .book-hero-cover{ padding:12px 10px; box-shadow:4px 4px 0 var(--shadow-color); }
  .bhc-name{ font-size:17px; margin-top:6px; }
  .bhc-lines{ display:none; }
  .bhc-paw{ top:auto; bottom:9px; right:9px; }
  .book-hero-title{ font-size:24px; margin:8px 0; }
  .book-hero-meta{ gap:5px; margin-bottom:10px; }
  .book-hero-desc{ font-size:13.5px; }
  .book-hero-actions{ margin-top:14px; gap:8px; }
  .book-hero-actions .btn{ padding:8px 14px; font-size:13px; }
  .catalog-head{ gap:10px; }
  .catalog-tools{ width:100%; }
  .catalog-search{ flex:1; min-width:0; }
  .chapter-item a{ padding:11px 12px; gap:8px; }
  .ch-title{ font-size:14px; }
  .ch-date{ display:none; }
  .other-book{ padding:7px 13px; }

  /* 阅读页移动端 */
  .chapter-wrap{ padding:16px 16px 84px; }
  .crumbs{ font-size:11.5px; margin-bottom:14px; }
  .chapter-title{ font-size:24px; }
  .chapter-labels{ margin-bottom:10px; }
  .read-progress{ top:calc(var(--header-h) - 2px); height:3px; }
  .reader-bar{
    top:calc(var(--header-h) - 1px);
    margin:16px 0 18px;
    padding:7px 10px; gap:8px;
    border-radius:14px;
  }
  .reader-bar{ flex-wrap:wrap; overflow:visible; row-gap:2px; }
  .rb-group--end{ margin-left:0; width:100%; justify-content:flex-end; padding-top:6px; border-top:1.5px dashed color-mix(in srgb, var(--line) 25%, transparent); }
  .rb-label{ display:none; }
  .reader{ font-size:var(--reader-size); line-height:var(--reader-lh); }
  .reader p{ margin-bottom:1em; }
  .chapter-end{ margin:34px 0 20px; padding:22px 16px; }
  .chapter-nav{ grid-template-columns:1fr; gap:10px; }
  .nav-card--next{ flex-direction:row; text-align:left; }
  .reading-dock{ display:flex; }
  .resume-toast{ bottom:82px; }
  .to-top{ display:none; }
  .archive-item{ flex-wrap:wrap; gap:6px; padding-left:20px; }
  .archive-date{ width:auto; }
  .archive-book{ width:100%; padding-left:0; }
  .memo-list{ grid-template-columns:1fr; }
  .footer-inner{ padding:28px 16px 22px; }
  .footer-cat{ width:78px; }
  .search-modal{ padding:6vh 12px 12px; }
}

@media (max-width: 420px){
  .brand-name{ font-size:16px; }
  .brand-mark{ width:32px; height:32px; }
  .brand-mark svg{ width:22px; height:22px; }
  .header-tools{ gap:5px; }
  .cat-switch{ gap:0; }
  .cat-chip{ width:27px; height:24px; }
  .cat-chip svg{ width:21px; height:21px; }
  .hero-tag--1{ right:0; }
  .book-cover-name{ font-size:17px; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}
