/* 容器基础：统一盒模型，隔离外部继承 */
.editor-cms {
  box-sizing: border-box;
  /* 强制重置根级继承属性，阻断外部全局字体/行高/颜色污染 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background: #fff;
}

/* 所有元素统一盒模型，重置易被外部污染的属性 */
.editor-cms * {
  box-sizing: border-box;
  /* 这里不要加 !important，让内联style可以自然覆盖 */
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: inherit;
  font-family: inherit;
  font-weight: normal;
  font-style: normal;
  text-align: left;
  vertical-align: baseline;
  background: transparent;
}

/* ========== 标题 默认样式 ========== */
.editor-cms h1 {
  font-size: 2em;
  font-weight: bold;
  margin: 0.67em 0;
}
.editor-cms h2 {
  font-size: 1.5em;
  font-weight: bold;
  margin: 0.75em 0;
}
.editor-cms h3 {
  font-size: 1.17em;
  font-weight: bold;
  margin: 0.83em 0;
}
.editor-cms h4 {
  font-size: 1em;
  font-weight: bold;
  margin: 1.12em 0;
}
.editor-cms h5 {
  font-size: 0.83em;
  font-weight: bold;
  margin: 1.5em 0;
}
.editor-cms h6 {
  font-size: 0.67em;
  font-weight: bold;
  margin: 2.33em 0;
}

/* ========== 段落、换行、分割线 ========== */
.editor-cms p {
  margin-bottom: 1em;
}
.editor-cms hr {
  border-top: 1px solid #ccc;
  margin: 1.2em 0;
}

/* ========== 列表 ========== */
.editor-cms ul {
  list-style: disc;
  padding-left: 2em;
  margin: 1em 0;
}
.editor-cms ol {
  list-style: decimal;
  padding-left: 2em;
  margin: 1em 0;
}
.editor-cms li {
  margin: 0.3em 0;
}

/* ========== 引用块 ========== */
.editor-cms blockquote {
  border-left: 4px solid #d0d0d0;
  padding: 0.5em 1em;
  margin: 1em 0;
  color: #555;
}

/* ========== 代码块 ========== */
.editor-cms pre {
  background: #f7f7f7;
  padding: 12px;
  overflow-x: auto;
  margin: 1em 0;
  border-radius: 4px;
}
.editor-cms code {
  font-family: monospace;
  background: #f3f3f3;
  padding: 2px 6px;
  font-size: 0.9em;
}

/* ========== 链接 ========== */
.editor-cms a {
  color: #0066cc;
  text-decoration: underline;
}
.editor-cms a:hover {
  color: #004499;
}

/* ========== 图片 ========== */
.editor-cms img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  /* 内联设置的width/height/margin等会自动覆盖这里的默认值 */
}

/* ========== 表格 ========== */
.editor-cms table {
  border-collapse: collapse;
  width: auto;
  margin: 1em 0;
}
.editor-cms th,
.editor-cms td {
  border: 1px solid #bbbbbb;
  padding: 8px 12px;
  text-align: left;
}
.editor-cms th {
  background-color: #f5f5f5;
  font-weight: bold;
}

/* ========== 行内文本标签 ========== */
.editor-cms strong {
  font-weight: bold;
}
.editor-cms em {
  font-style: italic;
}
.editor-cms u {
  text-decoration: underline;
}
.editor-cms s {
  text-decoration: line-through;
}