/* ============================================================
 * PureBlog 会员中心插件 · 前台样式
 * v1.8.6 主题契合改版（本次）：
 *   · 令牌对齐 —— 不再自定义与主题同名的令牌（--primary / --card / --border /
 *     --text / --radius / --font …），改为继承主题 :root：站长在后台改主色、
 *     圆角或切换深浅色，会员中心自动跟随。兜底值统一写在 :where(:root)
 *     （特异性 0），仅当主题没定义该令牌时才生效。
 *   · 取消特效 —— v1.5.9 起的液态玻璃（backdrop-filter）、氛围光、镜面高光、
 *     头像旋转蒙版环、会员流动彩色昵称、发光投影全部移除；卡片回归
 *     「实底 + 细边框 + 极浅阴影」，与主题 .widget / .post-card 同一套观感。
 *   · 排版对齐 —— 按钮圆角、卡片圆角与阴影、区块间距统一取主题令牌。
 * 外壳：v1.5.11 起自动接入当前主题的页头页脚（融合模式，内容容器 .pbm-embed），
 *       主题文件缺失时回退插件自带外壳；页脚只保留版权行
 *       （v1.7.7 起友情链接块已随功能移除，融合 / 回退两种模式均不再输出）。
 * 布局：左侧竖排导航 + 右侧内容，全宽单栏（不含侧边栏）；
 *       仪表盘为「状态头 → 快捷操作 → 等宽图标指标卡（4×2）」。
 * 深浅色（html[data-theme="dark"]）与站点首页共用 pb_theme cookie，全站同步。
 * 历史：v1.5.9 移除外观皮肤；v1.5.11 接入主题页头页脚；
 *       v1.5.12 移除金币商城；v1.5.13 个人封面下线。
 * ============================================================ */

/* ============ 设计令牌（v1.8.6：对齐主题，不再自带一套） ============
   全部走 :where() 兜底 —— 特异性为 0，主题 :root 的同名令牌永远优先。
   · 当前主题 = PureBlog：主色 / 卡片 / 边框 / 圆角 / 阴影 / 字体全部取自主题；
   · 换成第三方主题、或主题文件缺失回退插件自带外壳：这里的默认值兜底，不会塌。
   注意：这里只定义「不覆盖主题」的默认值，绝不能在 .pbm-app / .pbm-body 上
   再写一遍同名令牌 —— 那会把主题取值盖掉，正是改版前不能与主题同步的原因。 */
:where(:root) {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #eff6ff;
    /* 主题把渐变叫 --gradient，插件内部统一用 --grad（不同名，不会自引用） */
    --grad: var(--gradient, linear-gradient(135deg, #3b82f6, #8b5cf6));

    --bg: #f3f4f6;
    --card: #ffffff;
    --text: #1f2937;
    --text-body: #374151;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --border: #e5e7eb;
    --soft: #f9fafb;

    /* 浮层实底令牌（v1.9.1）：提示气泡等「盖在内容之上」的面专用，皮肤永不改写。
       切勿再拿 --bg 当浮层的文字色 —— 透明系皮肤会把 --bg 置为 transparent，
       结果气泡只有底、没有字（正是 v1.9.0 前台保存提示看不见内容的根因）。 */
    --tip-bg: #1f2937;
    --tip-fg: #ffffff;

    /* 主题有 --shadow-sm/md/lg 三档，插件内部沿用单值 --shadow */
    --shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, .08));
    --radius: 10px;
    --radius-sm: 6px;
    --radius-pill: 50px;
    --transition: all .3s ease;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;

    /* 值色板：主题未定义，插件自用（用于徽章 / 指标卡 / 状态点） */
    --blue: #3b82f6;
    --green: #10b981;
    --amber: #f59e0b;
    --purple: #8b5cf6;
    --red: #ef4444;
    --cyan: #0891b2;
    --teal: #0d9488;
    --pink: #db2777;
    --indigo: #4f46e5;
    --orange: #f97316;
    --glow: rgba(59, 130, 246, .28);
    --blue-bg: #eff6ff;
    --green-bg: #ecfdf5;
    --amber-bg: #fffbeb;
    --purple-bg: #f5f3ff;
    --red-bg: #fef2f2;
    --cyan-bg: #ecfeff;
    --teal-bg: #effaf6;
    --pink-bg: #fdf2f8;
    --indigo-bg: #eef2ff;
    --orange-bg: #fff7ed;

    /* 别名（v1.7.8 起沿用，主题未定义，走各自兜底） */
    --line: var(--border, #e5e7eb);
    --surface-2: var(--soft, #f9fafb);
    --surface-3: rgba(148, 163, 184, .14);
}

:where([data-theme="dark"]) {
    --primary: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-light: rgba(96, 165, 250, .15);

    --bg: #0f1115;
    --card: #171a21;
    --text: #e8eaed;
    --text-body: #c9cdd4;
    --text-muted: #9aa1ac;
    --text-light: #7c838f;
    --border: #2a2f39;
    --soft: #1c2028;

    /* 深色下浮层反相：浅底深字（与主题 [data-theme="dark"] 的取值一致） */
    --tip-bg: #e8eaed;
    --tip-fg: #171a21;

    --blue: #3b82f6;
    --green: #10b981;
    --amber: #f59e0b;
    --purple: #8b5cf6;
    --red: #ef4444;
    --cyan: #22d3ee;
    --teal: #2dd4bf;
    --pink: #f472b6;
    --indigo: #818cf8;
    --orange: #fb923c;
    --glow: rgba(96, 165, 250, .3);
    --blue-bg: #142033;
    --green-bg: #052e22;
    --amber-bg: #36230a;
    --purple-bg: #221836;
    --red-bg: #3b1214;
    --cyan-bg: #0b2a33;
    --teal-bg: #0a2b27;
    --pink-bg: #341225;
    --indigo-bg: #1e1b4b;
    --orange-bg: #3a1f0b;
    --surface-3: rgba(148, 163, 184, .10);
}

.pbm-app {
    font-family: var(--font);
    color: var(--text-body);
    line-height: 1.7;
}

/* 元素统一 reset：
   .pbm-body * —— 独立外壳全页；
   .pbm-app *  —— 融合模式内容区（隔离主题 base 样式如 p{margin:0 0 1em} 渗入；
                  特异性 0,1,0 高于主题元素选择器，且晚于主题 main.css 加载）。
   独立模式下两者并存、取值一致，渲染结果不变。 */
.pbm-body * { margin: 0; padding: 0; box-sizing: border-box; }
.pbm-app * { margin: 0; padding: 0; box-sizing: border-box; }

/* 独立外壳模式（回退）：.pbm-body 即整页根，令牌沿用上面的 :where() 兜底 / 主题取值 */
.pbm-body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text-body);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============ 材质层（v1.8.6：取消液态玻璃特效） ============
   v1.5.9 引入的「氛围光 + 磨砂玻璃」整层撤销：所有承载内容的面回归主题一致的
   实底 + 细边框 + 极浅阴影，不再有半透明叠加、模糊与内高光。
   令牌名（--glass-*）保留 —— 历史引用与自检契约仍认得它们；取值已全部改为
   「不透明实底 / 零模糊 / 无高光 / 无光晕」，等价于完全没有玻璃效果。
   注意：--glass-shadow 仍需是合法阴影值列表，不能写 none
   （材质层是「var(--glass-shadow), inset …」的列表，写 none 会让整条声明失效）。 */

.pbm-app,
.pbm-body {
    --glass-bg: var(--card);
    --glass-bg-strong: var(--card);
    --glass-brd: var(--border);
    --glass-line: transparent;
    --glass-shade: transparent;
    --glass-blur: 0px;
    --glass-sat: 100%;
    --glass-shadow: var(--shadow, 0 1px 3px rgba(0, 0, 0, .08));
    --glass-sheen: none;
    --aura: none;
}

/* v1.8.6：氛围光承载层不再生成（--aura 已是 none，直接去掉伪元素即可） */
.pbm-app::before { content: none; }

[hidden] { display: none !important; }

/* ============ 顶栏（v1.5.9 插件自带的站点头，不依赖主题） ============ */

.pbm-top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

/* 与站点首页页头同构：站点名 + 主导航 + 工具区 */
.pbm-top-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.pbm-logo { flex: none; }

.pbm-logo a {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
}

.pbm-logo-badge {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    flex: none;
    background: var(--grad);
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pbm-logo-name { font-size: 1.02rem; font-weight: 700; color: var(--text); }

.pbm-nav-bar {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 2px;
    overflow: hidden;
}

.pbm-nav-bar a {
    padding: 6px 11px;
    border-radius: 8px;
    font-size: .88rem;
    color: var(--text-body);
    text-decoration: none;
    white-space: nowrap;
}

.pbm-nav-bar a:hover { background: var(--soft); color: var(--primary); }

.pbm-top-tools { display: flex; gap: 8px; flex: none; margin-left: auto; }

.pbm-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-body);
    cursor: pointer;
    text-decoration: none;
    transition: .18s;
}

