/* ============================================
   源码七号站Style - 融合 Forum Lite 论坛风格的 emlog 模板
   ============================================ */

/* === CSS Variables === */
/* === 星云粒子背景层 === */
#dl-nebula {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    display: block;
}
body { position: relative; }
.dl-page-body-wrap, .dl-header, .dl-footer, footer { position: relative; z-index: 1; }

:root {
    /* ★ 这里只是「后台没设置时」的兜底默认值。真正生效的是 header.php / plugins.php
       里由 palette.inc.php 按后台主色调实时推导出来的同名变量（写在页面 <style> 里，
       在本文件之后加载，会覆盖这里）。所以改主色调，全站派生色会一起跟着变。 */
    --primary: #2e5299;
    --primary-rgb: 46,82,153;
    --primary-light: #5875ad;
    --primary-lighter: #9bacce;
    --primary-soft: #becbe4;
    --primary-bg: #edf2fa;
    --card-hover: #f6f8fc;
    --accent: #06b6d4;
    --accent-cyan: #06b6d4;
    --accent-rgb: 6,182,212;
    --bg-body: #f3f5f9;
    --bg-white: #ffffff;
    --bg-light: #f6f8fb;
    --border: #e0e4ed;
    --border-light: #edf0f5;
    --border-row: #f1f3f8;
    --text-dark: #171e2c;
    --text-read: #1a2130;
    --text-mid: #525c6f;
    --text-light: #8b94a7;
    --text-link: #2e5299;
    --text-link-hover: #06b6d4;
    --shadow: 0 6px 22px rgba(var(--primary-rgb),0.09);
    --ok: #16a34a;
    --ok-bg: #e9f7ef;
    --warn: #d97706;
    --warn-bg: #fdf3e7;
    --danger: #e5484d;
    --danger-bg: #fdeced;
    --gold: #d4a017;
    --glow: rgba(var(--primary-rgb),0.45);
    --code-bg: #12151c;
    --code-text: #d3d7de;
    --code-scroll: rgba(var(--primary-rgb),0.35);
    --panel-grad: linear-gradient(135deg,#10151e 0%,#162137 40%,#1f335b 70%,#131c30 100%);
    --panel-grad-deep: linear-gradient(135deg,#0a0d12 0%,#0f1726 40%,#1a2947 70%,#0c121d 100%);
    --header-gradient: linear-gradient(180deg,#151a26 0%,#0e131c 100%);
    --radius: 14px;
    --container-width: 1200px;
    --sidebar-width: 280px;
    --gap: 16px;
    /* 别名令牌：让插件里 var(--bg-page,#fff) 之类的兜底跟随主题 */
    --bg-page: var(--bg-body);
    --bg-card: var(--bg-white);
    --bg: var(--bg-white);
    --text-body: var(--text-dark);
    --text-color: var(--text-dark);
    --card-bg: var(--bg-white);
    --panel-bg: var(--bg-white);
}

/* === Dark Mode === */
[data-theme="dark"] {
    --primary: #6a8dd2;
    --primary-rgb: 106,141,210;
    --primary-light: #99b1e0;
    --primary-lighter: #355fb0;
    --primary-soft: #243c6b;
    --primary-bg: #172238;
    --card-hover: #151c2b;
    --accent: #2fdcf9;
    --accent-cyan: #2fdcf9;
    --accent-rgb: 47,220,249;
    --bg-body: #0a0c10;
    --bg-white: #13171d;
    --bg-light: #0e1116;
    --border: rgba(255,255,255,0.075);
    --border-light: rgba(255,255,255,0.05);
    --border-row: rgba(255,255,255,0.05);
    --text-dark: #e7e9ee;
    --text-read: #bfc4cf;
    --text-mid: #aeb4c2;
    --text-light: #818a9c;
    --text-link: #99b1e0;
    --text-link-hover: #2fdcf9;
    --shadow: 0 10px 34px rgba(0,0,0,0.55);
    --ok: #34d399;
    --ok-bg: rgba(52,211,153,0.12);
    --warn: #fbbf24;
    --warn-bg: rgba(251,191,36,0.12);
    --danger: #f87171;
    --danger-bg: rgba(248,113,113,0.13);
    --gold: #eab308;
    --glow: rgba(106,141,210,0.55);
    --code-bg: #0d0f15;
    --code-text: #d0d4dc;
    --code-scroll: rgba(106,141,210,0.40);
    --panel-grad: linear-gradient(135deg,#10151e 0%,#162137 40%,#1f335b 70%,#131c30 100%);
    --panel-grad-deep: linear-gradient(135deg,#0a0d12 0%,#0f1726 40%,#1a2947 70%,#0c121d 100%);
    --header-gradient: linear-gradient(180deg,#12171f 0%,#0c1016 100%);
}

/* === Reset & Base === */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 手机端点按反馈：去掉浏览器默认的绿色/灰色高亮，改成克制的紫色态 */
a, button, [role="button"], .dl-nav-item > a, .dl-nav-item > span, .dl-btn, input, select, textarea, label {
    -webkit-tap-highlight-color: transparent;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
@media (hover: none) and (pointer: coarse) {
    .dl-nav-item > a:active, .dl-nav-item > span:active, .dl-btn:active, a:active { opacity: .78; }
}
body {
    font-family: "Microsoft YaHei", "Segoe UI", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
/* Body inner wrapper to allow flex growth */
.dl-page-body-wrap { flex: 1 0 auto; }
a { color: var(--text-link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text-link-hover); }
img { max-width: 100%; height: auto; border: 0; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--text-dark); }
.clearfix::after { content: ''; display: table; clear: both; }

/* === Container === */
.dl-wrap { max-width: var(--container-width); margin: 0 auto; padding: 0 10px; width: 100%; box-sizing: border-box; }
.dl-narrow .dl-wrap { max-width: 960px; }

/* === Header / Top Bar === */
.dl-header {
    background: var(--header-gradient);
    border-bottom: 1px solid rgba(var(--primary-rgb),0.28);
    box-shadow: 0 1px 0 rgba(var(--primary-rgb),0.12), 0 8px 24px rgba(0,0,0,0.18);
    position: relative;
    z-index: 100;
}
.dl-header-top {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 15px;
}
.dl-logo a {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.dl-logo img { height: 40px; margin-right: 10px; }
.dl-header-info {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
}
.dl-menu-toggle { margin-left: auto; }

/* === Navigation === */
.dl-nav {
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255,255,255,0.1);
}
.dl-nav-list {
    display: flex;
    align-items: center;
    height: 42px;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}
.dl-nav-item { position: relative; list-style: none; }
.dl-nav-item > a,
.dl-nav-item > span {
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 18px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    white-space: nowrap;
}
.dl-nav-item > a:hover,
.dl-nav-item > span:hover,
.dl-nav-item.active > a {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
/* Dropdown */
.dl-nav-item .dl-dropdown {
    display: none;
    position: absolute;
    top: 42px;
    left: 0;
    min-width: 160px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 200;
}
.dl-nav-item:hover .dl-dropdown { display: block; }
.dl-dropdown a {
    display: block;
    padding: 8px 18px;
    color: var(--text-dark);
    font-size: 13px;
    border-bottom: 1px solid var(--border-row);
}
.dl-dropdown a:hover { background: var(--primary-bg); color: var(--primary); }

/* Mobile menu toggle */
.dl-menu-toggle {
    display: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* === Transparent Header Mode === */
.dl-header.dl-header-transparent {
    background: transparent !important;
    border-bottom: 1px solid var(--border) !important;
}
.dl-header.dl-header-transparent .dl-logo a {
    color: var(--primary);
    text-shadow: none;
}
.dl-header.dl-header-transparent .dl-header-info {
    color: var(--text-mid);
}
.dl-header.dl-header-transparent .dl-nav {
    background: var(--bg-white) !important;
    border-top: 1px solid var(--border) !important;
}
.dl-header.dl-header-transparent .dl-nav-item > a,
.dl-header.dl-header-transparent .dl-nav-item > span {
    color: var(--text-dark) !important;
}
.dl-header.dl-header-transparent .dl-nav-item > a:hover,
.dl-header.dl-header-transparent .dl-nav-item > span:hover,
.dl-header.dl-header-transparent .dl-nav-item.active > a {
    background: var(--primary-bg) !important;
    color: var(--primary) !important;
}
.dl-header.dl-header-transparent .dl-dropdown a { color: var(--text-dark) !important; }
.dl-header.dl-header-transparent .dl-menu-toggle { color: var(--text-dark) !important; }

/* === Split Header Mode (白底Logo+蓝色导航) === */
.dl-header.dl-header-split {
    border-bottom: none !important;
}
.dl-header.dl-header-split .dl-header-top {
    border-top: 3px solid var(--primary);
}
.dl-header.dl-header-split .dl-logo a {
    color: var(--primary);
    text-shadow: none;
}
.dl-header.dl-header-split .dl-header-info {
    color: var(--primary);
}
.dl-header.dl-header-split .dl-nav {
    background: var(--primary) !important;
    border-top: none !important;
}
.dl-header.dl-header-split .dl-nav-item > a,
.dl-header.dl-header-split .dl-nav-item > span {
    color: rgba(255,255,255,0.9) !important;
}
.dl-header.dl-header-split .dl-nav-item > a:hover,
.dl-header.dl-header-split .dl-nav-item > span:hover,
.dl-header.dl-header-split .dl-nav-item.active > a {
    background: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}
.dl-header.dl-header-split .dl-dropdown a { color: var(--text-dark) !important; }
.dl-header.dl-header-split .dl-menu-toggle { color: var(--primary) !important; }

/* === Main Layout === */
.dl-main {
    display: flex;
    gap: var(--gap);
    padding: 15px 0;
    align-items: flex-start;
}
.dl-content { flex: 1; min-width: 0; max-width: 100%; }
.dl-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    min-width: 0;
}
.dl-sidebar-left { order: -1; }
.dl-sidebar.sticky .dl-sidebar-inner {
    position: sticky;
    top: 15px;
    /* FIX 2026-10-07: 滚到页面最底时，侧栏比左栏多出一截（正好一个 --gap）。
       原因：左栏最后一个模块的 margin-bottom 被算进了左栏高度，侧栏拉伸后跟它一样高；
       而侧栏最后一个模块的 margin-bottom 会“穿透”这个内层塌陷出去，浏览器算 sticky
       的活动范围时不认这段塌陷的外边距，于是内层一路贴到侧栏最底边 —— 比左栏最后一个
       模块的下沿低了一个 margin。
       flow-root 让内层自己包住最后一个模块的 margin-bottom，两边的尾巴就对等了。
       两栏尾巴不等的页面（左栏末尾不是标准 .dl-box）由 main.js 再补差值。 */
    display: flow-root;
}
/* FIX 2026-09-19: .dl-main 是 align-items:flex-start，侧栏只有内容那么高，
   里面的 sticky 没有滑动空间。让侧栏撑满整行高度，内层才能跟随。
   侧栏比屏幕高时，top 由 main.js 动态算成负值：先滚到侧栏底部，再让底部贴住屏幕。 */
.dl-main > .dl-sidebar.sticky { align-self: stretch; }
@media (max-width: 960px) {
    .dl-main > .dl-sidebar.sticky { align-self: auto; }
    .dl-sidebar.sticky .dl-sidebar-inner { position: static; }
}

/* === 明暗切换胶囊 === */
.dl-nav-toggle-item { margin-left: auto; display: flex; align-items: center; }
.dl-theme-switch {
    position: relative;
    width: 50px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.28);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background .25s, border-color .25s;
    -webkit-tap-highlight-color: transparent;
}
.dl-theme-switch:hover { background: rgba(255,255,255,0.24); }
.dl-ts-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .28s cubic-bezier(.34,1.4,.5,1);
}
.dl-ts-i { position: absolute; font-size: 11px; line-height: 1; transition: opacity .2s; }
.dl-ts-i-sun { opacity: 1; }
.dl-ts-i-moon { opacity: 0; }
:root[data-theme="dark"] .dl-theme-switch { background: rgba(var(--primary-rgb),0.30); border-color: rgba(var(--primary-rgb),0.55); }
:root[data-theme="dark"] .dl-theme-switch:hover { background: rgba(var(--primary-rgb),0.42); }
:root[data-theme="dark"] .dl-ts-knob { transform: translateX(24px); }
:root[data-theme="dark"] .dl-ts-i-sun { opacity: 0; }
:root[data-theme="dark"] .dl-ts-i-moon { opacity: 1; }
.dl-header-transparent .dl-theme-switch,
.dl-header-split .dl-theme-switch { background: var(--primary-bg); border-color: var(--border); }

/* === Card / Box === */
.dl-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--gap);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.dl-box-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px 11px;
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}
.dl-box-title strong {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding-left: 11px;
}
.dl-box-title strong::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 15px;
    border-radius: 2px;
    background: var(--primary);
    box-shadow: 0 0 8px rgba(var(--primary-rgb),0.5);
}
.dl-box-title .more {
    font-size: 12px;
    font-weight: normal;
    color: var(--text-light);
}
.dl-box-title .more:hover { color: var(--primary); }
.dl-box-body { padding: 12px 15px; }

/* === Breadcrumb === */
.dl-breadcrumb {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 15px;
    margin-bottom: var(--gap);
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    overflow: hidden;
}
.dl-breadcrumb .bc-icon {
    color: var(--primary);
    font-size: 14px;
    flex-shrink: 0;
}
.dl-breadcrumb a { color: var(--text-mid); white-space: nowrap; }
.dl-breadcrumb a:hover { color: var(--primary); }
.dl-breadcrumb span.sep { color: var(--border); flex-shrink: 0; }
.dl-breadcrumb .bc-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
    color: var(--text-dark);
}

/* === Announcement Bar (Forum Lite Style) === */
.dl-announcement {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    height: 38px;
    display: flex;
    align-items: center;
    margin-bottom: var(--gap);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.dl-anno-icon {
    width: 42px;
    height: 38px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    position: relative;
    flex-shrink: 0;
}
.dl-anno-icon::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 0;
    border-left: 8px solid var(--primary);
    border-top: 19px solid transparent;
    border-bottom: 19px solid transparent;
}
.dl-anno-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 10px;
}
.dl-anno-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    position: absolute;
    will-change: transform;
}
.dl-anno-item {
    padding-right: 80px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

/* === Slideshow === */
.dl-slideshow {
    position: relative;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: var(--gap);
    box-shadow: var(--shadow);
}
.dl-slide { display: none; position: relative; }
.dl-slide.active { display: block; }
.dl-slide img { width: 100%; height: 280px; object-fit: cover; display: block; }
.dl-slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    padding: 30px 20px 12px;
    font-size: 15px;
    font-weight: 500;
}
.dl-slide-prev,
.dl-slide-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: #fff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
    z-index: 10;
}
.dl-slide-prev { left: 10px; }
.dl-slide-next { right: 10px; }
.dl-slide-prev:hover,
.dl-slide-next:hover { background: rgba(0,0,0,0.6); }

