/* ============================================================
   公众号草稿箱推送系统 · 样式（浅色主题）
   ============================================================ */

:root {
  --bg:        #f5f6f8;
  --surface:   #ffffff;
  --surface-2: #fafbfc;
  --border:    #e4e7ec;
  --border-2:  #d0d5dd;
  --text:      #1d2939;
  --text-2:    #475467;
  --text-3:    #98a2b3;
  --brand:     #1a7f5a;
  --brand-2:   #14603f;
  --brand-soft:#e8f5ef;
  --ok:        #12805c;
  --ok-soft:   #e6f6f0;
  --warn:      #b54708;
  --warn-soft: #fef3e6;
  --err:       #b42318;
  --err-soft:  #fdeceb;
  --info:      #175cd3;
  --info-soft: #eaf1fd;
  --radius:    10px;
  --shadow:    0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #f0f1f3;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 4px;
  font-size: .92em;
}

.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.req   { color: var(--err); font-weight: 700; }
.grow  { flex: 1 1 auto; min-width: 0; }

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

body.is-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(1100px 480px at 50% -12%, #e8f5ef 0%, rgba(232,245,239,0) 62%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px 26px;
  box-shadow: var(--shadow-lg);
}
.login-card h1 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.2px; }
.login-card > p.muted { margin: 0 0 22px; font-size: 13px; }
.login-msg { min-height: 20px; margin: 12px 0 0; color: var(--err); font-size: 13px; }

/* ==================== 顶栏 ==================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 56px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 14.5px; white-space: nowrap; }
.dot-logo {
  width: 10px; height: 10px; border-radius: 3px;
  background: linear-gradient(135deg, var(--brand), #35b184);
}
.tabs { display: flex; gap: 2px; flex: 1 1 auto; }
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.is-active { background: var(--brand-soft); color: var(--brand-2); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.ip-chip {
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 11px;
  cursor: pointer;
  white-space: nowrap;
}
.ip-chip:hover { border-color: var(--border-2); color: var(--text); }

/* ==================== 布局 ==================== */

.main { max-width: 1180px; margin: 0 auto; padding: 22px 20px 72px; }
.panel { display: none; }
.panel.is-active { display: block; animation: fade .16s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card h2 {
  margin: 0 0 14px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.1px;
}

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.gap { gap: 12px; margin-top: 4px; }
.row.gap-sm { gap: 8px; margin: 10px 0; }
/* .row.between 里的 .row.gap-sm 是标题同行右侧的按钮组，
   给它上下外边距会让它在 flex 行里相对标题错位，所以清零 */
.row.between > .row.gap-sm { margin: 0; }
.row.between { justify-content: space-between; margin-bottom: 12px; }
.row.between h2 { margin: 0; }

/* ==================== 表单控件 ==================== */

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.field .hint { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); margin-top: 5px; line-height: 1.45; }

.input,
input[type="text"], input[type="password"], input[type="url"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 8px 11px;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,127,90,.12);
}
select.input, .row > select { width: auto; min-width: 130px; }
input[type="file"] {
  width: 100%;
  font: inherit;
  font-size: 12.5px;
  padding: 7px 9px;
  border: 1px dashed var(--border-2);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
}
input[type="file"]::file-selector-button {
  font: inherit;
  font-size: 12.5px;
  margin-right: 10px;
  padding: 4px 11px;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: var(--brand); color: var(--brand-2); }

/* 拖拽落区：`<input webkitdirectory>` 在部分浏览器/兼容模式下会被悄悄降级成「选文件」，
   而拖拽走的是 DataTransfer API，不依赖任何 picker 实现 —— 所以把它摆成第一入口。 */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 92px; padding: 12px;
  border: 1.5px dashed var(--border-2); border-radius: 10px;
  background: var(--surface-2); text-align: center; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.drop b { font-size: 13px; font-weight: 600; color: var(--text); pointer-events: none; }
.drop em { font-style: normal; font-size: 11.5px; color: var(--text-3); line-height: 1.45; pointer-events: none; }
.drop:hover { border-color: var(--brand); }
.drop.is-over { border-color: var(--brand); background: rgba(26,127,90,.07); }

.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.check input { accent-color: var(--brand); width: 15px; height: 15px; }

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

.btn {
  appearance: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s, opacity .12s;
}
.btn-sm { font-size: 12.5px; padding: 7px 12px; }
.btn-lg { font-size: 14.5px; padding: 11px 26px; }
.btn-block { width: 100%; padding: 10px; }

