@charset "UTF-8";
/* ============================================================================
   新中式东方漫画馆 · orient.css
   漫城CMS PC 皮肤样式（单文件自包含）
   蓝鲸鱼工作室 · 2026-09

   设计立意：宣纸为底、松烟为骨、朱砂为神。
   现代互联网漫画平台的排版与交互，东方审美的材质与留白。
   —— 不是"古装网页模板"，是"有文化气质的专业漫画平台"。

   目录
   §01 设计令牌           §08 面板与纸面
   §02 重置与基础         §09 弹层（遮罩/抽屉/toast）
   §03 排版               §10 交互与状态
   §04 布局与栅格         §11 东方装饰件
   §05 页头               §12 首页专属
   §06 页脚               §13 分类族页面
   §07 组件               §14 详情页
                         §15 响应式
                         §16 无障碍与降级
   ========================================================================== */

/* ==========================================================================
   §01 设计令牌
   ========================================================================== */
:root {
  /* ---- 纸：宣纸五阶 ---- */
  --paper:        #F5F2EB;   /* 页面底 */
  --paper-2:      #EFEAE0;   /* 次层纸 */
  --paper-3:      #E7E0D2;   /* 深纸 / 分区底 */
  --paper-white:  #FBFAF6;   /* 卡面（纸白） */
  --paper-sink:   #E2DACB;   /* 凹槽 / 占位 */

  /* ---- 墨：松烟六阶（暖墨系） ---- */
  --ink:          #2A2723;   /* 主墨：正文与标题 */
  --ink-1:        #3A3630;
  --ink-2:        #56504A;   /* 次级正文 */
  --ink-3:        #7D766A;   /* meta / 说明 */
  --ink-4:        #A69E90;   /* 弱化 / 分隔文字 */
  --ink-5:        #C9C1B2;   /* 极弱 */

  /* ---- 朱砂：点睛，克制使用 ---- */
  --seal:         #B5453A;
  --seal-deep:    #8C332B;
  --seal-soft:    #C96A5F;
  --seal-wash:    rgba(181, 69, 58, .08);

  /* ---- 黛青：山水与辅助 ---- */
  --dai:          #4A6B6E;
  --dai-deep:     #33504F;
  --dai-soft:     #7E9A9B;
  --dai-wash:     rgba(74, 107, 110, .09);

  /* ---- 金：低饱和，仅用于"金石"点缀 ---- */
  --gold:         #B99A5B;
  --gold-deep:    #8F7538;
  --gold-wash:    rgba(185, 154, 91, .12);

  /* ---- 线：墨线三档 + 朱线 ---- */
  --line:         rgba(42, 39, 35, .14);
  --line-2:       rgba(42, 39, 35, .24);
  --line-soft:    rgba(42, 39, 35, .07);
  --line-seal:    rgba(181, 69, 58, .26);

  /* ---- 投影：纸张压印感，永远带暖色相，绝不用纯黑 ---- */
  --sh-1:  0 1px 0 rgba(255, 255, 255, .7) inset, 0 1px 2px rgba(62, 52, 38, .05), 0 4px 12px rgba(62, 52, 38, .05);
  --sh-2:  0 1px 0 rgba(255, 255, 255, .8) inset, 0 2px 4px rgba(62, 52, 38, .07), 0 10px 26px rgba(62, 52, 38, .09);
  --sh-3:  0 2px 6px rgba(62, 52, 38, .10), 0 18px 44px rgba(62, 52, 38, .13);
  --sh-in: 0 1px 3px rgba(62, 52, 38, .10) inset;

  /* ---- 圆角：只有四档，克制 ---- */
  --r-xs: 2px;
  --r-s:  3px;
  --r-m:  5px;
  --r-l:  8px;
  --r-pill: 999px;

  /* ---- 间距：八分节奏 ---- */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 22px;  --sp-6: 28px;  --sp-7: 40px;  --sp-8: 56px;
  --sp-9: 72px;  --sp-10: 96px;

  /* ---- 版心 ---- */
  --wrap: 1200px;
  --gutter: 24px;
  --sec-gap: 72px;      /* 区与区之间 */
  --sec-head: 26px;     /* 区头到内容 */

  /* ---- 字体 ---- */
  --f-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --f-body:    "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "PingFang SC", "Microsoft YaHei", serif;
  --f-ui:      "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-num:     "DIN Alternate", "Helvetica Neue", Arial, var(--f-ui);

  /* ---- 动效：克制。全部 160–320ms ---- */
  --ease: cubic-bezier(.32, .72, .28, 1);
  --t-fast: 160ms;
  --t-base: 220ms;
  --t-slow: 320ms;

  /* ---- 纸张纹理（内联 SVG，零外部请求） ---- */
  --tex-paper: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23p)' opacity='.032'/%3E%3C/svg%3E");
  --tex-fiber: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.42 .9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23f)' opacity='.022'/%3E%3C/svg%3E");

  /* ---- 层叠 ---- */
  --z-head: 100;
  --z-drawer: 900;
  --z-modal: 950;
  --z-toast: 990;
}

/* ==========================================================================
   §02 重置与基础
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  /* 宣纸：极淡纤维 + 顶部一层"天光"渐晕，模拟纸的吸收感 */
  background-image:
    var(--tex-fiber),
    var(--tex-paper),
    radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%);
  background-repeat: repeat, repeat, no-repeat;
  background-attachment: scroll, scroll, fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; vertical-align: middle; }
img { border: 0; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--seal); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

table { border-collapse: collapse; width: 100%; }

/* 统一焦点环：朱砂细环 + 外扩留白，不用浏览器默认蓝 */
:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection { background: var(--seal-wash); color: var(--seal-deep); }

/* 细滚动条，墨色 */
* { scrollbar-width: thin; scrollbar-color: var(--ink-5) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--ink-5); border-radius: var(--r-pill); }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

.hide, .hidden, [hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   §03 排版
   ========================================================================== */
.t-display {
  font-family: var(--f-display);
  font-size: 46px;
  line-height: 1.24;
  letter-spacing: .04em;
  font-weight: 400;
  color: var(--ink);
}
.t-h1 { font-family: var(--f-display); font-size: 30px; line-height: 1.34; letter-spacing: .03em; font-weight: 400; }
.t-h2 { font-family: var(--f-display); font-size: 24px; line-height: 1.4;  letter-spacing: .03em; font-weight: 400; }
.t-h3 { font-family: var(--f-display); font-size: 19px; line-height: 1.45; letter-spacing: .02em; font-weight: 400; }
.t-body { font-size: 15px; line-height: 1.8;  color: var(--ink-1); }
.t-sm   { font-size: 14px; line-height: 1.7;  color: var(--ink-2); }
.t-xs   { font-size: 13px; line-height: 1.6;  color: var(--ink-3); }
.t-num  { font-family: var(--f-num); font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* 竖排（仅用于装饰性短文案） */
.t-vertical { writing-mode: vertical-rl; text-orientation: upright; letter-spacing: .18em; }

.muted  { color: var(--ink-3); }
.faint  { color: var(--ink-4); }
.accent { color: var(--seal); }
.dai    { color: var(--dai); }

.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ==========================================================================
   §04 布局与栅格
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-wide { max-width: 1440px; }

main { display: block; }

/* 区块：区头 + 内容，留白是主角 */
.sec { margin-top: var(--sec-gap); }
.sec:first-child { margin-top: 0; }

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sec-head);
}
.sec-head-l { display: flex; align-items: baseline; gap: var(--sp-3); min-width: 0; }
.sec-title {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
/* 区题前的朱砂小竖条（"书签"意象） */
.sec-title::before {
  content: "";
  width: 3px; height: 20px;
  background: var(--seal);
  border-radius: 1px;
  flex: none;
}
.sec-sub { font-size: 13px; color: var(--ink-4); letter-spacing: .06em; }
.sec-more {
  font-size: 13px; color: var(--ink-3); letter-spacing: .04em;
  white-space: nowrap; transition: color var(--t-fast) var(--ease);
}
.sec-more:hover { color: var(--seal); }
.sec-more .arr { display: inline-block; transition: transform var(--t-fast) var(--ease); }
.sec-more:hover .arr { transform: translateX(3px); }

/* 网格：封面卡 */
.grid-cards { display: grid; gap: var(--sp-5) var(--sp-4); grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-cards--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* 双列：主内容 + 侧栏 */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-7); align-items: start; }
.duo--rev { grid-template-columns: 340px minmax(0, 1fr); }

/* 三等分 */
.triple { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }

/* 通用堆叠 */
.stack-2 > * + * { margin-top: var(--sp-2); }
.stack-3 > * + * { margin-top: var(--sp-3); }
.stack-4 > * + * { margin-top: var(--sp-4); }
.stack-5 > * + * { margin-top: var(--sp-5); }

/* ==========================================================================
   §05 页头
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: var(--z-head);
  background: rgba(245, 242, 235, .88);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
/* 滚动后：出现墨线（渐变实线，非死板 border） */
.topbar.is-scrolled {
  background: rgba(245, 242, 235, .95);
  border-bottom-color: transparent;
}
.topbar.is-scrolled::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 12%, var(--line-2) 88%, transparent);
}