/* === CMS Module Block === */
.dl-cms-block .dl-box-body { padding: 0; }

/* ── CMS 版块折叠 / 展开 ──────────────────────────────────────── */

/* 整行可点时的标题栏 */
.dl-cms-toggleable.dl-cms-fullclick .dl-cms-toggle-header {
    cursor: pointer;
    user-select: none;
}
.dl-cms-toggleable.dl-cms-fullclick .dl-cms-toggle-header:hover {
    background: var(--primary-bg);
}

/* ── 胶囊状态徽章（分类名旁边）──────────────────────────────────── */

/* 两种胶囊完全一致的外壳，蓝色主题色系 */
.dl-cms-toggle-btn,
.dl-cms-status-normal {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 1px 8px 1px 6px !important;
    height: 18px !important;
    border-radius: 9px !important;
    border: 1px solid var(--border) !important;
    background: var(--primary-bg) !important;
    color: var(--primary) !important;
    font-size: 11px !important;
    font-weight: normal !important;
    font-family: inherit !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    position: relative !important;
    top: -1px !important;
    margin-left: 4px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.dl-cms-toggle-btn {
    cursor: pointer !important;
    outline: none !important;
    transition: background .15s, border-color .15s !important;
}
.dl-cms-toggle-btn:hover {
    background: var(--border) !important;
}
.dl-cms-toggle-btn:active { opacity: .8 !important; }
.dl-cms-status-normal { cursor: default !important; }

/* ── 呼吸小圆点（脉冲缩放，适配浅色背景）── */
.dl-badge-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
/* 绿点：正常 */
.dl-badge-dot-normal {
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
    animation: dl-badge-pulse-green 2s ease-in-out infinite;
}
@keyframes dl-badge-pulse-green {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0   rgba(34,197,94,0.6); }
    50%  { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(34,197,94,0);   }
    100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(34,197,94,0.6); }
}
/* 蓝点：已展开 */
.dl-badge-dot-toggle {
    background: var(--primary);
    box-shadow: 0 0 0 0 rgba(59,130,246,0.6);
    animation: dl-badge-pulse-blue 2s ease-in-out infinite;
}
@keyframes dl-badge-pulse-blue {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0   rgba(59,130,246,0.6); }
    50%  { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(59,130,246,0);   }
    100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(59,130,246,0.6); }
}
/* 橙点：已折叠 */
.dl-cms-collapsed .dl-badge-dot-toggle {
    background: #f97316;
    box-shadow: 0 0 0 0 rgba(249,115,22,0.6);
    animation: dl-badge-pulse-orange 2s ease-in-out infinite;
}
@keyframes dl-badge-pulse-orange {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0   rgba(249,115,22,0.6); }
    50%  { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(249,115,22,0);   }
    100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(249,115,22,0.6); }
}

/* 折叠时标题栏底边框隐藏 */
.dl-cms-collapsed .dl-box-title {
    border-bottom-color: transparent;
    transition: border-color .28s;
}
.dl-cms-list { }
.dl-cms-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-row);
    font-size: 14px;
    transition: background 0.15s;
}
.dl-cms-list li:last-child { border-bottom: none; }
.dl-cms-list li:hover { background: var(--primary-bg); }
.dl-cms-list .cms-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dl-cms-list .cms-title a { color: var(--text-dark); }
.dl-cms-list .cms-title a:hover { color: var(--primary); }
.dl-cms-list .cms-date {
    font-size: 11px;
    color: var(--text-light);
    flex-shrink: 0;
    margin-left: 12px;
    font-variant-numeric: tabular-nums;
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 6px;
}
.dl-cms-list .cms-today { color: var(--primary-light); }
/* 标题右侧显示作者时：字体、颜色与文章标题保持一致 */
.dl-cms-list .cms-author {
    font-size: inherit;
    color: var(--text-dark);
    flex-shrink: 0;
    margin-left: 10px;
}
.dl-cms-list .badge-top {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 2px;
    margin-right: 5px;
    vertical-align: middle;
    line-height: 1.4;
}

/* === Blog List (Standard) === */
.dl-article-list { }
.dl-article-item {
    display: flex;
    gap: 15px;
    padding: 18px 15px;
    border-bottom: 1px solid var(--border-row);
    transition: background 0.15s;
}
.dl-article-item:last-child { border-bottom: none; }
.dl-article-item:hover { background: var(--primary-bg); }
.dl-article-cover {
    width: 180px;
    height: 120px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-light);
}
.dl-article-cover img { width: 100%; height: 100%; object-fit: cover; }
.dl-article-info { flex: 1; min-width: 0; }
.dl-article-info h2 {
    font-size: 17px;
    margin-bottom: 8px;
    line-height: 1.4;
}
.dl-article-info h2 a { color: var(--text-dark); }
.dl-article-info h2 a:hover { color: var(--primary); }
.dl-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}
.dl-article-meta i { margin-right: 3px; color: var(--primary-lighter); }
.dl-article-excerpt {
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === URL Navigation Grid === */
.dl-nav-block .dl-box-body { padding: 12px 10px 5px; }
.dl-nav-grid {
    display: flex;
    flex-wrap: wrap;
}
.dl-nav-card {
    width: 12.5%;
    text-align: center;
    padding: 8px 5px;
    box-sizing: border-box;
    text-decoration: none;
    transition: transform 0.2s;
}
.dl-nav-card:hover { transform: translateY(-3px); }
.dl-nav-icon {
    width: 44px;
    height: 44px;
    line-height: 44px;
    background: var(--primary-bg);
    border-radius: 10px;
    margin: 0 auto 6px;
    color: var(--primary-light);
    font-size: 20px;
    transition: all 0.2s;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.dl-nav-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.dl-nav-card:hover .dl-nav-icon {
    background: var(--primary-light);
    color: #fff;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb),0.3);
    border-color: var(--primary-light);
}
.dl-nav-card span {
    font-size: 12px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--primary);
}
.dl-nav-card:hover span { color: var(--text-link-hover); }

/* === Nav Listing Page (Sub-sort bar + Grid) === */
.dl-nav-sub-bar {
    background: var(--bg-white);
    border: 1px solid var(--border);
    margin-bottom: var(--gap);
    border-radius: var(--radius);
    padding: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.dl-nav-sub-bar a {
    display: block;
    padding: 5px 15px;
    color: var(--text-mid);
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
    transition: all 0.3s;
}
.dl-nav-sub-bar a:hover { background: var(--primary-bg); color: var(--primary); }
.dl-nav-sub-bar a.active { background: var(--primary-light); color: #fff; }

.dl-nav-list-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px;
}
.dl-nav-item-card {
    width: 25%;
    padding: 5px;
    box-sizing: border-box;
    position: relative;
}
.dl-nav-item-card-inner {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    height: 70px;
    transition: all 0.3s;
}
.dl-nav-item-card-inner:hover {
    border-color: var(--primary-light);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb),0.1);
}
.dl-nav-item-main {
    display: flex;
    align-items: center;
    padding: 10px;
    text-decoration: none;
    color: var(--text-dark);
    height: 100%;
}
.dl-nav-item-main img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 10px;
    flex-shrink: 0;
    border: 1px solid var(--bg-light);
    object-fit: cover;
}
.dl-nav-item-info { overflow: hidden; flex: 1; padding-right: 5px; }
.dl-nav-item-info h3 {
    font-size: 14px;
    margin: 0 0 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: var(--text-dark);
}
.dl-nav-item-info p {
    font-size: 11px;
    color: var(--text-light);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dl-nav-item-hover {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
    transform: translateY(100%);
    gap: 8px;
    z-index: 5;
}
.dl-nav-item-card-inner:hover .dl-nav-item-hover {
    opacity: 1;
    transform: translateY(0);
}
.dl-nav-btn-go, .dl-nav-btn-detail {
    color: #fff;
    padding: 5px 10px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s;
    display: inline-block;
}
.dl-nav-btn-go { background: var(--primary-light); }
.dl-nav-btn-go:hover { background: var(--primary); box-shadow: 0 3px 8px rgba(var(--primary-rgb),0.3); color: #fff; }
.dl-nav-btn-detail { background: #666; }
.dl-nav-btn-detail:hover { background: #333; box-shadow: 0 3px 8px rgba(0,0,0,0.2); color: #fff; }
.dl-nav-mobile-go {
    display: none;
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    width: 24px; height: 24px;
    background: var(--primary-bg);
    color: var(--primary-light);
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid var(--border);
    z-index: 3;
}

/* === Nav Detail Page (Visit button + Stats) === */
.dl-nav-extra {
    margin: 20px 0 30px;
    padding: 20px;
    background: var(--primary-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.dl-nav-go-box { text-align: center; margin-bottom: 30px; }
.dl-nav-go-btn {
    display: inline-block;
    background: var(--primary-light);
    color: #fff;
    padding: 12px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb),0.3);
}
.dl-nav-go-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb),0.4);
    color: #fff;
}
.dl-nav-go-btn i { margin-right: 8px; }
.dl-nav-stat-box {
    background: var(--bg-white);
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 20px;
}
.dl-nav-stat-title {
    font-size: 15px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-light);
    padding-left: 10px;
}
.dl-nav-stat-content { margin-bottom: 10px; }
.dl-nav-stat-item { margin-bottom: 15px; }
.dl-nav-stat-label { font-size: 13px; color: var(--text-mid); margin-bottom: 5px; }
.dl-nav-stat-label span { font-weight: bold; color: var(--text-dark); float: right; }
.dl-nav-stat-bar { height: 8px; background: var(--bg-light); border-radius: 4px; overflow: hidden; }
.dl-nav-stat-progress { height: 100%; background: var(--primary-lighter); border-radius: 4px; transition: width 1s ease-in-out; }
.dl-nav-stat-progress.click { background: var(--primary-light); }
.dl-nav-stat-tips { font-size: 11px; color: var(--text-light); margin: 0; }

