:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --line: #e5e7eb;
  --line-2: #eef0f3;
  --text: #1d2026;
  --text-2: #6b7280;
  --text-3: #9aa1ad;
  --accent: #2b6cf6;
  --accent-soft: #eef3ff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 24, 31, .04), 0 8px 24px rgba(20, 24, 31, .06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
body {
  display: flex;
  flex-direction: column;
}

/* ---------------- 环境提示条 ---------------- */
.env-banner {
  flex-shrink: 0;
  background: #fff7e6;
  color: #8a5a00;
  border-bottom: 1px solid #f0d9a8;
  padding: 8px 16px;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
  position: relative;
  z-index: 25;
}
.env-banner a { color: #2b6cf6; }
.env-banner[hidden] { display: none !important; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  flex-shrink: 0;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 218px; }

.logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #2b6cf6, #6d8dff);
  color: #fff; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(43, 108, 246, .32);
}

.name { font-size: 14px; font-weight: 650; letter-spacing: .2px; }
.sub { font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* ---------------- 主题胶囊 ---------------- */
.themes { display: flex; gap: 7px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.themes::-webkit-scrollbar { display: none; }

.theme-chip {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  cursor: pointer;
  transition: .16s;
  white-space: nowrap;
}
.theme-chip .sw-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.theme-chip b { font-size: 12.5px; font-weight: 500; }
.theme-chip:hover { border-color: #c8cdd6; transform: translateY(-1px); }
.theme-chip.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(43, 108, 246, .1);
}
.theme-chip.on b { color: var(--accent); font-weight: 650; }

/* ---------------- 按钮 ---------------- */
.actions { display: flex; gap: 8px; }

.btn {
  font: inherit; font-size: 12.5px; font-weight: 500;
  padding: 8px 15px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #c8cdd6; }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
  box-shadow: 0 3px 10px rgba(43, 108, 246, .26);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary.ok { background: #0f9d58; border-color: #0f9d58; box-shadow: 0 3px 10px rgba(15,157,88,.26); }

/* ---------------- 工作区 ---------------- */
.workspace {
  flex: 1;
  min-height: 0;
  height: auto;
  display: flex;
  gap: 12px;
  padding: 12px;
}

.pane {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-shadow: var(--shadow);
}

.pane-md { flex: 0 0 330px; }
.pane-preview { flex: 1 1 auto; min-width: 0; background: #eceef1; }
.pane-style { flex: 0 0 310px; }

.pane-head {
  height: 40px; flex: 0 0 40px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-2);
  font-size: 12px; font-weight: 600; color: var(--text-2);
  letter-spacing: .3px;
  text-transform: uppercase;
}
.pane-head .meta { font-weight: 400; font-size: 11px; color: var(--text-3); text-transform: none; }
.head-tools { display: flex; align-items: center; gap: 6px; }
.mini {
  font: inherit; font-size: 11px; color: var(--text-3);
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  padding: 3px 9px; cursor: pointer;
}
.mini:hover { color: var(--text); border-color: #c8cdd6; }

/* ---------------- Markdown 编辑 ---------------- */
#editor {
  flex: 1; width: 100%; border: 0; outline: 0; resize: none;
  padding: 14px 16px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px; line-height: 1.85; color: #33383f;
  background: #fff;
  tab-size: 2;
}
#editor::placeholder { color: #b6bcc6; }
.pane-foot {
  flex: 0 0 auto; padding: 8px 14px; border-top: 1px solid var(--line-2);
  background: #fbfbfc;
}
.tip { font-size: 10.5px; color: var(--text-3); line-height: 1.5; }

/* ---------------- 预览 ---------------- */
.preview-scroll {
  flex: 1; overflow-y: auto; padding: 26px 20px 70px;
  display: flex; justify-content: center;
  scroll-behavior: smooth;
}

.phone {
  width: 414px;
  max-width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 4px rgba(20,24,31,.04), 0 18px 48px rgba(20,24,31,.1);
  padding: 30px 22px 44px;
  align-self: flex-start;
  transition: width .2s;
}

.titlecard {
  font-size: 21px; font-weight: 700; line-height: 1.5; color: #14161a;
  padding-bottom: 15px; margin-bottom: 24px;
  border-bottom: 1px solid #eceef1;
  word-break: break-word;
}
.titlecard:empty { display: none; }

#paper { word-break: break-word; }

.hero-wrap { margin: 0 0 26px; position: relative; }
.hero-wrap img { width: 100%; display: block; border-radius: 10px; }
.hero-del {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; border: 0; cursor: pointer;
  font-size: 14px; line-height: 1; display: none;
}
.hero-wrap:hover .hero-del { display: block; }

/* ---------------- 样式面板 ---------------- */
.panel { flex: 1; overflow-y: auto; padding: 10px 12px 40px; }

.group {
  border: 1px solid var(--line-2);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  background: #fff;
}
.group-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px;
  cursor: pointer;
  user-select: none;
  font-size: 12px; font-weight: 600; color: var(--text);
  transition: background .15s;
}
.group-head:hover { background: #fafbfc; }
.group-head .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.group-head .sign { margin-left: auto; color: var(--text-3); font-size: 10px; transition: transform .18s; }
.group.open .sign { transform: rotate(90deg); }

.group-body { display: none; padding: 4px 11px 12px; border-top: 1px solid var(--line-2); }
.group.open .group-body { display: block; }

.field { margin: 9px 0; }
.field-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 5px;
}
.field-top label { font-size: 11.5px; color: var(--text-2); }
.field-top .val {
  font-size: 11px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
  min-width: 34px; text-align: right;
}

input[type=range] {
  width: 100%; height: 3px; border-radius: 2px;
  background: #e6e8ec; outline: 0; -webkit-appearance: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent); cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.14);
}

select, input[type=text], input[type=number] {
  width: 100%; font: inherit; font-size: 12px;
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: var(--text); outline: 0;
}
select:focus, input[type=text]:focus { border-color: var(--accent); }

.colorrow { display: flex; align-items: center; gap: 7px; }
.colorrow input[type=color] {
  width: 30px; height: 26px; padding: 0; border: 1px solid var(--line);
  border-radius: 7px; background: #fff; cursor: pointer;
}
.swatches { display: flex; gap: 5px; flex: 1; flex-wrap: wrap; }
.sw {
  width: 17px; height: 17px; border-radius: 5px; cursor: pointer;
  border: 1px solid rgba(0,0,0,.08); transition: .12s;
}
.sw:hover { transform: scale(1.16); }

.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  font-size: 11px; padding: 4px 9px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  transition: .12s;
}
.chip:hover { border-color: #c8cdd6; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.gh-form { display: flex; flex-direction: column; gap: 8px; }
.gh-label { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.gh-form input[type=password] {
  font-size: 13px; padding: 9px 11px; border-radius: 8px;
  border: 1px solid var(--line); font-family: ui-monospace, Consolas, monospace;
}
.gh-form input[type=password]:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px var(--accent-soft); }

.hintbox {
  font-size: 10.5px; line-height: 1.6; color: var(--text-3);
  background: #fbfbfc; border: 1px dashed var(--line);
  border-radius: 8px; padding: 7px 9px; margin-top: 8px;
}

/* ---------------- emoji 角标选择 ---------------- */
.emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 6px;
}
.emo {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: .12s;
}
.emo:hover { background: #f4f5f7; border-color: var(--line); }
.emo.on { background: var(--accent-soft); border-color: var(--accent); }
.emo-x { color: var(--text-3); font-size: 13px; }

/* ---------------- 装饰列表 ---------------- */
.deco-list { display: flex; flex-direction: column; gap: 6px; }

.deco-row {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 6px 7px 5px;
  background: #fbfbfc;
  transition: border-color .15s;
}
.deco-row.probing { border-color: var(--accent); animation: probePulse .9s ease infinite alternate; }
@keyframes probePulse {
  from { border-color: var(--accent); }
  to { border-color: #b7c9ff; }
}
.deco-row.is-logo { background: #f8faff; border-color: #dce6ff; }
.deco-pos-chips {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  margin-bottom: 5px;
}
.deco-pos-chips .chip {
  padding: 3px 2px;
  font-size: 9.5px;
  text-align: center;
  border-radius: 4px;
}
.deco-logo-row { display: flex; align-items: center; gap: 4px; }
.deco-logo-row .chip { flex: 0 0 auto; padding: 3px 6px; font-size: 10px; font-weight: 700; }
.deco-row-top { display: flex; align-items: center; gap: 4px; }
.deco-row-top .chip { padding: 3px 7px; font-size: 10.5px; }
.deco-input {
  flex: 1; min-width: 0;
  font-size: 11.5px; padding: 4px 7px; border-radius: 6px;
  border: 1px solid var(--line); background: #fff;
}
.deco-input:focus { border-color: var(--accent); outline: 0; }
.deco-up {
  flex: 0 0 auto; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 5px; background: #fff;
  font-size: 10px; color: var(--text-2); cursor: pointer;
}
.deco-up:hover { border-color: var(--accent); color: var(--accent); }
.deco-del {
  flex: 0 0 auto; width: 20px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); cursor: pointer; font-size: 13px; border-radius: 5px;
}
.deco-del:hover { color: #e5484d; background: #fdf0f0; }

.deco-row-knobs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 5px;
  margin-top: 5px;
}
.knob {
  min-width: 0;
  display: flex; align-items: center; gap: 3px;
  font-size: 9px; color: var(--text-3);
}
.knob span { flex: 0 0 auto; }
.knob input { flex: 1; min-width: 0; height: 2px; }
.knob b {
  flex: 0 0 auto; min-width: 13px; text-align: right;
  font-weight: 500; font-variant-numeric: tabular-nums;
}
.knob.num input {
  flex: 1; min-width: 0; height: auto;
  padding: 2px 3px; border: 1px solid var(--line); border-radius: 5px;
  font: inherit; font-size: 10px; text-align: right; box-sizing: border-box;
  -moz-appearance: textfield;
}
.knob.num input::-webkit-inner-spin-button,
.knob.num input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* 预览区里的自由装饰：可拖拽 */
#phone [data-deco-idx] { cursor: move; touch-action: none; user-select: none; -webkit-user-drag: none; }
#phone [data-deco-idx] img { -webkit-user-drag: none; pointer-events: none; }
#phone [data-deco-idx].dragging { outline: 1px dashed var(--accent); opacity: .85; }

.add-deco {
  width: 100%; margin-top: 6px; padding: 7px;
  border: 1px dashed var(--line); border-radius: 7px;
  background: #fff; font: inherit; font-size: 11.5px;
  color: var(--text-2); cursor: pointer; transition: .13s;
}
.add-deco:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------------- 标题素材网格 ---------------- */
.deco-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}
.deco-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 5px 4px;
  cursor: pointer;
  background: #fff;
  overflow: hidden;
  transition: .13s;
}
.deco-card:hover { border-color: #c3c9d2; transform: translateY(-1px); }
.deco-card.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgba(43, 108, 246, .12);
}
.deco-prev {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  pointer-events: none;
}
.deco-prev > * { margin: 0 !important; }
.deco-prev section, .deco-prev span { max-width: 100%; }
.deco-name {
  display: block;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--text-3);
  text-align: center;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deco-card.on .deco-name { color: var(--accent); font-weight: 600; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 14px);
  background: #14161a; color: #fff; font-size: 12.5px;
  padding: 10px 20px; border-radius: 9px;
  opacity: 0; pointer-events: none; transition: .22s; z-index: 99;
  box-shadow: 0 8px 30px rgba(0,0,0,.24);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #d4d8de; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #bcc2cb; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* =========================================================
   文稿库 / 素材库 / 发布检查
   ========================================================= */
.btn.compact { padding: 7px 11px; font-size: 12px; }
.btn.sm { padding: 6px 11px; font-size: 11.5px; border-radius: 7px; }
.badge {
  display: inline-block; min-width: 16px; margin-left: 5px; padding: 1px 5px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 10px; font-weight: 600; line-height: 14px; text-align: center;
}

.pane-title {
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--text); text-transform: none;
  letter-spacing: 0;
}
.pane-hint {
  font-style: normal; font-weight: 400; font-size: 10px; letter-spacing: 0;
  color: var(--text-3); margin-left: 8px; text-transform: none;
}

/* 点正文，跳样式 */
#paper [data-style-group], #titlecard[data-style-group] { cursor: pointer; }
#paper [data-style-group]:hover { outline: 1px dashed rgba(43, 108, 246, .38); outline-offset: 3px; border-radius: 3px; }
.group.flash { border-color: var(--accent); animation: groupFlash 1s ease; }
@keyframes groupFlash {
  0% { box-shadow: 0 0 0 3px rgba(43, 108, 246, .26); }
  100% { box-shadow: 0 0 0 0 rgba(43, 108, 246, 0); }
}
.pick-flash { animation: pickFlash .9s ease; }
@keyframes pickFlash {
  0% { background: rgba(43, 108, 246, .12); }
  100% { background: transparent; }
}

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(16, 19, 26, .4);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: none;
}
.modal-mask.on { display: flex; }
.modal {
  width: min(790px, calc(100vw - 40px));
  max-height: min(84vh, 760px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 14px;
  box-shadow: 0 30px 90px rgba(10, 14, 22, .32);
  animation: modalIn .18s ease;
  overflow: hidden;
}
@keyframes modalIn {
  from { transform: translateY(9px) scale(.99); }
  to { transform: none; }
}

.modal-head {
  flex: 0 0 56px; display: flex; align-items: center; gap: 12px;
  padding: 0 16px 0 20px; border-bottom: 1px solid var(--line-2);
}
.modal-head-main { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.modal-head-main > span:first-child { font-size: 15px; font-weight: 650; white-space: nowrap; }
.modal-sub { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-x {
  margin-left: auto; flex: 0 0 auto; width: 28px; height: 28px; border: 0;
  border-radius: 8px; background: transparent; color: var(--text-3);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.modal-x:hover { background: #f3f4f6; color: var(--text); }

.modal-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 20px 18px; min-height: 120px; }
.modal-foot {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 12px 20px; border-top: 1px solid var(--line-2); background: #fcfcfd;
}
.foot-note { margin-right: auto; font-size: 11px; color: var(--text-3); }

/* ---------------- 文稿库 ---------------- */
.doc-tools { display: flex; gap: 8px; align-items: center; }
.doc-tools input[type=search] {
  flex: 1; font: inherit; font-size: 12.5px; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: 8px; outline: 0;
}
.doc-tools input[type=search]:focus { border-color: var(--accent); }

.doc-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.doc-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px;
  cursor: pointer; transition: .13s; background: #fff;
}
.doc-item:hover { border-color: #c9cfd8; background: #fcfcfd; }
.doc-item.on { border-color: var(--accent); background: var(--accent-soft); }
.doc-main { flex: 1; min-width: 0; }
.doc-title {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-radius: 4px; padding: 1px 3px; margin-left: -3px; outline: 0;
}
.doc-title[contenteditable]:focus { background: #fff; box-shadow: 0 0 0 2px rgba(43, 108, 246, .18); }
.doc-meta { font-size: 10.5px; color: var(--text-3); margin-top: 3px; }
.doc-item.on .doc-meta { color: #7b8fc4; }
.doc-acts { display: flex; gap: 3px; opacity: 0; transition: .13s; flex: 0 0 auto; }
.doc-item:hover .doc-acts, .doc-item.on .doc-acts { opacity: 1; }
@media (hover: none) { .doc-acts { opacity: 1; } }
.doc-acts button {
  font: inherit; font-size: 10.5px; color: var(--text-3);
  border: 1px solid transparent; background: transparent; border-radius: 5px;
  padding: 3px 6px; cursor: pointer;
}
.doc-acts button:hover { border-color: var(--line); background: #fff; color: var(--text); }
.doc-acts button.danger:hover { border-color: #f3c9c9; color: #d33; background: #fdf1f1; }

.doc-empty { padding: 28px 0; text-align: center; font-size: 12px; color: var(--text-3); }

/* ---------------- 素材库 ---------------- */
.tabs {
  display: inline-flex; gap: 3px; padding: 3px;
  background: #f1f2f5; border-radius: 9px; margin-bottom: 14px;
}
.tab {
  font-size: 12px; padding: 5px 13px; border-radius: 7px;
  color: var(--text-2); cursor: pointer; transition: .13s;
}
.tab.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.snip-new, .style-new {
  border: 1px dashed var(--line); border-radius: 10px;
  padding: 10px; margin-bottom: 14px; background: #fcfcfd;
}
.snip-new input, .style-new input {
  width: 100%; font: inherit; font-size: 12px; padding: 6px 9px;
  border: 1px solid var(--line); border-radius: 7px; outline: 0; background: #fff;
}
.snip-new textarea {
  width: 100%; min-height: 82px; margin-top: 7px; padding: 8px 9px; resize: vertical;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 12px; line-height: 1.7; color: #33383f;
  border: 1px solid var(--line); border-radius: 7px; outline: 0; background: #fff;
}
.snip-new input:focus, .snip-new textarea:focus, .style-new input:focus { border-color: var(--accent); }
.snip-actions, .style-new { display: flex; align-items: center; gap: 8px; }
.snip-actions { justify-content: flex-end; margin-top: 8px; }
.style-new input { flex: 1; }

.snip-list, .style-list { display: flex; flex-direction: column; gap: 6px; }
.snip-item, .style-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 9px;
}
.snip-item:hover, .style-item:hover { border-color: #c9cfd8; }
.snip-main, .style-main { flex: 1; min-width: 0; }
.snip-title { font-size: 12.5px; font-weight: 600; }
.snip-prev {
  font-size: 10.5px; color: var(--text-3); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.snip-acts, .style-acts { display: flex; gap: 4px; flex: 0 0 auto; }
.style-dot { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; }
.style-meta { font-size: 10.5px; color: var(--text-3); margin-top: 3px; }

/* ---------------- 发布检查 ---------------- */
.pf-metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px; margin-bottom: 4px;
}
.pf-metric {
  border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 11px; background: #fbfbfc;
}
.pf-metric b { display: block; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.pf-metric span { font-size: 10.5px; color: var(--text-3); }
.pf-metric.warn b { color: #b7791f; }
.pf-metric.bad b { color: #d33; }
.pf-metric.ok b { color: #0f9d58; }

.pf-group {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  letter-spacing: .4px; margin: 18px 0 7px;
}
.pf-row {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 10px; margin-bottom: 6px;
  border: 1px solid var(--line-2); border-radius: 9px; background: #fff;
}
.pf-icon {
  flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 10.5px; font-weight: 700;
}
.pf-row.ok .pf-icon { background: #e8f6ee; color: #0f9d58; }
.pf-row.warn .pf-icon { background: #fff5e6; color: #b7791f; }
.pf-row.bad .pf-icon { background: #fdecec; color: #d33; }
.pf-row.info .pf-icon { background: #eef3ff; color: #2b6cf6; }
.pf-main { flex: 1; min-width: 0; }
.pf-t { font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.pf-d { font-size: 11px; line-height: 1.65; color: var(--text-2); margin-top: 2px; word-break: break-word; }
.pf-d code {
  font-family: "SFMono-Regular", Consolas, monospace; font-size: 10.5px;
  background: #f2f3f5; border-radius: 3px; padding: 0 3px;
}
.pf-row .btn { flex: 0 0 auto; align-self: center; margin-left: 4px; }

.pf-imgs { display: flex; flex-direction: column; gap: 7px; margin: 0 0 8px; }
.pf-img {
  display: flex; gap: 10px; align-items: center;
  padding: 8px; border: 1px dashed var(--line); border-radius: 9px; background: #fcfcfd;
}
.pf-img > img {
  flex: 0 0 76px; width: 76px; height: 58px; object-fit: cover;
  border-radius: 6px; background: #eef0f3; border: 1px solid var(--line-2);
}
.pf-img-main { flex: 1; min-width: 0; }
.pf-img-name { font-size: 11px; color: var(--text-2); margin-bottom: 5px; }
.pf-img-row { display: flex; gap: 6px; }
.pf-img-row input {
  flex: 1; min-width: 0; font: inherit; font-size: 11.5px;
  padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; outline: 0;
}
.pf-img-row input:focus { border-color: var(--accent); }

@media (max-width: 1180px) {
  .pane-md { flex-basis: 260px; }
  .pane-style { flex-basis: 270px; }
  .brand { min-width: auto; }
  .sub { display: none; }
  .btn.compact { padding: 6px 8px; }
  .actions { gap: 5px; }
}

@media (max-width: 860px) {
  .pane-title { max-width: 110px; }
  .pf-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { gap: 10px; padding: 0 10px; }
  .brand > div { display: none; }
}