.topbar-in {
  display: flex; align-items: center; gap: var(--sp-5);
  height: 68px;
}

/* 品牌 */
.brand { display: flex; align-items: center; gap: var(--sp-3); flex: none; }
.brand-mark { width: 34px; height: 34px; flex: none; color: var(--ink); }
.brand-mark .bm-body { fill: none; stroke: currentColor; stroke-width: 1.4; }
.brand-mark .bm-carve { fill: none; stroke: var(--seal); stroke-width: 1.4; stroke-linecap: round; }
.mccms-logo-img {
  display: block; max-height: 38px; max-width: 168px;
  width: auto; height: auto; object-fit: contain;
}
.mccms-logo-text, .brand-txt {
  font-family: var(--f-display);
  font-size: 20px; letter-spacing: .14em; color: var(--ink);
  white-space: nowrap;
}
/* [mccms_logo] 与兜底文字同时存在时只显示其一 */
.brand-txt { display: none; }
.brand:not(:has(.mccms-logo-img)) .brand-txt { display: inline; }

/* 主导航 */
.nav { display: flex; align-items: center; gap: var(--sp-1); margin-left: var(--sp-4); }
.nav-link {
  position: relative;
  padding: 8px 13px;
  font-size: 15px;
  letter-spacing: .1em;
  color: var(--ink-2);
  border-radius: var(--r-s);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav-link:hover { color: var(--ink); background: rgba(42, 39, 35, .04); }
/* 当前页：朱砂下点（"落印"） */
.nav-link::after {
  content: ""; position: absolute; left: 50%; bottom: 1px;
  width: 4px; height: 4px; margin-left: -2px;
  background: var(--seal); border-radius: 50%;
  transform: scale(0); transition: transform var(--t-base) var(--ease);
}
body[data-nav="index"]    .nav-link[data-key="index"]::after,
body[data-nav="comic"]    .nav-link[data-key="comic"]::after,
body[data-nav="category"] .nav-link[data-key="category"]::after,
body[data-nav="rank"]     .nav-link[data-key="rank"]::after,
body[data-nav="finish"]   .nav-link[data-key="finish"]::after,
body[data-nav="serial"]   .nav-link[data-key="serial"]::after,
body[data-nav="update"]   .nav-link[data-key="update"]::after,
body[data-nav="fav"]      .nav-link[data-key="fav"]::after,
body[data-nav="book"]     .nav-link[data-key="book"]::after { transform: scale(1); }
body[data-nav="comic"]    .nav-link[data-key="comic"],
body[data-nav="category"] .nav-link[data-key="category"],
body[data-nav="rank"]     .nav-link[data-key="rank"],
body[data-nav="update"]   .nav-link[data-key="update"],
body[data-nav="index"]    .nav-link[data-key="index"] { color: var(--ink); }

/* 搜索框：墨线描边，聚焦时朱砂 */
.search-box {
  position: relative; display: flex; align-items: center;
  flex: 1; max-width: 240px; margin-left: auto;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: rgba(251, 250, 246, .8);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.search-box:focus-within { border-color: var(--seal); background: var(--paper-white); }
.search-box .sb-ic { width: 16px; height: 16px; margin: 0 8px 0 11px; flex: none; color: var(--ink-4); }
.search-box:focus-within .sb-ic { color: var(--seal); }
.search-box input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; background: none; outline: none;
  font-size: 14px; color: var(--ink);
  padding-right: 10px;
}
.search-box input::placeholder { color: var(--ink-4); letter-spacing: .04em; }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* 用户区 */
.user-zone { display: flex; align-items: center; gap: var(--sp-1); flex: none; }
.uz-login {
  padding: 7px 15px;
  font-size: 14px; letter-spacing: .08em;
  color: var(--paper-white);
  background: var(--ink);
  border-radius: var(--r-s);
  transition: background var(--t-fast) var(--ease);
}
.uz-login:hover { background: var(--seal); color: var(--paper-white); }
.uz-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  overflow: hidden; border: 1px solid var(--line);
  background: var(--paper-3); flex: none;
  transition: border-color var(--t-fast) var(--ease);
}
.uz-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uz-avatar:hover { border-color: var(--seal); }
.uz-name { font-size: 14px; color: var(--ink-2); margin: 0 4px; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uz-name:hover { color: var(--seal); }
.uz-link {
  font-size: 13px; color: var(--ink-3);
  padding: 6px 7px; border-radius: var(--r-xs);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.uz-link:hover { color: var(--seal); background: var(--seal-wash); }

/* 汉堡 */
.nav-toggle {
  display: none;
  width: 40px; height: 40px; flex: none;
  align-items: center; justify-content: center;
  color: var(--ink); border-radius: var(--r-s);
}
.nav-toggle:hover { background: rgba(42, 39, 35, .05); }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .ic-x { display: none; }
.nav-toggle[aria-expanded="true"] .ic-m { display: none; }
.nav-toggle[aria-expanded="true"] .ic-x { display: block; }

/* 公告栏：一条宣纸签 */
.noticebar {
  background: linear-gradient(180deg, rgba(185, 154, 91, .10), rgba(185, 154, 91, .04));
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.noticebar-in { display: flex; align-items: center; gap: var(--sp-3); height: 38px; }
.nb-mark { width: 16px; height: 16px; flex: none; color: var(--seal); }
.nb-mark .seal-body { fill: var(--seal); }
.nb-mark .seal-carve { fill: none; stroke: var(--paper-white); stroke-width: 2.2; stroke-linecap: round; }
.nb-text { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-link { color: var(--dai); flex: none; border-bottom: 1px solid var(--dai-wash); }
.nb-link:hover { color: var(--seal); border-bottom-color: var(--seal); }
.nb-close { width: 22px; height: 22px; margin-left: auto; flex: none; color: var(--ink-4); border-radius: var(--r-xs); }
.nb-close:hover { color: var(--ink); background: rgba(42, 39, 35, .05); }
.nb-close svg { width: 12px; height: 12px; }

/* ==========================================================================
   §06 页脚
   ========================================================================== */
.footer {
  margin-top: var(--sp-10);
  padding-top: var(--sp-8);
  padding-bottom: var(--sp-6);
  background: linear-gradient(180deg, rgba(231, 224, 210, 0), rgba(231, 224, 210, .55) 30%, rgba(226, 218, 203, .8));
  border-top: 1px solid var(--line-soft);
  position: relative;
}
/* 上缘笔触渐变墨线 */
.footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent);
}
.footer-main {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: var(--sp-7) var(--sp-6);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid var(--line-soft);
}
.f-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.f-title {
  font-family: var(--f-display); font-size: 15px; font-weight: 400;
  letter-spacing: .12em; color: var(--ink); margin-bottom: 4px;
  position: relative; padding-bottom: 9px;
}
/* 栏题下朱砂短线 */
.f-title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 18px; height: 2px; background: var(--seal);
  transition: width var(--t-base) var(--ease);
}
.f-col:hover .f-title::after { width: 46px; }
.f-col > a {
  font-size: 13px; line-height: 2; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.f-col > a:hover { color: var(--seal); transform: translateX(3px); }
.f-brand { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.f-slogan {
  font-family: var(--f-display); font-size: 17px;
  letter-spacing: .14em; color: var(--ink); margin-bottom: 6px;
}
.f-desc { font-size: 13px; line-height: 1.9; color: var(--ink-3); max-width: 34em; }
.f-line { font-size: 13px; color: var(--ink-3); display: flex; align-items: baseline; gap: 8px; }
.f-line b { font-weight: 400; color: var(--ink-2); font-family: var(--f-num); }
.f-seal {
  flex: none; width: 20px; height: 20px; line-height: 20px; text-align: center;
  font-family: var(--f-display); font-size: 12px;
  color: var(--paper-white); background: var(--seal);
  border-radius: var(--r-xs);
  transform: translateY(2px);
}
.f-site-note {
  font-size: 12.5px; line-height: 1.9; color: var(--ink-4);
  padding: var(--sp-5) 0; margin: 0;
  border-bottom: 1px solid var(--line-soft);
}
.f-bar {
  display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap;
  padding-top: var(--sp-5);
  font-size: 12.5px; color: var(--ink-4);
}
.f-bar .f-stat { display: inline-flex; align-items: center; }
.f-bar .f-stat img { max-height: 16px; }
.f-topbtn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; font-size: 13px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: var(--r-s);
  background: rgba(251, 250, 246, .6);
  transition: all var(--t-fast) var(--ease);
}
.f-topbtn:hover { color: var(--seal); border-color: var(--line-seal); background: var(--paper-white); }
.f-topbtn svg { width: 13px; height: 13px; }
.f-deco {
  position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
  width: 190px; height: 190px; color: var(--ink);
  opacity: .045; pointer-events: none;
}
.f-deco svg { width: 100%; height: 100%; }

/* 浮动返回顶部 */
.backtop {
  position: fixed; right: 26px; bottom: 34px; z-index: var(--z-head);
  width: 44px; height: 44px;
  display: none; align-items: center; justify-content: center;
  color: var(--ink-2);
  background: rgba(251, 250, 246, .92);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--sh-2);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.backtop:hover { color: var(--seal); border-color: var(--line-seal); transform: translateY(-2px); }
.backtop svg { width: 17px; height: 17px; }

/* ==========================================================================
   §07 组件
   ========================================================================== */

/* ---- 7.1 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 22px;
  font-size: 14.5px; letter-spacing: .1em; line-height: 1;
  border-radius: var(--r-s);
  border: 1px solid transparent;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; flex: none; }

.btn-ink { background: var(--ink); color: var(--paper-white); }
.btn-ink:hover { background: var(--seal); color: var(--paper-white); }

.btn-seal { background: var(--seal); color: var(--paper-white); }
.btn-seal:hover { background: var(--seal-deep); color: var(--paper-white); }

.btn-ghost { border-color: var(--line-2); color: var(--ink-2); background: rgba(251, 250, 246, .5); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--paper-white); }

.btn-soft { background: var(--paper-3); color: var(--ink-2); }
.btn-soft:hover { background: var(--paper-sink); color: var(--ink); }

.btn-xs { padding: 6px 13px; font-size: 13px; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 13px 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-off { opacity: .42; pointer-events: none; }

/* ---- 7.2 书册卡（封面卡） ----
   立意：作品集 / 线装书页。封面 3:4，纸面、墨线、压印投影。 */
.card {
  position: relative; display: block;
  background: var(--paper-white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-m);
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--line); }
.card:focus-visible { transform: translateY(-4px); box-shadow: var(--sh-2); }

/* 封面：3:4 锁定 */
.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, var(--paper-3), var(--paper-sink));
  overflow: hidden;
}
.card-cover img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform var(--t-slow) var(--ease), opacity var(--t-base) var(--ease);
}
.card:hover .card-cover img { transform: scale(1.035); }
/* 图片未就绪时的纸面底纹 */
.card-cover::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--tex-paper);
  opacity: .8; pointer-events: none;
}
/* Hover 墨色晕染遮罩（纯 CSS，无 JS 依赖） */
.card-veil {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% 100%, rgba(42, 39, 35, .62), rgba(42, 39, 35, .22));
  opacity: 0;
  clip-path: circle(0% at 50% 62%);
  transition: opacity var(--t-base) var(--ease), clip-path var(--t-slow) var(--ease);
  pointer-events: none;
}
.card:hover .card-veil,
.card:focus-visible .card-veil { opacity: 1; clip-path: circle(140% at 50% 62%); }
.card-veil .btn { pointer-events: auto; }
/* 无阅读按钮时，遮罩只做暗化 */
.card-veil--plain { background: linear-gradient(180deg, rgba(42,39,35,0) 40%, rgba(42,39,35,.5)); clip-path: none; opacity: 0; }
.card:hover .card-veil--plain { opacity: 1; }

