/* 微信公众号图文编辑器 — 独立样式，不依赖 Tailwind */
:root {
  --we-p: #14532d;
  --we-a: #d6a12a;
  --we-bg: #f0f4f1;
  --we-bd: #d8eadf;
  --we-bar: #1a4d2e;
  --site-header-height: var(--site-nav-h, 72px);
  --editor-toolbar-height: 56px;
}
@media (max-width: 768px) {
  :root {
    --site-header-height: var(--site-nav-h, 64px);
  }
}
body.we-page.with-unified-nav {
  padding-top: var(--site-header-height);
  box-sizing: border-box;
  min-height: 100vh;
}
.we-page {
  min-height: 100vh;
  background: var(--we-bg);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #333;
  overflow-x: hidden;
  box-sizing: border-box;
}
.we-editor-shell {
  position: relative;
  top: auto;
  min-height: calc(100vh - var(--site-header-height));
  box-sizing: border-box;
}
.we-sticky-stack {
  position: sticky;
  top: var(--site-header-height);
  z-index: 900;
  background: var(--we-bg);
  padding-bottom: 2px;
  margin: 0 0 4px;
}
.we-app-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--we-bd);
}
.we-back-tools {
  flex: 0 0 auto;
  color: var(--we-p);
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.we-back-tools:hover {
  text-decoration: underline;
}
.we-article-title-input {
  flex: 1 1 220px;
  min-width: 0;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--we-bd);
  border-radius: 10px;
  box-sizing: border-box;
}
.we-topbar {
  position: relative;
  top: auto;
  z-index: 0;
  background: var(--we-bar);
  color: #fff;
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.we-topbar .we-brand {
  font-weight: 700;
  font-size: 15px;
  margin-right: 8px;
}
.we-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.we-tb-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  min-height: 34px;
}
.we-tb-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}
.we-tb-btn:active {
  transform: scale(0.98);
}
.we-tb-btn.we-primary {
  background: var(--we-a);
  border-color: #c9962a;
  color: #1a1a1a;
  font-weight: 600;
}
.we-tb-more-wrap {
  position: relative;
}
.we-tb-more {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #fff;
  color: #333;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  padding: 8px;
  min-width: 160px;
  z-index: 60;
}
.we-tb-more-wrap.open .we-tb-more {
  display: block;
}
.we-tb-more button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.we-tb-more button:hover {
  background: #f0faf4;
}
.wx-editor-pro {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 8px 24px;
  box-sizing: border-box;
}
.we-layout {
  display: grid;
  grid-template-columns: 220px minmax(360px, 1fr) minmax(280px, 380px) minmax(260px, 320px);
  gap: 14px;
  align-items: start;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  min-height: calc(100vh - var(--site-header-height) - 120px);
}
.we-left {
  background: #fff;
  border-right: 1px solid var(--we-bd);
  display: flex;
  flex-direction: column;
  min-height: 400px;
}
.we-left-tabs {
  display: flex;
  border-bottom: 1px solid var(--we-bd);
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.we-left-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 3px;
  border: none;
  background: #f8faf9;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: #555;
  line-height: 1.25;
}
.we-left-tab.active {
  background: #fff;
  color: var(--we-p);
  box-shadow: inset 0 -2px 0 var(--we-p);
}
.we-comp-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid #eee;
}
.we-comp-cat {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fafafa;
  cursor: pointer;
}
.we-comp-cat.active {
  border-color: var(--we-p);
  background: #e8f5ec;
  color: var(--we-p);
  font-weight: 600;
}
.we-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  max-height: calc(100vh - var(--site-header-height) - 200px);
}
.we-side-hint {
  font-size: 12px;
  color: #666;
  margin: 0 0 10px;
  line-height: 1.5;
}
.we-my-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--we-bd);
}
.we-my-block-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--we-p);
  margin-bottom: 6px;
}
.we-my-hint {
  font-size: 12px;
  color: #888;
  margin: 0 0 8px;
  line-height: 1.45;
}
.we-prod-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--we-bd);
  border-radius: 10px;
  background: #fafcfa;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  box-sizing: border-box;
}
.we-prod-row:hover {
  border-color: var(--we-p);
}
.we-prod-row small {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}
.we-draft-quick-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px;
  margin-bottom: 6px;
  border: 1px solid var(--we-bd);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  box-sizing: border-box;
}
.we-draft-quick-row:hover {
  border-color: var(--we-p);
}
.we-draft-all-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--we-bd);
  background: #f8faf9;
  color: var(--we-p);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.we-draft-all-btn:hover {
  background: #e8f5ec;
}
.we-tpl-item,
.we-comp-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--we-bd);
  border-radius: 10px;
  background: #fafcfa;
  cursor: pointer;
  font-size: 13px;
}
.we-tpl-item:hover,
.we-comp-item:hover {
  border-color: var(--we-p);
}
.we-tpl-name {
  display: block;
  font-weight: 600;
  color: var(--we-p);
}
.we-tpl-cat {
  font-size: 11px;
  color: #888;
}
.we-tpl-card {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 10px 8px;
  border: 1px solid var(--we-bd);
  border-radius: 12px;
  background: #fafcfa;
  box-sizing: border-box;
}
.we-tpl-card__hd {
  cursor: pointer;
  text-align: left;
}
.we-tpl-card__hd:hover .we-tpl-name {
  text-decoration: underline;
}
.we-tpl-desc {
  display: block;
  font-size: 12px;
  color: #666;
  margin-top: 4px;
  line-height: 1.45;
}
.we-tpl-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.we-tpl-insert,
.we-tpl-replace-full {
  flex: 1 1 auto;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--we-bd);
}
.we-tpl-insert {
  background: var(--we-p);
  color: #fff;
  border-color: var(--we-p);
}
.we-tpl-insert:hover {
  filter: brightness(1.05);
}
.we-tpl-replace-full {
  background: #fff;
  color: #b45309;
  border-color: #fcd34d;
}
.we-tpl-replace-full:hover {
  background: #fffbeb;
}
.we-modal-box--sm {
  max-width: 400px;
}
.we-confirm-text {
  margin: 0 0 16px;
  line-height: 1.65;
  color: #444;
  font-size: 14px;
}
.we-color-swatch-title {
  font-size: 12px;
  color: #666;
  margin: 10px 0 6px;
}
.we-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.we-swatch {
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
}
.we-swatch:hover {
  transform: scale(1.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.we-color-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.we-color-row label {
  font-size: 13px;
  color: #555;
}
.wx-rt-input {
  width: 120px;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #cfe7d8;
  box-sizing: border-box;
}
.wx-rt-num {
  width: 56px;
  font-size: 14px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid #cfe7d8;
  box-sizing: border-box;
}
.wx-rt-btn--xs {
  padding: 4px 8px !important;
  font-size: 12px !important;
  min-height: 32px !important;
}
.wx-rt-mini-btns {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.we-center {
  padding: 12px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}
.we-mode-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 14px 10px;
  width: calc(100% - 28px);
  max-width: min(960px, 100%);
  box-sizing: border-box;
}
.we-mode-tab {
  flex: 0 1 auto;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--we-bd);
  border-radius: 10px;
  background: #fafcfa;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #555;
}
.we-mode-tab.active {
  border-color: var(--we-p);
  background: #e8f5ec;
  color: var(--we-p);
}
.we-mode-html-tools {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 14px 8px;
  width: calc(100% - 28px);
  max-width: min(960px, 100%);
  box-sizing: border-box;
}
.we-html-tool {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  color: #333;
}
.we-mode-panels {
  width: 100%;
  max-width: min(720px, 100%);
  margin: 0 auto;
}
.we-mode-panel {
  width: 100%;
}
.we-html-source {
  width: 100%;
  min-height: 420px;
  box-sizing: border-box;
  padding: 12px;
  font-family: ui-monospace, Consolas, 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid var(--we-bd);
  border-radius: 12px;
  resize: vertical;
}
.we-html-err {
  margin: 8px 0 0;
  padding: 10px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  color: #9b2c2c;
  font-size: 13px;
  border-radius: 8px;
}
.we-mode-bar-hint {
  flex: 1 1 200px;
  font-size: 12px;
  color: #777;
  align-self: center;
  line-height: 1.35;
  min-width: 0;
}
.we-preview-column {
  background: #fff;
  border: 1px solid var(--we-bd);
  border-radius: 12px;
  padding: 10px 10px 12px;
  position: sticky;
  top: calc(var(--site-header-height, 56px) + 8px);
  max-height: calc(100vh - var(--site-header-height, 56px) - 24px);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.we-preview-column-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--we-p);
  margin: 0 0 8px;
}
.we-preview-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.we-preview-tab {
  flex: 1;
  min-width: 72px;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid var(--we-bd);
  background: #fafcfa;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
}
.we-preview-tab.active {
  border-color: var(--we-p);
  background: #e8f5ec;
  color: var(--we-p);
}
.we-preview-panel-host {
  flex: 1;
  min-height: 200px;
  overflow: auto;
}
.we-preview-frame.we-preview--live .we-preview-inner {
  max-width: 677px;
}
.we-preview-frame {
  background: #e8e8e8;
  border-radius: 12px;
  border: 1px solid var(--we-bd);
  padding: 12px 8px;
  min-height: 420px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.we-preview-inner {
  width: 100%;
  max-width: 375px;
  margin: 0 auto;
  background: #fff;
  padding: 18px 16px 28px;
  min-height: 360px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  font-size: 16px;
  line-height: 1.75;
  color: #333;
  box-sizing: border-box;
}
.we-preview-frame.we-preview--phone .we-preview-inner {
  max-width: 375px;
}
.we-preview-frame.we-preview--wechat .we-preview-inner {
  max-width: 677px;
}
@media (min-width: 1025px) {
  .we-preview-frame.we-preview--wechat .we-preview-inner {
    max-width: 677px;
  }
}
.we-ai-panel {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--we-bd);
  flex-shrink: 0;
}
.we-ai-hint {
  font-size: 12px;
  color: #666;
  margin: 0 0 8px;
  line-height: 1.5;
}
.we-ai-label {
  font-size: 12px;
  color: #555;
  display: block;
  margin-bottom: 4px;
}
.we-ai-ta {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}
.we-ai-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.we-ai-btn {
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid var(--we-bd);
  background: #f8faf9;
  cursor: pointer;
  color: var(--we-p);
}
.we-ai-btn:active {
  opacity: 0.85;
}
.we-ai-out {
  margin: 10px 0 0;
  padding: 8px;
  background: #f4f4f5;
  border-radius: 8px;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow: auto;
}
.we-ai-mobile {
  display: none;
  width: 100%;
  max-width: min(720px, 100%);
  margin: 0 auto 8px;
}
.we-canvas-wrap {
  width: 677px;
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--we-bd);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  min-height: 800px;
  box-sizing: border-box;
}
.we-canvas {
  min-height: 760px;
  padding: 32px;
  outline: none;
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}
.we-canvas:empty:before {
  content: "在这里输入或粘贴公众号文章内容，也可以从左侧选择农业模板快速生成。";
  color: #aaa;
  font-size: 15px;
}
.we-mod.we-mod-selected {
  outline: 2px solid var(--we-a);
  outline-offset: 2px;
}
.we-right {
  background: #fff;
  border: 1px solid var(--we-bd);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - var(--site-header-height) - 120px);
  position: sticky;
  top: calc(var(--site-header-height, 72px) + 118px);
  align-self: start;
  overflow: hidden;
}
.we-right-drawer-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--we-bd);
  background: linear-gradient(180deg, #fafcfa 0%, #f0f6f2 100%);
  flex-shrink: 0;
}
.we-right-drawer-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--we-p);
}
.we-right-drawer-close {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--we-bd);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  cursor: pointer;
}
.we-editor-drawer-backdrop {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: var(--site-header-height, 64px);
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.42);
  z-index: 44;
  -webkit-tap-highlight-color: transparent;
}
body.we-editor-drawer-open .we-editor-drawer-backdrop {
  display: block;
}
@media (min-width: 1025px) {
  .we-right-drawer-head {
    display: none !important;
  }
}
.we-right-tabs-wrap {
  flex-shrink: 0;
  border-bottom: 1px solid var(--we-bd);
  background: #fafcfa;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.we-right-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 8px 8px 6px;
  min-width: min-content;
}
.we-right-main-tab {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid var(--we-bd);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
  min-height: 40px;
}
.we-right-main-tab:hover {
  border-color: var(--we-p);
  color: var(--we-p);
}
.we-right-main-tab.active {
  border-color: var(--we-p);
  background: #e8f5ec;
  color: var(--we-p);
  box-shadow: inset 0 -2px 0 var(--we-p);
}
.we-right-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.we-right-tab-panel {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.we-right-tab-panel.active {
  display: flex;
}
.we-preview-panel-host--right {
  flex: 1;
  min-height: 200px;
  overflow: auto;
  padding: 8px;
  -webkit-overflow-scrolling: touch;
}
.we-right .we-ai-panel {
  border-bottom: none;
  flex: 1;
  overflow: auto;
  min-height: 0;
}
.we-right .we-prop-body {
  max-height: none;
  flex: 1;
  min-height: 120px;
}
.we-assets-placeholder {
  padding: 14px;
  border: 1px dashed var(--we-bd);
  border-radius: 10px;
  font-size: 13px;
  color: #666;
  line-height: 1.55;
  background: #fafcfa;
}
.we-preview-mobile-host {
  display: none;
  width: 100%;
  max-width: min(720px, 100%);
  margin: 0 auto 12px;
  background: #fff;
  border: 1px solid var(--we-bd);
  border-radius: 12px;
  padding: 10px 10px 12px;
  box-sizing: border-box;
}
.we-preview-mobile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.we-preview-mobile-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--we-p);
}
.we-preview-tabs--mobile {
  margin-bottom: 0;
  flex: 1 1 auto;
}
.wx-editor-main {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 8px minmax(220px, 1fr);
  gap: 0 0;
  width: 100%;
  min-width: 0;
  align-items: stretch;
}
.wx-editor-main.wx-code-collapsed {
  grid-template-columns: 1fr;
}
.wx-editor-main.wx-code-collapsed .wx-split-gutter,
.wx-editor-main.wx-code-collapsed .wx-code-panel {
  display: none !important;
}
.wx-split-gutter {
  cursor: col-resize;
  background: linear-gradient(180deg, #e2e8ec 0%, #cfd8e3 50%, #e2e8ec 100%);
  border-radius: 4px;
  margin: 8px 0;
  touch-action: none;
  flex-shrink: 0;
}
.wx-split-gutter:hover {
  background: linear-gradient(180deg, #cfe7d8 0%, #a8d4b8 50%, #cfe7d8 100%);
}
.wx-split-gutter:active {
  background: var(--we-p);
}
.we-prop-head {
  padding: 12px 14px;
  font-weight: 700;
  color: var(--we-p);
  border-bottom: 1px solid var(--we-bd);
}
.we-prop-body {
  padding: 12px 14px 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 160px;
  max-height: calc(100vh - var(--site-header-height) - 320px);
}
.we-prop-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--we-p);
  margin: 14px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}
