/* ============================================================
   themes/ajie/assets/style.css — Ajie 资源站主题
   参照 ahhhhfs.com（WordPress + RiPro V5 + Bootstrap 5）的观感：
   主色 #3b6ff5、卡片圆角 .5rem、极轻阴影、60px 悬浮导航、
   Hero 搜索、分类磁贴、横向图文卡、胶囊分页、移动端底部标签栏。
   自包含：无 CDN / 无外部字体 / 图标为内联 SVG。
   ============================================================ */

/* ---------- 1. 设计令牌（同时覆盖 app.css 的既有组件配色） ---------- */
:root {
    --aj-primary: #3b6ff5;
    --aj-primary-dark: #325ed0;
    --aj-primary-light: #89a9f9;
    --aj-primary-soft: rgba(59, 111, 245, .1);
    --aj-primary-soft-2: rgba(59, 111, 245, .18);

    --aj-text: #4d4d4d;
    --aj-title: #1a1c23;
    --aj-text-2: #5d616e;
    --aj-muted: #9499a5;
    --aj-faint: #b0b5bd;
    --aj-line: rgba(0, 0, 0, .05);
    --aj-line-2: rgba(0, 0, 0, .08);

    --aj-bg: #f8f9fb;
    --aj-white: #ffffff;
    --aj-dark: #21242b;

    --aj-radius: .5rem;
    --aj-radius-sm: .35rem;
    --aj-radius-lg: .75rem;
    --aj-radius-pill: 999px;

    --aj-shadow: 0 1px 3px rgba(0, 0, 0, .03);
    --aj-shadow-hover: 0 8px 24px rgba(0, 0, 0, .08);
    --aj-shadow-float: 0 10px 30px rgba(0, 0, 0, .1);

    --aj-header-h: 60px;
    --aj-container: 1140px;

    --aj-grad: linear-gradient(135deg, #3b6ff5 0%, #325ed0 100%);

    /* 覆盖 app.css 令牌：让既有组件（表单/按钮/后台）整体换成参考站蓝 */
    --color-primary: #3b6ff5;
    --color-primary-light: #89a9f9;
    --color-primary-dark: #325ed0;
    --color-accent: #f59e0b;
    --color-warning: #f59e0b;
    --color-bg-alt: #f8f9fb;
    --color-border: rgba(0, 0, 0, .07);
    --color-border-light: rgba(0, 0, 0, .04);
    --gradient-primary: linear-gradient(135deg, #3b6ff5 0%, #325ed0 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .03);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, .06);
}

/* ---------- 2. 基础排版 ---------- */
html { scroll-behavior: smooth; }

body.aj-body {
    background: var(--aj-bg);
    color: var(--aj-text);
    font-size: 15px;
    line-height: 1.7;
}

.aj-icon { display: inline-block; vertical-align: -.15em; flex: 0 0 auto; }

.aj-body a { color: inherit; text-decoration: none; }
.aj-body a:hover { color: var(--aj-primary); }

.aj-container {
    width: 100%;
    max-width: var(--aj-container);
    margin: 0 auto;
    padding: 0 16px;
}
.aj-page { padding-top: 20px; padding-bottom: 40px; }

.aj-main { min-height: 50vh; }

/* ---------- 3. 顶部导航 ---------- */
.aj-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--aj-line);
    transition: box-shadow .25s ease;
}
.aj-header.is-scrolled { box-shadow: 0 4px 16px rgba(0, 0, 0, .06); }

.aj-navbar {
    height: var(--aj-header-h);
    display: flex;
    align-items: center;
    gap: 18px;
}

.aj-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--aj-title);
    white-space: nowrap;
}
.aj-logo:hover { color: var(--aj-primary); }
.aj-logo-mark {
    width: 30px; height: 30px;
    border-radius: 9px;
    background: var(--aj-grad);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 2px 8px rgba(59, 111, 245, .3);
}
.aj-logo-text { letter-spacing: .3px; }

.aj-nav { display: flex; align-items: center; gap: 22px; }
.aj-nav a {
    position: relative;
    padding: 6px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--aj-text-2);
    transition: color .2s;
}
.aj-nav a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--aj-grad);
    transform: scaleX(0);
    transition: transform .22s ease;
}
.aj-nav a:hover, .aj-nav a.active { color: var(--aj-primary); }
.aj-nav a:hover::after, .aj-nav a.active::after { transform: scaleX(1); }

.aj-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.aj-iconbtn {
    position: relative;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border: 1px solid var(--aj-line);
    border-radius: 50%;
    background: #f8f9fb;
    color: var(--aj-text-2);
    cursor: pointer;
    transition: all .2s;
}
.aj-iconbtn:hover {
    color: var(--aj-primary);
    background: var(--aj-primary-soft);
    border-color: var(--aj-primary-soft-2);
}
.aj-iconbtn-badge {
    position: absolute;
    top: -4px; right: -6px;
    min-width: 16px; height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
}
/* 主导航（桌面端）草稿箱数量角标 */
.aj-nav-badge {
    display: inline-block;
    min-width: 16px;
    height: 16px;
    margin-left: 5px;
    padding: 0 5px;
    border-radius: 999px;
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    vertical-align: 1px;
}

.aj-mode-moon { display: none; }
[data-aj-mode="dark"] .aj-mode-sun { display: none; }
[data-aj-mode="dark"] .aj-mode-moon { display: inline; }

.aj-user {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 10px 3px 3px;
    border-radius: var(--aj-radius-pill);
    background: #f8f9fb;
    border: 1px solid var(--aj-line);
    font-size: 13px;
    color: var(--aj-text-2);
    max-width: 150px;
}
.aj-user:hover { color: var(--aj-primary); border-color: var(--aj-primary-soft-2); }
.aj-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.aj-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--aj-grad);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: grid; place-items: center;
    flex: 0 0 auto;
}
.aj-avatar-sm { width: 22px; height: 22px; font-size: 11px; }

.aj-inline { display: inline; }
.aj-inline button { background: transparent; border: 0; }

.aj-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--aj-radius-pill);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: all .22s;
    white-space: nowrap;
}
.aj-btn-primary {
    background: var(--aj-grad);
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(59, 111, 245, .25);
}
.aj-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(59, 111, 245, .35); }
.aj-btn-ghost { background: #f8f9fb; border-color: var(--aj-line); color: var(--aj-text-2); }
.aj-btn-ghost:hover { border-color: var(--aj-primary-soft-2); color: var(--aj-primary); }
.aj-btn-light { background: #fff; color: var(--aj-primary) !important; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
.aj-btn-light:hover { transform: translateY(-1px); }

.aj-burger { display: none; }

/* 折叠搜索条 */
.aj-searchbar {
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s ease, padding .28s ease;
}
.aj-searchbar.open { max-height: 80px; padding-bottom: 12px; }
.aj-searchbar form {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fb;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius);
    padding: 4px 4px 4px 34px;
}
.aj-searchbar-icon {
    position: absolute;
    left: 12px;
    color: var(--aj-muted);
    display: inline-flex;
}
.aj-searchbar input {
    flex: 1;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--aj-text);
    padding: 8px 6px;
    font-family: inherit;
}
.aj-searchbar-btn {
    border: 0;
    background: var(--aj-grad);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--aj-radius-sm);
    cursor: pointer;
}