/* 状态角标：书签形 */
.card-tag {
  position: absolute; left: 0; top: 10px; z-index: 2;
  padding: 3px 9px 3px 8px;
  font-size: 11.5px; letter-spacing: .08em; line-height: 1.6;
  color: var(--paper-white);
  background: var(--ink);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
  box-shadow: 0 1px 3px rgba(62, 52, 38, .22);
}
.card-tag--finish { background: var(--dai); }
.card-tag--serial { background: var(--seal); }
.card-tag--vip    { background: var(--gold-deep); }
.card-tag--free   { background: var(--ink-3); }

/* 右上：评分 / 序号 */
.card-rank {
  position: absolute; right: 0; top: 10px; z-index: 2;
  min-width: 26px; height: 26px; padding: 0 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-num); font-size: 13px;
  color: var(--paper-white); background: rgba(42, 39, 35, .74);
  border-radius: var(--r-xs) 0 0 var(--r-xs);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.card-rank--top { background: var(--seal); font-family: var(--f-display); }
.card-rank--gold { background: var(--gold-deep); }

/* 卡身：书名 + meta */
.card-body { padding: 11px 12px 13px; }
.card-title {
  font-family: var(--f-display);
  font-size: 15px; line-height: 1.45; letter-spacing: .02em;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--t-fast) var(--ease);
}
.card:hover .card-title { color: var(--seal); }
.card-chap {
  margin-top: 4px;
  font-size: 12.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-chap:hover { color: var(--dai); }
.card-meta {
  margin-top: 7px; padding-top: 7px;
  border-top: 1px dashed var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--ink-4);
}
.card-meta .cm-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta .cm-r { font-family: var(--f-num); flex: none; }

/* ---- 7.3 行式列表（更新列表） ---- */
.rows { border-top: 1px solid var(--line-soft); }
.row {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: 13px 6px;
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--t-fast) var(--ease), padding-left var(--t-fast) var(--ease);
}
.row:hover { background: rgba(251, 250, 246, .75); padding-left: 12px; }
.row-cover {
  width: 44px; height: 58px; flex: none;
  border-radius: var(--r-xs); overflow: hidden;
  background: var(--paper-sink); border: 1px solid var(--line-soft);
}
.row-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row-main { flex: 1; min-width: 0; }
.row-title {
  font-family: var(--f-display); font-size: 15.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}
.row:hover .row-title { color: var(--seal); }
.row-sub {
  margin-top: 3px; font-size: 12.5px; color: var(--ink-3);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.row-sub .rs-chap { color: var(--dai); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.row-sub .rs-time { font-family: var(--f-num); color: var(--ink-4); }
.row-tags { flex: none; display: flex; gap: 6px; }

/* ---- 7.4 标签 chip ---- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12.5px; line-height: 1.6; letter-spacing: .04em;
  color: var(--ink-2);
  background: rgba(251, 250, 246, .8);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xs);
  transition: all var(--t-fast) var(--ease);
}
a.tag:hover { color: var(--seal); border-color: var(--line-seal); background: var(--seal-wash); }
.tag.is-cur { color: var(--seal-deep); border-color: var(--line-seal); background: var(--seal-wash); }
.tag--dai { color: var(--dai-deep); border-color: var(--dai-wash); background: var(--dai-wash); }
.tag--seal { color: var(--seal-deep); border-color: var(--line-seal); background: var(--seal-wash); }
.tag--gold { color: var(--gold-deep); border-color: var(--gold-wash); background: var(--gold-wash); }
.tag--ink  { color: var(--paper-white); background: var(--ink); border-color: var(--ink); }

/* ---- 7.5 筛选 chip（分类页主力） ---- */
.filters { display: grid; gap: var(--sp-4); }
.f-row { display: flex; align-items: flex-start; gap: var(--sp-4); }
.f-label {
  flex: none; width: 62px; padding-top: 5px;
  font-family: var(--f-display); font-size: 14px;
  letter-spacing: .12em; color: var(--ink-3);
}
.f-opts { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.chip {
  display: inline-block;
  padding: 6px 15px;
  font-size: 13.5px; letter-spacing: .06em; line-height: 1.5;
  color: var(--ink-2);
  background: rgba(251, 250, 246, .7);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xs);
  transition: all var(--t-fast) var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--line-2); background: var(--paper-white); }
.chip.on {
  color: var(--paper-white);
  background: var(--seal);
  border-color: var(--seal);
  box-shadow: 0 1px 4px rgba(181, 69, 58, .28);
}
.chip-count { font-family: var(--f-num); font-size: 11.5px; opacity: .7; margin-left: 3px; }

/* 筛选折叠：默认只露两行 */
.f-collapse .f-row:nth-child(n+5) { display: none; }
.f-collapse.is-open .f-row:nth-child(n+5) { display: flex; }
.f-toggle {
  align-self: flex-start; margin-top: 2px;
  font-size: 13px; color: var(--dai);
  border-bottom: 1px dashed var(--dai-wash);
}
.f-toggle:hover { color: var(--seal); border-bottom-color: var(--line-seal); }

/* 结果计数条 */
.result-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px; color: var(--ink-3);
}
.result-bar b { font-family: var(--f-num); font-weight: 400; color: var(--seal); font-size: 15px; }

/* ---- 7.6 分页 ---- */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; padding: var(--sp-7) 0 0; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 36px; height: 36px; padding: 0 11px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-num); font-size: 14px;
  color: var(--ink-2);
  background: rgba(251, 250, 246, .7);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xs);
  transition: all var(--t-fast) var(--ease);
}
.pager a:hover { color: var(--seal); border-color: var(--line-seal); background: var(--paper-white); }
.pager a.on { color: var(--paper-white); background: var(--ink); border-color: var(--ink); }
.pager .sep { border: 0; background: none; color: var(--ink-4); min-width: auto; }

/* ---- 7.7 面包屑 ---- */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-4); padding: var(--sp-5) 0 var(--sp-4); flex-wrap: wrap; }
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--seal); }
.crumb .sep { color: var(--ink-5); }
.crumb .cur { color: var(--ink-2); }

/* ---- 7.8 页头（内页标题区） ---- */
.pagehead { padding: var(--sp-6) 0 var(--sp-5); }
.pagehead h1 {
  font-family: var(--f-display); font-size: 30px; font-weight: 400;
  letter-spacing: .1em; color: var(--ink);
  display: flex; align-items: baseline; gap: var(--sp-4); flex-wrap: wrap;
}
.pagehead .ph-sub { font-size: 13.5px; color: var(--ink-4); letter-spacing: .04em; }
.pagehead .ph-desc { margin-top: 9px; font-size: 14px; color: var(--ink-3); max-width: 62em; line-height: 1.85; }