.pbm-icon-btn:hover { border-color: var(--primary); color: var(--primary); }

.pbm-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pbm-i-sun { display: none; }
[data-theme="dark"] .pbm-i-moon { display: none; }
[data-theme="dark"] .pbm-i-sun { display: block; }

/* 顶栏搜索面板（点击放大镜展开，提交到站点搜索） */
.pbm-search-panel { display: none; border-top: 1px solid var(--border); }
.pbm-search-panel.is-open { display: block; }

.pbm-search-wrap { height: auto; padding-top: 12px; padding-bottom: 12px; }

.pbm-search-form { display: flex; gap: 8px; }

.pbm-search-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    background: var(--soft);
    color: var(--text);
    font-size: .9rem;
    font-family: inherit;
    outline: none;
}

.pbm-search-form input:focus { border-color: var(--primary); }

.pbm-search-form button {
    flex: none;
    border: none;
    border-radius: 8px;
    padding: 9px 22px;
    background: var(--primary);
    color: #fff;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
}

.pbm-search-form button:hover { opacity: .9; }

/* ============ 容器 ============ */

.pbm-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px 56px;
    flex: 1;
}

/* ============ 融合模式的内容容器（v1.5.11） ============
   当前主题的页头页脚已接管整页外壳，这里只负责内容区宽度与内边距，
   与独立外壳的 .pbm-container 保持同一栅格（v1.9.3 起与站点宽度同步：
   标准 1280px / 宽屏 1520px），两种模式观感一致。 */
.pbm-embed {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px 56px;
}

/* v1.9.3 宽度全站同步：后台「默认宽度」一次设置全站生效 ——
   融合模式 body 类由主题页头输出（PureBlog v1.9.55 起全站），
   回退模式由插件自算 cookie / 模板设置后挂到自己的 <body> 上 */
body.pb-home-wide .pbm-container,
body.pb-home-wide .pbm-embed,
body.pb-home-wide .pbm-top-inner { max-width: 1520px; }

/* ============ 卡片 ============ */

.pbm-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ============ 未登录 ============ */

.pbm-visitor {
    padding: 56px 28px;
    text-align: center;
}

.pbm-visitor h1 {
    font-size: 1.7rem;
    color: var(--text);
}

.pbm-visitor-sub { color: var(--text-light); margin: 8px 0 24px; }

.pbm-visitor-feats {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    max-width: 640px;
    margin: 0 auto 28px;
}

.pbm-visitor-feats li {
    background: var(--soft);
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: .88rem;
    color: var(--text-body);
}

.pbm-visitor-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ 会员卡片头（v1.5.13：个人封面已下线） ============ */

.pbm-head { margin-bottom: 16px; }

.pbm-id {
    display: flex;
    gap: 16px;
    padding: 22px 24px 18px;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.pbm-avatar-wrap { position: relative; flex: none; }

.pbm-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 3px solid var(--card);
    background: var(--soft);
    object-fit: cover;
    display: block;
}

/* v1.8.6：头像悬停的旋转蒙版环已取消（原彩色锥形渐变 + 旋转关键帧一并移除），
   头像回归简洁圆形 —— 身份由边框与右下认证角标表达，不再叠特效。 */

.pbm-badge-cert {
    position: absolute;
    right: 2px;
    bottom: 2px;
    z-index: 1;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card);
}

.pbm-badge-cert svg { width: 14px; height: 14px; fill: #fff; stroke: none; }

.pbm-id-main { flex: 1; min-width: 220px; padding-bottom: 4px; }

.pbm-nick-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.pbm-nick-row h1 { font-size: 1.25rem; color: var(--text); }

/* v1.8.6：会员流动彩色昵称已取消 —— 改为主题主色的加粗昵称。
   会员身份仍由昵称后的 VIP 徽章表达，不再靠动效 / 渐变抢视觉。 */
.pbm-vip-name {
    color: var(--primary);
    font-weight: 700;
}

.pbm-id-sub { font-size: .82rem; color: var(--text-light); margin: 2px 0 6px; }

.pbm-online-row { display: flex; align-items: center; gap: 8px; }

.pbm-online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
}

.pbm-online-dot.is-online { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.pbm-online-dot.is-away { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }
.pbm-online-dot.is-busy { background: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.pbm-online-dot.is-offline { background: var(--text-light); box-shadow: 0 0 0 3px var(--soft); }

.pbm-online-select {
    border: 1px solid var(--border);
    background: var(--soft);
    color: var(--text-body);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .82rem;
    cursor: pointer;
}

/* ============ 徽章 ============ */

.pbm-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    padding: 2px 10px;
    line-height: 1.6;
    white-space: nowrap;
}

/* v1.5.9：等级配色扩到 10 种（对应预设 10 级阶梯） */
.pbm-badge-level.c-blue { background: var(--blue-bg); color: var(--blue); }
.pbm-badge-level.c-cyan { background: var(--cyan-bg); color: var(--cyan); }
.pbm-badge-level.c-teal { background: var(--teal-bg); color: var(--teal); }
.pbm-badge-level.c-green { background: var(--green-bg); color: var(--green); }
.pbm-badge-level.c-indigo { background: var(--indigo-bg); color: var(--indigo); }
.pbm-badge-level.c-purple { background: var(--purple-bg); color: var(--purple); }
.pbm-badge-level.c-pink { background: var(--pink-bg); color: var(--pink); }
.pbm-badge-level.c-amber { background: var(--amber-bg); color: var(--amber); }
.pbm-badge-level.c-orange { background: var(--orange-bg); color: var(--orange); }
.pbm-badge-level.c-red { background: var(--red-bg); color: var(--red); }

/* v1.5.9 会员（VIP）徽章：有效会员的昵称旁展示 */
.pbm-badge-vip {
    gap: 4px;
    color: #fff;
    background: var(--amber);
}

.pbm-badge-vip svg {
    width: 12px;
    height: 12px;
    flex: none;
    fill: currentColor;
}

.pbm-badge-custom {
    background: var(--purple-bg);
    color: var(--purple);
    font-size: .68rem;
    border: 1px dashed var(--purple);
}

/* v1.1.0 认证名称徽章：已认证用户的昵称旁展示（优先于等级） */
.pbm-badge-certname {
    background: var(--orange);
    color: #fff;
    gap: 4px;
    border: none;
}

.pbm-badge-certname svg {
    width: 12px;
    height: 12px;
    fill: #fff;
    stroke: none;
    flex: none;
}

/* v1.6.0 自定义头衔徽章 / 勋章图标徽章：与等级共用 10 色板 */
.pbm-badge-title.c-blue,   .pbm-badge-icon.c-blue   { background: var(--blue-bg);   color: var(--blue); }
.pbm-badge-title.c-cyan,   .pbm-badge-icon.c-cyan   { background: var(--cyan-bg);   color: var(--cyan); }
.pbm-badge-title.c-teal,   .pbm-badge-icon.c-teal   { background: var(--teal-bg);   color: var(--teal); }
.pbm-badge-title.c-green,  .pbm-badge-icon.c-green  { background: var(--green-bg);  color: var(--green); }
.pbm-badge-title.c-indigo, .pbm-badge-icon.c-indigo { background: var(--indigo-bg); color: var(--indigo); }
.pbm-badge-title.c-purple, .pbm-badge-icon.c-purple { background: var(--purple-bg); color: var(--purple); }
.pbm-badge-title.c-pink,   .pbm-badge-icon.c-pink   { background: var(--pink-bg);   color: var(--pink); }
.pbm-badge-title.c-amber,  .pbm-badge-icon.c-amber  { background: var(--amber-bg);  color: var(--amber); }
.pbm-badge-title.c-orange, .pbm-badge-icon.c-orange { background: var(--orange-bg); color: var(--orange); }
.pbm-badge-title.c-red,    .pbm-badge-icon.c-red    { background: var(--red-bg);    color: var(--red); }

/* v1.6.0 自定义头衔：实心描边，视觉上比等级更「专属」 */
.pbm-badge-title {
    gap: 4px;
    border: 1px solid currentColor;
    font-weight: 700;
    letter-spacing: .2px;
}

.pbm-badge-title svg { width: 12px; height: 12px; fill: currentColor; stroke: none; flex: none; }

/* v1.6.0 勋章图标徽章：昵称后只显示圆形图标，细节在 title 气泡里 */
.pbm-badge-icon {
    padding: 2px 4px;
    gap: 0;
}

.pbm-badge-icon svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }

.pbm-badge-icon img {
    height: 1.05em;
    width: auto;
    margin: 0;
    border-radius: 50%;
    vertical-align: -0.18em;
}

/* v1.2.0 等级徽章 / 等级统计中的自定义图标
   （v1.5.6 高度跟随所在文字行高自适应、宽度按原图比例 auto，图标完整显示不裁切） */
.pbm-badge img,
.pbm-stat-level b img {
    height: 1.35em;
    width: auto;
    border-radius: 3px;
    vertical-align: -0.22em;
    margin-right: 4px;
    flex: none;
    object-fit: contain;
}

