/* 内置富文本编辑器样式 */
.editor { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.editor-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 8px; background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.tb-group { display: flex; gap: 2px; align-items: center; }
.tb-group + .tb-group { padding-left: 8px; margin-left: 2px; border-left: 1px solid var(--line); }
.tb-group.tb-right { margin-left: auto; }
.editor-toolbar button {
  min-width: 28px; height: 28px; padding: 0 6px; background: transparent; border: 1px solid transparent;
  border-radius: 6px; color: var(--text-2); cursor: pointer; font: inherit; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}
.editor-toolbar button:hover { background: var(--card-2); color: var(--text); }
.editor-toolbar .tb-right button.active { background: var(--card-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.editor-toolbar button b, .editor-toolbar button i, .editor-toolbar button u, .editor-toolbar button s { font-size: 13px; }
.editor-body { position: relative; }
.editor-area, .editor-md, .editor-html {
  min-height: 240px; max-height: 620px; overflow-y: auto; padding: 16px 18px;
  font-size: 15px; line-height: 1.8; outline: none; color: var(--text);
}
.editor.compact .editor-area, .editor.compact .editor-md, .editor.compact .editor-html { min-height: 130px; }
.editor-area:empty:before { content: attr(data-placeholder); color: var(--text-3); pointer-events: none; }
.editor-md, .editor-html {
  display: block; width: 100%; border: 0; background: transparent; resize: vertical;
  font-family: var(--fm); font-size: 13.5px;
}
.editor-md:focus, .editor-html:focus { outline: none; }
.editor-status { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); background: var(--bg-2); font-family: var(--fm); font-variant-numeric: tabular-nums; }
.editor-status b { color: var(--text-2); }

.emoji-panel {
  position: absolute; z-index: 40; background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; width: 320px; max-height: 280px; overflow: auto;
}
.emoji-panel .ep-title { font-size: 12px; color: var(--text-3); margin: 0 0 6px; }
.emoji-panel .ep-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; margin-bottom: 10px; }
.emoji-panel button { background: none; border: 0; font-size: 20px; cursor: pointer; border-radius: 7px; padding: 3px; line-height: 1; }
.emoji-panel button:hover { background: var(--card-2); }

.upload-progress { height: 2px; background: var(--accent); width: 0; transition: width 200ms var(--ease); }
.editor-area img { max-width: 100%; border-radius: 6px; }
.editor-area:focus { background: var(--card); }
.editor.drag-over { outline: 2px dashed var(--primary); outline-offset: -4px; }
.wp-insert { display: inline-flex; align-items: center; gap: 6px; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 10px; margin: 4px; font-size: 12px; color: var(--text-2); }
.wp-insert img { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; }