/* ---- 7.9 排行榜单卡（卷轴） ---- */
.rank-card {
  background: var(--paper-white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-m);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
/* 卷轴轴头：上下各一道织锦边 */
.rank-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: 13px 18px;
  background: linear-gradient(180deg, rgba(231, 224, 210, .7), rgba(231, 224, 210, .3));
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.rank-card-head::before {
  content: ""; position: absolute; left: 18px; bottom: -1px; width: 26px; height: 2px; background: var(--seal);
}
.rank-card-head h3 {
  font-family: var(--f-display); font-size: 17px; font-weight: 400;
  letter-spacing: .14em; color: var(--ink);
}
.rank-card-head .rch-more { font-size: 12.5px; color: var(--ink-4); }
.rank-card-head .rch-more:hover { color: var(--seal); }
.rank-list { padding: 6px 0; }
.rank-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px 18px;
  transition: background var(--t-fast) var(--ease);
}
.rank-item:hover { background: rgba(239, 234, 224, .6); }
.rank-no {
  flex: none; width: 26px;
  font-family: var(--f-display); font-size: 15px; text-align: center;
  color: var(--ink-4);
}
.rank-item:nth-child(1) .rank-no,
.rank-item:nth-child(2) .rank-no,
.rank-item:nth-child(3) .rank-no { color: var(--seal); }
.rank-item:nth-child(1) .rank-no { font-size: 18px; }
.rank-name {
  flex: 1; min-width: 0; font-size: 14.5px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}
.rank-item:hover .rank-name { color: var(--seal); }
.rank-val { flex: none; font-family: var(--f-num); font-size: 13px; color: var(--ink-3); }
.rank-item--rich { padding: 11px 18px; }
.rank-item--rich .rank-cover {
  width: 34px; height: 45px; flex: none; border-radius: var(--r-xs);
  overflow: hidden; background: var(--paper-sink); border: 1px solid var(--line-soft);
}
.rank-item--rich .rank-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank-info { flex: 1; min-width: 0; }
.rank-info .ri-t { font-family: var(--f-display); font-size: 14.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-info .ri-s { font-size: 12px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 7.10 数字统计块 ---- */
.stats { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { font-family: var(--f-num); font-size: 20px; color: var(--ink); line-height: 1.3; }
.stat-lab { font-size: 12.5px; color: var(--ink-4); letter-spacing: .06em; }

/* ---- 7.11 空状态 ---- */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--sp-9) var(--sp-5);
  text-align: center;
}
.empty-mark { width: 56px; height: 56px; color: var(--ink-5); margin-bottom: var(--sp-5); }
.empty-mark .seal-body { fill: none; stroke: currentColor; stroke-width: 1.6; }
.empty-title { font-family: var(--f-display); font-size: 17px; letter-spacing: .1em; color: var(--ink-2); }
.empty-desc { margin-top: 8px; font-size: 13.5px; color: var(--ink-4); max-width: 30em; line-height: 1.9; }
.empty-acts { margin-top: var(--sp-5); display: flex; gap: var(--sp-3); flex-wrap: wrap; justify-content: center; }

/* ---- 7.12 加载骨架 ---- */
.skel { background: linear-gradient(90deg, var(--paper-3) 25%, var(--paper-2) 37%, var(--paper-3) 63%); background-size: 400% 100%; animation: skel 1.4s ease infinite; border-radius: var(--r-xs); }
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 图片加载中 */
img.lazy-read, img[data-original] { background: linear-gradient(160deg, var(--paper-3), var(--paper-sink)); }
img.is-failed { opacity: .35; }

/* ==========================================================================
   §08 面板与纸面
   ========================================================================== */
.panel {
  background: var(--paper-white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-m);
  box-shadow: var(--sh-1);
  position: relative;
}
.panel-pad { padding: var(--sp-5) var(--sp-6); }
/* 纸的厚度：底缘一道浅灰渐变 */
.panel--thick::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: linear-gradient(180deg, rgba(42, 39, 35, .07), rgba(42, 39, 35, 0));
  border-radius: 0 0 var(--r-m) var(--r-m);
  pointer-events: none;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding-bottom: var(--sp-3); margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line-soft);
}
.panel-head h3 { font-family: var(--f-display); font-size: 17px; font-weight: 400; letter-spacing: .12em; }

/* 墨线分隔（笔触感） */
.inkline {
  height: 1px; border: 0; margin: var(--sp-7) 0;
  background: linear-gradient(90deg, transparent, var(--line-2) 15%, var(--line-2) 85%, transparent);
}

/* ==========================================================================
   §09 弹层
   ========================================================================== */
/* 遮罩 */
.veil-mask {
  position: fixed; inset: 0; z-index: var(--z-drawer);
  background: rgba(42, 39, 35, .42);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-base) var(--ease), visibility var(--t-base);
}
.veil-mask.is-open { opacity: 1; visibility: visible; }

/* 右侧抽屉（目录 / 筛选 / 移动导航） */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-modal);
  width: min(400px, 88vw);
  display: flex; flex-direction: column;
  background: var(--paper);
  background-image: var(--tex-paper);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 40px rgba(62, 52, 38, .16);
  transform: translateX(102%);
  transition: transform var(--t-slow) var(--ease);
  will-change: transform;
}
.drawer.is-open { transform: none; }
.drawer--left { right: auto; left: 0; border-left: 0; border-right: 1px solid var(--line); transform: translateX(-102%); box-shadow: 8px 0 40px rgba(62, 52, 38, .16); }
.drawer-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line-soft);
}
.drawer-head .dh-title { font-family: var(--f-display); font-size: 17px; letter-spacing: .14em; }
.drawer-head .dh-count { font-size: 12.5px; color: var(--ink-4); font-family: var(--f-num); }
.drawer-close {
  width: 32px; height: 32px; flex: none; margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3); border-radius: var(--r-xs);
}
.drawer-close:hover { color: var(--seal); background: var(--seal-wash); }
.drawer-close svg { width: 14px; height: 14px; }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-4) var(--sp-5) var(--sp-7); }

/* 居中弹层 */
.modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-5);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-base) var(--ease), visibility var(--t-base);
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-box {
  position: relative; z-index: 1;
  width: min(440px, 100%);
  max-height: 86vh; overflow-y: auto;
  background: var(--paper);
  background-image: var(--tex-paper);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--sh-3);
  padding: var(--sp-6);
  transform: translateY(10px) scale(.99);
  transition: transform var(--t-base) var(--ease);
}
.modal.is-open .modal-box { transform: none; }
.modal-head { text-align: center; margin-bottom: var(--sp-5); }
.modal-head h3 { font-family: var(--f-display); font-size: 19px; letter-spacing: .12em; }
.modal-head p { margin-top: 6px; font-size: 13.5px; color: var(--ink-3); }
.modal-close {
  position: absolute; right: 12px; top: 12px;
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-4); border-radius: var(--r-xs);
}
.modal-close:hover { color: var(--seal); background: var(--seal-wash); }
.modal-close svg { width: 14px; height: 14px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 58px; z-index: var(--z-toast);
  transform: translate(-50%, 12px);
  max-width: min(520px, 86vw);
  padding: 11px 22px;
  font-size: 14px; letter-spacing: .06em;
  color: var(--paper-white);
  background: rgba(42, 39, 35, .94);
  border-radius: var(--r-s);
  box-shadow: var(--sh-3);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), visibility var(--t-base);
  pointer-events: none;
}
.toast.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast--ok::before, .toast--err::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; margin-right: 9px; vertical-align: middle;
}
.toast--ok::before { background: var(--dai-soft); }
.toast--err::before { background: var(--seal-soft); }

/* 目录抽屉内的章节列表 */
.cat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.cat-item {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 11px;
  font-size: 13.5px; color: var(--ink-2);
  background: rgba(251, 250, 246, .7);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xs);
  transition: all var(--t-fast) var(--ease);
}
.cat-item:hover { color: var(--seal); border-color: var(--line-seal); background: var(--paper-white); }
.cat-item.is-cur { color: var(--paper-white); background: var(--ink); border-color: var(--ink); }
.cat-item .ci-no { font-family: var(--f-num); font-size: 12px; color: var(--ink-4); flex: none; }
.cat-item.is-cur .ci-no { color: rgba(251, 250, 246, .7); }
.cat-item .ci-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-item .ci-flag { flex: none; font-size: 10.5px; padding: 0 4px; border-radius: var(--r-xs); }
.cat-item .ci-flag--vip { color: var(--gold-deep); background: var(--gold-wash); }
.cat-item .ci-flag--cion { color: var(--seal-deep); background: var(--seal-wash); }

/* ==========================================================================
   §10 交互与状态
   ========================================================================== */
/* 滚动进场（仅在 JS 可用时隐藏初始态） */
html.js .reveal { opacity: 0; transform: translateY(18px); }
html.js .reveal.in { opacity: 1; transform: none; transition: opacity 620ms var(--ease), transform 620ms var(--ease); }