.we-prop-section-title:first-child {
  margin-top: 0;
}
.we-prop-body input[type="text"],
.we-prop-body input[type="url"],
.we-prop-body input[type="number"],
.we-prop-body textarea,
.we-prop-body select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.we-prop-body input[type="color"] {
  width: 100%;
  min-height: 40px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #ddd;
}
.we-prop-empty {
  color: #888;
  font-size: 13px;
  line-height: 1.6;
}
.we-prop-group {
  margin-bottom: 16px;
}
.we-prop-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
  font-weight: 600;
}
.we-btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  margin: 0 4px 6px 0;
}
.we-statbar {
  max-width: min(720px, 100%);
  width: 100%;
  margin-top: 10px;
  font-size: 12px;
  color: #666;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.we-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--we-bar);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  z-index: 1280;
  max-width: 92vw;
  text-align: center;
  transition: 0.25s;
}
.we-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.we-toast-err {
  background: #c53030;
}
.we-mobile-bar {
  display: none;
}
.we-sheet {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1250;
  align-items: flex-end;
  justify-content: center;
}
.we-sheet.open {
  display: flex;
}
.we-sheet-panel {
  background: #fff;
  width: 100%;
  max-height: 72vh;
  border-radius: 16px 16px 0 0;
  padding: 14px;
  overflow: auto;
}
.we-sheet-close {
  float: right;
  border: none;
  background: #eee;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
}
.we-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1260;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.we-modal.open {
  display: flex;
}
.we-modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
}
.we-modal-wide {
  max-width: min(720px, 96vw);
}
.we-save-hint,
#weSaveState {
  font-size: 11px;
  color: #888;
  margin-left: auto;
}
.we-draft-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.we-draft-search {
  flex: 1;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}
