/* Keep the equation left-to-right and its text in the language of the label. */
#thread .turn > .assistant mjx-container[jax="CHTML"] {
  direction: ltr;
  unicode-bidi: isolate;
}

#thread .turn > .assistant mjx-container[jax="CHTML"]:not([display="true"]) {
  display: inline-block;
  max-inline-size: 100%;
}

#thread .turn > .assistant mjx-mtext > mjx-utext {
  unicode-bidi: plaintext;
}

/* The skill selection row is a sibling of the native 800px composer. */
#composerWrap > #chappieSkillTrayS1 {
  box-sizing: border-box;
  width: min(800px, 100%);
  margin-inline: auto;
}

body.chappie-composer-fullscreen #composerWrap > #chappieSkillTrayS1 {
  width: 100%;
  flex: none;
}

@media (max-width: 760px) {
  #thread .turn > .assistant mjx-container[jax="CHTML"]:not([display="true"]) {
    overflow-x: auto;
    vertical-align: middle;
  }
}