/* 页签 */
.tabs { display: flex; gap: var(--sp-4); border-bottom: 1px solid var(--line-soft); }
.tab {
  position: relative; padding: 9px 2px;
  font-size: 14px; letter-spacing: .1em; color: var(--ink-3);
  transition: color var(--t-fast) var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--ink); }
.tab.is-on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--seal);
}
.tabpane { display: none; }
.tabpane.is-on { display: block; }

/* 分段按钮（正倒序） */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-xs); overflow: hidden; }
.seg button {
  padding: 5px 14px; font-size: 13px; color: var(--ink-3);
  background: rgba(251, 250, 246, .6);
  transition: all var(--t-fast) var(--ease);
}
.seg button + button { border-left: 1px solid var(--line-soft); }
.seg button:hover { color: var(--ink); background: var(--paper-white); }
.seg button.is-on { color: var(--paper-white); background: var(--ink); }

/* 悬浮提示（纯 CSS，装饰性） */
.tip { position: relative; }
.tip::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  padding: 5px 11px; font-size: 12px; white-space: nowrap;
  color: var(--paper-white); background: rgba(42, 39, 35, .94);
  border-radius: var(--r-xs);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: all var(--t-fast) var(--ease);
}
.tip:hover::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ==========================================================================
   §11 东方装饰件
   ========================================================================== */
/* 印章（内联 SVG 的样式钩子） */
.seal-mark { width: 34px; height: 34px; flex: none; }
.seal-mark .seal-body { fill: var(--seal); }
.seal-mark .seal-rim  { fill: none; stroke: var(--seal-deep); stroke-width: 1; opacity: .5; }
.seal-mark .seal-carve{ fill: none; stroke: var(--paper-white); stroke-width: 2.1; stroke-linecap: round; }
.seal-mark--lg { width: 46px; height: 46px; }
.seal-mark--line .seal-body { fill: none; stroke: var(--seal); stroke-width: 1.6; }
.seal-mark--line .seal-carve { stroke: var(--seal); }

/* 墨点（列表序号 / 装饰） */
.inkdot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--seal); vertical-align: middle; }
.inkdot--dai { background: var(--dai); }
.inkdot--ink { background: var(--ink-4); }

/* 分隔纹样（菱形 + 横线） */
.divider {
  display: flex; align-items: center; gap: var(--sp-3);
  margin: var(--sp-7) 0; color: var(--ink-5);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.divider i { width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); flex: none; }

/* 窗棂格（极淡，铺在分区底） */
.lattice {
  position: absolute; inset: 0; pointer-events: none;
  opacity: .05;
  background-image:
    linear-gradient(var(--ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000, transparent 72%);
  mask-image: radial-gradient(120% 80% at 50% 0%, #000, transparent 72%);
}

/* ==========================================================================
   §12 首页
   ========================================================================== */

/* ---- 12.1 Hero：东方山水长卷 ----
   结构：固定高度的纸色长卷，远山/云雾/建筑轮廓为内联 SVG 叠层，
   右侧/左侧以漫画封面为主体。非轮播图。 */
.hero {
  position: relative;
  margin-top: var(--sp-6);
  min-height: 452px;
  border-radius: var(--r-l);
  overflow: hidden;
  background: linear-gradient(178deg, #FBFAF6 0%, #F3EFE6 46%, #EDE7DA 100%);
  border: 1px solid var(--line-soft);
  box-shadow: var(--sh-1);
  isolation: isolate;
}
/* 长卷内层：山与云 */
.hero-scene {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
.hero-scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-scene .hs-far  { opacity: .16; }
.hero-scene .hs-mid  { opacity: .22; }
.hero-scene .hs-near { opacity: .30; }
.hero-scene .hs-cloud{ opacity: .55; }
.hero-scene .hs-line { opacity: .13; }
/* 一层天光，压住山形上缘，保证文字可读 */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(96deg, rgba(251,250,246,.94) 0%, rgba(251,250,246,.80) 38%, rgba(251,250,246,.20) 66%, rgba(251,250,246,0) 100%);
}
.hero-in {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1fr) 420px;
  gap: var(--sp-7);
  align-items: center;
  min-height: 452px;
  padding: var(--sp-8) var(--sp-8);
}

/* 左：文案 */
.hero-copy { max-width: 30em; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; letter-spacing: .28em; color: var(--ink-3);
  margin-bottom: var(--sp-4);
}
.hero-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--seal); }
.hero-title {
  font-family: var(--f-display);
  font-size: 46px; line-height: 1.24; letter-spacing: .07em;
  color: var(--ink); font-weight: 400;
}
.hero-title em {
  display: block; font-style: normal;
  font-size: 26px; letter-spacing: .2em; color: var(--ink-3);
  margin-top: 12px;
}
.hero-desc {
  margin-top: var(--sp-5);
  font-size: 14.5px; line-height: 2; color: var(--ink-2);
  max-width: 27em;
}
.hero-acts { margin-top: var(--sp-6); display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.hero-stats {
  margin-top: var(--sp-6); padding-top: var(--sp-5);
  border-top: 1px solid var(--line-soft);
  display: flex; gap: var(--sp-7); flex-wrap: wrap;
}
.hero-stats .stat { text-align: left; }
.hero-stats .stat-num { font-size: 23px; }

/* 右：主推作品（封面为主体） */
.hero-feature { position: relative; }
.hero-slides { position: relative; min-height: 332px; }
.hero-slide {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 168px minmax(0, 1fr);
  gap: var(--sp-5); align-items: center;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease), visibility var(--t-slow);
}
.hero-slide.is-on { opacity: 1; visibility: visible; transform: none; position: relative; }
.hero-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--paper-sink);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(62, 52, 38, .18), 0 2px 6px rgba(62, 52, 38, .10);
}
.hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 印章压在封面右下 */
.hero-cover-seal {
  position: absolute; right: 9px; bottom: 9px; z-index: 2;
  width: 38px; height: 38px;
}
.hero-cover-seal .seal-body { fill: var(--seal); }
.hero-cover-seal .seal-carve { fill: none; stroke: var(--paper-white); stroke-width: 2.4; stroke-linecap: round; }
.hero-info { min-width: 0; }
.hero-info-kind {
  display: inline-block; margin-bottom: 10px;
  padding: 2px 9px; font-size: 11.5px; letter-spacing: .14em;
  color: var(--seal-deep); background: var(--seal-wash);
  border: 1px solid var(--line-seal); border-radius: var(--r-xs);
}
.hero-info-title {
  font-family: var(--f-display); font-size: 25px; line-height: 1.35;
  letter-spacing: .04em; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-info-title:hover { color: var(--seal); }
.hero-info-meta { margin-top: 9px; font-size: 13px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; }
.hero-info-text {
  margin-top: 11px; font-size: 13.5px; line-height: 1.9; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-info-acts { margin-top: var(--sp-4); display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* Hero 下部指示（竖排编号 + 细线进度） */
.hero-nav {
  margin-top: var(--sp-5); padding-top: var(--sp-4);
  border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: var(--sp-4);
}
.hero-dots { display: flex; gap: 7px; }
.hero-dot {
  width: 22px; height: 3px; border-radius: 2px;
  background: var(--ink-5); opacity: .55;
  transition: all var(--t-base) var(--ease);
}
.hero-dot.is-on { width: 40px; background: var(--seal); opacity: 1; }
.hero-pager { margin-left: auto; font-family: var(--f-num); font-size: 12.5px; color: var(--ink-4); letter-spacing: .1em; }

/* ---- 12.2 分类入口（印章 / 书签） ---- */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.cat-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-5) var(--sp-5) var(--sp-4);
  background: var(--paper-white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-m);
  box-shadow: var(--sh-1);
  transition: all var(--t-base) var(--ease);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line); }
/* 左侧朱砂竖条 */
.cat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--seal); opacity: .85;
  transition: width var(--t-base) var(--ease);
}
.cat-card:hover::before { width: 5px; }
/* 右下角淡纹样 */
.cat-card-deco {
  position: absolute; right: -14px; bottom: -14px; width: 76px; height: 76px;
  color: var(--ink); opacity: .05; pointer-events: none;
}
.cat-card-deco svg { width: 100%; height: 100%; }
.cat-card-idx {
  flex: none; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-size: 17px;
  color: var(--seal); background: var(--seal-wash);
  border: 1px solid var(--line-seal); border-radius: var(--r-xs);
}
.cat-card-main { min-width: 0; position: relative; z-index: 1; }
.cat-card-name {
  font-family: var(--f-display); font-size: 16.5px; letter-spacing: .1em; color: var(--ink);
  transition: color var(--t-fast) var(--ease);
}
.cat-card:hover .cat-card-name { color: var(--seal); }
.cat-card-sub { margin-top: 3px; font-size: 12.5px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 12.3 公告板 ---- */
.notice-panel {
  position: relative; overflow: hidden;
  padding: var(--sp-6) var(--sp-6) var(--sp-6) var(--sp-7);
  background: linear-gradient(150deg, rgba(185, 154, 91, .10), rgba(185, 154, 91, .03) 60%, transparent);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-m);
}
.notice-panel::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--seal), var(--seal-deep));
}
.notice-panel h3 {
  font-family: var(--f-display); font-size: 17px; letter-spacing: .14em;
  margin-bottom: var(--sp-3);
}
.notice-panel p { font-size: 13.5px; line-height: 2; color: var(--ink-2); }

