/* 交付中心 › 发布（publish.js）：步骤式发布、平台卡片、发布记录、平台账号、发布助手 */
#pbRoot {
  --pb-r: 14px;
  --pb-r-sm: 10px;
  --pb-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px -12px rgba(0, 0, 0, .45);
  --pb-shadow-hover: 0 2px 4px rgba(0, 0, 0, .25), 0 14px 32px -14px rgba(0, 0, 0, .6);
  --pb-ring: 0 0 0 1.5px var(--accent-2), 0 0 0 5px var(--accent-soft);
  --pb-grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 55%, #7a5cf0 100%);
  --pb-ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="light"] #pbRoot {
  --pb-shadow: 0 1px 2px rgba(20, 24, 40, .04), 0 6px 20px -10px rgba(20, 24, 40, .12);
  --pb-shadow-hover: 0 2px 6px rgba(20, 24, 40, .06), 0 14px 30px -12px rgba(40, 50, 120, .22);
}

/* ---------- 顶部：分段切换 + 统计 ---------- */
.pb-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.pb-seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line); }
.pb-seg > button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--muted);
  padding: 7px 14px; border-radius: 9px; cursor: pointer; font: inherit; font-weight: 550; transition: color .15s, background .15s, box-shadow .15s; }
.pb-seg > button svg { width: 16px; height: 16px; }
.pb-seg > button:hover { color: var(--ink); }
.pb-seg > button.on { background: var(--bg-2); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 2px 8px -2px rgba(0, 0, 0, .12); }
.pb-seg > button.on svg { color: var(--accent); }
.pb-seg > button b { font-weight: 650; font-size: 11px; color: var(--muted); background: var(--bg-4); border-radius: 99px; padding: 0 6px; line-height: 17px; }
.pb-seg > button b.pb-dot { background: var(--warn); color: #1b1300; }
.pb-stats { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.pb-stat { --c: var(--muted); display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); cursor: pointer; transition: border-color .15s, transform .15s; }
.pb-stat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pb-stat b { font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pb-stat:hover { border-color: var(--line-2); transform: translateY(-1px); }
.pb-stat.warn { --c: var(--warn); } .pb-stat.ok { --c: var(--keep); } .pb-stat.bad { --c: var(--cut); } .pb-stat.run { --c: var(--accent); }
.pb-stat.zero { opacity: .6; } .pb-stat.zero::before { background: var(--dim); }

/* ---------- 新建发布：左侧步骤 + 右侧清单 ---------- */
.pb-compose { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 20px; align-items: start; }
.pb-main { display: flex; flex-direction: column; gap: 18px; position: relative; }
.pb-main > .card { margin: 0; }
.pb-step { position: relative; border-radius: 18px; padding: 22px 24px; box-shadow: var(--pb-shadow); transition: opacity .2s, filter .2s; }
.pb-step + .pb-step::before { content: ""; position: absolute; left: 37px; top: -19px; width: 2px; height: 18px; background: var(--line-2); }
.pb-step.done + .pb-step::before { background: linear-gradient(var(--accent-2), var(--line-2)); }
.pb-step.off { opacity: .5; filter: saturate(.6); pointer-events: none; }
.pb-sh { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.pb-ht { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pb-ht h2 { margin: 0 !important; font-size: 16px !important; font-weight: 700 !important; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; }
.pb-ht .dim { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 460px; }
.pb-cnt-b { font-size: 11.5px; font-weight: 700; color: #fff; background: var(--accent-2); border-radius: 99px; padding: 0 7px; line-height: 19px; }
.pb-sh .n { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--bg-3); color: var(--muted); border: 1.5px solid var(--line-2);
  display: grid; place-items: center; font-size: 13px; font-weight: 750; flex: none; transition: all .25s var(--pb-ease); }
.pb-step:not(.off) .pb-sh .n { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pb-sh .n.done { background: var(--pb-grad) !important; border-color: transparent; box-shadow: 0 4px 12px -4px var(--accent-2); }
.pb-sh .n.done::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: translateY(-1px) rotate(45deg); }

.pb-search { margin-left: auto; display: flex; align-items: center; gap: 8px; width: 260px; max-width: 100%; padding: 0 12px; height: 38px; border-radius: 10px;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--dim); transition: border-color .15s, box-shadow .15s; }
.pb-search svg { width: 15px; height: 15px; flex: none; }
.pb-search input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; height: 100%; font: inherit; color: var(--ink); outline: 0; }
.pb-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--accent); }