/* === Forum Thread List (Forum Lite Style) === */
.dl-thread-list { }
.dl-thread-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: var(--bg-light);
    border-bottom: 2px solid var(--primary);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mid);
}
.dl-thread-header .th-subject { flex: 1; }
.dl-thread-header .th-author { width: 120px; padding-left: 10px; }
.dl-thread-header .th-nums { width: 90px; text-align: center; }
.dl-thread-header .th-lastpost { width: 140px; padding-left: 10px; }

.dl-thread-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-row);
    transition: background 0.15s;
}
.dl-thread-item:hover { background: var(--primary-bg); }
.dl-thread-item .t-icon {
    width: 20px;
    color: var(--primary-lighter);
    font-size: 14px;
    flex-shrink: 0;
    margin-right: 8px;
}
.dl-thread-item .t-subject {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dl-thread-item .t-subject a {
    color: var(--text-link);
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dl-thread-item .t-subject a:hover { color: var(--text-link-hover); text-decoration: underline; }
.dl-thread-item .t-author {
    width: 120px;
    padding-left: 10px;
    font-size: 12px;
    flex-shrink: 0;
}
.dl-thread-item .t-author cite {
    display: block;
    font-style: normal;
    color: var(--text-mid);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dl-thread-item .t-author em {
    display: block;
    font-style: normal;
    color: var(--text-light);
    font-size: 11px;
}
.dl-thread-item .t-nums {
    width: 90px;
    text-align: center;
    font-size: 12px;
    flex-shrink: 0;
}
.dl-thread-item .t-nums span {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
}
.dl-thread-item .t-nums em {
    display: block;
    font-style: normal;
    color: var(--text-light);
    font-size: 11px;
}
.dl-thread-item .t-lastpost {
    width: 140px;
    padding-left: 10px;
    font-size: 12px;
    flex-shrink: 0;
}
.dl-thread-item .t-lastpost cite {
    display: block;
    font-style: normal;
    color: var(--text-mid);
}
.dl-thread-item .t-lastpost em {
    display: block;
    font-style: normal;
    color: var(--text-light);
    font-size: 11px;
}
.dl-thread-item .t-lastpost em a { color: var(--text-light); }
.dl-thread-item .t-lastpost em a:hover { color: var(--primary); }

/* Thread badges */
.t-badge {
    display: inline-block;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 2px;
    font-weight: 600;
    flex-shrink: 0;
    line-height: 1.4;
}
.t-badge-top { background: var(--accent); color: #fff; }
.t-badge-hot { background: #ff7b1c; color: #fff; }
.t-badge-new { background: #52c41a; color: #fff; }

/* No threads */
.dl-no-thread {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-light);
    font-size: 14px;
}

/* === Forum Post Detail (Forum Lite Style) === */
.dl-post-header {
    padding: 18px 20px;
    border-bottom: 2px solid var(--primary);
    background: var(--bg-light);
}
.dl-post-header h1 {
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 6px;
}
.dl-post-stats {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    gap: 15px;
}

.dl-post-item {
    display: flex;
    border-bottom: 4px solid var(--border-row);
    min-height: 200px;
}
.dl-post-item:last-child { border-bottom: none; }

/* Author sidebar */
.dl-post-author {
    width: 160px;
    background: var(--bg-light);
    border-right: 1px solid var(--border-light);
    padding: 20px 10px;
    text-align: center;
    flex-shrink: 0;
}
.dl-post-avatar {
    width: 90px;
    height: 90px;
    margin: 0 auto 12px;
    border: 2px solid var(--border);
    padding: 3px;
    background: var(--bg-white);
}
.dl-post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dl-post-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 6px;
}
.dl-post-role {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-lighter);
    color: #fff;
    font-size: 11px;
    border-radius: 3px;
    margin-bottom: 8px;
}
.dl-post-user-stats {
    font-size: 12px;
    color: var(--text-light);
    border-top: 1px dashed var(--border);
    padding-top: 8px;
    line-height: 1.8;
}

/* Post content area */
.dl-post-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.dl-post-meta {
    height: 38px;
    border-bottom: 1px solid var(--border-row);
    display: flex;
    align-items: center;
    padding: 0 18px;
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg-light);
}
.dl-post-floor {
    color: var(--primary);
    font-weight: 600;
    margin-right: 15px;
}
.dl-post-time { flex: 1; }
.dl-post-actions a {
    color: var(--primary-light);
    margin-left: 12px;
    font-size: 12px;
}
.dl-post-actions a:hover { color: var(--primary); }
.dl-post-content {
    padding: 20px;
    flex: 1;
    line-height: 1.8;
    font-size: 14px;
    color: var(--text-read);
    min-height: 120px;
    word-break: break-word;
}
.dl-post-content img { max-width: 100%; border-radius: var(--radius); }
.dl-post-footer {
    padding: 10px 20px;
    border-top: 1px dashed var(--border-row);
    font-size: 12px;
}

/* Author on top style */
.dl-author-top .dl-post-item { flex-direction: column; }
.dl-author-top .dl-post-author {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    text-align: left;
    padding: 10px 20px;
}
.dl-author-top .dl-post-avatar {
    width: 42px;
    height: 42px;
    margin: 0 12px 0 0;
}
.dl-author-top .dl-post-name { margin-bottom: 0; margin-right: 12px; }
.dl-author-top .dl-post-role { margin-bottom: 0; margin-right: 12px; }
.dl-author-top .dl-post-user-stats {
    border-top: none;
    padding-top: 0;
    margin-left: auto;
}

/* Quote blocks */
.dl-quote {
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 10px 15px;
    margin-bottom: 12px;
    border-radius: var(--radius);
    font-size: 13px;
}
.dl-quote-header {
    border-bottom: 1px dashed var(--border);
    padding-bottom: 5px;
    margin-bottom: 6px;
    color: var(--text-mid);
    font-weight: 500;
}

/* Reply box */
.dl-reply-box {
    padding: 20px;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
}
.dl-reply-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

/* === Article Detail (Blog Mode) === */
.dl-article-detail { padding: 25px; }
.dl-article-detail h1 {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 12px;
}
.dl-article-detail .dl-article-meta {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
}
.dl-article-body {
    line-height: 1.9;
    font-size: 15px;
    color: var(--text-read);
}
.dl-article-body p { margin-bottom: 1em; }
.dl-article-body img { border-radius: var(--radius); margin: 10px 0; }
.dl-article-body h2 { font-size: 20px; margin: 1.5em 0 0.8em; padding-left: 12px; border-left: 4px solid var(--primary); }
.dl-article-body h3 { font-size: 17px; margin: 1.2em 0 0.6em; }
.dl-article-body blockquote {
    border-left: 4px solid var(--primary-lighter);
    background: var(--primary-bg);
    padding: 12px 18px;
    margin: 15px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-mid);
}
.dl-article-body pre,
.dl-post-content pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 15px;
    padding-top: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: auto;
    max-height: 600px;
    margin: 15px 0;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
}
/* 代码块滚动条美化 */
.dl-article-body pre::-webkit-scrollbar,
.dl-post-content pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.dl-article-body pre::-webkit-scrollbar-track,
.dl-post-content pre::-webkit-scrollbar-track {
    background: var(--code-bg);
    border-radius: 4px;
}
.dl-article-body pre::-webkit-scrollbar-thumb,
.dl-post-content pre::-webkit-scrollbar-thumb {
    background: var(--code-scroll);
    border-radius: 4px;
}
.dl-article-body pre::-webkit-scrollbar-thumb:hover,
.dl-post-content pre::-webkit-scrollbar-thumb:hover {
    background: #777;
}
.dl-article-body pre::-webkit-scrollbar-corner,
.dl-post-content pre::-webkit-scrollbar-corner {
    background: var(--code-bg);
}
/* 代码块包裹容器 */
.dl-code-wrapper {
    position: relative;
    margin: 15px 0;
}
.dl-code-wrapper pre {
    margin: 0 !important;
}
/* 代码块复制按钮 */
.dl-code-copy {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;
    background: rgba(255,255,255,0.12);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.5;
}
.dl-code-copy:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}
.dl-code-copy.copied {
    background: #27ae60;
    color: #fff;
    border-color: #27ae60;
}
.dl-article-body code,
.dl-post-content code {
    background: var(--primary-bg);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}
.dl-article-body pre code,
.dl-post-content pre code { background: none; color: inherit; padding: 0; }

/* Adjacent articles */
.dl-neighbor {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}
.dl-neighbor a { color: var(--text-link); }
.dl-neighbor a:hover { color: var(--text-link-hover); }
.dl-neighbor-prev, .dl-neighbor-next { flex: 1; min-width: 0; }
.dl-neighbor-next { text-align: right; }
.dl-neighbor-label { color: var(--text-light); font-size: 12px; display: block; margin-bottom: 3px; }