.we-draft-select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 13px;
  max-width: 140px;
}
.we-draft-list {
  max-height: 52vh;
  overflow-y: auto;
  border: 1px solid var(--we-bd);
  border-radius: 10px;
  background: #fafcfa;
}
.we-draft-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}
.we-draft-row:last-child {
  border-bottom: none;
}
.we-draft-title {
  flex: 1;
  min-width: 140px;
  font-weight: 600;
  color: var(--we-p);
}
.we-draft-meta {
  font-size: 11px;
  color: #888;
  width: 100%;
}
.we-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.we-draft-actions button {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}
.we-draft-actions button:hover {
  border-color: var(--we-p);
  color: var(--we-p);
}
.we-import-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.we-import-mode {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fafafa;
  cursor: pointer;
}
.we-import-mode.active {
  border-color: var(--we-p);
  background: #e8f5ec;
  color: var(--we-p);
  font-weight: 600;
}
.we-import-hint {
  font-size: 12px;
  color: #666;
  margin: 0 0 8px;
  line-height: 1.5;
}
.we-import-ta {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  font-family: ui-monospace, monospace;
  resize: vertical;
  min-height: 120px;
}
.we-import-site {
  margin: 10px 0;
  padding: 10px;
  background: #f6faf7;
  border-radius: 8px;
  font-size: 13px;
}
.we-import-site select {
  margin: 4px 4px 4px 0;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  max-width: 100%;
}
.we-import-actions {
  flex-wrap: wrap;
}
.we-my-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--we-bd);
  border-radius: 8px;
  background: #fafcfa;
  font-size: 13px;
}
.we-my-row button {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}
.we-my-name {
  flex: 1;
  cursor: pointer;
  color: var(--we-p);
  font-weight: 600;
  text-align: left;
  border: none;
  background: none;
  font-size: 13px;
}
.we-prop-row input[type="text"],
.we-prop-row input[type="url"] {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}
.we-prop-row {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  color: #444;
}
.we-prop-unit {
  font-size: 11px;
  color: #888;
  margin-left: 4px;
}
.we-modal-box h3 {
  margin: 0 0 14px;
  color: var(--we-p);
}
.we-field {
  margin-bottom: 12px;
}
.we-field label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
}
.we-field input,
.we-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}
.we-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}
.we-picker-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fafafa;
  cursor: pointer;
}
@media (max-width: 1024px) {
  .we-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 10px 16px;
  }
  .wx-editor-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .wx-split-gutter {
    display: none !important;
  }
  .we-preview-mobile-host {
    display: block;
  }
  .we-ai-mobile {
    display: block;
  }
  .we-left {
    display: none !important;
  }
  .we-right-drawer-head {
    display: flex;
  }
  .we-right {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(52px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-width: 100%;
    height: min(70vh, 540px);
    max-height: calc(100vh - var(--site-header-height, 64px) - 56px - env(safe-area-inset-bottom, 0px));
    top: auto;
    margin: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-radius: 16px 16px 0 0;
    transform: translateY(110%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.26s ease, visibility 0.26s;
    z-index: 45;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
  }
  body.we-editor-drawer-open .we-right {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }
  body.we-editor-drawer-open .we-preview-mobile-host {
    display: none !important;
  }
  .we-mobile-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--we-bd);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    gap: 6px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 46;
  }
  .we-mobile-bar button {
    flex: 0 0 auto;
    min-width: 52px;
    min-height: 44px;
    padding: 0 8px;
    border: 1px solid var(--we-bd);
    border-radius: 10px;
    background: #f8faf9;
    font-size: 11px;
    font-weight: 600;
    color: var(--we-p);
    cursor: pointer;
  }
  .we-mobile-bar button.we-mfab-on {
    border-color: var(--we-p);
    background: #e8f5ec;
    box-shadow: inset 0 0 0 1px rgba(26, 77, 46, 0.12);
  }
  .we-center {
    padding-bottom: 72px;
  }
  .we-mode-bar {
    max-width: none;
    width: 100%;
    margin: 0 0 10px;
    position: relative;
    top: auto;
    z-index: 0;
    background: transparent;
    padding-top: 0;
  }
  .we-mode-bar-hint {
    display: none;
  }
  .we-mode-html-tools {
    max-width: none;
    width: 100%;
    margin: 0 0 8px;
  }
  .we-mode-panels {
    max-width: none;
  }
  .we-preview-inner {
    max-width: 100%;
  }
  .we-topbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