.pb-presets { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pb-pl { font-size: 12px; color: var(--dim); margin-right: 2px; }
.pb-chip { border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer;
  transition: all .15s; }
.pb-chip:hover { color: var(--ink); border-color: var(--accent); }
.pb-chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.pb-chip.ghost { border-color: transparent; background: transparent; }
.pb-chip.ghost:hover { color: var(--cut); }
.pb-empty { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 22px; text-align: center; color: var(--dim); font-size: 13px; }

/* 视频卡 */
.pb-vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; }
.pb-vid { position: relative; text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--pb-r); overflow: hidden; color: var(--ink);
  cursor: pointer; padding: 0; font: inherit; display: block; transition: border-color .18s, transform .18s var(--pb-ease), box-shadow .18s; }
.pb-vid:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--pb-shadow-hover); }
.pb-vid.on { border-color: transparent; box-shadow: var(--pb-ring), var(--pb-shadow-hover); }
.pb-vid .pic { aspect-ratio: 16/10; background: #0b0c10 center/cover no-repeat; display: grid; place-items: center; color: var(--dim); position: relative; overflow: hidden; isolation: isolate; }
/* 封面：底层模糊铺满 + 上层完整显示（竖版封面不再被裁掉） */
.pb-vid .pic.has::before, .pb-prev .pic.has::before { content: ""; position: absolute; inset: -24px; z-index: -1; background: var(--cv) center/cover no-repeat; filter: blur(18px) brightness(.55) saturate(1.2); }
.pb-vid .pic::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(to top, rgba(0, 0, 0, .45), transparent 40%); pointer-events: none; }
.pb-vid .pic.has::after { background: linear-gradient(to top, rgba(0, 0, 0, .45), transparent 40%), var(--cv) center/contain no-repeat; }
.pb-prev .pic.has::after { content: ""; position: absolute; inset: 0; background: var(--cv) center/contain no-repeat; }
.pb-vid .pic svg { width: 26px; height: 26px; }
.pb-vid .pic.pb-vpic, .pb-prev .pic.pb-vpic { display: grid; background: var(--bg-3); }
.pb-vpic .pb-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0b0c10; visibility: hidden; pointer-events: none; }
.pb-vpic .pb-still.ready { visibility: visible; }
.pb-vid .dur, .pb-vid .ar { position: absolute; right: 8px; bottom: 8px; z-index: 1; background: rgba(10, 12, 18, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: #fff; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
.pb-vid .meta { padding: 10px 12px 11px; }
.pb-vid .t { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.pb-vid .m { display: flex; gap: 5px; align-items: center; color: var(--muted); font-size: 11.5px; margin-top: 6px; flex-wrap: wrap; }
.pb-vid .t .tt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pb-src { flex: none; font-size: 10.5px; font-weight: 650; color: #a35cff; background: rgba(163, 92, 255, .12); border-radius: 5px; padding: 0 6px; line-height: 18px; }
.pb-up { border-style: dashed; border-width: 1.5px; background: transparent; }
.pb-up .pic { background: var(--bg-3); display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--muted); }
.pb-up .pic::after { display: none; }
.pb-upi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); color: var(--accent); transition: transform .2s var(--pb-ease); }
.pb-upi svg { width: 20px !important; height: 20px !important; }
.pb-up:hover { border-color: var(--accent); }
.pb-up:hover .pic { color: var(--ink); }
.pb-up:hover .pb-upi { transform: translateY(-2px); }
.pb-prog { width: 70%; height: 5px; background: var(--bg-4); border-radius: 99px; overflow: hidden; }
.pb-prog i { display: block; height: 100%; background: var(--pb-grad); transition: width .2s; }
.pb-check { position: absolute; top: 8px; right: 8px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: var(--pb-grad); box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(0, 0, 0, .3);
  animation: pbPop .25s var(--pb-ease); }
.pb-check::after { content: ""; position: absolute; left: 8px; top: 4.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes pbPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pb-ar { flex: none; font-size: 10.5px; font-weight: 650; padding: 0 6px; border-radius: 5px; background: var(--bg-4); color: var(--muted); line-height: 18px; font-variant-numeric: tabular-nums; }
.pb-ar.mis { background: var(--warn-soft); color: var(--warn); }

/* 平台卡 */
.pb-group + .pb-group { margin-top: 20px; }
.pb-gl { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--dim); font-weight: 650; letter-spacing: .5px; margin-bottom: 10px; }
.pb-gl > i { flex: 1; height: 1px; background: var(--line); }
.pb-pfs { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 10px; }
.pb-pf { --pc: var(--accent); position: relative; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; min-height: 66px; border-radius: var(--pb-r);
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); cursor: pointer; font: inherit; overflow: hidden; isolation: isolate;
  transition: border-color .18s, background .18s, transform .18s var(--pb-ease), box-shadow .18s; -webkit-tap-highlight-color: transparent; }
