@charset "utf-8";
/* ==========================================================================
   国学典藏 · v9「鎏金宣纸」双主题终层
   --------------------------------------------------------------------------
   设计判断：
   1. 全黑方向（v8 玄墨）经用户确认不取，默认回到纸色——但不用 v7 的
      冷灰白，改「鎏金宣纸」：深墨展墙 + 暖宣纸 + 暗金发丝线 + 朱砂点缀，
      一眼贵气的关键在对比骨架（墨/纸）与金的克制（只走线与小字）。
   2. theme-dark 玄墨整层保留：存过"深色"偏好的访客仍得全黑体验。
   3. 白底残留收编与回顶钮修复（第 2/4 节）双主题通用。
   加载：guoxue-v7.css 之后，全站最后一层。
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. 鎏金宣纸（默认浅色主题 · v9）
      全黑方向不成立，回纸色但不用 v7 的冷灰白：
      深墨展墙（首屏/页脚）+ 暖宣纸正文 + 暗金发丝线 + 朱砂印章点缀。
      金只走 1px 线、小字眉标与点缀字，永不铺面。
   -------------------------------------------------------------------------- */
:root{
  --n6-bg:#F2F0E4;
  --n6-bg-2:#EAE7D7;
  --n6-card:#FDFCF6;
  --n6-card-hover:#FFFEFA;
  --n6-ink:#221B10;
  --n6-ink-2:#5E5442;
  --n6-ink-3:#918770;
  --n6-line:rgba(34,27,16,.13);
  --n6-line-2:rgba(34,27,16,.06);
  --n6-line-3:rgba(34,27,16,.24);
  --n6-gold:#8A6A28;
  --n6-gold-l:#B3913F;
  --n6-gold-s:rgba(138,106,40,.32);
  --n6-cinnabar:#B03A24;
  --n6-dark:#17120A;
  --n6-dark-2:#1D170D;
  --n6-dark-line:rgba(216,181,101,.16);

  --paper:#F2F0E4;--paper2:#EAE7D7;--paper3:#FDFCF6;
  --ink:#221B10;--ink2:#5E5442;--ink3:#918770;
  --gold:#8A6A28;
  --line:rgba(34,27,16,.13);--line-soft:rgba(34,27,16,.06);
  --card-bg:#FDFCF6;
  --v5-ink:#221B10;--v5-ink-2:#5E5442;--v5-ink-3:#918770;
  --v5-line:rgba(34,27,16,.13);--v5-line-2:rgba(34,27,16,.06);
  --v5-red:#221B10;--v5-card:#FBF7EC;--v5-paper:#F2F0E4;--v5-paper-2:#EAE7D7;

  --n7-card:#FDFCF6;
  --n7-card-h:#FFFEFA;
  --n7-hair:rgba(34,27,16,.12);
  --n7-hair-2:rgba(34,27,16,.06);
  --n7-hair-gold:rgba(138,106,40,.34);
}