/* 认证面板中高亮的认证名称 */
.pbm-cert-title {
    color: #ef4444;
    font-weight: 700;
}

.pbm-title-input {
    flex: 1;
    min-width: 160px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 10px;
    background: var(--card);
    color: var(--text);
    font-size: .84rem;
    font-family: inherit;
}

.pbm-title-input:focus { border-color: var(--primary); }

/* ============ 骨架：左侧竖排导航 + 右侧内容（v1.5.7 全宽单栏） ============ */

.pbm-shell {
    display: grid;
    grid-template-columns: 212px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.pbm-side {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 12px;
}

.pbm-nav {
    display: grid;
    gap: 2px;
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.pbm-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    background: transparent;
    color: var(--text-body);
    font-size: .9rem;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    transition: .16s;
    /* v1.9.3：激活底色逐项配色 —— 局部色调变量，与指标卡同一套 10 色板令牌 */
    --tone: var(--primary);
    --tone-bg: var(--soft);
}

.pbm-tab svg {
    width: 17px;
    height: 17px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .8;
}

.pbm-tab.t-blue   { --tone: var(--blue);   --tone-bg: var(--blue-bg); }
.pbm-tab.t-green  { --tone: var(--green);  --tone-bg: var(--green-bg); }
.pbm-tab.t-amber  { --tone: var(--amber);  --tone-bg: var(--amber-bg); }
.pbm-tab.t-purple { --tone: var(--purple); --tone-bg: var(--purple-bg); }
.pbm-tab.t-red    { --tone: var(--red);    --tone-bg: var(--red-bg); }
.pbm-tab.t-cyan   { --tone: var(--cyan);   --tone-bg: var(--cyan-bg); }
.pbm-tab.t-teal   { --tone: var(--teal);   --tone-bg: var(--teal-bg); }
.pbm-tab.t-pink   { --tone: var(--pink);   --tone-bg: var(--pink-bg); }
.pbm-tab.t-indigo { --tone: var(--indigo); --tone-bg: var(--indigo-bg); }
.pbm-tab.t-orange { --tone: var(--orange); --tone-bg: var(--orange-bg); }

.pbm-tab:hover { background: var(--tone-bg); color: var(--tone); }
.pbm-tab:hover svg { opacity: 1; }

.pbm-tab.is-active {
    background: var(--tone);
    color: #fff;
    font-weight: 600;
}

.pbm-tab.is-active svg { opacity: 1; }

.pbm-tab-dot {
    margin-left: auto;
    display: inline-block;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: .68rem;
    font-style: normal;
    text-align: center;
    padding: 0 4px;
}

/* v1.5.9：外观风格（皮肤）选择器样式已移除 —— 导航区只保留「返回首页」 */

/* 返回首页（导航区底部） */
.pbm-side-home {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-light);
    font-size: .84rem;
    text-decoration: none;
    transition: .16s;
}

.pbm-side-home svg {
    width: 16px;
    height: 16px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pbm-side-home:hover { border-color: var(--primary); color: var(--primary); }

.pbm-content { min-width: 0; }

.pbm-panel { display: none; }
.pbm-panel.is-active { display: block; }

/* ============ 仪表盘（v1.5.9：状态头 → 快捷操作 → 等宽图标指标卡） ============ */

.pbm-dash-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.pbm-dash-head > * { position: relative; z-index: 1; }

.pbm-dash-date {
    display: inline-block;
    font-size: .74rem;
    letter-spacing: .12em;
    color: var(--text-light);
}

.pbm-dash-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.01em;
    margin: 3px 0 4px;
}

.pbm-dash-sub { font-size: .85rem; color: var(--text-light); }
.pbm-dash-sub b { color: var(--text); font-variant-numeric: tabular-nums; }

.pbm-dash-head-ops { flex: none; }

.pbm-dash-ok {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--green);
    background: var(--green-bg);
}

.pbm-dash-ok svg {
    width: 15px;
    height: 15px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 等宽指标网格：v1.9.7 起改 auto-fill 自适应网格（与「我的勋章」勋章墙 .pbm-badges-lg 同一排版词汇），
   不再依赖 Bootstrap 栅格列数；等级卡（pbm-metric-level）回归网格内 */
.pbm-dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 0;
}

.pbm-metric {
    --tone: var(--blue);
    --tone-bg: var(--blue-bg);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 15px 16px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.pbm-metric > * { position: relative; z-index: 1; }

/* 悬停观感与主题 .post-card / .widget 一致：轻微上浮 + 加深阴影 */
.pbm-metric:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, .1));
}

.pbm-metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 11px;
    color: var(--tone);
    background: var(--tone-bg);
}

.pbm-metric-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pbm-metric-val {
    font-size: 1.72rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text);
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.pbm-metric-val em {
    font-size: .5em;
    font-style: normal;
    font-weight: 600;
    color: var(--text-light);
    margin-left: 2px;
    letter-spacing: 0;
}

.pbm-metric-label { font-size: .84rem; font-weight: 600; color: var(--text-body); }

.pbm-metric-sub { font-size: .76rem; color: var(--text-light); }

/* 等级卡：名称较长（如「Lv4 博学多识」），降一档字号并让进度条随行 */
.pbm-metric-level .pbm-metric-val {
    font-size: 1.04rem;
    line-height: 1.5;
    font-variant-numeric: normal;
}

.pbm-metric-val img {
    height: 1.3em;
    width: auto;
    vertical-align: -.24em;
    margin-right: 4px;
    border-radius: 3px;
    object-fit: contain;
}

.pbm-metric-sub .pbm-bar { margin: 1px 0 5px; }

/* 指标色调：图标底色 + 描边色成对出现 */
.pbm-metric.t-blue { --tone: var(--blue); --tone-bg: var(--blue-bg); }
.pbm-metric.t-green { --tone: var(--green); --tone-bg: var(--green-bg); }
.pbm-metric.t-amber { --tone: var(--amber); --tone-bg: var(--amber-bg); }
.pbm-metric.t-purple { --tone: var(--purple); --tone-bg: var(--purple-bg); }
.pbm-metric.t-red { --tone: var(--red); --tone-bg: var(--red-bg); }
.pbm-metric.t-cyan { --tone: var(--cyan); --tone-bg: var(--cyan-bg); }
.pbm-metric.t-teal { --tone: var(--teal); --tone-bg: var(--teal-bg); }
.pbm-metric.t-pink { --tone: var(--pink); --tone-bg: var(--pink-bg); }

.pbm-metric.t-indigo { --tone: var(--indigo); --tone-bg: var(--indigo-bg); }
.pbm-metric.t-orange { --tone: var(--orange); --tone-bg: var(--orange-bg); }

/* 快捷操作条（v1.5.9：由页面底部上移到状态头下方，进入即可见） */
.pbm-dash-ops {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 13px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.pbm-dash-ops-label { font-size: .8rem; font-weight: 600; color: var(--text-light); }
.pbm-dash-ops .pbm-quick { display: flex; flex-wrap: wrap; gap: 8px; }

/* v1.5.9 会员状态行（状态头内）*/
.pbm-dash-vip { margin-top: 8px; }

.pbm-vip-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .78rem;
    color: var(--text-light);
    background: var(--soft);
    border: 1px dashed var(--border);
}

.pbm-vip-chip a { color: var(--primary); font-weight: 600; text-decoration: none; }
.pbm-vip-chip a:hover { text-decoration: underline; }

.pbm-vip-chip.is-on {
    color: #fff;
    background: var(--amber);
    border-style: solid;
    border-color: transparent;
    font-weight: 600;
}

.pbm-vip-chip.is-on svg { width: 13px; height: 13px; fill: currentColor; }
.pbm-vip-chip.is-off { color: var(--red); background: var(--red-bg); border-color: rgba(239, 68, 68, .35); }

/* ============ 统计网格 ============ */

.pbm-grid { display: grid; gap: 12px; margin-bottom: 16px; }
.pbm-grid-4 { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.pbm-grid-2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.pbm-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 16px;
    box-shadow: var(--shadow);
}

.pbm-stat b { display: block; font-size: 1.5rem; color: var(--text); font-variant-numeric: tabular-nums; }
.pbm-stat span { font-size: .8rem; color: var(--text-light); display: block; margin-top: 2px; }
.pbm-stat b.c-blue { color: var(--blue); }
.pbm-stat b.c-green { color: var(--green); }
.pbm-stat b.c-amber { color: var(--amber); }
.pbm-stat b.c-purple { color: var(--purple); }
.pbm-stat b.c-red { color: var(--red); }

/* 等级卡片：等级名较长（如「Lv4 博学多识」），缩小一档避免折行 */
.pbm-stat-level b { font-size: 1.08rem; line-height: 1.5; }

.pbm-bar {
    display: block;
    height: 6px;
    background: var(--soft);
    border-radius: 999px;
    overflow: hidden;
    margin: 6px 0 4px;
}

