/* A compact Chinese document library: paper, red headings, blue text links. */
:root { --color-bg:#fff; --color-accent:#233977; --color-text:#282828; --color-muted:#737373; --color-highlight:#a52121; --color-border:#d8d2cb; --border:1px solid var(--color-border); --font-family:"Songti SC","SimSun","Noto Serif CJK SC",serif; --font-size-small:14px; --search-bar-height:38px; --status-bar-height:0px; --reader-size:18px; }
* { box-sizing:border-box; }
html { scroll-padding-top:24px; }
body { margin:0; background:#fff; color:var(--color-text); font:16px/1.8 var(--font-family); }
a { color:var(--color-accent); text-decoration:none; }
a:hover { color:#aa1919; text-decoration:underline; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible { outline:2px solid #a52121; outline-offset:3px; }
h1,h2,h3,p { margin:0; }
button,input,textarea { font:inherit; }
button,.content-btn { cursor:pointer; border:1px solid #c6c6c6; border-radius:0; background:#f4f3f0; color:#233977; padding:6px 18px; }
button:hover,.content-btn:hover { background:#ece8e2; }
button { line-height:1.5; }
input,textarea { border-radius:0; }
.library-shell { width:calc(100% - 56px); max-width:1000px; margin:0 auto; }
.library-topline { display:flex; justify-content:space-between; gap:24px; padding:10px 0 7px; border-bottom:1px solid #dedbd7; color:#787878; font:12px/1.6 Arial,"Microsoft YaHei",sans-serif; letter-spacing:1px; }
.library-masthead { padding:36px 0 28px; text-align:center; }
.library-title { display:inline-block; color:#b11f24; font-size:42px; font-weight:700; line-height:1.3; letter-spacing:3px; }
.library-title:hover { color:#a0181d; text-decoration:none; }
.library-masthead p { color:#666; margin-top:12px; font-size:15px; letter-spacing:2px; }
.library-nav { display:flex; flex-wrap:wrap; justify-content:center; gap:0; border-top:2px solid #9e272b; border-bottom:1px solid #d6d0ca; padding:12px 0; }
.library-nav a { padding:0 28px; line-height:1.2; font-size:16px; }
.library-nav a+a { border-left:1px solid #d6d0ca; }
.library-nav [aria-current=page] { color:#9e272b; font-weight:bold; }
.library-intro { padding:26px 0 30px; text-align:center; }
.library-intro>p:first-child { color:#494949; }
.library-stats { font-size:13px; color:#777; margin-top:7px; }
.library-stats strong { font-weight:normal; color:#a52121; }
.library-search { display:flex; justify-content:center; margin:20px auto 0; max-width:520px; }
.library-search input { min-width:0; flex:1; padding:8px 12px; border:1px solid #aaa; font-size:15px; background:#fff; color:#222; }
.library-search button { border:1px solid #aaa; border-left:0; font-size:14px; white-space:nowrap; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid #bfb9b2; padding:0 0 9px; }
.section-heading h1,.section-heading h2 { color:#a52121; font-size:22px; font-weight:700; letter-spacing:2px; }
.section-heading>a,.section-heading>span { font-size:13px; }
.section-heading>span { color:#777; }
.recent-section { margin:0 0 32px; }
.recent-list { list-style:none; margin:12px 0 0; padding:0; display:grid; grid-template-columns:1fr 1fr; column-gap:36px; }
.recent-list li { display:flex; gap:14px; align-items:baseline; padding:6px 0; min-width:0; font-size:15px; }
.recent-list time { flex-shrink:0; font:12px/1.8 Arial,sans-serif; color:#888; }
.recent-list a { overflow-wrap:anywhere; }
.year-group { margin-top:18px; }
.year-group h3 { font-size:18px; font-weight:normal; color:#a52121; padding:0 0 10px; }
.year-group h3 span { color:#999; font-size:12px; margin-left:8px; }
.catalogue-list { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:1fr 1fr; column-gap:36px; }
.catalogue-list li { display:flex; justify-content:space-between; gap:14px; align-items:baseline; border-bottom:1px dotted #ddd; padding:10px 0; min-width:0; }
.catalogue-list a { overflow-wrap:anywhere; }
.catalogue-list time { font:11px/1.8 Arial,sans-serif; color:#888; white-space:nowrap; }
.year-nav { display:flex; flex-wrap:wrap; gap:20px; margin:14px 0; }
.about-library { border-top:1px solid #aaa; margin-top:34px; padding:22px 0; font-size:14px; }
.about-library h2 { color:#a52121; font-size:18px; margin-bottom:8px; }
.about-library p+p { margin-top:6px; }
.library-footer { border-top:3px double #c6bfba; padding:22px 0 30px; text-align:center; font-size:13px; color:#777; }
.library-footer p+p { font-size:12px; margin-top:3px; }
.empty-message { text-align:center; padding:32px 0; color:#777; }
.search-summary { padding:18px 0 5px; }
.reader-main { max-width:800px; margin:auto; }
.reader-breadcrumb { font-size:13px; color:#888; padding:22px 0; }
.reader-header { text-align:center; margin:16px 0 25px; }
.reader-header h1 { font-size:30px; color:#a52121; line-height:1.6; font-weight:bold; }
.reader-header p { font-size:13px; color:#777; margin-top:10px; }
.reader-description { font-size:15px; color:#666; border-left:2px solid #c3b2a3; padding:6px 16px; margin:20px 0; }
.reader-tools { display:flex; align-items:center; justify-content:flex-end; gap:8px; font-size:13px; margin:20px 0 12px; color:#777; }
.reader-tools button { padding:2px 10px; }
.reader-toc { border-top:1px solid #ccc; border-bottom:1px solid #ccc; padding:12px 0; margin-bottom:30px; }
.reader-toc summary { color:#233977; cursor:pointer; }
.reader-toc ol { margin:10px 0 2px; padding-left:28px; font-size:15px; }
.reader-content { line-height:2; overflow-wrap:anywhere; }
.reader-content section { margin-bottom:35px; }
.reader-content h2 { font-size:1.25em; color:#a52121; margin:30px 0 16px; }
.reader-content h3 { font-size:1.08em; margin:22px 0 12px; }
.reader-content p { margin:0 0 1em; }
.reader-content a { text-decoration:underline; }
.reader-content img { max-width:100%; height:auto; }
.reader-content pre { max-width:100%; overflow:auto; padding:15px; background:#f7f6f3; font-size:.85em; }
.reader-content blockquote { margin:20px 0; border-left:3px solid #ccc; padding:0 20px; color:#666; }
.reader-content table { display:block; max-width:100%; overflow-x:auto; border-collapse:collapse; }
.reader-content td,.reader-content th { border:1px solid #ccc; padding:8px; }
.reader-bottom { border-top:1px solid #ccc; display:flex; justify-content:space-between; padding:20px 0 35px; font-size:14px; }
.library-not-found { text-align:center; padding:65px 0 85px; }
.library-not-found .error-number { color:#a52121; font-size:64px; line-height:1.2; }
.library-not-found h1 { font-size:24px; margin:18px 0; }
.library-not-found p+p { margin-top:20px; }
/* Existing admin form actions and storage remain unchanged. */
.library-admin .admin-actions { display:flex; justify-content:space-between; gap:16px; padding:18px 0; font-size:14px; border-bottom:1px solid #e0ddd8; }
.library-admin #ui_inter main { max-width:780px; margin:26px auto 36px; }
.library-admin #introduction>div>header { display:flex; border-bottom:1px solid #c6bfba; padding-bottom:12px; margin-bottom:24px; }
.library-admin #introduction>div>header>a { width:100%; display:flex; justify-content:space-between; align-items:center; }
.library-admin #introduction>div>header h2 { font-size:24px; color:#a52121; }
.library-admin #introduction>div>header time { color:#888; font-size:12px; }
.library-admin .content h3 { font-size:19px; color:#a52121; margin:20px 0 12px; }
.library-admin .content p { margin:0 0 16px; }
.library-admin .content input,.library-admin .content textarea { border-color:#bbb!important; background:#fff!important; color:#222!important; line-height:1.6; }
.library-admin .content input { padding:9px 11px!important; }
.library-admin .content textarea { resize:vertical; }
.library-admin .content label { color:#4a4a4a!important; font-size:15px; }
.library-admin .content small { font-size:12px; line-height:1.7; display:block; margin-top:6px; }
.library-admin .content form { max-width:100%; }
.library-admin .content form[action] { margin:0; }
.library-admin .content-btn { display:inline-block; font-size:14px; padding:7px 18px; line-height:1.6; }
.library-admin .blockquote { margin-bottom:22px; color:#777; font-size:14px; }
.library-admin blockquote { margin:0; }
.library-admin mark { background:#fff4d9; color:#6d4514; padding:4px 9px; }
.library-admin .admin-article-list { border:1px solid #d4d0ca; padding:12px 18px; margin:20px 0; }
.library-admin .admin-article-list summary { cursor:pointer; color:#233977; }
.library-admin .admin-article-list ol { font-size:14px; padding-left:24px; }
.library-admin .admin-article-list li { padding:6px 0; border-bottom:1px dotted #ddd; overflow-wrap:anywhere; }
.library-admin .admin-article-list li span { color:#999; font-size:11px; }
.library-admin #ui_status_bar { display:flex; justify-content:space-between; gap:16px; border-top:1px solid #ddd; padding:12px 0; font-size:12px; color:#888; }
.library-admin #ui_status_bar .version { margin-right:12px; }
@media(max-width:1279px) { .library-topline { padding-right:88px; } }
@media(max-width:700px) {
  .library-shell { width:calc(100% - 32px); }
  .library-masthead { padding:28px 0 22px; }
  .library-title { font-size:32px; letter-spacing:1px; }
  .library-masthead p { font-size:13px; letter-spacing:0; }
  .library-nav { gap:12px 0; padding:12px 0; }
  .library-nav a { padding:0 14px; font-size:14px; }
  .library-intro { padding:23px 0; font-size:14px; }
  .library-stats { font-size:12px; }
  .recent-list,.catalogue-list { grid-template-columns:1fr; }
  .recent-list li { gap:12px; }
  .catalogue-list li { padding:10px 0; }
  .catalogue-list time { font-size:10px; }
  .section-heading h1,.section-heading h2 { font-size:20px; }
  .reader-header h1 { font-size:25px; }
  .reader-content { line-height:1.95; }
  .library-admin .admin-actions { flex-wrap:wrap; }
  .library-admin #ui_status_bar { flex-wrap:wrap; }
  .library-topline { font-size:11px; letter-spacing:0; gap:8px; }
}
@media print {
  .library-topline,.library-nav,.reader-tools,.reader-toc,.reader-bottom,.library-footer,.reader-breadcrumb { display:none; }
  .library-shell { width:100%; max-width:none; }
  .library-masthead { padding:0 0 12px; }
  .library-title { font-size:22px; color:#000; }
  .reader-content,.reader-header h1 { color:#000; }
  a { color:#000; }
}
