/* 如知AI · 内容发布助手工作台界面示意（静态复刻插件 home 工作台）
   全部 .pm-* 前缀，只在多平台内容同步助手 / 发布插件 / 使用导览三个页面加载。
   视觉刻意保留插件本体的圆角 + 中性灰风格，外层用站点的 1px 线框语言包裹。 */

.pm {
  --pm-ink: #111827;
  --pm-ink-2: #374151;
  --pm-muted: #6b7280;
  --pm-faint: #9ca3af;
  --pm-line: #e5e7eb;
  --pm-line-strong: #d1d5db;
  --pm-surface: #ffffff;
  --pm-surface-soft: #f9fafb;
  --pm-soft: #f3f4f6;
  --pm-blue: #2563eb;
  --pm-blue-soft: #eff6ff;
  --pm-green: #16a34a;
  font-family: var(--rz-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  color: var(--pm-ink);
}
.pm *, .pm *::before, .pm *::after { box-sizing: border-box; }
/* 站点全局没有按钮 reset，这里先把浏览器默认样式清掉，再由各组件按需加边框 */
.pm button { margin: 0; padding: 0; border: none; background: transparent; color: inherit; font: inherit; }

/* ---------- 外框：浏览器窗口 ---------- */
.pm-shell { padding: clamp(1.5rem, 3vw, 2.75rem) 0 0; }
/* 作为落地页首屏时要让开固定站点导航 */
.pm-shell--hero { padding-top: clamp(6.5rem, 9vw, 8.5rem); }
.pm-window {
  border: 1px solid var(--rz-line, #d8d8d4);
  background: var(--pm-surface);
  box-shadow: var(--rz-shadow, 0 18px 40px rgba(15, 23, 42, 0.1));
  overflow: hidden;
}
.pm-window-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--pm-line);
  background: var(--pm-soft);
}
.pm-dots { display: inline-flex; gap: 0.35rem; flex-shrink: 0; }
.pm-dots i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--pm-line-strong); }
.pm-window-url {
  flex: 1;
  min-width: 0;
  font-family: var(--rz-mono, ui-monospace, Menlo, monospace);
  font-size: 0.72rem;
  color: var(--pm-muted);
  background: var(--pm-surface);
  border: 1px solid var(--pm-line);
  border-radius: 999px;
  padding: 0.22rem 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-window-tag {
  flex-shrink: 0;
  font-family: var(--rz-mono, ui-monospace, Menlo, monospace);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pm-faint);
}

/* ---------- 应用区 ---------- */
.pm-app {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(1.75rem, 3.4vw, 2.6rem) clamp(1rem, 2.6vw, 1.5rem) clamp(2rem, 3.4vw, 2.75rem);
}

.pm-hero { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 1.75rem; }
.pm-logo { width: 3.5rem; height: 3.5rem; margin-bottom: 0.75rem; display: block; }
.pm-app-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 2.6vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--pm-ink);
}
.pm-app-sub { margin: 0; font-size: 0.9375rem; line-height: 1.7; color: var(--pm-muted); max-width: 60ch; }
.pm-app-sub b { color: var(--pm-ink-2); font-weight: 600; }

/* ---------- Tabs ---------- */
.pm-tabs { display: flex; gap: 0.25rem; padding: 0.25rem; background: var(--pm-soft); border-radius: 0.625rem; }
.pm-tab {
  flex: 1;
  padding: 0.625rem 1rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: center;
  color: var(--pm-ink-2);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.pm-tab:hover { color: var(--pm-ink); }
.pm-tab.is-active { background: var(--pm-surface); color: var(--pm-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.pm-hint { font-size: 0.8125rem; color: var(--pm-faint); text-align: center; margin: 0.625rem 0 1.25rem; }

/* ---------- 编辑区 ---------- */
.pm-editor {
  background: var(--pm-surface);
  border: 1px solid var(--pm-line);
  border-radius: 0.875rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.pm-pane { display: none; flex-direction: column; gap: 0.875rem; }
.pm-pane.is-active { display: flex; }

.pm-field {
  width: 100%;
  border: 1px solid var(--pm-line-strong);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--pm-ink);
  background: var(--pm-surface);
}
.pm-field::placeholder { color: var(--pm-faint); }
.pm-field:focus { outline: 2px solid var(--pm-blue); outline-offset: -1px; }
.pm-field--area { resize: vertical; min-height: 13rem; line-height: 1.7; }
.pm-field--area-sm { min-height: 7rem; }

.pm-drop {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.6rem 1rem;
  border: 1.5px dashed var(--pm-line-strong);
  border-radius: 0.625rem;
  background: #fafafa;
  color: var(--pm-muted);
  font: inherit;
  font-size: 0.8125rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.pm-drop:hover { border-color: var(--pm-faint); color: var(--pm-ink-2); }
.pm-drop svg { width: 1.75rem; height: 1.75rem; }
.pm-drop-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 640px) { .pm-drop-row { grid-template-columns: 1fr; } }

.pm-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 0.5rem; }
.pm-thumb {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--pm-line);
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--pm-faint);
}
.pm-thumb--add { background: #fafafa; border-style: dashed; font-size: 1.1rem; }

.pm-publish-row { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; flex-wrap: wrap; margin-top: 0.25rem; }
.pm-publish-hint { font-size: 0.8125rem; color: var(--pm-faint); }
.pm-publish-hint.is-ready { color: var(--pm-green); }
.pm-publish-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2.25rem;
  border: none;
  border-radius: 0.625rem;
  background: var(--pm-faint);
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: default;
  transition: background 0.15s ease;
}
.pm-publish-btn.is-ready { background: var(--pm-ink); cursor: pointer; }
.pm-publish-btn svg { width: 1rem; height: 1rem; }