.pbm-bar i {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-pill);
    transition: width .4s;
}

/* ============ 区块 ============ */

.pbm-block {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin-bottom: 16px;
}

.pbm-block h3 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pbm-block h3::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--grad);
}

.pbm-block h4 { font-size: .9rem; color: var(--text); margin-bottom: 8px; }

.pbm-count { font-size: .78rem; color: var(--text-light); font-weight: 400; }

.pbm-tip { font-size: .8rem; color: var(--text-light); margin-top: 10px; }

/* ============ 财富 ============ */

.pbm-wallet {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.pbm-wallet-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.pbm-wallet-icon svg { width: 24px; height: 24px; fill: none; stroke-width: 1.6; stroke: currentColor; }
.pbm-wallet-icon.c-blue { background: var(--blue-bg); color: var(--blue); }
.pbm-wallet-icon.c-amber { background: var(--amber-bg); color: var(--amber); }

.pbm-wallet b { display: block; font-size: 1.6rem; color: var(--text); font-variant-numeric: tabular-nums; }
.pbm-wallet span { font-size: .82rem; color: var(--text-light); }

/* v1.9.3 等级阶梯改为双排（两列）展示，窄屏回落单列 */
.pbm-levels { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }

.pbm-levels li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px dashed transparent;
}

.pbm-levels li.is-current {
    border-color: var(--primary);
    background: var(--primary-light);
}

.pbm-level-min { font-size: .8rem; color: var(--text-light); }

@media (max-width: 640px) {
    .pbm-levels { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================
   v1.9.3 会员中心首页「记录」卡片 + 记录弹窗（充值记录 / 金币记录）
   ============================================================ */
.pbm-dash-recs { margin-bottom: 0; }
.pbm-stat.is-link {
    width: 100%;
    appearance: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, transform .15s ease;
}
.pbm-stat.is-link:hover { border-color: var(--primary); transform: translateY(-1px); }
.pbm-stat.is-link:hover b { color: var(--primary); }
.pbm-stat-more { display: block; font-style: normal; font-size: .76rem; color: var(--text-light); margin-top: 8px; }

/* 记录弹窗：遮罩 + 居中卡片（与扫码支付弹窗同一语言）；
   v1.9.4：遮罩加深、盒体不透明实底（皮肤下 --card 为 transparent，必须用 --tip-bg 兜底）、禁止滚动条（内容翻页查看） */
.pbm-rec-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .55);
}
.pbm-rec-modal[hidden] { display: none; }
.pbm-rec-box {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: min(76vh, 640px);
    overflow: hidden;
    padding: 22px 20px 18px;
    border-radius: var(--radius);
    background: var(--tip-bg, #fff);
    color: var(--tip-fg, var(--text));
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg, 0 10px 25px rgba(0, 0, 0, .18));
    text-align: left;
    animation: pbmQrIn .22s ease-out;
}
@media (prefers-reduced-motion: reduce) {
    .pbm-rec-box { animation: none; }
}
.pbm-rec-box h4 { margin: 0 0 12px; font-size: 1.02rem; color: var(--text); }
.pbm-rec-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}
.pbm-rec-close:hover { background: var(--soft); color: var(--text); }

/* v1.9.4 说明类弹窗内容（积分 / 签到 / 等级） */
.pbm-card-info b { display: block; font-size: 1.06rem; color: var(--primary); margin: 4px 0 10px; }
.pbm-card-info p { margin: 0; font-size: .88rem; line-height: 1.75; color: var(--text-body); }

/* v1.9.4 指标卡改为 <button>：重置浏览器默认样式，外观与原卡片一致 */
button.pbm-metric {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: inherit;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

/* v1.9.4 记录卡片图标（右上角调色块） */
.pbm-stat { position: relative; }
.pbm-stat-icon {
    position: absolute;
    top: 16px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--soft);
    color: var(--primary);
}
.pbm-stat-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 卡密兑换子面板（融入「在线充值」栏底部） */
.pbm-redeem { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.pbm-redeem-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pbm-redeem-head b { font-size: .95rem; }
.pbm-redeem-head span { font-size: .78rem; color: var(--text-light); }

/* ============ 列表 ============ */

.pbm-list { list-style: none; display: grid; gap: 8px; }

.pbm-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--soft);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: .15s;
}

.pbm-list li:hover { border-color: var(--border); }

.pbm-list li.pbm-empty {
    color: var(--text-light);
    font-size: .86rem;
    justify-content: center;
}

.pbm-list-h li { justify-content: space-between; }

.pbm-list-main { flex: 1; min-width: 0; }
.pbm-list-main a { color: var(--text-body); text-decoration: none; font-weight: 600; word-break: break-all; }
.pbm-list-main a:hover { color: var(--primary); }
.pbm-list-main small { display: block; color: var(--text-light); font-size: .78rem; }

.pbm-list-ops { flex: none; }

/* ============ 搜索 ============ */

.pbm-search { display: flex; gap: 8px; margin-bottom: 12px; }

.pbm-search input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    background: var(--soft);
    color: var(--text);
    font-size: .9rem;
    outline: none;
}

.pbm-search input:focus { border-color: var(--primary); }

/* ============ 按钮 ============ */

.pbm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-body);
    border-radius: var(--radius);
    padding: 7px 18px;
    font-size: .88rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    line-height: 1.5;
}

.pbm-btn:hover { border-color: var(--primary); color: var(--primary); }
.pbm-btn:disabled { opacity: .55; cursor: not-allowed; }

/* 主按钮与主题 .btn 同观感：主色实底 + 悬停加深（不再是渐变 + 发光投影） */
.pbm-btn-primary {
    background: var(--primary);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.pbm-btn-primary:hover {
    background: var(--primary-hover, #2563eb);
    border-color: transparent;
    color: #fff;
}

.pbm-btn-ghost { background: transparent; }
.pbm-btn-sm { padding: 4px 14px; font-size: .8rem; }
.pbm-btn-lg { padding: 11px 44px; font-size: 1rem; }

.pbm-btn-pass { border-color: var(--green); color: var(--green); }
.pbm-btn-reject { border-color: var(--red); color: var(--red); }

.pbm-quick { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ 表单 ============ */

.pbm-form label { display: block; font-size: .84rem; color: var(--text-light); margin: 12px 0 6px; }

.pbm-form input[type="text"],
.pbm-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    background: var(--soft);
    color: var(--text);
    font-size: .9rem;
    font-family: inherit;
    outline: none;
    resize: vertical;
}

.pbm-form input:focus, .pbm-form textarea:focus { border-color: var(--primary); }

.pbm-form .pbm-btn { margin-top: 14px; }

.pbm-switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    font-size: .9rem;
    color: var(--text-body);
    cursor: pointer;
}

.pbm-switch-row input { width: 16px; height: 16px; accent-color: var(--primary); }

/* ============ 签到 ============ */

.pbm-sign-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
}

.pbm-sign-main {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    text-align: center;
}

.pbm-sign-main h3 { justify-content: center; }
.pbm-sign-main h3::before { display: none; }
.pbm-sign-main p { color: var(--text-light); font-size: .9rem; margin: 10px 0 18px; }
.pbm-sign-main p b { color: var(--text); font-variant-numeric: tabular-nums; }

.pbm-sign-days {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
}

.pbm-sign-days ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 6px;
    max-height: 220px;
    overflow: auto;
}

.pbm-sign-days li {
    text-align: center;
    font-size: .78rem;
    color: var(--text-body);
    background: var(--green-bg);
    border-radius: 6px;
    padding: 4px 0;
}

.pbm-sign-days li.pbm-empty { background: var(--soft); color: var(--text-light); grid-column: 1 / -1; padding: 12px; }

/* ============ 认证 ============ */

.pbm-cert-state {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--soft);
    border: 1px dashed var(--border);
    flex-wrap: wrap;
}

.pbm-cert-state b { color: var(--text); }
.pbm-cert-state p { font-size: .86rem; color: var(--text-light); flex: 1; min-width: 200px; }

.pbm-cert-state.is-approved { background: var(--green-bg); border-color: var(--green); }
.pbm-cert-state.is-approved b { color: var(--green); }
.pbm-cert-state.is-pending { background: var(--blue-bg); border-color: var(--blue); }
.pbm-cert-state.is-pending b { color: var(--blue); }
.pbm-cert-state.is-rejected { background: var(--red-bg); border-color: var(--red); }
.pbm-cert-state.is-rejected b { color: var(--red); }

.pbm-cert-msg {
    font-size: .86rem;
    color: var(--text-body);
    background: var(--soft);
    border-radius: 6px;
    padding: 6px 10px;
    margin-top: 6px;
    word-break: break-all;
}

.pbm-admin { border-color: var(--purple); }

.pbm-cert-list { list-style: none; display: grid; gap: 10px; }

.pbm-cert-list li {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    background: var(--soft);
}

.pbm-cert-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pbm-cert-row-head b { color: var(--text); }
.pbm-cert-row-head span { font-size: .78rem; color: var(--text-light); }

