/* 默认主题基础样式（精简版，证明结构可用，后续可扩展） */
:root{--w:var(--maxw,1200px)}
*{box-sizing:border-box}
body{margin:0;font-family:var(--font-body,"Microsoft YaHei","PingFang SC",sans-serif);font-size:var(--font-size-base,16px);color:var(--c-text);background:var(--c-bg);line-height:var(--line-height,1.6)}
h1,h2,h3,h4,h5,h6{font-family:var(--font-heading,inherit)}
.container{max-width:var(--w);margin:0 auto;padding:0 16px}

/* 容器跟随 data-width 宽度设置（.container / .page-head .wrap / .filter-topbar 共享 --w） */
body[data-width="narrow"] .container,
body[data-width="narrow"] .page-head .wrap,
body[data-width="narrow"] .filter-topbar{--w:760px}
body[data-width="standard"] .container,
body[data-width="standard"] .page-head .wrap,
body[data-width="standard"] .filter-topbar{--w:1100px}
body[data-width="wide"] .container,
body[data-width="wide"] .page-head .wrap,
body[data-width="wide"] .filter-topbar{--w:1440px}
body[data-width="full"] .container,
body[data-width="full"] .page-head .wrap,
body[data-width="full"] .filter-topbar{--w:100%; max-width:100%}

/* 统一图标（第十章 10.2：尺寸 em 化随字号，color 随父级 token，禁写死像素/色值） */
.ic{width:1em;height:1em;flex-shrink:0;vertical-align:-.15em;color:inherit;}
a{color:inherit;text-decoration:none}
.site-header .container{display:flex;align-items:center;gap:24px;height:60px}
.brand{display:flex;align-items:center;gap:8px;font-size:18px;font-weight:700}
.empty{text-align:center;color:var(--muted);padding:60px 0}
.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
.card{background:var(--c-bg);border-radius:var(--radius);overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,.06);transition:.2s}
.card:hover{box-shadow:0 4px 16px rgba(0,0,0,.12);transform:translateY(-2px)}
.card-cover img{width:100%;height:150px;object-fit:cover;display:block}
.card-body{padding:12px}
.card-title{font-size:15px;margin:0 0 6px}
.card-cat{font-size:12px;color:var(--c-primary);background:var(--gold-soft);padding:1px 8px;border-radius:4px}
.pagination{display:flex;gap:6px;justify-content:center;margin-top:24px}
.pagination a{padding:6px 12px;border:1px solid var(--c-border);border-radius:4px;background:var(--c-bg)}
.pagination a.active{background:var(--c-primary);color:var(--hx-fff);border-color:var(--c-primary)}
.social-btn{cursor:pointer;border:1px solid var(--c-border);background:var(--c-bg);border-radius:999px;padding:8px 20px;font-size:14px;transition:.2s}
.social-btn:hover{border-color:var(--c-primary);color:var(--c-primary)}
.social-btn.active{background:var(--c-primary);color:var(--hx-fff);border-color:var(--c-primary)}

/* 评论 */
.comments{margin-top:32px}
.comments h3{font-size:18px}
.breadcrumb{font-size:13px;color:var(--muted);margin-bottom:16px}
.breadcrumb a{color:var(--muted)}.breadcrumb a:hover{color:var(--c-primary)}
.breadcrumb .sep{margin:0 6px;color:var(--faint)}
.breadcrumb .active{color:var(--muted)}
.article-detail{background:var(--c-bg);border-radius:var(--radius);padding:28px}
.article-title{font-size:26px;margin:0 0 16px;line-height:1.4}
.author-avatar{width:32px;height:32px;border-radius:50%;object-fit:cover;border:2px solid var(--line-strong)}
.author-avatar.sm{width:26px;height:26px}
.author-name{font-weight:600}
.article-content{font-size:16px;line-height:1.9;margin:20px 0}
.article-content img{max-width:100%;border-radius:6px}
.annotated-image-figure{position:relative;margin:16px 0}
.article-gallery-grid{display:grid;gap:8px;margin:20px 0}
.article-gallery-grid img{width:100%;border-radius:6px}
.article-gallery-grid.cols-1{grid-template-columns:repeat(1,1fr)}
.article-gallery-grid.cols-2{grid-template-columns:repeat(2,1fr)}
.article-gallery-grid.cols-3{grid-template-columns:repeat(3,1fr)}
.article-gallery-grid.cols-4{grid-template-columns:repeat(4,1fr)}
.article-gallery-grid.cols-5{grid-template-columns:repeat(5,1fr)}
.article-gallery-grid.cols-6{grid-template-columns:repeat(6,1fr)}
.tag-pill{font-size:13px;color:var(--muted);background:var(--bg-soft);padding:3px 12px;border-radius:14px}
.tag-pill:hover{background:var(--c-primary);color:var(--hx-fff)}
.related-section{margin-top:28px}
.related-section h3{font-size:16px;margin-bottom:12px}
.related-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}
.related-card{background:var(--c-bg);border:1px solid var(--c-border);border-radius:8px;overflow:hidden;font-size:13px}
.related-card img{width:100%;height:90px;object-fit:cover;display:block}
.related-card span{display:block;padding:8px}

/* 评论盖楼 */
.cmt-act{background:none;border:none;cursor:pointer;color:var(--muted);font-size:13px;padding:0}
.cmt-act:hover{color:var(--c-primary)}
.cmt-del:hover{color:var(--hx-e74c3c)}
.reply-box{margin-top:8px}
.reply-box textarea{width:100%;min-height:50px;padding:8px;border:1px solid var(--c-border);border-radius:6px}
.reply-send,.reply-cancel{margin-top:6px;padding:5px 16px;border-radius:999px;border:none;cursor:pointer;font-size:13px}
.reply-send{background:var(--c-primary);color:var(--hx-fff)}
.reply-cancel{background:var(--bg-soft);color:var(--muted)}
.album-desc{margin-top:12px;color:var(--muted);line-height:1.7}
.album-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px}
.lightbox{position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.92);display:flex;align-items:center;justify-content:center}
.lb-img{max-width:88vw;max-height:84vh;object-fit:contain;border-radius:4px}
.lb-close,.lb-prev,.lb-next{position:absolute;background:rgba(255,255,255,.12);color:var(--hx-fff);border:none;cursor:pointer;font-size:28px;width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center}
.lb-close{top:20px;right:20px;font-size:22px}
.lb-prev{left:24px;top:50%;transform:translateY(-50%)}
.lb-next{right:24px;top:50%;transform:translateY(-50%)}
.lb-close:hover,.lb-prev:hover,.lb-next:hover{background:rgba(255,255,255,.28)}
.book-cover img{width:100%;border-radius:6px;margin-bottom:12px}
.book-title{font-size:18px;margin:0 0 6px}
.book-author{color:var(--muted);font-size:14px;margin:0 0 10px}
.library-reader{background:var(--c-bg);border-radius:var(--radius);padding:28px;min-height:50vh}
.chapter-title{font-size:20px;margin:0 0 18px}
.citations{margin-top:28px;padding-top:18px;border-top:1px solid var(--c-border)}
.citations h3{font-size:15px;margin:0 0 12px}
@media(max-width:768px){.library-layout{grid-template-columns:1fr}.library-side{position:static}}