/* Related articles */
.dl-related { padding: 0; }
.dl-related-list li {
    padding: 6px 15px;
    border-bottom: 1px solid var(--border-row);
    font-size: 13px;
}
.dl-related-list li:last-child { border-bottom: none; }
.dl-related-list li:hover { background: var(--primary-bg); }
.dl-related-list a { color: var(--text-dark); display: flex; align-items: center; gap: 8px; }
.dl-related-list a:hover { color: var(--primary); }
.dl-related-list .idx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--primary-lighter);
    color: #fff;
    font-size: 11px;
    border-radius: 3px;
    flex-shrink: 0;
}
.dl-related-list li:nth-child(-n+3) .idx { background: var(--accent); }

/* === Comment Section === */
.dl-comments-section { }
.dl-comment {
    display: flex;
    gap: 12px;
    padding: 15px;
    border-bottom: 1px solid var(--border-row);
}
.dl-comment:last-child { border-bottom: none; }
.dl-comment-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-light);
}
.dl-comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dl-comment-body { flex: 1; min-width: 0; }
.dl-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.dl-comment-name { font-weight: 600; color: var(--primary); font-size: 13px; }
.dl-comment-role {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 600;
}
/* badge 颜色均由 PHP inline style 动态输出，与后台用户组颜色设置实时同步 */
/* 仅游客单独用 CSS 覆盖（浅灰背景+深色字，区别于登录用户） */
.dl-comment-role[style] { color: #fff !important; }        /* 有 inline style 的统一白字 */
.dl-comment-role.visitor { background: var(--border) !important; color: #999 !important; }
.dl-comment-time { font-size: 11px; color: var(--text-light); }
.dl-comment-text { font-size: 13px; color: var(--text-dark); line-height: 1.6; margin-bottom: 5px; }
.dl-comment-reply { font-size: 12px; }
.dl-comment-reply a { color: var(--primary-light); }
.dl-comment-children { margin-left: 30px; border-left: 2px solid var(--border-row); }

/* Comment form */
.dl-comment-form { padding: 20px; }
.dl-comment-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    min-height: 100px;
    background: var(--bg-white);
    color: var(--text-dark);
    font-family: inherit;
}
.dl-comment-form textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.15); }
.dl-comment-form .form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.dl-comment-form input[type="text"],
.dl-comment-form input[type="email"] {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 13px;
    background: var(--bg-white);
    color: var(--text-dark);
}
.dl-comment-form input:focus { border-color: var(--primary); outline: none; }
.dl-comment-form .form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}
.dl-btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.dl-btn:hover { background: var(--primary-light); color: #fff; }
.dl-btn-link {
    background: none;
    color: var(--primary-light);
    padding: 8px 12px;
    cursor: pointer;
    border: none;
    font-size: 13px;
}

/* === Sidebar Widgets === */
.dl-widget { margin-bottom: var(--gap); }
.dl-widget .dl-box-body ul li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-row);
    font-size: 13px;
}
.dl-widget .dl-box-body ul li:last-child { border-bottom: none; }
.dl-widget .dl-box-body ul li a { color: var(--text-dark); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-widget .dl-box-body ul li a:hover { color: var(--primary); }

/* === Article TOC === */
.dl-article-toc-floating {
    display: none;
}
.dl-article-toc-mobile-trigger,
.dl-article-toc-mobile-drawer,
.dl-article-toc-mobile-overlay {
    display: none;
}
.dl-article-toc-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.dl-article-toc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}
.dl-article-toc-head strong {
    font-size: 14px;
    color: var(--text-dark);
}
.dl-article-toc-head span {
    font-size: 12px;
    color: var(--text-light);
}
.dl-article-toc-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 8px;
}
.dl-article-toc-list {
    margin: 0;
    padding: 0;
}
.dl-article-toc-item + .dl-article-toc-item {
    margin-top: 4px;
}
.dl-article-toc-item.level-3 {
    padding-left: 14px;
}
.dl-article-toc-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-mid);
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
    transition: all .2s ease;
}
.dl-article-toc-link:hover {
    background: var(--primary-bg);
    color: var(--primary);
}
.dl-article-toc-link.is-active {
    background: var(--primary-bg);
    color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}
.dl-article-toc-item.is-locked .dl-article-toc-link,
.dl-article-toc-link.is-locked {
    color: var(--text-light);
}
.dl-article-toc-item.is-locked .dl-article-toc-link:hover,
.dl-article-toc-link.is-locked:hover {
    background: var(--bg-light);
    color: var(--text-light);
}
.dl-article-toc-text {
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.dl-article-toc-lock {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 1px 7px;
    background: #fff;
}
.dl-article-toc-foot {
    padding: 10px 14px 12px;
    border-top: 1px solid var(--border-light, var(--border));
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg-light);
}
.dl-article-toc-mobile-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-light) 100%);
    border-right: 1px solid rgba(var(--primary-rgb),0.08);
}
.dl-article-toc-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 14px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--primary-bg) 100%);
    border-bottom: 1px solid rgba(var(--primary-rgb),0.08);
    box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset;
}
.dl-article-toc-mobile-head strong {
    font-size: 17px;
    color: var(--text-dark);
    letter-spacing: .5px;
}
.dl-article-toc-mobile-close {
    border: 0;
    background: rgba(var(--primary-rgb),0.08);
    color: var(--primary);
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.dl-article-toc-mobile-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 12px 14px;
}
@media (min-width: 1360px) {
    .dl-article-has-toc .dl-article-toc-floating {
        display: block;
        position: fixed;
        top: 117px;
        bottom: 24px;
        left: max(12px, calc((100vw - var(--container-width)) / 2 - 196px));
        width: 180px;
        z-index: 40;
    }
}
@media (min-width: 1680px) {
    .dl-article-has-toc .dl-article-toc-floating {
        left: calc((100vw - var(--container-width)) / 2 - 232px);
        width: 216px;
    }
}
@media (max-width: 768px) {
    .dl-article-toc-mobile-trigger {
        display: inline-flex;
        position: fixed;
        left: 0;
        top: 56%;
        transform: translateY(-50%);
        z-index: 110;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 0 12px 12px 0;
        background: linear-gradient(180deg, var(--primary) 0%, var(--primary-lighter) 100%);
        color: #fff;
        box-shadow: 0 10px 22px rgba(var(--primary-rgb),0.22);
        padding: 10px 6px;
        min-width: 32px;
        writing-mode: vertical-rl;
        text-orientation: upright;
        letter-spacing: 2px;
        cursor: pointer;
    }
    .dl-article-toc-mobile-trigger.is-active {
        opacity: 0;
        pointer-events: none;
    }
    .dl-article-toc-mobile-trigger-text {
        font-size: 11px;
        font-weight: 600;
        line-height: 1.05;
    }
    .dl-article-toc-mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 118;
        background: rgba(6, 8, 16, 0.62);
        backdrop-filter: blur(4px);
        opacity: 0;
        transition: opacity .22s ease;
    }
    .dl-article-toc-mobile-overlay.is-open {
        display: block;
        opacity: 1;
    }
    .dl-article-toc-mobile-drawer {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(82vw, 318px);
        z-index: 119;
        transform: translateX(-104%);
        transition: transform .24s ease;
        box-shadow: 12px 0 34px rgba(15, 23, 42, 0.18);
        border-radius: 0 18px 18px 0;
        overflow: hidden;
        background: var(--bg-white);
        border-top: 1px solid var(--border);
        border-right: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
    }
    /* 里层卡片贴合抽屉圆角，避免两层圆角不一致造成的“缺角/破损” */
    .dl-article-toc-mobile-drawer .dl-article-toc-card {
        border-radius: 0 18px 18px 0;
        border: none;
        box-shadow: none;
        height: 100%;
    }
    .dl-article-toc-mobile-drawer.is-open {
        transform: translateX(0);
    }
    .dl-article-toc-mobile-drawer .dl-article-toc-item.level-3 {
        padding-left: 10px;
    }
    .dl-article-toc-mobile-drawer .dl-article-toc-link {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 10px;
    }
    .dl-article-toc-mobile-drawer .dl-article-toc-item + .dl-article-toc-item {
        margin-top: 6px;
    }
    .dl-article-toc-mobile-drawer .dl-article-toc-link:not(.is-locked) {
        background: var(--bg-light);
        color: var(--text-dark);
    }
    .dl-article-toc-mobile-drawer .dl-article-toc-link.is-active {
        background: var(--primary-bg);
        color: var(--primary);
        box-shadow: inset 0 0 0 1px var(--primary);
    }
    .dl-article-toc-mobile-drawer .dl-article-toc-item.is-locked .dl-article-toc-link {
        background: var(--bg-body);
        color: var(--text-light);
    }
}

/* Blogger widget */
.dl-blogger {
    text-align: center;
    padding: 20px 15px;
}
.dl-blogger-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--border);
    margin: 0 auto 10px;
    overflow: hidden;
}
.dl-blogger-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dl-blogger-name { font-size: 16px; font-weight: 600; margin-bottom: 5px; color: var(--text-dark); }
.dl-blogger-desc { font-size: 12px; color: var(--text-light); margin-bottom: 12px; line-height: 1.5; }
.dl-blogger-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    border-top: 1px solid var(--border-row);
    padding-top: 12px;
}
.dl-blogger-stats .stat-item { text-align: center; }
.dl-blogger-stats .stat-num { display: block; font-size: 18px; font-weight: 700; color: var(--primary); }
.dl-blogger-stats .stat-label { font-size: 11px; color: var(--text-light); }

/* Site stats widget (Forum Lite style) */
.dl-site-stats .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 12px;
    color: var(--text-mid);
}
.dl-site-stats .stat-row span:last-child { font-weight: 600; color: var(--primary); }

/* Tag cloud */
.dl-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-tag-cloud a {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}
.dl-tag-cloud a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Calendar widget */
#calendar { overflow-x: auto; }
#calendar table.calendartop {
    width: 100%;
    margin-bottom: 5px;
}
#calendar table.calendartop td {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    padding: 4px 0;
}
#calendar table.calendartop a {
    color: var(--primary);
    text-decoration: none;
    padding: 0 6px;
    font-size: 14px;
}
#calendar table.calendartop a:hover { color: var(--accent); }
#calendar table.calendar {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 12px;
}
#calendar table.calendar td {
    padding: 5px 2px;
    color: var(--text-mid);
    border: 1px solid var(--border-row);
}
#calendar table.calendar td.week {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
    font-size: 11px;
}
#calendar table.calendar td.sun {
    background: var(--primary-bg);
    color: var(--accent);
    font-weight: 600;
    font-size: 11px;
}
#calendar table.calendar td.day {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    border-radius: 2px;
}
#calendar table.calendar td.day a { color: #fff; }
#calendar table.calendar td.day2 { font-weight: 600; }
#calendar table.calendar td.day2 a { color: var(--primary); font-weight: 600; }
#calendar table.calendar td a { text-decoration: none; }

/* === Pagination (Forum Lite Style) === */
.dl-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 15px;
    font-size: 13px;
}
.dl-pagination a,
.dl-pagination span {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-mid);
    background: var(--bg-white);
    transition: all 0.2s;
}
.dl-pagination a:hover { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-lighter); }
.dl-pagination span.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 600;
}

