body .wp-block-post-content figure.liuyt-mermaid-figure {
  box-sizing: border-box;
  position: relative;
  left: 50%;
  width: min(1120px, calc(100vw - 2rem));
  max-width: none;
  margin: 2rem 0 2.2rem !important;
  padding: 1.05rem;
  border: 1px solid rgba(138, 111, 53, 0.2);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(250, 248, 242, 0.96));
  color: #303030;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: transparent transparent;
  scrollbar-width: thin;
  text-align: center;
  transform: translateX(-50%);
}

body .wp-block-post-content figure.liuyt-mermaid-figure:hover,
body .wp-block-post-content figure.liuyt-mermaid-figure:focus-within {
  scrollbar-color: rgba(138, 111, 53, 0.42) rgba(216, 208, 191, 0.18);
}

body .wp-block-post-content figure.liuyt-mermaid-figure::-webkit-scrollbar {
  height: 10px;
}

body .wp-block-post-content figure.liuyt-mermaid-figure::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

body .wp-block-post-content figure.liuyt-mermaid-figure::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background-color: transparent;
  background-clip: content-box;
}

body .wp-block-post-content figure.liuyt-mermaid-figure:hover::-webkit-scrollbar-thumb,
body .wp-block-post-content figure.liuyt-mermaid-figure:focus-within::-webkit-scrollbar-thumb {
  background-color: rgba(138, 111, 53, 0.42);
}

body .wp-block-post-content figure.liuyt-mermaid-figure:hover::-webkit-scrollbar-track,
body .wp-block-post-content figure.liuyt-mermaid-figure:focus-within::-webkit-scrollbar-track {
  background: rgba(216, 208, 191, 0.18);
}

body .wp-block-post-content figure.liuyt-mermaid-figure.is-wide {
  width: min(1280px, calc(100vw - 2rem));
}

body .wp-block-post-content figure.liuyt-mermaid-figure:first-child {
  margin-top: 0 !important;
}

body .wp-block-post-content .liuyt-mermaid-stage {
  display: inline-block;
  min-width: 100%;
  text-align: center;
}

body .wp-block-post-content .liuyt-mermaid-stage svg {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  margin: 0 auto;
  color: #303030;
}

body .wp-block-post-content .liuyt-mermaid-figure.is-wide .liuyt-mermaid-stage svg {
  width: clamp(1180px, 108vw, 1560px);
}

body .wp-block-post-content .liuyt-mermaid-figure.is-standard .liuyt-mermaid-stage svg {
  max-width: 100%;
}

body .wp-block-post-content .liuyt-mermaid-figure.is-rendering .liuyt-mermaid-fallback,
body .wp-block-post-content .liuyt-mermaid-figure.is-rendered .liuyt-mermaid-fallback {
  display: none;
}

body .wp-block-post-content .liuyt-mermaid-fallback {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(72, 106, 122, 0.22);
  border-radius: 4px;
  background: rgba(255, 253, 248, 0.9);
  color: #303030;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.62;
  overflow-x: auto;
  white-space: pre;
}

body .wp-block-post-content .liuyt-mermaid-fallback code {
  display: block;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

body .wp-block-post-content .liuyt-mermaid-figure.is-error {
  border-color: rgba(166, 102, 75, 0.36);
  background: #fffdf8;
}

body .wp-block-post-content .liuyt-mermaid-figure.is-error .liuyt-mermaid-fallback {
  border-color: rgba(166, 102, 75, 0.34);
  background: rgba(244, 232, 225, 0.5);
}

@media (max-width: 720px) {
  body .wp-block-post-content figure.liuyt-mermaid-figure {
    width: calc(100vw - 0.75rem);
    margin-top: 1.65rem !important;
    margin-bottom: 1.8rem !important;
    padding: 0.65rem;
    border-radius: 5px;
  }

  body .wp-block-post-content figure.liuyt-mermaid-figure.is-wide {
    width: calc(100vw - 0.75rem);
  }

  body .wp-block-post-content .liuyt-mermaid-figure.is-wide .liuyt-mermaid-stage svg {
    width: clamp(980px, 260vw, 1280px);
  }

  body .wp-block-post-content .liuyt-mermaid-fallback {
    font-size: 0.8rem;
  }
}
