/* Fonts and right-to-left layout for translated languages (see i18n.js). */
html[data-lang="ar"] *, html[data-lang="ar"] body { font-family: 'Noto Sans Arabic', 'Space Mono', sans-serif !important; letter-spacing: 0 !important; }
html[data-lang="ur"] *, html[data-lang="ur"] body { font-family: 'Noto Nastaliq Urdu', 'Noto Sans Arabic', 'Space Mono', serif !important; letter-spacing: 0 !important; line-height: 1.9; }
html[data-lang="hi"] *, html[data-lang="hi"] body { font-family: 'Noto Sans Devanagari', 'Space Mono', sans-serif !important; }
html[data-lang="zh"] *, html[data-lang="zh"] body { font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Space Mono', sans-serif !important; letter-spacing: 0 !important; }
/* Letter-spaced uppercase looks wrong in scripts without case. */
html[data-lang="ar"] *, html[data-lang="ur"] *, html[data-lang="hi"] *, html[data-lang="zh"] * { text-transform: none !important; }

/* Right-to-left: text and layout flow from the right. Only canvases, charts, prices and typed values keep left-to-right order. */
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] canvas, html[dir="rtl"] .candle-chart, html[dir="rtl"] [class*="chart"] { direction: ltr; }
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="password"], html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[name="username"] { direction: ltr; text-align: right; }
/* Titles and labels the game pins to the left. */
html[dir="rtl"] .submenu-title, html[dir="rtl"] .cb-shell-heading .submenu-title, html[dir="rtl"] .option-row-label,
html[dir="rtl"] .option-row-sublabel, html[dir="rtl"] #bot-panel, html[dir="rtl"] #bot-panel .roster-entry .roster-name,
html[dir="rtl"] .console-content, html[dir="rtl"] .submenu-content-box { text-align: start !important; }
html[dir="rtl"] .menu-row-btn, html[dir="rtl"] .shop-btn { text-align: center !important; }
/* Inline "text-align:left" written by the game's scripts. */
html[dir="rtl"] [style*="text-align: left"], html[dir="rtl"] [style*="text-align:left"] { text-align: start !important; }