/* === Footer === */
.dl-footer {
    background: var(--bg-white);
    border-top: 2px solid var(--primary);
    border-radius: var(--radius) var(--radius) 12px 12px;
    margin: 15px 0 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    overflow: hidden;
}
.dl-footer-links {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}
.dl-footer-links dt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.dl-footer-links dt strong { font-size: 14px; color: var(--text-dark); }
.dl-footer-links dt span { font-size: 12px; }
.dl-footer-links dd ul { display: flex; flex-wrap: wrap; gap: 10px; }
.dl-footer-links dd ul li a {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-bg);
    border: 1px solid var(--border-light);
    border-radius: 3px;
    font-size: 12px;
    color: var(--text-mid);
    transition: all 0.2s;
}
.dl-footer-links dd ul li a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.dl-footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.8;
}
.dl-footer-bottom a { color: var(--text-mid); text-decoration: none; transition: color 0.2s; }
.dl-footer-bottom a:hover { color: var(--primary); }

/* 页脚导航 */
.dl-footer-nav { margin-bottom: 8px; }
.dl-footer-nav a { color: var(--text-mid); margin: 0 4px; font-size: 13px; }
.dl-footer-nav a:hover { color: var(--primary); }
.dl-footer-sep { color: var(--border); margin: 0 2px; font-size: 12px; }

/* 版权 */
.dl-footer-copyright { color: #666; margin-bottom: 6px; font-size: 13px; }

/* 备案 */
.dl-footer-beian { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; font-size: 12px; }
.dl-footer-beian a { display: inline-flex; align-items: center; gap: 4px; color: #666; }
.dl-footer-beian a:hover { color: var(--primary); }

/* 页脚底部过渡条 */
.dl-footer-bottom-bar {
    height: 8px;
    background: linear-gradient(to right,
        var(--bg-body) 0%,
        var(--primary) 25%,
        var(--primary) 75%,
        var(--bg-body) 100%);
    opacity: 0.45;
    margin-top: 10px;
}

/* 页면 底部留白，让页脚圆角可见 */
.dl-page-bottom-pad {
    height: 20px;
    background: var(--bg-body);
    flex-shrink: 0;
}

/* 评论区验证码 */
.dl-comment-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0 4px;
    border-top: 1px dashed var(--border);
    margin-top: 6px;
}
.dl-captcha-label { font-size: 13px; color: var(--text-mid); flex-shrink: 0; }
.dl-captcha-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dl-captcha-wrap img.captcha {
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--border);
    height: 34px;
    vertical-align: middle;
    transition: opacity .2s;
}
.dl-captcha-wrap img.captcha:hover { opacity: 0.8; }
.dl-captcha-wrap input.captcha_input {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    outline: none;
    width: 100px;
    transition: border .2s, box-shadow .2s;
    background: var(--bg-light);
    color: var(--text-dark);
}
.dl-captcha-wrap input.captcha_input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
    background: #fff;
}
.dl-captcha-tip { font-size: 12px; color: var(--text-light); }

/* 一言 */
.dl-footer-hitokoto {
    text-align: center;
    padding: 10px 0 4px;
    font-size: 13px;
    color: var(--text-mid);
    border-top: 1px dashed var(--border-light);
    margin-top: 6px;
}
.dl-hitokoto-text { font-style: italic; }
.dl-hitokoto-from { color: var(--text-light); font-size: 12px; margin-left: 6px; }

/* 网站运行时间（内嵌版） */
.dl-footer-runtime {
    text-align: center;
    padding: 4px 0 8px;
}

.dl-beian-icon { height: 14px !important; width: 14px !important; max-height: 14px; vertical-align: middle; display: inline-block; object-fit: contain; }

/* === 404 === */
.dl-404 {
    text-align: center;
    padding: 80px 20px;
}
.dl-404 h1 { font-size: 72px; color: var(--primary-lighter); margin-bottom: 10px; }
.dl-404 p { font-size: 16px; color: var(--text-mid); margin-bottom: 20px; }

/* === Page Template === */
.dl-page { padding: 25px; }
.dl-page h2 { font-size: 22px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.dl-page .page-body { line-height: 1.9; font-size: 15px; }

/* === Back to Top === */
.dl-backtop {
    position: fixed;
    right: 20px;
    bottom: 30px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 999;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    user-select: none;
}
.dl-backtop.visible { opacity: 1; visibility: visible; }
.dl-backtop:hover { background: var(--primary-light); transform: translateY(-3px); }

/* === Forum Stats Bar === */
.dl-forum-stats {
    display: flex;
    gap: 2px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.dl-forum-stats .fs-item {
    flex: 1;
    background: var(--bg-white);
    text-align: center;
    padding: 12px 8px;
}
.dl-forum-stats .fs-num {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}
.dl-forum-stats .fs-label {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

/* === AI Tech Status Bar === */
.dl-techbar {
    position: relative;
    margin-bottom: var(--gap);
    background: var(--panel-grad);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(var(--primary-rgb),0.25);
    box-shadow: 0 2px 12px rgba(var(--primary-rgb),0.15), inset 0 1px 0 rgba(var(--primary-rgb),0.1);
}
.dl-techbar::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb),0.03), transparent);
    animation: tbScanline 4s linear infinite;
}
@keyframes tbScanline {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}
.tb-grid {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}
.tb-cell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    position: relative;
}
.tb-divider {
    width: 1px;
    height: 22px;
    background: linear-gradient(180deg, transparent, rgba(var(--primary-rgb),0.4), transparent);
    flex-shrink: 0;
}
.tb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb),0.12);
    border: 1px solid rgba(var(--primary-rgb),0.25);
    color: var(--primary-light);
    flex-shrink: 0;
    animation: tbIconPulse 3s ease-in-out infinite;
}
@keyframes tbIconPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(var(--primary-rgb),0.2); }
    50% { box-shadow: 0 0 10px rgba(var(--primary-rgb),0.4); }
}
.tb-label {
    font-size: 11px;
    color: rgba(170, 200, 255, 0.7);
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.tb-value {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-light);
    min-width: 28px;
    text-align: right;
    text-shadow: 0 0 8px rgba(var(--primary-rgb),0.5);
    transition: color 0.3s;
}
.tb-unit {
    font-size: 10px;
    color: rgba(170, 200, 255, 0.5);
    margin-left: -2px;
}
.tb-bar {
    width: 40px; height: 3px;
    background: rgba(var(--primary-rgb),0.12);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}
.tb-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-light));
    border-radius: 2px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 6px rgba(var(--primary-rgb),0.5);
    width: 0%;
}
.tb-particles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Tech bar responsive */
/* Mobile: short labels visible, long labels hidden, progress bar hidden, single tight row */
.tb-label-s { display: none; }
@media (max-width: 768px) {
    .tb-cell { padding: 7px 4px; gap: 4px; }
    .tb-icon { width: 20px; height: 20px; }
    .tb-icon svg { width: 12px; height: 12px; }
    .tb-label { display: none; }
    .tb-label-s { display: inline; font-size: 11px; color: rgba(170,200,255,0.7); white-space: nowrap; }
    .tb-value { font-size: 15px; min-width: 20px; }
    .tb-bar { display: none; }
    .tb-unit { font-size: 9px; }
}
@media (max-width: 480px) {
    .tb-cell { padding: 6px 2px; gap: 3px; }
    .tb-icon { width: 18px; height: 18px; }
    .tb-icon svg { width: 11px; height: 11px; }
    .tb-label-s { font-size: 10px; }
    .tb-value { font-size: 14px; min-width: 18px; }
    .tb-unit { font-size: 8px; }
    .tb-divider { height: 18px; }
}

/* Dark mode tech bar adjustments */
[data-theme="dark"] .dl-techbar {
    background: var(--panel-grad-deep);
    border-color: rgba(var(--primary-rgb),0.22);
}

