/* ===========================================================
   拼豆社区样式
   仅覆盖拼豆相关区块，不干扰 B2PRO 主题其余样式。
   =========================================================== */

/* ---------- 全宽：颜色清单 ---------- */
.pd-colors {
  margin-top: 28px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: var(--b2radius, 4px);
}
.pd-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.pd-section-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: #1f2933;
}
.pd-section-count {
  font-size: 13px;
  color: #aaa;
}
.pd-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 10px;
}
.pd-color-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  background: #fafbfc;
  border: 1px solid #f0f1f5;
  border-radius: 8px;
  font-size: 13px;
  min-width: 0;
}
.pd-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.pd-code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 600;
  color: #2b2f33;
  font-size: 13px;
  line-height: 1.2;
}
.pd-count {
  color: #e8590b;
  font-weight: 700;
  white-space: nowrap;
  margin-left: auto;
}

/* ---------- 全宽：图纸说明 ---------- */
.pd-desc {
  margin-top: 24px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
}
.pd-desc .pd-section-title { margin-bottom: 12px; }
.pd-desc-body { font-size: 14px; line-height: 1.8; color: #555; }

/* ---------- 存档图墙（archive-qupindou_pattern）----------
   顶栏：.tax-header.pattern-tax-header（sticky，参考竞品 pindoumao 的
         sticky top-16 z-40 bg-white shadow-sm）+ 内部横向筛选 tab 条
         （.pattern-tabs / .pattern-tab / .pattern-tab-panel，值 pills 走服务端链接）。
   图墙：.pd-waterfall（CSS 多列瀑布流）+ .pd-card（按比例封面 + 渐变遮罩 + 角标），
        卡片渲染由 functions.php 的 qupindou_pattern_card_html() 提供，归档与 load-more 共用。
   风格继承父主题：--b2color 主题色 / .b2-radius 圆角 / b2_get_icon 图标。 */

/* ---------- 编辑器宿主 ---------- */
#pattern-editor-container { width: 100%; }
.editor-loading { color: #999; }

/* ---------- 评分挂件 ---------- */
.pattern-rating-widget { margin: 26px 0; padding: 16px 18px; background: #f7f8fa; border-radius: 10px; }
.pattern-rating-widget h3 { font-size: 17px; margin: 0 0 10px; }
.rating-display { display: flex; align-items: center; gap: 10px; }
#rating-stars { font-size: 26px; letter-spacing: 2px; line-height: 1; }
#rating-stars .star { color: #d9d9d9; transition: color .12s ease; }
#rating-stars .star.on { color: #f5b301; }
#rating-stars .star.mine { text-shadow: 0 0 2px rgba(245,179,1,.6); }
#rating-stars .star[style*="cursor: pointer"]:hover { color: #f5b301; }
.rating-avg { font-size: 18px; font-weight: 700; color: #f5b301; }
.rating-count { color: #999; font-size: 13px; }
.rating-tip { margin: 8px 0 0; color: #888; font-size: 13px; }

/* 付费锁（已废弃，保留防回退） */
.pattern-bead-locked { text-align: center; padding: 30px; background: #fafafa; border: 1px dashed #e0e0e0; border-radius: 10px; color: #777; }
.pattern-bead-locked .locked-icon { font-size: 34px; margin-bottom: 8px; }

/* ---------- 发布设置页 ---------- */
/* 继承父主题 b2-single-content.wrapper 外层结构；但父主题 .b2-single-content 是 display:flex，
   会让内部 .content-area 成为 flex item 而宽度异常压缩，这里强制 block 以正常撑满宽度。 */
body.page-template-page-pattern-publish { background-color: #fff !important; }
body.page-template-page-pattern-publish .b2-single-content { display: block !important; }
body.page-template-page-pattern-publish .pattern-publish-wrap { background: transparent !important; }
/* 宽度与父主题通用页一致（.wrapper 内联限定 1100px），显式锁定避免破版 */
body.page-template-page-pattern-publish .pattern-publish-wrap { max-width: 1100px; margin: 0 auto; }
/* 去除发布页卡片容器的背景/边框/阴影，并去除鼠标悬停抬升效果（仅作用发布页，不动归档通用 .pd-card） */
body.page-template-page-pattern-publish .pd-card { box-shadow: none; }
body.page-template-page-pattern-publish .pd-card:hover { transform: none; box-shadow: none; }
body.page-template-page-pattern-publish .publish-preview { box-shadow: none; }
.publish-title { font-size: 24px; margin: 0 0 6px; }
.publish-sub { color: #888; margin: 0 0 18px; }
.publish-loading { color: #888; padding: 20px 0; }
.publish-form { display: flex; flex-direction: column; gap: 16px; }
.publish-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.publish-form input[type="text"],
.publish-form input[type="number"],
.publish-form textarea,
.publish-form select {
    padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; font-weight: 400;
}
.publish-row { display: flex; gap: 16px; }
.publish-row > label { flex: 1; }
.publish-actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.publish-msg { font-size: 14px; }
.publish-preview { margin: 4px 0; }
.publish-preview img { max-width: 100%; border: 1px solid #eee; border-radius: 8px; }

/* 通用按钮（拼豆主题） */
.button.pattern-btn-submit,
.button.pattern-btn-back { padding: 10px 20px; border-radius: 8px; font-weight: 600; }
.pattern-btn-submit { background: var(--b2color); color: #fff; border: none; }
.pattern-btn-back { background: #f2f3f5; color: #333; text-decoration: none; }

/* ---------- 社区导航 ---------- */
.community-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.community-nav-link {
    padding: 8px 16px; border-radius: 999px; background: #f2f3f5; color: #555; text-decoration: none; font-size: 14px; font-weight: 600;
}
.community-nav-link:hover { background: #e6e8eb; }
.community-nav-link.is-active { background: var(--b2color); color: #fff; }


/* ===========================================================
   用户中心「拼豆」管理台（原生，无 iframe）
   =========================================================== */
.beads-console { margin-bottom: 20px; }
.beads-loading, .beads-error { padding: 40px 0; text-align: center; color: #999; }
.beads-error { color: #e35; }

/* 面板内的局部加载态（框架已显示，仅数据未到） */
.beads-panel-loading {
    display: flex; align-items: center; justify-content: center;
    min-height: 160px; color: #999; font-size: 14px;
    background: #fafafa; border-radius: 10px;
}

/* 顶部标签栏：统一为 B2 父主题 author-links 风格（灰字 inactive / 蓝底白字 active pill） */
.beads-tabs {
    display: flex; flex-wrap: wrap;
    gap: 0;
    padding: 10px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #eeeeee;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.beads-tab {
    border: none; background: none; cursor: pointer;
    margin-right: 16px;
    padding: 7px 12px;
    font-size: 14px; line-height: 16px; font-weight: 400;
    color: #8590A6;
    border-radius: 4px;
    display: inline-flex; align-items: center; gap: 6px;
    transition: background .15s, color .15s;
}
.beads-tab:hover { color: #333; background: #f5f6f7; }
.beads-tab.active { color: #fff; background: var(--b2color); }
.beads-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.beads-panel-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.beads-panel-tools { display: flex; gap: 8px; align-items: center; }
.beads-muted { color: #999; font-size: 13px; }
.beads-empty { text-align: center; color: #999; padding: 40px 0; background: #fafafa; border-radius: 4px; }

/* 通用按钮 / 链接 */
.beads-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 14px; border-radius: 8px; border: 1px solid #e2e5ea; background: #fff;
    color: #333; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.beads-btn:hover { background: #f5f6f8; }
.beads-btn-primary { background: var(--b2color); border-color: var(--b2color); color: #fff; }
.beads-btn-primary:hover { background: #0052cc; }
.beads-btn-sm { padding: 6px 12px; font-size: 12px; }
.beads-search {
    padding: 8px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; min-width: 160px;
}
.beads-link {
    background: none; border: none; cursor: pointer; padding: 0; font-size: 13px; font-weight: 600;
    color: var(--b2color); text-decoration: none;
}
.beads-link:hover { text-decoration: underline; }
.beads-danger { color: #e35; }

/* 我的图纸 */
.beads-pat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.beads-pat-card {
    border: 1px solid #eee; border-radius: 12px; overflow: hidden; background: #fff;
    display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease;
}
.beads-pat-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.beads-pat-thumb { display: block; aspect-ratio: 1/1; background: #fafafa; overflow: hidden; }
.beads-pat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.beads-pat-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; }
.beads-pat-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.beads-pat-title { font-size: 14px; font-weight: 600; }
.beads-pat-title a { color: #222; text-decoration: none; }
.beads-pat-meta { font-size: 12px; color: #999; }
.beads-pat-actions { display: flex; gap: 14px; align-items: center; margin-top: 2px; }
.beads-badge { font-size: 11px; padding: 1px 7px; border-radius: 4px; vertical-align: middle; }
.beads-badge.draft { background: #fff3e0; color: #e08a00; }
.beads-badge.published { background: #e6f6ec; color: #2e9e4b; }

.beads-pager { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.beads-page-btn {
    min-width: 32px; padding: 6px 8px; border: 1px solid #e2e5ea; background: #fff; border-radius: 7px;
    cursor: pointer; font-size: 13px; color: #555;
}
.beads-page-btn.active { background: var(--b2color); border-color: var(--b2color); color: #fff; }

/* 仓库库存 */
.beads-wh { border: 1px solid #eee; border-radius: 4px; padding: 14px 16px; margin-bottom: 14px; background: #fff; }
.beads-wh.is-default { border-color: var(--b2color, #0066ff); box-shadow: 0 0 0 1px var(--b2color, #0066ff) inset; }
.beads-wh.is-locked { background: #fafafa; }
.bs-badge { display: inline-block; font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 10px; font-weight: 600; vertical-align: middle; }
.bs-badge-default { background: #e6f0ff; color: var(--b2color, #0066ff); margin-left: 6px; }
.bs-badge-locked { background: #fff0f0; color: #d4380d; margin-left: 6px; }
.beads-wh-locknote { margin-top: 10px; padding: 8px 10px; background: #fff7e6; border: 1px solid #ffe7ba; border-radius: 4px; font-size: 12px; color: #ad6800; line-height: 1.5; }
.beads-inv-qty-text { min-width: 64px; color: #555; font-weight: 600; }
.beads-wh.is-locked .beads-inv-row { opacity: .85; }
.beads-wh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.beads-wh-name { font-size: 15px; font-weight: 600; }
.beads-wh-meta { font-size: 12px; color: #999; margin-top: 3px; }
.beads-wh-actions { display: flex; gap: 14px; flex-shrink: 0; }
.beads-wh-inv { margin-top: 12px; border-top: 1px dashed #eee; padding-top: 12px; }
.beads-wh-inv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.beads-inv-list { display: flex; flex-direction: column; gap: 6px; }
.beads-inv-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.beads-inv-row .beads-swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid #ddd; flex-shrink: 0; }
.beads-inv-code { font-weight: 700; min-width: 56px; }
.beads-inv-name { color: #666; flex: 1; }
.beads-inv-qty { width: 110px; padding: 5px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.beads-custom-color { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.beads-custom-color input { padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }

.beads-wh-form { background: #fafbfc; }
.beads-wh-form-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.beads-form-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.beads-form-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #888; flex: 1; }
.beads-form-row input, .beads-form-row select { padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; color: #333; }
.beads-wh-form-actions { display: flex; gap: 10px; }

/* ---------- 发布设置页：只读尺寸 + 标签联想 ---------- */
.publish-size-box {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; margin-bottom: 4px;
    background: #f7f8fa; border: 1px solid #eef0f3; border-radius: 8px;
}
.publish-size-label { font-size: 13px; color: #888; }
.publish-size-value { font-size: 15px; font-weight: 600; color: #2b2f33; }

.publish-tags-box { display: flex; flex-direction: column; gap: 8px; }
.publish-field-label { font-size: 13px; color: #888; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.tag-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: #eef3ff; color: var(--b2color); border: 1px solid #d6e6f5;
    padding: 3px 4px 3px 10px; border-radius: 999px; font-size: 13px; line-height: 1.4;
}
.tag-chip-x { cursor: pointer; font-weight: 700; opacity: .6; padding: 0 2px; }
.tag-chip-x:hover { opacity: 1; }
.tag-input-wrap { position: relative; width: 100%; }
.tag-input-wrap input {
    width: 100%; box-sizing: border-box;
    padding: 12px; border: 1px solid #eeeeee; border-radius: 8px;
    background: #f4f5f7; font-size: 14px; color: #2b2b2b; font-family: inherit;
}
.tag-input-wrap input:focus { outline: none; border-color: var(--b2color); }
.tag-suggest {
    position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: 4px;
    background: #fff; border: 1px solid #e3e6ea; border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 220px; overflow-y: auto; padding: 4px;
}
.tag-suggest-item { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; color: #333; }
.tag-suggest-item:hover { background: #f2f6fb; }

/* ---------- 单页颜色清单（HEX 为主 + 品牌色号为辅） ---------- */
.pattern-color-section { margin: 18px 0; }
.pattern-color-section h3 { font-size: 18px; margin: 0 0 4px; }
.color-count { color: #888; font-size: 13px; margin: 0 0 12px; }
.color-grid {
    display: grid; gap: 8px 10px;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.color-item {
    display: flex; align-items: center; gap: 7px;
    padding: 6px 9px; background: #fafbfc; border: 1px solid #eef0f3;
    border-radius: 8px; font-size: 13px; overflow: hidden;
}
.color-swatch { width: 18px; height: 18px; border-radius: 4px; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
/* 颜色清单显示该品牌的色号（色系），不显示 HEX */
.color-code { color: #2b2f33; font-size: 12px; font-weight: 600; font-family: ui-monospace, Menlo, Consolas, monospace; }
.color-count { margin-left: auto; color: #e8590b; font-weight: 700; white-space: nowrap; }

/* ---------- 下载区：拼豆自有组件（与 B2PRO 完全解耦，独立样式） ---------- */
.pp-dl { margin: 20px 0; padding: 18px 20px; background: #fff; border: 1px solid #e7e9ee; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.pp-dl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pp-dl-title { font-size: 16px; font-weight: 700; margin: 0; color: #1f2933; }
.pp-dl-badge { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pp-dl-badge.free { background: #e6f7ec; color: #2f9e44; }
.pp-dl-badge.paid { background: #fff0e6; color: #e8590b; }
.pp-dl-list { display: flex; flex-direction: column; gap: 12px; }
.pp-dl-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; background: #fafbfc; border: 1px solid #eef0f3; border-radius: 10px; }
.pp-dl-info { flex: 1 1 auto; min-width: 0; }
.pp-dl-name { font-size: 14px; font-weight: 600; color: #2b2f33; overflow-wrap: anywhere; }
.pp-dl-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 12px; color: #8a9099; }
.pp-dl-status { margin-top: 6px; font-size: 13px; }
.pp-dl-status.ok { color: #2f9e44; }
.pp-dl-status.lock { color: #e8590b; }
.pp-dl-status a { color: var(--b2color); }
.pp-dl-actions { flex: 0 0 auto; }
.pp-dl-btn { display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; color: #fff; cursor: pointer; background: var(--b2color); transition: background .15s; }
.pp-dl-btn:hover { background: #0052cc; }
.pp-dl-btn:disabled { opacity: .6; cursor: default; }
.pp-dl-hint { margin-top: 10px; color: #2e9e4b; font-size: 13px; }
/* 额外操作（在编辑器中打开 / 重新生成）按钮 */
.pattern-actions-extra { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.pattern-actions-extra .pattern-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; background: #f1f3f5; color: #495057; border: 1px solid #e3e6ea; }
.pattern-actions-extra .dashicons { font-size: 18px; width: 18px; height: 18px; line-height: 18px; }
.pattern-actions-extra .pattern-btn:hover { background: #e9ecef; }

/* ===========================================================
   图纸库（archive-qupindou_pattern）—— 复用 b2 原生归档样式
   顶栏：.tax-header.pattern-tax-header（sticky，参考竞品，白底阴影）
   卡片结构：.pd-waterfall > .pd-waterfall__item > .item-in.pd-card.b2-radius
            > .pd-card__link > .pd-card__media（按比例封面）/ .pd-card__overlay（标题+角标）
   卡片渲染由 functions.php 的 qupindou_pattern_card_html() 提供，归档与 load-more 共用。
   卡片网格用 CSS Grid（等宽等距、左右对称、统一方形卡片），风格继承父主题（--b2color / b2-radius）。
   =========================================================== */
/* 外层容器改用 b2 原生 .b2-single-content.wrapper + .content-area（宽度/背景/间距由 b2 控制），
   此处 pattern-archive 仅作作用域，不再自定 max-width/margin */
.pattern-archive { padding-top: 20px; }

/* 保证本页内容区左右严格对称：
   1) b2 的 .b2-single-content 是 display:flex（为「内容+侧边栏」两栏设计），本页只输出单个 .content-area，
      flex 下可能出现左右偏移；强制 block 让内容 100% 撑满、居中对称。
   2) 把「吸顶筛选白条」与「卡片网格」限制为同一最大宽度并居中，宽屏下两者等宽对齐、左右空隙相等，
      同时避免超宽屏卡片被拉得过大。 */
.b2-single-content.wrapper.category.single-sidebar-hidden { display: block; }
.b2-single-content.wrapper.category.single-sidebar-hidden > .content-area {
    width: 100%;
    max-width: 100%;
    margin: 0;
}
.pattern-tax-header .wrapper,
.pattern-archive {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

/* 图纸库顶栏 sticky：参考竞品 pindoumao.com/pattern 的 sticky top-16 bg-white shadow-sm。
   本站 b2 固定头部高 58px，故 top 取 64px 刚好留出间隙；白底 + 浅阴影保证滚动时内容不被透出。
   关键：z-index 必须低于 b2 右侧固定条 .aside-container（z-index:18），否则吸顶筛选栏会盖住固定条。 */
.pattern-tax-header {
    position: sticky;
    top: 64px;
    z-index: 17; /* 低于 .aside-container 的 18，保证筛选栏不遮住右侧固定条 */
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
/* 筛选条内部右侧预留 b2 右侧固定条宽度（36px），窄屏下 tab/胶囊不被固定条压住 */
.pattern-tax-header .wrapper {
    padding-right: 44px;
}
/* 修复：吸顶筛选栏（z-index:17）在根层叠上下文里高于头部 .site-header-in（z-index:7），
   导致展开的头像下拉 .top-user-box-drop 被筛选栏遮住。下拉被"困"在头部层叠上下文内，
   单改下拉自身的 z-index 无效，必须把头部上下文整体抬到筛选栏之上。
   仅作用于 pattern 归档页，且 19 > 右侧固定条 .aside-container 的 18，避免下拉右上角被固定条裁切。 */
.post-type-archive-qupindou_pattern .site-header-in {
    z-index: 19;
}
/* 卡片网格与筛选条保持同一右侧余量，窄屏下最右列不被固定条压住，且两者右边缘对齐 */
.pattern-archive {
    padding-right: 44px;
}
/* 横向筛选 tab 条（参考竞品 pindoumao 顶栏：max-w-7xl 居中容器内，tab + 右侧搜索） */
.pattern-tabbar { padding: 0; }

.pattern-tabs {
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid #eef0f3;
    overflow-x: auto;
    scrollbar-width: none;          /* Firefox 隐藏滚动条 */
    -ms-overflow-style: none;
}
.pattern-tabs::-webkit-scrollbar { display: none; }   /* WebKit 隐藏滚动条 */

/* 手机端：筛选条两侧留间隙，避免首个 tab 贴死屏幕左边、且去掉桌面右侧固定条预留的 44px，
   使筛选条在手机上左右等距、视觉居中（修复「贴左边没间隙 / 不居中」）。 */
@media (max-width: 768px) {
    .pattern-archive { padding-left: 12px; padding-right: 12px; }
    /* 筛选栏容器：左右各 14px 间隙，与卡片网格视觉对齐 */
    .pattern-tabbar { padding: 0 14px; }
    /* 横向 tab 行：内部再留 2px 防止首尾 tab 贴边 */
    .pattern-tabs { padding: 2px 2px; scroll-padding-left: 2px; }
    .pattern-tab-panels { padding: 12px 6px 14px; }
    .pattern-active-filters { padding-left: 6px; padding-right: 6px; }
}

.pattern-tab {
    position: relative;
    flex: 0 0 auto;
    padding: 11px 2px;
    background: none; border: none; cursor: pointer;
    font-size: 14px; font-weight: 500; color: #8a9099;
    white-space: nowrap;
    transition: color .15s ease;
}
.pattern-tab:hover { color: var(--b2color); }
.pattern-tab.is-active { color: var(--b2color); font-weight: 600; }
/* 已选维度小圆点：提示该 tab 下存在生效的筛选（与「已选条件」行呼应，便于定位） */
.pattern-tab.is-filtered:not(.is-active)::before {
    content: '';
    position: absolute;
    top: 7px; right: -2px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--b2color);
}
/* 选中下划线（竞品同款：主题色短横线） */
.pattern-tab.is-active::after {
    content: '';
    position: absolute;
    left: 50%; bottom: -1px;
    transform: translateX(-50%);
    width: 20px; height: 2px;
    background: var(--b2color);
    border-radius: 999px;
}

/* 各 tab 对应的值 pills 行（同一时间只显示一组） */
.pattern-tab-panels { padding: 12px 0 14px; }
.pattern-tab-panel { display: none; flex-wrap: wrap; gap: 8px; }
.pattern-tab-panel.is-active { display: flex; }

/* 值 pill：竞品同款圆角胶囊；选中态用主题色（补齐 b2 .filter-items a 缺失的高亮） */
.pattern-tab-panel a {
    display: inline-block;
    padding: 4px 13px;
    background: #f6f7f8;
    border: 1px solid #eef0f3;
    border-radius: 999px;
    color: #5b6470;
    font-size: 13px;
    text-decoration: none;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.pattern-tab-panel a:hover { color: var(--b2color); border-color: var(--b2color); }
.pattern-tab-panel a.current {
    background: var(--b2color);
    color: #fff;
    border-color: var(--b2color);
}

/* 排序分组（积分/金额仅在付费范围有意义）：整行铺满，标题 + 选项自动换行 */
.pattern-sort-group {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    width: 100%; margin-top: 2px;
}
.pattern-sort-group__title {
    width: 100%; font-size: 12px; color: #9aa1ab; margin-bottom: 2px;
}

/* 已选条件胶囊行：把叠加的筛选一次性呈现，消除"筛选互相干扰/被清空"的错觉。
   放在 sticky 顶栏内，滚动时始终可见当前生效的全部筛选。 */
.pattern-active-filters {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 10px 0 12px;
    border-top: 1px dashed #eef0f3;
}
.pattern-active-filters__label {
    font-size: 13px; color: #8a9099; margin-right: 2px;
}
.pd-filter-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 999px;
    background: #fff; border: 1px solid var(--b2color);
    color: var(--b2color); font-size: 12.5px; text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.pd-filter-chip:hover { background: var(--b2color); color: #fff; }
.pd-filter-chip:hover .pd-filter-chip__x { color: #fff; }
.pd-filter-chip__k { opacity: .8; }
.pd-filter-chip__x { font-size: 14px; line-height: 1; margin-left: 1px; }
.pd-filter-chip--clear {
    border-style: dashed; border-color: #c7ccd3; color: #8a9099;
}
.pd-filter-chip--clear:hover { background: #8a9099; border-color: #8a9099; color: #fff; }

/* 结果计数：沿用 b2 浅灰辅助文字 */
.pattern-result-bar { padding: 12px 2px 8px; font-size: 13px; color: #999; }

/* 图墙改为规整网格（仿竞品 pindoumao 的方卡片网格）：等宽等间距、左右严格对称、卡片尺寸完全可控。
   卡片统一方形 1:1（预览图 object-fit:cover 居中裁切，与竞品一致），不再用按真实比例的多列瀑布流。 */
.pd-waterfall {
    display: grid;
    /* 自适应列：列最小宽用 clamp 随视口缩放（手机≈2列、平板≈3~4列、桌面≈5列），
       最大 1fr 仅用于把剩余空隙均分给各列，不会把卡片撑大——列最小宽上限 230px
       保证桌面卡片尺寸≈原版（1200px 宽约 5 列、每列≈220px），绝不放大。
       列数随容器自动增减、铺满整行无左右空隙，但密度与原版一致。
       用 auto-fit（而非 auto-fill）：当末行卡片数不足整行时，空列轨道会被折叠、
       把剩余宽度均分给末行现有卡片，从而不出现空缺（auto-fill 会保留空轨道→末尾留白）。 */
    grid-template-columns: repeat(auto-fit, minmax(clamp(150px, 18vw, 230px), 1fr));
    gap: 14px;
}
.pd-waterfall__item { min-width: 0; }

/* 首页「🔥 热门图纸」模块专属：数量固定 10，桌面固定 5 列 ⇒ 正好 2 行、零空缺，
   不再依赖容器宽度算列数（否则窄容器会一行只排 4 个、末 2 张另起一行）。
   窄屏自适应（auto-fit 保证末行无空缺），手机固定 2 列（10 张=5 行）。列表页/用户中心不受影响。 */
.pd-waterfall--home { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1024px) {
    .pd-waterfall--home { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (max-width: 560px) {
    .pd-waterfall--home { grid-template-columns: repeat(2, 1fr); }
}

/* 用户中心「图纸」页：父主题 body 已限定 .wrapper 宽度（约 1100px 居中），author-page-left 在其中约 844px。
   本段只在该父容器「内部」做收敛，绝不改动父主题的页面基本布局宽度。
   根因：.author-page-left 是 flex:1 项，默认 min-width:auto 不会收缩到内容最小宽度以下，
   图墙 min-content 偏大时会把整列撑宽、挤压右侧 240px 导航（即「其他板块被挤压」「撑破父容器」）。
   修复两处（均在父容器宽度之内）：
   ① 强制 .author-page-left min-width:0，使其能随容器收缩；
   ② 图墙改用 auto-fit 列：auto-fit 会把没有卡片的空尾列折叠掉、把剩余空间全部分给有内容的卡片，
      从而刚好填满 author-page-left 的剩余宽度、最右侧不留空隙。再给 .pattern-archive 加 overflow:hidden 兜底。
   仅作用于 .author-page-left 下的图墙，不影响 /pattern 图纸库，也不突破父主题的 1100px 限定宽度。 */
.author-table .author-page-left { min-width: 0; }
.author-page-left .pd-waterfall {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    max-width: 100%;
}
.pattern-archive { min-width: 0; overflow: hidden; }
/* 用户中心：内容区已被左侧 240px 导航限定宽度，不要再套 1600px 居中上限
   （否则宽屏下 .pattern-archive 被收窄居中，最右卡片离容器边缘有明显空隙）；
   同时清掉为 /pattern 库页预留的 44px 右内边距（用户页无右侧固定条压图）。
   让图墙真正填满 .author-page-left 的剩余宽度。仅作用于用户中心，不影响 /pattern 库。 */
.author-page-left .pattern-archive {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

/* 整图卡片（竞品同款）：按比例封面 + 底部黑色渐变遮罩 + 标题 + 角标。
   复用 b2 的 .item-in / .b2-radius 圆角盒，但去掉内边距与白底，改用主题色阴影与悬停上浮。 */
.pattern-archive .pd-card {
    position: relative;
    padding: 0;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.pattern-archive .pd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.pd-card__link { display: block; color: inherit; text-decoration: none; }
.pd-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f3f4f6;
    overflow: hidden;
}
.pd-card__img,
.pattern-archive .pd-card__media .post-thumb {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.pd-card:hover .pd-card__img,
.pd-card:hover .post-thumb { transform: scale(1.06); }
.pd-card__placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #c2c8d0; font-size: 13px;
}
.pd-card__lock {
    position: absolute; top: 8px; right: 8px;
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.45); color: #fff; font-size: 13px;
}
/* 色系品牌胶囊：卡片左上角（与右上角锁不冲突），半透明深色底 + 白字，与遮罩风格一致 */
.pd-card__brand {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    max-width: 70%;
    display: inline-flex; align-items: center;
    padding: 3px 9px; border-radius: 999px;
    background: rgba(0,0,0,.45); color: #fff;
    font-size: 12px; font-weight: 500; line-height: 1.4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.pd-card__overlay {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 24px 10px 9px;
    background: linear-gradient(to top, rgba(0,0,0,.74), rgba(0,0,0,0));
}
.pd-card__title {
    margin: 0 0 5px;
    color: #fff;
    font-size: 14px; font-weight: 600; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.pd-card__badges { display: flex; flex-wrap: wrap; gap: 4px; }
.pd-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px; line-height: 1.4; font-weight: 500;
    color: #fff; white-space: nowrap;
}
/* 角标配色继承父主题：尺寸用主题主色 --b2color；难度用中性深色；
   免费用绿色（通用语义），付费/积分/限等级/登录用琥珀金突出"需解锁"。 */
.pd-badge--size  { background: var(--b2color); }
.pd-badge--level { background: rgba(15,23,42,.7); }
.pd-badge--free  { background: #16a34a; }
.pd-badge--paid  { background: #d97706; }

.no-patterns { text-align: center; color: #888; padding: 80px 0; }
.no-patterns a { color: var(--b2color); font-weight: 600; }

/* 加载更多（瀑布流无限滚动）：复用 b2 主题色，胶囊按钮 + 加载中旋转图标。
   无更多时由 JS 隐藏按钮并显示「已经到底啦」。 */
.pd-loadmore { text-align: center; padding: 26px 0 10px; }
.pd-loadmore__btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 30px; border: 1px solid var(--b2color);
    background: var(--b2color); color: #fff;
    border-radius: 999px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: opacity .15s ease;
}
.pd-loadmore__btn:hover { opacity: .9; }
.pd-loadmore.is-loading .pd-loadmore__btn { opacity: .65; cursor: default; }
.pd-loadmore__spinner {
    width: 14px; height: 14px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: pd-spin .7s linear infinite;
}
.pd-loadmore.is-loading .pd-loadmore__spinner { display: inline-block; }
@keyframes pd-spin { to { transform: rotate(360deg); } }
.pd-loadmore__end { color: #999; font-size: 13px; margin: 0; }
/* 到底后 JS 给按钮加 [hidden]，但下方 .pd-loadmore__btn 的 display:inline-flex 会盖过 [hidden] 的 display:none，
   显式补一条让到底时按钮真正消失（只留「已经到底啦」）。 */
.pd-loadmore__btn[hidden] { display: none; }
/* 自动加载失败态：按钮变红、文案改为「加载失败，点击重试」，供用户手动重试 */
.pd-loadmore.is-error .pd-loadmore__btn { background: #e64340; border-color: #e64340; }
.pd-loadmore.is-error .pd-loadmore__btn:hover { opacity: .9; }

/* b2 分页容器间距 */
.b2-pagenav.post-nav { margin-top: 28px; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 12px; border: 1px solid #eeeeee; border-radius: 8px;
    background: #fff; color: #555555; font-size: 13px; text-decoration: none;
}
.pagination a:hover { background: #eef4ff; border-color: #cfe0ff; color: var(--b2color); }
.pagination .current { background: var(--b2color); border-color: var(--b2color); color: #fff; font-weight: 600; }
.pagination .prev, .pagination .next { padding: 0 14px; }

.ap-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 18px; }
.ap-search { flex: 1 1 220px; padding: 9px 12px; border: 1px solid #e3e6ea; border-radius: 8px; font-size: 14px; }
.ap-brand, .ap-sort { padding: 9px 12px; border: 1px solid #e3e6ea; border-radius: 8px; font-size: 14px; background: #fff; }
.ap-go { padding: 9px 18px; border: none; border-radius: 8px; background: var(--b2color); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.ap-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #eef0f3; border-radius: 10px; overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.ap-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px); }
.ap-thumb { aspect-ratio: 1 / 1; background: #f3f4f6; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ap-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ap-thumb-empty { color: #cbd5e1; font-size: 28px; }
.ap-card-body { padding: 10px 12px; }
.ap-title { font-size: 14px; font-weight: 600; margin: 0 0 6px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ap-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: #888; }
.ap-meta .ap-price.free { color: #2f9e44; font-weight: 600; }
.ap-meta .ap-price.paid { color: #e8590b; font-weight: 600; }
.ap-sub { margin-top: 6px; font-size: 12px; color: #aaa; }
.ap-empty { color: #888; padding: 30px 0; text-align: center; }
.ap-pager { margin-top: 18px; text-align: center; }
.ap-pager a, .ap-pager span { display: inline-block; padding: 4px 10px; margin: 0 2px; border-radius: 6px; }
.ap-pager .current { background: var(--b2color); color: #fff; }

/* ---------- 发布页：只读图纸信息卡（尺寸/颜色数/难度/品牌，由算法或草稿自动同步，不可编辑） ---------- */
.publish-info-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f6f9ff 0%, #f3f6fb 100%);
    border: 1px solid #e6ecf5;
    border-radius: 12px;
}
.publish-info-card .pi-item {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px 10px; background: #fff; border: 1px solid #eef1f6; border-radius: 8px;
}
.publish-info-card .pi-label { font-size: 12px; color: #98a2b3; letter-spacing: .3px; }
.publish-info-card .pi-value {
    font-size: 16px; font-weight: 700; color: #1f2933; line-height: 1.3;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}
.publish-row > .publish-readonly { flex: 1; }
.publish-readonly { display: flex; flex-direction: column; gap: 6px; }
.publish-readonly-value {
    font-size: 15px; font-weight: 600; color: #2b2f33;
    padding: 10px 12px; background: #f7f8fa; border: 1px solid #eef0f3; border-radius: 8px;
}
.publish-field-hint { font-size: 12px; color: #aaa; font-weight: 400; }
.publish-form select:disabled {
    background: #f2f3f5; color: #8a9099; cursor: not-allowed; opacity: 1;
}

/* ---------- 下载区：离线图纸为主按钮，预览图为次按钮 ---------- */
.pp-dl-item:first-child .pp-dl-btn { background: var(--b2color); }
.pp-dl-item:first-child .pp-dl-btn:hover { background: #0052cc; }
.pp-dl-item:not(:first-child) .pp-dl-btn { background: var(--b2color); }
.pp-dl-item:not(:first-child) .pp-dl-btn:hover { background: #0052cc; }

/* 详情页：重新生成（同步草稿）按钮悬停态 */
.pattern-actions-extra .pattern-btn-regenerate:hover { background: #e6deff; border-color: #c9b8f5; color: #4a2fb0; }
/* 详情页：删除图纸按钮（危险操作，红色） */
.pattern-actions-extra .pattern-btn-delete {
    background: #fff; color: #e03131; border: 1px solid #cfe0ff;
}
.pattern-actions-extra .pattern-btn-delete:hover { background: #eef4ff; border-color: #ffa8a8; color: #c92a2a; }
.pattern-actions-extra .pattern-btn-delete:disabled { opacity: .6; cursor: default; }

/* ============================================================
   图纸单页（参照拼豆猫布局）
   顶部：左预览(~55%) | 右信息(标题/作者/统计/4列info/操作)
   下方全宽：颜色清单 / 评论
   ============================================================ */
.pattern-single {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  color: #2b2b2b;
}

/* 内容区容器 + 左侧浮动操作栏 */
.pd-content-area {
  position: relative;
}
/* 覆写父主题 absolute 为 fixed，匹配父主题视觉效果 */
.pd-content-area .post-content-footer {
  position: fixed !important;
  left: calc((100vw - 1100px) / 2 - 80px);
  top: 200px;
  z-index: 90;
}
.pd-content-area .post-content-footer-in {
  transform: none !important;
  transition: none !important;
}
/* 移动端取消浮动 */
@media (max-width: 768px) {
  .pd-content-area .post-content-footer {
    position: static !important;
    left: auto; top: auto;
  }
  .pd-content-area .post-content-footer-in {
    width: 100%; display: flex;
    justify-content: space-between; align-items: center;
    margin-top: 12px;
  }
}

.pattern-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #aaaaaa;
  margin-bottom: 18px;
}
.pattern-breadcrumb a { color: #aaaaaa; text-decoration: none; }
.pattern-breadcrumb a:hover { color: var(--b2color); }
.pattern-breadcrumb .current { color: #555; font-weight: 500; }
.pattern-breadcrumb .sep { color: #ddd; }

/* ---------- 主区域：左预览 | 右信息（两栏卡片，间隙可见） ----------
   用 flexbox 而非 grid：flex 的 align-items:stretch 对等高更可靠，
   避免 grid auto-row 在某些父主题上下文下不拉伸的问题。 */
.pd-hero {
  display: flex;
  gap: 26px;
  align-items: stretch;
}

/* 左：正方形预览卡 */
.pd-preview {
  flex: 1 1 0;
  min-width: 0;               /* 允许收缩，不撑破 flex 容器 */
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border: 1px solid #eceef1;
  border-radius: var(--b2radius, 4px);
  box-shadow: 0 2px 10px rgba(43,38,32,.05);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  min-height: 0;
  overflow: hidden;
  align-self: stretch;        /* 与右侧信息列等高；正方形图片在卡内居中(letterbox) */
}
.pd-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
  border-radius: 6px;
}

/* 右：信息区（三行卡片，无外层卡背景，每行自带卡片） */
.pd-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 380px;
  flex-shrink: 0;            /* 固定宽度，不收缩 */
  min-width: 0;               /* 允许内部长内容收缩，不撑破 380px 列 */
  align-self: stretch;        /* 与左预览列等高：撑满 .pd-hero 行高 */
  min-height: 0;
}
/* 信息卡视觉顺序：规格(spec) → 内容(info) → 操作(actions)（内容卡移到规格卡下方） */
.pd-card-info    { order: 1; }
.pd-card-spec    { order: 2; }
.pd-card-actions { order: 3; }
.pd-share-pop    { order: 4; }
.pd-source       { order: 5; }

/* 通用卡片 */
.pd-card {
  background: #ffffff;
  border: 1px solid #eceef1;
  border-radius: var(--b2radius, 4px);
  padding: 18px 20px;
}

/* ====== Card 1: 内容信息 ====== */
.pd-card-info { padding: 20px 22px; flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.pd-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px;
  color: #1f2933;
  overflow-wrap: break-word;   /* 超长标题换行，避免撑破右侧栏 */
  word-break: break-word;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;       /* 超长标题最多 2 行，避免信息列过高导致与预览不等高 */
  overflow: hidden;
}
/* 作者区：对齐父主题文章详情页 .post-user-info 风格（浅灰胶囊条 + 左头像/昵称 / 右操作） */
.pd-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #f7f8fa;
  border-radius: 10px;
}
.pd-author-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pd-author-link { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.pd-author-link .avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0,0,0,.12);
}
.pd-author-name { color: #333; font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-author-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding-left: 50px; /* 与头像(40)+间距(10)对齐，使日期落在昵称正下方 */
}
.pd-action { color: #999; }
.pd-date { color: #aaa; }
.pd-author-actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* ====== 评分（星级 1-5）====== */
.pd-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 14px;
}
.pd-stars { display: inline-flex; gap: 2px; }
.pd-stars.is-disabled { opacity: .55; pointer-events: none; }
.pd-star {
  font-size: 20px;
  line-height: 1;
  color: #d9dde2;
  cursor: pointer;
  transition: color .12s ease, transform .12s ease;
  user-select: none;
}
.pd-star.is-on { color: #f5a623; }
.pd-stars:hover .pd-star { color: #d9dde2; }
.pd-stars:hover .pd-star:hover,
.pd-stars .pd-star.is-on { color: #f5a623; }
/* 悬停时点亮到当前星为止（CSS 兄弟选择器） */
.pd-stars:hover .pd-star:hover ~ .pd-star { color: #d9dde2; }
.pd-star:focus-visible { outline: 2px solid #f5a623; outline-offset: 2px; border-radius: 3px; }
.pd-rating-text { font-size: 12px; color: #999; }

/* ====== 评价区（评论即评分，位于评论位置）====== */
.pd-reviews {
  margin-top: 28px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid #eceef1;
}
.pd-reviews-head { margin-bottom: 14px; }
.pd-reviews-title { font-size: 17px; font-weight: 600; color: #2b2620; margin: 0; }
.pd-reviews-count { color: #f5a623; font-weight: 700; }

.pd-reviews-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fbf7ef;
  border-radius: 10px;
  margin-bottom: 18px;
}
.pd-reviews-avg { font-size: 34px; font-weight: 700; color: #f5a623; line-height: 1; }
.pd-reviews-stars { font-size: 20px; color: #f5a623; letter-spacing: 2px; }
.pd-reviews-meta { font-size: 13px; color: #999; }

.pd-reviews-form { margin-bottom: 18px; }
.pd-review-tip { font-size: 13px; color: #999; margin: 0; }
.pd-review-tip a { color: #4a90d9; text-decoration: none; }
.pd-review-form-inner { display: flex; flex-direction: column; gap: 10px; }
.pd-review-pick { display: flex; align-items: center; gap: 8px; }
.pd-review-pick-label { font-size: 13px; color: #666; }
.pd-review-stars { display: inline-flex; gap: 2px; font-size: 24px; line-height: 1; }
.pd-review-star {
  background: none; border: none; padding: 0; cursor: pointer;
  color: #d9dde2; transition: color .12s ease, transform .12s ease; user-select: none;
}
.pd-review-star.is-on { color: #f5a623; }
.pd-review-star:hover { transform: scale(1.12); }
.pd-review-pick-text { font-size: 13px; color: #999; }
.pd-review-textarea {
  width: 100%; resize: vertical; border: 1px solid #e3e6ea; border-radius: 8px;
  padding: 10px 12px; font-size: 14px; font-family: inherit; color: #2b2620;
}
.pd-review-textarea:focus { outline: none; border-color: #f5a623; }
.pd-review-actions { display: flex; align-items: center; gap: 12px; }
.pd-review-submit {
  background: #f5a623; color: #fff; border: none; border-radius: 8px;
  padding: 8px 20px; font-size: 14px; cursor: pointer; transition: background .12s ease;
}
.pd-review-submit:hover { background: #e0961a; }
.pd-review-submit:disabled { opacity: .6; cursor: default; }
.pd-review-msg { font-size: 13px; color: #e0961a; }

.pd-reviews-list { display: flex; flex-direction: column; gap: 14px; }
.pd-reviews-empty { font-size: 13px; color: #bbb; text-align: center; padding: 10px 0; }
.pd-review-item { display: flex; gap: 12px; padding-top: 14px; border-top: 1px solid #f2f3f5; }
.pd-review-item:first-child { border-top: none; padding-top: 0; }
.pd-review-avatar { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; }
.pd-review-body { flex: 1; min-width: 0; }
.pd-review-top { display: flex; align-items: center; gap: 10px; }
.pd-review-name { font-size: 14px; font-weight: 600; color: #2b2620; }
.pd-review-stars { font-size: 14px; color: #f5a623; letter-spacing: 1px; }
.pd-review-text { font-size: 14px; color: #4a4540; margin: 6px 0 4px; line-height: 1.6; word-break: break-word; }
.pd-review-date { font-size: 12px; color: #bbb; }

/* 关注按钮：复用父主题 B2PRO 关注语义（AuthorFollow 端点），样式对齐父主题（b2-radius 矩形） */
.pd-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 0;
  padding: 5px 14px;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 6px;
  border: 1px solid var(--b2color, #2f6bff);
  background: var(--b2color, #2f6bff);
  color: #fff;
  cursor: pointer;
  transition: opacity .15s, background .15s, color .15s;
}
.pd-follow-btn:hover { opacity: .9; }
.pd-follow-btn.is-following {
  background: #fff;
  color: #888;
  border-color: #ddd;
}
.pd-follow-btn:disabled { opacity: .6; cursor: default; }

/* 私信按钮：复用父主题 b2Dmsg 全局弹窗，样式与关注按钮同构（描边浅色） */
.pd-dm-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 0;
  padding: 5px 14px;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.pd-dm-btn:hover {
  border-color: var(--b2color, #2f6bff);
  color: var(--b2color, #2f6bff);
  background: #f4f8ff;
}

/* 图纸说明（标题下、作者上，Card1 内） */
.pd-card-desc {
  margin: 6px 0 14px;
  padding-top: 0;
  border-top: none;
}
.pd-card-desc-clip {
  position: relative;
  max-height: 133px;            /* ≈ 5 行（14px × 1.8） */
  overflow: hidden;
  transition: max-height .25s ease;
}
.pd-card-desc.is-expanded .pd-card-desc-clip { max-height: none; }
/* 折叠时底部渐隐遮罩，提示还有内容 */
.pd-card-desc.is-clamped .pd-card-desc-clip::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 42px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
  pointer-events: none;
}
.pd-desc-toggle {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 4px;
  font-size: 13px;
  line-height: 1.6;
  color: #2b6cff;
  background: none;
  border: none;
  cursor: pointer;
}
.pd-desc-toggle:hover { text-decoration: underline; }
.pd-desc-toggle[hidden] { display: none; }
.pd-card-desc-body {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
  overflow-wrap: break-word;    /* 防御：长串不换行撑破布局 */
  word-break: break-word;
}
.pd-card-desc-body p { margin: 0 0 8px; }
.pd-card-desc-body p:last-child { margin-bottom: 0; }

/* 统计图标行（纯图标 + 数字，无文字标签） */
.pd-stat-icons {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f5f5f5;
}
.pd-si {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #999;
  background: none;
  border: none;
  padding: 0;
  cursor: default;
  transition: color .15s;
}
.pd-edit-meta-ico {
  cursor: pointer;
  text-decoration: none;
  color: #999;
  margin-left: auto;
}
.pd-edit-meta-ico:hover { color: #0066ff; }
.pd-si-ico {
  width: 17px;
  height: 17px;
  fill: #c0c4cc;
  flex: 0 0 auto;
}
.pd-si-num { font-weight: 600; font-size: 13px; }

/* 可点击：喜欢 */
.pd-like-btn { cursor: pointer; }
.pd-like-btn:hover .pd-si-ico { fill: #ff6b6b; }
.pd-like-btn:hover { color: #ff6b6b; }
.pd-like-btn.is-liked .pd-si-ico { fill: #ff6b6b; }
.pd-like-btn.is-liked { color: #ff6b6b; }

/* 可点击：收藏小图标 */
.pd-fav-mini { cursor: pointer; }
.pd-fav-mini:hover .pd-si-ico { fill: #fab005; }
.pd-fav-mini:hover { color: #fab005; }
.pd-fav-mini.is-fav .pd-si-ico { fill: #fab005; }
.pd-fav-mini.is-fav { color: #fab005; }

/* ====== Card 2: 规格信息（小卡片网格，2 个成员一行） ======
   注意：选择器用 .pd-info .pd-card-spec 提高特异性，
   防止文件末尾通用的 .pd-card{display:flex}（同特异性但后声明）覆盖 grid。 */
.pd-info .pd-card-spec {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pd-spec {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 1px solid #f0f0f0;
  border-radius: var(--b2radius, 4px);
  background: #fafbfc;
  transition: border-color .15s, background .15s;
}
.pd-spec:hover { border-color: #e0e0e0; background: #f8f9fa; }
.pd-spec-lbl {
  font-size: 11px;
  color: #aaa;
  letter-spacing: .5px;
}
.pd-spec-val {
  font-size: 14px;
  font-weight: 600;
  color: #2b2b2b;
}
.pd-spec-val.free { color: #2f9e44; }
.pd-spec-val.paid { color: #e8590b; }

/* ====== Card 3: 用户交互（上：拼豆打卡 | 下：下载 + 查看） ====== */
.pd-card-actions { padding: 14px 16px; }
.pd-unlocked-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eaf7ee;
  border: 1px solid #b9e3c6;
  color: #2f9e44;
  font-size: 12px;
  font-weight: 600;
}
.pd-unlocked-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #2f9e44;
  color: #fff;
  font-size: 10px;
  line-height: 1;
}
/* 权限规格行：权限值与已解锁徽标（仅✓圆点）水平并排 */
.pd-spec-val-row { display: inline-flex; align-items: center; gap: 6px; }
.pd-spec .pd-unlocked-tag { margin: 0; padding: 0; background: transparent; border: none; }
.pd-act-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}
.pd-act-row:last-child { margin-bottom: 0; }
.pd-act-full {
  flex: 1;
  justify-content: center;
  background: var(--b2-color, #f0a500);
  color: #fff;
  border-color: var(--b2-color, #f0a500);
  font-weight: 600;
}
.pd-act-full:hover:not(:disabled) {
  background: var(--b2-color, #e09500);
  color: #fff;
}
.pd-act {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 8px;
  border: 1px solid #eef0f3;
  border-radius: var(--b2radius, 4px);
  background: #fafbfc;
  color: #555;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.pd-act:hover:not(:disabled) { background: #f0f1f5; border-color: #ddd; color: var(--b2color); }
.pd-act:disabled { opacity: .45; cursor: default; }
.pd-act:focus-visible { outline: 2px solid var(--b2color); outline-offset: 2px; }
.pd-act-ico {
  width: 17px;
  height: 17px;
  fill: currentColor;
  flex: 0 0 auto;
}

/* 收藏按钮激活态 */
.pd-act.pd-fav.is-fav { color: #fab005; border-color: #ffe08a; background: #fff9f0; }
.pd-act.pd-fav.is-fav .pd-act-ico { fill: #fab005; }

/* 下载按钮强调 */
.pd-dl-btn { background: var(--b2color); color: #fff; border-color: var(--b2color); }
.pd-dl-btn:hover:not(:disabled) { background: #0052cc; color: #fff; border-color: #0052cc; }
.pd-dl-btn .pd-act-ico { fill: currentColor; }

/* 打印 PDF 按钮 */
.pd-pdf-btn { background: #16a34a; color: #fff; border-color: #16a34a; }
.pd-pdf-btn:hover:not(:disabled) { background: #15803d; color: #fff; border-color: #15803d; }
.pd-pdf-btn .pd-act-ico { fill: currentColor; }

/* 编辑按钮 */
.pd-edit-btn:hover:not(:disabled) { color: #2f9e44; border-color: #b2f2bb; }

/* 按钮内联加载态（静默门禁校验时显示，非弹窗） */
.pd-act.pd-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.pd-act.pd-loading .pd-act-ico { visibility: hidden; }
.pd-act.pd-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(120, 130, 150, .35);
  border-top-color: var(--b2color, #0052cc);
  border-radius: 50%;
  animation: pd-btn-spin .7s linear infinite;
}
.pd-dl-btn.pd-loading::after {
  border-color: rgba(255, 255, 255, .5);
  border-top-color: #fff;
}
.pd-pdf-btn.pd-loading::after {
  border-color: rgba(255, 255, 255, .5);
  border-top-color: #fff;
}
@keyframes pd-btn-spin { to { transform: rotate(360deg); } }

/* 保留：图标通用 */
.pd-ico {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

/* 收藏激活态：红色实心星 */
.pd-fav.is-fav {
  color: #e03131;
  border-color: #ffc9c9;
  background: #fff5f5;
}
.pd-fav.is-fav:hover { color: #c92a2a; background: #ffe9e9; }

/* 分享浮层 */
.pd-share-pop {
  position: relative;
  margin-top: 10px;
  background: #fff;
  border: 1px solid #ededed;
  border-radius: var(--b2radius, 4px);
  padding: 10px;
  box-shadow: 0 8px 24px rgba(43,38,32,.10);
  animation: pd-pop-in .14s ease;
}
.pd-share-pop[hidden] { display: none; }
.pd-share-arrow {
  position: absolute;
  top: -7px; left: 24px;
  width: 12px; height: 12px;
  background: #fff;
  border-left: 1px solid #ededed;
  border-top: 1px solid #ededed;
  transform: rotate(45deg);
}
.pd-share-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pd-share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px;
  border: none;
  border-radius: 9px;
  background: #f7f8fa;
  color: #555;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.pd-share-item:hover { background: #eef1f5; color: var(--b2color); }
.pd-share-item .pd-ico { width: 20px; height: 20px; }

@keyframes pd-pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* 海报弹窗 */
.pd-poster-mask {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.5);
  z-index: 9999;
  padding: 20px;
}
.pd-poster-mask.show { display: flex; }
.pd-poster-box {
  position: relative;
  background: #fff;
  border-radius: var(--b2radius, 4px);
  padding: 18px;
  max-width: 360px;
  width: 100%;
  max-height: 86vh;
  overflow: auto;
}
.pd-poster-close {
  position: absolute; top: 8px; right: 10px;
  width: 30px; height: 30px;
  border: none; background: transparent;
  font-size: 24px; line-height: 1; color: #999; cursor: pointer;
}
.pd-poster-close:hover { color: #333; }
.pd-poster-loading, .pd-poster-err { padding: 40px 0; text-align: center; color: #999; }
.pd-poster-card { text-align: center; }
.pd-poster-img { width: 100%; border-radius: 8px; margin-bottom: 12px; background: #f3f4f6; }
.pd-poster-title { font-size: 16px; font-weight: 700; color: #1f2933; margin-bottom: 6px; word-break: break-all; }
.pd-poster-desc { font-size: 13px; color: #777; margin-bottom: 10px; line-height: 1.5; }
.pd-poster-link { font-size: 12px; color: #aaa; word-break: break-all; margin-bottom: 14px; }
.pd-poster-copy {
  display: inline-block;
  padding: 9px 22px;
  border: none; border-radius: 8px;
  background: var(--b2color); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.pd-poster-copy:hover { background: #0052cc; }

/* 微信内下载/打印：同 WebView 内联预览（避免 blob 跳外部浏览器空白） */
.pd-wx-file-mask {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.78);
  z-index: 10000;
  padding: 18px;
}
.pd-wx-file-mask.show { display: flex; }
.pd-wx-file-box {
  position: relative;
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  max-width: 420px;
  width: 100%;
  max-height: 88vh;
  display: flex; flex-direction: column;
}
.pd-wx-file-close {
  position: absolute; top: 6px; right: 8px;
  width: 32px; height: 32px;
  border: none; background: rgba(0,0,0,.04); border-radius: 50%;
  font-size: 22px; line-height: 1; color: #666; cursor: pointer; z-index: 2;
}
.pd-wx-file-close:hover { color: #222; }
.pd-wx-file-body {
  flex: 1 1 auto;
  min-height: 200px;
  max-height: 70vh;
  overflow: auto;
  display: flex; align-items: center; justify-content: center;
  background: #f3f4f6; border-radius: 8px;
}
.pd-wx-file-img { max-width: 100%; max-height: 70vh; display: block; -webkit-touch-callout: default; user-select: none; }
.pd-wx-file-iframe { width: 100%; height: 70vh; border: none; background: #fff; }
.pd-wx-file-tip {
  flex: 0 0 auto;
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}

/* 轻提示 */
.pd-toast {
  position: fixed;
  left: 50%; bottom: 40px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(33,37,41,.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 22px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 10000;
}
.pd-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* 轻提示类型：成功（绿）/ 失败（红），info 沿用默认深灰 */
.pd-toast-success { background: #2e9b4f; }
.pd-toast-error { background: #e0483e; }
.pd-toast-success::before,
.pd-toast-error::before {
  margin-right: 6px;
  font-weight: 700;
}
.pd-toast-success::before { content: "\2713"; } /* ✓ */
.pd-toast-error::before { content: "\2715"; }   /* ✕ */

/* 下载/编辑确认弹窗 */
.pd-modal-mask {
  position: fixed; inset: 0;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5);
  z-index: 9999;
  padding: 20px;
}
.pd-modal-mask.show { display: flex; }
.pd-modal-box {
  position: relative;
  width: 100%; max-width: 420px;
  background: #fff;
  border-radius: var(--b2radius, 4px);
  padding: 22px 24px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  animation: pd-modal-in .22s ease;
}
@keyframes pd-modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.pd-modal-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.pd-modal-icon {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #0066ff, #3385ff);
  color: #fff; font-size: 16px;
}
.pd-modal-head.download .pd-modal-icon::before { content: "⬇"; }
.pd-modal-head.edit .pd-modal-icon::before { content: "✎"; }
.pd-modal-title {
  flex: 1; margin: 0;
  font-size: 17px; font-weight: 600; color: #1a1a1a;
}
.pd-modal-close {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: #f4f5f7; color: #666;
  font-size: 20px; line-height: 1; cursor: pointer;
  margin-left: auto; padding: 0;
}
.pd-modal-close:hover { background: #ebedf0; color: #333; }
.pd-modal-info {
  background: #f6fffc;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.pd-modal-name {
  font-size: 15px; font-weight: 600; color: #1a1a1a;
  line-height: 1.4; margin-bottom: 10px;
  word-break: break-all;
}
.pd-modal-price-row {
  display: flex; align-items: center; gap: 8px;
}
.pd-modal-coin { font-size: 15px; }
.pd-modal-price {
  font-size: 15px; font-weight: 700; color: #1a1a1a;
}
.pd-modal-badge {
  display: inline-block;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.pd-modal-badge.free { background: #e6f7f1; color: #0a9b5e; }
.pd-modal-badge.paid { background: #fff3e6; color: #c77800; }
.pd-modal-status {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #f4f6f8;
  color: #333;
  font-size: 14px;
  margin-bottom: 4px;
}
.pd-modal-check {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #0a9b5e; color: #fff;
  font-size: 13px; font-weight: 700;
  flex: 0 0 22px;
}
.pd-modal-status.locked .pd-modal-check { background: #c77800; }
.pd-status-short {
  color: #e74c3c; font-weight: 700;
}
.pd-modal-pay {
  margin-top: 12px;
  padding: 14px 18px;
  border: 1px dashed #d6b25a;
  border-radius: 12px;
  background: #fffaf0;
}
.pd-modal-pay-amount {
  font-size: 15px; font-weight: 700; color: #b37900;
  margin-bottom: 10px;
}
.pd-modal-pay-link {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  background: #0066ff; color: #fff;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.pd-modal-pay-link:hover { background: #0052cc; }
.pd-modal-pay-tip {
  margin-top: 10px; font-size: 12px; color: #999;
}
/* 支付方式选择（与父主题 pay-type 一致） */
.pd-modal-methods {
  margin-top: 12px;
}
.pd-modal-methods-label {
  font-size: 13px; color: #666; margin-bottom: 8px;
}
.pd-modal-methods-row {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.pd-pay-method {
  flex: 1 1 auto;
  min-width: 84px;
  padding: 10px 12px;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  background: #fff;
  color: #333;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.pd-pay-method:hover { border-color: #0066ff; }
.pd-pay-method.is-on {
  border-color: #0066ff;
  background: #eaf2ff;
  color: #0066ff;
}
/* 网关二维码 */
.pd-modal-pay-qr {
  display: block;
  width: 180px; height: 180px;
  margin: 4px auto 0;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.pd-modal-pay-text {
  margin: 6px auto 0;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px dashed #ccc;
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
  word-break: break-all;
  color: #666;
}
.pd-modal-extra {
  margin-top: 12px;
}
.pd-modal-extra-tip {
  margin: 0 0 12px;
  font-size: 13px; line-height: 1.6; color: #666;
}
.pd-modal-foot {
  display: flex; gap: 12px; margin-top: 22px;
}
.pd-modal-cancel,
.pd-modal-confirm {
  flex: 1; padding: 12px 16px; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  border: none; transition: background .15s, transform .05s;
}
.pd-modal-cancel {
  background: #f4f5f7; color: #555;
}
.pd-modal-cancel:hover { background: #ebedf0; }
.pd-modal-confirm {
  background: #0066ff; color: #fff;
}
.pd-modal-confirm:hover { background: #0052cc; }
.pd-modal-confirm:disabled { background: #99bbff; cursor: not-allowed; }
.pd-modal-confirm:active { transform: scale(.98); }

/* 评分 */
.pd-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
}
#rating-stars { font-size: 22px; letter-spacing: 1px; line-height: 1; }
#rating-stars .star { color: #e0e0e0; transition: color .12s; }
#rating-stars .star.on { color: #f5b301; }
#rating-stars .star.mine { text-shadow: 0 0 2px rgba(245,179,1,.5); }
.rating-avg { font-size: 16px; font-weight: 700; color: #f5b301; }
.rating-count { color: #aaa; font-size: 12px; }

/* 相关图纸 */
.pattern-related { margin-top: 40px; }
.pr-title { font-size: 18px; font-weight: 700; margin: 0 0 16px; color: #2b2b2b; }
.pr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pr-card {
  display: block;
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: var(--b2radius, 4px);
  overflow: hidden;
  box-shadow: 0 6px 16px 0 #d6e0e8;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.pr-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0, 0, 0, .1); }
.pr-thumb { position: relative; aspect-ratio: 1 / 1; background: #f7f8fa; overflow: hidden; }
.pr-thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.pr-thumb-ph { width: 100%; height: 100%; background: linear-gradient(135deg, #e0ebff, #eef4ff); }
.pr-info { padding: 12px; }
.pr-name {
  font-size: 14px; font-weight: 600; margin: 0 0 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pr-meta { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============================================================
   图纸发布页 · 两栏（左实时预览 / 右表单）+ 3 步进度条
   ============================================================ */
.pattern-publish-wrap { max-width: 1180px; margin: 24px auto; padding: 0 8px; }

.publish-head { margin-bottom: 20px; }
.publish-title { font-size: 26px; font-weight: 700; margin: 0 0 6px; color: #2b2b2b; }
.publish-sub { font-size: 14px; color: #999999; margin: 0; }

.publish-steps { display: flex; align-items: center; gap: 32px; margin-bottom: 24px; }
.pstep { display: flex; align-items: center; gap: 8px; }
.pstep-circle {
  width: 32px; height: 32px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; background: #f2f2f2; color: #bbb;
}
.pstep-label { font-size: 14px; color: #bbb; }
.pstep.done .pstep-circle { background: #e8f0ff; color: var(--b2color); }
.pstep.done .pstep-label { color: #999999; }
.pstep.active .pstep-circle { background: var(--b2color); color: #fff; }
.pstep.active .pstep-label { color: var(--b2color); font-weight: 700; }

.publish-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.publish-preview-col { display: flex; flex-direction: column; gap: 16px; }
.publish-meta-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; min-height: 0; overflow: hidden; }
/* 图纸信息卡：填满右栏高度，与左栏正方形预览等高；色号清单 flex:1 在卡内自适应填充（被正方形天然限高） */
.publish-info-card { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.publish-colorlist { border-top: 1px solid #eee; padding-top: 12px; flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.pcl-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; flex: none; }
.pcl-title { font-size: 14px; font-weight: 700; color: #2b2b2b; }
.pcl-count { font-size: 12px; color: #999; font-weight: 600; }
/* 两列网格：一行两个色号，等宽对齐；#f-color-grid 自身 flex 撑满清单区高度，自适应右栏目标高度 */
.pcl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 10px; align-items: stretch; }
#f-color-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.pcl-item { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; box-sizing: border-box;
  padding: 5px 8px 5px 5px; background: #f7f8fa; border: 1px solid #eee; border-radius: 6px; font-size: 12px; color: #555; }
.pcl-swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,.12); flex: none; }
.pcl-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; letter-spacing: .2px; color: #333; white-space: nowrap; flex: none; }
.pcl-name { color: #999; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcl-num { color: #999; margin-left: auto; white-space: nowrap; flex: none; }
.pcl-empty { font-size: 12px; color: #bbb; }

.pd-card {
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  padding: 16px;
}

/* 预览卡：直接显示预览图，无额外标签（卡片外观合并，单层内边距）
   预览卡填满左栏高度，图片保持正方形并居中（等比缩放、不变形） */
.publish-preview { background: #f4f5f7; border: 1px solid #eeeeee; border-radius: 8px; box-shadow: none; overflow: hidden; padding: 12px; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1; flex: none; box-sizing: border-box; }
#publish-preview { width: 100%; display: flex; align-items: center; justify-content: center; }
#publish-preview img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; image-rendering: pixelated; border-radius: 6px; }

/* 表单区：与 publish-grid 同级，位于其下方，整行铺开 */
.publish-detail { margin-top: 24px; }

/* 规格4项（在表单内部，图纸信息下方、标题上方；2个一行） */
.publish-spec-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  margin-bottom: 4px;
}
/* 图纸信息卡内：规格行下边距收紧，避免与色号清单间隔过大（覆盖 .publish-fields>* 的 20px） */
.publish-info-card .publish-spec-row { margin-bottom: 8px; }
.publish-spec-row .pi-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; background: #f7f8fa;
  border: 1px solid #eeeeee; border-radius: 8px;
}
.publish-spec-row .pi-label { font-size: 11px; color: #999999; }
.publish-spec-row .pi-value { font-size: 14px; font-weight: 600; color: #2b2b2b; }

.publish-fields { display: flex; flex-direction: column; }
.publish-fields > * { margin-bottom: 20px; }
.publish-fields > *:last-child { margin-bottom: 0; }
/* 摘要与主题之间收紧间距 */
.publish-fields .pf-compact-next { margin-bottom: 10px; }
.pf-title { font-size: 16px; font-weight: 700; margin: 0; color: #2b2b2b; }
.pf-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #2b2b2b; }
.pf-field input,
.pf-field textarea,
.pf-field select {
  padding: 12px; border: 1px solid #eeeeee; border-radius: 8px;
  background: #f4f5f7; font-size: 14px; color: #2b2b2b; font-family: inherit;
}
.pf-field input:focus,
.pf-field textarea:focus,
.pf-field select:focus { outline: none; border-color: var(--b2color); }

/* 摘要字数计数器 */
.pf-char-count {
  display: inline-block;
  text-align: right; font-size: 12px; color: #bbb;
  margin-top: 2px; user-select: none;
}
.pf-char-count span { font-weight: 600; color: #999; }
.pf-hint { font-size: 12px; color: #999; line-height: 1.5; }

/* 限制等级：两组复选框（普通等级 / 会员等级），与 B2PRO 投稿页一致 */
.publish-roles-box { display: flex; flex-direction: column; gap: 10px; margin-top: 2px;
  background: #f7f8fa; border: 1px solid #eceef1; border-radius: 8px; padding: 12px; }
.publish-roles-group { }
.publish-roles-title { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: #555; }
.publish-roles-items { display: flex; flex-flow: wrap; gap: 6px 14px; }
.publish-role-item {
  display: inline-flex; align-items: center; gap: 5px;
  margin: 0; cursor: pointer; font-size: 13px; color: #2b2b2b; user-select: none;
}
.publish-role-item input { width: auto; margin: 0; cursor: pointer; }

/* 限制等级快捷操作：一键仅VIP */
.publish-roles-quick { text-align: right; margin-bottom: 2px; }
.roles-quick-btn {
  display: inline-block; padding: 2px 10px;
  font-size: 12px; color: var(--b2color); background: rgba(var(--b2color-rgb, 102, 153, 255), 0.08);
  border: 1px solid rgba(var(--b2color-rgb, 102, 153, 255), 0.2); border-radius: 13px;
  cursor: pointer; user-select: none; transition: background .15s, color .15s;
}
.roles-quick-btn:hover { color: #fff; background: var(--b2color); }

/* 标签：上方整行输入框 + 下方已选 chip（两行布局） */
.publish-fields .pf-tag-input {
  width: 100%; box-sizing: border-box;
  padding: 12px; border: 1px solid #eeeeee; border-radius: 8px;
  background: #f4f5f7; font-size: 14px; color: #2b2b2b; font-family: inherit;
}
.publish-fields .pf-tag-input:focus { outline: none; border-color: var(--b2color); }
.publish-fields .pf-tag-input::placeholder { color: #bbb; }
.publish-fields .cat-picked {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.publish-fields .cat-picked:empty { display: none; }
.publish-fields .cat-picked span {
  font-size: 12px; display: inline-block; padding: 4px 9px;
  border-radius: 3px; cursor: pointer; color: #555;
  box-shadow: inset 0 0 9px rgba(204,204,204,.39);
  transition: box-shadow .15s;
}
.publish-fields .cat-picked span:hover {
  box-shadow: inset 0 0 9px rgba(204,204,204,.69); color: #c0392b;
}

.publish-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 权限 + 付费/积分/等级：同行（权限固定宽，条件输入占剩余空间） */
.publish-permission-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; }
.publish-permission-dyn { min-width: 0; }
.publish-permission-dyn > .pf-field,
.publish-permission-dyn > .pf-perm-hint { margin: 0; }
.pf-perm-hint { font-size: 13px; color: #999; align-self: center; padding: 10px 0; }

.publish-tags-box { display: flex; flex-direction: column; gap: 8px; }
.publish-field-label { font-size: 13px; color: #2b2b2b; }

.publish-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 12px; }
.pattern-btn-back {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border: 1px solid #eeeeee; border-radius: 8px;
  background: #fff; color: #555555; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.pattern-btn-back:hover { background: #f4f5f7; border-color: #dcdcdc; }
.pattern-btn-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 20px; border: none; border-radius: 8px;
  background: var(--b2color); color: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s;
}
.pattern-btn-submit:hover { background: #0052cc; }

.publish-msg { font-size: 13px; min-height: 18px; margin: 0; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 860px) {
  /* 去掉 hero 外圈 padding：桌面端 .pd-hero 无 padding，窄屏若加 padding 会让 hero 内卡片
     比下方 pd-colors 内缩，导致宽度/对齐不一致。文章 .pattern-single 已提供统一侧边距。 */
  .pd-hero { flex-direction: column; gap: 20px; padding: 0; }
  .pd-info { width: auto; }   /* 移动端不再固定 380px */
  /* 移动端 hero 变纵向后，必须解除 flex:1 1 0 + aspect-ratio 在 column 下的冲突
     （否则主轴尺寸解析为 0，被 min-height 兜底成矮条，预览图显得很小）。
     改为固定全宽正方形，预览图铺满。 */
  .pd-preview { flex: none; width: 100%; aspect-ratio: 1 / 1; min-height: 0; }
  .pd-meta-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-actions { grid-template-columns: repeat(2, 1fr); }
  .pr-grid { grid-template-columns: repeat(2, 1fr); }
  .publish-grid { grid-template-columns: 1fr; gap: 20px; }
  .publish-preview { aspect-ratio: 1 / 1; }
}

@media (max-width: 600px) {
  .pd-hero { padding: 0; }
  .pd-title { font-size: 19px; }
  .pd-meta-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .pd-actions { grid-template-columns: 1fr 1fr; }
  .pr-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .publish-row { grid-template-columns: 1fr; }
  .publish-permission-row { grid-template-columns: 1fr; gap: 10px; }
  .publish-spec-row { grid-template-columns: repeat(2, 1fr); }
  .publish-steps { gap: 16px; }
  .pattern-single { padding: 16px 12px 36px; }
}
/* ===========================================================
   用户中心「我的图纸」管理页（原 User/patterns.php，已下线）
   =========================================================== */
.up-new-row { display: flex; justify-content: flex-end; margin-bottom: 16px; }

.up-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; border: none;
}
.up-btn-primary { background: var(--b2color); color: #fff; }
.up-btn-primary:hover { background: #0052cc; }
.up-btn-edit { background: #ffffff; color: #555555; border: 1px solid #eeeeee; }
.up-btn-edit:hover { background: #f1ebe3; }
.up-btn-publish { background: var(--b2color); color: #fff; }
.up-btn-publish:hover { background: #0052cc; }
.up-btn-more { background: #fff; color: #555555; border: 1px solid #eeeeee; padding: 9px 12px; }
.up-btn-more:hover { background: #f7f7f7; }
.up-btn-batch { background: #fff; color: #555555; border: 1px solid #eeeeee; }
.up-btn-danger { background: #eef4ff; color: var(--b2color); border: 1px solid #cfe0ff; }
.up-btn-danger:disabled { opacity: .5; cursor: not-allowed; }

.up-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.up-tab {
    padding: 8px 16px; border-radius: 8px; background: #fff; color: #555555;
    border: 1px solid #eeeeee; font-size: 13px; text-decoration: none;
}
.up-tab:hover { background: #f7f7f7; }
.up-tab.active { background: var(--b2color); color: #fff; border-color: var(--b2color); }

.up-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.up-toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.up-search {
    display: flex; align-items: center; gap: 8px;
    width: 280px; padding: 8px 12px; border: 1px solid #eeeeee; border-radius: 10px; background: #fff;
}
.up-search svg { color: #aaaaaa; flex-shrink: 0; }
.up-search input { border: none; background: transparent; outline: none; font-size: 14px; width: 100%; }
.up-select {
    padding: 8px 28px 8px 12px; border: 1px solid #eeeeee; border-radius: 8px; background: #fff;
    font-size: 14px; color: #555555; appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239A9188' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
.up-toolbar-right { display: flex; align-items: center; gap: 8px; }

.up-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1100px) { .up-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .up-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .up-grid { grid-template-columns: 1fr; } }

.up-card { border: 1px solid #eeeeee; border-radius: 16px; overflow: hidden; background: #fff; transition: transform .15s, box-shadow .15s; }
.up-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(43,38,32,.08); }
.up-card-thumb { aspect-ratio: 16 / 10; background: #fafafa; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.up-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-card-ph { color: #bbb; font-size: 14px; }
.up-card-check { position: absolute; top: 10px; left: 10px; }
.up-card-check input { width: 18px; height: 18px; border-radius: 4px; border: 1px solid #d6cfc7; accent-color: var(--b2color); cursor: pointer; }
.up-card-status { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.up-card-status.publish { background: #e7f7ee; color: #1e9e5a; }
.up-card-status.draft { background: #f2f2f2; color: #999999; }
.up-card-status.pending { background: #fff3e0; color: #e67a00; }

.up-card-body { padding: 14px 14px 16px; }
.up-card-title { font-size: 15px; font-weight: 600; margin: 0 0 8px; color: #2b2b2b; line-height: 1.4; }
.up-card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.up-card-meta span { font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.up-card-meta .up-cat { background: #f2f2f2; color: #999999; }
.up-card-meta .up-level { background: #eef4ff; color: var(--b2color); }
.up-card-meta .up-colors { color: #aaaaaa; padding: 2px 0; }
.up-card-stats { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #999999; margin-bottom: 12px; }
.up-card-stats .up-rating strong { color: #2b2b2b; }
.up-card-actions { display: flex; gap: 8px; }

.up-empty { text-align: center; color: #888; padding: 60px 0; }
.up-empty a { color: var(--b2color); font-weight: 600; }
.up-pager { margin-top: 24px; text-align: center; }
.up-pager a, .up-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px; margin: 0 2px; border-radius: 8px; border: 1px solid #eeeeee; background: #fff; color: #555555; font-size: 13px; text-decoration: none; }
.up-pager a:hover { background: #eef4ff; border-color: #cfe0ff; color: var(--b2color); }
.up-pager .current { background: var(--b2color); border-color: var(--b2color); color: #fff; }

/* ============================================================
   P3 · 拼豆库存控制台（用户中心「拼豆」选项卡）
   侧边导航 + 图纸网格 + 仓库卡片（统计概览 + 色卡预览）
   ============================================================ */
#beads-console.beads-console { padding: 0; border: none; background: transparent; box-shadow: none; }
.beads-panels { display: block; }
.beads-panels > .beads-panel[hidden] { display: none; }

/* 参数设置面板 */
.beads-settings { max-width: 640px; }
.beads-setting-row {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 18px 0; border-bottom: 1px solid #f0f0f0;
}
.beads-setting-label { min-width: 0; }
.beads-setting-label .bsl-title { font-size: 14px; font-weight: 600; color: #2b2b2b; }
.beads-setting-label .bsl-desc { font-size: 12px; color: #999; margin-top: 3px; line-height: 1.5; }
.beads-setting-ctrl { flex: 0 0 auto; }
.beads-setting-ctrl select {
    height: 38px; min-width: 200px; padding: 0 12px; font-size: 14px; color: #333;
    border: 1px solid #eeeeee; border-radius: 10px; background: #fafafa; cursor: pointer; outline: none;
}
.beads-setting-ctrl select:focus { border-color: #b3d1ff; background: #fff; }
.beads-settings-actions { margin-top: 22px; display: flex; align-items: center; gap: 14px; }
.beads-settings-hint { color: #999; font-size: 12px; }
.beads-panel { background: #fff; border: 1px solid #eeeeee; border-radius: 4px; padding: 20px 22px; }
.beads-panel-loading { color: #aaaaaa; padding: 40px 0; text-align: center; font-size: 14px; }

.beads-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.beads-panel-head h3 { margin: 0; font-size: 20px; font-weight: 700; color: #2b2b2b; }
.beads-muted { color: #aaaaaa; font-size: 13px; }
.beads-panel-head > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.beads-panel-tools { display: flex; align-items: center; gap: 10px; }
.beads-search { height: 38px; padding: 0 14px; border: 1px solid #eeeeee; border-radius: 4px; font-size: 14px; background: #fafafa; min-width: 200px; outline: none; }
.beads-search:focus { border-color: #b3d1ff; background: #fff; }

.beads-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 38px; padding: 0 16px; border-radius: 4px; border: 1px solid #eeeeee; background: #fff; color: #555555; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .15s; }
.beads-btn:hover { border-color: #cfe0ff; color: var(--b2color); }
.beads-btn-primary { background: var(--b2color); border-color: var(--b2color); color: #fff; }
.beads-btn-primary:hover { background: #0052cc; border-color: #0052cc; color: #fff; }
.beads-btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

.beads-link { border: none; background: transparent; color: #555555; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 4px; text-decoration: none; transition: background .15s, color .15s; }
.beads-link:hover { background: #f2f2f2; color: var(--b2color); }
.beads-danger { color: #e0524d; }
.beads-danger:hover { background: #fdecec; color: #d8443f; }

/* 我的图纸网格 */
.beads-pat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.beads-pat-card { border: 1px solid #eeeeee; border-radius: 4px; overflow: hidden; background: #fff; transition: transform .15s, box-shadow .15s; }
.beads-pat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(43,38,32,.08); }
.beads-pat-thumb { display: block; aspect-ratio: 1 / 1; background: #fafafa; overflow: hidden; }
.beads-pat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.beads-pat-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #c9c1b6; font-size: 13px; }
.beads-pat-body { padding: 12px 12px 14px; }
.beads-pat-title { font-size: 14px; font-weight: 600; color: #2b2b2b; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.beads-pat-title a { color: inherit; text-decoration: none; }
.beads-pat-title a:hover { color: var(--b2color); }
.beads-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.beads-badge.published { background: #e7f7ee; color: #1e9e5a; }
.beads-badge.draft { background: #f2f2f2; color: #999999; }
.beads-pat-meta { font-size: 12px; color: #aaaaaa; margin-bottom: 10px; }
.beads-pat-actions { display: flex; gap: 4px; border-top: 1px solid #f0f0f0; padding-top: 8px; }

/* 仓库卡片 */
.beads-wh { border: 1px solid #eeeeee; border-radius: 4px; padding: 18px 20px; margin-bottom: 16px; background: #fff; }
.beads-wh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.beads-wh-name { font-size: 17px; font-weight: 700; color: #2b2b2b; }
.beads-wh-meta { font-size: 12px; color: #aaaaaa; margin-top: 4px; }
.beads-wh-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* 仓库统计概览 */
.beads-wh-stats { display: flex; gap: 10px; margin: 14px 0 10px; }
.beads-wh-stat { flex: 1; background: #fafafa; border-radius: 4px; padding: 12px 14px; text-align: center; }
.beads-wh-stat .num { font-size: 22px; font-weight: 700; color: #2b2b2b; line-height: 1.1; }
.beads-wh-stat .lbl { font-size: 12px; color: #aaaaaa; margin-top: 4px; }
.beads-wh-stat.warn .num { color: #e0524d; }

/* 库存明细（展开编辑）*/
.beads-wh-inv { border-top: 1px solid #f0f0f0; margin-top: 14px; padding-top: 14px; }
.beads-wh-inv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.beads-wh-inv-head span { font-size: 14px; font-weight: 600; color: #2b2b2b; }
.beads-inv-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; padding-right: 4px; }
.beads-inv-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.beads-swatch { width: 20px; height: 20px; border-radius: 4px; border: 1px solid rgba(0,0,0,.08); flex-shrink: 0; }
.beads-inv-code { font-size: 13px; font-weight: 600; color: #2b2b2b; min-width: 60px; }
.beads-inv-name { font-size: 13px; color: #999999; flex: 1; }
.beads-inv-qty { width: 92px; height: 32px; padding: 0 10px; border: 1px solid #eeeeee; border-radius: 4px; font-size: 13px; background: #fafafa; outline: none; }
.beads-inv-qty:focus { border-color: #b3d1ff; background: #fff; }
.beads-custom-color { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #eeeeee; flex-wrap: wrap; }
.beads-custom-color input { height: 32px; padding: 0 10px; border: 1px solid #eeeeee; border-radius: 4px; font-size: 13px; background: #fafafa; outline: none; }

/* 颜色清单网格（只读展示，一行多色：色块 + 色号 + 数量/颗） */
.beads-wh-grid { display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 4px 0; }
.beads-wh-chip { display: inline-flex; align-items: center; gap: 6px; background: #f7f8fa; border: 1px solid #eef1f6; border-radius: 6px; padding: 4px 9px; font-size: 12px; color: #555; }
.beads-wh-chip .sw { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.1); flex-shrink: 0; }
.beads-wh-chip .code { font-weight: 600; color: #2b2b2b; }
.beads-wh-chip .qty { color: #999; }


/* 仓库表单 */
.beads-wh-form-title { font-size: 16px; font-weight: 700; color: #2b2b2b; margin-bottom: 14px; }
.beads-form-row { display: flex; gap: 14px; margin-bottom: 12px; }
.beads-form-row label { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #555555; }
.beads-form-row input, .beads-form-row select { height: 38px; padding: 0 12px; border: 1px solid #eeeeee; border-radius: 4px; font-size: 14px; background: #fafafa; outline: none; font-weight: 400; }
.beads-form-row input:focus, .beads-form-row select:focus { border-color: #b3d1ff; background: #fff; }
.beads-wh-form-actions { display: flex; gap: 10px; margin-top: 6px; }

.beads-empty { text-align: center; color: #aaaaaa; padding: 50px 0; font-size: 14px; }
.beads-error { color: #e0524d; padding: 30px 0; text-align: center; }
.beads-pager { margin-top: 20px; text-align: center; }
.beads-page-btn { min-width: 34px; height: 34px; padding: 0 10px; margin: 0 2px; border-radius: 4px; border: 1px solid #eeeeee; background: #fff; color: #555555; font-size: 13px; cursor: pointer; }
.beads-page-btn:hover { background: #eef4ff; border-color: #cfe0ff; color: var(--b2color); }
.beads-page-btn.active { background: var(--b2color); border-color: var(--b2color); color: #fff; }

/* ===== 新建存豆盒：多步向导 ===== */
.beads-wz { border: 1px solid #e3ecfb; border-radius: 4px; padding: 20px 22px; margin-bottom: 16px; background: linear-gradient(180deg, #f7faff 0%, #fff 60%); }
.beads-wz-steps { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.beads-wz-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #999; font-weight: 600; padding: 6px 12px; border-radius: 4px; background: #fff; border: 1px solid #eee; }
.beads-wz-step.active { color: var(--b2color); border-color: #bcd4ff; background: #eef4ff; }
.beads-wz-step.done { color: #2a9d3f; border-color: #c7e9cf; background: #f1faf3; }
.beads-wz-dot { width: 20px; height: 20px; border-radius: 50%; background: #e7e7e7; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.beads-wz-step.active .beads-wz-dot { background: var(--b2color); }
.beads-wz-step.done .beads-wz-dot { background: #2a9d3f; }
.beads-wz-title { font-size: 15px; font-weight: 700; color: #2b2b2b; margin-bottom: 14px; }
.beads-wz-basic { margin-bottom: 6px; }
.beads-wz-body { font-size: 14px; color: #444; }
.beads-form-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.beads-form-row > label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #666; flex: 1; min-width: 180px; }
.beads-form-row input[type=text], .beads-form-row input[type=number], .beads-form-row select { height: 38px; padding: 0 12px; border: 1px solid #eeeeee; border-radius: 4px; background: #fff; font-size: 14px; outline: none; }
.beads-unit-label { flex: none; width: auto; }
.wz-bpg-hidden, .wf-bpg-hidden { visibility: hidden; pointer-events: none; }
.beads-form-row input:focus, .beads-form-row select:focus { border-color: #b3d1ff; }
.beads-seg { display: inline-flex; border: 1px solid #eeeeee; border-radius: 4px; overflow: hidden; align-self: flex-start; }
.beads-seg-btn { border: none; background: #fff; padding: 0 12px; height: 38px; line-height: 38px; font-size: 13px; font-weight: 600; color: #666; cursor: pointer; white-space: nowrap; }
.beads-seg-btn.active { background: var(--b2color); color: #fff; }
.beads-wz-branch { border: 1px solid #eee; border-radius: 4px; padding: 14px; margin-bottom: 12px; background: #fff; }
.beads-wz-branch.active { border-color: #bcd4ff; background: #f7faff; }
.beads-wz-branch-h { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: #2b2b2b; }
.beads-wz-colorpicker { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 280px; overflow-y: auto; }
.beads-wz-color { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #eee; border-radius: 4px; cursor: pointer; font-size: 12px; color: #555; }
.beads-wz-color.on { border-color: var(--b2color); background: #eef4ff; }
.beads-wz-color .beads-swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid #ddd; flex-shrink: 0; }
.beads-wz-batchbar, .beads-wz-kitbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; font-size: 13px; color: #666; }
.beads-wz-kitbar { margin-top: 0; }
.beads-wz-kitbar select, .beads-wz-batchbar input, .wz-kit, .wz-kit3, .wh-kit, .wh-batch-amt { height: 32px; padding: 0 10px; border: 1px solid #eee; border-radius: 4px; font-size: 13px; background: #fff; outline: none; }
.wz-kit, .wh-kit { min-width: 160px; }
.beads-wz-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.beads-step { width: 30px; height: 30px; border-radius: 4px; border: 1px solid #eeeeee; background: #fff; color: #555; font-size: 16px; font-weight: 700; cursor: pointer; flex-shrink: 0; line-height: 1; }
.beads-step:hover { border-color: var(--b2color); color: var(--b2color); }
.beads-inv-unit { font-size: 12px; color: #999; margin-left: -4px; }
.beads-inv-hint { font-size: 12px; color: #aaa; font-style: italic; }
.beads-wz-subtitle { font-size: 12px; color: #999; margin: 2px 0 0; padding-left: 2px; }

/* 向导第二步：色号目录（搜索 + 吸顶工具条 + 步进器）*/
.beads-inv-scroll { border: 1px solid #eef1f6; border-radius: 4px; background: #fff; margin-bottom: 4px; }
.beads-inv-toolbar { background: #fff; padding: 12px; border-bottom: 1px solid #f0f2f6; }
.beads-inv-search { width: 100%; height: 36px; padding: 0 12px; border: 1px solid #eeeeee; border-radius: 4px; font-size: 14px; background: #fafafa; outline: none; box-sizing: border-box; }
.beads-inv-search:focus { border-color: #b3d1ff; background: #fff; }
.beads-inv-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.flex1 { flex: 1; }
.beads-inv-list { padding: 4px 12px 12px; }
.beads-inv-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 4px; }
.beads-inv-row:hover { background: #f7faff; }
.beads-inv-row.on { background: #eef4ff; }
.beads-inv-row .inv-check { width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.beads-inv-row .beads-inv-qty { width: 78px; text-align: center; }
.beads-inv-row .beads-step { width: 28px; height: 28px; }
.beads-link { background: none; border: none; color: var(--b2color); font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 4px; text-decoration: none; }
.beads-link:hover { background: #eef4ff; }
.beads-link.beads-danger { color: #e0524d; }
.beads-link.beads-danger:hover { background: #fdeceb; }
.beads-link.beads-disabled,
.beads-disabled { color: #bbbbbb !important; cursor: not-allowed; pointer-events: none; text-decoration: none !important; }
.beads-link.beads-disabled:hover,
.beads-disabled:hover { background: transparent !important; }
.wz-batch-amt { height: 32px; padding: 0 10px; border: 1px solid #eee; border-radius: 4px; font-size: 13px; background: #fff; outline: none; width: 90px; }

/* 我的评分 Tab */
.beads-rating-guide { text-align: center; padding: 48px 24px; background: #fafafa; border: 1px dashed #e7e7e7; border-radius: 4px; }
.brg-ico { font-size: 44px; line-height: 1; margin-bottom: 14px; }
.brg-title { font-size: 18px; font-weight: 700; color: #2b2b2b; margin-bottom: 10px; }
.brg-desc { font-size: 14px; color: #999999; line-height: 1.7; max-width: 420px; margin: 0 auto 20px; }

.beads-rating-list { display: flex; flex-direction: column; gap: 14px; }
.beads-rating-item { border: 1px solid #eeeeee; border-radius: 4px; background: #fff; padding: 16px 18px; }
.beads-rating-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.beads-rating-title { font-size: 15px; font-weight: 600; color: #2b2b2b; text-decoration: none; }
.beads-rating-title:hover { color: var(--b2color); }
.beads-rating-score { font-size: 18px; letter-spacing: 2px; color: #FFC107; flex-shrink: 0; }
.beads-rating-comment { font-size: 14px; color: #555555; line-height: 1.7; margin-bottom: 8px; }
.beads-rating-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.beads-rating-tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 4px; background: #fff4e5; color: #d97706; }
.beads-rating-date { font-size: 12px; color: #aaaaaa; }

@media (max-width: 900px) {
    .beads-tabs { flex-wrap: wrap; }
    .beads-tab { margin-right: 12px; margin-bottom: 4px; }
    .beads-setting-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .beads-setting-ctrl, .beads-setting-ctrl select { width: 100%; }
}

/* ===== 我的图纸面板增强：状态标签 / 卡片 ===== */
.beads-pat-filter { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 2px; }
.beads-pat-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.beads-pat-tab { border: 1px solid #eeeeee; background: #fff; color: #555555; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 4px; cursor: pointer; transition: all .15s; }
.beads-pat-tab:hover { border-color: #cfe0ff; color: var(--b2color); }
.beads-pat-tab.active { background: var(--b2color); border-color: var(--b2color); color: #fff; }
.beads-pat-tab .cnt { opacity: .7; font-weight: 700; margin-left: 2px; }
.beads-pat-tools { display: flex; gap: 10px; }
.beads-sel { height: 38px; padding: 0 12px; border: 1px solid #eeeeee; border-radius: 4px; background: #fff; color: #555555; font-size: 13px; outline: none; cursor: pointer; }
.beads-sel:focus { border-color: #b3d1ff; }

.beads-pat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 6px; }
.beads-pat-card { background: #fff; border: 1px solid #eeeeee; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s; }
.beads-pat-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.07); transform: translateY(-2px); }
.beads-pat-thumb { position: relative; display: block; aspect-ratio: 1 / 1; background: #efe7e0; overflow: hidden; }
.beads-pat-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.beads-pat-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #aaaaaa; font-size: 13px; }
.beads-pat-badge { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 4px; color: #fff; }
.beads-pat-badge.published { background: var(--b2color); }
.beads-pat-badge.draft { background: #aaaaaa; }
.beads-pat-badge.pending { background: #f0a020; }
/* 「公开」标记：左上角半透明绿标，示意草稿已有对应公开版本 */
.beads-pat-badge-public { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 3px; color: #fff; background: rgba(76,175,80,0.85); z-index: 2; pointer-events: none; }
.beads-pat-badge-draft  { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 3px; color: #fff; background: rgba(158,158,158,0.85); z-index: 2; pointer-events: none; }
/* 「有修改」标记：公开图纸草稿有未发布的改动（data_hash 不一致），右下角橙色标 */
.beads-pat-badge-changed { position: absolute; top: 28px; left: 6px; font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 3px; color: #fff; background: rgba(245,124,0,0.85); z-index: 2; pointer-events: none; }
.beads-pat-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.beads-pat-title { font-size: 15px; font-weight: 600; color: #2b2b2b; line-height: 1.3; }
.beads-pat-title a { color: inherit; text-decoration: none; }
.beads-pat-title a:hover { color: var(--b2color); }
.beads-pat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.beads-chip { background: #f6efe9; color: #8a7b70; font-size: 12px; padding: 3px 8px; border-radius: 4px; }
.beads-pat-stats-row { display: flex; gap: 14px; font-size: 13px; color: #555555; }
.beads-stat { display: inline-flex; align-items: center; gap: 3px; }
.beads-pat-actions { display: flex; gap: 4px; border-top: 1px solid #f0f0f0; padding-top: 8px; }

@media (max-width: 680px) {
    .beads-pat-filter { flex-direction: column; align-items: stretch; }
    .beads-pat-tools { width: 100%; }
    .beads-sel { flex: 1; }
}

/* ============================================================
   v2 评论与评分分离 —— 新增样式
   ============================================================ */

/* ----- SECTION A: 普通评论（无门禁） ----- */
.pd-comments {
  margin-top: 28px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid #eceef1;
  border-radius: 14px;
}
.pd-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.pd-comments-title {
  font-size: 17px;
  font-weight: 700;
  color: #2b2620;
  margin: 0;
}
.pd-comments-hint {
  font-size: 12px;
  color: #aaa;
}

/* 评论输入框 */
.pd-comments-form { margin-bottom: 18px; }
.pd-comment-login-tip {
  font-size: 14px;
  color: #888;
  background: #fafbfc;
  border-radius: 10px;
  padding: 16px 20px;
  text-align: center;
}
.pd-comment-login-tip a { color: var(--b2color, #2f6bff); text-decoration: none; font-weight: 600; }
.pd-comment-input-wrap {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fbfcfd;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  padding: 12px 14px;
}
.pd-comment-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.pd-comment-textarea {
  flex: 1;
  min-width: 0;
  resize: vertical;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: #2b2620;
  line-height: 1.6;
  outline: none;
}
.pd-comment-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.pd-comment-count { font-size: 12px; color: #bbb; }
.pd-comment-count span { font-weight: 600; color: #999; }
.pd-comment-submit {
  padding: 7px 20px;
  border: none;
  border-radius: 8px;
  background: var(--b2color, #2f6bff);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.pd-comment-submit:hover { background: #0052cc; }

/* 评论列表 */
.pd-comments-list { display: flex; flex-direction: column; gap: 14px; }
.pd-comments-loading,
.pd-comments-empty { font-size: 13px; color: #bbb; text-align: center; padding: 24px 0; }
.pd-cmt-item {
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f5f5f5;
}
.pd-cmt-item:last-child { border-bottom: none; padding-bottom: 0; }
.pd-cmt-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.pd-cmt-body { flex: 1; min-width: 0; }
.pd-cmt-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.pd-cmt-name { font-size: 14px; font-weight: 600; color: #2b2620; }
.pd-cmt-date { font-size: 12px; color: #bbb; margin-left: auto; }
.pd-cmt-text { font-size: 14px; color: #4a4540; line-height: 1.6; margin: 4px 0; word-break: break-word; }
.pd-cmt-actions {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  font-size: 12px;
  color: #bbb;
}
.pd-cmt-like, .pd-cmt-reply { cursor: pointer; user-select: none; }
.pd-cmt-like:hover { color: #e35; }
.pd-cmt-reply:hover { color: var(--b2color); }

/* ----- SECTION B: 评分概览（只读聚合 + 引导） ----- */
.pd-ratings-summary {
  margin-top: 28px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid #eceef1;
  border-radius: 14px;
}
.pd-ratings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.pd-ratings-title {
  font-size: 17px;
  font-weight: 700;
  color: #2b2620;
  margin: 0;
}
.pd-ratings-count {
  color: #f5a623;
  font-weight: 700;
}
.pd-rate-btn {
  padding: 7px 20px;
  border: none;
  border-radius: 8px;
  background: #2f9e44;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.pd-rate-btn:hover { background: #248a37; }
.pd-rate-btn--modify { background: transparent; border: 1px solid #ddd; color: #666; }
.pd-rate-btn--modify:hover { border-color: #2f9e44; color: #2f9e44; }
.pd-rate-link { font-size: 13px; color: var(--b2color, #2f6bff); text-decoration: none; font-weight: 500; }
.pd-rate-link:hover { text-decoration: underline; }

/* 聚合数据 */
/* ============ 评分概览区（聚合评分 + 星级分布条）============ */
/* 社区上行：评分（左）+ 打赏（右）并排，视觉与 pd-colors 一致 */
.pd-community-top-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: var(--b2radius, 4px);
}
/* 基础样式 */
.pd-rating-overview {
  display: flex;
  gap: 28px;
  align-items: stretch;
  padding: 22px 24px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
  border: 1px solid #eaecf0;
  border-radius: var(--b2radius, 4px);
}
/* 并排行内覆盖：子元素不重复父容器的背景/边框/边距 */
.pd-community-top-row .pd-rating-overview {
  flex: 0 0 42%;
  min-width: 0;
  padding: 0;
  padding-right: 20px;
  margin-bottom: 0;
  gap: 14px;
  background: none;
  border: none;
  border-right: 1px solid #eee;       /* 与打赏之间的分隔线 */
}
.pd-community-top-row .content-ds {
  flex: 1 1 58%;
  min-width: 0;
  margin-top: 0;
  padding: 0;
  background: none;
  overflow: hidden;
}

/* 移动端：评分（左）与打赏（右）由并排改为上下堆叠，避免窄屏撑破容器
   沿用本文件已有的 860px 断点（与 .pd-hero 一致）。 */
@media (max-width: 860px) {
  .pd-community-top-row {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  .pd-community-top-row .pd-rating-overview {
    flex: none;
    width: 100%;
    padding-right: 0;
    border-right: none;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;   /* 改用下分隔线 */
    gap: 16px;
  }
  .pd-community-top-row .content-ds {
    flex: none;
    width: 100%;
    margin-top: 0;
    padding: 16px;
    overflow: visible;
  }
}

/* 超窄屏（手机竖屏）：打赏内部 #con 固定 320px 改为自适应，杜绝横向溢出 */
@media (max-width: 480px) {
  .pd-community-top-row .content-ds #con {
    width: 100%;
    max-width: 320px;
  }
}
.pd-rating-big-score {
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-right: 24px;
  border-right: 1px solid #eaecf0;
}
.pd-rating-number {
  font-size: 44px;
  font-weight: 800;
  color: #FF8F00;
  line-height: 1;
  letter-spacing: -1px;
}
.pd-rating-number:empty::after,
.pd-rating-number.mdash::after { content: '\2014'; }
.pd-rating-label {
  font-size: 12px;
  color: #9aa0a6;
  margin-top: 4px;
  letter-spacing: .5px;
}
.pd-rating-detail { flex: 1; min-width: 0; }
.pd-rating-starline {
  font-size: 22px;
  letter-spacing: 2px;
  color: #FFB300;
  margin-bottom: 10px;
  line-height: 1;
}
.pd-rating-starline .b2font { font-size: 22px; }
.pd-rating-starline .pd-star { color: #d9dde2; }
.pd-rating-starline .pd-star.on { color: #FFB300; }

/* 星级分布条 */
.pd-rating-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pd-rating-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity .15s;
}
.pd-rating-bar-row:hover { opacity: .85; }
.pd-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: #8a8f94;
  width: 30px;
  flex-shrink: 0;
  text-align: right;
}
.pd-bar-track {
  flex: 1;
  height: 8px;
  background: #e8eaed;
  border-radius: 6px;
  overflow: hidden;
  min-width: 60px;
}
.pd-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFB300, #FF8F00);
  border-radius: 6px;
  transition: width .4s cubic-bezier(.4, 0, .2, 1);
  min-width: 0;
}
.pd-bar-num {
  font-size: 12px;
  font-weight: 500;
  color: #9aa0a6;
  width: 22px;
  text-align: right;
  flex-shrink: 0;
}

/* ============ 评分注入 UI（依附 B2PRO 评论表单）============ */
.pd-rate-inject {
  margin-bottom: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fffdf7 0%, #fff9ed 100%);
  border: 1px solid #ffe8b8;
  border-radius: 14px;
}
.pd-rate-done {
  margin-bottom: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0faf4 0%, #e6f7ec 100%);
  border: 1px solid #b7dfc5;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pd-rate-done-label { font-size: 13px; color: #388e3c; font-weight: 600; }
.pd-rate-done-stars { font-size: 22px; color: #FFB300; letter-spacing: 2px; line-height: 1; }
.pd-rate-done-stars .b2font { font-family: "b2font"; font-style: normal; font-size: 22px; }
.pd-rate-disabled {
  margin-bottom: 14px;
  padding: 12px 16px;
  background: #f7f8f9;
  border: 1px solid #e4e6e9;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pd-rate-disabled-label { font-size: 13px; color: #909399; font-weight: 500; }
.pd-rate-disabled-stars {
  font-size: 22px;
  color: #d0d3d9;
  letter-spacing: 2px;
  line-height: 1;
  user-select: none;
}
.pd-rate-disabled-stars .b2font { font-family: "b2font"; font-style: normal; font-size: 22px; }
.pd-rate-disabled-hint { font-size: 12px; color: #a8abb2; }
/* 游客未登录时的评分登录入口 */
.pd-rate-login {
  margin-bottom: 14px;
  padding: 12px 16px;
  background: #f0f7ff;
  border: 1px solid #b3d8ff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pd-rate-login-hint { font-size: 13px; color: #409eff; font-weight: 500; }
.pd-rate-login-btn {
  font-size: 13px;
  padding: 5px 16px;
  background: #409eff;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background .15s;
}
.pd-rate-login-btn:hover { background: #337ecc; }
.pd-rate-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-rate-label { font-size: 13px; color: #666; margin-right: 2px; }
.pd-star-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: #e0e0e0;
  cursor: pointer;
  transition: color .15s;
  user-select: none;
}
.pd-star-pick .pd-star-pick-ico {
  font-family: "b2font";
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  display: inline-block;
  transition: color .15s, transform .15s;
}
.pd-star-pick:hover,
.pd-star-pick:hover .pd-star-pick-ico { color: #FFB300; }
.pd-star-pick.is-on,
.pd-star-pick.is-on .pd-star-pick-ico { color: #FFB300; }
/* 统一空星/实星视觉大小：iconfont 中空星字形略小，做轻微放大补偿 */
.pd-star-pick-ico.b2-star-line,
.pd-rate-disabled-stars .b2-star-line,
.pd-rate-done-stars .b2-star-line,
.pd-comment-stars .b2-star-line { display: inline-block; transform: scale(1.15); }
.pd-rate-hint { font-size: 12px; color: #a8abb2; margin-left: 4px; }
.pd-rate-problem { margin-top: 10px; }
.pd-rate-problem-tip { font-size: 13px; color: #d97706; font-weight: 500; margin-bottom: 8px; }
.pd-rate-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-rate-tag {
  font-size: 12px;
  padding: 5px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all .15s;
  font-weight: 500;
}
.pd-rate-tag:hover { border-color: #ccc; background: #fafafa; }
.pd-rate-tag.is-on {
  background: linear-gradient(135deg, #fff4e5 0%, #ffecd2 100%);
  border-color: #f5b971;
  color: #b45309;
}

/* ============ 评论内评分（B2PRO 列表项，b2_comment_text 钩子输出）============ */
.pd-comment-rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 0;
}
.pd-comment-stars { letter-spacing: 1px; font-size: 14px; line-height: 1; }
.pd-comment-stars .pd-star {
  font-family: "b2font";
  font-style: normal;
  color: #e0e0e0;
  font-size: 14px;
}
.pd-comment-stars .pd-star.on { color: #FFB300; }
.pd-comment-problems { display: flex; flex-wrap: wrap; gap: 5px; }

/* 引导提示 */
.pd-rating-guide {
  padding: 12px 14px;
  background: #f0faf4;
  border: 1px solid #c8e6d9;
  border-radius: 8px;
  font-size: 13px;
  color: #777;
  line-height: 1.5;
}
.pd-rating-guide strong { color: #2f9e44; }

/* 最近评分预览 */
.pd-recent-ratings { margin-top: 20px; }
.pd-recent-label { font-size: 13px; font-weight: 600; color: #aaa; margin: 0 0 12px; }
.pd-recent-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: #fafbfc;
  border-radius: 8px;
}
.pd-recent-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.pd-recent-body { flex: 1; min-width: 0; }
.pd-recent-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pd-recent-name { font-size: 13px; font-weight: 600; color: #2b2620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-recent-stars { font-size: 15px; letter-spacing: 1px; color: #f5a623; flex-shrink: 0; }
.pd-recent-text { font-size: 13px; color: #555; margin: 4px 0; line-height: 1.5; word-break: break-word; }
.pd-recent-date { font-size: 11px; color: #bbb; }

/* ----- SECTION C: 评分弹窗（深色风格，参考 3D 打印机截图） ----- */
.pd-rating-modal-mask {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .6);
  z-index: 10000;
  padding: 20px;
}
.pd-rating-modal-mask.show { display: flex; }
.pd-rating-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: #2a2a2a;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
  animation: pd-rate-modal-in .2s ease;
}
@keyframes pd-rate-modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 弹窗头部 */
.pd-rating-modal-head {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #3a3a3a;
}
.pd-rating-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #e8e8e8;
}
.pd-rating-modal-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: #666;
}
.pd-rating-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: #3a3a3a;
  color: #999;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-rating-modal-close:hover { background: #4a4a4a; color: #e8e8e8; }

/* 弹窗内容区 */
.pd-rating-modal-body { padding: 24px; }
.pd-rate-field { margin-bottom: 20px; }
.pd-rate-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #e03131; /* 必填红色 */
  margin-right: 4px;
}
.pd-rate-label-text {
  font-size: 13px;
  font-weight: 600;
  color: #e8e8e8;
}

/* 星级选择器 */
.pd-star-picker {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.pd-star-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 32px;
  line-height: 1;
  color: #555;
  cursor: pointer;
  transition: color .12s ease, transform .12s ease;
  user-select: none;
}
.pd-star-btn:hover { transform: scale(1.15); }
.pd-star-btn.is-on { color: #FFC107; }
.pd-star-btn:focus-visible { outline: 2px solid #FFC107; outline-offset: 2px; border-radius: 3px; }
.pd-rate-pick-hint { font-size: 13px; color: #666; margin-top: 6px; }

/* 描述文本域 */
#pd-rate-desc-label.idle { color: #e8e8e8; }
#pd-rate-desc-label.problem { color: #e03131; }
.pd-rate-textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #e8e8e8;
  background: #222;
  outline: none;
  box-sizing: border-box;
}
.pd-rate-textarea:focus { border-color: #555; }
.pd-rate-char-count { text-align: right; font-size: 12px; color: #4CAF50; margin-top: 4px; }

/* 问题标签区（≤3 星显示） */
.pd-rate-problem-hint {
  font-size: 12px;
  color: #666;
  margin: 0 0 10px;
}
.pd-problem-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pd-problem-tag {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #444;
  background: transparent;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.pd-problem-tag:hover { border-color: #666; color: #ccc; }
.pd-problem-tag.selected {
  border-color: #4CAF50;
  color: #4CAF50;
  background: rgba(76, 175, 80, .08);
}

/* 图片上传 */
.pd-rate-photo-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #999;
  cursor: pointer;
}
.pd-rate-photo-icon {
  font-size: 16px;
  border: 1px dashed #555;
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.pd-rate-photo-preview img {
  max-width: 120px;
  max-height: 80px;
  border-radius: 6px;
  margin-top: 8px;
}

/* 弹窗底部 */
.pd-rating-modal-foot {
  padding: 16px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #3a3a3a;
}
.pd-rating-cancel {
  padding: 8px 24px;
  border-radius: 6px;
  border: 1px solid #444;
  background: transparent;
  color: #999;
  font-size: 14px;
  cursor: pointer;
}
.pd-rating-cancel:hover { background: #333; color: #ccc; }
.pd-rating-submit {
  padding: 8px 28px;
  border-radius: 6px;
  border: none;
  background: #4CAF50;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.pd-rating-submit:hover:not(:disabled) { background: #43a047; }
.pd-rating-submit:disabled { opacity: .5; cursor: not-allowed; }

/* 响应式：弹窗在小屏幕上全宽 */
@media (max-width: 600px) {
  .pd-rating-modal { max-width: calc(100vw - 40px); }
  .pd-rating-modal-body { padding: 18px 16px; }
  .pd-star-picker { gap: 6px; }
  .pd-star-btn { font-size: 28px; }
}

/* 评价区（融合式：星级 + 文字，统一信息流） */
.pd-reviews { margin-top: 24px; }
.pd-reviews-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pd-reviews-title { font-size: 18px; font-weight: 700; color: #2b2b2b; margin: 0; }
.pd-reviews-title .pd-ratings-count { font-size: 14px; font-weight: 400; color: #aaaaaa; margin-left: 6px; }
.pd-reviews-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.pd-review-item { display: flex; gap: 12px; padding: 16px; border: 1px solid #eeeeee; border-radius: 14px; background: #fff; }
.pd-review-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: #f0f0f0; }
.pd-review-body { flex: 1; min-width: 0; }
.pd-review-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pd-review-name { font-size: 14px; font-weight: 600; color: #2b2b2b; }
.pd-review-stars { font-size: 14px; letter-spacing: 1px; color: #FFB300; }
.pd-review-date { font-size: 12px; color: #aaaaaa; }
.pd-review-text { font-size: 14px; line-height: 1.7; color: #555555; margin: 8px 0 0; }
.pd-review-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pd-review-tag { font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 20px; background: #fff4e5; color: #d97706; }
.pd-reviews-more { align-self: center; margin: 4px auto 0; height: 38px; padding: 0 22px; border: 1px solid #eeeeee; border-radius: 10px; background: #fff; color: #555555; font-size: 14px; font-weight: 600; cursor: pointer; }
.pd-reviews-more:hover { border-color: #cfe0ff; color: var(--b2color); }
.pd-reviews-loading, .pd-reviews-empty { text-align: center; color: #aaaaaa; padding: 36px 0; font-size: 14px; }

/* ============ 普通评论区（无门禁，原生 WP 评论）============ */
.pd-comments { margin-top: 24px; }
.pd-comments .pd-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pd-comments .pd-section-title { font-size: 18px; font-weight: 700; color: #2b2b2b; margin: 0; }
.pd-comments .pd-section-count { font-size: 14px; font-weight: 400; color: #aaaaaa; margin-left: 6px; }
.pd-comment-form { margin-bottom: 18px; }
.pd-comment-form .comment-form { margin: 0; }
#pd-comment-textarea { width: 100%; box-sizing: border-box; min-height: 84px; padding: 12px 14px; border: 1px solid #eeeeee; border-radius: 12px; background: #fafafa; font-size: 14px; line-height: 1.6; color: #333; resize: vertical; }
#pd-comment-textarea:focus { outline: none; border-color: var(--b2color); background: #fff; }
.pd-comment-submit { margin-top: 10px; height: 38px; padding: 0 22px; border: none; border-radius: 10px; background: var(--b2color); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.pd-comment-submit:hover { opacity: .92; }
.pd-comment-login { font-size: 14px; color: #888; padding: 14px 0 18px; }
.pd-comment-login-link { color: var(--b2color); font-weight: 600; text-decoration: none; }
.pd-comment-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.pd-comment-item { display: flex; gap: 12px; padding: 16px; border: 1px solid #eeeeee; border-radius: 14px; background: #fff; }
.pd-comment-avatar { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; }
.pd-comment-body { flex: 1 1 auto; min-width: 0; }
.pd-comment-top { display: flex; align-items: baseline; gap: 10px; }
.pd-comment-name { font-size: 14px; font-weight: 600; color: #2b2b2b; }
.pd-comment-date { font-size: 12px; color: #aaaaaa; }
.pd-comment-text { font-size: 14px; line-height: 1.7; color: #555555; margin: 8px 0 0; word-break: break-word; }
.pd-comments-empty { text-align: center; color: #aaaaaa; padding: 20px 0; font-size: 14px; }

/* ============ 评分注入 UI（依附 B2PRO 评论表单）============ */
.pd-rate-inject {
  margin-bottom: 12px;
  padding: 12px 14px;
  background: #fafafa;
  border: 1px solid #eeeeee;
  border-radius: 12px;
}
.pd-rate-done {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #f1f8f1;
  border: 1px solid #d8ecd8;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-rate-done-label { font-size: 13px; color: #5a9e5a; font-weight: 600; }
.pd-rate-done-stars { font-size: 22px; color: #FFB300; letter-spacing: 1px; }
.pd-rate-done-stars .b2font { font-family: "b2font"; font-style: normal; font-size: 22px; }
.pd-rate-disabled {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #f7f7f7;
  border: 1px solid #ececec;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: .75;
}
.pd-rate-disabled-label { font-size: 13px; color: #999; }
.pd-rate-disabled-stars { font-size: 22px; color: #d4d4d4; letter-spacing: 1px; cursor: not-allowed; }
.pd-rate-disabled-stars .b2font { font-family: "b2font"; font-style: normal; font-size: 22px; }
.pd-rate-disabled-hint { font-size: 12px; color: #aaa; }
.pd-rate-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-rate-label { font-size: 13px; color: #777; margin-right: 2px; }
.pd-rate-hint { font-size: 12px; color: #aaaaaa; margin-left: 4px; }
.pd-rate-problem { margin-top: 10px; }
.pd-rate-problem-tip { font-size: 13px; color: #d97706; margin-bottom: 8px; }
.pd-rate-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-rate-tag {
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid #eeeeee;
  border-radius: 20px;
  background: #fff;
  color: #777;
  cursor: pointer;
  transition: all .12s;
}
.pd-rate-tag.is-on {
  background: #fff4e5;
  border-color: #f0c98a;
  color: #d97706;
}

/* ============ 评论内评分（B2PRO 列表项，b2_comment_text 钩子输出）============ */
.pd-comment-rating { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 2px; }
.pd-comment-stars { letter-spacing: 1px; font-size: 14px; }
.pd-comment-stars .pd-star { color: #d8d8d8; }
.pd-comment-stars .pd-star.on { color: #FFB300; }
.pd-comment-problems { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-comment-problem-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #fff4e5;
  color: #d97706;
  border: 1px solid #f0c98a;
}

/* ===========================================================
   用户中心「图纸」公开图墙（User/patterns.php）
   =========================================================== */
.pd-gallery-page { max-width: 1200px; margin: 0 auto; padding: 20px 4px 40px; }
.pd-gallery-actions { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.pd-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; font-size: 14px;
  background: #f2f3f5; color: #333; text-decoration: none; cursor: pointer;
  border: 1px solid #e3e5e8; transition: .15s;
}
.pd-btn:hover { background: #e9eb0; }
.pd-btn-primary { background: #ffb300; color: #3a2c00; border-color: #ffb300; }
.pd-btn-primary:hover { background: #ffa000; }
.pd-filters { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.pd-search, .pd-brand, .pd-sort {
  height: 38px; border: 1px solid #e3e5e8; border-radius: 8px; padding: 0 12px;
  font-size: 14px; background: #fff; color: #333; outline: none;
}
.pd-search { flex: 1; min-width: 200px; }
.pd-btn-go { background: #ffb300; color: #3a2c00; border: none; font-weight: 600; }

.pd-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
/* 关键修复：把归档「图墙卡片」样式收敛到 .pd-waterfall 作用域。
   原本这里是无作用域的全局 .pd-card{}，会覆盖文件上方（line 854）详情页卡片的
   基础 .pd-card{border-radius:var(--b2radius)}，导致详情页 pd-card-info/spec/actions
   拿到 12px 圆角、1px solid #eee 边框、overflow:hidden、box-shadow，与 pd-colors /
   pd-preview（沿用 var(--b2radius)）圆角不一致。详情页卡片位于 .pd-hero>.pd-info，
   不在 .pd-waterfall 内，因此加作用域后互不干扰；归档卡片（pattern-archive.php /
   User/patterns.php 均包在 .pd-waterfall）样式保持不变。 */
.pd-waterfall .pd-card {
  position: relative; /* 关键：让 .pd-card__overlay（绝对定位 bottom:0）以卡片自身为参照，
    否则首页/用户中心等「未包在 .pattern-archive 内」的图墙会丢失定位上下文，
    导致标题+角标仅在 :hover 触发 transform 时才吸附到卡片底部。 */
  display: flex; flex-direction: column; background: #fff; border-radius: 12px;
  overflow: hidden; text-decoration: none; color: inherit; border: 1px solid #eee;
  transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.pd-waterfall .pd-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.pd-card.pd-card-info:hover,
.pd-card.pd-card-spec:hover,
.pd-card.pd-card-actions:hover { transform: none; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.pd-card-thumb { position: relative; aspect-ratio: 1 / 1; background: #f5f6f8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pd-card-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pd-card-ph { color: #b0b3b8; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pd-card-price {
  position: absolute; top: 8px; right: 8px; font-size: 11px; padding: 2px 8px;
  border-radius: 20px; background: #ffe7a8; color: #8a5a00; font-weight: 600;
}
.pd-card-price.money, .pd-card-price.credit, .pd-card-price.roles, .pd-card-price.login { background: #ffe0e0; color: #c0392b; }
.pd-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.pd-card-title { font-size: 14px; font-weight: 600; margin: 0; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pd-card-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.pd-chip { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: #f2f3f5; color: #666; }
.pd-card-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #888; margin-top: 2px; }
.pd-rating { display: inline-flex; align-items: center; gap: 6px; }
.pd-stars { color: #ffb300; letter-spacing: 1px; }
.pd-rating-num { color: #666; }
.pd-rating-none { color: #bbb; }
.pd-dl { color: #999; }

/* ===========================================================
   用户中心「图纸评分」列表（User/pattern_ratings.php）
   =========================================================== */
.pd-ratings-page { max-width: 880px; margin: 0 auto; padding: 20px 4px 40px; }
.pd-ratings-title { font-size: 18px; margin: 0 0 14px; display: flex; align-items: baseline; gap: 10px; }
.pd-ratings-count { font-size: 13px; color: #999; font-weight: 400; }
.pd-ratings-tabs { display: flex; gap: 0; margin: 0 0 18px; border-bottom: 2px solid #e8eaed; }
.pd-ratings-tab {
    position: relative; display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px; color: #666; font-size: 14px; font-weight: 500;
    text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}
.pd-ratings-tab:hover { color: #333; }
.pd-ratings-tab.active { color: #0066ff; border-bottom-color: #0066ff; }
.pd-ratings-tab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px;
    background: #e8eaed; color: #888; font-size: 11px; font-weight: 600;
}
.pd-ratings-tab.active .pd-ratings-tab-count { background: rgba(0,102,255,0.12); color: #0066ff; }
.pd-rating-pattern-author { display: inline-block; font-size: 12px; color: #888; margin-right: 10px; }
.pd-ratings-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pd-rating-item { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); display: flex; gap: 12px; align-items: flex-start; }
.pd-rating-avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; line-height: 0; }
.pd-rating-avatar img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.pd-rating-body { flex: 1 1 auto; min-width: 0; }
.pd-rating-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.pd-rating-stars { color: #ffb300; letter-spacing: 1px; font-size: 15px; }
.pd-rating-score { font-weight: 700; color: #ff9500; }
.pd-rating-reviewer { font-weight: 600; color: #333; }
.pd-rating-date { color: #aaa; }
.pd-rating-problems { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pd-rating-problem { font-size: 12px; padding: 2px 10px; border-radius: 20px; background: #fff4e5; color: #d97706; border: 1px solid #f0c98a; }
.pd-rating-pattern { display: inline-block; margin: 8px 0 4px; color: #2c7be5; text-decoration: none; font-size: 14px; font-weight: 500; }
.pd-rating-pattern:hover { text-decoration: underline; }
.pd-rating-content { margin: 4px 0 0; color: #444; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }

.pd-empty { text-align: center; color: #999; padding: 40px 0; }
.pd-pager { margin-top: 22px; text-align: center; }
.pd-pager a, .pd-pager span { display: inline-block; min-width: 32px; padding: 6px 10px; margin: 0 3px; border-radius: 8px; border: 1px solid #e3e5e8; color: #555; text-decoration: none; }
.pd-pager .current { background: #ffb300; border-color: #ffb300; color: #3a2c00; font-weight: 700; }

/* ===========================================================
   模态搜索框：类型标签行（搜索框上方一字排开）
   侧边栏点击搜索图标唤出的 search-box 中，form 上方显示所有类型标签
   =========================================================== */
.search-type-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}
.search-type-tags .tag {
  display: inline-block;
  padding: 5px 16px;
  font-size: 13px;
  cursor: pointer;
  color: #888;
  background: #f3f4f6;
  transition: all .18s;
  user-select: none;
  line-height: 1.5;
}
.search-type-tags .tag:hover {
  color: #555;
  background: #e4e6ea;
}
.search-type-tags .tag.picked {
  color: #fff;
  background: #ffb300;
  font-weight: 600;
}

/* 暗色模式 */
.theme-dark .search-type-tags .tag {
  color: #aaa;
  background: #2a2d33;
}
.theme-dark .search-type-tags .tag:hover {
  color: #ddd;
  background: #3a3d44;
}
.theme-dark .search-type-tags .tag.picked {
  color: #1a1a1a;
  background: #ffb300;
}

/* ====== 暗色模式：评分组件 ====== */
.theme-dark .pd-rating-overview {
  background: linear-gradient(135deg, #1e2025 0%, #23262b 100%);
  border-color: #2d3038;
}
.theme-dark .pd-rating-big-score { border-right-color: #2d3038; }
.theme-dark .pd-rating-number { color: #FFB300; }
.theme-dark .pd-rating-starline { color: #FFB300; }
.theme-dark .pd-rating-starline .pd-star { color: #3a3d44; }
.theme-dark .pd-rating-starline .pd-star.on { color: #FFB300; }
.theme-dark .pd-bar-track { background: #2a2d35; }
.theme-dark .pd-bar-fill { background: linear-gradient(90deg, #FFB300, #FF8F00); }
.theme-dark .pd-bar-label { color: #6b7080; }
.theme-dark .pd-bar-num { color: #6b7080; }
.theme-dark .pd-rating-label { color: #6b7080; }
.theme-dark .pd-rate-inject {
  background: linear-gradient(135deg, #2a281f 0%, #252215 100%);
  border-color: #3d3824;
}
.theme-dark .pd-rate-done {
  background: linear-gradient(135deg, #1a2820 0%, #15261c 100%);
  border-color: #1e4230;
}
.theme-dark .pd-rate-done-label { color: #66bb6a; }
.theme-dark .pd-rate-disabled {
  background: #1e2025;
  border-color: #2d3038;
}
.theme-dark .pd-rate-disabled-label { color: #6b7080; }
.theme-dark .pd-rate-disabled-stars { color: #3a3d44; }
.theme-dark .pd-rate-disabled-hint { color: #555a65; }
.theme-dark .pd-rate-login {
  background: #1a2740;
  border-color: #253d5e;
}
.theme-dark .pd-rate-login-hint { color: #5da8ff; }
.theme-dark .pd-rate-login-btn { background: #5da8ff; color: #fff; }
.theme-dark .pd-rate-login-btn:hover { background: #4090e0; }
.theme-dark .pd-rate-label { color: #909399; }
.theme-dark .pd-star-pick,
.theme-dark .pd-star-pick .pd-star-pick-ico { color: #3a3d44; }
.theme-dark .pd-star-pick:hover,
.theme-dark .pd-star-pick:hover .pd-star-pick-ico { color: #FFB300; }
.theme-dark .pd-star-pick.is-on,
.theme-dark .pd-star-pick.is-on .pd-star-pick-ico { color: #FFB300; }
/* 暗色：评分列表页 */
.theme-dark .pd-ratings-tabs { border-bottom-color: #2d3038; }
.theme-dark .pd-ratings-tab { color: #909399; }
.theme-dark .pd-ratings-tab:hover { color: #d0d3d8; }
.theme-dark .pd-ratings-tab.active { color: #5da8ff; border-bottom-color: #5da8ff; }
.theme-dark .pd-ratings-tab-count { background: #2a2d35; color: #6b7080; }
.theme-dark .pd-ratings-tab.active .pd-ratings-tab-count { background: rgba(93,168,255,0.15); color: #5da8ff; }
.theme-dark .pd-rating-item { background: #1e2025; border-color: #2d3038; box-shadow: none; }
.theme-dark .pd-rating-reviewer { color: #d0d3d8; }
.theme-dark .pd-rating-date { color: #6b7080; }
.theme-dark .pd-rating-pattern { color: #5da8ff; }
.theme-dark .pd-rating-pattern-author { color: #6b7080; }
.theme-dark .pd-rating-content { color: #b0b5be; }
.theme-dark .pd-rating-problem { background: #2a281f; color: #e2b34d; border-color: #4d3d18; }
.theme-dark .pd-empty { color: #6b7080; }
.theme-dark .pd-rate-tag {
  background: #1e2025;
  border-color: #3a3d44;
  color: #909399;
}
.theme-dark .pd-rate-tag:hover { background: #25272d; border-color: #555; }
.theme-dark .pd-rate-tag.is-on {
  background: linear-gradient(135deg, #3d3420 0%, #332a18 100%);
  border-color: #5c4310;
  color: #e6a817;
}
.theme-dark .pd-comment-stars .pd-star { color: #3a3d44; }
.theme-dark .pd-comment-stars .pd-star.on { color: #FFB300; }
.theme-dark .pd-rate-hint { color: #6b7080; }
.theme-dark .pd-rate-problem-tip { color: #e6a817; }

/* ===========================================================
   编辑器页（pattern-editor-page）：确保侧边栏可点击
   aside-container z-index 较低时可能被 iframe 容器覆盖
   =========================================================== */
body.pattern-editor-page .aside-container {
  z-index: 100 !important;
}

/* ===========================================================
   沉溺拼豆中（专注模式完成记录）
   =========================================================== */

/* ——— 容器：纯结构包裹（B2PRO #comments.box.b2-radius 自带视觉盒，不重复覆盖） ——— */
.pd-community {
  position: relative;
  margin-top: 28px;
  padding: 0;
}

/* ——— Tab 栏（使用 B2PRO 主题色 token：--b2color / .b2-color / .b2-light） ——— */
.pd-community-tabs {
  border-bottom: 1px solid #eef0f3;
  background: #fff;
}
.pd-community-tabs ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pd-community-tabs li {
  position: relative;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: color .2s;
}
.pd-community-tabs li:hover {
  color: #374151;
}
.pd-community-tabs li.picked {
  font-weight: 600;
}
.pd-community-tabs li.picked::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--b2color);
  border-radius: 2px 2px 0 0;
}
.pd-community-tabs li b {
  font-size: 12px;
  font-weight: 600;
  border-radius: 10px;
  padding: 2px 8px;
  min-width: 20px;
  text-align: center;
  line-height: 1.4;
}

/* 面板隐藏（不用 display:none，保 Vue 挂载） */
.pd-tab-hidden {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 100%;
  left: 0;
}
.b2-tab-content[hidden] {
  display: none !important;
}
.pd-reviews-panel {
  padding: 16px;
}

/* ============ 社区（打分赏 + 拼豆打卡 + 评分评论）============ */
/* 拼豆打卡徽标（注入到原生评论 .comment-content-text 顶部） */
.pd-bead-badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.pd-bead-flag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #ff9a3c, #ff6a3d);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .5px;
}
.pd-bead-stats {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #6b7280;
}
.pd-bead-stats span {
  display: inline-flex;
  align-items: center;
}
.theme-dark .pd-bead-stats { color: #9ca3af; }
.theme-dark .pd-bead-flag {
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}

/* 编辑信息模式 */
.pd-edit-meta-banner {
    background: #eef4ff; color: #0066ff; font-size: 13px; font-weight: 600;
    padding: 10px 14px; border-radius: 8px; margin-bottom: 12px;
    border: 1px solid #c5d9ff;
}
.publish-info-card.pd-readonly {
    opacity: .65; pointer-events: none; user-select: none;
    position: relative;
}
.publish-info-card.pd-readonly::after {
    content: '🔒 图纸数据已锁定';
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.7); font-size: 14px; font-weight: 600; color: #666;
    border-radius: inherit; z-index: 1;
}
.pd-edit-meta-btn {
    display: inline-flex !important; align-items: center; gap: 6px;
}
.pd-edit-meta-btn:hover { background: #eef4ff; }

/* ---------- 图纸短代码卡片 ---------- */
.qp-pattern-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    border-color: #ccc;
}
.qp-pattern-card:hover .qp-pattern-card-title {
    color: #1a6fff;
}

/* ============ Write 页面「插入图纸」按钮 & 弹窗 ============ */

/* —— 工具栏注入按钮 —— */
.qp-insert-pattern-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    padding: 4px 8px !important;
    margin: 2px !important;
    border: 1px solid transparent !important;
    border-radius: 3px !important;
    background: transparent !important;
    color: #595959 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    line-height: 1 !important;
    height: 28px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    transition: background .15s, border-color .15s, color .15s;
}
.qp-insert-pattern-btn:hover {
    background: #f0f0f0 !important;
    border-color: #d0d0d0 !important;
    color: #222 !important;
}
.qp-insert-pattern-btn svg {
    flex-shrink: 0;
}

/* —— 弹窗遮罩 —— */
.qp-pattern-picker-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, .45);
    align-items: center;
    justify-content: center;
}

/* —— 弹窗主体 —— */
.qp-pattern-picker {
    width: 680px;
    max-width: 94vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .18);
}

/* —— 头部 —— */
.qp-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.qp-picker-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #222;
}
.qp-picker-close {
    border: none;
    background: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.qp-picker-close:hover {
    color: #333;
}

/* —— 模式切换按钮组 —— */
.qp-picker-mode-switch {
    display: flex;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-left: auto;
    margin-right: 12px;
}
.qp-mode-btn {
    padding: 5px 12px;
    border: none;
    background: #fff;
    font-size: 12px;
    color: #888;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    border-right: 1px solid #e0e0e0;
}
.qp-mode-btn:last-child {
    border-right: none;
}
.qp-mode-btn:hover {
    background: #f5f5f5;
    color: #333;
}
.qp-mode-btn.active {
    background: var(--b2color, #4A90D9);
    color: #fff;
}

/* —— 贴链接模式 —— */
.qp-link-box {
    padding: 20px;
}
.qp-link-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: #888;
}
.qp-link-input-row {
    display: flex;
    gap: 8px;
}
.qp-link-url-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color .2s;
}
.qp-link-url-input:focus {
    border-color: var(--b2color, #4A90D9);
}
.qp-link-resolve-btn {
    padding: 8px 20px;
    border: 1px solid var(--b2color, #4A90D9);
    border-radius: 4px;
    background: var(--b2color, #4A90D9);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.qp-link-resolve-btn:hover {
    opacity: .85;
}
.qp-link-status {
    margin-top: 10px;
    font-size: 13px;
}
.qp-link-error {
    color: #e74c3c;
}
.qp-link-loading {
    color: #999;
}
.qp-link-result {
    margin-top: 12px;
}
.qp-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f0f9f0;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
}
.qp-link-card-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.qp-link-card-info {
    min-width: 0;
}
.qp-link-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qp-link-card-id {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* —— 搜索栏 —— */
.qp-picker-search {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5;
}
.qp-picker-search-input {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color .2s;
}
.qp-picker-search-input:focus {
    border-color: var(--b2color, #4A90D9);
}
.qp-picker-search-btn {
    padding: 6px 16px;
    border: 1px solid var(--b2color, #4A90D9);
    border-radius: 4px;
    background: var(--b2color, #4A90D9);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.qp-picker-search-btn:hover {
    opacity: .85;
}

/* —— Tab —— */
.qp-picker-tabs {
    display: flex;
    gap: 0;
    padding: 0 20px;
    border-bottom: 1px solid #f0f0f0;
}
.qp-picker-tab {
    padding: 10px 16px;
    border: none;
    background: none;
    font-size: 13px;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}
.qp-picker-tab.active {
    color: var(--b2color, #4A90D9);
    border-bottom-color: var(--b2color, #4A90D9);
    font-weight: 600;
}
.qp-picker-tab:hover {
    color: #333;
}

/* —— 图纸列表 —— */
.qp-picker-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    min-height: 200px;
    max-height: 360px;
}

/* —— 列表中的卡片 —— */
.qp-picker-card {
    border: 2px solid #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
}
.qp-picker-card:hover {
    border-color: #d0d0d0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.qp-picker-card.selected {
    border-color: var(--b2color, #4A90D9);
    box-shadow: 0 0 0 1px var(--b2color, #4A90D9);
}
.qp-picker-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fafafa;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qp-picker-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qp-picker-card-img-placeholder {
    font-size: 28px;
    color: #ccc;
}
.qp-picker-card-info {
    padding: 8px 10px;
}
.qp-picker-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}
.qp-picker-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
    font-size: 11px;
    color: #999;
}

/* —— Footer —— */
.qp-picker-footer {
    padding: 8px 20px;
    text-align: center;
}
.qp-picker-loadmore {
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #666;
    padding: 6px 20px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}
.qp-picker-loadmore:hover {
    border-color: var(--b2color, #4A90D9);
    color: var(--b2color, #4A90D9);
}

/* —— 底部操作栏 —— */
.qp-picker-actions {
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}
.qp-picker-insert {
    padding: 8px 24px;
    border: none;
    border-radius: 4px;
    background: var(--b2color, #4A90D9);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.qp-picker-insert:hover:not(:disabled) {
    opacity: .85;
}
.qp-picker-insert:disabled {
    background: #d9d9d9;
    color: #aaa;
    cursor: not-allowed;
}

/* —— 空态 / 加载态 —— */
.qp-picker-empty,
.qp-picker-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: #999;
    font-size: 14px;
}

/* ============ 社区（打分赏 + 拼豆打卡 + 评分评论）============ */

/* ============ 图纸卡片标题下方收藏数（由 child.js 注入到 post-list-meta）============ */
.post-list-meta-favs span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* ============ 首页 Posts 模块：图纸卡片完整显示预览图 ============ */
/* 父主题 Posts 模块默认缩略图容器比例为 1/0.618（约 62% 高），图纸为方形会裁剪。 */
/* 通过 :has(.pd-fav-marker) 只针对 qupindou_pattern 卡片：容器改为正方形，图片 contain 完整显示。 */
.item-in:has(.pd-fav-marker) .post-module-thumb {
    padding-top: 100% !important;
}
.item-in:has(.pd-fav-marker) .post-thumb {
    object-fit: contain;
}