/* 用途：让全书检索、自查及长文弹窗延续日光刊物的排版。
   运行：在原页面样式之后加载；离线构建会将本文件内联。
   依赖：原页面类名与交互，保留已有深色模式。 */
:root{
  --bg:#faf8f3;--bg-alt:#f1f2e9;--bg-soft:#f3f1ea;--bg-mute:#e9ece2;--bg-elv:#fffdf8;
  --divider:#dcded3;--gutter:#dcded3;--t1:#293a31;--t2:#596357;--t3:#626c60;
  --brand-1:#42664e;--brand-2:#2c5039;--brand-3:#64846b;--brand-soft:#e8eee3;
  --green-1:#365b44;--green-soft:#e5eee3;--yellow-1:#835631;--yellow-soft:#f2e7d7;
  --gray-1:#596357;--gray-soft:#e9ece5;--shadow:0 8px 30px #293a3110;
  --font:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  --serif:"Songti SC","STSong","SimSun",serif;--nav-h:80px;--side-w:270px;
}
html.dark{
  --bg:#1e2821;--bg-alt:#182019;--bg-soft:#253027;--bg-mute:#303e32;--bg-elv:#253027;
  --divider:#435044;--t1:#f3f1e8;--t2:#c0c8b9;--t3:#abb7a5;
  --brand-1:#b6d1a9;--brand-2:#d8e8cf;--brand-3:#96b68a;--brand-soft:#30442e;
  --green-1:#b6d1a9;--green-soft:#30442e;--yellow-1:#efc99b;--yellow-soft:#483c2c;
  --gray-1:#c0c8b9;--gray-soft:#303e32;
}
body{font-size:16px;line-height:1.85}
.nav{background:var(--bg)}
.nav-in{gap:18px;padding:0 30px}
.title,.nav .title{font:600 19px/1.6 var(--serif);letter-spacing:.04em}
.logo{background:var(--brand-1);border-radius:50%}
.edition-nav{display:flex;align-items:center;gap:20px;font-size:13px;white-space:nowrap}
.edition-nav a,.edition-nav span{display:inline-flex;align-items:center;min-height:44px}
.edition-nav [aria-current]{color:var(--t1);border-bottom:1px solid var(--brand-1)}
.search{max-width:400px;min-width:100px}
.search input{height:44px;border:1px solid var(--divider);border-radius:3px}
.icon-btn{width:44px;height:44px}
.sidebar{padding:28px 24px 70px;border-right:1px solid var(--divider)}
.group{padding-bottom:24px;margin-bottom:24px}
.gt{font-weight:600}.gt small{font-size:11px}
.chip{min-height:36px;border-radius:3px;padding:5px 10px}
.sec-link{min-height:40px;font-size:13px}
.reset,.empty button{border-radius:3px;min-height:44px}
.content{padding-top:calc(var(--nav-h) + 48px)}
.doc{max-width:850px}.doc-head{margin-bottom:50px}
.edition-kicker{font-size:12px;color:var(--brand-1);letter-spacing:.12em;margin-bottom:16px}
.doc-head h1{font:500 46px/1.5 var(--serif);margin-bottom:16px;letter-spacing:0}
.doc-head p{font-size:16px;line-height:1.95;margin:10px 0}
.doc-head .edition-lead{font:500 22px/1.8 var(--serif);color:var(--t1)}
.reading-notes{margin-top:16px}.reading-notes summary{cursor:pointer;color:var(--t2);font-size:14px;min-height:44px;padding:10px 0}
.doc-head .stat{margin-top:24px;padding-top:20px;border-top:1px solid var(--divider)}
.sec-h{padding-top:30px;margin-bottom:20px}.sec-h h2{font:500 29px/1.6 var(--serif)}
.intro{font-size:15px;line-height:1.9}
.card{background:var(--bg-elv);border:1px solid var(--divider);border-radius:3px;padding:28px;margin-bottom:24px}
.card-h h3{font:600 23px/1.75 var(--serif)}
.card-h .idx{line-height:40px}.card-h .anchor{opacity:1;min-width:30px;min-height:44px;text-align:center}
.human{background:var(--brand-soft);border-radius:0;font-size:18px;line-height:1.95;padding:16px 20px}
.rows{font-size:16px;line-height:1.95;gap:12px 18px}
.badge{border-radius:2px;line-height:24px;font-weight:500}
.src summary,.gloss summary{min-height:44px}
.doc-links{line-height:2.1;margin-top:16px}.doc-links a{text-decoration:underline;text-underline-offset:4px}
.gloss{border-radius:3px;padding:0 18px}
.library-footer{border-top:1px solid var(--divider);margin-top:60px;padding-top:26px;font-size:14px;color:var(--t2)}
.library-footer a{display:inline-flex;align-items:center;min-height:44px;margin-right:20px}
.skip-content{position:fixed;top:8px;left:12px;transform:translateY(-160%);z-index:100;background:var(--bg-elv);padding:10px 16px}
.skip-content:focus{transform:none}
/* 长文保留现有目录和引用预览，让正文像展开的一页纸。 */
#doc-mask{background:#17261fd9;padding:24px}
#doc-modal{width:min(1120px,100%);height:calc(100dvh - 48px);max-height:100%;border-radius:3px;box-shadow:none}
.dm-h{padding:12px 24px;flex-wrap:wrap;gap:10px}
.dm-h b{font:500 21px/1.6 var(--serif);white-space:normal;flex-basis:45%}
.dm-h a,.dm-h button{min-height:44px;display:inline-flex;align-items:center;border-radius:3px}
.dm-toc{width:220px;padding:20px 14px 40px}
.dm-toc a{border-radius:0;padding:10px 8px;min-height:44px;line-height:1.7}
.dm-doc{padding:36px 44px 72px;font-size:18px;line-height:2;overflow-wrap:anywhere}
.dm-doc h2{font:500 28px/1.65 var(--serif);margin:40px 0 20px;padding-top:28px}
.dm-doc h3{font:600 22px/1.7 var(--serif);margin:30px 0 14px}
.dm-doc p,.dm-doc ul,.dm-doc ol{color:var(--t1);margin-bottom:22px}
.dm-doc a{text-decoration:underline;text-underline-offset:4px;word-break:normal;overflow-wrap:anywhere}
.dm-doc table{font-size:15px;line-height:1.85}.dm-doc th{white-space:normal}
.dm-doc .dm-tw{margin-bottom:24px}.dm-doc li{margin:8px 0}
.dm-load button{display:block;margin-top:16px;border:1px solid var(--divider);padding:8px 18px;min-height:44px}
/* 自查只改变表现，不改变问题、判定和本地保存方式。 */
.selfcheck-page .nav{height:auto;min-height:80px;flex-wrap:wrap;padding:14px max(24px,calc((100vw - 1140px)/2));gap:14px 24px}
.selfcheck-page .wrap{max-width:850px;padding:55px 28px 80px}
.selfcheck-page h1{font:500 44px/1.55 var(--serif);margin-bottom:20px}
.selfcheck-page .lead{font-size:17px;line-height:2;max-width:710px}
.selfcheck-page h2{font:500 26px/1.7 var(--serif);margin-top:42px}
.selfcheck-page h2 small{display:block;margin:6px 0 16px;font:13px/1.7 var(--font)}
.selfcheck-page .q{padding:20px 0;gap:20px}
.selfcheck-page .seg{border-radius:3px}.selfcheck-page .seg button{min-height:44px;padding:8px 14px}
.selfcheck-page .profile-age{border-radius:3px;min-height:44px}
.selfcheck-page .btn{border-radius:3px;min-height:44px;font-weight:500}
.selfcheck-page .bar{gap:12px;padding:16px 0}.selfcheck-page .prog{font-size:13px}
.selfcheck-page .tile{border-radius:0;padding:20px 16px}.selfcheck-page .tile b{font:500 32px/1.5 var(--serif)}
.selfcheck-page .note,.selfcheck-page .caution{border-radius:3px}
.selfcheck-page .card .h{align-items:flex-start;flex-wrap:wrap}.selfcheck-page .card .h b{flex-basis:100%;font:600 23px/1.7 var(--serif)}
.selfcheck-page .card .h a{min-height:44px;display:inline-flex;align-items:center;text-decoration:underline}
.selfcheck-page .card .human{font-size:17px;background:none;padding:0;border:0}
.selfcheck-page .card .caution summary{min-height:44px;display:flex;align-items:center}
.selfcheck-page .mods button{border-radius:3px;min-height:44px}
@media(max-width:1200px){.nav-in{gap:12px;padding:0 20px}.edition-nav{gap:12px}.library-page .nav-r>a{display:none}.title,.nav .title{font-size:17px}}
@media(max-width:960px){
  :root{--nav-h:116px}
  .library-page .nav-in{flex-wrap:wrap;align-content:center;gap:8px 12px;padding:10px 18px}
  .library-page .title span{display:inline}.library-page .title .logo{display:none}
  .library-page .title{order:0;margin-right:auto}.library-page .edition-nav{order:1;font-size:12px}
  .library-page .menu-btn{order:2}.library-page .search{order:3;max-width:none;margin:0}
  .library-page .nav-r{order:4}.library-page .switch{margin-left:0}
  .content{padding:calc(var(--nav-h) + 30px) 24px 72px}
  .sidebar{padding:24px 24px 70px}.doc-head h1{font-size:36px}
}
@media(max-width:820px){
  #doc-mask{padding:0}#doc-modal{height:100dvh;border-radius:0}
  .dm-h{padding:10px 18px}.dm-h b{flex-basis:100%;font-size:20px}
  .dm-b{flex-direction:column}
  .dm-toc{display:flex;width:100%;max-height:105px;flex:none;gap:8px;overflow:auto;border:0;border-bottom:1px solid var(--divider);padding:8px 18px}
  .dm-toc a,.dm-toc a.lv3{flex:none;max-width:220px;padding:8px 10px;font-size:12px}
  .dm-doc{padding:26px 22px 60px;font-size:17px}.dm-doc h2{font-size:25px}.dm-doc h3{font-size:21px}
}
@media(max-width:520px){
  .library-page .title{font-size:16px;letter-spacing:0}.edition-nav{gap:10px}
  .library-page .edition-nav .nav-selfcheck{display:none}
  .content{padding-right:18px;padding-left:18px}.doc-head h1{font-size:32px}
  .doc-head .edition-lead{font-size:20px}.doc-head p{font-size:15px}
  .card{padding:20px 17px}.card-h h3{font-size:21px}.human{font-size:17px;padding:14px}
  .rows{font-size:16px}.sec-h h2{font-size:25px}.intro{font-size:14px}
  .selfcheck-page .nav{padding:12px 18px;gap:5px 15px;position:relative}
  .selfcheck-page .nav .title{flex-basis:100%;font-size:18px}.selfcheck-page .nav .sp{display:none}
  .selfcheck-page .wrap{padding:30px 18px 60px}.selfcheck-page h1{font-size:34px}
  .selfcheck-page .q{gap:12px}.selfcheck-page h2{font-size:24px}
  .selfcheck-page .bar{flex-wrap:wrap}.selfcheck-page .bar .prog{flex-basis:100%}
  .selfcheck-page .card .h b{font-size:21px}.selfcheck-page .tile span{font-size:12px}
  .selfcheck-page .hbar{grid-template-columns:7em 1fr 3.5em;font-size:13px;gap:8px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