.pbm-cert-ops { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.pbm-reply-input {
    flex: 1;
    min-width: 180px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 10px;
    background: var(--card);
    color: var(--text);
    font-size: .84rem;
    outline: none;
}

.pbm-reply-input:focus { border-color: var(--primary); }

/* ============ 上传 ============ */

/* v1.9.3 头像上传重排：圆头像 + 右侧标题/说明/按钮，卡片色描边 + 细环 */
.pbm-upload {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.pbm-upload-preview {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--card, #fff);
    box-shadow: 0 0 0 1px var(--border), 0 2px 8px rgba(0, 0, 0, .06);
    background: var(--soft);
    flex: none;
}

.pbm-upload-side b { display: block; font-size: .92rem; margin-bottom: 4px; }
.pbm-upload-side p { font-size: .8rem; color: var(--text-light); margin: 0 0 10px; max-width: 420px; }
.pbm-upload-ops { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ 分页 ============ */

.pbm-pager { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }

.pbm-pager button {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-body);
    border-radius: 8px;
    padding: 5px 14px;
    font-size: .84rem;
    cursor: pointer;
}

.pbm-pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ============ Toast ============ */

.pbm-toast {
    position: fixed;
    left: 50%;
    /* v1.9.1：由贴底改为贴顶（所有保存 / 操作结果提示统一在页面上方出现）。
       顶层偏移让开主题固定顶栏：主题有 --header-height（PureBlog = 70px，手机 56px），
       第三方主题没有该令牌时用 64px 兜底，气泡不会被顶栏压住。 */
    top: calc(var(--header-height, 64px) + 14px);
    bottom: auto;
    transform: translateX(-50%);
    /* v1.9.1：浮层必须用「皮肤永不改写」的实底令牌，不能用 --bg 当文字色 ——
       透明系皮肤把 --bg 置为 transparent，会出现「有气泡、无文字」。
       行内再兜一层不透明值，保证任何主题 / 回退外壳下都看得见。 */
    background: var(--tip-bg, #1f2937);
    color: var(--tip-fg, #ffffff);
    border-radius: 999px;
    padding: 10px 24px;
    font-size: .88rem;
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere; /* 长文案（如带订单号）不撑破胶囊 */
    box-shadow: var(--shadow-lg, 0 10px 25px rgba(0, 0, 0, .1));
    z-index: 99999; /* v1.8.5：99 会被模板顶栏/弹窗盖住，提到全站最高 */
    max-width: 86vw;
    pointer-events: none; /* 只做提示，不挡下层点击 */
}

/* 入场：从上方轻落 + 淡入（v1.9.1）。把位移并进 translate，别覆盖居中用的 -50%。 */
@keyframes pbmToastIn {
    from { opacity: 0; transform: translate(-50%, -8px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}
.pbm-toast:not([hidden]) {
    animation: pbmToastIn .22s ease-out both;
}
@media (prefers-reduced-motion: reduce) {
    .pbm-toast:not([hidden]) { animation: none; }
}

/* ============ 页脚 ============ */

.pbm-footer {
    text-align: center;
    color: var(--text-light);
    font-size: .8rem;
    padding: 20px 16px 28px;
    border-top: 1px solid var(--border);
    background: var(--card);
}

/* ============ 面层统一（v1.8.6：玻璃材质应用层已删除） ============
   原 v1.5.9 用一条选择器列表把所有「面」统一刷成磨砂玻璃，并借位置靠后覆盖各
   组件自身的实底定义。改版后该层整体撤销，各组件回到自己声明、与主题同构的
   实底卡片：背景 var(--card) / 边框 var(--border) / 圆角 var(--radius) /
   阴影 var(--shadow)（= 主题 --shadow-sm）。
   下面只补齐原先依赖该层取色的两处，让它们各自成立。 */

/* 会员卡与档位卡：自身只声明了底色与间距，这里补齐主题式底 / 边框 / 阴影
   （.pbm-vip-card 自己的 background 更靠后，会覆盖这里的 var(--card)） */
.pbm-vip-card,
.pbm-vip-plan {
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* 幽灵按钮：透明底 + 悬停主色描边（与主题 .btn-ghost 同思路） */
.pbm-btn-ghost { background: transparent; }

/* ============ 会员特权（v1.5.9） ============ */

.pbm-vip-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    background: var(--amber-bg);
}

.pbm-vip-card.is-on { box-shadow: var(--shadow), 0 0 0 3px rgba(245, 158, 11, .18); }

.pbm-vip-card-main { display: flex; align-items: center; gap: 14px; }

.pbm-vip-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--amber);
}

.pbm-vip-card-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pbm-vip-card h3 { font-size: 1.06rem; color: var(--text); margin-bottom: 3px; }
.pbm-vip-card p { font-size: .84rem; color: var(--text-light); }
.pbm-vip-card p b { color: var(--text); font-variant-numeric: tabular-nums; }

.pbm-vip-balance { font-size: .82rem; color: var(--text-light); }
.pbm-vip-balance b { color: var(--amber); font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.pbm-vip-plans {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.pbm-vip-plan {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 16px;
    border-radius: var(--radius);
}

.pbm-vip-plan.is-current { box-shadow: var(--shadow), 0 0 0 3px rgba(245, 158, 11, .18); }

.pbm-vip-plan header { display: flex; align-items: center; gap: 8px; }
.pbm-vip-plan header b { font-size: 1rem; color: var(--text); }

.pbm-vip-flag {
    font-size: .7rem;
    font-weight: 600;
    color: #fff;
    background: var(--amber);
    border-radius: var(--radius-pill);
    padding: 1px 9px;
}

.pbm-vip-price {
    font-size: 1.34rem;
    font-weight: 700;
    color: var(--amber);
    font-variant-numeric: tabular-nums;
}

.pbm-vip-price em { font-size: .52em; font-style: normal; font-weight: 500; color: var(--text-light); }

.pbm-vip-desc { font-size: .8rem; color: var(--text-light); line-height: 1.7; }

/* v1.7.8：方案卡底部按钮组 ——「金币开通」与「在线支付开通」并排，窄屏自动换行 */
.pbm-vip-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.pbm-vip-acts .pbm-btn { flex: 1 1 116px; margin-top: 0; }

/* 价格行里的「或 ¥xx」：金币价之外的在线支付价 */
.pbm-vip-or { font-size: .5em; font-style: normal; font-weight: 500; color: var(--text-light); margin: 0 5px; }
.pbm-vip-cash { font-size: .8em; font-weight: 800; color: var(--primary); }

/* ---------- v1.8.0：VIP / SVIP 两档卡片 ----------
   档位主色由 PHP 内联下发（--pbm-vip-c），标题、价格、顶部描边与权益圆点统一取用它，
   后台改一档配色就够了，不用碰 CSS。 */
.pbm-vip-plan { position: relative; }
.pbm-vip-plan::before {
    content: "";
    position: absolute; left: 0; right: 0; top: 0; height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--pbm-vip-c, var(--primary));
    opacity: .85;
}
.pbm-vip-t2::before { height: 4px; opacity: 1; }
.pbm-vip-plan header b { color: var(--pbm-vip-c, var(--text)); }
.pbm-vip-plan .pbm-vip-price { color: var(--pbm-vip-c, var(--amber)); }
.pbm-vip-plan .pbm-vip-cash { font-size: 1em; color: var(--pbm-vip-c, var(--primary)); }

/* 权益清单：一条一行，前面带档位色圆点 */
.pbm-vip-benefits { list-style: none; display: grid; gap: 5px; margin: 2px 0 4px; }
.pbm-vip-benefits li {
    position: relative; padding-left: 15px;
    font-size: .82rem; color: var(--text-light); line-height: 1.65;
}
.pbm-vip-benefits li::before {
    content: "";
    position: absolute; left: 0; top: 8px;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--pbm-vip-c, var(--primary));
}

/* ---------- v1.8.0：资料页新增字段（性别 / 生日 / 邮箱） ---------- */
.pbm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.pbm-form-row > div { min-width: 0; }
.pbm-form select,
.pbm-form input[type="date"],
.pbm-form input[type="email"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line, var(--border));
    border-radius: var(--radius-sm, 8px);
    background: var(--card);
    color: var(--text);
    font-size: .9rem;
    font-family: inherit;
}
.pbm-form select:focus,
.pbm-form input[type="date"]:focus,
.pbm-form input[type="email"]:focus {
    border-color: var(--primary);
    outline: none;
}
@media (max-width: 640px) { .pbm-form-row { grid-template-columns: 1fr; } }

/* ============ 页脚：版权行（v1.7.7 起友情链接块已随功能移除） ============ */

.pbm-footer-copy { font-size: .8rem; color: var(--text-light); }

/* ============ 响应式 ============ */

/* v1.9.4 指标网格断点已由 Bootstrap row-cols-*（md 3 列 / xl 4 列）接管 */

@media (max-width: 900px) {
    .pbm-shell { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .pbm-side { position: static; }
    .pbm-nav {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 8px;
        -webkit-overflow-scrolling: touch;
    }
    .pbm-tab { width: auto; flex: none; padding: 7px 13px; border-radius: 999px; }
    .pbm-tab svg { width: 15px; height: 15px; }
    .pbm-tab-dot { margin-left: 2px; }
    .pbm-side-home { justify-content: center; }
}

@media (max-width: 768px) {
    .pbm-nav-bar { display: none; }
    .pbm-top-inner { height: 56px; gap: 10px; }
    .pbm-sign-card { grid-template-columns: 1fr; }
    .pbm-id { padding: 16px; }
    .pbm-avatar { width: 68px; height: 68px; }
    .pbm-visitor { padding: 40px 20px; }
    .pbm-dash-head { padding: 15px 16px; }
    .pbm-metric { padding: 13px 13px 12px; }
    .pbm-metric-icon { width: 32px; height: 32px; border-radius: 9px; margin-bottom: 9px; }
    .pbm-metric-icon svg { width: 17px; height: 17px; }
    .pbm-metric-val { font-size: 1.46rem; }
    .pbm-dash-ops { padding: 12px 14px; }
}

/* ============================================================
   v1.6.0：充值面板 / 自定义头衔 / 勋章墙
   ============================================================ */

/* ---------- 充值：支付通道 ---------- */

.pbm-pay-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.pbm-pay-ch {
    appearance: none;
    border: 1px solid var(--line);
    background: var(--surface-2, #f9fafb);
    color: var(--text-body);
    font-size: .86rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition);
}

.pbm-pay-ch:hover { border-color: var(--primary); color: var(--primary); }

.pbm-pay-ch.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---------- 充值：套餐网格 ---------- */

.pbm-plans {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 12px;
}

.pbm-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 14px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2, #f9fafb);
    text-align: center;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.pbm-plan:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, .1));
}

.pbm-plan-tag {
    position: absolute;
    top: -9px;
    right: 10px;
    font-style: normal;
    font-size: .68rem;
    font-weight: 700;
    color: #fff;
    background: var(--amber);
    padding: 2px 9px;
    border-radius: var(--radius-pill);
}

.pbm-plan-coins {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--amber);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.pbm-plan-coins small { font-size: .72rem; font-weight: 600; margin-left: 3px; }

.pbm-plan-price { font-size: .92rem; font-weight: 700; color: var(--text); }

.pbm-plan-bonus { font-size: .74rem; color: var(--green); }

.pbm-plan .pbm-btn { margin-top: 6px; width: 100%; }

/* ---------- v1.7.8：自定义充值块（输入金币数，金额按后台汇率实时折算） ---------- */

.pbm-custom {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--surface-2, #f9fafb);
}

.pbm-custom-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pbm-custom-head b { font-size: .95rem; color: var(--text); }
.pbm-custom-head span { font-size: .76rem; color: var(--text-light); }

.pbm-custom-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.pbm-custom-input {
    display: flex; align-items: center; gap: 6px;
    flex: 1 1 190px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: var(--radius-sm, 6px);
    background: var(--card);
    transition: var(--transition);
}
.pbm-custom-input:focus-within { border-color: var(--primary); }

.pbm-custom-input input {
    flex: 1; min-width: 0;
    padding: 10px 0; border: 0; background: transparent;
    font-size: 1rem; font-weight: 700; color: var(--text);
    font-variant-numeric: tabular-nums; outline: none;
}
.pbm-custom-input span { font-size: .82rem; color: var(--text-light); }

.pbm-custom-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.pbm-custom-quick button {
    padding: 6px 12px;
    border: 1px solid var(--line); border-radius: var(--radius-pill);
    background: transparent; cursor: pointer;
    font-size: .8rem; font-weight: 600; color: var(--text);
    font-variant-numeric: tabular-nums;
    transition: var(--transition);
}
.pbm-custom-quick button:hover { border-color: var(--primary); color: var(--primary); }

.pbm-custom-sum { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.pbm-custom-sum-label { font-size: .82rem; color: var(--text-light); }
.pbm-custom-sum b { font-size: 1.3rem; font-weight: 800; color: var(--amber); font-variant-numeric: tabular-nums; }
.pbm-custom-hint { font-size: .76rem; color: var(--text-light); }
.pbm-custom-hint.is-bad { color: var(--red); }

.pbm-custom .pbm-btn { width: 100%; }

/* ---------- v1.7.0：渠道品牌色（选中态）+ 扫码支付弹窗 ---------- */

.pbm-pay-ch.pbm-pay-wx.is-active {
    background: #07c160;
    border-color: #07c160;
}

.pbm-pay-ch.pbm-pay-ali.is-active {
    background: #1677ff;
    border-color: #1677ff;
}

.pbm-qr {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .48);
}

.pbm-qr[hidden] { display: none; }

.pbm-qr-box {
    position: relative;
    width: 100%;
    max-width: 360px;
    padding: 24px 22px 20px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg, 0 10px 25px rgba(0, 0, 0, .1));
    text-align: center;
    animation: pbmQrIn .22s ease-out;
}

