/* ============================================================
   UI2.0 · 内容社区版 —— 设计稿 liuwenbin-ui-kit.html 移植
   仅在 body.ui-v2 下生效；UI1.0 不加载本文件，输出逐字不变。
   只做布局重排与视觉换肤：不碰数据、链接、广告与 sitemap 逻辑。
   ============================================================ */

body.ui-v2 {
    --u2-bg: #f6f7f9;
    --u2-surface: #ffffff;
    --u2-surface-2: #fafafb;
    /* 品牌色跟随后台「网站主色调」：layout.html 在 :root 注入 --primary 系列，改一处全站生效 */
    --u2-brand: var(--primary, #ff2442);
    --u2-brand-hover: var(--primary-hover, #e51f3b);
    --u2-brand-soft: var(--primary-light, rgba(255,36,66,.12));
    --u2-brand-rgb: var(--bs-primary-rgb, 255,36,66);
    --u2-deep: #20365c;
    --u2-code: #121a2b;
    --u2-t1: #1a1a1a;
    --u2-t2: #6b6b76;
    --u2-t3: #9a9aa5;
    --u2-line: #ededf0;
    --u2-r-sm: 6px;
    --u2-r-card: 12px;
    --u2-r-pill: 999px;
    --u2-sh-card: 0 2px 12px rgba(20,20,40,.06);
    --u2-sh-pop: 0 8px 32px rgba(20,20,40,.12);
    --u2-ease: cubic-bezier(.2,.8,.2,1);
    background: var(--u2-bg);
    color: var(--u2-t1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
body.ui-v2 a { color: inherit; text-decoration: none; }
body.ui-v2 a:hover { color: var(--u2-brand); }

/* ---------- 通用骨架 ---------- */
body.ui-v2 .u2-frame { display: flex; min-height: 100vh; align-items: stretch; }
body.ui-v2 .u2-side {
    width: 216px; flex: 0 0 216px; align-self: flex-start;
    position: sticky; top: 0; height: 100vh; z-index: 1030;
    background: var(--u2-surface); border-right: 1px solid var(--u2-line);
    padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
}

/* 左上角：只显示网站设置里的 logo，不放站点文字 */
body.ui-v2 .u2-logo {
    display: flex; align-items: center; padding: 4px 8px 20px; min-height: 52px;
}
body.ui-v2 .u2-logo img {
    max-width: 184px; max-height: 44px; width: auto; height: auto; object-fit: contain;
}
body.ui-v2 .u2-logo .u2-logo-fallback {
    width: 34px; height: 34px; border-radius: 10px; flex: none;
    background: linear-gradient(145deg, #4f7df3, #2b5fe0); color: #fff;
    font: 800 15px "JetBrains Mono", monospace; display: grid; place-items: center; letter-spacing: -1px;
}

body.ui-v2 .u2-nav { display: flex; flex-direction: column; gap: 3px; }
body.ui-v2 .u2-nav > a,
body.ui-v2 .u2-nav-parent {
    display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px;
    border-radius: 9px; color: var(--u2-t2); font-size: 14px; position: relative;
    transition: background .16s var(--u2-ease), color .16s var(--u2-ease);
}
body.ui-v2 .u2-nav > a:hover,
body.ui-v2 .u2-nav-parent:hover { background: var(--u2-surface-2); color: var(--u2-t1); }
body.ui-v2 .u2-nav > a.on,
body.ui-v2 .u2-nav-parent.on { background: var(--u2-brand-soft); color: var(--u2-brand); font-weight: 600; }
body.ui-v2 .u2-nav > a.on::before,
body.ui-v2 .u2-nav-parent.on::before {
    content: ""; position: absolute; left: -14px; top: 10px; width: 3px; height: 22px;
    border-radius: 0 3px 3px 0; background: var(--u2-brand);
}
body.ui-v2 .u2-nav i { font-size: 16px; width: 19px; text-align: center; }
body.ui-v2 .u2-caret { margin-left: auto; font-size: 10px; opacity: .55; transition: transform .16s; }
body.ui-v2 .u2-nav-group.open .u2-caret { transform: rotate(180deg); }
body.ui-v2 .u2-submenu { display: none; flex-direction: column; gap: 1px; padding: 2px 0 4px 30px; }
body.ui-v2 .u2-submenu.open { display: flex; }
body.ui-v2 .u2-submenu a {
    display: block; height: 30px; line-height: 30px; padding: 0 9px; border-radius: 6px;
    color: var(--u2-t2); font-size: 12.5px;
}
body.ui-v2 .u2-submenu a:hover { background: var(--u2-surface-2); color: var(--u2-t1); }
body.ui-v2 .u2-submenu a.on { color: var(--u2-brand); background: var(--u2-brand-soft); font-weight: 600; }
body.ui-v2 .u2-nav-sep { height: 1px; background: var(--u2-line); margin: 9px 8px; }
body.ui-v2 .u2-side-foot { margin-top: auto; padding: 10px 12px 0; font-size: 10px; color: var(--u2-t3); }

/* ---------- 顶栏：搜索 + 汉堡菜单（参考小红书右上角面板） ---------- */
body.ui-v2 .u2-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
body.ui-v2 .u2-topbar {
    height: 60px; flex: none; position: sticky; top: 0; z-index: 1025;
    background: var(--u2-surface); border-bottom: 1px solid var(--u2-line);
    display: flex; align-items: center; gap: 12px; padding: 0 28px;
}
body.ui-v2 .u2-search {
    display: flex; align-items: center; gap: 9px; width: 360px; max-width: 52vw; height: 38px;
    background: var(--u2-surface-2); border: 1px solid var(--u2-line);
    border-radius: var(--u2-r-pill); padding: 0 14px; transition: .16s;
}
body.ui-v2 .u2-search:focus-within { border-color: var(--u2-brand); box-shadow: 0 0 0 2px rgba(var(--u2-brand-rgb),.08); background: #fff; }
body.ui-v2 .u2-search i { color: var(--u2-t3); font-size: 16px; }
body.ui-v2 .u2-search input {
    border: 0; background: transparent; outline: 0; font-size: 13px; flex: 1;
    color: var(--u2-t1); min-width: 0; font-family: inherit;
}
body.ui-v2 .u2-search input::placeholder { color: var(--u2-t3); }
body.ui-v2 .u2-search button {
    width: 24px; height: 24px; border-radius: 50%; border: 0; flex: none;
    background: var(--u2-brand); color: #fff; cursor: pointer; display: grid; place-items: center;
}
body.ui-v2 .u2-search button i { color: #fff; font-size: 12px; }
body.ui-v2 .u2-topbar-home {
    margin-left: auto; width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
    color: var(--u2-t2); font-size: 18px;
}
body.ui-v2 .u2-topbar-home:hover { background: var(--u2-brand-soft); color: var(--u2-brand); }

/* 汉堡按钮 + 下拉菜单 */
body.ui-v2 .u2-menu-wrap { position: relative; flex: none; }
body.ui-v2 .u2-menu-btn {
    width: 38px; height: 38px; border-radius: 9px; border: 0; background: transparent;
    color: var(--u2-t2); font-size: 19px; cursor: pointer; display: grid; place-items: center;
    transition: background .16s;
}
body.ui-v2 .u2-menu-btn:hover { background: var(--u2-surface-2); color: var(--u2-t1); }
body.ui-v2 .u2-menu-drop {
    display: none; position: absolute; top: 46px; right: 0; width: 240px; z-index: 1050;
    background: var(--u2-surface); border: 1px solid var(--u2-line); border-radius: 14px;
    box-shadow: var(--u2-sh-pop); padding: 8px 6px;
}
body.ui-v2 .u2-menu-drop.open { display: block; }
body.ui-v2 .u2-menu-drop a,
body.ui-v2 .u2-menu-drop .u2-menu-label {
    display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: 8px;
    font-size: 13px; color: var(--u2-t1);
}
body.ui-v2 .u2-menu-drop a:hover { background: var(--u2-brand-soft); color: var(--u2-brand); }
body.ui-v2 .u2-menu-drop .u2-menu-label { font-size: 11px; color: var(--u2-t3); cursor: default; padding-top: 8px; padding-bottom: 6px; }
body.ui-v2 .u2-menu-drop .u2-menu-sep { height: 1px; background: var(--u2-line); margin: 6px 10px; }
body.ui-v2 .u2-menu-drop a .u2-menu-arrow { margin-left: auto; color: var(--u2-t3); font-size: 12px; }
body.ui-v2 .u2-menu-drop a.on { color: var(--u2-brand); background: var(--u2-brand-soft); font-weight: 600; }

/* 小屏侧栏抽屉的遮罩 */
body.ui-v2 .u2-side-mask {
    display: none; position: fixed; inset: 0; background: rgba(16,19,27,.42); z-index: 1028;
}

/* ---------- 主内容区 ---------- */
body.ui-v2 .u2-content {
    flex: 1; display: grid; grid-template-columns: minmax(0,1fr) 288px;
    gap: 24px; padding: 22px 28px 0;
}
body.ui-v2 .u2-center { min-width: 0; }
body.ui-v2 .u2-right { width: 288px; }
body.ui-v2 .u2-foot {
    grid-column: 1 / -1; border-top: 1px solid var(--u2-line); margin-top: 6px; min-height: 44px;
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px;
    color: var(--u2-t3); font-size: 10.5px; padding: 12px 0 24px;
}

/* ---------- Banner（真实轮播列表）：图片铺满整个容器，不留白 ---------- */
body.ui-v2 .u2-banner { height: 200px; border-radius: var(--u2-r-card); position: relative; overflow: hidden; }
body.ui-v2 .u2-banner .carousel-inner,
body.ui-v2 .u2-banner .carousel-item { height: 200px; }
/* 真实 banner 图：铺满容器（cover），宽高都占满，不留空白条 */
body.ui-v2 .u2-banner .u2-bn-img { display: block; width: 100%; height: 200px; object-fit: cover; object-position: center; }
/* 无 banner 时的渐变占位 */
body.ui-v2 .u2-banner .u2-bn-slide {
    height: 200px; display: grid; place-items: center; text-align: center; color: #fff;
    background: linear-gradient(120deg, #1b2b49, #20365c 55%, #2b4470);
}
body.ui-v2 .u2-banner .u2-bn-grid {
    position: absolute; inset: 0; opacity: .16;
    background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 38px 38px;
}
body.ui-v2 .u2-banner .u2-bn-inner { position: relative; z-index: 2; }
body.ui-v2 .u2-banner h1 { font-size: 25px; font-weight: 600; letter-spacing: .5px; line-height: 1.45; margin: 0; }
body.ui-v2 .u2-banner p { font-size: 12.5px; color: #b9c8e2; margin: 9px 0 0; }
body.ui-v2 .u2-banner .u2-bn-btns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
body.ui-v2 .u2-banner .btn { height: 34px; padding: 0 18px; border-radius: var(--u2-r-sm); font-size: 12.5px; font-weight: 600; border: 0; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; flex: none; }
body.ui-v2 .u2-banner .btn-primary { background: var(--u2-brand); color: #fff; }
body.ui-v2 .u2-banner .btn-primary:hover { background: var(--u2-brand-hover); color: #fff; }
body.ui-v2 .u2-banner .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.28); }
body.ui-v2 .u2-banner .btn-ghost:hover { background: rgba(255,255,255,.2); color: #fff; }
body.ui-v2 .u2-banner .carousel-control-prev,
body.ui-v2 .u2-banner .carousel-control-next { width: 30px; height: 30px; top: 50%; transform: translateY(-50%); border-radius: 50%; background: rgba(255,255,255,.1); opacity: 1; }
body.ui-v2 .u2-banner .carousel-control-prev { left: 18px; }
body.ui-v2 .u2-banner .carousel-control-next { right: 18px; }
body.ui-v2 .u2-banner .carousel-control-prev:hover,
body.ui-v2 .u2-banner .carousel-control-next:hover { background: #fff; }
body.ui-v2 .u2-banner .carousel-control-prev-icon,
body.ui-v2 .u2-banner .carousel-control-next-icon { width: 12px; height: 12px; filter: brightness(0) invert(1); }
body.ui-v2 .u2-banner .carousel-control-prev:hover .carousel-control-prev-icon,
body.ui-v2 .u2-banner .carousel-control-next:hover .carousel-control-next-icon { filter: none; }
body.ui-v2 .u2-banner .carousel-indicators { bottom: 10px; margin: 0; gap: 6px; }
body.ui-v2 .u2-banner .carousel-indicators [data-bs-target] {
    width: 6px; height: 6px; border-radius: 50%; border: 0; background: rgba(255,255,255,.4); margin: 0; opacity: 1;
}
body.ui-v2 .u2-banner .carousel-indicators .active { width: 16px; border-radius: 3px; background: #fff; }
body.ui-v2 .u2-banner-empty {
    height: 194px; border-radius: var(--u2-r-card); display: grid; place-items: center; text-align: center; color: #fff;
    background: linear-gradient(120deg, #1b2b49, #20365c 55%, #2b4470);
}
body.ui-v2 .u2-banner-empty h1 { font-size: 25px; font-weight: 600; margin: 0; }
body.ui-v2 .u2-banner-empty p { font-size: 12.5px; color: #b9c8e2; margin: 9px 0 0; }

/* ---------- Chips / 排序 ---------- */
body.ui-v2 .u2-chips { display: flex; gap: 8px; padding: 16px 0 12px; flex-wrap: wrap; }
body.ui-v2 .u2-chip {
    height: 30px; padding: 0 14px; border-radius: var(--u2-r-pill); border: 1px solid var(--u2-line);
    background: #fff; color: var(--u2-t2); font-size: 12.5px; display: inline-flex; align-items: center;
    transition: .16s;
}
body.ui-v2 .u2-chip:hover { border-color: var(--u2-brand); color: var(--u2-brand); }
body.ui-v2 .u2-chip.on { background: var(--u2-brand-soft); border-color: transparent; color: var(--u2-brand); font-weight: 600; }
body.ui-v2 .u2-sortbar { display: flex; align-items: center; gap: 14px; padding: 6px 0 14px; }
body.ui-v2 .u2-sortbar .s-on { color: var(--u2-brand); font-weight: 650; font-size: 13px; }
body.ui-v2 .u2-sortbar .s-off { color: var(--u2-t2); font-size: 13px; }
body.ui-v2 .u2-sortbar .count { margin-left: auto; color: var(--u2-t3); font-size: 12px; }

/* ---------- 瀑布流卡片 ---------- */
body.ui-v2 .u2-water { columns: 4; column-gap: 14px; }
/* 真实封面图（有 cover 用 cover，无 cover 用默认图）：列宽固定、高度按原图比例自适应、完整显示不裁切 */
body.ui-v2 .u2-cover .u2-cover-img { display: block; width: 100%; height: auto; vertical-align: bottom; }
body.ui-v2 .u2-card {
    break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
    background: var(--u2-surface); border-radius: var(--u2-r-card); overflow: hidden;
    margin-bottom: 16px; box-shadow: var(--u2-sh-card); transition: .24s var(--u2-ease); display: block;
}
body.ui-v2 .u2-card:hover { transform: translateY(-2px); box-shadow: var(--u2-sh-pop); }
body.ui-v2 .u2-card:hover .u2-card-title { color: var(--u2-brand); }
body.ui-v2 .u2-cover { position: relative; width: 100%; overflow: hidden; }
body.ui-v2 .u2-cover .u2-cv-code { position: absolute; inset: 0; background: var(--u2-code); }
body.ui-v2 .u2-cover .u2-cv-code .u2-ln { position: absolute; left: 14px; right: 14px; height: 7px; border-radius: 3px; background: rgba(255,255,255,.12); }
body.ui-v2 .u2-cover .u2-cv-code .u2-ln:nth-child(1) { top: 22px; width: 52%; background: rgba(124,158,255,.5); }
body.ui-v2 .u2-cover .u2-cv-code .u2-ln:nth-child(2) { top: 40px; width: 74%; }
body.ui-v2 .u2-cover .u2-cv-code .u2-ln:nth-child(3) { top: 58px; width: 61%; background: rgba(94,214,164,.42); }
body.ui-v2 .u2-cover .u2-cv-code .u2-ln:nth-child(4) { top: 76px; width: 80%; }
body.ui-v2 .u2-cover .u2-cv-code .u2-ln:nth-child(5) { top: 94px; width: 44%; background: rgba(255,158,176,.45); }
body.ui-v2 .u2-cover .u2-cv-code .u2-ln:nth-child(6) { top: 112px; width: 68%; }
body.ui-v2 .u2-cover .u2-cv-code .u2-mono { position: absolute; left: 14px; bottom: 12px; color: rgba(255,255,255,.55); font: 11px "JetBrains Mono", monospace; }
body.ui-v2 .u2-cover .u2-cv-code .u2-win { position: absolute; top: 8px; left: 12px; display: flex; gap: 4px; }
body.ui-v2 .u2-cover .u2-cv-code .u2-win i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.25); }
body.ui-v2 .u2-cover .u2-cv-code .u2-win i:first-child { background: #ff6b6b; }
body.ui-v2 .u2-cover .u2-cv-code .u2-win i:nth-child(2) { background: #ffd166; }
body.ui-v2 .u2-cover .u2-cv-grad1 { background: linear-gradient(150deg, #2b3f6b, #4f6bb5 60%, #87a0da); }
body.ui-v2 .u2-cover .u2-cv-grad2 { background: linear-gradient(150deg, #ff6b81, #ff2442 70%, #c91836); }
body.ui-v2 .u2-cover .u2-cv-grad3 { background: linear-gradient(150deg, #0f2d2a, #1f6b5a 65%, #48b79a); }
body.ui-v2 .u2-cover .u2-cv-grad4 { background: linear-gradient(140deg, #3a2b6b, #6b4fc4 60%, #a78bfa); }
body.ui-v2 .u2-cover .u2-cv-photo1 { background: linear-gradient(160deg, #d9c7b4, #b69c85 45%, #7c6a5b); }
body.ui-v2 .u2-cover .u2-cv-photo2 { background: linear-gradient(150deg, #6e97ad, #3d6479 55%, #244356); }
body.ui-v2 .u2-cover .u2-cv-chart { background: #f2f5fb; }
body.ui-v2 .u2-cover .u2-cv-chart .u2-bars { position: absolute; left: 16px; right: 16px; bottom: 16px; height: 62%; display: flex; align-items: flex-end; gap: 9px; }
body.ui-v2 .u2-cover .u2-cv-chart .u2-bars i { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(#7ba7ff, #3d6fe0); }
body.ui-v2 .u2-cover .u2-cv-chart .u2-bars i:nth-child(1) { height: 32%; }
body.ui-v2 .u2-cover .u2-cv-chart .u2-bars i:nth-child(2) { height: 55%; }
body.ui-v2 .u2-cover .u2-cv-chart .u2-bars i:nth-child(3) { height: 41%; }
body.ui-v2 .u2-cover .u2-cv-chart .u2-bars i:nth-child(4) { height: 78%; }
body.ui-v2 .u2-cover .u2-cv-chart .u2-bars i:nth-child(5) { height: 62%; }
body.ui-v2 .u2-cover .u2-cv-chart .u2-bars i:nth-child(6) { height: 90%; }
body.ui-v2 .u2-cover .u2-cv-chart .u2-cl { position: absolute; top: 14px; left: 16px; font: 600 11px "JetBrains Mono", monospace; color: var(--u2-deep); }
body.ui-v2 .u2-cover .u2-big { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 700 30px var(--u2-font, sans-serif); letter-spacing: -1px; text-align: center; padding: 16px; line-height: 1.15; }
body.ui-v2 .u2-cover .u2-big span { display: block; font-size: 11px; font-weight: 500; letter-spacing: 2px; opacity: .8; margin-bottom: 8px; }
body.ui-v2 .u2-cover .u2-cover-tag { position: absolute; bottom: 9px; left: 10px; z-index: 2; font-size: 10px; color: #fff; background: rgba(0,0,0,.36); padding: 3px 8px; border-radius: 5px; }
body.ui-v2 .u2-card-body { padding: 11px 12px 12px; }
body.ui-v2 .u2-card-title { font-size: 13.5px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; color: var(--u2-t1); }
body.ui-v2 .u2-card-meta { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 10.5px; color: var(--u2-t3); flex-wrap: wrap; }
body.ui-v2 .u2-card-meta .u2-tag { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; background: var(--u2-brand-soft); color: var(--u2-brand); }
body.ui-v2 .u2-card-meta .u2-tag.php { background: #eef2ff; color: #4f6bdb; }
body.ui-v2 .u2-card-meta .u2-tag.life { background: #fff2e6; color: #e08a2b; }
body.ui-v2 .u2-card-meta .u2-tag.front { background: #e9f8f1; color: #189d72; }
body.ui-v2 .u2-card-meta .u2-stat { display: inline-flex; align-items: center; gap: 3px; }
body.ui-v2 .u2-card-meta i { font-size: 12px; }

/* ---------- 右侧面板 ---------- */
body.ui-v2 .u2-panel { background: var(--u2-surface); border: 1px solid var(--u2-line); border-radius: var(--u2-r-card); padding: 15px 16px; margin-bottom: 14px; box-shadow: var(--u2-sh-card); }
body.ui-v2 .u2-panel h3 { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 7px; margin: 0 0 13px; }
body.ui-v2 .u2-panel h3 i { font-size: 15px; color: var(--u2-brand); }
body.ui-v2 .u2-panel h3 small { margin-left: auto; font-size: 10px; color: var(--u2-t3); font-weight: 400; }
body.ui-v2 .u2-kv { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; padding: 5px 0; border-bottom: 1px dashed var(--u2-line); }
body.ui-v2 .u2-kv:last-child { border: 0; padding-bottom: 0; }
body.ui-v2 .u2-kv span { color: var(--u2-t2); }
body.ui-v2 .u2-kv b { font: 600 12px "JetBrains Mono", monospace; color: var(--u2-t1); }
body.ui-v2 .u2-kv b.hl { color: var(--u2-brand); }
body.ui-v2 .u2-cat-list { display: flex; flex-direction: column; gap: 2px; }
body.ui-v2 .u2-cat-list a { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--u2-t2); padding: 7px 8px; border-radius: 6px; }
body.ui-v2 .u2-cat-list a:hover { background: var(--u2-surface-2); color: var(--u2-t1); }
body.ui-v2 .u2-cat-list a i { font-size: 14px; }
body.ui-v2 .u2-cat-list a b { margin-left: auto; font: 500 11px "JetBrains Mono", monospace; color: var(--u2-t3); }
body.ui-v2 .u2-tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
body.ui-v2 .u2-tag-cloud a { font-size: 11px; padding: 5px 9px; border-radius: 6px; background: var(--u2-surface-2); color: var(--u2-t2); border: 1px solid var(--u2-line); }
body.ui-v2 .u2-tag-cloud a.hot { background: var(--u2-brand-soft); color: var(--u2-brand); border-color: transparent; }

/* ---------- 内页通用头 ---------- */
body.ui-v2 .u2-page-head { margin-bottom: 18px; }
body.ui-v2 .u2-page-head h1 { font-size: 22px; font-weight: 700; margin: 0; }
body.ui-v2 .u2-page-head p { font-size: 12px; color: var(--u2-t3); margin: 6px 0 0; }

/* ---------- 产品 && 工具 / 友链：双列工具卡 ---------- */
body.ui-v2 .u2-toolgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
body.ui-v2 .u2-toolcard { background: var(--u2-surface); border: 1px solid var(--u2-line); border-radius: var(--u2-r-card); padding: 16px; display: flex; align-items: center; gap: 13px; box-shadow: var(--u2-sh-card); }
body.ui-v2 .u2-toolcard:hover { box-shadow: var(--u2-sh-pop); }
body.ui-v2 .u2-tool-ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; color: #fff; font: 700 18px "JetBrains Mono", monospace; flex: none; }
body.ui-v2 .u2-toolcard h4 { font-size: 13.5px; font-weight: 700; margin: 0; }
body.ui-v2 .u2-toolcard h4 a { color: var(--u2-t1); }
body.ui-v2 .u2-toolcard h4 a:hover { color: var(--u2-brand); }
body.ui-v2 .u2-toolcard p { font-size: 11px; color: var(--u2-t3); margin: 4px 0 0; line-height: 1.5; }
body.ui-v2 .u2-toolcard .u2-btn {
    margin-left: auto; height: 30px; padding: 0 12px; font-size: 11px; flex: none;
    background: var(--u2-brand-soft); color: var(--u2-brand); border-radius: var(--u2-r-sm);
    display: inline-flex; align-items: center; font-weight: 600;
}
body.ui-v2 .u2-toolcard .u2-btn:hover { background: var(--u2-brand); color: #fff; }

/* ---------- 归档时间轴 ---------- */
body.ui-v2 .u2-archive { background: var(--u2-surface); border: 1px solid var(--u2-line); border-radius: var(--u2-r-card); padding: 20px 24px; box-shadow: var(--u2-sh-card); }
body.ui-v2 .u2-arcgroup { position: relative; padding-left: 22px; border-left: 2px solid var(--u2-line); margin-left: 7px; padding-bottom: 16px; }
body.ui-v2 .u2-arcgroup:last-child { border-color: transparent; padding-bottom: 0; }
body.ui-v2 .u2-arcdot { position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--u2-brand); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--u2-brand-soft); }
body.ui-v2 .u2-arcmonth { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
body.ui-v2 .u2-arcmonth b { font-size: 14px; font-weight: 700; }
body.ui-v2 .u2-arcmonth small { font-size: 11px; color: var(--u2-t3); }
body.ui-v2 .u2-arc-item { display: block; font-size: 12px; color: var(--u2-t2); padding: 6px 0 6px 4px; border-bottom: 1px dashed var(--u2-line); }
body.ui-v2 .u2-arc-item:hover { color: var(--u2-brand); }

/* ---------- 留言：表单卡 + 历史留言 ---------- */
body.ui-v2 .u2-fcard { background: var(--u2-surface); border: 1px solid var(--u2-line); border-radius: var(--u2-r-card); padding: 22px 24px; margin-bottom: 14px; box-shadow: var(--u2-sh-card); }
body.ui-v2 .u2-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
body.ui-v2 .u2-field { margin-bottom: 16px; }
body.ui-v2 .u2-field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 7px; }
body.ui-v2 .u2-field label em { font-style: normal; color: var(--u2-t3); font-weight: 400; margin-left: 6px; }
body.ui-v2 .u2-input, body.ui-v2 .u2-textarea {
    width: 100%; border: 1px solid var(--u2-line); border-radius: 8px; padding: 10px 12px;
    font-size: 13px; font-family: inherit; color: var(--u2-t1); background: #fff; outline: 0; transition: .16s;
}
body.ui-v2 .u2-input:focus, body.ui-v2 .u2-textarea:focus { border-color: var(--u2-brand); box-shadow: 0 0 0 2px rgba(var(--u2-brand-rgb),.08); }
body.ui-v2 .u2-textarea { height: 110px; resize: none; line-height: 1.7; }
body.ui-v2 .u2-submit-row { display: flex; gap: 10px; align-items: center; }
body.ui-v2 .u2-submit-row .btn { background: var(--u2-brand); color: #fff; border: 0; border-radius: var(--u2-r-sm); padding: 9px 18px; font-size: 12.5px; font-weight: 600; }
body.ui-v2 .u2-submit-row .tip { font-size: 11px; color: var(--u2-t3); }
body.ui-v2 .u2-comments { background: var(--u2-surface); border: 1px solid var(--u2-line); border-radius: var(--u2-r-card); padding: 16px; box-shadow: var(--u2-sh-card); }
body.ui-v2 .u2-comments h3 { font-size: 13px; font-weight: 700; margin: 0 0 6px; }
body.ui-v2 .u2-comments h3 span { color: var(--u2-t3); font-weight: 400; margin-left: 5px; }
body.ui-v2 .u2-cmt { display: flex; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--u2-line); }
body.ui-v2 .u2-cmt:last-child { border: 0; }
body.ui-v2 .u2-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 11px; flex: none; background: linear-gradient(135deg, #7ba7ff, #3d6fe0); }
body.ui-v2 .u2-avatar.green { background: linear-gradient(135deg, #5fd6a4, #20a97a); }
body.ui-v2 .u2-avatar.purple { background: linear-gradient(135deg, #b69cff, #7b5ce6); }
body.ui-v2 .u2-cmt b { font-size: 11.5px; display: block; margin-bottom: 3px; }
body.ui-v2 .u2-cmt time { font-size: 10px; color: var(--u2-t3); display: block; margin-top: 4px; }
body.ui-v2 .u2-cmt p { font-size: 11.5px; color: var(--u2-t2); line-height: 1.6; margin: 0; }
body.ui-v2 .u2-cmt .u2-reply { margin: 8px 0 0 38px; padding: 8px 10px; background: var(--u2-surface-2); border-radius: 6px; }

/* ---------- 内页（分类 / 文章 / 搜索）：正文占满 center，隐藏旧 .col-lg-4 侧栏，统一用 .u2-right 面板
   不改动这些模板的任何 HTML（尤其文章正文与导航链接），对 SEO 与收录零影响 ---------- */
body.ui-v2 .u2-center .row { margin-left: 0; margin-right: 0; }
body.ui-v2 .u2-center .row > .col-lg-8 { width: 100%; max-width: 100%; flex: 0 0 100%; padding-left: 0; padding-right: 0; }
body.ui-v2 .u2-center .row > .col-lg-4 { display: none; }
body.ui-v2 .u2-center .cat-intro { font-size: 13px; line-height: 1.9; color: var(--u2-t2); }
body.ui-v2 .u2-center .post-title { font-size: 22px; font-weight: 700; }

/* ---------- 正文 / 文章页在 UI2 下保持样式连续 ---------- */
body.ui-v2 .article-card, body.ui-v2 .u2-article-card {
    background: var(--u2-surface); border: 1px solid var(--u2-line); border-radius: var(--u2-r-card);
    padding: 22px 26px; box-shadow: var(--u2-sh-card); margin-bottom: 16px;
}
body.ui-v2 .doc-content { font-size: 14px; line-height: 1.95; }
body.ui-v2 .doc-content h2 { border-left-color: var(--u2-brand); }
body.ui-v2 .doc-content pre { background: var(--u2-code); }

/* ---------- 站点地图悬浮按钮 / 底部广告条：保留原功能，仅对齐设计稿位置 ---------- */
body.ui-v2 .sitemap-fab {
    position: fixed; left: 228px; right: auto; bottom: 18px;
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, #9575f3, #6d4bd6); color: #fff;
}
body.ui-v2 .ad-bar { width: min(720px, calc(100% - 250px)); left: calc(50% + 108px); border-radius: var(--u2-r-card); box-shadow: 0 6px 24px rgba(20,20,40,.14); }

/* ---------- 响应式：小屏侧栏收为抽屉 + 顶栏汉堡菜单 ---------- */
@media (max-width: 991px) {
    body.ui-v2 .u2-side {
        position: fixed; left: 0; top: 0; bottom: 0; width: 240px; height: 100vh; z-index: 1030;
        transform: translateX(-100%); transition: transform .24s var(--u2-ease); box-shadow: 4px 0 24px rgba(0,0,0,.12);
    }
    body.ui-v2 .u2-side.open { transform: translateX(0); }
    body.ui-v2 .u2-side-mask.open { display: block; }
    body.ui-v2 .u2-topbar { padding: 0 14px; }
    body.ui-v2 .u2-search { max-width: none; flex: 1; width: auto; }
    body.ui-v2 .u2-content { grid-template-columns: minmax(0,1fr); padding: 16px 14px 0; }
    body.ui-v2 .u2-right { width: 100%; }
    body.ui-v2 .u2-water { columns: 2; }
    body.ui-v2 .sitemap-fab { left: 14px; }
    body.ui-v2 .ad-bar { width: calc(100% - 28px); left: 50%; }
}
@media (max-width: 640px) {
    body.ui-v2 .u2-water { columns: 1; }
    body.ui-v2 .u2-toolgrid, body.ui-v2 .u2-row2 { grid-template-columns: 1fr; }
    body.ui-v2 .u2-banner h1 { font-size: 20px; }
    body.ui-v2 .u2-banner .u2-bn-slide { padding: 0 24px; }
}