/* ==========================================================================
   §13 分类族页面
   ========================================================================== */
/* 列表页顶部横幅 */
.list-banner {
  position: relative; overflow: hidden;
  padding: var(--sp-7) var(--sp-7);
  border-radius: var(--r-l);
  background: linear-gradient(120deg, #FBFAF6, #F1ECE1 70%);
  border: 1px solid var(--line-soft);
  margin-top: var(--sp-5);
}
.list-banner-in { position: relative; z-index: 2; }
.list-banner h1 {
  font-family: var(--f-display); font-size: 30px; font-weight: 400;
  letter-spacing: .14em; color: var(--ink);
}
.list-banner .lb-sub { margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }
.list-banner .lb-deco {
  position: absolute; right: 3%; top: 50%; transform: translateY(-50%);
  width: 170px; height: 170px; color: var(--ink); opacity: .07; pointer-events: none;
}

/* 筛选面板容器 */
.filter-panel {
  margin-top: var(--sp-5);
  padding: var(--sp-5) var(--sp-6);
  background: rgba(251, 250, 246, .72);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-m);
}

/* 搜索页 */
.search-hero { padding: var(--sp-8) 0 var(--sp-6); text-align: center; }
.search-hero h1 {
  font-family: var(--f-display); font-size: 30px; font-weight: 400; letter-spacing: .14em;
}
.search-big {
  display: flex; align-items: center; gap: 0;
  max-width: 560px; margin: var(--sp-5) auto 0;
  height: 48px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-s);
  background: var(--paper-white);
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.search-big:focus-within { border-color: var(--seal); box-shadow: 0 0 0 3px var(--seal-wash); }
.search-big input { flex: 1; min-width: 0; height: 100%; padding: 0 var(--sp-4); border: 0; background: none; outline: none; font-size: 15px; }
.search-big button {
  flex: none; height: 100%; padding: 0 var(--sp-6);
  font-size: 14.5px; letter-spacing: .14em;
  color: var(--paper-white); background: var(--ink);
  transition: background var(--t-fast) var(--ease);
}
.search-big button:hover { background: var(--seal); }
/* 热词 */
.hotwords { margin-top: var(--sp-4); display: flex; align-items: center; justify-content: center; gap: var(--sp-2); flex-wrap: wrap; font-size: 13px; color: var(--ink-4); }

/* ==========================================================================
   §14 详情页
   ========================================================================== */
.detail-hero {
  position: relative;
  margin-top: var(--sp-5);
  border-radius: var(--r-l);
  overflow: hidden;
  background: linear-gradient(150deg, #FBFAF6 0%, #F2EDE2 58%, #EAE3D5 100%);
  border: 1px solid var(--line-soft);
  box-shadow: var(--sh-1);
}
/* 背景横版封面做氛围（大幅虚化 + 纸色笼罩，不影响阅读） */
.detail-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center 28%;
  opacity: .16; filter: blur(18px) saturate(.7);
  transform: scale(1.08);
}
.detail-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, rgba(251,250,246,.95) 0%, rgba(251,250,246,.86) 42%, rgba(251,250,246,.68) 100%);
}
.detail-hero-in {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 208px minmax(0, 1fr);
  gap: var(--sp-7);
  padding: var(--sp-8);
}
.detail-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-m); overflow: hidden;
  background: var(--paper-sink);
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(62, 52, 38, .20), 0 2px 6px rgba(62, 52, 38, .10);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-main { min-width: 0; }
.detail-title {
  font-family: var(--f-display); font-size: 34px; font-weight: 400;
  line-height: 1.3; letter-spacing: .05em; color: var(--ink);
}
.detail-author {
  margin-top: 12px; display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--ink-2);
}
.detail-author img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-soft); }
.detail-author a:hover { color: var(--seal); }
.detail-facts {
  margin-top: var(--sp-4); display: flex; gap: var(--sp-6); flex-wrap: wrap;
  font-size: 13.5px; color: var(--ink-3);
}
.detail-facts .df-item { display: flex; align-items: baseline; gap: 6px; }
.detail-facts .df-v { font-family: var(--f-num); font-size: 16px; color: var(--ink); }
.detail-notice {
  margin-top: var(--sp-4); padding: 10px 14px;
  font-size: 13px; color: var(--ink-2); line-height: 1.8;
  background: rgba(185, 154, 91, .08);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
}
.detail-summary {
  margin-top: var(--sp-5);
  font-size: 14.5px; line-height: 2; color: var(--ink-2);
  max-width: 54em;
}
.detail-summary.is-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.summary-toggle { margin-top: 6px; font-size: 13px; color: var(--dai); border-bottom: 1px dashed var(--dai-wash); }
.summary-toggle:hover { color: var(--seal); border-bottom-color: var(--line-seal); }
.detail-acts { margin-top: var(--sp-6); display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.detail-social { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line-soft); display: flex; gap: var(--sp-6); flex-wrap: wrap; }
.soc-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; color: var(--ink-3);
  transition: color var(--t-fast) var(--ease);
}
.soc-btn:hover { color: var(--seal); }
.soc-btn.is-on { color: var(--seal); }
.soc-btn svg { width: 15px; height: 15px; }
.soc-btn b { font-family: var(--f-num); font-weight: 400; color: var(--ink-2); }

/* 章节目录 */
.ch-panel { margin-top: var(--sp-6); }
.ch-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding-bottom: var(--sp-3); margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.ch-head-l { display: flex; align-items: baseline; gap: var(--sp-3); }
.ch-head h2 { font-family: var(--f-display); font-size: 19px; font-weight: 400; letter-spacing: .12em; display: flex; align-items: center; gap: 10px; }
.ch-head h2::before { content: ""; width: 3px; height: 17px; background: var(--seal); border-radius: 1px; }
.ch-count { font-size: 13px; color: var(--ink-4); font-family: var(--f-num); }
.ch-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ch-item {
  display: block; padding: 10px 12px;
  font-size: 13.5px; color: var(--ink-2);
  background: rgba(251, 250, 246, .72);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xs);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: all var(--t-fast) var(--ease);
}
.ch-item:hover { color: var(--seal); border-color: var(--line-seal); background: var(--paper-white); transform: translateY(-1px); }
.ch-item .ch-flag { font-size: 10.5px; margin-left: 4px; padding: 0 4px; border-radius: var(--r-xs); vertical-align: 1px; }
.ch-item .ch-flag--vip { color: var(--gold-deep); background: var(--gold-wash); }
.ch-item .ch-flag--cion { color: var(--seal-deep); background: var(--seal-wash); }
/* 折叠 */
.ch-panel.is-collapsed .ch-grid { max-height: 262px; overflow: hidden; position: relative; }
.ch-panel.is-collapsed .ch-grid::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(180deg, rgba(245, 242, 235, 0), var(--paper));
}
.ch-toggle { margin-top: var(--sp-4); text-align: center; }
.ch-toggle button {
  padding: 8px 26px; font-size: 13.5px; letter-spacing: .12em;
  color: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--r-s); background: rgba(251, 250, 246, .7);
  transition: all var(--t-fast) var(--ease);
}
.ch-toggle button:hover { color: var(--seal); border-color: var(--line-seal); background: var(--paper-white); }

/* 评论挂载区 */
.cmt-wrap { margin-top: var(--sp-6); }
.cmt-editor {
  display: flex; gap: var(--sp-4); padding: var(--sp-5);
  background: rgba(251, 250, 246, .72);
  border: 1px solid var(--line-soft); border-radius: var(--r-m);
}
.cmt-editor-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; background: var(--paper-3); border: 1px solid var(--line-soft); }
.cmt-editor-main { flex: 1; min-width: 0; }
.cmt-textarea {
  width: 100%; min-height: 78px; resize: vertical;
  padding: 11px 13px;
  font-family: var(--f-body); font-size: 14px; line-height: 1.85;
  color: var(--ink); background: var(--paper-white);
  border: 1px solid var(--line-soft); border-radius: var(--r-s);
  outline: none;
  transition: border-color var(--t-fast) var(--ease);
}
.cmt-textarea:focus { border-color: var(--seal); }
.cmt-editor-foot { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.mccms_comment_list { margin-top: var(--sp-5); }

/* 评论列表（服务端片段 comment.html 的结构） */
.cmt-list { display: flex; flex-direction: column; gap: var(--sp-4); }
.cmt-item { display: flex; gap: var(--sp-4); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--line-soft); }
.cmt-item:last-child { border-bottom: 0; }
.cmt-item-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; overflow: hidden; background: var(--paper-3); border: 1px solid var(--line-soft); }
.cmt-item-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmt-item-main { flex: 1; min-width: 0; }
.cmt-item-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cmt-item-name { font-family: var(--f-display); font-size: 14.5px; color: var(--ink); }
.cmt-item-time { font-size: 12px; color: var(--ink-4); font-family: var(--f-num); }
.cmt-item-text { margin-top: 6px; font-size: 14px; line-height: 1.9; color: var(--ink-2); word-break: break-word; }
.cmt-item-text .pic { width: 22px; height: 22px; vertical-align: -5px; margin: 0 1px; }
.cmt-item-foot { margin-top: 9px; display: flex; align-items: center; gap: var(--sp-4); }
.cmt-zan {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--ink-4);
  transition: color var(--t-fast) var(--ease);
}
.cmt-zan:hover { color: var(--seal); }
.cmt-zan svg { width: 14px; height: 14px; }
.cmt-zan b { font-family: var(--f-num); font-weight: 400; }
.cmt-reply-tip { font-size: 12.5px; color: var(--ink-4); }
.cmt-reply {
  margin-top: 10px; padding: 10px 13px;
  font-size: 13.5px; line-height: 1.85; color: var(--ink-2);
  background: rgba(239, 234, 224, .6);
  border-left: 2px solid var(--line-2);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
}
.cmt-reply-name { color: var(--dai-deep); margin-right: 6px; }
.cmt-reply-text .pic { width: 20px; height: 20px; vertical-align: -5px; }
.cmt-reply-time { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-4); font-family: var(--f-num); }
.cmt-pager { padding-top: var(--sp-5); }

