/* Persian typography: scope only to language-dependent content, not the global
   header/grid/player geometry, so the established OKU layout stays intact. */
#screen-intro .intro-language-grid,
.screen-footer .footer-language-grid,
.home-footer .footer-language-grid{
 grid-template-columns:repeat(6,minmax(0,1fr))!important;
 direction:ltr!important;
}
@media(max-width:600px){
 #screen-intro .intro-language-grid,
 .screen-footer .footer-language-grid,
 .home-footer .footer-language-grid{
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  direction:ltr!important;
  gap:6px 3px!important;
 }
 #screen-intro .intro-language-grid>.oku-language-option,
 .screen-footer .footer-language-grid>.oku-language-option,
 .home-footer .footer-language-grid>.oku-language-option{
  font-size:clamp(8px,2vw,11px)!important;
  letter-spacing:-.06em!important;
  padding:0 1px!important;
 }
}
html[data-oku-lang="fa"] .intro-language-option[data-lang="fa"],
html[data-oku-lang="fa"] .footer-language-option[data-lang="fa"]{
 direction:rtl;text-align:center;
}
html[data-oku-lang="fa"] :is(.home-daily-title,.home-daily-verse){
 direction:rtl;text-align:center;unicode-bidi:plaintext;line-height:1.5;
}
html[data-oku-lang="fa"] #screen-home .home-daily-title{
 font-size:clamp(26px,2.4vw,43px)!important;
 line-height:1.25!important;
 letter-spacing:0!important;
 overflow-wrap:normal;
}
html[data-oku-lang="fa"] #screen-home .home-daily-copy{
 top:54%!important;
 height:44%!important;
 gap:12px!important;
}
html[data-oku-lang="fa"] #screen-home .home-daily-translation{
 direction:rtl;text-align:center;line-height:1.8;
}
@media(max-width:600px){
 html[data-oku-lang="fa"] #screen-home .home-daily-title{font-size:clamp(25px,7vw,36px)!important;}
 html[data-oku-lang="fa"] #screen-home .home-daily-copy{top:55%!important;height:43%!important;gap:8px!important;}
}
html[data-oku-lang="fa"] :is(
 .page-lang-slogan,.home-card-copy,.home-daily-title,.home-daily-verse,
 .search-studio,.search-form,.search-results,.conversation-thread,
 .conversation-response,.verse-translation,.context-verse__tr,
 .share-panel,.share-dialog,.workspace-dialog,.notes-dialog,
 .saved-verse-dialog,.source-dialog,.explanation-dialog,.copyright-dialog,
 .screen-footer,.footer-inner,.disclaimer-band,.search-history,
 .result-card,.conversation-inline-context,.oku-discovery-answer
){
 font-family:Tahoma,"Noto Naskh Arabic","Noto Sans Arabic",sans-serif;
 direction:rtl;
 text-align:start;
}
html[data-oku-lang="fa"] :is(
 .search-input,.search-form input,.search-form textarea,
 .search-results p,.verse-translation,.context-verse__tr,
 .share-panel p,.workspace-dialog p,.screen-footer p
){direction:rtl;text-align:right;unicode-bidi:plaintext;}
html[data-oku-lang="fa"] :is(.verse-translation,.context-verse__tr){
 line-height:1.9;overflow-wrap:anywhere;}
html[data-oku-lang="fa"] :is(.verse-ref,.verse-top,.verse-arabic,[lang="ar"]){
 font-family:inherit;direction:rtl;}
html[data-oku-lang="fa"] :is(.page-lang-trigger,.footer-language-option,.intro-language-option){
 white-space:normal;}
