/* 前台页面文字编辑模式 */
body.cms-editing {
  padding-bottom: 86px;
}
.cms-text {
  border-radius: 4px;
  transition: background 0.13s ease, box-shadow 0.13s ease;
}
body.cms-editing .cms-text {
  cursor: text;
  outline: 1px dashed rgba(124, 58, 237, 0.28);
  outline-offset: 2px;
}
body.cms-editing .cms-text:hover {
  background: rgba(245, 243, 255, 0.86);
  outline-color: #a78bfa;
}
body.cms-editing .cms-text:focus {
  background: #fff;
  outline: 2px solid #7c3aed;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.cms-toolbar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 50000;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(calc(100vw - 30px), 760px);
  transform: translateX(-50%);
  border: 1px solid #ddd6fe;
  border-radius: 16px;
  padding: 10px 12px 10px 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(12px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.cms-toolbar-copy { display: flex; min-width: 0; flex-direction: column; gap: 1px; flex: 1; }
.cms-toolbar-copy strong { color: #4c1d95; font-size: 12px; }
.cms-toolbar-copy span { color: #94a3b8; font-size: 10px; }
.cms-toolbar-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.cms-btn {
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  padding: 7px 11px;
  color: #475569;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.cms-btn:hover { border-color: #c4b5fd; color: #6d28d9; text-decoration: none; }
.cms-btn-save {
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, #7c3aed, #d946ef);
  box-shadow: 0 6px 14px rgba(124, 58, 237, 0.22);
}
.cms-btn-save:disabled { opacity: 0.6; cursor: wait; }
.cms-toolbar-status {
  position: absolute;
  right: 16px;
  bottom: 4px;
  color: #b45309;
  font-size: 9px;
}
.cms-toolbar-status:empty { display: none; }

@media (max-width: 640px) {
  .cms-toolbar {
    bottom: 10px;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 7px;
    padding: 9px 10px;
  }
  .cms-toolbar-copy { flex: 1 1 100%; }
  .cms-toolbar-actions { width: 100%; }
  .cms-btn { flex: 1; text-align: center; }
  body.cms-editing { padding-bottom: 110px; }
}
