/* ============================================================
   曼巴线报 · AeroCore 子主题皮肤
   暖纸底 / 墨色字 / 砖红主题色，克制、阅读优先
   ============================================================ */

/* :root:root 双类名提升特异性，压过父主题在 head 内联输出的 :root 变量 */
:root:root {
    /* 品牌色 */
    --theme-color: #b3432a;
    --theme-color-hover: #9a3822;
    --color-link: #b3432a;
    --color-link-hover: #9a3822;

    /* 暖色纸面 */
    --bg-body: #f6f2ea;
    --bg-card: #fffdf8;
    --bg-secondary: #f4efe5;
    --bg-hover: #f1ebdf;

    /* 墨色文字 */
    --text-primary: #2c2721;
    --text-secondary: #575044;
    --text-tertiary: #7a7163;
    --text-muted: #a39a89;
    --text-content: #3d372e;
    --caption-color: #2c2721;

    /* 米褐边框 */
    --border-primary: #e7e0d1;
    --border-secondary: #efe9db;
    --border-input: #ddd4c1;
    --border-hover: #c8bda5;

    --border-radius: 10px;

    /* 置顶条暖金底 */
    --xb-top-bg: rgba(184, 124, 0, .07);
}

html[data-theme="dark"]:root {
    --theme-color: #d86a4e;
    --theme-color-hover: #e07d63;
    --color-link: #d86a4e;
    --color-link-hover: #e07d63;

    --bg-body: #1c1916;
    --bg-card: #26221d;
    --bg-secondary: #2c2822;
    --bg-hover: #332e27;

    --text-primary: #eae3d6;
    --text-secondary: #bdb4a4;
    --text-tertiary: #978e7e;
    --text-muted: #746d60;
    --text-content: #ccc3b4;
    --caption-color: #eae3d6;

    --border-primary: #38332b;
    --border-secondary: #312d26;
    --border-input: #454038;
    --border-hover: #575146;

    --xb-top-bg: rgba(224, 169, 60, .1);
}

/* 全局基调 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   平台彩签（.mb-tag，由 mb_platform_tag() 输出）
   浅底深字、小号、方角偏圆，12 平台 + 兜底
   ============================================================ */
.mb-tag {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.7;
    white-space: nowrap;
    font-style: normal;
}
.mb-tag[data-p="jd"]    { background: #fdeceb; color: #c2332a; }
.mb-tag[data-p="tb"]    { background: #fff1e6; color: #d35400; }
.mb-tag[data-p="pdd"]   { background: #fdecf2; color: #c4295a; }
.mb-tag[data-p="mt"]    { background: #fff7dc; color: #9a6b00; }
.mb-tag[data-p="elm"]   { background: #e9f3ff; color: #1769c2; }
.mb-tag[data-p="zfb"]   { background: #e7f1ff; color: #145fc4; }
.mb-tag[data-p="wx"]    { background: #e6f6ec; color: #0f7f43; }
.mb-tag[data-p="dy"]    { background: #ededee; color: #333333; }
.mb-tag[data-p="ysf"]   { background: #fdeaea; color: #c22626; }
.mb-tag[data-p="bank"]  { background: #eceffa; color: #344e9c; }
.mb-tag[data-p="vip"]   { background: #f1ebfc; color: #6a3cbb; }
.mb-tag[data-p="tel"]   { background: #e4f5f2; color: #0c7d70; }
.mb-tag[data-p="other"] { background: #f0ebe0; color: #857863; }

html[data-theme="dark"] .mb-tag {
    background: rgba(255, 255, 255, .08);
    color: #d6ccbb;
}
html[data-theme="dark"] .mb-tag[data-p="jd"]    { background: rgba(194, 51, 42, .18);  color: #f08a80; }
html[data-theme="dark"] .mb-tag[data-p="tb"]    { background: rgba(211, 84, 0, .18);   color: #f0a066; }
html[data-theme="dark"] .mb-tag[data-p="pdd"]   { background: rgba(196, 41, 90, .18);  color: #ec82ab; }
html[data-theme="dark"] .mb-tag[data-p="mt"]    { background: rgba(154, 107, 0, .2);   color: #e6c25e; }
html[data-theme="dark"] .mb-tag[data-p="elm"]   { background: rgba(23, 105, 194, .2);  color: #7db4ec; }
html[data-theme="dark"] .mb-tag[data-p="zfb"]   { background: rgba(20, 95, 196, .2);   color: #79a9e8; }
html[data-theme="dark"] .mb-tag[data-p="wx"]    { background: rgba(15, 127, 67, .22);  color: #6cc797; }
html[data-theme="dark"] .mb-tag[data-p="dy"]    { background: rgba(255, 255, 255, .14);color: #d6d6d6; }
html[data-theme="dark"] .mb-tag[data-p="ysf"]   { background: rgba(194, 38, 38, .18);  color: #ef8b8b; }
html[data-theme="dark"] .mb-tag[data-p="bank"]  { background: rgba(52, 78, 156, .22);  color: #95a6de; }
html[data-theme="dark"] .mb-tag[data-p="vip"]   { background: rgba(106, 60, 187, .2);  color: #b395e6; }
html[data-theme="dark"] .mb-tag[data-p="tel"]   { background: rgba(12, 125, 112, .2);  color: #5dbcb0; }
html[data-theme="dark"] .mb-tag[data-p="other"] { background: rgba(255, 255, 255, .08); color: #b3a894; }

/* ============================================================
   侧栏卡片通用骨架（xb_hot / xb_follow / xb_cats 共用）
   ============================================================ */
.xb-side {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius);
    margin-bottom: 14px;
    overflow: hidden;
}
.xb-side-title {
    margin: 0;
    padding: 12px 14px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--caption-color);
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.xb-side-sub {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}

/* ============================================================
   框架微调（克制，仅做质感统一）
   ============================================================ */
a {
    transition: color .15s ease;
}

/* 让卡片在暖纸上分界更柔和 */
.xb-board .xb-list-box,
.xb-side {
    box-shadow: 0 1px 2px rgba(60, 48, 30, .03);
}

/* ============================================================
   文章单页：主标题挂平台彩签
   ============================================================ */
.single-article__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.single-article__title .mb-tag {
    flex: 0 0 auto;
    font-size: 12px;
}
.mb-single-title-txt {
    min-width: 0;
}
