:root { --bg: #f6f7f9; --card: #ffffff; --line: #e8eaee; --text: #23262b; --muted: #8a919c; --brand: #2f6fed; --brand-soft: #eef3fe; --radius: 10px }
* { box-sizing: border-box; margin: 0; padding: 0 }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; background: var(--bg); color: var(--text); line-height: 1.75; font-size: 15px }
a { color: inherit; text-decoration: none }
a:hover { color: var(--brand) }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px }
.muted { color: var(--muted); font-size: 13px }
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10 }
.header-inner { display: flex; align-items: center; gap: 24px; height: 56px }
.logo { font-size: 18px; font-weight: 700; color: var(--brand) }
.nav { display: flex; gap: 4px; overflow-x: auto }
.nav a { padding: 6px 12px; border-radius: 8px; color: var(--muted); white-space: nowrap }
.nav a:hover, .nav a.on { background: var(--brand-soft); color: var(--brand) }
.main { padding: 20px 0 40px }
.page-head { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 16px }
.page-head h1 { font-size: 20px }
.page-head .sub { color: var(--muted); font-size: 12px; letter-spacing: 1px; text-transform: uppercase }
.post-list { display: flex; flex-direction: column; gap: 12px }
.post-card { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px }
.thumb-wrap { position: relative; flex: 0 0 200px }
.thumb { display: flex; width: 200px; height: 125px; border-radius: 8px; background-size: cover; background-position: center; align-items: center; justify-content: center; font-size: 34px; font-weight: 700; color: #fff }
.thumb-ph { background: linear-gradient(135deg, #2f6fed, #7a5af5) }
.thumb-cat { position: absolute; left: 8px; top: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; line-height: 1.7; padding: 0 8px; border-radius: 999px; backdrop-filter: blur(2px) }
.thumb-cat:hover { background: var(--brand); color: #fff }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column }
.card-meta-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px }
.badge { display: inline-block; background: var(--brand-soft); color: var(--brand); font-size: 12px; padding: 1px 8px; border-radius: 999px; white-space: nowrap }
.card-title { font-size: 17px; line-height: 1.45; margin-bottom: 6px }
.card-title a { display: block }
.excerpt { color: var(--muted); font-size: 13px; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.card-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px }
.card-stats { display: flex; align-items: center; gap: 12px }
.crumbs { color: var(--muted); font-size: 13px; margin: 6px 0 14px }
.crumbs i { margin: 0 6px; font-style: normal; color: #c5cad2 }
.crumbs span { color: var(--text) }
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px }
.post-title { font-size: 24px; line-height: 1.4; margin-bottom: 10px }
.entry-info { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; color: var(--muted); font-size: 13px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 20px }
.entry-info > * { white-space: nowrap }
.entry-info .dot { color: #c5cad2 }
.entry-info a { color: var(--brand) }
.post-content { font-size: 15.5px }
.post-cover { margin: 0 0 20px }
.post-cover img { width: 100%; display: block; border-radius: var(--radius) }
.post-content p { margin: 0 0 14px }
.post-content h2 { font-size: 19px; margin: 24px 0 12px; padding-left: 10px; border-left: 4px solid var(--brand) }
.post-content h3 { font-size: 16px; margin: 18px 0 10px }
.post-content ul, .post-content ol { padding-left: 22px; margin: 0 0 14px }
.post-content li { margin-bottom: 6px }
.post-content code { background: #f0f2f5; padding: 1px 6px; border-radius: 4px; font-size: 13px }
.post-content pre { background: #1e2229; color: #e6e8ec; padding: 14px; border-radius: 8px; overflow-x: auto; margin: 0 0 14px }
.post-content pre code { background: none; color: inherit }
.post-content table { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 14px }
.post-content th, .post-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left }
.post-content th { background: #f4f6f9 }
.post-content img { max-width: 100%; border-radius: 8px }
.post-content blockquote { border-left: 4px solid var(--brand-soft); background: var(--brand-soft); padding: 10px 14px; border-radius: 6px; color: #45506a; margin-bottom: 14px }
.entry-tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px }
.entry-tags a { background: #f2f4f7; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; color: #5a6270 }
.entry-tags a:hover { background: var(--brand-soft); color: var(--brand) }
.faq { margin-top: 24px }
.faq h2 { font-size: 17px; margin-bottom: 12px }
.faq details { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: #fafbfc }
.faq summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 14px }
.faq .faq-a { padding: 0 14px 12px; color: var(--muted); font-size: 14px }
.interact { margin-top: 24px; background: var(--brand-soft); border-radius: var(--radius); padding: 14px 16px }
.interact h3 { font-size: 15px; color: var(--brand); margin-bottom: 4px }
.interact p { font-size: 13.5px; color: #45506a }
.entry-related { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-top: 14px }
.section-title { font-size: 16px; line-height: 1.3; margin-bottom: 12px; padding-left: 10px; border-left: 3px solid var(--brand) }
.rel-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px }
.rel-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff }
.rel-thumb { position: relative; height: 108px; display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center; font-size: 28px; font-weight: 700; color: #fff }
.rel-ph { background: linear-gradient(135deg, #2f6fed, #7a5af5) }
.rel-cat { position: absolute; left: 8px; top: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 999px }
.rel-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px }
.rel-title { font-size: 13.5px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.rel-excerpt { font-size: 12px; color: var(--muted); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.rel-meta { margin-top: auto; display: flex; justify-content: space-between; color: #a0a7b3; font-size: 11.5px }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap }
.pagination a, .pagination .dots { min-width: 34px; text-align: center; padding: 5px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; font-size: 13px }
.pagination a.cur { background: var(--brand); border-color: var(--brand); color: #fff }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--muted) }
.site-footer { padding: 20px 0; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); background: var(--card); margin-top: 30px }
@media (max-width: 600px) {
  .post-card { flex-direction: column }
  .thumb-wrap { flex-basis: auto; width: 100% }
  .thumb { width: 100%; height: 180px }
  .cf-row { grid-template-columns: 1fr }
  .entry-page { grid-template-columns: 1fr }
  .rel-grid { grid-template-columns: 1fr }
  .footer-cols { grid-template-columns: 1fr }
}
.admin-body { background: #f2f4f7 }
.admin-nav { background: #1e2229; padding: 0 16px }
.admin-nav .wrap { display: flex; align-items: center; gap: 4px; height: 50px; max-width: 1080px }
.admin-nav a { color: #b8bec9; padding: 6px 12px; border-radius: 6px; font-size: 14px }
.admin-nav a:hover, .admin-nav a.on { background: #2b313b; color: #fff }
.admin-nav .brand { color: #fff; font-weight: 700; margin-right: 16px }
.admin-main { max-width: 1080px; margin: 20px auto; padding: 0 16px }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px }
.panel h2 { font-size: 16px; margin-bottom: 14px }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px }
.stat b { display: block; font-size: 24px; color: var(--brand) }
.stat span { color: var(--muted); font-size: 13px }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px }
table.tbl th, table.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left }
table.tbl th { color: var(--muted); font-weight: 500; font-size: 13px }
label.fld { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted) }
label.fld input, label.fld select, label.fld textarea { display: block; width: 100%; margin-top: 5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit }
label.fld textarea { min-height: 120px }
label.fld textarea.tall { min-height: 320px; font-family: Consolas, Menlo, monospace; font-size: 13px }
.btn { display: inline-block; background: var(--brand); color: #fff; border: none; border-radius: 8px; padding: 8px 18px; font-size: 14px; cursor: pointer; text-decoration: none }
.btn:hover { opacity: .88; color: #fff }
.btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--line) }
.btn-danger { background: #e5484d }
.btn-sm { padding: 3px 10px; font-size: 12.5px; border-radius: 6px }
.tag-pill { display: inline-block; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; margin: 2px 4px 2px 0 }
.alert { background: #fff7e6; border: 1px solid #ffe0a3; color: #8a5b00; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px }
.ok { background: #e8f7ee; border-color: #b5e5c8; color: #1a7f43 }
.login-box { max-width: 360px; margin: 80px auto }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start }
.content { min-width: 0 }
.sidebar { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 12px }
.search { margin-left: auto; display: flex; align-items: center; background: #f2f4f7; border-radius: 999px; padding: 0 4px 0 12px }
.search input { border: none; background: transparent; outline: none; font-size: 13px; width: 150px; padding: 6px 0; color: var(--text); font-family: inherit }
.search button { border: none; background: transparent; cursor: pointer; font-size: 13px; padding: 4px 8px }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 18px; padding: 2px 10px; cursor: pointer }
.widget { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px }
.widget-title { display: flex; align-items: center; justify-content: space-between; font-size: 15px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line) }
.widget-title span { position: relative; padding-left: 9px }
.widget-title span::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: var(--brand) }
.toc-toggle { background: #f2f4f7; border: none; border-radius: 6px; font-size: 11px; color: var(--muted); padding: 2px 8px; cursor: pointer }
.widget-toc.collapsed .toc-list { display: none }
.toc-list { list-style: none; max-height: 320px; overflow-y: auto; font-size: 13.5px }
.toc-list li { padding: 4px 0; line-height: 1.5 }
.toc-list li.lv3 { padding-left: 14px; font-size: 13px }
.toc-list a { color: #4a5160; display: block; border-left: 2px solid transparent; padding-left: 6px }
.toc-list a:hover, .toc-list a.active { color: var(--brand); border-left-color: var(--brand); background: var(--brand-soft) }
.widget-ad { padding: 0; overflow: hidden; text-align: center }
.widget-ad img { width: 100%; display: block; border-radius: var(--radius) }
.rank-list { list-style: none }
.rank-list li { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; line-height: 1.5 }
.rank-list li:last-child { border-bottom: none }
.rank-no { flex: 0 0 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 4px; background: #eef0f4; color: var(--muted); font-size: 11px; font-weight: 700 }
.rank-no.top { background: var(--brand); color: #fff }
.rank-list a { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.rank-hot { flex: 0 0 auto; color: #c2743a; background: #fdf3ec; border-radius: 4px; padding: 0 5px; font-size: 11px; white-space: nowrap }
.hot-list { list-style: none }
.hot-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line) }
.hot-list li:last-child { border-bottom: none; padding-bottom: 0 }
.hot-thumb { position: relative; flex: 0 0 68px; height: 52px; border-radius: 6px; background: linear-gradient(135deg, #2f6fed, #7a5af5); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 18px }
.hot-thumb .rank-no { position: absolute; left: 4px; top: 4px; background: rgba(0, 0, 0, .6); color: #fff }
.hot-thumb .rank-no.top { background: var(--brand) }
.hot-body { min-width: 0; flex: 1 }
.hot-title { font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.hot-meta { display: block; margin-top: 3px; font-size: 11.5px; color: #c2743a }
.latest-list { list-style: none }
.latest-list li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line) }
.latest-list li:last-child { border-bottom: none }
.latest-thumb { flex: 0 0 62px; height: 48px; border-radius: 6px; background: linear-gradient(135deg, #2f6fed, #7a5af5); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 18px }
.latest-body { min-width: 0 }
.latest-title { font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.latest-meta { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted) }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px }
.tag-cloud a { background: #f2f4f7; border-radius: 6px; padding: 3px 9px; font-size: 12.5px; color: #4a5160 }
.tag-cloud a:hover { background: var(--brand-soft); color: var(--brand) }
.tag-cloud i { font-style: normal; color: var(--muted); font-size: 11px; margin-left: 4px }
.entry-copyright { margin-top: 22px; background: #f7f8fa; border-left: 3px solid #c9cfda; border-radius: 6px; padding: 10px 14px; font-size: 12.5px; color: var(--muted); line-height: 1.8; word-break: break-all }
.entry-copyright p { margin: 0 }
.entry-copyright p + p { margin-top: 4px }
.entry-copyright a { color: #4a5160; text-decoration: underline; text-decoration-color: #d3d8e0 }
.entry-copyright a:hover { color: var(--brand) }
.entry-action { margin-top: 18px; text-align: center }
.btn-zan { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand); border: 1px solid #d6e2fb; border-radius: 999px; padding: 8px 26px; font-size: 14px; font-family: inherit; cursor: pointer }
.btn-zan:hover { background: #e2ecfe }
.btn-zan.on { background: var(--brand); color: #fff; border-color: var(--brand); cursor: default }
.entry-bar { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted) }
.eb-item { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; color: var(--muted); background: none; border: none; font: inherit; cursor: pointer }
.eb-item:hover { background: #f2f4f7; color: var(--brand) }
.eb-item b { color: var(--brand); font-weight: 600 }
.eb-share { display: flex; align-items: center; gap: 2px }
.eb-label { margin-right: 4px }
.entry-page { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px }
.ep-item { min-height: 110px; border-radius: var(--radius); padding: 14px 16px; color: #fff; background: linear-gradient(135deg, #3b4557, #1f2530); background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: space-between; gap: 12px }
.ep-item:hover { color: #fff; opacity: .94 }
.ep-title { font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.ep-info { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: rgba(255, 255, 255, .72) }
.ep-info em { font-style: normal; color: #fff }
.ep-empty { visibility: hidden }
.comments { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 14px }
.comment-list { list-style: none }
.comment-list li { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line) }
.comment-list li:last-child { border-bottom: none }
.c-avatar { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #2f6fed, #7a5af5); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600 }
.c-main { flex: 1; min-width: 0 }
.c-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 6px }
.c-head strong { color: var(--text) }
.c-head time { margin-left: auto; font-size: 12px }
.c-floor { font-size: 11.5px; color: #a8afba }
.c-site { font-size: 12px; color: var(--muted) }
.c-body { font-size: 14px; color: #3b414b; line-height: 1.8 }
.c-reply { margin-top: 8px; padding: 0; background: none; border: none; font: inherit; font-size: 12.5px; color: var(--brand); cursor: pointer }
.c-reply:hover { text-decoration: underline }
.reply-title { font-size: 15px; margin: 20px 0 10px }
.cf-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px }
.comment-form label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 10px }
.comment-form input, .comment-form textarea { width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit }
.comment-form textarea { resize: vertical }
.cf-full { display: block }
.cf-actions { display: flex; align-items: center; gap: 12px }
.hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0 }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1.4fr 1fr; gap: 20px; padding: 26px 16px }
.foot-col h2 { font-size: 14px; margin-bottom: 10px; font-weight: 600 }
.foot-col ul { list-style: none }
.foot-col li { padding: 3px 0; font-size: 13px }
.foot-col p { font-size: 13px; color: var(--muted); line-height: 1.7 }
.foot-tags { display: flex; flex-wrap: wrap; gap: 6px }
.foot-tags a { background: #f2f4f7; border-radius: 6px; padding: 2px 8px; font-size: 12px; color: #4a5160 }
.foot-bottom { border-top: 1px solid var(--line); padding: 12px 0; text-align: center; font-size: 12.5px; color: var(--muted) }
.to-top { position: fixed; right: 22px; bottom: 26px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 17px; cursor: pointer; opacity: 0; pointer-events: none; transition: .2s; box-shadow: 0 2px 10px rgba(0,0,0,.08) }
.to-top.show { opacity: 1; pointer-events: auto }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr }
  .sidebar { position: static }
  .footer-cols { grid-template-columns: 1fr 1fr }
  .search { display: none }
  .nav-toggle { display: block }
  .nav { display: none; position: absolute; top: 56px; left: 0; right: 0; background: var(--card); border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 16px; gap: 2px }
  body.nav-open .nav { display: flex }
  .nav a { padding: 10px 8px }
  .site-header { position: relative }
}

@media print {
  .site-header, .sidebar, .comments, .entry-page, .entry-bar, .entry-action, .to-top, .site-footer, .crumbs, .faq, .entry-related { display: none }
  body { background: #fff; color: #000; font-size: 12pt; line-height: 1.7 }
  .layout { display: block }
  .wrap { max-width: none; padding: 0 }
  .post { border: none; box-shadow: none; padding: 0 }
  .post-title { font-size: 20pt }
  .post-content a { color: #000; text-decoration: underline }
  .post-content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555 }
  .entry-copyright { border: 1px solid #ccc; background: #fff }
  @page { margin: 18mm 16mm }
}