/* === Tags === */
.tags {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 3px;
    font-size: 12px;
    margin: 2px;
    border: 1px solid var(--border-light);
}
.tags:hover { background: var(--primary); color: #fff; }

/* === Global Overflow Prevention === */
html {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overflow-y: scroll;       /* 新增：始终预留纵向滚动条位置 */
    scrollbar-gutter: stable; /* 新增：现代浏览器写法，双保险 */
}
body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* === Mobile Announcement CSS Animation === */
@keyframes dl-marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

/* === Responsive === */
@media (max-width: 960px) {
    .dl-main { flex-direction: column; }
    .dl-sidebar { width: 100%; order: 1; }
    .dl-sidebar-left { order: 1; }
    .dl-content { order: 0; min-width: 0; width: 100%; }
    .dl-nav-card { width: 16.66%; }
    .dl-nav-item-card { width: 33.33%; }
}

@media (max-width: 768px) {
    /* === 容器溢出保护 === */
    .dl-wrap {
        max-width: 100%;
        padding: 0 10px;
        overflow: hidden;
    }
    .dl-main {
        flex-direction: column;
        width: 100%;
        min-width: 0;
    }
    .dl-content {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        flex: none;
    }
    .dl-sidebar {
        width: 100% !important;
        max-width: 100%;
        min-width: 0;
        order: 1;
    }
    .dl-box {
        max-width: 100%;
        overflow: hidden;
    }

    /* === 移动端隐藏侧边栏 === */
    .dl-sidebar.dl-mobile-hide { display: none !important; }

    /* === 头部 === */
    .dl-header-top { height: 50px; }
    .dl-logo a { font-size: 18px; }
    .dl-header-info { display: none; }
    .dl-menu-toggle { display: block; }
    .dl-nav { display: none; }
    .dl-nav.open { display: block; }
    .dl-nav-list { flex-direction: column; height: auto; }
    .dl-nav-item > a,
    .dl-nav-item > span { height: auto; padding: 10px 18px; }
    .dl-nav-item .dl-dropdown {
        position: static;
        box-shadow: none;
        border: none;
        background: rgba(255,255,255,0.05);
    }

    /* === 公告栏 - CSS动画滚动 === */
    .dl-announcement { max-width: 100%; overflow: hidden; }
    .dl-anno-content { overflow: hidden; }
    .dl-anno-track {
        visibility: visible !important;
        animation: dl-marquee 20s linear infinite;
    }

    /* === 轮播图 === */
    .dl-slideshow { max-width: 100%; }
    .dl-slide img { height: 180px; width: 100%; }

    /* === 论坛统计条 === */
    .dl-forum-stats {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
    }
    .dl-forum-stats .fs-item {
        flex: 1 1 0%;
        min-width: 0;
        padding: 10px 4px;
    }
    .dl-forum-stats .fs-num { font-size: 16px; }
    .dl-forum-stats .fs-label { font-size: 10px; }

    /* === 网址导航首页 - 每行3个，最多2行 === */
    .dl-nav-block .dl-box-body { padding: 10px 5px 5px; overflow: hidden; }
    .dl-nav-grid { width: 100%; }
    .dl-nav-card {
        width: 33.33%;
        padding: 8px 4px;
    }
    .dl-nav-icon {
        width: 40px;
        height: 40px;
        line-height: 40px;
    }
    /* 隐藏第7个及之后的导航项（只显示2行×3个=6个） */
    .dl-nav-card:nth-child(n+7) { display: none; }

    /* === 网址导航列表页 === */
    .dl-nav-item-card { width: 50%; }
    .dl-nav-sub-bar { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
    .dl-nav-item-hover { display: none; }
    .dl-nav-mobile-go { display: block; }
    .dl-nav-item-info { padding-right: 25px; }
    .dl-nav-item-card-inner { height: 60px; }
    .dl-nav-item-main { padding: 8px; }
    .dl-nav-item-main img { width: 32px; height: 32px; margin-right: 8px; }
    .dl-nav-item-info h3 { font-size: 13px; }
    .dl-nav-item-info p { display: none; }
    .dl-nav-go-btn { padding: 10px 30px; font-size: 14px; }

    /* === CMS文章列表 === */
    .dl-cms-list li {
        max-width: 100%;
        overflow: hidden;
    }
    .dl-cms-list .cms-title {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* === 文章列表 === */
    .dl-article-item { flex-direction: column; }
    .dl-article-cover { width: 100%; height: 180px; }
    .dl-article-info h2 { font-size: 15px; }

    /* === 帖子列表 === */
    .dl-thread-item .t-nums,
    .dl-thread-item .t-lastpost,
    .dl-thread-header .th-nums,
    .dl-thread-header .th-lastpost { display: none; }
    .dl-thread-item .t-author { width: 90px; text-align: right; }
    .dl-thread-item .t-subject a {
        max-width: 100%;
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* === 帖子详情 === */
    .dl-post-item { flex-direction: column !important; }
    .dl-post-author {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border-light) !important;
        display: flex !important;
        align-items: center !important;
        text-align: left !important;
        padding: 10px 15px !important;
    }
    .dl-post-avatar { width: 40px !important; height: 40px !important; margin: 0 10px 0 0 !important; }
    .dl-post-name { margin-bottom: 0 !important; margin-right: 10px !important; }
    .dl-post-role { margin-bottom: 0 !important; }
    .dl-post-user-stats { display: none; }
    .dl-post-content {
        padding: 15px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .dl-post-content img { max-width: 100%; height: auto; }

    /* === 文章详情 === */
    .dl-article-detail { padding: 15px; }
    .dl-article-detail h1 { font-size: 20px; }
    .dl-article-body {
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .dl-article-body img { max-width: 100%; height: auto; }
    .dl-article-body pre,
    .dl-post-content pre { max-width: 100%; overflow: auto; }
    .dl-article-body table { max-width: 100%; overflow-x: auto; display: block; }
    .dl-code-wrapper { max-width: 100%; }

    /* === 评论 === */
    .dl-comment-children { margin-left: 15px; }
    .dl-comment-form .form-row { flex-direction: column; }
    .dl-comment-form .form-actions { flex-wrap: wrap; }

    /* === 相邻文章 === */
    .dl-neighbor { flex-direction: column; }
    .dl-neighbor-next { text-align: left; }

    /* === 分页 === */
    .dl-pagination { flex-wrap: wrap; justify-content: center; }
    .dl-pagination a,
    .dl-pagination span { padding: 4px 10px; font-size: 12px; }

    /* === 页脚 === */
    .dl-footer-links dd ul { gap: 6px; }
    .dl-footer-links dd ul li a { padding: 3px 8px; font-size: 11px; }
    .dl-footer-nav a { font-size: 12px; margin: 0 2px; }
    .dl-footer-sep { margin: 0 1px; }
    .dl-footer-copyright { font-size: 12px; }
    .dl-footer-beian { flex-direction: column; gap: 6px; font-size: 11px; }
    .dl-police-hide-mobile { display: none !important; }
    .dl-friendlink-hide-mobile { display: none !important; }

    /* === 返回顶部 === */
    .dl-backtop { right: 12px; bottom: 20px; width: 36px; height: 36px; font-size: 16px; }
}

/* === 超小屏幕 (≤480px) === */
@media (max-width: 480px) {
    .dl-wrap { padding: 0 8px; }
    .dl-nav-card { width: 33.33%; }
    .dl-nav-icon { width: 36px; height: 36px; line-height: 36px; font-size: 18px; }
    .dl-nav-card span { font-size: 11px; }
    .dl-forum-stats .fs-num { font-size: 14px; }
    .dl-forum-stats .fs-label { font-size: 10px; }
    .dl-forum-stats .fs-item { padding: 8px 3px; }
    .dl-nav-item-card { width: 100%; }
    .dl-box-title { padding: 8px 12px; font-size: 13px; }
    .dl-box-body { padding: 10px 12px; }
    .dl-cms-list li { padding: 7px 12px; font-size: 12px; }
    .dl-slide img { height: 150px; }
    .dl-article-info h2 { font-size: 14px; }
    .dl-article-meta { font-size: 11px; gap: 8px; }
    .dl-article-excerpt { font-size: 12px; }
}

/* === 用户组内容截断样式 === */
.dl-content-fadeout {
    position: relative;
    height: 120px;
    margin-top: -120px;
    background: linear-gradient(rgba(255,255,255,0), var(--bg-card, #fff));
    pointer-events: none;
    z-index: 1;
}
[data-theme="dark"] .dl-content-fadeout,
.dark .dl-content-fadeout {
    background: linear-gradient(rgba(34,34,34,0), var(--bg-card, #222));
}
.dl-content-visible {
    overflow: hidden;
}
.dl-restricted-box {
    position: relative;
    z-index: 2;
}

/* ===== 快捷导航条 ===== */
.dl-quick-nav {
    display: flex;
    gap: 2px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: var(--gap);
}
.dl-qn-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--qn-bg, var(--bg-white));
    color: var(--qn-color, var(--primary));
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 8px;
    transition: filter .15s, opacity .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    line-height: 1.3;
}
.dl-qn-item:hover {
    opacity: .82;
    filter: brightness(.94);
}
.dl-qn-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式隐藏 */
@media (min-width: 769px) {
    .dl-qn-hide-pc { display: none !important; }
}
@media (max-width: 768px) {
    .dl-qn-hide-mobile { display: none !important; }
    .dl-qn-item { font-size: 12px; padding: 6px 4px; }
    .dl-qn-bar .dl-qn-item, .dl-qn-bar .fs-item { padding: 13px 4px !important; }
}
@media (max-width: 480px) {
    .dl-qn-item { font-size: 11px; padding: 6px 2px; gap: 3px; }
    .dl-qn-bar .dl-qn-item, .dl-qn-bar .fs-item { padding: 13px 2px !important; }
}

/* ===== 快捷导航条 ===== */
/* 复用 dl-forum-stats 外壳，覆盖 fs-item 为链接，高度压到最小 */
.dl-qn-wrap { }
.dl-qn-bar .dl-qn-item,
.dl-qn-bar .fs-item {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 13px 8px !important;  /* 与移动端搜索框等高 ~40px */
    transition: background .15s, color .15s;
    text-align: center;
}
.dl-qn-bar .dl-qn-item:hover {
    background: var(--bg-light, var(--bg-light));
}
.dl-qn-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}
.dl-qn-item:hover .dl-qn-label {
    opacity: .75;
}

/* 响应式隐藏 */
@media (min-width: 769px) {
    .dl-qn-hide-pc { display: none !important; }
}
@media (max-width: 768px) {
    .dl-qn-hide-mobile { display: none !important; }
    .dl-qn-bar .dl-qn-item, .dl-qn-bar .fs-item {
        padding: 0 4px !important;
        min-height: 42px;
        height: 42px;
        box-sizing: border-box;
    }
    .dl-qn-label { font-size: 12px; }
}
@media (max-width: 480px) {
    .dl-qn-bar .dl-qn-item, .dl-qn-bar .fs-item {
        padding: 0 2px !important;
        min-height: 42px;
        height: 42px;
        box-sizing: border-box;
    }
    .dl-qn-label { font-size: 11px; }
}

/* ===== 底部导航条（三列多行，与快捷导航条同款外观） ===== */
.dl-bn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.dl-bn-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    text-decoration: none;
    padding: 13px 8px;
    min-width: 0;
    text-align: center;
    transition: background .15s, color .15s;
}
.dl-bn-item:hover {
    background: var(--bg-light, var(--bg-light));
}
.dl-bn-empty {
    cursor: default;
    pointer-events: none;
}
.dl-bn-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}
.dl-bn-item:hover .dl-bn-label {
    opacity: .75;
}
@media (max-width: 768px) {
    .dl-bn-item {
        padding: 0 4px;
        min-height: 42px;
        height: 42px;
        box-sizing: border-box;
    }
    .dl-bn-label { font-size: 12px; }
}
@media (max-width: 480px) {
    .dl-bn-item {
        padding: 0 2px;
        min-height: 42px;
        height: 42px;
        box-sizing: border-box;
    }
    .dl-bn-label { font-size: 11px; }
}

/* ===== 导航条 · 卡片形态（与在线工具箱卡片同款语言） ===== */
.dl-navbar-wrap .dl-nc-body { padding: 15px; }
/* 没有标题栏时不套白框，内边距必须为 0，卡片左右才能和其他栏目对齐（含移动端） */
.dl-navbar-wrap.dl-nc-bare .dl-nc-body { padding: 0; }
.dl-navcard-grid {
    display: grid;
    grid-template-columns: repeat(var(--dl-nc-cols, 3), minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}
.dl-navcard {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.dl-navcard:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), .13);
    border-color: rgba(var(--primary-rgb), .35);
    background: var(--card-hover);
}
.dl-nc-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), .12), rgba(var(--primary-rgb), .04));
    border: 1px solid rgba(var(--primary-rgb), .14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    overflow: hidden;
}
.dl-nc-icon img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
}
.dl-nc-letter {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}
.dl-nc-main { flex: 1; min-width: 0; }
.dl-nc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.dl-nc-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.35;
}
.dl-navcard:hover .dl-nc-title { color: var(--primary); }
.dl-nc-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #fff;
    background: var(--primary);
    padding: 1px 6px;
    border-radius: 3px;
    white-space: nowrap;
}
.dl-nc-desc {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dl-nc-action {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
}
/* 带标题栏时，简约条要留出内边距 */
.dl-bn-inbox { padding: 12px 15px; }

/* 暗夜模式微调：深色底上低透明度的色块几乎看不见，把图标底和阴影加重一点 */
[data-theme="dark"] .dl-nc-icon {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), .24), rgba(var(--primary-rgb), .09));
    border-color: rgba(var(--primary-rgb), .30);
}
[data-theme="dark"] .dl-navcard:hover {
    box-shadow: 0 8px 26px rgba(0, 0, 0, .55);
    border-color: rgba(var(--primary-rgb), .45);
}
[data-theme="dark"] .dl-nc-badge { color: #0d1017; }

/* ── 平板：统一两列 ── */
@media (max-width: 768px) {
    .dl-navbar-wrap .dl-nc-body { padding: 12px; }
    .dl-navcard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .dl-navcard { padding: 14px 12px; gap: 10px; }
    .dl-nc-icon { width: 44px; height: 44px; border-radius: 12px; font-size: 22px; }
    .dl-nc-icon img { width: 28px; height: 28px; }
    .dl-nc-title { font-size: 14px; }
}

/* ── 手机：按后台选的排法 ── */
@media (max-width: 560px) {
    .dl-navcard:hover { transform: none; box-shadow: none; }

    /* 排法一：两列小卡片，图标在左、标题描述在右 */
    .dl-navcard-grid.dl-nc-m2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .dl-nc-m2 .dl-navcard { align-items: center; gap: 9px; padding: 10px; }
    .dl-nc-m2 .dl-nc-icon { width: 36px; height: 36px; border-radius: 10px; font-size: 19px; }
    .dl-nc-m2 .dl-nc-icon img { width: 23px; height: 23px; }
    .dl-nc-m2 .dl-nc-head { margin-bottom: 2px; gap: 4px; }
    .dl-nc-m2 .dl-nc-title { font-size: 13px; line-height: 1.3; }
    .dl-nc-m2 .dl-nc-badge { font-size: 9px; padding: 0 4px; }
    .dl-nc-m2 .dl-nc-desc { font-size: 11px; margin: 0; line-height: 1.4; -webkit-line-clamp: 2; }
    .dl-nc-m2 .dl-nc-action { display: none; }

    /* 排法二：单列列表，图标在左、文字在右，右侧箭头 */
    .dl-navcard-grid.dl-nc-m1 { grid-template-columns: 1fr; gap: 8px; }
    .dl-nc-m1 .dl-navcard { align-items: center; gap: 11px; padding: 11px 12px; position: relative; }
    .dl-nc-m1 .dl-nc-icon { width: 40px; height: 40px; border-radius: 11px; font-size: 21px; }
    .dl-nc-m1 .dl-nc-icon img { width: 26px; height: 26px; }
    .dl-nc-m1 .dl-nc-main { padding-right: 14px; }
    .dl-nc-m1 .dl-nc-head { margin-bottom: 2px; }
    .dl-nc-m1 .dl-nc-title { font-size: 14px; }
    .dl-nc-m1 .dl-nc-desc { font-size: 12px; margin: 0; -webkit-line-clamp: 1; }
    .dl-nc-m1 .dl-nc-action { display: none; }
    .dl-nc-m1 .dl-navcard::after {
        content: '›';
        position: absolute;
        right: 11px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 19px;
        line-height: 1;
        color: var(--text-light);
    }
}

/* ==================== 🌟 悬浮联系栏（返回顶部+联系方式） ==================== */
.dl-contact-float {
    position: fixed;
    right: 20px;
    bottom: 28px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .3s, visibility .3s, transform .3s;
    pointer-events: none;
}
.dl-contact-float.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.dl-contact-float .ctf-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
    transition: all .22s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    text-decoration: none;
}
.dl-contact-float .ctf-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
}
.dl-contact-float .ctf-btn-top {
    background: var(--primary, var(--primary));
    color: #fff;
}
.dl-contact-float .ctf-btn-top:hover {
    background: var(--primary-light, var(--primary));
}
.dl-contact-float .ctf-btn.active {
    background: var(--primary, var(--primary));
    color: #fff;
}