.pb-pf::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .2s;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--pc) 16%, transparent), transparent 60%); }
.pb-pf:hover { border-color: color-mix(in srgb, var(--pc) 45%, var(--line-2)); transform: translateY(-1px); box-shadow: var(--pb-shadow-hover); }
.pb-pf:hover::before { opacity: .7; }
.pb-pf:active { transform: translateY(0) scale(.99); }
.pb-pf:focus-visible { outline: 0; box-shadow: var(--pb-ring); }
.pb-pf.on { border-color: transparent; background: color-mix(in srgb, var(--accent) 6%, var(--bg-2)); box-shadow: var(--pb-ring); }
.pb-pf.on::before { opacity: 1; }
.pb-pf .grow { flex: 1; min-width: 0; }
.pb-pf .t { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-pf .m { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.pb-pf.on .m { color: var(--muted); }
.pb-pf .ok, .pb-alist .ok { color: var(--keep); }
.pb-dt-ok { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--keep); margin-right: 5px; vertical-align: 1px; box-shadow: 0 0 0 3px var(--keep-soft); }
.pb-cb { flex: none; position: relative; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--bg-2); transition: all .18s var(--pb-ease); }
.pb-pf:hover .pb-cb { border-color: var(--accent); }
.pb-pf.on .pb-cb { border-color: transparent; background: var(--pb-grad); box-shadow: 0 3px 8px -2px var(--accent-2); animation: pbPop .22s var(--pb-ease); }
.pb-pf.on .pb-cb::after { content: ""; position: absolute; left: 6.5px; top: 3px; width: 4.5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pb-glyph { flex: none; width: 38px; height: 38px; border-radius: 11px; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; letter-spacing: -.3px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--pc) 78%, #fff) 0%, var(--pc) 45%, color-mix(in srgb, var(--pc) 80%, #000) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 4px 10px -4px color-mix(in srgb, var(--pc) 70%, transparent); text-shadow: 0 1px 1px rgba(0, 0, 0, .2); }
.pb-glyph.sm { width: 24px; height: 24px; border-radius: 7px; font-size: 10.5px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
:root[data-theme="dark"] .pb-glyph { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 4px 10px -4px rgba(0, 0, 0, .6); }

/* ---------- 文案编辑 ---------- */
.pb-ed { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; }
.pb-tabs { display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line); padding-right: 14px; }
.pb-tab { position: relative; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; border: 0; background: transparent; color: var(--muted);
  cursor: pointer; font: inherit; text-align: left; transition: background .15s, color .15s; }
.pb-tab > span:not(.pb-glyph) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-tab:hover { background: var(--bg-3); color: var(--ink); }
.pb-tab.on { background: var(--accent-soft); color: var(--ink); font-weight: 650; }
.pb-tab.on::before { content: ""; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent-2); }
.pb-bad { width: 7px; height: 7px; border-radius: 50%; background: var(--cut); flex: none; box-shadow: 0 0 0 3px var(--cut-soft); }
.pb-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pb-form label { display: block; }
.pb-form .lb { font-weight: 600; }
.pb-form input[type=text], .pb-form textarea, .pb-form select { border-radius: 10px; }
.pb-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 14px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line); }
.pb-row2 select { background-color: var(--bg-2); }
.pb-sub { display: block; font-size: 11.5px; color: var(--dim); margin-top: 6px; }
.pb-sub.warn { color: var(--warn); }
.pb-cnt { float: right; font-size: 11.5px; font-weight: 500; color: var(--dim); font-variant-numeric: tabular-nums; }
.pb-cnt.over { color: var(--cut); font-weight: 650; }
.pb-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-3); min-height: 42px; margin-top: 6px; }
.pb-tags:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pb-tags input { flex: 1; min-width: 120px; border: 0 !important; background: transparent !important; padding: 3px 2px !important; box-shadow: none !important; }
.pb-tag { display: inline-flex; align-items: center; gap: 3px; background: var(--accent-soft); color: var(--accent); font-weight: 550; border-radius: 99px; padding: 2px 4px 2px 10px; font-size: 12.5px; }
.pb-tag button { border: 0; background: transparent; color: inherit; opacity: .6; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 99px; }
.pb-tag button:hover { opacity: 1; color: var(--cut); }