@keyframes pbmQrIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* 尊重系统「减少动态效果」：弹窗只淡入，不做位移 */
@media (prefers-reduced-motion: reduce) {
    .pbm-qr-box { animation: none; }
}

.pbm-qr-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.pbm-qr-close:hover { background: var(--soft); color: var(--text); }

.pbm-qr-box h4 { margin: 0 0 4px; font-size: 1.05rem; color: var(--text); }

.pbm-qr-tip { margin: 0 0 14px; font-size: .82rem; color: var(--text-light); }

.pbm-qr-imgwrap {
    position: relative;
    width: 212px;
    height: 212px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    overflow: hidden;
}

.pbm-qr-imgwrap img { display: block; width: 212px; height: 212px; }

.pbm-qr-imgwrap img[hidden] { display: none; }

.pbm-qr-loading { padding: 0 18px; font-size: .8rem; color: var(--text-light); line-height: 1.6; }

.pbm-qr-meta { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
    font-size: .78rem; color: var(--text-light); margin-bottom: 10px; }

.pbm-qr-meta b { color: var(--text); font-weight: 600; }

.pbm-qr-link { display: flex; gap: 8px; margin-bottom: 12px; }

.pbm-qr-link input {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    font-size: .76rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--soft);
    color: var(--text-light);
}

.pbm-qr-link .pbm-btn { flex: none; }

.pbm-qr-ops { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.pbm-qr-ops .pbm-btn { flex: 1 1 auto; }

.pbm-qr-note { margin: 12px 0 0; font-size: .74rem; color: var(--text-light); line-height: 1.65; }

/* ---------- 充值：订单状态 / 金币增减 ---------- */

.pbm-ord {
    flex: none;
    font-size: .74rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.pbm-ord-pending { background: var(--amber-bg); color: var(--amber); }
.pbm-ord-paid    { background: var(--green-bg); color: var(--green); }
.pbm-ord-closed  { background: var(--red-bg);   color: var(--red); }

.pbm-coin-delta {
    flex: none;
    font-size: .92rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pbm-coin-delta.is-up   { color: var(--green); }
.pbm-coin-delta.is-down { color: var(--red); }

.pbm-tip.is-warn {
    color: var(--amber);
    background: var(--amber-bg);
    border-radius: 10px;
    padding: 9px 12px;
}

/* ---------- 我的头衔 ---------- */

.pbm-titles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.pbm-title-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2, rgba(255, 255, 255, .55));
    transition: .16s;
}

.pbm-title-item.is-on {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.pbm-title-meta {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .78rem;
    color: var(--text-light);
}

.pbm-title-item .pbm-btn { flex: none; }

/* ---------- 我的勋章墙 ---------- */

.pbm-badges {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}

.pbm-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 14px 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-2, rgba(255, 255, 255, .55));
    text-align: center;
    transition: .18s;
}

.pbm-badge-item:hover {
    transform: translateY(-2px);
    border-color: currentColor;
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, .1));
}

.pbm-badge-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: currentColor;
    color: inherit;
}

/* 用 currentColor 做底色时图标需反白：这里改为浅底 + 彩色图标 */
.pbm-badge-ico {
    background: var(--surface-3, rgba(148, 163, 184, .14));
}

.pbm-badge-ico svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.pbm-badge-ico img { width: 26px; height: 26px; object-fit: contain; border-radius: 50%; }

.pbm-badge-item b { font-size: .84rem; color: currentColor; }

.pbm-badge-src { font-size: .7rem; color: var(--text-light); }

