.ck-content .mathjax-equation {
  display: inline-block;
  padding: 0.1rem 0.25rem;
  border-radius: 0.2rem;
  background: #f5f7fa;
}

.ck-content .mathjax-equation.mathjax-display {
  display: block;
  margin: 0.5rem 0;
  padding: 0.4rem 0.6rem;
}

.mathjax-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1261;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}

.mathjax-modal {
  width: min(640px, 92vw);
  border-radius: 0.5rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.mathjax-modal h3 {
  margin: 0 0 0.8rem;
}

.mathjax-modal textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.25rem;
  margin-bottom: 0.6rem;
}

.mathjax-display-toggle {
  display: block;
  margin-bottom: 0.7rem;
}

.mathjax-preview-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.mathjax-preview {
  min-height: 2.25rem;
  border: 1px solid #d7dde3;
  border-radius: 0.25rem;
  padding: 0.55rem;
  background: #fafbfd;
}

.mathjax-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.8rem;
}