/* ---------- 右侧发布清单 ---------- */
.pb-side { position: sticky; top: 12px; }
.pb-side > .card { margin: 0; border-radius: 18px; padding: 18px; box-shadow: var(--pb-shadow); }
.pb-sideh { font-size: 12px; font-weight: 700; letter-spacing: .6px; color: var(--dim); margin-bottom: 12px; }
.pb-prev .pic { aspect-ratio: 16/9; width: 100%; border-radius: 12px; background: #0b0c10 center/cover no-repeat; display: grid; place-items: center; color: var(--dim);
  position: relative; overflow: hidden; isolation: isolate; }
.pb-prev .pic svg { width: 28px; height: 28px; }
.pb-prev .t { font-weight: 700; font-size: 15px; margin-top: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-prev .m { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pb-sll { margin: 16px 0 8px !important; font-size: 12px; font-weight: 650; color: var(--muted); display: flex; gap: 6px; }
.pb-sl { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow: auto; margin: 0 -6px; }
.pb-si { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 5px 6px; border-radius: 8px; }
.pb-si:hover { background: var(--bg-3); }
.pb-si .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.pb-mp { font-size: 11px; padding: 0 7px; line-height: 18px; border-radius: 99px; background: var(--bg-4); color: var(--muted); }
.pb-mp.ok { background: var(--keep-soft); color: var(--keep); }
.pb-x { border: 0; background: transparent; color: var(--dim); cursor: pointer; width: 20px; height: 20px; border-radius: 6px; font-size: 15px; line-height: 1; opacity: 0; transition: opacity .15s; }
.pb-si:hover .pb-x { opacity: 1; }
.pb-x:hover { background: var(--cut-soft); color: var(--cut); }
.pb-sl-empty { margin: 0 6px; padding: 14px; border: 1.5px dashed var(--line-2); border-radius: 10px; text-align: center; color: var(--dim); font-size: 12.5px; }
.pb-when { display: flex; background: var(--bg-3); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.pb-when button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 7px 10px; border-radius: 8px; cursor: pointer; font: inherit; transition: all .15s; }
.pb-when button:hover { color: var(--ink); }
.pb-when button.on { background: var(--bg-2); color: var(--ink); font-weight: 650; box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 2px 8px -2px rgba(0, 0, 0, .15); }
.pb-dt { width: 100%; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-3); color: var(--ink); font: inherit; }
.pb-quick { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.pb-quick button { border: 1px solid var(--line-2); background: transparent; color: var(--muted); border-radius: 99px; padding: 3px 10px; font-size: 12px; cursor: pointer; transition: all .15s; }
.pb-quick button.on, .pb-quick button:hover { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pb-iss { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.pb-iss li { position: relative; padding: 7px 10px 7px 28px; border-radius: 9px; line-height: 1.45; }
.pb-iss li::before { position: absolute; left: 9px; top: 7px; font-weight: 800; font-size: 11px; width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.pb-iss li.e { background: var(--cut-soft); color: var(--err-ink); } .pb-iss li.e::before { content: "!"; background: var(--cut); }
.pb-iss li.w { background: var(--warn-soft); color: var(--warn-ink); } .pb-iss li.w::before { content: "i"; background: var(--warn); }
.pb-go { width: 100%; justify-content: center; margin-top: 16px; height: 48px; font-size: 15px; font-weight: 650; border-radius: 12px !important; border: 0 !important;
  background: var(--pb-grad) !important; color: #fff !important; box-shadow: 0 8px 20px -8px var(--accent-2), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .15s var(--pb-ease), box-shadow .15s, filter .15s; }
.pb-go:hover:not([disabled]) { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 12px 26px -10px var(--accent-2), inset 0 1px 0 rgba(255, 255, 255, .18); }
.pb-go:active:not([disabled]) { transform: translateY(0); }
.pb-go[disabled] { filter: grayscale(.6); opacity: .55; box-shadow: none; cursor: not-allowed; }
.pb-go svg { width: 17px; height: 17px; }
.pb-foot { font-size: 12px; margin: 10px 0 0; line-height: 1.6; text-align: center; }

/* ---------- 发布记录 ---------- */
.pb-rbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pb-rsel { width: auto !important; margin-left: auto; padding: 6px 30px 6px 12px !important; border-radius: 10px !important; }
.pb-recs { padding: 6px !important; border-radius: 16px; box-shadow: var(--pb-shadow); }
.pb-rec { display: flex; align-items: center; gap: 14px; padding: 13px 12px; border-radius: 12px; transition: background .15s; }
.pb-rec + .pb-rec { box-shadow: 0 -1px 0 var(--line); }
.pb-rec:hover { background: var(--bg-3); box-shadow: none; }
.pb-rec:hover + .pb-rec { box-shadow: none; }
.pb-rec.hl { background: var(--accent-soft); }
.pb-rec .grow { flex: 1; min-width: 0; }
.pb-rec .t { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-rec .m { display: flex; flex-wrap: wrap; gap: 0; color: var(--muted); font-size: 12px; margin-top: 3px; }
.pb-rec .m > span + span::before { content: "·"; margin: 0 7px; color: var(--dim); }
.pb-err { color: var(--err-ink); background: var(--cut-soft); border-radius: 7px; padding: 4px 8px; font-size: 12px; margin-top: 6px; word-break: break-all; display: inline-block; }
.pb-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--bg-4); color: var(--muted); white-space: nowrap; }
.pb-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pb-st:has(.spin)::before { display: none; }
.pb-st.ok { background: var(--keep-soft); color: var(--keep); } .pb-st.bad { background: var(--cut-soft); color: var(--cut); }
.pb-st.warn { background: var(--warn-soft); color: var(--warn); } .pb-st.run { background: var(--accent-soft); color: var(--accent); }
.pb-st .spin { width: 10px; height: 10px; }
.pb-acts { display: flex; gap: 4px; align-items: center; flex: none; }
.pb-acts svg { width: 14px; height: 14px; }

/* ---------- 平台账号 ---------- */
.pb-ban { font-size: 13px; line-height: 1.75; border-radius: 14px !important; }
.pb-ban > svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.pb-acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-bottom: 22px; }
.pb-acard { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-wrap: wrap; align-items: center;
  align-content: flex-start; gap: 12px; min-width: 0; box-shadow: var(--pb-shadow); transition: border-color .18s, transform .18s var(--pb-ease), box-shadow .18s; }
.pb-acard:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--pb-shadow-hover); }
.pb-acard > .grow { flex: 1; min-width: 0; }
.pb-acard .t { font-weight: 700; }
.pb-acard .m { color: var(--muted); font-size: 12px; margin-top: 1px; }
.pb-mths { flex-basis: 100%; display: flex; gap: 5px; flex-wrap: wrap; }
.pb-mth { font-size: 11px; font-weight: 550; padding: 1px 8px; border-radius: 99px; background: var(--bg-4); color: var(--muted); line-height: 18px; }
.pb-mth.api { background: var(--keep-soft); color: var(--keep); }
.pb-alist { flex-basis: 100%; min-width: 0; width: 100%; list-style: none; margin: 0; padding: 4px 0 0; border-top: 1px solid var(--line); }
.pb-alist li { display: flex; align-items: center; gap: 6px; padding: 7px 0; font-size: 13px; }
.pb-alist li + li { border-top: 1px solid var(--line); }
.pb-alist .btn.sm { padding: 3px 7px; }
.pb-alist li .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 弹窗：连接账号 / 发布助手 / 编辑 ---------- */
.pb-box { width: min(560px, 94vw) !important; max-height: 90vh; overflow: auto; border-radius: 18px !important; }
.pb-box.wide { width: min(880px, 96vw) !important; }
.pb-mh { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.pb-mh h3 { margin: 0 !important; font-size: 16.5px; }
.pb-mh .muted { font-size: 12.5px; }
.pb-help { background: var(--bg-3); border-radius: 10px; padding: 11px 13px; font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-bottom: 16px; }
.pb-help code { font-size: 11.5px; }
.pb-help .warn { color: var(--warn); }
.pb-cform { display: flex; flex-direction: column; gap: 12px; }
.pb-cform input[type=url] { width: 100%; box-sizing: border-box; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-3); color: inherit; font: inherit; }
.pb-acc-detail { display: block; max-width: 100%; overflow-wrap: anywhere; margin-top: 4px; font-size: 12px; }
.pb-cform input[type=password] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1px; }
.pb-as { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; }
.pb-as-v video { width: 100%; max-height: 420px; border-radius: 12px; background: #000; }
.pb-as-v .actions { margin-top: 10px; }
.pb-as-s { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 16px; }
.pb-as-s > li { counter-increment: s; position: relative; padding-left: 36px; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.pb-as-s > li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; background: var(--pb-grad); color: #fff; font-weight: 750;
  font-size: 12px; display: grid; place-items: center; }
.pb-as-s > li + li::after { content: ""; position: absolute; left: 11px; top: -15px; width: 2px; height: 12px; background: var(--line-2); }
.pb-as-s > li > b { font-size: 14px; }
.pb-cp { width: 100%; }
.pb-cp .lb { display: flex; align-items: center; justify-content: space-between; margin: 0; }
.pb-cp .v { background: var(--bg-3); border-radius: 9px; padding: 8px 11px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.pb-cp .v.big { max-height: 140px; overflow: auto; }
.pb-done { display: flex; gap: 8px; width: 100%; }
.pb-done input { flex: 1; }
.pb-setup-steps { padding-left: 24px; line-height: 1.7; }
.pb-setup-steps li + li { margin-top: 9px; }
.pb-setup-section { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.pb-setup-section h4 { margin: 0 0 12px; }
.pb-setup-section summary { cursor: pointer; font-weight: 600; }
.pb-setup-section > label { display: grid; gap: 6px; margin-bottom: 12px; }
.pb-setup-section [hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) { #pbRoot *, .pb-box * { transition: none !important; animation: none !important; } }
@media (max-width: 1120px) { .pb-compose { grid-template-columns: 1fr; } .pb-side { position: static; } }
@media (max-width: 760px) {
  .pb-ed, .pb-as, .pb-row2 { grid-template-columns: 1fr; }
  .pb-tabs { flex-direction: row; overflow-x: auto; border-right: 0; padding-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
  .pb-tab.on::before { display: none; }
  .pb-stats { margin-left: 0; }
  .pb-search, .pb-presets { margin-left: 0; width: 100%; }
  .pb-step { padding: 18px 16px; }
  .pb-step + .pb-step::before { left: 29px; }
  .pb-pfs { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

.pb-fld { display: flex; flex-direction: column; gap: 6px; }
.pb-fld .lb { display: flex; align-items: center; gap: 12px; margin: 0; }
.pb-fld .lb label { flex: 1; min-width: 0; }
.pb-fld input { width: 100%; box-sizing: border-box; }
.pb-where { font-size: 12.5px; color: var(--accent, #5d6ef5); text-decoration: none; white-space: nowrap; }
.pb-where:hover { text-decoration: underline; }
.pb-where-tip { background: var(--bg-3); border-radius: 9px; padding: 10px 12px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.pb-where-tip p { margin: 0 0 4px; }
.pb-where-tip a { display: inline-block; margin: 4px 14px 0 0; }
.pb-spec { margin-top: 6px; }
.pb-spec summary { cursor: pointer; color: var(--dim); }

/* 扫码自动发布 / 图文 / 文章 */
.pb-kinds { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line); margin-left: auto; }
.pb-kinds button { border: 0; background: transparent; color: var(--muted); padding: 5px 12px; border-radius: 7px; font: inherit; font-size: 13px; cursor: pointer; }
.pb-kinds button.on { background: var(--bg-2); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.pb-imgs .pb-vid { position: relative; }
.pb-imgx { position: absolute; top: 6px; right: 6px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 99px; width: 22px; height: 22px; }
.pb-art { display: flex; flex-direction: column; gap: 12px; }
.pb-art input[type=text], .pb-art textarea { width: 100%; box-sizing: border-box; }
.pb-art textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.6; }
.pb-mdin { margin-left: 10px; color: var(--accent); cursor: pointer; font-size: 12px; }
.pb-artc { display: flex; align-items: center; gap: 10px; }
.pb-artc .lb { margin: 0; }
.pb-artcv { width: 96px; height: 54px; border-radius: 8px; background: var(--cv) center / cover no-repeat, var(--bg-3); }
.pb-qrsec h4 { margin: 0 0 4px; }
.pb-qrrow { display: flex; gap: 10px; align-items: flex-end; margin-top: 8px; }
.pb-qrrow label { flex: 1; }
.pb-qrrow input { width: 100%; box-sizing: border-box; }
.pb-qr { display: flex; gap: 16px; align-items: center; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--bg-3); }
.pb-qrimg { width: 180px; height: 180px; flex: none; display: grid; place-items: center; background: #fff; border-radius: 10px; color: #333; font-size: 28px; }
.pb-qrimg img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.pb-verify { display: flex; gap: 8px; margin: 8px 0; }
.pb-verify input { flex: 1; min-width: 0; letter-spacing: 2px; }
.pb-qrtxt .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pb-qrimg .pb-qrok { font-size: 64px; color: #16a34a; font-weight: 700; }
.pb-qrwin { font-size: 40px; color: var(--accent); }
.pb-qrtxt { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pb-setup-log { max-height: 140px; overflow: auto; font-size: 11.5px; background: var(--bg-3); border-radius: 8px; padding: 8px 10px; margin: 8px 0 0; white-space: pre-wrap; }
.pb-chk { display: flex; align-items: center; gap: 8px; }
.pb-alist li { flex-wrap: wrap; row-gap: 4px; }
.pb-alist li > .grow { flex: 1 1 calc(100% - 24px); }
.pb-as-v img { width: 100%; max-height: 420px; object-fit: contain; border-radius: 12px; background: var(--bg-3); }
@media (max-width: 640px) { .pb-qr { flex-direction: column; } .pb-qrrow { flex-direction: column; align-items: stretch; } }

/* 多账号（矩阵号） */
.pb-accf { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.pb-accf .lb a { margin-left: 6px; font-weight: 400; color: var(--accent); }
.pb-accpick { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-accchip { display: inline-flex; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink);
  border-radius: 10px; padding: 7px 11px; font: inherit; font-size: 13px; cursor: pointer; max-width: 260px; }
.pb-accchip:hover { border-color: var(--accent); }
.pb-accchip.on { border-color: var(--accent); background: var(--accent-soft, rgba(93, 110, 245, .1)); }
.pb-accchip.bad small:last-child { color: var(--warn); }
.pb-accchip span { display: flex; flex-direction: column; min-width: 0; }
.pb-accchip b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-accchip small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-accchip .pb-cb { flex: none; width: 18px; height: 18px; }
.pb-accchip:hover .pb-cb { border-color: var(--accent); }
.pb-accchip.on .pb-cb { border-color: transparent; background: var(--pb-grad); }
.pb-accchip.on .pb-cb::after { content: ""; position: absolute; left: 5.5px; top: 2.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pb-sia { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-stag select { width: 100%; }
.pb-nick { color: var(--muted); font-size: 12px; }
.pb-acts2 { display: flex; gap: 8px; flex-wrap: wrap; }

/* 账号页（简化版）：我的账号按平台分组 + 添加账号 */
.pb-ahead { display: flex; align-items: flex-start; gap: 16px; margin: 4px 0 14px; }
.pb-ahead h2 { margin: 0 0 4px; font-size: 18px; }
.pb-ahead .hint { margin: 0; }
.pb-ahead .hint b.warn { color: var(--warn); margin-left: 6px; }
.pb-ahead .actions { margin-left: auto; flex: none; }
.pb-agroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.pb-agroup { padding: 14px 16px; }
.pb-agh { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pb-agh .pb-glyph { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.pb-agh .btn { margin-left: auto; }
.pb-alist2 { list-style: none; margin: 0; padding: 0; }
.pb-arow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.pb-arow .grow { min-width: 0; }
.pb-arow .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-arow .m { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.pb-st-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.pb-st-dot.ok { background: var(--keep); } .pb-st-dot.bad { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 25%, transparent); }
.pb-st-t.ok { color: var(--keep); } .pb-st-t.bad { color: var(--warn); font-weight: 600; }
.pb-aacts { display: flex; align-items: center; gap: 4px; flex: none; }
.pb-more { position: relative; }
.pb-more > summary { list-style: none; cursor: pointer; }
.pb-more > summary::-webkit-details-marker { display: none; }
.pb-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 120px; padding: 4px; border-radius: 10px; background: var(--bg-2);
  border: 1px solid var(--line); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .3); display: flex; flex-direction: column; }
.pb-menu button { text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.pb-menu button:hover { background: var(--bg-3); }
.pb-menu button.danger { color: var(--cut); }
.pb-quickadd { display: flex; flex-wrap: wrap; gap: 10px; }
.pb-qa { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2);
  color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.pb-qa:hover { border-color: var(--accent); }
.pb-qa .pb-glyph { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.pb-aempty { text-align: center; padding: 34px 20px; }
.pb-aempty .big { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.pb-aempty .pb-quickadd { justify-content: center; margin-top: 16px; }
.pb-howto { margin-top: 18px; color: var(--muted); font-size: 13px; }
.pb-howto summary { cursor: pointer; }
.pb-howto ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.8; }
.pb-box .pb-search { width: 100%; margin-left: 0; box-sizing: border-box; }
.pb-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.pb-pick { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; }
.pb-pick:hover { border-color: var(--accent); background: var(--bg-3); }
.pb-pick[hidden] { display: none; }
.pb-pick .pb-glyph { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.pb-pick .grow { display: flex; flex-direction: column; min-width: 0; }
.pb-pick small { color: var(--muted); font-size: 11.5px; }
.pb-cntb { font-size: 11px; font-weight: 700; color: var(--keep); background: color-mix(in srgb, var(--keep) 14%, transparent); border-radius: 99px; padding: 1px 7px; }
.pb-noacc { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, var(--bg-2));
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); font-size: 13px; }
.pb-iss a { margin-left: 6px; color: var(--accent); font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) {
  .pb-ahead { flex-direction: column; } .pb-ahead .actions { margin-left: 0; }
  .pb-agroups { grid-template-columns: 1fr; }
  .pb-arow { flex-wrap: wrap; } .pb-aacts { margin-left: 19px; }
}
.pb-arow > .grow { flex: 1; }
.pb-pgrp[hidden] { display: none; }
