.mermaid {
  text-align: center;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  padding: 1em;
  border-radius: 0.5em;
  background-color: var(--code-bg);
  font-family: var(--code-font, monospace);
  font-size: 0.9rem;
  overflow-x: auto;
  max-width: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.mermaid strong {
  font-weight: bold;
}

.mermaid svg {
  max-width: 100%;
  height: auto;
}

@media (prefers-color-scheme: dark) {
  .mermaid {
    background-color: var(--code-bg-dark, #2d2d2d);
  }
}