/* 移动端抽屉 */
.aj-drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.aj-drawer.open { visibility: visible; }
.aj-drawer-mask {
    position: absolute; inset: 0;
    background: rgba(17, 18, 24, .45);
    opacity: 0;
    transition: opacity .25s;
}
.aj-drawer.open .aj-drawer-mask { opacity: 1; }
.aj-drawer-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 280px;
    max-width: 84vw;
    background: #fff;
    padding: 16px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .28s ease;
    box-shadow: -8px 0 30px rgba(0, 0, 0, .12);
}
.aj-drawer.open .aj-drawer-panel { transform: translateX(0); }
.aj-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--aj-line);
    margin-bottom: 12px;
}
.aj-drawer-title { font-weight: 700; color: var(--aj-title); }
.aj-drawer-search {
    display: flex;
    background: #f8f9fb;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius-sm);
    padding: 4px;
    margin-bottom: 14px;
}
.aj-drawer-search input {
    flex: 1; border: 0; background: transparent; outline: none;
    padding: 6px 8px; font-size: 14px; font-family: inherit; color: var(--aj-text);
}
.aj-drawer-search button {
    border: 0; background: transparent; color: var(--aj-muted); cursor: pointer;
    display: grid; place-items: center; padding: 0 8px;
}
.aj-drawer-nav { display: flex; flex-direction: column; }
.aj-drawer-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 4px;
    font-size: 15px;
    color: var(--aj-text-2);
    border-bottom: 1px dashed var(--aj-line);
}
.aj-drawer-nav a:hover { color: var(--aj-primary); }

/* flash 提示 */
.aj-flash-wrap { padding-top: 12px; }
.aj-flash {
    border-radius: var(--aj-radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 8px;
    border: 1px solid transparent;
}
.aj-flash.is-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.aj-flash.is-error   { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.aj-flash.is-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.aj-flash.is-info    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

/* ---------- 4. Hero 搜索 ---------- */
.aj-hero {
    position: relative;
    padding: 76px 16px 66px;
    background: linear-gradient(135deg, #1b1e2b 0%, #27356b 55%, #3b6ff5 130%);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.aj-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(25, 27, 38, .82), rgba(25, 27, 38, .6));
}
.aj-hero:not(.has-img) .aj-hero-overlay { display: none; }
.aj-hero-inner {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    color: #fff;
}
.aj-hero-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: .5px;
    line-height: 1.4;
}
.aj-hero-desc {
    margin-top: 10px;
    font-size: 15px;
    color: rgba(255, 255, 255, .82);
}
.aj-hero-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border-radius: var(--aj-radius);
    padding: 6px 6px 6px 42px;
    margin: 24px auto 0;
    max-width: 620px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
}
.aj-hero-search-icon {
    position: absolute; left: 15px;
    color: var(--aj-muted);
    display: inline-flex;
}
.aj-hero-search input {
    flex: 1;
    border: 0; outline: none; background: transparent;
    font-size: 15px; color: var(--aj-text);
    padding: 10px 4px;
    font-family: inherit;
}
.aj-hero-search button {
    border: 0;
    background: var(--aj-grad);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 11px 26px;
    border-radius: var(--aj-radius-sm);
    cursor: pointer;
    transition: filter .2s;
}
.aj-hero-search button:hover { filter: brightness(1.06); }

.aj-hots {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.aj-hots-label { color: rgba(255, 255, 255, .7); }
.aj-hot {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .16);
    color: #fff !important;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all .2s;
}
.aj-hot:hover { background: rgba(255, 255, 255, .26); }

.aj-hero-cats {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.aj-hero-cats a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px;
    border-radius: var(--aj-radius-pill);
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .92) !important;
    font-size: 13px;
    transition: all .2s;
}
.aj-hero-cats a:hover { background: rgba(255, 255, 255, .22); }
.aj-hero-cats em {
    font-style: normal;
    font-size: 11px;
    background: rgba(255, 255, 255, .2);
    border-radius: 999px;
    padding: 0 6px;
}

