/* Arabic uses the same layout and components with a right-to-left reading order. */
html[dir=rtl] :is(.room,.person-row button,.chat-list-item,.preview-viewer,.gift-option,.thank-button,.email-login-intro .legacy-login,.email-welcome .browser-login-note button,.character-tile,.character-showcase,.inline-translation,.chat-panel .chat-identity,.chat-panel .conversation-menu-item,.chat-panel .chat-security-link){text-align:start}
html[dir=rtl] :is(.eyebrow,.section-label,.room-tag,.room-category,.top-title,h1,h2,h3,.lounge-circle-title){letter-spacing:normal}
html:is([lang=th],[lang=hi]) :is(.eyebrow,.section-label,.room-tag,.room-category,.top-title,h1,h2,h3,.lounge-circle-title){letter-spacing:normal;line-height:1.6}
html:is([lang=th],[lang=hi],[lang=ar]) :is(.reset-panel p,.reset-auth p,.lounge-circle-title,.lounge-circle-description){word-break:normal}
html[dir=rtl] .close{right:auto;left:15px}
html[dir=rtl] :is(.recovery-panel h2,.reset-panel h2){padding-right:0;padding-left:32px}
html[dir=rtl] :is(.person-row .arrow,.request-card .primary,.inline-translation-head .chat-tool){margin-left:0;margin-right:auto}
html[dir=rtl] .avatars{padding-left:0;padding-right:6px}
html[dir=rtl] .avatars .avatar{margin-left:0;margin-right:-6px}
html[dir=rtl] .room .join-pill{text-align:end}
html[dir=rtl] :is(.percentage-rules,.browser-login-steps,.collection-rules ol){padding-left:0;padding-right:24px}
html[dir=rtl] .collection-rules li{padding-left:0;padding-right:4px}
html[dir=rtl] .quoted-message{border-left:0;border-right:2px solid #94aa80}
html[dir=rtl] #mx-translation{border-left:0;border-right:3px solid #acdb6e}
html[dir=rtl] .chat-panel .chat-draft{border-left:0;border-right:2px solid #a6ce70}
html[dir=rtl] .chat-panel .conversation-menu{right:auto;left:0}
html[dir=rtl] :is([data-close-chat] .chat-svg,.chat-security-link .chat-svg:last-child){transform:scaleX(-1)}
html[dir=rtl] :is(input[type=email],input[type=url],input[name=handle],.security-code,code,.percent-total,.public-total){direction:ltr;unicode-bidi:isolate}
html[dir=rtl] :is(input[name=handle],input[type=email],input[type=url]){text-align:left}
html[dir=rtl] .chat-panel .bubble{border-radius:18px 5px 18px 18px}
html[dir=rtl] .chat-panel .mine .bubble{border-radius:5px 18px 18px 18px}
html[dir=rtl] .chat-panel .bubble:has(>.message-sticker){border-radius:12px}
/* The illustrated-card preview uses positive scroll offsets and keeps its artwork order. */
[data-preview-track],[data-preview-count]{direction:ltr;unicode-bidi:isolate}
/* Native-language selectors stay legible even after selecting an unfamiliar locale. */
#ui-language{max-width:140px}
html:is([lang=vi],[lang=th],[lang=id],[lang=pt],[lang=ru],[lang=tr],[lang=hi],[lang=ar]) .nav button b{overflow-wrap:anywhere;line-height:1.4}
@media(min-width:701px){
 html[dir=rtl] .nav{left:auto;right:0;border-right:0;border-left:1px solid var(--line)}
 html[dir=rtl] .shell{margin-left:0;margin-right:110px}
 html[dir=rtl] .chat-panel{right:auto;left:0;border-left:0;border-right:1px solid #d6dfce;box-shadow:30px 0 100px #1b301519}
}
@media(max-width:700px){
 #ui-language{max-width:118px}
 html:is([lang=vi],[lang=th],[lang=id],[lang=pt],[lang=ru],[lang=tr],[lang=hi],[lang=ar]) .page-top{flex-wrap:wrap}
 html[dir=rtl] .request-card .primary{margin-right:0}
}
