/* ===========================================================================
 * DUX for Typecho — 扁平化视觉层
 * 基准：demo.themebetter.com/dux 亮色版（#f4f4f4 / #fff / #007bff / #ff5e52）
 * 原则：最扁平化 —— 6px 小圆角、零渐变、零阴影、1px 细线分隔
 * 尺寸基准（demo.themebetter.com/dux 实测）：大轮播/公告栏 820×220 与 360×220 等高、
 * 三图卡 265×149、列表缩略图 180×123 在左、所有卡片 border-radius 6px
 * 字体：沿用 DUX 系统字体栈，不注入任何 webfont
 * 书页外框由 ink-paper.css 负责，本文件只管内容与组件
 * =========================================================================== */

:root {
  --tb-bdbg: #f4f4f4;
  --tb-white: #fff;
  --tb-base: #333;
  --tb-gray: #999;
  --tb-line: #eee;
  --tb-line-soft: #f3f3f3;
  --tb-main: #007bff;
  --tb-accent: #ff5e52;
  --tb-tint: #fbfbfb;
  --tb-dark: #202935;
  --tb-border: #e8e8e8;
  --du-radius: 6px;
  --du-gap: 20px;
  --du-top-h: 220px;
  --du-triple-h: 149px;
  --du-thumb-w: 180px;
  --du-thumb-h: 123px;
}
html.dark {
  --tb-bdbg: #0c0f14;
  --tb-white: #14181b;
  --tb-base: #ccc;
  --tb-gray: #888;
  --tb-line: #1d2025;
  --tb-line-soft: #191d22;
  --tb-tint: #171b20;
  --tb-dark: #202935;
  --tb-border: #23272e;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body#dux-root {
  margin: 0;
  padding: 0;
  background: var(--tb-bdbg);
  color: var(--tb-base);
  font-family: -apple-system, BlinkMacSystemFont, "Microsoft Yahei", MiSans, "HarmonyOS Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--tb-base); text-decoration: none; transition: color .15s; }
a:hover { color: var(--tb-main); }
img { max-width: 100%; display: block; border: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button, input, textarea { font-family: inherit; font-size: inherit; }
.tbfa { display: inline-block; vertical-align: -2px; flex: 0 0 auto; }
.container { width: 1240px; max-width: 100%; margin: 0 auto; }
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 16px; border: 1px solid var(--tb-border); border-radius: var(--du-radius); background: var(--tb-white); color: var(--tb-base); font-size: 13px; cursor: pointer; }
.btn:hover { border-color: var(--tb-main); color: var(--tb-main); }
.btn-primary { background: var(--tb-main); border-color: var(--tb-main); color: #fff; }
.btn-primary:hover { background: #0069d9; border-color: #0069d9; color: #fff; }

/* ---------- 顶部细条 ---------- */
.topbar { height: 32px; background: var(--tb-white); border-bottom: 1px solid var(--tb-line-soft); font-size: 12px; color: var(--tb-gray); }
.topbar .container { height: 32px; display: flex; align-items: center; justify-content: space-between; }
.topbar .site-nav { display: flex; align-items: center; gap: 16px; }
.topbar a { color: var(--tb-gray); }
.topbar a:hover { color: var(--tb-main); }
.topbar .entry-settings a { display: inline-flex; align-items: center; gap: 4px; color: var(--tb-main); }

/* ---------- 主头部 ---------- */
.header { height: 75px; background: var(--tb-white); border-bottom: 1px solid var(--tb-line-soft); position: sticky; top: 0; z-index: 60; }
.header .container { height: 75px; display: flex; align-items: center; }
.logo { flex: 0 0 auto; font-size: 20px; font-weight: 700; order: 1; }
.logo a { display: inline-flex; align-items: center; gap: 9px; color: var(--tb-base); }
.logo a:hover { color: var(--tb-base); }
.logo img { max-height: 34px; width: auto; }
.logo-dot { width: 34px; height: 34px; border-radius: 50%; background: var(--tb-main); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; letter-spacing: -.5px; }
.brand { order: 2; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--tb-line); font-size: 12px; line-height: 1.5; color: var(--tb-gray); }
.site-navbar { order: 3; margin-left: auto; display: flex; align-items: center; gap: 2px; height: 75px; }
.site-navbar > li { position: relative; height: 75px; display: flex; align-items: center; }
.site-navbar > li > a { display: inline-flex; align-items: center; height: 75px; padding: 0 13px; font-size: 15px; color: var(--tb-base); }
.site-navbar > li > a:hover, .site-navbar > li.current-menu-item > a { color: var(--tb-main); }
html.dux-nav-active .site-navbar > li.current-menu-item > a { position: relative; }
html.dux-nav-active .site-navbar > li.current-menu-item > a::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 20px; height: 2px; background: var(--tb-main); }
.site-navbar .sub-menu { display: none; position: absolute; top: 62px; left: 0; min-width: 160px; padding: 6px 0; background: var(--tb-white); border: 1px solid var(--tb-border); z-index: 80; }
.site-navbar li:hover > .sub-menu { display: block; }
.site-navbar .sub-menu a { display: block; padding: 7px 16px; font-size: 13px; white-space: nowrap; }
.site-navbar .sub-menu a:hover { background: var(--tb-tint); color: var(--tb-main); }
.site-navbar .sub-menu .sub-menu { top: -6px; left: 100%; }
/* ---------- 导航自动图标 ---------- */
.site-navbar > li > a .nav-ico,
.site-navbar .sub-menu a .nav-ico { display: inline-flex; align-items: center; margin-right: 6px; color: var(--tb-gray); }
.site-navbar > li > a:hover .nav-ico,
.site-navbar > li.current-menu-item > a .nav-ico,
.site-navbar .sub-menu a:hover .nav-ico { color: var(--tb-main); }
.site-navbar .sub-menu a .nav-ico { margin-right: 5px; }
html.dark .site-navbar > li > a .nav-ico,
html.dark .site-navbar .sub-menu a .nav-ico { color: var(--tb-gray); }
.sitedark, .navto-search { order: 4; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: var(--tb-gray); cursor: pointer; border-radius: var(--du-radius); }
.sitedark:hover, .navto-search:hover { color: var(--tb-main); background: var(--tb-tint); }
.navto-search { order: 5; }

/* ---------- 搜索弹层 ---------- */
.site-search { display: none; position: fixed; inset: 0 0 auto; z-index: 120; padding: 42px 0; background: var(--tb-white); border-bottom: 1px solid var(--tb-border); }
.site-search.show { display: block; }
.site-search .container { display: flex; align-items: center; gap: 14px; }
.site-search form { flex: 1; display: flex; gap: 10px; }
.site-search .search-input { flex: 1; height: 44px; padding: 0 14px; border: 1px solid var(--tb-border); border-radius: var(--du-radius); background: var(--tb-tint); color: var(--tb-base); outline: none; }
.site-search .search-input:focus { border-color: var(--tb-main); }
.site-search button { display: inline-flex; align-items: center; gap: 6px; padding: 0 20px; border: 0; border-radius: var(--du-radius); background: var(--tb-main); color: #fff; cursor: pointer; }
.site-search .search-close { color: var(--tb-gray); }

/* ---------- 主区两栏 ---------- */
section.container { display: flex; align-items: flex-start; gap: var(--du-gap); padding: var(--du-gap); }
.content-wrap { flex: 0 0 820px; width: 820px; min-width: 0; }
.content { min-width: 0; }
.sidebar { flex: 0 0 360px; width: 360px; min-width: 0; }
.content > *, .sidebar > * { margin-bottom: var(--du-gap); }
.content > *:last-child, .sidebar > *:last-child { margin-bottom: 0; }

/* 卡片通用：白底、6px 小圆角、零阴影、1px 细线 */
.dux-slider, .dux-today, .title.excerpts-title, .excerpt, .article-page, .comment-container,
.surround-post, .related-posts, .breadcrumb, .dux-empty, .widget, .dux-triple-item, .pagination {
  background: var(--tb-white);
  border-radius: var(--du-radius);
  border: 1px solid var(--tb-border);
  transition: border-color .2s ease;
}
html.dark .dux-slider, html.dark .dux-today, html.dark .title.excerpts-title, html.dark .excerpt,
html.dark .article-page, html.dark .comment-container, html.dark .surround-post, html.dark .related-posts,
html.dark .breadcrumb, html.dark .dux-empty, html.dark .widget, html.dark .dux-triple-item { border-color: var(--tb-line); }

/* ---------- 大轮播（与右栏公告栏严格等高，官方 820×220） ---------- */
.dux-slider { position: relative; height: var(--du-top-h); overflow: hidden; padding: 0; }
.dux-slides { position: relative; height: 100%; }
.dux-slide { display: none; position: absolute; inset: 0; }
.dux-slide.active { display: block; }
.dux-slide img { width: 100%; height: 100%; object-fit: cover; }
/* 左下角小胶囊标题，指示点在其正下方 —— 与 DUX 官方一致 */
.dux-slide-cap { position: absolute; left: 16px; bottom: 36px; max-width: calc(100% - 32px); padding: 5px 12px; background: rgba(0,0,0,.5); color: #fff; font-size: 13px; border-radius: var(--du-radius); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.dux-cap-bar .dux-slide-cap { left: 0; right: 0; bottom: 0; max-width: none; padding: 8px 16px; border-radius: 0; }
html.dux-cap-none .dux-slide-cap { display: none; }
.dux-slider-dots { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 5px; z-index: 2; }
.dux-slider-dots i { width: 14px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.5); cursor: pointer; transition: background .2s; }
.dux-slider-dots i.on { background: #fff; }

/* ---------- 三图卡（官方 265×149 / 12px 间距 / 6px 圆角） ---------- */
.dux-triple { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; background: transparent; border: 0; margin-bottom: var(--du-gap); }
.dux-triple-item { position: relative; height: var(--du-triple-h); overflow: hidden; border: 0; margin: 0; }
.dux-triple-item img { width: 100%; height: 100%; object-fit: cover; }
.dux-triple-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; color: #fff; font-size: 12px; background: linear-gradient(transparent, rgba(0,0,0,.6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 今日观点 ---------- */
.dux-today { padding: 20px 22px; }
.dux-today h2 { font-size: 17px; font-weight: 700; line-height: 1.6; }
.dux-today h2 a.red { color: var(--tb-accent); margin-right: 4px; }
.dux-today h2 a:last-child:hover { color: var(--tb-main); }
.dux-today .note { margin-top: 10px; color: var(--tb-gray); font-size: 13px; line-height: 1.8; max-height: 48px; overflow: hidden; }

/* ---------- 列表标题 ---------- */
.title.excerpts-title { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--tb-line-soft); margin-bottom: 0; border-radius: var(--du-radius) var(--du-radius) 0 0; }
.title.excerpts-title h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.title.excerpts-title h3::before { content: ""; width: 3px; height: 15px; background: var(--tb-main); }
.title.excerpts-title .more { display: flex; gap: 14px; font-size: 12px; color: var(--tb-gray); }
.title.excerpts-title .more a { color: var(--tb-gray); }
.title.excerpts-title .more a:hover { color: var(--tb-main); }
.archive-title { margin-bottom: var(--du-gap) !important; border-radius: var(--du-radius) !important; }

/* ---------- 文章列表卡片（缩略图在左，官方 180×123） ---------- */
.excerpt { position: relative; display: block; min-height: 164px; padding: 20px; margin-bottom: 0; border-radius: 0; border-top: 0; }
.excerpt:last-of-type { border-radius: 0 0 var(--du-radius) var(--du-radius); }
.excerpt > a.focus { position: absolute; left: 20px; right: auto; top: 20px; width: var(--du-thumb-w); height: var(--du-thumb-h); overflow: hidden; border-radius: var(--du-radius); background: var(--tb-tint); }
.excerpt > a.focus img { width: 100%; height: 100%; object-fit: cover; }
.excerpt header, .excerpt .note, .excerpt .meta { margin-left: calc(var(--du-thumb-w) + 20px); }
.excerpt.no-cover header, .excerpt.no-cover .note, .excerpt.no-cover .meta { margin-left: 0; }
.excerpt header { padding-right: 0; }
.excerpt header h2 { font-size: 17px; font-weight: 700; line-height: 1.5; }
.excerpt header h2 a:hover { color: var(--tb-main); }
.sticky-icon { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: var(--du-radius); background: var(--tb-accent); color: #fff; font-size: 12px; font-weight: 400; vertical-align: 2px; }
.excerpt .note { margin-top: 10px; padding-right: 0; color: var(--tb-gray); font-size: 13px; line-height: 1.8; max-height: 46px; overflow: hidden; }
.excerpt .meta { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--tb-gray); font-size: 12px; }

/* 后台「⑭ 视觉细节」可切回缩略图在右 */
html.dux-thumb-right .excerpt > a.focus { left: auto; right: 20px; }
html.dux-thumb-right .excerpt header, html.dux-thumb-right .excerpt .note, html.dux-thumb-right .excerpt .meta { margin-left: 0; padding-left: 0; padding-right: calc(var(--du-thumb-w) + 20px); }
.excerpt .meta a { color: var(--tb-gray); }
.excerpt .meta a:hover { color: var(--tb-main); }
.excerpt .meta .author, .excerpt .meta time, .excerpt .meta .cat, .excerpt .meta .pv, .excerpt .meta .post-like { display: inline-flex; align-items: center; gap: 4px; }
.excerpt .meta .post-like { cursor: pointer; }
.excerpt .meta .post-like.liked { color: var(--tb-accent); }

/* ---------- 分页 ---------- */
.pagination { background: var(--tb-white); border: 1px solid var(--tb-border); border-radius: var(--du-radius); padding: 16px; text-align: center; }
.pagination ol.page-navigator { display: inline-flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pagination ol.page-navigator li { display: inline-flex; }
.pagination ol.page-navigator a, .pagination ol.page-navigator span { display: inline-block; min-width: 32px; padding: 5px 10px; border: 1px solid var(--tb-border); border-radius: var(--du-radius); color: var(--tb-base); font-size: 13px; }
.pagination ol.page-navigator li.current a, .pagination ol.page-navigator li.current span, .pagination ol.page-navigator a:hover { background: var(--tb-main); border-color: var(--tb-main); color: #fff; }

/* ---------- 右栏 widgets ---------- */
.widget { padding: 18px 20px; }
.widget h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.widget h3::before { content: ""; width: 3px; height: 14px; background: var(--tb-main); }
/* 公告栏与大轮播严格等高（官方 360×220），内部行距压缩到 5 行刚好装下 */
.widget-tops { padding: 0; height: var(--du-top-h); overflow: hidden; display: flex; flex-direction: column; }
.widget-tops .widget-nav { flex: 0 0 auto; display: flex; border-bottom: 1px solid var(--tb-line-soft); }
.widget-tops .widget-nav li { flex: 1; padding: 10px 0; text-align: center; font-size: 14px; color: var(--tb-gray); cursor: pointer; }
.widget-tops .widget-nav li.active { color: var(--tb-base); font-weight: 700; border-bottom: 2px solid var(--tb-main); }
.widget-tops .widget-navcontent { flex: 1 1 auto; min-height: 0; padding: 10px 20px 12px; }
.widget-tops .widget-navcontent > li { display: none; }
.widget-tops .widget-navcontent > li.active { display: block; }
.widget-tops .item-01 li { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: 13px; border-bottom: 1px dashed var(--tb-line-soft); }
.widget-tops .item-01 li:last-child { border-bottom: 0; }
.widget-tops .item-01 time { flex: 0 0 auto; margin-left: auto; color: var(--tb-gray); font-size: 12px; font-variant-numeric: tabular-nums; }
.widget-tops .item-01 a { flex: 1 1 auto; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-tops .item-02 h4 { margin: 8px 0 14px; font-size: 14px; color: var(--tb-gray); }
.widget-tops .item-02 p { display: flex; gap: 8px; }
.widget_ui_textorbui { padding: 0; overflow: hidden; }
.widget_ui_textorbui a.style02 { display: block; padding: 20px 22px 24px; position: relative; }
.widget_ui_textorbui strong { position: relative; display: inline-block; margin-bottom: 14px; padding: 3px 9px; background: var(--tb-accent); color: #fff; font-size: 12px; font-weight: 400; border-radius: var(--du-radius); }
.widget_ui_textorbui h2 { color: var(--tb-accent); font-size: 18px; margin-bottom: 10px; }
.widget_ui_textorbui p { color: var(--tb-gray); font-size: 12px; line-height: 1.9; }
.widget_ui_flash li { padding: 10px 0; border-bottom: 1px dashed var(--tb-line-soft); }
.widget_ui_flash li:last-child { border-bottom: 0; }
.widget_ui_flash li h4 { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; font-weight: 400; line-height: 1.6; }
.widget_ui_flash li h4 .tbfa { color: var(--tb-main); margin-top: 3px; }
.widget_ui_flash .note { margin: 6px 0 0 20px; color: var(--tb-gray); font-size: 12px; line-height: 1.7; max-height: 38px; overflow: hidden; }
.widget_ui_posts li { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 0; min-height: 58px; border-bottom: 1px dashed var(--tb-line-soft); }
.widget_ui_posts li:last-child { border-bottom: 0; }
.widget_ui_posts .n { width: 18px; height: 18px; flex: 0 0 18px; display: inline-flex; align-items: center; justify-content: center; background: var(--tb-tint); color: var(--tb-gray); font-size: 11px; border-radius: var(--du-radius); }
.widget_ui_posts .n.hot { background: var(--tb-accent); color: #fff; }
.widget_ui_posts li > a:first-of-type { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget_ui_posts .thumb { width: 66px; height: 46px; flex: 0 0 66px; overflow: hidden; border-radius: var(--du-radius); }
.widget_ui_posts .thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget_ui_comments li { padding: 8px 0; font-size: 12px; border-bottom: 1px dashed var(--tb-line-soft); }
.widget_ui_comments li strong { color: var(--tb-main); }
.tagcloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tagcloud a { padding: 4px 10px; background: var(--tb-tint); border: 1px solid var(--tb-border); border-radius: var(--du-radius); font-size: 12px; color: var(--tb-gray); }
.tagcloud a:hover { border-color: var(--tb-main); color: var(--tb-main); }
.stat-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.stat-list li { padding: 8px 2px; background: var(--tb-tint); border-radius: var(--du-radius); }
.stat-list strong { display: block; font-size: 16px; color: var(--tb-base); }
.stat-list span { font-size: 11px; color: var(--tb-gray); }
.widget_ui_links li { display: inline-block; margin: 0 12px 8px 0; font-size: 13px; }
.toc-list li { padding: 5px 0 5px 10px; border-left: 2px solid var(--tb-line); font-size: 13px; }
.toc-list li:hover { border-color: var(--tb-main); }
.toc-list li.toc-level-3 { padding-left: 22px; }
.toc-list li.toc-level-4 { padding-left: 34px; }
.dux-mini-slides { position: relative; height: 140px; overflow: hidden; }
.dux-mini-slide { display: none; position: absolute; inset: 0; }
.dux-mini-slide.active { display: block; }
.dux-mini-slide img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 文章页 ---------- */
.breadcrumb { padding: 11px 20px; font-size: 12px; color: var(--tb-gray); }
.breadcrumb span { margin: 0 5px; }
.breadcrumb a { color: var(--tb-gray); }
.article-page { padding: 30px 40px 28px; }
.article-header { margin-bottom: 26px; }
.article-header.center { text-align: center; }
.article-title { font-size: 26px; font-weight: 700; line-height: 1.5; }
.article-meta { margin-top: 12px; color: var(--tb-gray); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: inherit; }
.article-header.center .article-meta { justify-content: center; }
.article-meta a { color: var(--tb-gray); }
.meta-sep { color: var(--tb-line); }
.post-excerpt { margin-bottom: 22px; padding: 14px 18px; background: var(--tb-tint); border: 1px solid var(--tb-border); border-left: 3px solid var(--tb-main); border-radius: var(--du-radius); color: var(--tb-gray); font-size: 13px; }
.excerpt-label { display: inline-block; margin-right: 8px; color: var(--tb-main); font-weight: 700; }
.post-excerpt p { display: inline; }
.outdated-notice { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 12px 16px; background: #fffbe5; border: 1px solid #f5e6a8; border-radius: var(--du-radius); color: #8a6d3b; font-size: 13px; }
html.dark .outdated-notice { background: #2a2415; border-color: #4a3c1c; color: #d8bd7a; }
.article-entry { font-size: 15px; line-height: 2; color: var(--tb-base); word-wrap: break-word; }
.article-entry h2, .article-entry h3, .article-entry h4 { margin: 28px 0 12px; font-weight: 700; line-height: 1.5; }
.article-entry h2 { font-size: 20px; padding-left: 12px; border-left: 3px solid var(--tb-main); }
.article-entry h3 { font-size: 17px; }
.article-entry p { margin: 0 0 16px; }
.article-entry img { margin: 16px auto; border-radius: var(--du-radius); }
.article-entry blockquote { margin: 18px 0; padding: 12px 18px; background: var(--tb-tint); border-left: 3px solid var(--tb-main); color: var(--tb-gray); }
.article-entry ul, .article-entry ol { margin: 0 0 16px 22px; }
.article-entry ul { list-style: disc; }
.article-entry ol { list-style: decimal; }
.article-entry li { margin: 5px 0; }
.article-entry pre { margin: 18px 0; padding: 16px; background: var(--tb-tint); border: 1px solid var(--tb-border); border-radius: var(--du-radius); overflow-x: auto; font-size: 13px; line-height: 1.7; }
.article-entry code { padding: 2px 5px; background: var(--tb-tint); border-radius: var(--du-radius); font-size: 13px; }
.article-entry pre code { padding: 0; background: none; }
.article-entry table { width: 100%; margin: 18px 0; border-collapse: collapse; }
.article-entry th, .article-entry td { padding: 9px 12px; border: 1px solid var(--tb-border); }
.article-entry th { background: var(--tb-tint); }
.article-footer { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--tb-line-soft); }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.post-tags a { padding: 3px 10px; background: var(--tb-tint); border: 1px solid var(--tb-border); border-radius: var(--du-radius); color: var(--tb-gray); }
.post-tags a:hover { border-color: var(--tb-main); color: var(--tb-main); }
.post-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.post-modified { margin-left: auto; color: var(--tb-gray); font-size: 12px; }
.btn-like { background: var(--tb-accent); border-color: var(--tb-accent); color: #fff; }
.btn-like:hover { background: #e04b40; border-color: #e04b40; color: #fff; }
.surround-post { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 0; overflow: hidden; }
.surround-item { padding: 16px 20px; }
.surround-item + .surround-item { border-left: 1px solid var(--tb-line-soft); }
.surround-label { display: flex; align-items: center; gap: 5px; color: var(--tb-gray); font-size: 12px; }
.surround-link { margin-top: 6px; font-size: 14px; font-weight: 700; }
.related-posts { padding: 0; }
.related-posts .title.excerpts-title { border: 0; }
.related-posts ul { padding: 4px 20px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.related-posts li { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-posts li::before { content: "·"; color: var(--tb-main); margin-right: 6px; }

/* ---------- 评论区 ---------- */
.comment-container { padding: 22px 26px 26px; }
.comment-title { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--tb-line-soft); padding-bottom: 14px; margin-bottom: 18px; }
.comment-title h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.comment-title h3 .tbfa { color: var(--tb-main); }
.comment-count { color: var(--tb-gray); font-size: 12px; }
.comment-hint { color: var(--tb-gray); font-size: 13px; padding: 10px 0; }
.comment-list { margin-bottom: 24px; }
.comment-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--tb-line-soft); }
.c-avatar img { width: 40px; height: 40px; border-radius: 50%; }
.c-body { flex: 1; min-width: 0; }
.c-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--tb-gray); }
.c-meta strong { color: var(--tb-base); font-size: 13px; }
.c-reply { margin-left: auto; cursor: pointer; }
.c-content { margin-top: 6px; font-size: 14px; line-height: 1.8; }
.comment-respond h4 { font-size: 16px; margin-bottom: 14px; }
.cancel-reply { margin-left: 10px; font-size: 12px; color: var(--tb-gray); }
.comment-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.comment-fields input, .comment-respond textarea { width: 100%; padding: 9px 12px; background: var(--tb-tint); border: 1px solid var(--tb-border); border-radius: var(--du-radius); color: var(--tb-base); outline: none; }
.comment-fields input:focus, .comment-respond textarea:focus { border-color: var(--tb-main); }
.comment-respond textarea { margin: 10px 0; resize: vertical; }
.comment-submit { text-align: right; }

/* ---------- 独立页 / 友链 / 归档 / 404 ---------- */
.links-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.link-card { padding: 16px; border: 1px solid var(--tb-border); border-radius: var(--du-radius); background: var(--tb-tint); }
.link-card.mine { border-color: var(--tb-main); }
.link-logo { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; margin-bottom: 10px; }
.link-card h3 { font-size: 15px; margin-bottom: 6px; }
.link-card p { color: var(--tb-gray); font-size: 12px; min-height: 34px; }
.link-actions { display: flex; gap: 12px; margin-top: 10px; font-size: 12px; }
.link-actions a { color: var(--tb-main); }
.link-status { color: var(--tb-gray); }
.links-apply { margin-top: 22px; padding: 16px; background: var(--tb-tint); border-radius: var(--du-radius); font-size: 13px; }
.links-submit { margin-top: 14px; }
.archive-group { margin-bottom: 24px; }
.archive-group h3 { font-size: 17px; padding-bottom: 8px; border-bottom: 1px solid var(--tb-line-soft); }
.archive-group h3 span { color: var(--tb-gray); font-size: 12px; font-weight: 400; }
.archive-group li { display: flex; gap: 14px; padding: 7px 0; font-size: 14px; }
.archive-group time { color: var(--tb-gray); font-size: 12px; flex: 0 0 44px; }
.dux-empty { padding: 50px 20px; text-align: center; }
.dux-empty h3 { font-size: 18px; margin: 14px 0 6px; }
.dux-empty p { color: var(--tb-gray); font-size: 13px; margin-bottom: 18px; }
.dux-empty .tbfa { color: var(--tb-gray); }
.page-404 { padding: 0; }
.code-404 { font-size: 84px; font-weight: 700; line-height: 1; color: var(--tb-main); letter-spacing: 4px; }
.empty-actions { display: flex; gap: 10px; justify-content: center; }

/* ---------- 精细化：悬停微动效（默认关闭，后台「⑭ 视觉细节」可开） ---------- */
.dux-triple-item img, .excerpt > a.focus img, .widget_ui_posts .thumb img { transition: transform .35s ease; }
html.dux-hover-on .dux-triple-item:hover img,
html.dux-hover-on .excerpt:hover > a.focus img,
html.dux-hover-on .widget_ui_posts li:hover .thumb img { transform: scale(1.05); }
html.dux-hover-on .widget:hover, html.dux-hover-on .dux-today:hover,
html.dux-hover-on .article-page:hover, html.dux-hover-on .pagination:hover,
html.dux-hover-on .comment-container:hover { border-color: #dcdcdc; }
html.dark.dux-hover-on .widget:hover, html.dark.dux-hover-on .dux-today:hover,
html.dark.dux-hover-on .article-page:hover, html.dark.dux-hover-on .pagination:hover,
html.dark.dux-hover-on .comment-container:hover { border-color: var(--tb-line); }

/* ---------- 页脚 ---------- */
.footer { margin-top: 20px; padding: 28px 0 36px; background: var(--tb-white); border-top: 1px solid var(--tb-line-soft); text-align: center; color: var(--tb-gray); font-size: 12px; }
.footer .container { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.flinks { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.flinks strong { color: var(--tb-base); }
.flinks ul { display: flex; gap: 14px; flex-wrap: wrap; }
.flinks a { color: var(--tb-gray); }
.fcode { color: var(--tb-gray); }
.uptime-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #5cb85c; }
.copyright a { color: var(--tb-gray); }
.copyright a:hover { color: var(--tb-main); }
.footer-social { display: flex; gap: 12px; }

/* ---------- 右下悬浮条 ---------- */
.karbar { position: fixed; right: 14px; bottom: 90px; z-index: 90; }
.karbar ul { display: flex; flex-direction: column; gap: 4px; }
.karbar li a { width: 44px; padding: 8px 0 7px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--tb-main); color: #fff; border-radius: var(--du-radius); font-size: 10px; line-height: 1.3; }
.karbar li a:hover { background: #0069d9; color: #fff; }
.karbar li.karbar-top a { background: var(--tb-main); color: #fff; border: 1px solid var(--tb-main); }
.karbar li.karbar-top a:hover { background: #0069d9; color: #fff; border-color: #0069d9; }

/* ---------- 音乐播放器 ---------- */
.dux-music { position: fixed; bottom: 20px; z-index: 95; }
.dux-music[data-position="right"] { right: 70px; }
.dux-music[data-position="left"] { left: 20px; }
.dux-music-toggle { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--tb-main); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dux-music-panel { display: none; position: absolute; bottom: 48px; left: 0; width: 240px; padding: 16px; background: var(--tb-white); border: 1px solid var(--tb-border); border-radius: var(--du-radius); }
.dux-music-panel.show { display: block; }
.dux-music-panel h4 { font-size: 14px; margin-bottom: 10px; }
.dux-music-panel li { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12px; color: var(--tb-gray); border-bottom: 1px dashed var(--tb-line-soft); }
.dux-music-panel li span { color: var(--tb-base); }
.dux-music-panel .btn { margin-top: 12px; width: 100%; justify-content: center; }
.music-hint { margin-top: 8px; font-size: 11px; color: var(--tb-accent); }

/* ---------- 移动端 ---------- */
.m-icon-nav, .m-navbar, .m-mask { display: none; }
@media (max-width: 1280px) {
  .container { width: 100%; }
  section.container { padding: 16px; }
  .content-wrap { flex: 1 1 auto; width: auto; }
  .sidebar { flex: 0 0 320px; width: 320px; }
  .excerpt > a.focus { width: 160px; }
  .excerpt header, .excerpt .note, .excerpt .meta { margin-left: 180px; }
  html.dux-thumb-right .excerpt > a.focus { width: 190px; }
  html.dux-thumb-right .excerpt header, html.dux-thumb-right .excerpt .note, html.dux-thumb-right .excerpt .meta { margin-left: 0; padding-right: 210px; }
}
@media (max-width: 900px) {
  .topbar, .header, .site-search { display: none !important; }
  .m-icon-nav { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 14px; background: var(--tb-white); border-bottom: 1px solid var(--tb-line-soft); position: sticky; top: 0; z-index: 100; }
  .m-icon-nav .m-logo { display: flex; align-items: center; gap: 7px; margin: 0 auto; font-size: 17px; }
  .m-icon-nav .m-logo img { width: 26px; height: 26px; }
  .m-icon-nav .logo-dot { width: 26px; height: 26px; font-size: 12px; }
  .m-icon-nav a { color: var(--tb-base); }
  .m-mask.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 110; }
  .m-navbar { display: none; position: fixed; top: 0; left: 0; bottom: 0; width: 260px; background: var(--tb-white); z-index: 111; overflow-y: auto; padding: 12px 0; }
  .m-navbar.show { display: block; }
  .m-navbar-title { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 16px; font-size: 15px; font-weight: 700; border-bottom: 1px solid var(--tb-line-soft); }
  .m-navbar li a { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--tb-line-soft); font-size: 14px; }
  .m-navbar li a .nav-ico { display: inline-flex; color: var(--tb-gray); }
  .m-navbar li.current-menu-item > a { color: var(--tb-main); background: rgba(0,123,255,.09); border-radius: var(--du-radius); font-weight: 600; }
  .m-navbar li.current-menu-item > a .nav-ico { color: var(--tb-main); }
  .m-navbar li.m-navbar-sep { height: 10px; background: var(--tb-bdbg); }
  section.container { display: block; padding: 12px; }
  .content-wrap, .sidebar { width: 100%; max-width: 100%; }
  .sidebar { display: none; }
  .dux-slider { height: 150px; }
  .karbar { right: 8px; bottom: 60px; }
  .karbar li a { width: 38px; font-size: 9px; }
}
@media (max-width: 528px) {
  .dux-triple { gap: 6px; }
  .dux-triple-item { height: 96px; }
  .dux-triple-item span { font-size: 10px; padding: 4px 6px; }
  .dux-slider { height: 150px; }
  .dux-today, .excerpt, .breadcrumb, .widget { padding: 14px; }
  .dux-today h2 { font-size: 15px; }
  .title.excerpts-title { padding: 13px 14px; }
  .title.excerpts-title .more { display: none; }
  .excerpt { min-height: 0; }
  .excerpt > a.focus { position: relative; left: auto; right: auto; top: auto; float: left; width: 118px; height: 82px; margin: 0 10px 6px 0; }
  .excerpt header, .excerpt .note, .excerpt .meta { margin-left: 0; padding-left: 0; padding-right: 0; }
  html.dux-thumb-right .excerpt > a.focus { float: right; margin: 0 0 6px 10px; }
  html.dux-thumb-right .excerpt header, html.dux-thumb-right .excerpt .note, html.dux-thumb-right .excerpt .meta { margin-left: 0; padding-right: 0; }
  .excerpt header h2 { font-size: 15px; }
  .excerpt .note { max-height: 40px; font-size: 12px; margin-top: 6px; }
  .excerpt .meta { gap: 9px; margin-top: 10px; }
  .article-page { padding: 20px 16px; }
  .article-title { font-size: 21px; }
  .article-entry { font-size: 14px; }
  .surround-post { grid-template-columns: 1fr; }
  .surround-item + .surround-item { border-left: 0; border-top: 1px solid var(--tb-line-soft); }
  .related-posts ul { grid-template-columns: 1fr; }
  .links-grid { grid-template-columns: 1fr; }
  .comment-fields { grid-template-columns: 1fr; }
  .comment-container { padding: 18px 16px; }
  .footer { padding: 22px 0 30px; }
}

/* ==========================================================================
 * 前后台对应补齐（v2）：仅作用于新增类名 / 配置项，默认不改变 DUX 视觉
 * ========================================================================== */

/* ① 子菜单：hover 模式 / 点击模式（默认点击） */
.site-navbar > li.has-sub { position: relative; }
.site-navbar > li.has-sub > .sub-toggle { display: inline-flex; align-items: center; margin-left: 2px; color: var(--tb-gray); cursor: pointer; vertical-align: middle; }
.site-navbar > li.has-sub > .sub-toggle:hover { color: var(--tb-main); }
html.dux-menu-click .site-navbar li:hover > .sub-menu { display: none; }
html.dux-menu-click .site-navbar li.menu-open > .sub-menu { display: block; }
html.dux-menu-click .site-navbar > li.has-sub > .sub-toggle svg { transition: transform .15s; }
html.dux-menu-click .site-navbar > li.menu-open > .sub-toggle svg { transform: rotate(180deg); }

/* ① 导航图标颜色反转 */
html.dux-icon-invert .site-navbar > li > a .nav-ico,
html.dux-icon-invert .site-navbar .sub-menu a .nav-ico,
html.dux-icon-invert .site-navbar > li.current-menu-item > a .nav-ico { color: var(--tb-main); }
html.dux-icon-invert .site-navbar > li > a:hover .nav-ico { color: var(--tb-gray); }
html.dark.dux-icon-invert .site-navbar > li > a .nav-ico { color: #fff; }

/* ⑤ 推广轮播：标题 / 高度 / 显示数量 */
.widget_ui_slider h3 { padding: 13px 16px 9px; font-size: 14px; }
.dux-mini-slides { height: var(--du-promo-h, 140px); }

/* ⑥ 摘要打字机光标 */
.post-excerpt.typing p::after { content: attr(data-caret); margin-left: 2px; color: var(--tb-main); animation: dux-blink .7s steps(1) infinite; }
@keyframes dux-blink { 50% { opacity: 0; } }
.post-tags-label { margin-right: 6px; color: var(--tb-gray); font-size: 12px; }

/* ⑤ 文章页：许可协议 */
.post-license { margin-top: 12px; padding: 10px 12px; background: var(--tb-tint); border: 1px solid var(--tb-line-soft); border-radius: var(--du-radius); font-size: 12px; color: var(--tb-gray); }
.post-license svg { vertical-align: -2px; margin-right: 4px; }

/* ⑩ 分页跳转 */
.page-jump { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; font-size: 13px; color: var(--tb-gray); }
.page-jump input { width: 64px; padding: 5px 8px; border: 1px solid var(--tb-border); border-radius: var(--du-radius); background: var(--tb-white); color: var(--tb-base); text-align: center; font-size: 13px; }

/* ③ 页脚探索栏 */
.footer-explore { margin: 0 0 14px; font-size: 12px; color: var(--tb-gray); }
.footer-explore strong { margin-right: 10px; color: var(--tb-base); font-weight: 600; }
.footer-explore ul { display: inline-flex; flex-wrap: wrap; gap: 12px; }
.footer-explore a { color: var(--tb-gray); }
.footer-explore a:hover { color: var(--tb-main); }

/* ⑫ 悬浮条：微信二维码弹层 */
.dux-qrbox { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); cursor: zoom-out; }
.dux-qrbox img { max-width: 260px; max-height: 260px; padding: 10px; background: #fff; border-radius: var(--du-radius); }