@media(max-width:600px){
 html[data-oku-lang="fa"] :is(.home-card-copy,.search-studio,.share-panel){overflow-wrap:anywhere;}
}
/* Standalone Join and Goals documents set lang=fa without data-oku-lang. */
html:lang(fa) :is(.goal-wrap,.oku-join-body main,.oku-join-content,.join-wrap){
  direction:rtl;
  font-family:Tahoma,"Noto Naskh Arabic","Noto Sans Arabic",sans-serif;
  text-align:start;
}
html:lang(fa) :is(.goal-wrap p,.goal-wrap h1,.goal-wrap h2,.goal-wrap h3,
 .oku-join-body main p,.oku-join-body main h1,.oku-join-body main h2){
  direction:rtl;text-align:right;line-height:1.85;
}
html[data-oku-lang="fa"] .oku-decay-body :is(.decay-hero-copy,.decay-statements,.decay-closing-copy,.decay-verse-card,.decay-context-copy){
 direction:rtl;text-align:right;font-family:Tahoma,"Noto Naskh Arabic","Noto Sans Arabic",sans-serif;line-height:1.9;
}
html[data-oku-lang="fa"] .oku-decay-body :is(.decay-hero-title,.decay-hero-lead,.decay-statement-copy){
 direction:rtl;line-height:1.75;overflow-wrap:anywhere;
}
/* Eleven languages: deterministic six on top, five below, Farsi LAST. */
#screen-intro .intro-language-grid,
#screen-home .footer-language-grid,
.screen-footer .footer-language-grid{direction:ltr!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-auto-flow:row!important;}
:is(#screen-intro .intro-language-grid,.screen-footer .footer-language-grid) > [data-lang="tr"]{grid-area:1/1!important}
:is(#screen-intro .intro-language-grid,.screen-footer .footer-language-grid) > [data-lang="en"]{grid-area:1/2!important}
:is(#screen-intro .intro-language-grid,.screen-footer .footer-language-grid) > [data-lang="es"]{grid-area:1/3!important}
:is(#screen-intro .intro-language-grid,.screen-footer .footer-language-grid) > [data-lang="fr"]{grid-area:1/4!important}
:is(#screen-intro .intro-language-grid,.screen-footer .footer-language-grid) > [data-lang="it"]{grid-area:1/5!important}
:is(#screen-intro .intro-language-grid,.screen-footer .footer-language-grid) > [data-lang="pt"]{grid-area:1/6!important}
:is(#screen-intro .intro-language-grid,.screen-footer .footer-language-grid) > [data-lang="de"]{grid-area:2/1!important}
:is(#screen-intro .intro-language-grid,.screen-footer .footer-language-grid) > [data-lang="ja"]{grid-area:2/2!important}
:is(#screen-intro .intro-language-grid,.screen-footer .footer-language-grid) > [data-lang="zh"]{grid-area:2/3!important}
:is(#screen-intro .intro-language-grid,.screen-footer .footer-language-grid) > [data-lang="ru"]{grid-area:2/4!important}
:is(#screen-intro .intro-language-grid,.screen-footer .footer-language-grid) > [data-lang="fa"]{grid-area:2/5!important}
/* Right-to-left verse copy cannot inherit justified/expanded tracking. */
html[data-oku-lang="fa"] #screen-home .home-daily-title{
 position:absolute!important;left:34px!important;right:auto!important;top:38px!important;
 max-width:44%!important;width:auto!important;font-size:clamp(24px,2.35vw,42px)!important;
 line-height:1.2!important;direction:rtl!important;text-align:left!important;white-space:normal!important;
 letter-spacing:normal!important;word-spacing:normal!important;z-index:2;
}
html[data-oku-lang="fa"] #screen-home .home-daily-date{
 position:absolute!important;right:34px!important;left:auto!important;top:38px!important;
 max-width:40%!important;text-align:right!important;font-size:clamp(12px,1.2vw,18px)!important;line-height:1.5!important;
}
html[data-oku-lang="fa"] #screen-home .home-daily-translation,
html[data-oku-lang="fa"] #screen-home .home-daily-verse{
 direction:rtl!important;text-align:center!important;text-align-last:center!important;
 letter-spacing:normal!important;word-spacing:normal!important;line-height:1.8!important;
 font-family:Tahoma,"Noto Naskh Arabic",sans-serif!important;
}
@media(max-width:600px){html[data-oku-lang="fa"] #screen-home .home-daily-title{left:16px!important;top:20px!important;font-size:23px!important}html[data-oku-lang="fa"] #screen-home .home-daily-date{right:16px!important;top:20px!important;font-size:11px!important}}
