/* Center the visible settings plaques independently of scrollbar occupancy.
   Keep the rail to the right, including RTL locales; text keeps its own direction. */
body #menu.menu[data-mode=settings] #menuChapter{justify-content:center;text-align:center}
body #menu.menu[data-mode=settings] #settingsForm{
 padding:2px 6px 8px;scrollbar-gutter:stable both-edges;direction:ltr;
}
body[dir=rtl] #menu.menu[data-mode=settings] .preference{direction:rtl}

/* The unframed scroll region surrounds the enamel sheet. Its rail and gap are
   outside the border, with a matching left reserve so the plaque stays centered. */
#loreReader .reading-card{width:min(786px,100%)}
#loreReader #loreScroll{
 flex:0 1 auto;min-height:0;width:100%;padding:2px 6px 8px;
 overflow:auto;scrollbar-gutter:stable both-edges;direction:ltr;
 scrollbar-color:#aa9a6c #0b232b;
}
#loreScroll::-webkit-scrollbar-track{background:#0b232b;border-radius:6px}
#loreScroll::-webkit-scrollbar-thumb{background:#aa9a6c;border-color:#0b232b}
#loreReader .reading-sheet{display:block;overflow:hidden;direction:ltr}
#loreReader[dir=rtl] .reading-sheet{direction:rtl}
/* Preserve the existing mirrored settings columns while the rail stays right. */
@media(min-width:550px) and (max-height:519px){
 body[dir=rtl] #menu.menu[data-mode=settings] #settingsForm :is(.language-preference,.music-preference,.sound-preference){grid-column:2}
 body[dir=rtl] #menu.menu[data-mode=settings] #settingsForm :is(.hints-preference,#fullscreenPreference,.notifications-preference){grid-column:1}
}