/* ---------- 5. 区块标题 ---------- */
.aj-section { margin: 26px 0; }
.aj-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.aj-section-title {
    position: relative;
    font-size: 20px;
    font-weight: 700;
    color: var(--aj-title);
    padding-left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.aj-section-title::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 18px;
    border-radius: 3px;
    background: var(--aj-grad);
}
.aj-title-icon { color: #f59e0b; }
.aj-section-more {
    font-size: 13px;
    color: var(--aj-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
a.aj-section-more:hover { color: var(--aj-primary); }
.aj-page-subtitle { margin: -6px 0 14px; font-size: 13px; color: var(--aj-muted); }

/* ---------- 6. 分类磁贴 ---------- */
.aj-catgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}
.aj-cattile {
    position: relative;
    height: 104px;
    border-radius: var(--aj-radius);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    color: #fff !important;
    background-size: cover;
    background-position: center;
    box-shadow: var(--aj-shadow);
    transition: transform .25s, box-shadow .25s;
}
.aj-cattile::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(17, 19, 28, .78), rgba(17, 19, 28, .12));
    transition: opacity .25s;
}
.aj-cattile::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(59, 111, 245, .92), rgba(50, 94, 208, .78));
    opacity: 0;
    transition: opacity .25s;
}
.aj-cattile:hover { transform: translateY(-4px); box-shadow: var(--aj-shadow-hover); }
.aj-cattile:hover::after { opacity: .92; }
.aj-cattile-title, .aj-cattile-badge { position: relative; z-index: 1; }
.aj-cattile-title { font-size: 15px; font-weight: 600; letter-spacing: .5px; }
.aj-cattile-badge {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 1;
    font-size: 11px;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    padding: 1px 7px;
}
.aj-cat-tile--g1 { background-image: linear-gradient(135deg, #667eea, #764ba2); }
.aj-cat-tile--g2 { background-image: linear-gradient(135deg, #f093fb, #f5576c); }
.aj-cat-tile--g3 { background-image: linear-gradient(135deg, #4facfe, #00f2fe); }
.aj-cat-tile--g4 { background-image: linear-gradient(135deg, #43e97b, #38f9d7); }
.aj-cat-tile--g5 { background-image: linear-gradient(135deg, #fa709a, #fee140); }
.aj-cat-tile--g6 { background-image: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.aj-cat-tile--g7 { background-image: linear-gradient(135deg, #fccb90, #d57eeb); }
.aj-cat-tile--g8 { background-image: linear-gradient(135deg, #e0c3fc, #8ec5fc); }

/* ---------- 7. 快捷入口（4 列） ---------- */
.aj-division {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 22px 0 26px;
}
.aj-div {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius);
    padding: 14px;
    box-shadow: var(--aj-shadow);
    transition: transform .25s, box-shadow .25s;
}
.aj-div:hover { transform: translateY(-3px); box-shadow: var(--aj-shadow-hover); }
.aj-div-icon {
    width: 46px; height: 46px;
    border-radius: var(--aj-radius);
    display: grid; place-items: center;
    color: #fff;
    flex: 0 0 auto;
    transition: transform .5s ease;
}
.aj-div:hover .aj-div-icon { transform: rotate(360deg); }
.aj-div-icon--1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.aj-div-icon--2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.aj-div-icon--3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.aj-div-icon--4 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.aj-div-body { display: flex; flex-direction: column; min-width: 0; }
.aj-div-body strong { font-size: 15px; color: var(--aj-title); }
.aj-div-body em { font-style: normal; font-size: 12px; color: var(--aj-muted); }

/* ---------- 8. 头条区（左大卡 + 右列表） ---------- */
.aj-feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; }
.aj-feat-main {
    position: relative;
    min-height: 330px;
    border-radius: var(--aj-radius);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(135deg, #27356b, #3b6ff5);
    background-size: cover;
    background-position: center;
    box-shadow: var(--aj-shadow);
    transition: transform .25s, box-shadow .25s;
}
.aj-feat-main:hover { transform: translateY(-3px); box-shadow: var(--aj-shadow-hover); }
.aj-feat-body {
    position: relative;
    width: 100%;
    padding: 22px 20px 18px;
    color: #fff;
    background: linear-gradient(to top, rgba(12, 14, 20, .88) 8%, rgba(12, 14, 20, .25) 60%, transparent);
}
.aj-feat-main.no-img .aj-feat-body { background: none; }
.aj-feat-cat {
    display: inline-block;
    font-size: 12px;
    background: rgba(59, 111, 245, .95);
    color: #fff !important;
    padding: 2px 9px;
    border-radius: 5px;
    margin-bottom: 8px;
}
.aj-feat-title { font-size: 21px; font-weight: 700; line-height: 1.45; }
.aj-feat-title a { color: #fff; }
.aj-feat-title a:hover { color: #d9e4ff; }
.aj-feat-desc {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .8);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.aj-feat-main .aj-post-meta { color: rgba(255, 255, 255, .72); margin-top: 10px; }

.aj-feat-list { display: flex; flex-direction: column; gap: 12px; }
.aj-feat-item {
    display: flex;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius);
    padding: 10px;
    box-shadow: var(--aj-shadow);
    transition: transform .25s, box-shadow .25s;
}
.aj-feat-item:hover { transform: translateY(-3px); box-shadow: var(--aj-shadow-hover); }
.aj-feat-thumb {
    flex: 0 0 108px;
    height: 72px;
    border-radius: var(--aj-radius-sm);
    overflow: hidden;
    background: #eef0f5;
    display: grid; place-items: center;
    color: var(--aj-faint);
}
.aj-feat-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aj-feat-item-body { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.aj-feat-item-body h3 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--aj-title);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 9. 分类筛选胶囊 ---------- */
.aj-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.aj-filter-item {
    font-size: 13px;
    padding: 5px 14px;
    border-radius: var(--aj-radius-pill);
    background: #fff;
    border: 1px solid var(--aj-line);
    color: var(--aj-text-2);
    transition: all .2s;
}
.aj-filter-item:hover { border-color: var(--aj-primary-soft-2); color: var(--aj-primary); }
.aj-filter-item.active {
    background: var(--aj-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 10px rgba(59, 111, 245, .28);
}

/* ---------- 10. 文章卡片 ---------- */
.aj-posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.aj-post {
    display: flex;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius);
    padding: 10px;
    box-shadow: var(--aj-shadow);
    transition: transform .25s, box-shadow .25s;
}
.aj-post:hover { transform: translateY(-4px); box-shadow: var(--aj-shadow-hover); }

.aj-post-media {
    flex: 0 0 190px;
    aspect-ratio: 3 / 2;
    border-radius: var(--aj-radius-sm);
    overflow: hidden;
    background: #eef0f5;
    display: grid; place-items: center;
    color: var(--aj-faint);
}
.aj-post-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aj-post-ph { display: grid; place-items: center; }

.aj-post-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.aj-post-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.aj-post-cat {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px;
    color: var(--aj-primary);
}
.aj-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--aj-primary);
    display: inline-block;
}
.aj-post-body .aj-post-cat:nth-of-type(2n) .aj-dot { background: #f59e0b; }
.aj-post-pay {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 11px;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 5px;
    padding: 0 6px;
}
.rsrc-badge-link { display: inline-flex; }

.aj-post-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--aj-title);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.aj-post-title a { color: inherit; }
.aj-post-title a:hover { color: var(--aj-primary); }

.aj-post-desc {
    margin-top: 6px;
    font-size: 13px;
    color: var(--aj-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.aj-post-meta {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--aj-muted);
    flex-wrap: wrap;
}
.aj-post-meta span { display: inline-flex; align-items: center; gap: 4px; }
.aj-post-tags { margin-left: auto; }
.aj-post-tags a { color: var(--aj-muted); }
.aj-post-tags a:hover { color: var(--aj-primary); }

/* 网格卡样式（card_style=grid） */
.aj-posts.is-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.aj-post.is-grid { flex-direction: column; padding: 0; overflow: hidden; gap: 0; }
.aj-post.is-grid .aj-post-media { flex: none; width: 100%; aspect-ratio: 16 / 10; border-radius: 0; }
.aj-post.is-grid .aj-post-body { padding: 12px 14px 14px; }

/* ---------- 11. 分页（胶囊，参照 .custom-nav） ---------- */
.aj-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 26px 0 6px;
}
.aj-pagination a, .aj-pagination .page-ellipsis {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--aj-radius-pill);
    background: #fff;
    border: 1px solid var(--aj-line);
    color: var(--aj-text-2);
    font-size: 14px;
    transition: all .2s;
}
.aj-pagination a:hover {
    border-color: var(--aj-primary-soft-2);
    color: var(--aj-primary);
    transform: translateY(-1px);
}
.aj-pagination .page-num.active {
    background: var(--aj-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(59, 111, 245, .32);
}
.aj-pagination .page-ellipsis { border-color: transparent; background: transparent; }

/* ---------- 12. CTA 横幅 ---------- */
.aj-cta {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 30px 0 10px;
    padding: 28px 30px;
    border-radius: var(--aj-radius);
    background: var(--aj-grad);
    color: #fff;
    box-shadow: 0 10px 30px rgba(59, 111, 245, .22);
}
.aj-cta::after {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
}
.aj-cta::before {
    content: '';
    position: absolute;
    right: 60px; bottom: -80px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
}
.aj-cta-body { position: relative; z-index: 1; }
.aj-cta-body h3 { font-size: 20px; font-weight: 700; }
.aj-cta-body p { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .85); }
.aj-cta .aj-btn-light { position: relative; z-index: 1; flex: 0 0 auto; }

/* ---------- 13. 布局：主区 + 侧边栏 ---------- */
.aj-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}
.aj-layout-main { min-width: 0; }

/* ---------- 14. 侧边栏小组件 ---------- */
.aj-sidebar { position: sticky; top: calc(var(--aj-header-h) + 16px); }
.aj-widget {
    background: #fff;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--aj-shadow);
}
.aj-widget-title {
    position: relative;
    font-size: 16px;
    font-weight: 600;
    color: var(--aj-title);
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--aj-line);
}
.aj-widget-title::after {
    content: '';
    position: absolute;
    left: 0; bottom: -1px;
    width: 30px; height: 3px;
    border-radius: 2px;
    background: var(--aj-grad);
}
.aj-widget-search {
    display: flex;
    background: #f8f9fb;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius-sm);
    padding: 3px;
    transition: all .2s;
}
.aj-widget-search:focus-within {
    background: #fff;
    border-color: var(--aj-primary-soft-2);
    box-shadow: 0 0 0 3px var(--aj-primary-soft);
}
.aj-widget-search input {
    flex: 1; min-width: 0;
    border: 0; background: transparent; outline: none;
    padding: 8px 10px;
    font-size: 14px; font-family: inherit; color: var(--aj-text);
}
.aj-widget-search button {
    border: 0; background: transparent; color: var(--aj-muted);
    display: grid; place-items: center; padding: 0 10px; cursor: pointer;
}
.aj-widget-search button:hover { color: var(--aj-primary); }

.aj-widget-cats { list-style: none; }
.aj-widget-cats a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 0;
    font-size: 14px;
    color: var(--aj-text);
    border-bottom: 1px dashed var(--aj-line);
}
.aj-widget-cats a:last-child { border-bottom: 0; }
.aj-widget-cats a > span { display: inline-flex; align-items: center; gap: 7px; }
.aj-widget-cats a:hover { color: var(--aj-primary); }
.aj-widget-cats .count { font-style: normal; font-size: 12px; color: var(--aj-faint); }

.aj-widget-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.aj-widget-tags a {
    display: inline-flex; align-items: center; gap: 5px;
    background: #f8f9fb;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius-sm);
    padding: 5px 10px;
    font-size: 13px;
    color: var(--aj-text-2);
    transition: all .2s;
}
.aj-widget-tags a em { font-style: normal; font-size: 11px; color: var(--aj-faint); }
.aj-widget-tags a:hover {
    background: var(--aj-grad);
    border-color: transparent;
    color: #fff;
}
.aj-widget-tags a:hover em { color: rgba(255, 255, 255, .8); }

.aj-widget-posts { list-style: none; }
.aj-widget-posts li { border-bottom: 1px dashed var(--aj-line); }
.aj-widget-posts li:last-child { border-bottom: 0; }
.aj-widget-posts a { display: flex; gap: 10px; padding: 9px 0; align-items: center; }
.aj-mini-thumb {
    flex: 0 0 64px; height: 48px;
    border-radius: var(--aj-radius-sm);
    overflow: hidden;
    background: #eef0f5;
    display: grid; place-items: center;
    color: var(--aj-faint);
}
.aj-mini-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aj-mini-body { min-width: 0; display: flex; flex-direction: column; }
.aj-mini-body strong {
    font-size: 13px; font-weight: 500; color: var(--aj-text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.aj-mini-body em { font-style: normal; font-size: 11px; color: var(--aj-faint); margin-top: 3px; }
.aj-widget-posts a:hover strong { color: var(--aj-primary); }

.aj-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.aj-quick a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 10px;
    border-radius: var(--aj-radius-sm);
    background: #f8f9fb;
    border: 1px solid var(--aj-line);
    font-size: 13px;
    color: var(--aj-text-2);
    transition: all .2s;
}
.aj-quick a:hover { color: var(--aj-primary); border-color: var(--aj-primary-soft-2); background: var(--aj-primary-soft); }

/* ---------- 15.1 未覆写的内置视图自动居中收窄 ----------
   登录/注册/资料/后台/编辑器/媒体库/积分/资源库/草稿箱等仍走 views/*.php，
   它们原本依赖默认布局的 .container 包裹，这里补齐版心。 */
.aj-main > .auth-page,
.aj-main > .admin-page,
.aj-main > .editor-page,
.aj-main > .media-page,
.aj-main > .points-page,
.aj-main > .list-page,
.aj-main > .rsrc-page,
.aj-main > .error-page {
    max-width: var(--aj-container);
    margin: 0 auto;
    padding: 22px 16px 44px;
}
.aj-main > .auth-page { max-width: 720px; }
.aj-main > .error-page { padding: 80px 16px; text-align: center; }
.aj-main > .error-page h1 { font-size: 42px; color: var(--aj-title); margin-bottom: 10px; }
.aj-main > .error-page p { color: var(--aj-muted); margin-bottom: 14px; }

/* ---------- 15.2 资源库列表（覆写 views/resources.php） ---------- */
.aj-rsrc-hero {
    position: relative;
    padding: 38px 0 32px;
    background: linear-gradient(135deg, #1b1e2b 0%, #27356b 55%, #3b6ff5 130%);
    color: #fff;
    overflow: hidden;
}
.aj-rsrc-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    flex-wrap: wrap;
}
.aj-rsrc-hero-title { font-size: 26px; font-weight: 700; letter-spacing: .5px; }
.aj-rsrc-hero-sub { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .8); }
.aj-rsrc-hero-sub strong { color: #fff; }
.aj-rsrc-hero-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border-radius: var(--aj-radius);
    padding: 5px 5px 5px 40px;
    flex: 0 1 460px;
    min-width: 260px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
.aj-rsrc-hero-search-icon { position: absolute; left: 14px; color: var(--aj-muted); display: inline-flex; }
.aj-rsrc-hero-search input {
    flex: 1; min-width: 0;
    border: 0; outline: none; background: transparent;
    font-size: 14px; color: var(--aj-text);
    padding: 9px 4px;
    font-family: inherit;
}
.aj-rsrc-hero-search button {
    border: 0;
    background: var(--aj-grad);
    color: #fff;
    border-radius: var(--aj-radius-sm);
    padding: 9px 18px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}
.aj-rsrc-hero-search button:hover { filter: brightness(1.06); }

.aj-rsrc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.aj-rsrc-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius-pill);
    font-size: 13.5px;
    color: var(--aj-text-2);
    box-shadow: var(--aj-shadow);
    transition: all .2s;
}
.aj-rsrc-tab:hover { color: var(--aj-primary); border-color: var(--aj-primary-soft-2); }
.aj-rsrc-tab.active {
    background: var(--aj-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(59, 111, 245, .28);
}
.aj-rsrc-tab em {
    font-style: normal; font-size: 11px;
    background: rgba(0, 0, 0, .06);
    border-radius: var(--aj-radius-pill);
    padding: 1px 7px;
}
.aj-rsrc-tab.active em { background: rgba(255, 255, 255, .22); }

.aj-rsrc-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius);
    padding: 12px 14px;
    box-shadow: var(--aj-shadow);
    margin-bottom: 14px;
}
.aj-rsrc-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--aj-muted); }
.aj-rsrc-field select {
    font-family: inherit; font-size: 13px; color: var(--aj-text);
    padding: 7px 10px;
    border: 1px solid var(--aj-line-2);
    border-radius: var(--aj-radius-sm);
    background: #fff;
    outline: none;
    max-width: 200px;
}
.aj-rsrc-field select:focus { border-color: var(--aj-primary); }
.aj-btn-sm { padding: 7px 13px; font-size: 13px; }
.aj-rsrc-count { margin-left: auto; font-size: 13px; color: var(--aj-muted); }
.aj-rsrc-count strong { color: var(--aj-primary); }
.aj-rsrc-cats { margin-bottom: 16px; }

.aj-rsrc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 16px; }
.aj-rsrc-card {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius);
    overflow: hidden;
    box-shadow: var(--aj-shadow);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.aj-rsrc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--aj-shadow-hover);
    border-color: var(--aj-primary-soft-2);
}
.aj-rsrc-cover { position: relative; display: block; aspect-ratio: 16 / 10; background: #eef0f5; overflow: hidden; }
.aj-rsrc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.aj-rsrc-card:hover .aj-rsrc-cover img { transform: scale(1.04); }
.aj-rsrc-cover-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--aj-faint); }
.aj-rsrc-type, .aj-rsrc-paid {
    position: absolute; top: 10px;
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; line-height: 1;
    padding: 5px 8px;
    border-radius: var(--aj-radius-pill);
}
.aj-rsrc-type { left: 10px; background: rgba(33, 36, 43, .72); color: #fff; }
.aj-rsrc-paid { right: 10px; background: rgba(245, 158, 11, .92); color: #fff; }
.aj-rsrc-body { display: flex; flex-direction: column; flex: 1; padding: 12px 14px 13px; }
.aj-rsrc-title {
    font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--aj-title);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 45px;
}
.aj-rsrc-title a { color: inherit; }
.aj-rsrc-title a:hover { color: var(--aj-primary); }
.aj-rsrc-author { margin-top: 7px; font-size: 12px; color: var(--aj-muted); display: inline-flex; align-items: center; gap: 4px; }
.aj-rsrc-specs { margin-top: 6px; font-size: 12px; color: var(--aj-faint); }
.aj-rsrc-foot {
    margin-top: auto; padding-top: 10px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.aj-rsrc-badges { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.aj-rsrc-license {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 11px;
    color: #0369a1;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 5px;
    padding: 1px 6px;
    max-width: 140px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aj-rsrc-dl {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12.5px;
    padding: 5px 11px;
    border-radius: var(--aj-radius-sm);
    background: var(--aj-grad);
    color: #fff;
    flex: 0 0 auto;
}
.aj-rsrc-dl:hover { filter: brightness(1.08); }
.aj-rsrc-dl.is-locked { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.aj-rsrc-dl.is-locked:hover { filter: none; border-color: #f59e0b; }
.aj-rsrc-dl.is-plain { background: #f8f9fb; color: var(--aj-text-2); border: 1px solid var(--aj-line); }
.aj-rsrc-dl.is-plain:hover { color: var(--aj-primary); border-color: var(--aj-primary-soft-2); }

[data-aj-mode="dark"] .aj-rsrc-tab,
[data-aj-mode="dark"] .aj-rsrc-toolbar,
[data-aj-mode="dark"] .aj-rsrc-card { background: #21242b; border-color: rgba(255, 255, 255, .08); }
[data-aj-mode="dark"] .aj-rsrc-field select { background: #21242b; color: #e8eaef; border-color: rgba(255, 255, 255, .12); }
[data-aj-mode="dark"] .aj-rsrc-title { color: #e8eaef; }
[data-aj-mode="dark"] .aj-rsrc-cover { background: #1a1c23; }
[data-aj-mode="dark"] .aj-rsrc-dl.is-plain { background: rgba(255, 255, 255, .06); color: #c5cad4; border-color: rgba(255, 255, 255, .1); }
[data-aj-mode="dark"] .aj-rsrc-license { background: rgba(59, 130, 246, .14); border-color: rgba(59, 130, 246, .3); color: #93c5fd; }

@media (max-width: 767.98px) {
    .aj-rsrc-hero { padding: 26px 0 22px; }
    .aj-rsrc-hero-title { font-size: 20px; }
    .aj-rsrc-hero-search { flex: 1 1 100%; min-width: 0; }
    .aj-rsrc-toolbar { padding: 10px 12px; }
    .aj-rsrc-field { flex: 1 1 46%; }
    .aj-rsrc-field select { max-width: none; width: 100%; }
    .aj-rsrc-count { margin-left: 0; }
    .aj-rsrc-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .aj-rsrc-title { font-size: 14px; min-height: 42px; }
}

/* ---------- 15. 通用卡片 ---------- */
.aj-card {
    background: #fff;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius);
    padding: 24px;
    box-shadow: var(--aj-shadow);
    margin-bottom: 16px;
}
.empty-state.aj-card { text-align: center; padding: 46px 24px; }
.empty-state.aj-card h2 { font-size: 18px; color: var(--aj-title); margin-bottom: 8px; }
.empty-state.aj-card p { color: var(--aj-muted); font-size: 14px; margin-bottom: 8px; }

/* ---------- 16. 详情页面包屑 ---------- */
.aj-crumb-bar {
    background: #fff;
    border-bottom: 1px solid var(--aj-line);
    padding: 10px 0;
    margin-bottom: 18px;
}
.aj-crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--aj-muted);
}
.aj-crumbs a { display: inline-flex; align-items: center; gap: 4px; color: var(--aj-text-2); }
.aj-crumbs a:hover { color: var(--aj-primary); }
.aj-crumb-sep { color: #c5cad4; }
.aj-crumb-cur { color: var(--aj-faint); }

/* ---------- 17. 详情页文章卡 ---------- */
.aj-article { padding: 26px 30px 22px; }
.aj-article-head h1 {
    font-size: 26px;
    line-height: 1.45;
    font-weight: 700;
    color: var(--aj-title);
}
.aj-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--aj-line);
    font-size: 13px;
    color: var(--aj-muted);
}
.aj-article-meta > * { display: inline-flex; align-items: center; gap: 5px; }
.aj-article-meta .author { color: var(--aj-text-2); font-weight: 500; }
.aj-article-meta .author:hover { color: var(--aj-primary); }
.aj-article-meta .category {
    color: var(--aj-primary);
    background: var(--aj-primary-soft);
    border-radius: 5px;
    padding: 2px 8px;
}

.aj-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 20px;
}
.aj-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border-radius: var(--aj-radius-pill);
    border: 2px solid var(--aj-primary-soft-2);
    color: var(--aj-primary);
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    transition: all .2s;
}
.aj-pill em { font-style: normal; font-size: 12px; opacity: .8; }
.aj-pill:hover { border-color: var(--aj-primary); }
.aj-pill.active {
    background: var(--aj-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(59, 111, 245, .3);
}

.aj-article-body { min-width: 0; }

/* 目录 */
.aj-toc {
    background: #f8f9fb;
    border: 1px solid var(--aj-line);
    border-left: 3px solid var(--aj-primary);
    border-radius: var(--aj-radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}
.aj-toc summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--aj-title);
    display: flex;
    align-items: center;
    gap: 6px;
}
.aj-toc .toc-list { list-style: none; margin-top: 8px; }
.aj-toc .toc-list li { padding: 3px 0; }
.aj-toc .toc-list a { color: var(--aj-text-2); }
.aj-toc .toc-list a:hover { color: var(--aj-primary); }
.aj-toc .toc-l3 { padding-left: 14px; font-size: 13px; }
.aj-toc .toc-l4, .aj-toc .toc-l5, .aj-toc .toc-l6 { padding-left: 26px; font-size: 13px; }

/* 正文排版 */
.aj-content {
    font-size: 16px;
    line-height: 1.9;
    color: #3f3f3f;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.aj-content > *:first-child { margin-top: 0; }
.aj-content p { margin: 0 0 16px; }
.aj-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--aj-title);
    margin: 30px 0 14px;
    padding-left: 11px;
    border-left: 4px solid var(--aj-primary);
    line-height: 1.5;
}
.aj-content h3 { font-size: 17px; font-weight: 600; color: var(--aj-title); margin: 24px 0 12px; }
.aj-content h4 { font-size: 16px; font-weight: 600; color: var(--aj-title); margin: 20px 0 10px; }
.aj-content a { color: var(--aj-primary); border-bottom: 1px solid var(--aj-primary-soft-2); }
.aj-content a:hover { border-bottom-color: var(--aj-primary); }
.aj-content img, .aj-content video { max-width: 100%; height: auto; border-radius: var(--aj-radius-sm); display: block; margin: 16px auto; }
.aj-content audio { width: 100%; margin: 16px 0; }
.aj-content blockquote {
    margin: 18px 0;
    padding: 12px 16px;
    background: #f8f9fb;
    border-left: 4px solid var(--aj-primary);
    border-radius: 0 var(--aj-radius-sm) var(--aj-radius-sm) 0;
    color: var(--aj-text-2);
}
.aj-content code {
    background: #f1f3f7;
    color: #c0341d;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: var(--font-mono);
}
.aj-content pre {
    background: #21242b;
    color: #e6e8ee;
    padding: 16px;
    border-radius: var(--aj-radius-sm);
    overflow-x: auto;
    margin: 18px 0;
    font-size: 13.5px;
    line-height: 1.7;
}
.aj-content pre code { background: none; color: inherit; padding: 0; }
.aj-content ul, .aj-content ol { margin: 0 0 16px; padding-left: 24px; }
.aj-content li { margin: 6px 0; }
.aj-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.aj-content th, .aj-content td { border: 1px solid var(--aj-line-2); padding: 9px 12px; text-align: left; }
.aj-content th { background: #f8f9fb; font-weight: 600; color: var(--aj-title); }
.aj-content hr { border: 0; border-top: 1px solid var(--aj-line-2); margin: 26px 0; }
.aj-content figure { margin: 18px 0; }
.aj-content figcaption { text-align: center; font-size: 13px; color: var(--aj-muted); margin-top: 6px; }

/* 付费墙锁定时正文渐隐 */
.aj-content.is-paywalled { position: relative; }

/* 资源面板（阶段 11）微调 */
.aj-rsrc { margin-top: 22px; }
.aj-rsrc .rsrc-panel-head { gap: 16px; }
.aj-rsrc .rsrc-panel-cover { max-width: 220px; border-radius: var(--aj-radius-sm); }
.aj-rsrc .rsrc-panel-title { font-size: 17px; }
.aj-rsrc .rsrc-specs li { font-size: 14px; }
.aj-rsrc .rsrc-dl-btn { border-radius: var(--aj-radius-pill); }

/* 付费墙卡片 */
.aj-paywall.paywall-card {
    margin: 24px 0;
    padding: 26px 22px;
    text-align: center;
    border-radius: var(--aj-radius);
    background: linear-gradient(180deg, #f4f7ff, #ffffff);
    border: 1px dashed var(--aj-primary-soft-2);
    box-shadow: none;
}
.aj-paywall .paywall-icon {
    width: 52px; height: 52px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--aj-primary-soft);
    color: var(--aj-primary);
    display: grid; place-items: center;
}
.aj-paywall .paywall-title { font-size: 18px; color: var(--aj-title); }
.aj-paywall .paywall-desc { margin: 10px 0 16px; font-size: 14px; color: var(--aj-text-2); }
.aj-paywall .paywall-desc strong { color: var(--aj-primary); }
.aj-paywall .btn { border-radius: var(--aj-radius-pill); padding: 10px 24px; }
.aj-paywall .paywall-tip { color: #b45309; font-size: 13px; margin-bottom: 10px; }

/* 状态横幅 */
.article-status-banner {
    margin: 18px 0;
    padding: 10px 14px;
    border-radius: var(--aj-radius-sm);
    font-size: 13px;
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* 标签 */
.aj-article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--aj-line);
}
.aj-tags-label { font-size: 13px; color: var(--aj-muted); display: inline-flex; align-items: center; gap: 5px; }
.aj-article-tags .tag {
    background: #f8f9fb;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius-pill);
    padding: 3px 12px;
    font-size: 12.5px;
    color: var(--aj-text-2);
}
.aj-article-tags .tag:hover {
    background: var(--aj-grad);
    border-color: transparent;
    color: #fff;
}

/* 点赞 / 分享行 */
.aj-article-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--aj-line);
}
.aj-article-foot-main { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.aj-article-foot .btn-like {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--aj-line);
    background: #f8f9fb;
    color: var(--aj-text-2);
    border-radius: var(--aj-radius-pill);
    padding: 7px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
}
.aj-article-foot .btn-like:hover { color: #ef4444; border-color: #fecaca; background: #fef2f2; }
.aj-article-foot .btn-like.liked { color: #fff; background: #ef4444; border-color: transparent; }
.aj-article-foot .share-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.aj-article-foot .btn-share {
    font-size: 12.5px;
    padding: 6px 12px;
    border-radius: var(--aj-radius-pill);
    background: var(--aj-primary-soft);
    color: var(--aj-primary);
    border: 1px solid transparent;
    transition: all .2s;
}
.aj-article-foot .btn-share:hover { background: var(--aj-primary); color: #fff; }
.aj-article-foot .share-count { font-size: 12px; color: var(--aj-muted); }

/* 评论区 */
.aj-comments { padding: 24px 30px; }
.aj-comments .comments-title {
    font-size: 18px;
    color: var(--aj-title);
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--aj-line);
}
.aj-comments .comments-count { color: var(--aj-primary); }
.aj-comments .comment-list, .aj-comments .comment-children { list-style: none; }
.aj-comments .comment-children { padding-left: 50px; margin-top: 12px; border-left: 2px solid var(--aj-line); }
.aj-comments .comment-item { padding: 12px 0; border-bottom: 1px dashed var(--aj-line); }
.aj-comments .comment-item:last-child { border-bottom: 0; }
.aj-comments .comment-author { font-weight: 600; color: var(--aj-title); font-size: 14px; }
.aj-comments .comment-badge {
    font-size: 11px;
    background: var(--aj-primary-soft);
    color: var(--aj-primary);
    border-radius: 4px;
    padding: 1px 6px;
}
.aj-comments .comment-time { font-size: 12px; color: var(--aj-faint); }
.aj-comments .comment-content { margin-top: 6px; font-size: 14.5px; line-height: 1.8; }
.aj-comments .comment-actions { margin-top: 6px; display: flex; gap: 12px; }
.aj-comments .btn-comment-like, .aj-comments .btn-reply {
    border: 0; background: transparent;
    color: var(--aj-muted);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}
.aj-comments .btn-comment-like:hover, .aj-comments .btn-reply:hover { color: var(--aj-primary); }
.aj-comments .comment-form-wrap { margin-top: 18px; }
.aj-comments .comment-guest-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.aj-comments .comment-form .form-control {
    width: 100%;
    border: 1px solid var(--aj-line-2);
    border-radius: var(--aj-radius-sm);
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--aj-text);
    background: #fdfdfe;
    outline: none;
}
.aj-comments .comment-form .form-control:focus { background: #fff; border-color: var(--aj-primary-soft-2); box-shadow: 0 0 0 3px var(--aj-primary-soft); }
.aj-comments .comment-textarea { min-height: 110px; resize: vertical; margin-bottom: 10px; }
.aj-comments .comment-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.aj-comments .comment-form-status { font-size: 13px; margin-bottom: 8px; display: none; }
.aj-comments .comment-form-status.active, .aj-comments .comment-form-status.success, .aj-comments .comment-form-status.error { display: block; }
.aj-comments .comment-form-status.success { color: #047857; }
.aj-comments .comment-form-status.error { color: #b91c1c; }
.aj-comments .comments-empty { color: var(--aj-muted); font-size: 14px; }

/* ---------- 18. 页脚 ---------- */
.aj-footer {
    margin-top: 40px;
    padding-top: 34px;
    background: #fff;
    border-top: 1px solid var(--aj-line);
}
.aj-footer-cols {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 26px;
    padding-bottom: 24px;
}
.aj-footer-brand .aj-logo { font-size: 17px; }
.aj-footer-desc { margin-top: 10px; font-size: 13px; color: var(--aj-muted); line-height: 1.75; }
.aj-footer-social { display: flex; gap: 10px; margin-top: 12px; }
.aj-footer-social a {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #f8f9fb;
    border: 1px solid var(--aj-line);
    color: var(--aj-text-2);
    display: grid; place-items: center;
    transition: all .2s;
}
.aj-footer-social a:hover { background: var(--aj-grad); color: #fff; border-color: transparent; }
.aj-footer-col h4 {
    font-size: 15px;
    color: var(--aj-title);
    margin-bottom: 12px;
    padding-bottom: 8px;
    position: relative;
}
.aj-footer-col h4::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 30px; height: 3px;
    border-radius: 2px;
    background: var(--aj-grad);
}
.aj-footer-col a {
    display: block;
    padding: 5px 0;
    font-size: 13.5px;
    color: var(--aj-text-2);
}
.aj-footer-col a:hover { color: var(--aj-primary); padding-left: 3px; }
.aj-footer-empty { font-size: 13px; color: var(--aj-faint); }
.aj-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 0 18px;
    border-top: 1px solid var(--aj-line);
    font-size: 12.5px;
    color: var(--aj-muted);
}
.aj-footer-links { display: inline-flex; gap: 14px; }
.aj-footer-links a { color: var(--aj-muted); }
.aj-footer-links a:hover { color: var(--aj-primary); }

/* ---------- 19. 悬浮工具条 + 底部标签栏 ---------- */
.aj-rollbar {
    position: fixed;
    right: 14px;
    bottom: 90px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.aj-rollbar a {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    background: #fff;
    border: 1px solid var(--aj-line);
    border-radius: var(--aj-radius-sm);
    color: var(--aj-text-2);
    box-shadow: var(--aj-shadow);
    transition: all .2s;
}
.aj-rollbar a:hover { background: var(--aj-grad); color: #fff; border-color: transparent; }
.aj-rollbar .aj-backtop { opacity: 0; visibility: hidden; }
.aj-rollbar .aj-backtop.is-show { opacity: 1; visibility: visible; }

.aj-mobilebar { display: none; }

/* ---------- 20. 深色模式 ---------- */
[data-aj-mode="dark"] body.aj-body { background: #1a1c23; color: #c5cad4; }
[data-aj-mode="dark"] .aj-header { background: rgba(33, 36, 43, .92); border-bottom-color: rgba(255, 255, 255, .06); }
[data-aj-mode="dark"] .aj-logo-text, [data-aj-mode="dark"] .aj-section-title,
[data-aj-mode="dark"] .aj-post-title, [data-aj-mode="dark"] .aj-article-head h1,
[data-aj-mode="dark"] .aj-widget-title, [data-aj-mode="dark"] .aj-footer-col h4,
[data-aj-mode="dark"] .aj-comments .comments-title, [data-aj-mode="dark"] .aj-content h2,
[data-aj-mode="dark"] .aj-content h3, [data-aj-mode="dark"] .aj-feat-item-body h3 { color: #eef0f5; }
[data-aj-mode="dark"] .aj-card, [data-aj-mode="dark"] .aj-post,
[data-aj-mode="dark"] .aj-widget, [data-aj-mode="dark"] .aj-div,
[data-aj-mode="dark"] .aj-feat-item, [data-aj-mode="dark"] .aj-footer,
[data-aj-mode="dark"] .aj-crumb-bar, [data-aj-mode="dark"] .aj-drawer-panel {
    background: #21242b;
    border-color: rgba(255, 255, 255, .06);
}
[data-aj-mode="dark"] .aj-iconbtn, [data-aj-mode="dark"] .aj-user,
[data-aj-mode="dark"] .aj-btn-ghost, [data-aj-mode="dark"] .aj-filter-item,
[data-aj-mode="dark"] .aj-pagination a, [data-aj-mode="dark"] .aj-widget-search,
[data-aj-mode="dark"] .aj-quick a, [data-aj-mode="dark"] .aj-searchbar form,
[data-aj-mode="dark"] .aj-article-foot .btn-like, [data-aj-mode="dark"] .aj-article-tags .tag,
[data-aj-mode="dark"] .aj-rollbar a, [data-aj-mode="dark"] .aj-footer-social a {
    background: #2a2e37;
    border-color: rgba(255, 255, 255, .08);
    color: #c5cad4;
}
[data-aj-mode="dark"] .aj-content { color: #c5cad4; }
[data-aj-mode="dark"] .aj-content code { background: #2a2e37; }
[data-aj-mode="dark"] .aj-toc, [data-aj-mode="dark"] .aj-content blockquote { background: #2a2e37; }
[data-aj-mode="dark"] .aj-paywall.paywall-card { background: linear-gradient(180deg, #232734, #21242b); }

/* ---------- 21. 响应式 ---------- */
@media (max-width: 991.98px) {
    .aj-nav { display: none; }
    .aj-burger {
        display: grid; place-items: center;
        width: 36px; height: 36px;
        border: 1px solid var(--aj-line);
        border-radius: 50%;
        background: #f8f9fb;
        color: var(--aj-text-2);
        cursor: pointer;
    }
    .aj-hide-sm { display: none !important; }
    .aj-layout { grid-template-columns: minmax(0, 1fr); }
    .aj-sidebar { position: static; margin-top: 6px; }
    .aj-feature { grid-template-columns: 1fr; }
    .aj-feat-main { min-height: 240px; }
    .aj-division { grid-template-columns: repeat(2, 1fr); }
    .aj-posts.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .aj-mobilebar {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 70;
        background: rgba(255, 255, 255, .96);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--aj-line);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .aj-mobilebar a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 7px 0;
        font-size: 11px;
        color: var(--aj-muted);
    }
    .aj-mobilebar a.active, .aj-mobilebar a:hover { color: var(--aj-primary); }
    .aj-rollbar { right: 10px; bottom: 76px; }
    .aj-rollbar a { width: 38px; height: 38px; }
    body.aj-body { padding-bottom: 60px; }
}

@media (max-width: 767.98px) {
    .aj-hero { padding: 52px 16px 46px; }
    .aj-hero-title { font-size: 1.5rem; }
    .aj-hero-desc { font-size: 14px; }
    .aj-hero-search { flex-wrap: wrap; padding: 8px 8px 8px 38px; }
    .aj-hero-search button { flex: 1 0 100%; margin-top: 6px; padding: 10px; }

    .aj-container { padding: 0 12px; }
    .aj-section-title { font-size: 18px; }
    .aj-section { margin: 20px 0; }
    .aj-catgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .aj-cattile { height: 88px; }

    .aj-posts { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .aj-post-media { flex: 0 0 132px; }
    .aj-posts.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aj-post.is-grid .aj-post-body { padding: 10px; }
    .aj-post-title { font-size: 15px; }
    .aj-post-desc { -webkit-line-clamp: 2; }
    .aj-post-tags { display: none; }

    .aj-cta { flex-direction: column; align-items: flex-start; padding: 22px; }
    .aj-cta-body h3 { font-size: 18px; }

    .aj-article { padding: 18px 16px; }
    .aj-article-head h1 { font-size: 20px; }
    .aj-article-meta { gap: 10px; font-size: 12px; }
    .aj-pill { padding: 6px 13px; font-size: 13px; }
    .aj-content { font-size: 15.5px; }
    .aj-content h2 { font-size: 18px; }
    .aj-comments { padding: 18px 16px; }
    .aj-comments .comment-children { padding-left: 16px; }
    .aj-comments .comment-guest-fields { grid-template-columns: 1fr; }
    .aj-rsrc .rsrc-panel-cover { max-width: 100%; }

    .aj-footer-cols { grid-template-columns: 1fr 1fr; gap: 20px; }
    .aj-footer-brand { grid-column: 1 / -1; }
    .aj-footer-bottom { justify-content: center; text-align: center; }
    .aj-quick { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 575.98px) {
    .aj-division { grid-template-columns: 1fr; }
    .aj-posts.is-grid { grid-template-columns: minmax(0, 1fr); }
    .aj-pagination a, .aj-pagination .page-ellipsis { min-width: 34px; height: 34px; font-size: 13px; }
    .aj-cattile { height: 80px; }
    .aj-cattile-title { font-size: 14px; }
}

/* 打印：隐藏交互件 */
@media print {
    .aj-header, .aj-footer, .aj-rollbar, .aj-mobilebar, .aj-pills, .aj-article-foot { display: none !important; }
}

/* ===== 无封面 emoji 占位（2026-09-19） ===== */
.aj-post-ph { font-size: 30px; line-height: 1; }
.aj-rsrc-cover-ph { font-size: 40px; line-height: 1; }
.aj-feat-thumb-ph { display: grid; place-items: center; font-size: 26px; line-height: 1; }
.aj-feat-wm {
    position: absolute; top: 14px; right: 18px;
    font-size: 52px; line-height: 1; opacity: .3; pointer-events: none;
}
.aj-rsrc .rsrc-panel-cover.is-ph { display: grid; place-items: center; font-size: 32px; background: #eef0f5; }
[data-aj-mode="dark"] .aj-rsrc .rsrc-panel-cover.is-ph { background: #1a1c23; }
.aj-mini-ph { font-size: 20px; line-height: 1; }