/* ==========================================================================
   §15 响应式（PC 优先向下适配；移动端为独立设计，非缩放）
   ========================================================================== */

/* ≤1199px：收窄侧栏与列数 */
@media (max-width: 1199px) {
  :root { --gutter: 20px; --sec-gap: 58px; }
  .grid-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .duo { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-6); }
  .duo--rev { grid-template-columns: 300px minmax(0, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-in { grid-template-columns: minmax(0, 1fr) 360px; padding: var(--sp-7) var(--sp-6); }
  .hero-title { font-size: 40px; }
  .detail-hero-in { grid-template-columns: 184px minmax(0, 1fr); gap: var(--sp-6); padding: var(--sp-7) var(--sp-6); }
  .detail-title { font-size: 30px; }
  /* 顶栏：收起部分用户链接 */
  .uz-link { display: none; }
  .nav { margin-left: 0; }
}

/* ≤991px：侧栏下沉，导航收进抽屉 */
@media (max-width: 991px) {
  :root { --sec-gap: 48px; --sec-head: 20px; }
  .grid-cards, .grid-cards--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .duo, .duo--rev { grid-template-columns: minmax(0, 1fr); }
  .triple { grid-template-columns: minmax(0, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .f-deco { display: none; }
  /* 主内容独占，侧栏变整行 */
  .duo > .side { order: 2; }
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
  .hero::after { background: linear-gradient(180deg, rgba(251,250,246,.94) 0%, rgba(251,250,246,.86) 62%, rgba(251,250,246,.62) 100%); }
  .hero-feature { border-top: 1px solid var(--line-soft); padding-top: var(--sp-6); }
  .detail-hero-in { grid-template-columns: 160px minmax(0, 1fr); }
  .detail-title { font-size: 27px; }
}

/* ==========================================================================
   桌面端的「移动端专用组件」兜底
   --------------------------------------------------------------------------
   .m-tabbar 是 ≤767px 才启用的底部固定导航，它的 display:flex 只写在
   下面的移动媒体查询里。若这里不显式 display:none，桌面端 <nav> 会退回
   默认的 display:block 而**照常渲染**；更糟的是里面 5 个
   <svg viewBox="0 0 24 24"> 没有尺寸（width/height 也在移动块里），
   会各自撑满容器宽度变成 1910×1910 的巨型图标，stroke-width:1.7 被放大到
   约 135px —— 首页图标是个"房子"轮廓，看上去就是一条横贯首屏的粗红弧，
   同时把文档撑长约 9700px。故必须在此显式隐藏。

   .m-cats（快捷分类条）虽然名字带 m-，但标记写在 head.html 头部第二行、
   所有宽度都会渲染，因此桌面端必须给出正式样式，否则退化成一行裸链接。
   移动端在下面的媒体查询里覆盖为横向滚动条。
   ========================================================================== */
.m-tabbar { display: none; }

.m-cats {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-2) 0 var(--sp-4);
  border-top: 1px solid var(--line-soft);
}
.m-cats a {
  padding: 4px 12px;
  font-size: 13px; letter-spacing: .06em; color: var(--ink-3);
  background: rgba(251, 250, 246, .8);
  border: 1px solid var(--line-soft); border-radius: var(--r-pill);
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.m-cats a:hover { color: var(--seal); border-color: var(--line-seal); background: var(--paper-white); }
.m-cats a.on { color: var(--paper-white); background: var(--seal); border-color: var(--seal); }

/* ≤767px：移动端布局 —— 独立设计
   顶部只留 品牌 + 搜索 + 汉堡；主导航进抽屉；底部固定导航 */
@media (max-width: 767px) {
  :root {
    --gutter: 16px;
    --sec-gap: 44px;
    --sec-head: 18px;
    --sp-9: 52px;
    --sp-10: 64px;
  }
  body { font-size: 14.5px; padding-bottom: 60px; } /* 给底部导航让位 */

  /* ---- 顶部：两行式 —— 第一行品牌+搜索，第二行滚动分类条 ---- */
  .topbar-in { height: 56px; gap: var(--sp-3); }
  .brand-mark { width: 28px; height: 28px; }
  .mccms-logo-text, .brand-txt { font-size: 17px; letter-spacing: .1em; }
  .nav { display: none; }                       /* 主导航改由抽屉与底部导航承担 */
  .nav-toggle { display: inline-flex; margin-left: 4px; }
  .search-box { max-width: none; flex: 1; height: 36px; margin-left: var(--sp-3); }
  .search-box .sb-ic { margin: 0 6px 0 10px; }
  .user-zone { display: none; }                 /* 用户入口移入抽屉与"我的" */

  /* 移动端横向分类条（可滑动，JS 不可用时依然可用） */
  .m-cats {
    display: flex; gap: 6px;
    overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0 10px;
    border-top: 1px solid var(--line-soft);
    scrollbar-width: none;
  }
  .m-cats::-webkit-scrollbar { display: none; }
  .m-cats a {
    flex: none; padding: 5px 13px;
    font-size: 13px; letter-spacing: .06em; color: var(--ink-2);
    background: rgba(251, 250, 246, .8);
    border: 1px solid var(--line-soft); border-radius: var(--r-pill);
    white-space: nowrap;
  }
  .m-cats a.on { color: var(--paper-white); background: var(--seal); border-color: var(--seal); }

  /* ---- 底部固定导航 ---- */
  .m-tabbar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-head);
    background: rgba(245, 242, 235, .96);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line-soft);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .m-tabbar a {
    flex: 1; padding: 8px 2px 7px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 11px; letter-spacing: .06em; color: var(--ink-4);
    transition: color var(--t-fast) var(--ease);
  }
  .m-tabbar a svg { width: 21px; height: 21px; }
  .m-tabbar a.on { color: var(--seal); }
  .m-tabbar a.on svg { stroke-width: 2; }

  /* ---- 栅格：2 列为主 ---- */
  .grid-cards, .grid-cards--4, .grid-cards--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4) 10px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* ---- 区头 ---- */
  .sec-title { font-size: 20px; }
  .sec-title::before { height: 17px; }
  .sec-sub { display: none; }

  /* ---- 卡片：收紧内距 ---- */
  .card-body { padding: 9px 10px 11px; }
  .card-title { font-size: 14px; }
  .card-chap { font-size: 12px; }
  .card-meta { font-size: 11.5px; margin-top: 6px; padding-top: 6px; }

  /* ---- Hero：竖排堆叠，封面缩小 ---- */
  .hero { min-height: 0; border-radius: var(--r-m); margin-top: var(--sp-4); }
  .hero-in { padding: var(--sp-6) var(--sp-5); min-height: 0; }
  .hero-title { font-size: 30px; }
  .hero-title em { font-size: 18px; letter-spacing: .16em; margin-top: 8px; }
  .hero-desc { font-size: 13.5px; margin-top: var(--sp-4); }
  .hero-acts { margin-top: var(--sp-5); }
  .hero-acts .btn { flex: 1; }
  .hero-stats { gap: var(--sp-5); margin-top: var(--sp-5); padding-top: var(--sp-4); }
  .hero-stats .stat-num { font-size: 19px; }
  .hero-slides { min-height: 0; }
  .hero-slide { grid-template-columns: 104px minmax(0, 1fr); gap: var(--sp-4); }
  .hero-info-title { font-size: 18px; -webkit-line-clamp: 2; }
  .hero-info-text { display: none; }
  .hero-info-acts .btn { font-size: 13px; padding: 7px 14px; }
  .hero-cover-seal { width: 30px; height: 30px; right: 7px; bottom: 7px; }

  /* ---- 行式列表 ---- */
  .row { padding: 11px 2px; gap: var(--sp-3); }
  .row-cover { width: 38px; height: 50px; }
  .row-title { font-size: 14.5px; }
  .row-tags { display: none; }

  /* ---- 筛选：标签换行、可横向滑动 ---- */
  .filter-panel { padding: var(--sp-4); }
  .f-row { flex-direction: column; gap: 8px; }
  .f-label { width: auto; padding-top: 0; font-size: 13px; }
  .f-opts { gap: 6px; }
  .chip { padding: 5px 12px; font-size: 13px; }
  .f-collapse .f-row:nth-child(n+4) { display: none; }
  .f-collapse.is-open .f-row:nth-child(n+4) { display: flex; }

  /* ---- 分页 ---- */
  .pager a, .pager span { min-width: 33px; height: 33px; padding: 0 9px; font-size: 13px; }

  /* ---- 详情页：封面与信息横排 ---- */
  .detail-hero { border-radius: var(--r-m); }
  .detail-hero-in { grid-template-columns: 108px minmax(0, 1fr); gap: var(--sp-4); padding: var(--sp-5); }
  .detail-title { font-size: 21px; }
  .detail-author { margin-top: 8px; font-size: 13px; }
  .detail-facts { gap: var(--sp-4); margin-top: 10px; font-size: 12.5px; }
  .detail-facts .df-v { font-size: 14px; }
  .detail-notice, .detail-summary { grid-column: 1 / -1; }
  .detail-summary { margin-top: var(--sp-4); font-size: 13.5px; }
  .detail-acts { margin-top: var(--sp-4); }
  .detail-acts .btn { flex: 1; }
  .detail-social { gap: var(--sp-4); margin-top: var(--sp-4); padding-top: var(--sp-3); }
  .ch-head h2 { font-size: 17px; }

  /* ---- 页脚：单列，精简 ---- */
  .footer { margin-top: var(--sp-8); padding-top: var(--sp-6); }
  .footer-main { grid-template-columns: 1fr; gap: var(--sp-6); padding-bottom: var(--sp-6); }
  .f-site-note { padding: var(--sp-4) 0; font-size: 12px; }
  .f-bar { gap: var(--sp-3); padding-top: var(--sp-4); }
  .f-topbtn { margin-left: 0; width: 100%; justify-content: center; }
  .backtop { display: none !important; }        /* 移动端用底部导航替代 */

  /* ---- 抽屉占满更多宽度 ---- */
  .drawer { width: 86vw; }
  .cat-list { grid-template-columns: 1fr; }

  /* ---- 搜索页 ---- */
  .search-hero { padding: var(--sp-6) 0 var(--sp-5); }
  .search-hero h1 { font-size: 22px; }
  .search-big { height: 44px; }
  .search-big button { padding: 0 var(--sp-5); }

  /* ---- toast 抬高，避开底部导航 ---- */
  .toast { bottom: 76px; }
}

