:root {
 --paper:#f7f2e8; --white:#fffdf9; --beige:#f1e7d2; --ink:#2b2623; --text:#4b4038;
 --muted:#675c52; --red:#a33b28; --gold:#d4b06a; --line:#dfd4c3;
 font: 16px/1.7 system-ui,"Noto Sans CJK SC","Microsoft YaHei",sans-serif;
 color:var(--ink); background:var(--paper);
}
*, *::before, *::after { box-sizing:border-box; }
body { margin:0; }
body:has(dialog[open]) { overflow:hidden; }
h1,h2,h3,p { margin:0 0 .65em; }
h1,h2 { font-family:"Noto Serif CJK SC","Songti SC",SimSun,serif; line-height:1.26; }
h1 { font-size:clamp(2rem, 4.7vw, 3.65rem); }
h2 { font-size:clamp(1.3rem, 2.4vw, 1.85rem); }
h3 { font-size:1.08rem; line-height:1.5; }
p { color:var(--text); }
a { color:var(--red); text-underline-offset:.25em; }
a:hover { text-decoration-thickness:2px; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,textarea:focus-visible { outline:3px solid #7e4b20; outline-offset:3px; }
button,input,textarea,select { font:inherit; color:inherit; }
button,input,select { min-height:44px; }
button,input,textarea,select { border:1px solid var(--line); border-radius:5px; background:#fff; padding:.42rem .72rem; }
button { cursor:pointer; }
button:hover { border-color:var(--red); }
button[aria-pressed=true] { background:var(--beige); color:var(--red); }
.primary { color:#fff; background:var(--red); border-color:var(--red); }
.wrap { width:min(1220px, calc(100% - 40px)); margin-inline:auto; }
.site-header { position:relative; z-index:2; background:var(--white); border-bottom:1px solid var(--line); }
.header-row,.tools,.header-row nav { display:flex; align-items:center; gap:.55rem; }
.header-row { min-height:76px; justify-content:space-between; }
.brand,.header-row nav a,.tools a,.bottom a,.bottom button,.menu-grid nav a { display:inline-flex; align-items:center; gap:.28rem; min-height:44px; text-decoration:none; color:var(--ink); }
.brand { font-weight:800; white-space:nowrap; }
.seal { background:var(--red); color:white; padding:.12em .2em; border-radius:3px; font-family:serif; }
.header-row nav a { padding:.3em .42em; font-size:.91rem; white-space:nowrap; }
.header-row nav a:hover,.tools a:hover,.bottom a:hover { color:var(--red); }
[aria-current=page] { color:var(--red)!important; font-weight:800; box-shadow:inset 0 -2px var(--red); }
.emoji { font:inherit; font-size:.85em; }
.subnav { background:var(--paper); }
.subnav .wrap { display:flex; flex-wrap:wrap; gap:.2rem 1.25rem; }
.subnav a,.footer-grid a { display:inline-flex; align-items:center; min-height:44px; }
.mobile { display:none!important; }
main { min-height:55vh; padding-block:28px 50px; }
.masthead { border:1px solid var(--line); border-top:4px solid var(--red); background:var(--white); padding:clamp(19px,4vw,55px); margin-bottom:22px; }
.hero { background:linear-gradient(130deg,#fffaf0 35%,#eee0c1); }
.hero p { font-size:1.12rem; }
.eyebrow { color:var(--red); font-weight:700; margin-bottom:1rem; }
.panel { background:var(--white); border:1px solid var(--line); padding:clamp(15px,2.7vw,32px); margin-bottom:18px; border-radius:6px; }
.panel p:last-child { margin-bottom:0; }
.feature.with-art { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,38%); align-items:center; gap:24px; }
.feature-index.with-art { grid-template-columns:minmax(0,56fr) minmax(0,44fr); }
.feature.with-art.art-left { grid-template-columns:minmax(0,min(340px,40%)) minmax(0,1fr); }
.feature.art-left .art { grid-row:1; grid-column:1; }
.feature.art-left > div { grid-column:2; }
.feature:not(.with-art) > div { grid-column:auto; }
.art { width:100%; display:block; height:auto; object-fit:cover; border-radius:5px; }
.art-index,.art-topics,.art-guide { aspect-ratio:16/9; }
.art-category,.art-authors { aspect-ratio:4/3; }
.art-logo { max-width:160px; height:46px; object-fit:contain; }
.chips,.directory,.rail,.actions,.filter-actions { display:flex; align-items:center; gap:.45rem .7rem; flex-wrap:wrap; }
.chips a,.pill,.directory a,.rail a { display:inline-flex; align-items:center; min-height:44px; text-decoration:none; padding:.32em .75em; border:1px solid var(--line); border-radius:5px; }
.chips a:hover,.directory a:hover,.rail a:hover { border-color:currentColor; }
.directory a { flex:1 1 145px; justify-content:center; background:var(--beige); }
.rail a { flex:1 1 150px; border-block-end:3px solid var(--gold); }
.search-form { display:flex; gap:8px; margin:1rem 0; max-width:660px; }
.search-form input { min-width:0; flex:1; }
.sr,.skip:not(:focus) { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.skip:focus { position:fixed; top:0; left:0; z-index:10; padding:12px; background:#fff; }
.lead-grid,.split-text { display:grid; gap:18px; grid-template-columns:1fr 1fr; }
.lead-grid { grid-template-columns:2fr 1fr; }
.lead-grid article,.split-text article { border-top:2px solid var(--gold); padding-top:14px; }
.lead-grid aside { background:var(--beige); padding:14px; }
.card-grid,.matrix { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr)); gap:12px; }
.card-grid article,.matrix div { border:1px solid var(--line); border-radius:5px; padding:13px; min-width:0; }
.matrix dt { font-weight:750; }
.matrix dd { margin:0; }
.matrix small,.works small { display:block; color:var(--muted); }
.dark { background:#332b25; color:#fff8e9; }
.dark a,.dark p { color:#f4deac; }
.dark .chips a,.dark .card-grid article { border-color:#88735c; }
.timeline { border-left:3px solid var(--gold); padding-left:2rem; }
.timeline li { padding:.28em 0; }
.facts { display:grid; grid-template-columns:max-content auto; gap:.6em 1em; }
.facts dt { font-weight:bold; }
.facts dd { margin:0; }
.reading-links,.results { padding-left:1.3em; }
.reading-links li,.results li { margin-bottom:.4em; }
.reading-links small,.shelf-row small { color:var(--muted); margin-left:.4rem; }
.reading-layout { display:grid; grid-template-columns:minmax(175px, 26%) minmax(0,1fr); gap:20px; align-items:start; }
.reading-layout aside { background:var(--beige); padding:18px; border-radius:5px; }
.reading-layout aside ol { padding-left:1.5em; }
.prose section { max-width:48rem; margin-bottom:2rem; }
.filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(160px,100%),1fr)); align-items:end; gap:12px; }
.filters label,.correction label { display:grid; gap:.3rem; }
select { width:100%; }
.works { width:100%; border-collapse:collapse; table-layout:fixed; overflow-wrap:anywhere; }
.works th,.works td { padding:9px 10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.works th:first-child { width:49%; }
.works th:nth-child(2) { width:20%; }
.works p { font-size:.94rem; margin:.28em 0 0; }
.notice { border-left:3px solid var(--gold); padding:.6rem 1rem; }
details { border-bottom:1px solid var(--line); margin-bottom:.35em; }
summary { cursor:pointer; padding:.6rem 0; min-height:44px; font-weight:650; }
.site-footer { border-top:1px solid var(--line); background:var(--beige); padding:26px 0; }
.footer-grid { display:grid; grid-template-columns:1fr 1fr 1fr 1.3fr; gap:18px; }
.footer-grid h2 { font:700 1.05rem/1.4 system-ui,sans-serif; }
.footer-grid a { display:flex; }
dialog { width:min(690px, calc(100% - 24px)); max-height:min(86dvh,760px); border:1px solid var(--line); border-radius:8px; background:var(--white); color:var(--ink); padding:18px; overflow:auto; overscroll-behavior:contain; }
dialog::backdrop { background:rgba(27,22,18,.59); }
.drawer { height:100dvh; max-height:100dvh; margin:0 0 0 auto; width:min(515px,100%); border-radius:0; }
.dialog-head { display:flex; gap:10px; justify-content:space-between; align-items:center; border-bottom:1px solid var(--line); margin-bottom:.75rem; padding-bottom:.4rem; }
.dialog-head h2 { margin:0; }
.menu-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.menu-grid > div { padding:7px; border:1px solid var(--line); min-width:0; }
.menu-grid a { display:flex; min-height:44px; align-items:center; overflow-wrap:anywhere; }
.menu-grid details { padding-left:.5em; }
.shelf-row { padding:.7rem 0; border-bottom:1px solid var(--line); }
.shelf-row label { display:block; }
.shelf-row textarea,.correction textarea,.correction input { width:100%; }
.correction { display:grid; gap:.7rem; max-width:46rem; }
[hidden] { display:none!important; }
@media(max-width:1050px){
 .header-row .desktop,.subnav.desktop { display:none!important; }
 .header-row .mobile { display:inline-flex!important; align-items:center; gap:.4rem; }
 .bottom.mobile { display:grid!important; grid-template-columns:repeat(5,1fr); position:fixed; inset:auto 0 0; z-index:3; background:var(--white); border-top:1px solid var(--line); padding:3px 2px env(safe-area-inset-bottom); }
 .bottom a,.bottom button { flex-direction:column; justify-content:center; gap:0; min-width:0; border:0; font-size:.83rem; }
 body { padding-bottom:calc(58px + env(safe-area-inset-bottom)); }
}
@media(max-width:680px){
 .wrap { width:calc(100% - 24px); }
 .header-row { min-height:61px; gap:4px; }
 .brand { font-size:.91rem; }
 .art-logo { width:128px; height:36px; }
 .tools { gap:.3rem; }
 .tools a,.tools button { font-size:.86rem; }
 main { padding-top:14px; }
 .feature.with-art,.feature.with-art.art-left,.lead-grid,.split-text,.reading-layout { grid-template-columns:minmax(0,1fr); gap:14px; }
 .feature.art-left .art,.feature.art-left > div { grid-column:auto; grid-row:auto; }
 .footer-grid { grid-template-columns:1fr 1fr; }
 .works th,.works td { padding:7px 4px; font-size:.87rem; }
}
@media(prefers-reduced-motion:reduce){ *,*::before,*::after { scroll-behavior:auto!important; animation-duration:0s!important; transition-duration:0s!important; } }