/* 宣纸的天光：换成暖调 */
body::before{
  background:
    radial-gradient(1400px 700px at 50% -22%,rgba(255,253,246,.92),transparent 68%),
    linear-gradient(180deg,rgba(255,253,244,.5),transparent 26%);
}
::selection{background:#221B10;color:#FBF7EC}

/* 展墙统一换暖墨（v7 写死 #0C0B0A 的四处）：首屏/跑马灯/栏目页头/页脚 */
.hero,.n6-mq,.page-hero,.footer,.foot{background:#17120A}
.hero-bg{
  background:
    radial-gradient(1100px 620px at 26% 12%,rgba(210,172,99,.13),transparent 62%),
    radial-gradient(720px 520px at 86% 92%,rgba(179,145,63,.10),transparent 64%),
    linear-gradient(168deg,#1A140A 0%,#1F1810 52%,#110D07 100%);
}
.n6-mq{border-top:1px solid rgba(216,181,101,.10);border-bottom:1px solid rgba(216,181,101,.10)}
.n6-mq::before{background:linear-gradient(90deg,#17120A,transparent)}
.n6-mq::after{background:linear-gradient(270deg,#17120A,transparent)}
.page-hero{border-bottom:1px solid rgba(216,181,101,.12)}
.footer,.foot{color:rgba(233,224,205,.55)}

/* 展墙上的字：标题近白、点缀金提亮一档，副标与统计标签从 .34/.5 提到可读 */
.hero h1{color:#F8F3E6}
.hero h1 em{color:#DEBF7A}
.hero .kicker{color:rgba(214,180,112,.92)}
.hero-sub{color:rgba(248,243,230,.64)}
.hero-stats span{color:rgba(248,243,230,.52)}
.hero-stats b{color:#F8F3E6}
.hero-search{border-bottom-color:rgba(216,181,101,.36)}
.hero-search input::placeholder{color:rgba(248,243,230,.36)}
.page-hero h1{color:#F8F3E6}

/* 贵气三处小收口：类目大写编号走鎏金；日历卡归零圆角；分区标题金线 */
.toc-num{color:#8A6A28}
.cal-card,.cal_side{border-radius:0!important;border-color:var(--n7-hair-gold)!important}
.cal-card{background:var(--n7-card)}
.list_wrap h4::before{background:#8A6A28}

/* 余下的半透明白片（v3 字书组件）在宣纸上偏“奶”，统一到象牙 + 发丝边 */
.zi-act,.tag_item--chip a,.zi-hero-tags span,.zi-bishun{
  background:rgba(253,250,242,.92)!important;border-color:var(--n7-hair)!important;
}
.zi-act:hover,.tag_item--chip a:hover{background:#FFFEF8!important;border-color:var(--n7-hair-gold)!important}

/* --------------------------------------------------------------------------
   0b. 玄墨令牌（theme-dark 覆盖，供存过"深色"偏好的访客）
   -------------------------------------------------------------------------- */
html.theme-dark{
  --n6-bg:#0B0A09;
  --n6-bg-2:#100E0C;
  --n6-card:#141210;
  --n6-card-hover:#1C1915;
  --n6-ink:#F2EDE0;
  --n6-ink-2:#C0B8A7;
  --n6-ink-3:#948B7A;
  --n6-line:rgba(242,237,224,.14);
  --n6-line-2:rgba(242,237,224,.07);
  --n6-line-3:rgba(242,237,224,.24);
  --n6-gold:#D2AC63;
  --n6-gold-l:#EBD39A;
  --n6-gold-s:rgba(210,172,99,.4);
  --n6-cinnabar:#A6492F;

  --paper:#0B0A09;--paper2:#100E0C;--paper3:#1C1915;
  --ink:#F2EDE0;--ink2:#C0B8A7;--ink3:#948B7A;
  --vermilion:#F2EDE0;--vermilion-d:#fff;
  --gold:#D2AC63;
  --line:rgba(242,237,224,.14);--line-soft:rgba(242,237,224,.07);
  --card-bg:#141210;
  --v5-ink:#F2EDE0;--v5-ink-2:#C0B8A7;--v5-ink-3:#948B7A;
  --v5-line:rgba(242,237,224,.14);--v5-line-2:rgba(242,237,224,.07);
  --v5-red:#F2EDE0;--v5-card:#141210;--v5-paper:#0B0A09;--v5-paper-2:#100E0C;

  --n7-card:#141210;
  --n7-card-h:#1C1915;
  --n7-hair:rgba(242,237,224,.14);
  --n7-hair-2:rgba(242,237,224,.075);
  --n7-hair-gold:rgba(210,172,99,.36);
}

/* --------------------------------------------------------------------------
   0c. 统一对齐基线（全站，与主题无关）
   --------------------------------------------------------------------------
   症状：顶栏 / 页头 / 页脚的内容在 x=112，而正文 .main 的内容在 x=80，
         整站正文比页头左移 32px，看起来"错位"。
   原因：.section / .topbar-inner / .hero-inner / .footer-inner 都带
         var(--n6-gutter) 内边距，唯独 .main 只给了 max-width 没给边距。
   处理：给 .main 补上与其他容器一致的左右 gutter（移动端自动跟随变量）。
   -------------------------------------------------------------------------- */
.main{
  padding-left:var(--n6-gutter);
  padding-right:var(--n6-gutter);
}
/* 同一把尺子：顶栏/页头/页脚的左右边距也跟 --n6-gutter 走。
   原来页头写死 32px、页脚 32px，而 --n6-gutter 在 1100/760 两档会降到
   24/18px，于是窄屏上正文与页头相差 8px、手机上相差 2px。 */
.topbar-inner,
.hero-inner,
.page-hero .hero-inner,
.footer-inner{
  padding-left:var(--n6-gutter);
  padding-right:var(--n6-gutter);
}

/* 首屏统计：v6 写了 margin:auto 让它居中，而首屏其他块（眉标/标题/
   副标/检索框/入口）全部左对齐，于是这一行单独飘在页面中间。
   统一回左基线。 */
.hero-stats{
  margin-left:0;
  margin-right:0;
}

/* 页头"竖向刻度"（25% 等分 4 条发丝线）在 1440 下正好有一条压在页面正中，
   看着像撕裂缝；页头已有金晕渐变与水印，这几条刻度只会增加噪声，去掉。 */
.hero-bg::before,
.page-hero .hero-inner::before{display:none}

/* --------------------------------------------------------------------------
   1. 展墙深一层：页面 #0B0A09，顶栏/首屏/页头/页脚 #070606
      （黑也讲层次，否则整页糊成一块）
   -------------------------------------------------------------------------- */
html.theme-dark .hero,
html.theme-dark .page-hero,
html.theme-dark .footer,
html.theme-dark .foot,
html.theme-dark .n6-mq{background:#070606}
html.theme-dark .topbar{background:rgba(7,6,5,.94)}
html.theme-dark .n6-mq::before{background:linear-gradient(90deg,#070606,transparent)}
html.theme-dark .n6-mq::after{background:linear-gradient(270deg,#070606,transparent)}

/* --------------------------------------------------------------------------
   2. 白底残留收编（旧 CSS 在黑底上露白的块，逐个压掉）
   -------------------------------------------------------------------------- */
html.theme-dark .main-left{
  background:transparent;box-shadow:none;border-radius:0;
}
html.theme-dark .ar_con{background:transparent;border-radius:0}
html.theme-dark .ar_box,
html.theme-dark .ar_pic,
html.theme-dark .ar_related{background:transparent;border-radius:0}
html.theme-dark .list_rows h4,
html.theme-dark .ar_box h4,
html.theme-dark .ar_related h4{
  background:transparent;border-radius:0;color:var(--n6-ink);
  border-bottom:1px solid var(--n7-hair);
}
/* 侧栏检索框（guoxue-new #fffdf6） */
html.theme-dark .in_search{background:var(--n6-card);border-color:var(--n6-line);border-radius:0}
html.theme-dark .in_search .search_text{background:transparent;color:var(--n6-ink)}
html.theme-dark .in_search button{background:var(--n6-ink);color:#0B0A09;border:0}
/* 字书页工具钮（v3 半透明白） */
html.theme-dark .zi-act{background:rgba(20,18,16,.72);border-color:var(--n6-line)}
html.theme-dark .zi-act:hover{background:var(--n7-card-h)}
/* 字书页组件家族（v3 一批半透明白底）：统一改为墨面浮起 */
html.theme-dark .tag_item--chip a,
html.theme-dark .zi-hero-tags span,
html.theme-dark .zi-bishun,
html.theme-dark .ar_intro{
  background:rgba(234,228,214,.045);
  border-color:var(--n6-line);
}
html.theme-dark .zi-writer-btn{
  background:var(--n6-card);color:var(--n6-gold-l);
  border-color:var(--n6-line);box-shadow:none;
}
html.theme-dark .pron-btn{
  background:var(--n6-card);color:var(--n6-gold-l);
  border-color:var(--n6-line);box-shadow:none;
}
html.theme-dark .pron-btn .pron-tag{border-right-color:var(--n6-line)}
html.theme-dark .pron-btn:hover,
html.theme-dark .pron-btn.is-playing{background:var(--n6-gold);border-color:var(--n6-gold);color:#0B0A09}
html.theme-dark .pron-btn:hover .pron-tag{border-right-color:rgba(11,10,9,.4)}
/* 田字格（v3 宣纸渐变 + 朱砂格线）：黑底上改暗宣纸 + 金格，保留"习字"意象 */
html.theme-dark .zi-tian{
  border-color:rgba(234,228,214,.18);
  background-image:
    repeating-linear-gradient(to right,rgba(201,164,94,.26) 0 7px,rgba(0,0,0,0) 7px 14px),
    repeating-linear-gradient(to bottom,rgba(201,164,94,.26) 0 7px,rgba(0,0,0,0) 7px 14px),
    linear-gradient(180deg,#1A1611,#100E0A);
  box-shadow:none;
}
html.theme-dark .zi-glyph{color:#E9E3D6;text-shadow:none}
html.theme-dark .zi-tian.is-writing .zi-writer-btn{
  background:var(--n6-gold);border-color:var(--n6-gold);color:#0B0A09;
}
/* 古籍竖排正文卡（v3 .chapter 米白渐变 + 朱线 + 投影）：黑底上改暗宣纸，
   否则整篇正文被米白蒙版冲淡（这是全黑化最隐蔽的一处） */
html.theme-dark .chapter{
  background:linear-gradient(180deg,rgba(26,22,17,.95),rgba(18,15,11,.9));
  border-color:rgba(242,237,224,.12);
  box-shadow:none;
}
html.theme-dark .chapter::before{
  background:linear-gradient(to right,rgba(166,73,47,.85),rgba(210,172,99,.5) 42%,rgba(210,172,99,0));
}
html.theme-dark .chapter .guoxue_combine span i{color:rgba(242,237,224,.42)}
html.theme-dark .reader-bar .rb-btn{
  background:rgba(242,237,224,.05);border-color:var(--n6-line);color:var(--n6-ink-2);
}
html.theme-dark .reader-bar .rb-btn.on{background:var(--n6-gold);border-color:var(--n6-gold);color:#0B0A09}
/* v5 白色 hover 兜底 */
html.theme-dark .rl-char:hover{background:var(--n7-card-h)}
html.theme-dark .GoTop button{background:var(--n6-card);color:var(--n6-ink-2)}

/* --------------------------------------------------------------------------
   3. 正文与控件：黑底上的可读性修正
   -------------------------------------------------------------------------- */
/* v7 把正文写死为 #221E1A，黑底下必须反转（黑金分层：正文象牙白） */
html.theme-dark body .con_article,
html.theme-dark body .con_article p,
html.theme-dark body .con_article li{color:#E7E1D3}
html.theme-dark body .con_article h2,
html.theme-dark body .con_article h3,
html.theme-dark body .con_article strong,
html.theme-dark body .con_article b{color:var(--n6-ink)}
html.theme-dark body .con_article blockquote{color:var(--n6-ink-2)}
html.theme-dark body .con_article th{background:#171411;color:var(--n6-ink)}
/* v7 一批「实底黑块白字」按钮在黑底上变实底金块，字色随令牌反转 */
html.theme-dark .c-button,
html.theme-dark .c-button-blue,
html.theme-dark .c-button-green,
html.theme-dark .btn{color:#0B0A09}
/* 选中态 / 表单 */
html.theme-dark ::selection{background:#E5DECD;color:#0B0A09}
html.theme-dark input,
html.theme-dark textarea,
html.theme-dark select{color:var(--n6-ink)}
html.theme-dark ::placeholder{color:var(--n6-ink-3);opacity:1}
html.theme-dark .topbar .top-search input{color:#F2EFE8}
/* 类目小方块 hover：与 v8 墨色一致 */
html.theme-dark .toc-item:hover .ti-ch{
  background:var(--n6-ink);border-color:var(--n6-ink);color:#0B0A09;
}

/* --------------------------------------------------------------------------
   4'. 旧 .list_wrap h4 标题：金色实心块（22×15）太抢，统一成与区块标题同款菱形
   -------------------------------------------------------------------------- */
.list_wrap h4{
  display:flex;align-items:center;gap:10px;
  height:auto;line-height:1.6;padding:0 0 12px;margin:0 0 16px;
  background:transparent!important;border-radius:0;
  font-size:16px;font-weight:600;letter-spacing:.2em;color:var(--n6-ink);
  border-bottom:1px solid var(--n7-hair);
}
.list_wrap h4::before{
  content:"";position:static;display:block;flex:none;
  width:5px!important;height:5px!important;
  background:var(--n6-gold);border-radius:0;
  transform:rotate(45deg);
}

/* --------------------------------------------------------------------------
   5. 玄墨细节 · 黑金字体分层
      正文象牙白（可读性优先），金只上标题字、字头大字、编号与点缀——
      金不铺正文，否则花。
   -------------------------------------------------------------------------- */
/* 展墙/页头大标题：象牙提亮 + 点缀字走金 */
html.theme-dark .hero h1,
html.theme-dark .page-hero h1{color:#F5F0E4}
html.theme-dark .hero h1 em{color:#EBD39A}
/* 阅读页大标题 */
html.theme-dark .ar_title h1,
html.theme-dark .reader-head h1{color:#F5F0E4}
/* 今日一字 / 类目大写编号：金字锚点 */
html.theme-dark .tc-char,
html.theme-dark .toc-num{color:#EBD39A}
/* 首屏副标与统计行：黑底上灰字最容易"消失"，各提一档 */
html.theme-dark .hero-sub{color:rgba(242,237,224,.62)}
html.theme-dark .hero-stats b{color:#F5F0E4}
html.theme-dark .hero-stats span{color:rgba(242,237,224,.52)}
html.theme-dark .quick a{color:rgba(242,237,224,.6)}
html.theme-dark .page-hero .hero-meta{color:rgba(242,237,224,.46)}
html.theme-dark .crumbs2{color:rgba(242,237,224,.5)}
html.theme-dark .crumbs2 a{color:rgba(242,237,224,.6)}
html.theme-dark .page-hero .lead p{color:rgba(242,237,224,.62)}
/* 卡片标题随令牌自动提亮（--n6-ink=#F2EDE0），无需再写 */


/* 顶栏印章：黑底上朱砂提一档 */
html.theme-dark .topbar .seal{background:#A6492F}
html.theme-dark .brand:hover .seal{background:#B55237}
/* 图片在黑底上略收一档亮度，避免白图刺眼 */
html.theme-dark img{filter:brightness(.96)}
/* 噪点比 v7 略提：纸感换成夜幕颗粒 */
html.theme-dark .n6-grain{opacity:.022}
/* 页脚品牌金线在深底上更清晰 */
html.theme-dark .footer::before{background:linear-gradient(90deg,transparent,rgba(201,164,94,.34),transparent)}
/* 旧站回顶钮 .GoTop（common.css 白底方块）与新回顶钮重叠 —— 有新钮时隐掉旧的；
   无 JS 时旧钮仍作兜底，但改成墨面圆钮，不再露白 */
body.has-n6top .GoTop{display:none!important}
html.theme-dark .GoTop button,
html.theme-dark .GoTop button.one:first-child{
  background:rgba(11,10,9,.92)!important;color:var(--n6-ink-2)!important;
  border:1px solid rgba(234,228,214,.2)!important;border-radius:50%!important;
  box-shadow:none!important;
}
html.theme-dark .GoTop button svg{fill:currentColor}

/* 回顶钮：透明底 + backdrop-filter 会在合成层上被渲染成白块（实测 Edge/Chromium），
   全黑站不需要玻璃层，改实心墨面 + 发丝边 */
html.theme-dark body .n6-top{
  background:rgba(11,10,9,.92)!important;
  border:1px solid rgba(234,228,214,.2)!important;
  border-radius:50%!important;
  color:rgba(234,228,214,.66)!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  box-shadow:none!important;
}
html.theme-dark body .n6-top:hover{
  background:rgba(28,25,21,.96)!important;
  border-color:var(--n6-gold)!important;color:var(--n6-gold)!important;
}

/* --------------------------------------------------------------------------
   0d. 字典落地页 · 汉字速查工具入口
      /zidian/ 是站内字典流量的总入口，插一条工具导流条：
      左田字格 + 中说明 + 右行动词；金只走左边一条 2px 竖线与田字格描边。
      工具页 /tool/hanzi/ 底部再链回字详情页，形成闭环。
   -------------------------------------------------------------------------- */
.zi-tool{
  display:flex;align-items:center;gap:15px;
  margin:20px 0 24px;padding:14px 17px;
  background:var(--n6-card);
  border:1px solid var(--n6-line);border-left:2px solid var(--n6-gold);
  border-radius:2px;text-decoration:none;color:inherit;
  transition:background .25s ease,border-color .25s ease;
}
.zi-tool:hover{background:var(--n6-card-hover);border-color:var(--n6-gold-s);border-left-color:var(--n6-gold)}
.zi-tool__grid{
  position:relative;flex-shrink:0;width:46px;height:46px;
  display:flex;align-items:center;justify-content:center;
  border:1px solid var(--n6-gold-s);background:var(--n6-bg);
}
.zi-tool__grid::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background-image:
    linear-gradient(90deg,transparent 49%,var(--n6-line) 49%,var(--n6-line) 51%,transparent 51%),
    linear-gradient(180deg,transparent 49%,var(--n6-line) 49%,var(--n6-line) 51%,transparent 51%);
  opacity:.9;
}
.zi-tool__grid b{
  position:relative;font-family:var(--n6-serif);font-size:26px;font-weight:500;
  line-height:1;color:var(--n6-ink);letter-spacing:0;
}
.zi-tool__txt{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
.zi-tool__txt b{
  font-family:var(--n6-serif);font-size:16px;font-weight:600;
  color:var(--n6-ink);letter-spacing:.04em;
}
.zi-tool__txt em{
  font-style:normal;font-size:13px;line-height:1.55;color:var(--n6-ink-2);
  letter-spacing:.02em;
}
.zi-tool__go{
  flex-shrink:0;font-family:var(--n6-sans);font-size:12px;font-weight:600;
  letter-spacing:.1em;color:var(--n6-gold);padding-left:4px;
}
.zi-tool__go::after{content:" →";letter-spacing:0}
.zi-tool:hover .zi-tool__go{color:var(--n6-ink)}

html.theme-dark .zi-tool{background:rgba(20,18,16,.9);border-color:rgba(234,228,214,.14);border-left-color:var(--n6-gold)}
html.theme-dark .zi-tool:hover{background:rgba(28,25,21,.96)}
html.theme-dark .zi-tool__grid{background:rgba(255,255,255,.04);border-color:rgba(216,181,101,.34)}
html.theme-dark .zi-tool__grid::before{
  background-image:
    linear-gradient(90deg,transparent 49%,rgba(234,228,214,.16) 49%,rgba(234,228,214,.16) 51%,transparent 51%),
    linear-gradient(180deg,transparent 49%,rgba(234,228,214,.16) 49%,rgba(234,228,214,.16) 51%,transparent 51%);
}
html.theme-dark .zi-tool__grid b,html.theme-dark .zi-tool__txt b{color:rgba(234,228,214,.92)}
html.theme-dark .zi-tool__txt em{color:rgba(234,228,214,.66)}

@media (max-width:760px){
  .zi-tool{gap:12px;padding:12px 13px;margin:16px 0 20px}
  .zi-tool__grid{width:42px;height:42px}
  .zi-tool__grid b{font-size:23px}
  .zi-tool__txt b{font-size:15px}
  .zi-tool__txt em{font-size:12px}
  .zi-tool__go{font-size:11px;letter-spacing:.06em}
}