/* 气泡弹层基础样式 */
.dl-contact-float .ctf-popup {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) scale(.92);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
    padding: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s, transform .2s;
    pointer-events: none;
    white-space: nowrap;
    transform-origin: right center;
}
.dl-contact-float .ctf-popup::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #fff;
}
.dl-contact-float .ctf-btn.active .ctf-popup,
.dl-contact-float .ctf-btn:hover .ctf-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
    pointer-events: auto;
}

/* 微信二维码气泡 */
.dl-contact-float .ctf-popup-wechat {
    text-align: center;
    padding: 16px 18px 12px;
}
.dl-contact-float .ctf-popup-title {
    font-size: 13px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}
.dl-contact-float .ctf-popup-wechat img {
    display: block;
    width: 150px;
    height: auto;
    border-radius: 6px;
    object-fit: contain;
}
.dl-contact-float .ctf-popup-hint {
    font-size: 11px;
    color: #999;
    margin-top: 8px;
}

/* 复制型气泡（邮箱 / QQ） */
.dl-contact-float .ctf-popup-email,
.dl-contact-float .ctf-popup-qq {
    padding: 10px 12px;
}
.dl-contact-float .ctf-copy-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.dl-contact-float .ctf-copy-input {
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 13px;
    color: #333;
    background: var(--bg-light);
    outline: none;
    min-width: 180px;
    font-family: inherit;
}
.dl-contact-float .ctf-copy-btn {
    border: none;
    background: var(--primary, var(--primary));
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background .2s;
}
.dl-contact-float .ctf-copy-btn:hover {
    background: var(--primary-light, var(--primary));
}
.dl-contact-float .ctf-copy-btn.copied {
    background: #2e7d32;
}

/* 显示控制 */
@media (min-width: 769px) {
    .dl-contact-float.ctf-hide-pc { display: none !important; }
}
@media (max-width: 768px) {
    .dl-contact-float.ctf-hide-mobile { display: none !important; }
    .dl-contact-float {
        right: 12px;
        bottom: 18px;
        gap: 6px;
    }
    .dl-contact-float .ctf-btn {
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }
    .dl-contact-float .ctf-popup-wechat img {
        width: 130px;
        height: auto;
    }
    .dl-contact-float .ctf-copy-input {
        min-width: 140px;
        font-size: 12px;
    }
}

/* 哀悼模式兼容 */
html.dl-mourning .dl-contact-float,
html.dl-mourning .dl-contact-float .ctf-popup {
    filter: grayscale(1);
}

/* ==================== 🔗 友链 logo 样式 ==================== */
/* footer 友链 */
#dl-footer-fl-list li a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
#dl-footer-fl-list .dl-fl-logo {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
    vertical-align: middle;
}

/* 侧边栏 widget 友链 */
.dl-widget-link-list li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.dl-widget-link-list .dl-widget-link-logo {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    #dl-footer-fl-list .dl-fl-logo {
        width: 14px;
        height: 14px;
    }
}

/* ============== 明暗切换按钮（前端，精致版）============== */
.dl-theme-toggle{
    width:34px; height:34px; border-radius:50%;
    border:1px solid rgba(140,140,160,.30);
    background:rgba(140,140,160,.14);
    cursor:pointer; display:inline-flex; align-items:center; justify-content:center;
    font-size:15px; line-height:1; padding:0; flex-shrink:0;
    transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
    -webkit-tap-highlight-color:transparent;
}
.dl-theme-toggle:hover{
    border-color:var(--primary);
    background:var(--primary-bg);
    transform:translateY(-1px) rotate(-12deg);
    box-shadow:0 3px 12px rgba(var(--primary-rgb),.30);
}
.dl-theme-toggle:active{ transform:scale(.92); }
.dl-theme-toggle .tt-sun{ display:none; }
.dl-theme-toggle .tt-moon{ display:inline; }
[data-theme="dark"] .dl-theme-toggle .tt-sun{ display:inline; }
[data-theme="dark"] .dl-theme-toggle .tt-moon{ display:none; }
/* 手机专用切换按钮：桌面隐藏；手机端显示在汉堡菜单左边 */
.dl-theme-toggle-mobile{ display:none; }
@media (max-width:768px){
    .dl-user-area .dl-theme-toggle{ display:none !important; }  /* PC那个在手机菜单里，隐藏避免重复 */
    /* ★ 由 logo 顶开剩余空间，右侧控件永远贴右。
       原来是靠 .dl-theme-toggle-mobile 的 margin-left:auto 把整组顶过去，
       一旦后台关掉「明暗切换按钮」，这个元素不渲染，auto 就没了，
       汉堡菜单只剩 margin-left:10px，于是紧贴 logo 跑到中间去。 */
    .dl-header-top .dl-logo{ margin-right:auto !important; min-width:0; }
    .dl-theme-toggle-mobile{ display:inline-flex !important; width:20px; height:20px; font-size:11px; margin-left:0; align-self:center; flex:0 0 auto; }
    .dl-menu-toggle{ margin-left:10px !important; flex:0 0 auto; }
}