/* v1.9.3 独立「我的勋章」面板：勋章卡放大一号（原我的收藏页） */
.pbm-badges-lg { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pbm-badges-lg .pbm-badge-item { padding: 18px 12px; border-radius: var(--radius); }
.pbm-badges-lg .pbm-badge-ico { width: 48px; height: 48px; }
.pbm-badges-lg .pbm-badge-ico svg { width: 25px; height: 25px; }
.pbm-badges-lg .pbm-badge-ico img { width: 30px; height: 30px; }
.pbm-badges-lg .pbm-badge-item b { font-size: .9rem; }
.pbm-badges-lg .pbm-badge-src { font-size: .74rem; }

@media (max-width: 768px) {
    .pbm-plans { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .pbm-badges { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
    .pbm-title-item { align-items: flex-start; }
}

/* ============ v1.7.8 令牌补齐（v1.8.6 起统一上移到文件顶部） ============
   --line / --surface-2 / --surface-3 在套餐卡、勋章卡、自定义充值块等多处被引用，
   但主题未定义这几个名字。缺了会让含 var() 的整条声明被判无效直接丢弃 ——
   边框、底色全部不生效。现已在顶部 :where(:root) 兜底块里定义（并补齐了
   --radius-pill / --radius-sm / --transition / --text-muted），此处不再重复。 */

/* ============================================================
 * v1.8.1 我的财富改版 + 充值 / 头衔勋章双栏
 * ============================================================ */

/* 财富总览：积分 / 金币两张大卡（替换原 .pbm-wallet 平铺） */
.pbm-wealth-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pbm-wealth-card {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 20px; border-radius: var(--radius);
    background: var(--card); border: 1px solid var(--border);
}
.pbm-wealth-ico {
    flex: none; width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.pbm-wealth-ico svg {
    width: 24px; height: 24px; fill: none; stroke: #fff;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.pbm-wealth-card.is-points .pbm-wealth-ico { background: var(--blue); }
.pbm-wealth-card.is-coins .pbm-wealth-ico { background: var(--amber); }
.pbm-wealth-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pbm-wealth-info b { font-size: 1.45rem; line-height: 1.2; }
.pbm-wealth-info span { font-size: .78rem; color: var(--text-light); }
.pbm-wealth-info em {
    font-style: normal; display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 5px; font-size: .8rem; color: var(--text-muted);
}

/* 等级升级进度条（当前积分在当前档与下一档之间的位置） */
.pbm-lvl-progress {
    height: 8px; border-radius: var(--radius-pill); overflow: hidden;
    background: var(--soft); margin: 4px 0 12px;
}
.pbm-lvl-progress i {
    display: block; height: 100%; border-radius: var(--radius-pill);
    background: var(--primary);
    transition: width .4s ease;
}

/* 双栏并排容器：我的头衔 | 我的勋章（窄屏自动堆叠）；v1.9.3 起充值页卡密融入在线充值、记录改首页弹窗 */
.pbm-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pbm-duo .pbm-block { margin-bottom: 0; }

/* v1.8.2 财富 hero 再排：等级总览全宽卡（跨两列）+ 进度条内嵌 */
.pbm-wealth-hero-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pbm-wealth-card.is-level {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 12px 18px;
}
.pbm-wealth-card.is-level .pbm-wealth-ico { background: var(--purple); }
.pbm-wealth-card.is-level .pbm-wealth-info { flex: 1; min-width: 200px; }
.pbm-wealth-card.is-level .pbm-wealth-info b { font-size: 1.25rem; }
.pbm-wealth-progress { flex: 1 1 100%; display: flex; align-items: center; gap: 10px; }
.pbm-wealth-progress .pbm-lvl-progress { flex: 1; margin: 0; }
.pbm-wealth-progress > span { flex: none; font-size: .78rem; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }

@media (max-width: 768px) {
    .pbm-wealth-hero { grid-template-columns: minmax(0, 1fr); }
    .pbm-duo { grid-template-columns: minmax(0, 1fr); }
    .pbm-wealth-card { padding: 14px 16px; }
    .pbm-wealth-progress { flex-basis: 100%; }
}

/* ============================================================
   v1.8.4 第三方登录 / 账号绑定
   访客页一键登录按钮 + 账号绑定面板（QQ / 微信 / 邮箱）
   ============================================================ */
.pbm-oauth-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.pbm-oauth-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 20px; border-radius: var(--radius); font-size: .86rem; font-weight: 600; text-decoration: none; color: #fff; transition: opacity .15s ease; }
.pbm-oauth-btn:hover { opacity: .88; color: #fff; }
.pbm-oauth-btn.is-qq { background: #12b7f5; }
.pbm-oauth-btn.is-wx { background: #07c160; }
.pbm-oauth-btn.is-zfb { background: #1677ff; } /* v1.9.10 支付宝 */

.pbm-bind-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pbm-bind-card { background: var(--card, var(--surface, #fff)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.pbm-bind-card.is-wide { grid-column: 1 / -1; }
.pbm-bind-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pbm-bind-head b { font-size: .95rem; }
.pbm-bind-tag { font-size: .72rem; font-weight: 600; color: var(--text-muted); background: var(--surface-2, #f3f4f6); border-radius: var(--radius-pill, 999px); padding: 3px 10px; }
.pbm-bind-tag.is-on { color: #16a34a; background: rgba(34, 197, 94, .12); }
.pbm-bind-tag.is-off { color: #9ca3af; background: var(--surface-2, #f3f4f6); }
.pbm-bind-info { font-size: .82rem; color: var(--text-muted); line-height: 1.7; margin: 0 0 12px; }
/* v1.9.3 邮箱绑定重排：宽卡内双列字段（邮箱 | 验证码），底部提示 + 主按钮一行 */
.pbm-bind-mail { display: grid; gap: 12px; }
.pbm-bind-mail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.pbm-bind-field label { display: block; font-size: .8rem; color: var(--text-light); margin-bottom: 6px; }
.pbm-bind-field input[type="email"], .pbm-bind-field input[type="text"] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    background: var(--soft);
    color: var(--text);
    font-size: .9rem;
    font-family: inherit;
    outline: none;
    transition: border-color .15s ease;
}
.pbm-bind-field input[type="email"]:focus, .pbm-bind-field input[type="text"]:focus { border-color: var(--primary); }
.pbm-bind-mail-code { display: flex; gap: 8px; }
.pbm-bind-mail-code input { flex: 1; min-width: 0; }
.pbm-bind-mail-code .pbm-btn { flex: none; white-space: nowrap; }
.pbm-bind-mail-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pbm-bind-mail-hint { font-size: .76rem; color: var(--text-light); margin: 0; }

@media (max-width: 768px) {
    .pbm-bind-grid { grid-template-columns: minmax(0, 1fr); }
    .pbm-bind-mail-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================
   v1.9.0 公开个人主页（全站头像的统一落点）
   路由 /?plugin=pb_member&uid=N —— 只读页面，访客也能看
   版面语言与会员中心完全同源：pbm-card / pbm-id / pbm-metric /
   pbm-badge，所以跟随主题与皮肤是天然的，不需要任何皮肤分支。
   ============================================================ */

.pbm-profile { display: flex; flex-direction: column; gap: 16px; }

/* 名片头右侧操作区（进入会员中心 / 关注 / 已关注 / 登录后关注）
   margin-left:auto 把它推到名片行尾，窄屏换行后自动独占一行靠左 */
.pbm-pr-ops {
    flex: none;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pbm-pr-ops .pbm-btn { padding: 8px 18px; font-size: .85rem; }

/* ---------- 数据卡：3 列 × 2 行（文章 / 评论 / 获赞 / 粉丝 / 等级 / 会员） ---------- */

.pbm-pr-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

/* 文字型指标值（等级名 / 会员名）：比数字小一档，避免长名折行挤爆卡片 */
.pbm-metric-val.is-text {
    font-size: 1.12rem;
    line-height: 1.5;
    letter-spacing: 0;
    font-variant-numeric: normal;
}

/* ---------- 区块（头衔墙 / 勋章墙 / 最近文章共用） ---------- */

.pbm-pr-block { padding: 18px 20px 20px; }

.pbm-pr-h {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.pbm-pr-h small { font-size: .76rem; font-weight: 500; color: var(--text-light); }

/* ---------- 墙：头衔与勋章共用一套网格 ---------- */

.pbm-pr-wall {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 10px;
}

/* 色相走局部 --tone / --tone-bg：与指标卡 t-* 同一套 10 色板，
   但这里只染「名字 + 佩戴态描边」，卡片底色仍是中性，一整墙排开不吵 */
.pbm-pr-item {
    --tone: var(--text-body);
    --tone-bg: var(--surface-3);
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
    transition: border-color .16s ease, box-shadow .16s ease;
}

.pbm-pr-item.c-blue { --tone: var(--blue); --tone-bg: var(--blue-bg); }
.pbm-pr-item.c-cyan { --tone: var(--cyan); --tone-bg: var(--cyan-bg); }
.pbm-pr-item.c-teal { --tone: var(--teal); --tone-bg: var(--teal-bg); }
.pbm-pr-item.c-green { --tone: var(--green); --tone-bg: var(--green-bg); }
.pbm-pr-item.c-indigo { --tone: var(--indigo); --tone-bg: var(--indigo-bg); }
.pbm-pr-item.c-purple { --tone: var(--purple); --tone-bg: var(--purple-bg); }
.pbm-pr-item.c-pink { --tone: var(--pink); --tone-bg: var(--pink-bg); }
.pbm-pr-item.c-amber { --tone: var(--amber); --tone-bg: var(--amber-bg); }
.pbm-pr-item.c-orange { --tone: var(--orange); --tone-bg: var(--orange-bg); }
.pbm-pr-item.c-red { --tone: var(--red); --tone-bg: var(--red-bg); }

/* 佩戴中的头衔：用该头衔自己的色描一遍，一眼看出是哪一个 */
.pbm-pr-item.is-on {
    border-color: var(--tone);
    box-shadow: 0 0 0 3px var(--tone-bg);
}

.pbm-pr-item-name {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .86rem;
    font-weight: 700;
    color: var(--tone);
    word-break: break-word;
}

.pbm-pr-item-name img {
    height: 1.25em;
    width: auto;
    flex: none;
    border-radius: 4px;
    object-fit: contain;
}

.pbm-pr-item-meta { font-size: .72rem; color: var(--text-light); line-height: 1.6; }

.pbm-pr-worn {
    flex: none;
    margin-left: auto;
    padding: 1px 8px;
    border-radius: var(--radius-pill, 999px);
    background: var(--tone);
    color: #fff;
    font-size: .66rem;
    font-style: normal;
    font-weight: 700;
}

/* ---------- 最近文章 ---------- */

.pbm-pr-logs { list-style: none; }

.pbm-pr-logs li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 2px;
    border-bottom: 1px dashed var(--line);
}

.pbm-pr-logs li:last-child { border-bottom: none; }

.pbm-pr-logs a {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .88rem;
    color: var(--text);
    text-decoration: none;
    transition: color .15s ease;
}

.pbm-pr-logs a:hover { color: var(--primary); }

.pbm-pr-log-date { flex: none; font-size: .74rem; color: var(--text-light); }

.pbm-pr-more { margin-top: 12px; font-size: .82rem; }
.pbm-pr-more a { color: var(--primary); text-decoration: none; font-weight: 600; }

.pbm-pr-empty { font-size: .85rem; color: var(--text-light); }

/* 在线状态文字（名片区，紧跟在 .pbm-online-dot 后） */
.pbm-pr-online { font-size: .8rem; color: var(--text-light); }

/* ---------- UID 不存在 ---------- */

.pbm-pr-miss { padding: 52px 24px; text-align: center; }
.pbm-pr-miss h1 { margin-bottom: 6px; font-size: 1.4rem; color: var(--text); }
.pbm-pr-miss-sub { margin-bottom: 20px; font-size: .88rem; color: var(--text-light); }

/* ---------- 响应式：3 → 2 列，墙的最小宽度收窄一档 ---------- */

@media (max-width: 900px) {
    .pbm-pr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .pbm-profile { gap: 14px; }
    .pbm-pr-block { padding: 15px 15px 17px; }
    .pbm-pr-ops { width: 100%; margin-left: 0; }
    .pbm-pr-ops .pbm-btn { flex: 1; justify-content: center; text-align: center; }
    .pbm-pr-wall { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .pbm-pr-logs li { gap: 8px; }
}

/* ================================================================
   v1.9.5 · Bootstrap 整包对接 + 仪表盘主侧分区（Reboot / 组件引入）
   ================================================================ */

/* ---------- Reboot 对接：会员中心链接基线 ----------
   用 :where(.pbm-app) 保持特异性 0，各组件自身的链接规则（vip-chip、
   面板链接、列表行等）不受影响；只去掉 Reboot 带来的全局下划线与链接蓝 */
:where(.pbm-app) a,
:where(.pbm-app) a:hover { color: inherit; text-decoration: none; }

/* ---------- 主侧分区容器：左 8 右 4（<992px 自动堆叠为单列） ---------- */
.pbm-dash-cols { margin-bottom: 0; }
.pbm-dash-cols > .col-lg-8 { min-width: 0; }
.pbm-dash-cols > aside { min-width: 0; }

/* Hero 内的移动端快捷 chips：从独立卡片条降级为无底色分组（避免卡中卡） */
.pbm-dash-head .pbm-dash-ops {
    width: 100%;
    padding: 10px 0 0;
    margin: 2px 0 0;
    background: transparent;
    border: 0;
    border-top: 1px dashed var(--border);
    border-radius: 0;
    box-shadow: none;
}

/* ---------- 右侧栏 · 等级进度卡（BS progress + 主题令牌） ---------- */
button.pbm-side-card {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: inherit;
    width: 100%;
    text-align: left;
    cursor: pointer;
    display: block;
    padding: 16px 18px;
    /* v1.9.6：透明皮肤（--card 为 transparent）下改用浮层实底令牌兜底，右侧栏不再裸奔 */
    background: var(--tip-bg, #fff);
    color: var(--tip-fg, var(--text));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
button.pbm-side-card:hover,
button.pbm-side-card:focus-visible {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, .1));
    outline: none;
}

.pbm-side-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--text-light);
    margin-bottom: 10px;
}

.pbm-side-level-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
/* 等级名复用 .pbm-metric-val.is-text（图标 + 名称同框），收紧到侧栏尺度 */
.pbm-side-level-top .pbm-metric-val { font-size: 1.22rem; }
.pbm-side-level-pct {
    font-size: .82rem;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    background: var(--soft);
    border-radius: 999px;
    padding: 3px 9px;
}

/* BS progress 令牌映射到主题令牌（深色 / 皮肤自动跟随） */
.pbm-progress {
    --bs-progress-height: 8px;
    /* v1.9.6：透明皮肤下轨道用实底令牌兜底（--soft 可能为 transparent） */
    --bs-progress-bg: var(--tip-bg, #fff);
    --bs-progress-border-radius: 999px;
    --bs-progress-border-color: transparent;
    --bs-progress-bar-bg: var(--primary);
    display: block;
}
.pbm-progress-bar { transition: width .45s ease; }

.pbm-side-level-sub {
    display: block;
    margin-top: 9px;
    font-size: .76rem;
    color: var(--text-light);
}

/* ---------- 右侧栏 · 快捷入口 list-group（仅桌面 ≥992px 显示） ---------- */
.pbm-side-quick {
    /* v1.9.6：透明皮肤下用浮层实底令牌兜底（--card 可能为 transparent） */
    --bs-list-group-bg: var(--tip-bg, #fff);
    --bs-list-group-border-color: var(--border);
    --bs-list-group-border-radius: var(--radius);
    --bs-list-group-color: var(--tip-fg, var(--text-body));
    --bs-list-group-hover-bg: var(--soft);
    --bs-list-group-action-hover-color: var(--tip-fg, var(--text));
    --bs-list-group-active-bg: var(--tip-bg, #fff);
    --bs-list-group-active-color: var(--tip-fg, var(--text));
    --bs-list-group-active-border-color: var(--border);
    --bs-list-group-item-padding-y: 12px;
    --bs-list-group-item-padding-x: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.pbm-side-quick-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: .88rem;
    font-weight: 600;
    transition: color .15s ease, background .15s ease, padding-left .15s ease;
}
.pbm-side-quick-item:hover { padding-left: 19px; }
.pbm-side-quick-arrow {
    font-style: normal;
    font-size: 1.05rem;
    line-height: 1;
    color: var(--text-light);
    transition: color .15s ease, transform .15s ease;
}
.pbm-side-quick-item:hover .pbm-side-quick-arrow {
    color: var(--primary);
    transform: translateX(2px);
}

/* ---------- 窄屏：侧栏元素间距 ---------- */
@media (max-width: 991.98px) {
    .pbm-side-level { margin-bottom: 12px; }
    /* 堆叠模式下快捷入口由 Hero chips 承担，等级进度卡占满行宽 */
    .pbm-side-level-top .pbm-metric-val { font-size: 1.3rem; }
}

/* ================================================================
   v1.9.7 · 首页仪表盘排版对齐「我的勋章」页（全宽 pbm-block 纵向堆叠）
   ================================================================ */

/* ---------- 块一 · 今日动态：pbm-dash-head 降为透明内层（外层 pbm-block 已是卡片，避免卡中卡） ---------- */
.pbm-block .pbm-dash-head.is-plain {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
}

/* 窄屏原「.pbm-dash-head { padding: 15px 16px; }」对新内层失效 */
@media (max-width: 768px) {
    .pbm-block .pbm-dash-head.is-plain { padding: 0; }
}

/* ---------- 块二 · 等级卡回归网格：等级名 / 图标复用既有 .pbm-metric-level 与 .pbm-metric-val img 规则（个人主页同源），
   此处只补网格卡内进度条与副标的节奏 ---------- */
.pbm-metric-level .pbm-progress { margin-top: 4px; }
.pbm-metric-level .pbm-metric-sub { margin-top: 2px; }

/* ---------- 块三 · 财富记录：BS row 负边距在 pbm-block 内裁平（块自带 padding 足够容纳 gutter） ---------- */
.pbm-block .pbm-dash-recs { margin-bottom: 0; }