/* —— 可视化 + HTML 分栏与顶栏 —— */
.wx-editor-shell {
  background: #d8e6ee;
}
.wx-editor-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--we-bd);
  position: sticky;
  top: var(--site-header-height, 72px);
  z-index: 900;
}
.wx-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1 1 280px;
  justify-content: flex-end;
}
.wx-top-btn {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid #c8d4cc;
  background: #f8faf9;
  color: var(--we-p);
  font-weight: 600;
  cursor: pointer;
}
.wx-top-btn--gold {
  background: var(--we-a);
  border-color: #c9962a;
  color: #1a1a1a;
}
.wx-top-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}
.we-copy-fail-list {
  max-height: min(52vh, 360px);
  overflow: auto;
  margin-top: 8px;
  border: 1px solid var(--we-bd, #cfe7d8);
  border-radius: 8px;
  background: #fafdfb;
}
.we-copy-fail-row {
  display: grid;
  grid-template-columns: 1fr minmax(100px, 34%);
  gap: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  border-bottom: 1px solid #e8f0ec;
}
.we-copy-fail-row:last-child {
  border-bottom: none;
}
.we-copy-fail-src {
  word-break: break-all;
  color: #1a4d2e;
  font-family: ui-monospace, monospace;
}
.we-copy-fail-reason {
  color: #92400e;
}

.we-sticky-stack.wx-sticky-stack {
  background: transparent;
  padding-bottom: 0;
}
.wx-editor-toolbar {
  position: sticky;
  top: calc(var(--site-header-height, 72px) + 58px);
  z-index: 880;
  background: #f8faf9;
  border-bottom: 1px solid var(--we-bd);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  align-items: center;
}
.wx-rt-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.wx-rt-sep {
  width: 1px;
  height: 26px;
  background: #dbe5df;
  margin: 0 4px;
  flex: 0 0 auto;
}
.wx-rt-btn {
  min-height: 36px;
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #cfd8d1;
  background: #fff;
  color: #333;
  cursor: pointer;
}
.wx-rt-select {
  min-height: 36px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #cfd8d1;
  padding: 4px 8px;
  max-width: 120px;
}
.wx-rt-label {
  font-size: 12px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 4px;
}
.we-layout.we-layout--editor {
  grid-template-columns: 220px minmax(280px, 1.45fr) minmax(300px, 440px);
  gap: 12px;
  align-items: stretch;
}
.wx-visual-panel {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--we-bd);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  overflow: auto;
  max-height: calc(100vh - var(--site-header-height) - 200px);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.wx-code-panel {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--we-bd);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: calc(100vh - var(--site-header-height) - 200px);
}
.wx-code-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--we-bd);
  background: #fafcfa;
}
.wx-code-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--we-p);
  margin-right: auto;
}
.wx-code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wx-code-btn {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}
.wx-html-code {
  flex: 1;
  min-height: 360px;
  width: 100%;
  border: none !important;
  border-radius: 0;
  resize: none;
}
.wx-visual-ruler {
  display: flex;
  justify-content: space-between;
  padding: 4px 12px;
  font-size: 10px;
  color: #888;
  background: linear-gradient(90deg, #f0f4f8 0%, #e8eef4 50%, #f0f4f8 100%);
  border-bottom: 1px solid #e2e8ec;
}
.wx-visual-editor-wrap {
  margin: 0 auto;
  max-width: 100%;
}
.wx-visual-editor {
  width: 720px;
  max-width: calc(100% - 32px);
  min-height: 720px;
}
.wx-visual-editor img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px auto;
}
.wx-visual-editor table {
  width: 100%;
  border-collapse: collapse;
}
.wx-visual-editor td,
.wx-visual-editor th {
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
}
html.we-editor-fullscreen .we-right,
html.we-editor-fullscreen .we-left,
html.we-editor-fullscreen #siteBottomDock,
html.we-editor-fullscreen .we-mobile-bar {
  display: none !important;
}
html.we-editor-fullscreen .we-layout.we-layout--editor {
  grid-template-columns: 1fr;
}
html.we-editor-fullscreen .wx-editor-main {
  grid-template-columns: 1fr 1fr;
  max-width: 100%;
}
html.we-editor-fullscreen .wx-split-gutter {
  display: none !important;
}
html.we-editor-fullscreen .wx-visual-panel,
html.we-editor-fullscreen .wx-code-panel {
  max-height: none;
}
body.we-desktop-split .we-mode-bar {
  display: none !important;
}
body:not(.we-desktop-split)[data-we-editor-mode='visual'] .wx-code-panel {
  display: none !important;
}
body:not(.we-desktop-split)[data-we-editor-mode='html'] .wx-visual-panel {
  display: none !important;
}

