html.layout-mobile.mobile-chat-rendering-v2 #chatArea.mobile-chat-rendering-v2-chat {
  align-items: stretch;
  gap: 4px;
  scrollbar-width: none !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea.mobile-chat-rendering-v2-chat::-webkit-scrollbar {
  display: none;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message {
  max-width: 88% !important;
  width: auto;
  min-width: 0 !important;
  margin: 2px 0 !important;
  padding: 8px 10px !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08) !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message {
  align-self: stretch !important;
  width: 94% !important;
  max-width: 94% !important;
  min-width: 0 !important;
  margin: 2px auto 2px 0 !important;
  background: #eef4ff !important;
  border: 1px solid rgba(59, 130, 246, 0.14) !important;
  border-radius: 14px 14px 14px 6px !important;
  color: #1f2937 !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.user-message {
  align-self: flex-end !important;
  margin: 3px 0 3px auto !important;
  background: #fff8dc !important;
  border: 1px solid rgba(234, 179, 8, 0.22) !important;
  border-radius: 14px 14px 6px 14px !important;
  color: #1f2937 !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.user-message-example-request,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.user-message-similar-problem-request,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.user-message-understanding-test-request,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.user-message-practice-generator-question {
  align-self: flex-end !important;
  width: auto !important;
  max-width: 88% !important;
  margin: 3px 0 3px auto !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(234, 179, 8, 0.22) !important;
  border-radius: 14px 14px 6px 14px !important;
  background: #fff8dc !important;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08) !important;
  color: #1f2937 !important;
  min-height: auto !important;
  flex-shrink: 0 !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.user-message-practice-generator-question {
  display: flow-root !important;
  align-self: flex-end !important;
  width: auto !important;
  max-width: 88% !important;
  min-width: 0 !important;
  margin: 3px 0 3px auto !important;
  box-sizing: border-box !important;
  clear: none !important;
  overflow: visible !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.user-message-practice-generator-question > span {
  display: flow-root !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.user-message-practice-generator-question + .message.assistant-message {
  clear: none !important;
  margin-top: 4px !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message[data-mobile-greeting="1"] {
  align-self: stretch !important;
  margin: 4px auto 6px 0 !important;
  width: 94% !important;
  max-width: 94% !important;
  padding: 8px 10px !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message p,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message li {
  font-size: 14px !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
  margin: 0 0 0.14em !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message p,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message li {
  text-align: left !important;
  text-justify: auto !important;
  word-spacing: normal !important;
  hyphens: none !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message > span,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message > span p,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message > span li,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message > span div {
  letter-spacing: 0 !important;
  word-spacing: normal !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message .content-highlight,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message .answer-highlight,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message .important-data,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message .logic-section,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message .enhanced-content-card,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message .content-section,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message .info-box,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message .thinking-hint-container,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message .summary-conclusion-container,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message .comparison-analysis-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  color: inherit !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message code:not(pre code),
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message mark {
  font-size: inherit !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message h1,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message h2,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message h3,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message h4 {
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: 700 !important;
  margin: 0.28em 0 0.14em !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message p.mobile-auto-heading {
  margin: 0.34em 0 0.16em !important;
  font-size: calc(1em + 2px) !important;
  line-height: 1.45 !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-justify: auto !important;
  word-spacing: normal !important;
  color: inherit !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message ul,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message ol {
  margin: 0.12em 0 0.16em 1.05em !important;
  padding: 0 !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message hr {
  margin: 0.18em 0 !important;
}

/* 仅移动端：压缩回答内部各段落/块之间的间距 */
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message > span > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message > span > * + * {
  margin-top: 0.14em !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.thinking {
  align-self: flex-start !important;
  margin: 4px auto 8px 0 !important;
  max-width: 84% !important;
  min-width: 0 !important;
  width: auto !important;
  padding: 7px 11px !important;
  border-radius: 12px !important;
  background: rgba(99, 102, 241, 0.08) !important;
  border: 1px solid rgba(99, 102, 241, 0.14) !important;
  box-shadow: none !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.thinking,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.thinking span,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.thinking p {
  font-size: 12px !important;
  line-height: 1.4 !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.thinking .dots-container {
  height: 14px !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.thinking .dot {
  width: 6px !important;
  height: 6px !important;
  margin: 0 3px !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message + .controls {
  display: flex !important;
  flex-wrap: wrap !important;
  align-self: flex-start !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  clear: both !important;
  position: static !important;
  z-index: auto !important;
  max-width: calc(100% - 12px) !important;
  margin: 10px auto 16px 0 !important;
  padding-left: 2px !important;
  padding-right: 0 !important;
  column-gap: 6px !important;
  row-gap: 6px !important;
}

/* Compact chat actions only. The nested next-step island owns its own
   touch targets and must not inherit this 30px note/copy treatment. */
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message + .controls > button,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message + .controls .assistant-control-fold button {
  min-height: 30px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message + .controls .control-btn-label {
  font-size: 12px !important;
  line-height: 1.2 !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message + .controls > button i,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .assistant-message + .controls .assistant-control-fold button i {
  font-size: 13px !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich {
  background-image: none !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .content-section,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .enhanced-content-card,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .logic-section,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .important-data,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .chart-container,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .content-highlight,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .answer-highlight,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .info-box,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .thinking-hint-container,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .summary-conclusion-container,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .comparison-analysis-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0.12em 0 !important;
  color: inherit !important;
  text-align: left !important;
  text-justify: auto !important;
  word-spacing: normal !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich pre,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich pre[class*="language-"] {
  margin: 0.16em 0 !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  background: rgba(15, 23, 42, 0.05) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: none !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich code:not(pre code) {
  font-size: inherit !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich blockquote {
  margin: 0.16em 0 !important;
  padding: 6px 10px !important;
  border-left: 3px solid rgba(59, 130, 246, 0.35) !important;
  background: rgba(59, 130, 246, 0.06) !important;
  border-radius: 0 8px 8px 0 !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .mobile-lite-table-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  margin: 0.16em 0 !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .mobile-lite-table-wrap table,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich table {
  min-width: 440px !important;
  width: max-content !important;
  border-collapse: collapse !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .mobile-lite-table-wrap th,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .mobile-lite-table-wrap td,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich th,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich td {
  padding: 6px 8px !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  white-space: nowrap !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .answer-highlight::before,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .logic-section h4::before,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .content-section h1::before,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .content-section h2::before,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .content-section h3::before,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .content-section h4::before {
  content: none !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .logic-section h4,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .content-section h1,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .content-section h2,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .content-section h3,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.mobile-lite-rich .content-section h4 {
  padding-left: 0 !important;
  color: inherit !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message.has-markmap,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message.interactive-resource-message,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message.assistant-message.video-resource-message {
  max-width: 94% !important;
  width: 94% !important;
  margin: 3px auto !important;
  padding: 10px !important;
}

/* Diagram controls wrap independently of the title on narrow touch screens. */
html.layout-mobile #chatArea .has-markmap .markmap-container > svg {
  /* An inline SVG adds a text baseline gap and creates a false inner scrollbar. */
  display: block;
}

html.layout-mobile #chatArea .has-markmap .mindmap-bubble__header {
  flex-wrap: wrap;
  gap: 8px;
}

html.layout-mobile #chatArea .has-markmap .mindmap-bubble__title {
  flex: 1 1 220px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

html.layout-mobile #chatArea .has-markmap .mindmap-bubble__actions {
  margin-left: auto;
  gap: 8px;
}

html.layout-mobile #chatArea .has-markmap .mindmap-bubble__btn {
  min-height: 44px;
  min-width: 44px;
  box-shadow: none;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .thinking-panel,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .mobile-thinking-panel {
  margin: 6px 0 8px 0 !important;
  border-radius: 10px !important;
  border: 1px solid rgba(99, 102, 241, 0.16) !important;
  background: #f8faff !important;
  box-shadow: none !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .mobile-thinking-header {
  padding: 8px 10px !important;
  gap: 8px !important;
  background: rgba(99, 102, 241, 0.08) !important;
  border-bottom: 1px solid rgba(99, 102, 241, 0.14) !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .mobile-thinking-title {
  font-size: 12px !important;
  color: #4f46e5 !important;
  font-weight: 600 !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .mobile-thinking-title .thinking-count,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .thinking-count {
  font-size: 10px !important;
  padding: 1px 6px !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .mobile-thinking-toggle {
  border-radius: 999px !important;
  padding: 2px 8px !important;
  font-size: 10px !important;
  background: #eef2ff !important;
  color: #4338ca !important;
  box-shadow: none !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .mobile-thinking-summary {
  padding: 0 10px 8px !important;
  font-size: 11px !important;
  color: #6b7280 !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .mobile-thinking-body {
  padding: 8px 10px !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .mobile-thinking-text {
  font-size: 12px !important;
  line-height: 1.5 !important;
  color: #374151 !important;
}

/* Mobile formula normalization only. Keep message bubble layout untouched. */
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message {
  --chat-formula-baseline-shift: -0.07em;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea.chat-area .message.user-message :is(
  mjx-container,
  .MathJax,
  .MathJax_CHTML,
  .mjx-chtml,
  .mjx-svg,
  .mathjax,
  .math-formula,
  .enhanced-math-inline,
  .chemistry-formula,
  .mhchem
),
html.layout-mobile.mobile-chat-rendering-v2 #chatArea.chat-area .message.assistant-message :is(
  mjx-container,
  .MathJax,
  .MathJax_CHTML,
  .mjx-chtml,
  .mjx-svg,
  .mathjax,
  .math-formula,
  .enhanced-math-inline,
  .chemistry-formula,
  .mhchem
),
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message :is(
  mjx-container,
  .MathJax,
  .MathJax_CHTML,
  .mjx-chtml,
  .mjx-svg,
  .mathjax,
  .math-formula,
  .enhanced-math-inline,
  .chemistry-formula,
  .mhchem
) {
  color: inherit !important;
  font: inherit !important;
  font-size: 14px !important;
  line-height: 1.16 !important;
  letter-spacing: 0 !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0.06em !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  transform: none !important;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  vertical-align: var(--chat-formula-baseline-shift) !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message :is(
  mjx-container,
  .MathJax,
  .mjx-chtml,
  .mjx-svg,
  .math-formula,
  .enhanced-math-inline,
  .chemistry-formula,
  .mhchem
):hover {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message :is(
  mjx-container:not([display="true"]),
  .MathJax,
  .MathJax_CHTML,
  .mjx-chtml,
  .mjx-svg,
  .math-formula.math-inline,
  .enhanced-math-inline,
  .chemistry-formula,
  .mhchem
) {
  display: inline-block !important;
  width: auto !important;
  overflow: visible !important;
  text-align: inherit !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea.chat-area .message.user-message :is(
  mjx-container[display="true"],
  .MathJax_Display,
  .math-display,
  .math-formula.math-display,
  .mjx-display,
  .enhanced-math-display
),
html.layout-mobile.mobile-chat-rendering-v2 #chatArea.chat-area .message.assistant-message :is(
  mjx-container[display="true"],
  .MathJax_Display,
  .math-display,
  .math-formula.math-display,
  .mjx-display,
  .enhanced-math-display
),
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message :is(
  mjx-container[display="true"],
  .MathJax_Display,
  .math-display,
  .math-formula.math-display,
  .mjx-display,
  .enhanced-math-display
) {
  display: block !important;
  width: 100% !important;
  font: inherit !important;
  font-size: 14px !important;
  line-height: 1.28 !important;
  text-align: center !important;
  padding: 0 !important;
  margin: 0.36em 0 !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  vertical-align: baseline !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message .MathJax_Display::before,
html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message .mjx-display::before {
  content: none !important;
  display: none !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message :is(mjx-container, .MathJax, .mjx-svg, .math-formula) svg {
  max-width: 100% !important;
  height: auto !important;
  vertical-align: baseline !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message :is(mjx-container math, .mjx-svg math) {
  font-size: inherit !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea.chat-area .message :is(mjx-container.MathJax, mjx-container.math-formula, .MathJax.math-formula) {
  font: inherit !important;
  font-size: 14px !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea.chat-area .message.user-message mjx-container.MathJax.math-formula:not([display="true"]),
html.layout-mobile.mobile-chat-rendering-v2 #chatArea.chat-area .message.assistant-message mjx-container.MathJax.math-formula:not([display="true"]) {
  font: inherit !important;
  font-size: 14px !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message :is(
  mjx-container,
  .MathJax,
  .MathJax_CHTML,
  .mjx-chtml,
  .mjx-svg,
  .mathjax,
  .math-formula,
  .math-inline,
  .math-display,
  .enhanced-math-inline,
  .enhanced-math-display,
  .chemistry-formula,
  .mhchem
)::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message table :is(
  mjx-container,
  .MathJax,
  .MathJax_CHTML,
  .mjx-chtml,
  .mjx-svg,
  .mathjax,
  .math-formula,
  .math-inline,
  .math-display,
  .enhanced-math-inline,
  .enhanced-math-display
) {
  max-width: none !important;
  overflow: visible !important;
  font-size: 14px !important;
}

html.layout-mobile.mobile-chat-rendering-v2 #chatArea .message table :is(
  mjx-container[display="true"],
  .MathJax_Display,
  .math-display,
  .math-formula.math-display,
  .mjx-display,
  .enhanced-math-display
) {
  display: inline-block !important;
  width: auto !important;
  max-width: none !important;
  margin: 0.1em 0 !important;
  text-align: inherit !important;
  vertical-align: middle !important;
  line-height: 1.24 !important;
  font-size: 14px !important;
}

/* 移动端聊天记录（#chatRecordsModal 内的 .chat-records-admin__message-body）：
   这块内容在 #chatArea 之外，上面按聊天气泡写的规则覆盖不到；低端/纯 HTML 渲染时也可能不带
   .render-rich-surface。这里单独给代码块和行间公式补横向滚动，避免超长行被弹窗直接裁掉。 */
html.layout-mobile #chatRecordsModal .chat-records-admin__message-body pre {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

/* 行间公式只补横向滚动，纵向保持默认，避免裁掉上下伸出的根号/上下标 */
html.layout-mobile #chatRecordsModal .chat-records-admin__message-body mjx-container[display="true"] {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
