/* Script-capable fonts retain joined Arabic letters and readable Chinese glyphs. */
html:lang(ar) {--pixel:Tahoma,"Noto Sans Arabic",Arial,sans-serif;--mono:Tahoma,"Noto Sans Arabic",Arial,sans-serif}
html:lang(zh) {--pixel:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif;--mono:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif}
html:lang(ar) :is(.live-lettering text,.tool-card-art text) {letter-spacing:0}
html:lang(ar) .tool-card-art text {direction:rtl;unicode-bidi:plaintext}
html:lang(ar) .tool-card-painted-description,html:lang(ar) .tool-card-painted-status {text-anchor:start}
html:lang(ar) .tool-search-wrap input {text-align:right}
/* The green Home button is part of the original illustration, so keep the
   navigation hit areas on their matching painted buttons in every language. */
html:lang(ar) :is(#main-nav,.site-footer nav) {direction:ltr}
html:lang(ar) :is(#main-nav,.site-footer nav)>a {direction:rtl}
/* The scene, arrow keys and illustrated surfaces keep their original orientation. */
html:lang(ar) :is(.hero-overlay,.category-strip,.play-controls,.game-viewport,.arcade-topline,.journey-track) {direction:ltr}
html:lang(ar) :is(.hero-overlay button,.arcade-topline span,.play-controls p,.modal-overlay,.complete-overlay,.game-curtain,.world-toast,.category-custom-content) {direction:rtl}
html:lang(ar) :is(.direction-pad,.action-pad,#game-canvas,input[type=range],input[type=file]) {direction:ltr}
html:lang(ar) :is(.category-custom-content,.tool-dialog-plans) {text-align:right}
html:lang(ar) .site-dialog-close {right:auto;left:10px}
html:lang(ar) .tools-empty p {unicode-bidi:plaintext}
html:lang(ar) .language-switcher select,html:lang(zh) .language-switcher select {line-height:1.5}
@media (max-width:767px) {
  html:lang(ar) .site-footer .footer-tagline {text-align:right}
  html:lang(ar) .live-typography.reference-site #main-nav :is(a,button) {justify-content:flex-start}
}