/* ============== 手机下拉菜单：项间分隔线 + 模式跟随 ============== */
@media (max-width:768px){
    /* 间隔纹理 = 菜单项之间的分隔线（自适应明暗，任何底色都可见） */
    .dl-nav.open .dl-nav-list .dl-nav-item{ border-bottom:1px solid rgba(140,140,165,.32); }
    .dl-nav.open .dl-nav-list .dl-nav-item:last-child{ border-bottom:none; }

    /* 纯色模式：下拉跟随顶栏紫 + 白字 + 白分隔线 */
    .dl-header.dl-header-solid .dl-nav.open{ background:var(--primary) !important; }
    .dl-header.dl-header-solid .dl-nav .dl-nav-list .dl-nav-item > a,
    .dl-header.dl-header-solid .dl-nav .dl-nav-list .dl-nav-item > span{ color:#fff !important; }
    .dl-header.dl-header-solid .dl-nav.open .dl-nav-list .dl-nav-item{ border-bottom-color:rgba(255,255,255,.30); }
    .dl-header.dl-header-solid .dl-nav .dl-nav-list .dl-nav-item > a:hover,
    .dl-header.dl-header-solid .dl-nav .dl-nav-list .dl-nav-item.active > a{ background:rgba(255,255,255,.16) !important; color:#fff !important; }

    /* 分层模式：下拉跟随主题（浅底/深底），每项做成卡片，白底不再光秃 */
    .dl-header.dl-header-split .dl-nav.open{ background:var(--bg-white) !important; padding:6px 8px; }
    .dl-header.dl-header-split .dl-nav .dl-nav-list .dl-nav-item{ border-bottom:none !important; padding:4px; }
    .dl-header.dl-header-split .dl-nav .dl-nav-list .dl-nav-item > a,
    .dl-header.dl-header-split .dl-nav .dl-nav-list .dl-nav-item > span{
        color:var(--text-dark) !important;
        background:var(--bg-light) !important;
        border:1px solid var(--border) !important;
        border-radius:10px !important;
        text-align:center;
        box-shadow:0 1px 3px rgba(30,30,60,.05) !important;
    }
    /* 白天卡片：底色更灰一档、边框更清晰，复刻暗夜的立体格子感（跟随主色调） */
    html:not([data-theme="dark"]) .dl-header.dl-header-split .dl-nav .dl-nav-list .dl-nav-item > a,
    html:not([data-theme="dark"]) .dl-header.dl-header-split .dl-nav .dl-nav-list .dl-nav-item > span{
        background:var(--primary-bg) !important;
        border-color:var(--border) !important;
        box-shadow:0 1px 3px rgba(var(--primary-rgb),.10), inset 0 1px 0 rgba(255,255,255,.6) !important;
    }
    .dl-header.dl-header-split .dl-nav .dl-nav-list .dl-nav-item > a:hover,
    .dl-header.dl-header-split .dl-nav .dl-nav-list .dl-nav-item.active > a{
        background:var(--primary-bg) !important; color:var(--primary) !important; border-color:var(--primary) !important;
    }
    /* 上下留白对齐：面板顶部 padding 6px + 格子 padding 4px = 首行宫格离顶部线 10px。
       末行宫格下面只剩格子的 4px，所以给登录/用户区补 6px，让两头等高。 */
    .dl-header.dl-header-split .dl-nav.open .dl-user-area{ margin-top:6px !important; }
}

/* ==========================================================================
   沉浸式阅读环境（文章页 <html class="dl-reading">）
   目标：去掉一切与阅读无关的动态干扰，让视线只落在正文上
   ========================================================================== */

/* 1. 文章页彻底关闭背景星云（双保险：即使脚本被缓存也不显示） */
.dl-reading #dl-nebula { display: none !important; }

/* 2. 关闭页面上残留的装饰性动画（呼吸光晕、浮动、旋转等） */
.dl-reading .dl-hero::before,
.dl-reading .dl-hero::after,
.dl-reading [class*="float"],
.dl-reading [class*="pulse"],
.dl-reading [class*="glow"]::before,
.dl-reading [class*="glow"]::after {
    animation: none !important;
}

/* 3. 阅读时降低非正文区域的存在感，鼠标移上去再恢复 */
.dl-reading .dl-sidebar,
.dl-reading .dl-footer-links {
    opacity: .72;
    transition: opacity .3s ease;
}
.dl-reading .dl-sidebar:hover,
.dl-reading .dl-footer-links:hover { opacity: 1; }

/* 4. 正文排版优化：更宽松的行距与字距，长文久读不累 */
.dl-reading .dl-article-content,
.dl-reading .dl-post-content {
    line-height: 2.05;
    letter-spacing: .01em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
.dl-reading .dl-article-content p,
.dl-reading .dl-post-content p { margin-bottom: 1.5em; }

/* 5. 读者可调的正文变量（由阅读工具条写入，存 localStorage） */
.dl-article-body.markdown {
    font-size: calc(var(--dl-read-font, 1) * 1em);
    line-height: var(--dl-read-lh, 2.05);
}

/* 6. 段落焦点模式：鼠标所在段落清晰，其余淡出 */
.dl-read-focus .dl-article-body.markdown > p,
.dl-read-focus .dl-article-body.markdown > blockquote,
.dl-read-focus .dl-article-body.markdown > ul,
.dl-read-focus .dl-article-body.markdown > ol {
    opacity: .38; transition: opacity .3s ease;
}
.dl-read-focus .dl-article-body.markdown > p.dl-focus-on,
.dl-read-focus .dl-article-body.markdown > blockquote.dl-focus-on,
.dl-read-focus .dl-article-body.markdown > ul.dl-focus-on,
.dl-read-focus .dl-article-body.markdown > ol.dl-focus-on { opacity: 1; }
.dl-read-focus .dl-article-body.markdown > h1,
.dl-read-focus .dl-article-body.markdown > h2,
.dl-read-focus .dl-article-body.markdown > h3 { opacity: 1; }

/* 7. 阅读工具条 */
.dl-read-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:9px 14px;margin:0 0 18px;
    background:var(--bg-light,#f6f8fb);border:1px solid var(--border,#e3e8ef);border-radius:10px;
    font-size:12px;color:var(--text-light,#8a94a6)}
.dl-read-group{display:flex;align-items:center;gap:6px}
.dl-read-label{font-weight:600}
.dl-read-val{min-width:42px;text-align:center;font-weight:700;color:var(--text-mid,#5a6474);font-variant-numeric:tabular-nums}
.dl-read-btn{height:26px;padding:0 9px;border-radius:7px;cursor:pointer;border:1px solid var(--border,#d7dce3);
    background:var(--bg-white,#fff);color:var(--text-mid,#5a6474);font-size:12px;font-weight:700;line-height:24px;transition:all .15s}
.dl-read-btn:hover{border-color:var(--primary,#5b7cfa);color:var(--primary,#5b7cfa)}
.dl-read-toggle.on{background:var(--primary,#5b7cfa);border-color:var(--primary,#5b7cfa);color:#fff}
@media (max-width:640px){.dl-read-bar{gap:10px;padding:8px 10px}.dl-read-label{display:none}}

/* 6. 尊重系统「减少动态效果」偏好 —— 无障碍与晕动症友好 */
@media (prefers-reduced-motion: reduce) {
    #dl-nebula { display: none !important; }
    * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* ==========================================================================
   墨水屏阅读模式（.dl-eink）—— 低对比、暖色、去饱和、无阴影
   ========================================================================== */
html.dl-eink, .dl-eink {
    --bg-body:#f2efe6; --bg-white:#f7f4ec; --bg-light:#ede9df;
    --border:#ddd7c8; --border-light:#e6e1d5; --border-row:#e6e1d5;
    --text-dark:#2f2b26; --text-read:#33302a; --text-mid:#5c564d; --text-light:#8d867a;
    --primary:#6b6459; --primary-light:#877f72; --primary-bg:#e6e1d5; --accent:#7a6a52;
    --text-link:#4a5c6b; --text-link-hover:#2f3d49; --shadow:none;
    --header-gradient:linear-gradient(180deg,#6f6759 0%,#625b4f 100%);
    --code-bg:#e9e4d8; --code-text:#3a352d; --code-scroll:#c9c2b2;
    --qn-bg:#e6e1d5; --qn-color:#4a453c;
}
html[data-theme="dark"].dl-eink, html.dl-eink[data-theme="dark"] {
    --bg-body:#161513; --bg-white:#1c1b18; --bg-light:#221f1b;
    --border:#322e28; --border-light:#2a2721; --border-row:#2a2721;
    --text-dark:#cdc7ba; --text-read:#c6c0b3; --text-mid:#a49d90; --text-light:#7b7568;
    --primary:#9a9184; --primary-light:#b0a89a; --primary-bg:#2a2721; --accent:#a2937a;
    --text-link:#93a6b5; --text-link-hover:#b8c8d4; --shadow:none;
    --header-gradient:linear-gradient(180deg,#26231c 0%,#1e1b16 100%);
    --code-bg:#201d18; --code-text:#b9b3a6; --code-scroll:#3a352c;
    --qn-bg:#2a2721; --qn-color:#a49d90;
}
.dl-eink #dl-nebula{display:none !important}
.dl-eink *{box-shadow:none !important;text-shadow:none !important}
.dl-eink .dl-article-body.markdown img{filter:grayscale(.35) contrast(.92);transition:filter .3s ease}
.dl-eink .dl-article-body.markdown img:hover{filter:none}
.dl-eink .dl-article-body.markdown pre{filter:saturate(.35)}
.dl-eink [class*="hero"]{background-image:none !important}
/* 衬线字体（后台可选，默认关闭；刻意排除 Windows 的 SimSun） */
html.dl-eink-serif .dl-article-body.markdown{
    font-family:"Source Han Serif SC","Noto Serif CJK SC","Noto Serif SC","Songti SC","PingFang SC",Georgia,serif;
}
/* 外围去彩，避免"纸上贴荧光贴纸" */
.dl-eink .dl-sidebar,.dl-eink .dl-side-box,.dl-eink .dl-calendar,.dl-eink .dl-announcement{filter:saturate(.25)}
.dl-eink .dl-theme-switch,.dl-eink [class*="badge"],.dl-eink [class*="tag"]{filter:saturate(.3)}
.dl-eink .dl-article-body.markdown blockquote{border-left-color:var(--border) !important;background:var(--bg-light) !important}
.dl-eink ::selection{background:rgba(120,110,95,.28);color:inherit}
.dl-eink,.dl-eink body{transition:background-color .35s ease,color .35s ease}
html[data-theme="dark"].dl-eink img{filter:grayscale(.4) contrast(.9) brightness(.88)}

/* ============================================================
   版块维护中（快捷 / 中部 / 底部导航条通用）
   设计要点：把所有"可点击"的视觉暗示全部撤掉——不上浮、不变色、
   不加阴影、图标去色，再叠一层极淡斜纹，让它跟正常卡片一眼就能分开。
   颜色全部走 palette 变量，亮色暗色自动跟随。
   ============================================================ */

/* ── 卡片模式 ── */
.dl-navcard.dl-nc-maint {
    position: relative;
    background: var(--bg-light);
    border-style: dashed;
    border-color: var(--border);
    cursor: not-allowed;
}
/* 极淡斜纹：只做质感区分，不干扰文字可读性 */
.dl-navcard.dl-nc-maint::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: repeating-linear-gradient(45deg,
        transparent, transparent 9px,
        rgba(var(--primary-rgb), .035) 9px,
        rgba(var(--primary-rgb), .035) 18px);
}
/* 撤掉全部悬停反馈——这是"不高亮"的核心 */
.dl-navcard.dl-nc-maint:hover {
    transform: none;
    box-shadow: none;
    background: var(--bg-light);
    border-color: var(--border);
}
.dl-navcard.dl-nc-maint:hover .dl-nc-title { color: var(--text-light); }

.dl-navcard.dl-nc-maint .dl-nc-icon {
    filter: grayscale(1);
    opacity: .55;
    background: linear-gradient(135deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .02));
    border-color: var(--border);
}
.dl-navcard.dl-nc-maint .dl-nc-title  { color: var(--text-light); }
.dl-navcard.dl-nc-maint .dl-nc-desc   { opacity: .62; }
.dl-navcard.dl-nc-maint .dl-nc-badge  { background: var(--text-light); }
.dl-navcard.dl-nc-maint .dl-nc-letter { color: var(--text-light); }

/* 按钮文字换成维护色，是整张卡里唯一还有颜色的元素，视线自然落上去 */
.dl-navcard.dl-nc-maint .dl-nc-action {
    color: var(--warn);
    font-weight: 600;
}
.dl-nc-mico { font-size: 11px; margin-right: 1px; }

/* 后台选了「仍可点击」时把手型还回来，但依旧不做高亮 */
.dl-navcard.dl-nc-maint.dl-nc-maint-link { cursor: pointer; }

/* ── 简约条模式 ── */
.dl-bn-item.dl-bn-maint {
    background: var(--bg-light);
    cursor: not-allowed;
    flex-direction: column;
    gap: 2px;
}
.dl-bn-item.dl-bn-maint:hover { background: var(--bg-light); }
.dl-bn-item.dl-bn-maint .dl-bn-label {
    color: var(--text-light);
    font-weight: 500;
}
.dl-bn-item.dl-bn-maint:hover .dl-bn-label { opacity: 1; }
.dl-bn-mtag {
    font-size: 10px;
    line-height: 1;
    color: var(--warn);
    font-weight: 600;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .dl-bn-mtag { font-size: 9px; }
}

/* 2026-09-22 手机端：网站名下方的分割线太硬（1px 蓝灰边线 + 24px 深色阴影压在浅色页面上成了一道灰带）
   改成极淡的发丝线 + 往下渐隐的淡蓝投影，暗色模式单独一套 */
@media (max-width: 768px) {
    .dl-header {
        border-bottom: 1px solid rgba(var(--primary-rgb), 0.07);
        box-shadow: 0 12px 22px -20px rgba(var(--primary-rgb), 0.7);
    }
    [data-theme="dark"] .dl-header {
        border-bottom-color: rgba(255, 255, 255, 0.06);
        box-shadow: 0 12px 22px -18px rgba(0, 0, 0, 0.9);
    }
}
@media (max-width: 768px) {
    /* 分层头部 / 纯色头部在 header.php 里用 !important 写了边线颜色，这里提高优先级覆盖 */
    body .dl-header.dl-header { border-bottom-color: rgba(var(--primary-rgb), 0.07) !important; }
    [data-theme="dark"] body .dl-header.dl-header { border-bottom-color: rgba(255, 255, 255, 0.06) !important; }
}