/* ---------- 平台区 ---------- */
.pm-platforms { margin-top: 1.75rem; }
.pm-platforms-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.875rem; }
.pm-select-all { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; font-weight: 600; cursor: pointer; }
.pm-select-all.is-selected .pm-check { background: var(--pm-blue); border-color: var(--pm-blue); }
.pm-select-all.is-selected .pm-check svg { opacity: 1; }
.pm-tools { display: flex; align-items: center; gap: 1rem; }

.pm-region { display: inline-flex; align-items: center; gap: 0.5rem; border: none; background: transparent; padding: 0; font: inherit; cursor: pointer; }
.pm-region-label { font-size: 0.8125rem; font-weight: 600; color: var(--pm-ink); transition: color 0.15s ease; }
.pm-region-label.is-dim { color: var(--pm-faint); font-weight: 400; }
.pm-region-track { position: relative; width: 2.25rem; height: 1.25rem; border-radius: 999px; background: var(--pm-line-strong); transition: background 0.15s ease; flex-shrink: 0; }
.pm-region-track.is-on { background: var(--pm-blue); }
.pm-region-knob { position: absolute; top: 0.125rem; left: 0.125rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.15s ease; }
.pm-region-track.is-on .pm-region-knob { transform: translateX(1rem); }

.pm-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--pm-line);
  border-radius: 0.5rem;
  background: var(--pm-surface);
  color: var(--pm-ink-2);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}
.pm-refresh:hover { background: var(--pm-surface-soft); }
.pm-refresh svg { width: 0.875rem; height: 0.875rem; }
.pm-refresh.is-busy svg { animation: pm-spin 0.8s linear infinite; }
@keyframes pm-spin { to { transform: rotate(360deg); } }

.pm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.375rem 1.5rem; }
@media (max-width: 900px) { .pm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pm-grid { grid-template-columns: 1fr; } }
.pm-group { display: none; }
.pm-group.is-active { display: grid; }

.pm-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  min-width: 0;
  cursor: pointer;
  background: transparent;
  border: none;
  font: inherit;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease;
}
.pm-row:hover { background: var(--pm-surface-soft); }
.pm-row.is-selected { background: var(--pm-blue-soft); }
.pm-row.is-off { cursor: default; }
.pm-row.is-off .pm-name { color: var(--pm-faint); }

.pm-check {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--pm-line-strong);
  border-radius: 0.2rem;
  background: var(--pm-surface);
  display: grid;
  place-items: center;
}
.pm-check svg { width: 0.7rem; height: 0.7rem; color: #fff; opacity: 0; }
.pm-row.is-selected .pm-check { background: var(--pm-blue); border-color: var(--pm-blue); }
.pm-row.is-selected .pm-check svg { opacity: 1; }
.pm-row.is-off .pm-check { background: var(--pm-soft); }

.pm-icon {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--pm-brand, #9ca3af);
}
.pm-name { font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.pm-account { font-size: 0.75rem; color: var(--pm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pm-account.is-on { color: var(--pm-green); }
.pm-spacer { flex: 1; min-width: 0.25rem; }
.pm-link { flex-shrink: 0; font-size: 0.75rem; color: var(--pm-faint); }
.pm-row:hover .pm-link { color: var(--pm-blue); }

.pm-note {
  margin: 0.9rem 0 0;
  font-family: var(--rz-mono, ui-monospace, Menlo, monospace);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--rz-faint, #8a8a84);
}

/* ---------- 导览页：局部放大卡片 ---------- */
.pm-zoom {
  background: var(--pm-surface);
  border: 1px solid var(--pm-line);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
}
.pm-zoom .pm-grid { grid-template-columns: 1fr; }
.pm-zoom .pm-tabs { margin-bottom: 0; }