/* 2026 editor workspace: unified library and aligned desktop cards */
.we-library-head {
  position: sticky;
  top: -8px;
  z-index: 3;
  margin: -8px -8px 0;
  padding: 12px 10px 10px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--we-bd);
}
.we-library-head strong {
  display: block;
  color: var(--we-p);
  font-size: 14px;
}
.we-library-head span {
  display: block;
  margin-top: 3px;
  color: #7a877f;
  font-size: 11px;
}
.we-library-search {
  width: 100%;
  height: 38px;
  margin-top: 9px;
  padding: 0 11px;
  border: 1px solid #ceddd3;
  border-radius: 9px;
  background: #f9fbfa;
  color: #26362d;
  font-size: 12px;
  box-sizing: border-box;
  outline: none;
}
.we-library-search:focus {
  border-color: var(--we-p);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20,83,45,.08);
}
.we-comp-cats {
  position: sticky;
  top: 89px;
  z-index: 2;
  padding: 9px 8px;
  background: #fff;
}
.we-comp-cat {
  flex: 1 1 calc(25% - 4px);
  min-width: 44px;
  text-align: center;
}
.we-comp-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 10px 11px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20,83,45,.035);
}
.we-comp-item:hover {
  background: #f5faf7;
  box-shadow: 0 5px 14px rgba(20,83,45,.08);
  transform: translateY(-1px);
}
.we-comp-item-name {
  color: #294236;
  font-weight: 650;
  line-height: 1.4;
}
.we-comp-item-action {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf6f0;
  color: var(--we-p);
  font-size: 11px;
}
.we-component-empty {
  padding: 18px 10px;
  text-align: center;
}
.we-tpl-card {
  padding: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 3px 12px rgba(20,83,45,.05);
}
.we-tpl-insert {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 13px 12px 11px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(145deg,#f8fcf9 0%,#edf6f0 100%);
  color: #26362d;
  text-align: left;
}
.we-tpl-insert .we-tpl-name {
  color: var(--we-p);
  font-size: 15px;
}
.we-tpl-insert .we-tpl-cat {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(20,83,45,.08);
  color: #597063;
}
.we-tpl-use-hint {
  display: block;
  margin-top: 8px;
  color: #718078;
  font-size: 11px;
}
.we-tpl-replace-full {
  width: calc(100% - 16px);
  min-height: 34px;
  margin: 8px;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 12px;
}

@media (min-width: 1200px) {
  .wx-editor-pro {
    max-width: 1920px;
    padding: 12px 14px 20px;
  }
  .we-layout.we-layout--editor {
    --we-workspace-height: max(620px, calc(100vh - 395px));
    grid-template-columns: 252px minmax(680px, 1fr) minmax(330px, 390px);
    gap: 14px;
    min-height: var(--we-workspace-height);
    align-items: stretch;
  }
  .we-left,
  .we-center,
  .we-right {
    height: var(--we-workspace-height);
    min-height: 0;
    box-sizing: border-box;
  }
  .we-left,
  .we-right {
    border: 1px solid var(--we-bd);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(20,83,45,.055);
  }
  .we-left {
    border-right: 1px solid var(--we-bd);
  }
  .we-left-tabs {
    flex: 0 0 auto;
  }
  .we-left-tab {
    min-height: 48px;
    padding: 8px 5px;
    font-size: 12px;
  }
  .we-scroll {
    max-height: none;
    min-height: 0;
  }
  .we-center {
    padding: 0;
  }
  .wx-editor-main {
    flex: 1 1 auto;
    min-height: 0;
    height: calc(100% - 32px);
    grid-template-columns: minmax(360px, 1.12fr) 8px minmax(310px, .88fr);
  }
  .wx-visual-panel,
  .wx-code-panel {
    height: 100%;
    max-height: none;
    min-height: 0;
  }
  .we-canvas-wrap {
    flex: 1;
    min-height: 0;
  }
  .wx-visual-editor {
    min-height: calc(var(--we-workspace-height) - 70px);
  }
  .wx-html-code {
    min-height: 0;
  }
  .we-statbar {
    flex: 0 0 32px;
    min-height: 32px;
    box-sizing: border-box;
  }
  .we-right {
    position: static;
    top: auto;
    max-height: none;
    align-self: stretch;
  }
  .we-right-tabs {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    box-sizing: border-box;
    gap: 5px;
  }
  .we-right-main-tab {
    flex: 1 1 calc(33.333% - 5px);
    min-width: 92px;
    padding-left: 6px;
    padding-right: 6px;
  }
  .we-right-body,
  .we-right-tab-panel,
  .we-preview-panel-host--right {
    min-height: 0;
  }
  .we-preview-panel-host--right {
    padding: 10px;
  }
  .we-preview-frame {
    min-height: 100%;
    box-sizing: border-box;
  }
  .we-preview-inner {
    min-height: calc(var(--we-workspace-height) - 112px);
  }
}
@media (max-width: 899px) {
  .wx-editor-toolbar {
    top: var(--site-header-height, 72px);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* 图片插入弹层、素材库 */
.we-img-up-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--we-bd);
}
.we-img-up-hint {
  font-size: 12px;
  color: #666;
  line-height: 1.55;
  margin: 0 0 10px;
}
.we-img-up-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #444;
  margin-bottom: 10px;
  cursor: pointer;
}
.we-img-up-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.we-img-file-native {
  font-size: 16px;
  max-width: 100%;
}
.we-img-up-status {
  font-size: 12px;
  color: var(--we-p);
}
.we-assets-empty {
  font-size: 13px;
  color: #666;
  line-height: 1.55;
  margin: 0;
}
.we-asset-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--we-bd);
  border-radius: 10px;
  background: #fff;
}
.we-asset-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
  flex-shrink: 0;
}
.we-asset-meta {
  flex: 1;
  min-width: 0;
}
.we-asset-url {
  font-size: 11px;
  color: #666;
  word-break: break-all;
  margin-bottom: 8px;
}
.we-asset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.we-asset-use,
.we-asset-del {
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--we-bd);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #f8faf9;
  color: var(--we-p);
}
.we-asset-use {
  background: var(--we-p);
  color: #fff;
  border-color: var(--we-p);
}
.we-asset-del {
  color: #92400e;
  border-color: #fcd34d;
  background: #fffbeb;
}