.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-2); border-color: var(--brand-2); }
.btn-ghost { background: var(--surface); border-color: var(--border-2); color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--text-3); color: var(--text); }
.btn-danger { background: var(--err-soft); border-color: #f5c2bd; color: var(--err); }
.btn-danger:hover:not(:disabled) { background: #fbdcd9; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-link {
  appearance: none; border: 0; background: none; padding: 0 6px;
  font: inherit; font-size: 12.5px; color: var(--info); cursor: pointer;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--err); }

/* ==================== 文章 / 账号选择 ==================== */

.meta-box {
  margin: 10px 0 4px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.65;
  word-break: break-all;
}
.meta-box b { color: var(--text); font-weight: 600; }
.meta-box .warnline { color: var(--warn); }

.acc-pick {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  background: var(--surface-2);
}
.acc-pick .empty { padding: 14px; text-align: center; }
.acc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .1s;
}
.acc-item:hover { background: #fff; }
.acc-item input { accent-color: var(--brand); width: 15px; height: 15px; flex: none; }
.acc-item .nm { flex: 1 1 auto; min-width: 0; }
.acc-item .nm strong { display: block; font-weight: 500; font-size: 13.5px; }
.acc-item .nm em { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); }

/* ==================== 状态点 ==================== */

.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }
.dot.s0 { background: var(--text-3); }
.dot.s1 { background: var(--ok); }
.dot.s-1 { background: var(--err); }