/* ≤600px：卡片降为 2 列 */
@media (max-width: 600px) {
  .grid-cards, .grid-cards--3, .grid-cards--4, .grid-cards--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: 1fr; }
  .hero-slide { grid-template-columns: 92px minmax(0, 1fr); }
  .detail-hero-in { grid-template-columns: 96px minmax(0, 1fr); }
  .modal-box { padding: var(--sp-5); }
}

/* ≤380px：极小屏再收一档 */
@media (max-width: 380px) {
  .search-box { max-width: 130px; }
  .hero-title { font-size: 26px; }
  .ch-grid { grid-template-columns: 1fr; }
}

/* 打印（详情页/章节列表可打印） */
@media print {
  .topbar, .footer, .m-tabbar, .backtop, .hero-scene, .card-veil { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; }
}

/* ==========================================================================
   §14b 错误页
   ========================================================================== */
.err-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: var(--sp-10) var(--sp-5);
  min-height: 58vh;
}
.err-seal { width: 62px; height: 62px; margin-bottom: var(--sp-6); }
.err-seal .seal-body { fill: var(--seal); opacity: .92; }
.err-seal .seal-rim { fill: none; stroke: var(--paper-white); stroke-width: 1; opacity: .35; }
.err-seal .seal-carve { fill: none; stroke: var(--paper-white); stroke-width: 2.2; stroke-linecap: round; }
.err-code {
  font-family: var(--f-display);
  font-size: 76px; line-height: 1; letter-spacing: .1em;
  color: var(--paper-sink);
}
.err-title {
  margin-top: var(--sp-4);
  font-family: var(--f-display); font-size: 24px; font-weight: 400;
  letter-spacing: .16em; color: var(--ink);
}
.err-desc { margin-top: var(--sp-4); font-size: 14px; line-height: 2; color: var(--ink-3); }
.err-acts { margin-top: var(--sp-7); display: flex; gap: var(--sp-3); flex-wrap: wrap; justify-content: center; }
.err-redirect { margin-top: var(--sp-6); }

/* 更新页：7 日分组 */
.day-group + .day-group { margin-top: var(--sp-7); }
.day-head {
  display: flex; align-items: center; gap: var(--sp-3);
  padding-bottom: var(--sp-3); margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line-soft);
}
.day-head .dh-seal {
  width: 30px; height: 30px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-size: 14px;
  color: var(--paper-white); background: var(--seal);
  border-radius: var(--r-xs);
}
.day-head h3 { font-family: var(--f-display); font-size: 18px; font-weight: 400; letter-spacing: .14em; }
.day-head .dh-time { margin-left: auto; font-size: 12.5px; color: var(--ink-4); font-family: var(--f-num); }
/* 两列图文列表 */
.grid-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--sp-6); }

/* 榜单总览：两列榜单卡 */
.rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
/* 榜单快捷 chip 条 */
.rank-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-6); }

@media (max-width: 991px) {
  .grid-rows { grid-template-columns: minmax(0, 1fr); }
  .rank-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .err-code { font-size: 56px; }
  .err-title { font-size: 20px; }
  .err-acts .btn { flex: 1; min-width: 130px; }
  .err-wrap { padding: var(--sp-8) var(--sp-4); min-height: 50vh; }
}

/* 章节分组页签（由 js/orient-chapter.js 按章节名归类后生成） */
.ch-tabs {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px dashed var(--line-soft);
  transition: opacity var(--t-base) var(--ease);
}
.ch-tabs.is-dim { opacity: .42; pointer-events: none; }
.ch-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  font-size: 13.5px; letter-spacing: .06em; line-height: 1.5;
  color: var(--ink-2);
  background: rgba(251, 250, 246, .7);
  border: 1px solid var(--line-soft); border-radius: var(--r-xs);
  transition: all var(--t-fast) var(--ease);
}
.ch-tab:hover { color: var(--seal); border-color: var(--line-seal); background: var(--paper-white); }
.ch-tab.is-on {
  color: var(--paper-white); background: var(--seal);
  border-color: var(--seal);
  box-shadow: 0 1px 4px rgba(181, 69, 58, .26);
}
.ch-tab-num {
  font-family: var(--f-num); font-size: 11.5px; font-style: normal;
  opacity: .65;
}
.ch-tab.is-on .ch-tab-num { opacity: .85; }

/* 「展开本卷其余 N 话」 */
.ch-more { margin-top: var(--sp-4); text-align: center; }
.ch-more button {
  padding: 8px 26px; font-size: 13.5px; letter-spacing: .1em;
  color: var(--ink-2); background: rgba(251, 250, 246, .7);
  border: 1px solid var(--line); border-radius: var(--r-s);
  transition: all var(--t-fast) var(--ease);
}
.ch-more button:hover { color: var(--seal); border-color: var(--line-seal); background: var(--paper-white); }

/* 作品速览（全部数据来自 CMS 统计字段，无文案编造） */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-5); }
.facts .fact {
  display: flex; align-items: baseline; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13.5px; color: var(--ink-3);
}
.facts .fact:last-child, .facts .fact:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.facts .fact-k { flex: none; min-width: 4.5em; letter-spacing: .06em; }
.facts .fact-v { flex: 1; color: var(--ink); font-family: var(--f-num); }
.facts .fact-v a { font-family: var(--f-body); color: var(--dai-deep); border-bottom: 1px solid var(--dai-wash); }
.facts .fact-v a:hover { color: var(--seal); border-bottom-color: var(--line-seal); }
.facts-note { margin-top: var(--sp-4); font-size: 12.5px; line-height: 1.9; color: var(--ink-4); }

/* ==========================================================================
   §16 无障碍与降级
   ========================================================================== *//* 尊重系统"减少动态效果" */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  .card:hover { transform: none; }
  .card:hover .card-cover img { transform: none; }
}

/* 高对比度偏好 */
@media (prefers-contrast: more) {
  :root { --line: rgba(42,39,35,.34); --line-2: rgba(42,39,35,.5); --ink-3: #665F55; --ink-4: #7D766A; }
}

/* 无 JS 兜底：所有依赖 JS 的初始隐藏态都不生效 */
html:not(.js) .card-veil { display: none; }
html:not(.js) .drawer, html:not(.js) .veil-mask, html:not(.js) .modal { display: none; }
html:not(.js) .m-tabbar { display: flex; }

/* ==========================================================================
   事实栏窄屏收缩（事实栏窄屏收缩）
   --------------------------------------------------------------------------
   .facts .fact-v 只有 flex:1，缺 min-width:0 —— flex 项默认 min-width:auto，
   不会收缩到内容最小宽度以下；其内部的「连载,日本,其它」是不可断行长串，
   导致 1280 视口下整行溢出（实测 arcanum 1339 / orient 1287，视口 1280）。
   补 min-width:0 允许收缩，并给长串允许任意点断行。
   ========================================================================== */
.facts .fact-v { min-width: 0; }
.facts .fact-v a { overflow-wrap: anywhere; word-break: break-word; }