.badge {
  display: inline-block;
  font-size: 11.5px;
  line-height: 1.7;
  padding: 0 8px;
  border-radius: 20px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge.ok   { background: var(--ok-soft);   color: var(--ok);   border-color: #bde5d6; }
.badge.err  { background: var(--err-soft);  color: var(--err);  border-color: #f5c2bd; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: #f7d9b5; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: #c6d9f7; }
.badge.gray { background: #f2f4f7;          color: var(--text-2); border-color: var(--border); }

/* ==================== 表格 ==================== */

.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.list td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: var(--surface-2); }
table.list .t-title { font-weight: 500; max-width: 380px; }
table.list .t-err { color: var(--err); font-size: 12px; max-width: 420px; word-break: break-word; }
table.list .actions { white-space: nowrap; }

table.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
table.kv th {
  text-align: left; font-weight: 500; color: var(--text-2);
  padding: 7px 14px 7px 0; width: 42%; vertical-align: top;
}
table.kv td { padding: 7px 0; word-break: break-all; }

/* 批量上传的识别清单 */
table.batch-tbl th.pick { width: 34px; }
table.batch-tbl tr.is-bad td { background: var(--err-soft); }
table.batch-tbl td.mono {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}
/* 用 class 而不是 id：文章和贴图的识别清单会同时存在于 DOM 里（只是面板被隐藏），
   都写同名 id 就会出现两个，选择器只认第一个 */
.batch-commit-row { margin-top: 14px; }
/* 出错原因可能很长，要能换行，不能撑破表格 */
#batchResult .badge,
#posterBatchResult .badge { white-space: normal; text-align: left; }
/* 贴图批量那份清单里「文件夹」和「标题」都比较长，允许换行 */
#posterBatchResult table.batch-tbl td { vertical-align: top; }

/* ==================== 推送结果 ==================== */

.push-action { margin-top: 0; }
.results { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.res {
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-2);
  border-radius: 8px;
  padding: 10px 13px;
  background: var(--surface-2);
  font-size: 13px;
}
.res .head { display: flex; align-items: center; gap: 9px; }
.res .head .nm { font-weight: 500; flex: 1 1 auto; }
.res .head .tm { font-size: 11.5px; color: var(--text-3); }
.res .body { margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.res .body.err-text { color: var(--err); }
.res .body ul { margin: 4px 0 0; padding-left: 18px; }
.res.is-running { border-left-color: var(--info); background: var(--info-soft); }
.res.is-ok      { border-left-color: var(--ok);   background: var(--ok-soft); }
.res.is-err     { border-left-color: var(--err);  background: var(--err-soft); }

/* ==================== 上传结果 / 提示 ==================== */

.notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
  border: 1px solid;
}
.notice.ok   { background: var(--ok-soft);   border-color: #bde5d6; color: #0b5b40; }
.notice.err  { background: var(--err-soft);  border-color: #f5c2bd; color: var(--err); }
.notice.warn { background: var(--warn-soft); border-color: #f7d9b5; color: #7a3105; }
.notice.info { background: var(--info-soft); border-color: #c6d9f7; color: #103f8f; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.notice .t { font-weight: 600; }

ul.notes { margin: 0; padding-left: 20px; font-size: 13px; color: var(--text-2); line-height: 1.85; }
ul.notes li + li { margin-top: 4px; }

/* ==================== 弹窗 ==================== */

.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(16,24,40,.42); }
.modal-box {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  animation: pop .15s ease-out;
}
@keyframes pop { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.modal-box.wide { max-width: 900px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 18px; border-top: 1px solid var(--border);
}
.modal-foot:empty { display: none; }

/*
 * 预览控件栏 + 居中舞台。
 *
 * 宽度由 iframe 自己的内联宽度决定（375 / 390 / 414），舞台只负责居中并把它框住。
 * 改造前是 iframe 撑满弹窗（.modal-box.wide），实际有 860 多 px ——
 * 那是读者真实视口（375~430px）的两倍多。在那种宽度下判断「这版排版好不好」等于没看：
 * 行长、图片缩放、段间距全都不是读者看到的样子。
 */
.preview-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  margin-bottom: 10px; font-size: 13px; color: var(--text-2);
}
.preview-bar label { display: inline-flex; align-items: center; gap: 6px; }
.preview-bar select { max-width: 260px; }
.preview-meta { margin-left: auto; color: var(--text-3); }

.preview-stage {
  display: flex; justify-content: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #eef0f3;
  overflow: auto;
}

.preview-frame {
  width: 100%;        /* 自适应时是这个；选了具体宽度由 JS 写内联 width 覆盖 */
  flex: 0 0 auto;
  height: 62vh;
  border: 0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(16,24,40,.08);
}

.preview-tip { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: var(--text-3); }

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

.toast-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}
.toast {
  min-width: 200px;
  max-width: 380px;
  padding: 11px 15px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.55;
  color: #fff;
  background: #1d2939;
  box-shadow: var(--shadow-lg);
  animation: slide .18s ease-out;
  word-break: break-word;
}
.toast.ok  { background: var(--ok); }
.toast.err { background: var(--err); }
/* 「保存成功、但结果是关着的」这类警告：不是失败（别标红），但必须比成功更显眼、停留更久 ——
   用户看到一句绿色「已保存」就走了，推送时才发现尾巴没加上。 */
.toast.warn { background: var(--warn); }
@keyframes slide { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ==================== 工具 ==================== */

.spin {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rot .7s linear infinite;
  vertical-align: -2px;
  margin-right: 7px;
}
.spin.dark { border-color: rgba(0,0,0,.15); border-top-color: var(--brand); }
@keyframes rot { to { transform: rotate(360deg); } }

.empty-state { padding: 26px; text-align: center; color: var(--text-3); font-size: 13px; }

/* 识别清单里的标题输入框：表格单元格里要撑得开，不然长标题看不全也改不利索 */
.batch-title {
  width: 100%;
  min-width: 200px;
  max-width: 360px;
}

/* 推送页：勾选框 + 它的配置入口 + 勾了会怎样，三件事摆在一块，别拆散 */
.foot-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 4px;
}

/* ==================== 文末内容编辑器 ==================== */

.fm-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
/* 打开弹窗时先说清在编辑哪一层：两层都叫「文末内容」，不分清楚很容易配错地方 */
.fm-scope {
  border-radius: 8px; padding: 9px 12px; font-size: 12.5px; line-height: 1.65;
  margin-bottom: 14px; border: 1px solid;
}
.fm-scope b { color: inherit; }
.fm-scope-g { background: var(--info-soft);  border-color: #c6d9f7; color: #103f8f; }
.fm-scope-a { background: var(--surface-2); border-color: var(--border); color: var(--text-2); }
.fm-grid { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
@media (max-width: 780px) { .fm-grid { grid-template-columns: 1fr; } }

.fm-sec { font-size: 12.5px; color: var(--text-2); font-weight: 500; margin: 0 0 8px; }

.fm-m {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px 11px;
  margin-bottom: 8px;
  background: var(--surface-2);
}
.fm-m-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.fm-m-type { font-size: 12.5px; font-weight: 600; color: var(--brand-2); }
.fm-m-ops { white-space: nowrap; }
.fm-m-ops .btn-link:disabled { color: var(--text-3); cursor: not-allowed; text-decoration: none; }
.fm-text { width: 100%; resize: vertical; line-height: 1.7; }

.fm-imgbox { display: flex; flex-direction: column; gap: 9px; }
.fm-thumbs { display: flex; flex-wrap: wrap; gap: 7px; }
.fm-thumb {
  position: relative;
  display: block;
  width: 68px; height: 68px;
  border: 2px solid var(--border-2);
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}
.fm-thumb.is-on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(26,127,90,.18); }
.fm-thumb input { position: absolute; opacity: 0; pointer-events: none; }
.fm-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 上传按钮是个撑满的透明 file input，避免原生文件控件破坏按钮外观 */
.fm-up { position: relative; overflow: hidden; align-self: flex-start; display: inline-flex; align-items: center; }
.fm-up input[type="file"] {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  padding: 0; border: 0; border-radius: 0; background: transparent;
  opacity: 0; cursor: pointer;
}

.fm-prev { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.fm-prev-h {
  font-size: 12px; color: var(--text-2); background: var(--surface-2);
  padding: 6px 11px; border-bottom: 1px solid var(--border);
}
.fm-prev-body {
  padding: 14px 13px; max-height: 46vh; overflow-y: auto;
  font-size: 14px; line-height: 1.7; color: #3f3f3f; word-break: break-word;
}
.fm-prev-body.is-off { opacity: .55; }
.fm-prev-body img { max-width: 100%; height: auto; }

.fm-empty { color: var(--text-3); font-size: 12.5px; text-align: center; padding: 12px 0; }
.fm-off-tip {
  background: var(--warn-soft); color: var(--warn); border: 1px solid #f7d9b5;
  border-radius: 6px; padding: 7px 10px; font-size: 12px; line-height: 1.6; margin-bottom: 10px;
}

/* ==================== 配对分发 ==================== */

/* 文章多选复用 .acc-pick / .acc-item，只多一个「体检不过」态。
   体检不过的不给勾：空正文推出去必然是一篇空白草稿，让人勾了再拦反而更烦。 */
.acc-item.is-bad { opacity: .55; cursor: not-allowed; }
.acc-item .badge { flex: none; }

.okline { margin-top: 6px; color: var(--ok); }

.pair-table { width: 100%; border-collapse: collapse; }
.pair-table td { padding: 6px; vertical-align: middle; }
.pair-table tr + tr td { border-top: 1px solid var(--border); }
.pair-table .pair-acc {
  width: 36%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pair-table .pair-acc b { font-weight: 500; margin-left: 7px; }
.pair-table .pair-arrow { width: 26px; text-align: center; color: var(--text-3); }
.pair-table .pair-sel { width: 100%; }

/* 推送结果里把文章名挂在账号后面：配对分发时一屏里全是不同文章，
   不写清是哪一篇，成功记录自己也看不懂。 */
.res .head .nm em.art {
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  color: var(--text-3);
  margin-left: 6px;
}

/* ============================================================
   贴图（微信「图片消息」）
   ============================================================ */

/* 选图后的顺序预览。用 flex-wrap 而不是 grid：图片张数不定（1~20），
   行数会变，flex 换行比固定列数更自然。 */
.poster-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 78px;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fbfcfd;
}
.poster-pick .empty {
  font-size: 12px;
  color: var(--text-3);
  align-self: center;
}
.poster-pick .more {
  align-self: center;
  font-size: 12px;
  color: var(--text-3);
}

.poster-thumb {
  position: relative;
  width: 72px;
  height: 96px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #eef1f4;
}
.poster-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.poster-thumb .idx {
  position: absolute;
  left: 0;
  top: 0;
  padding: 1px 5px;
  font-size: 11px;
  line-height: 16px;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  border-bottom-right-radius: 6px;
}
.poster-thumb .cover-tag {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 1px 5px;
  font-size: 11px;
  line-height: 16px;
  color: #fff;
  background: var(--brand);
  border-top-right-radius: 6px;
}

/* 贴图库：一张一张的卡片，不是表格 —— 贴图的核心信息是「长什么样」，
   表格里塞不下缩略图，而且贴图数量通常远少于文章，卡片更好扫。 */
.poster-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.poster-card {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
}
.poster-card .cover {
  flex: 0 0 62px;
  width: 62px;
  height: 82px;
  border-radius: 6px;
  overflow: hidden;
  background: #eef1f4;
  border: 1px solid var(--border);
}
.poster-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.poster-card .body {
  flex: 1 1 auto;
  min-width: 0;
}
.poster-card .body .tt {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poster-card .body .tx {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.poster-card .body .mt {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-3);
}
.poster-card .acts {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

/* 推送弹窗里挑账号用的紧凑列表 */
.poster-accs {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.poster-accs label {
  display: block;
  padding: 5px 2px;
  font-size: 13px;
}
.poster-accs label + label {
  border-top: 1px solid var(--border);
}

@media (max-width: 720px) {
  .poster-list { grid-template-columns: 1fr; }
}
