/* Interface controls; RTL is scoped and does not alter the English layout. */
.ui-language-form{margin:0;flex:0 0 auto}.ui-language-form select{width:auto;min-width:76px;min-height:38px;padding:6px 8px;font-size:12px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
[dir="rtl"] .brand{direction:ltr}
[dir="rtl"] .main-nav,[dir="rtl"] .header-actions{min-width:0}
[dir="rtl"] .account-menu-panel{right:auto;left:0}
[dir="rtl"] .search-box:before{left:auto;right:14px}
[dir="rtl"] .search-box input{padding-left:14px;padding-right:42px}
[dir="rtl"] .search-box{margin-left:0;margin-right:auto}
[dir="rtl"] th,[dir="rtl"] td{text-align:right}
[dir="rtl"] .cz-info ul,[dir="rtl"] .cz-info ol{padding-left:0;padding-right:24px}
[dir="rtl"] .list-pagination span{margin-right:0;margin-left:auto}
[dir="rtl"] .tournament-panel h2 small{float:left}
[dir="rtl"] .player-card .player-name{text-align:start}
[dir="rtl"] .competition-versus{direction:ltr}
[dir="rtl"] .cards-carousel,[dir="rtl"] .carousel-shell,[dir="rtl"] .tournament-bracket-scroll,[dir="rtl"] .tournament-bracket{direction:ltr}
[dir="rtl"] .cards-carousel>.player-card,[dir="rtl"] .cards-carousel>.clan-card,[dir="rtl"] .cards-carousel>.competition-card,[dir="rtl"] .cards-carousel>.tournament-card,[dir="rtl"] .cards-carousel>.empty-state{direction:rtl}
[dir="rtl"] .tournament-round h3,[dir="rtl"] .tournament-node-link{direction:rtl}
[dir="rtl"] .cz-wa{direction:rtl} /* Physical lower-right anchor stays familiar. */
[dir="rtl"] .phone-local,[dir="rtl"] input[type="email"],[dir="rtl"] input[type="url"],[dir="rtl"] input[type="tel"],[dir="rtl"] input[type="number"],[dir="rtl"] input[type="datetime-local"]{direction:ltr;text-align:left}
[dir="rtl"] .match-score-center,[dir="rtl"] .duel-record-total{direction:ltr;unicode-bidi:isolate}
bdi,.ui-dynamic{unicode-bidi:isolate}.ui-ltr{direction:ltr;unicode-bidi:isolate}
[dir="rtl"] .btn,[dir="rtl"] .panel-title,[dir="rtl"] .challenge-section-head h2{letter-spacing:normal}
[dir="rtl"] .field,[dir="rtl"] .section-heading,[dir="rtl"] .challenge-section-head>div{min-width:0}
@media(max-width:760px){.header-actions{gap:6px}.ui-language-form select{width:68px;min-width:68px;max-width:68px}[dir="rtl"] .search-box{margin-right:0}}
@media(max-width:400px){.site-header{gap:8px;padding-inline:10px}.brand{gap:6px}.header-actions .user-chip{padding:5px}.header-actions .btn-small{padding:7px;font-size:11px}}

[dir="rtl"] input[type="password"],[dir="rtl"] .js-local-datetime{direction:ltr;unicode-bidi:isolate}
[dir="rtl"] .tournament-node-name{unicode-bidi:isolate}

/* Keep the additional language control clear of guest buttons on small phones. */
@media(max-width:340px){.brand{font-size:18px;gap:4px}.brand img{width:28px;height:28px}.header-actions .btn-small{font-size:10px;padding:5px}.ui-language-form select{width:62px;min-width:62px;max-width:62px;padding-inline:4px}.header-actions{gap:4px}}

/* V6.3.1: Hebrew glyphs only. Latin text and digits keep the existing stack. */
@font-face {
  font-family: "CZ Heebo Hebrew";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/heebo-hebrew-variable.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+FB1D-FB4F;
}
html[lang="he"] body {
  font-family: "CZ Heebo Hebrew", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html[lang="he"] body.ui-error-page { font-family: "CZ Heebo Hebrew", system-ui; }
/* Limit weight changes to static interface labels, not identities or game data. */
html[lang="he"] .home-mode-tab { font-weight: 700; letter-spacing: normal; }
html[lang="he"] .status-pill { font-weight: 600; font-size: 12px; letter-spacing: normal; }
html[lang="he"] th { font-weight: 600; letter-spacing: normal; }
html[lang="he"] .discovery-filter-title,
html[lang="he"] .discovery-filter-search label,
html[lang="he"] .filter-field label { font-weight: 600; font-size: 12px; letter-spacing: normal; }
html[lang="he"] .field label { font-weight: 600; letter-spacing: normal; }
html[lang="he"] .filter-clear { font-weight: 600; }
html[lang="he"] .section-heading h1,
html[lang="he"] .section-heading h2 { letter-spacing: normal; }

/* V6.3.2: keep EN/HE picker geometry; allow full RU/DE names. */
@media (min-width:761px) {
  html:is([lang="en"],[lang="he"]) .ui-language-form select { width:82px; }
}
html:is([lang="ru"],[lang="de"]) .ui-language-form select {
  width:89px; min-width:89px; max-width:89px;
}
/* Guest actions have longer labels in RU/DE; wrap the header before overlap. */
@media (max-width:480px) {
  html:is([lang="ru"],[lang="de"]) .site-header:has(.header-actions > .btn-small) {
    grid-template-columns:minmax(0,1fr); gap:6px; padding-block:8px;
  }
  html:is([lang="ru"],[lang="de"]) .header-actions:has(> .btn-small) {
    justify-self:end;
  }
}

/* V6.3.3: local Arabic glyphs only; Latin letters and 0–9 retain Inter/system fonts. */
@font-face {
  font-family: "CZ Noto Sans Arabic";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/noto-sans-arabic-variable.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+10E60-10E7F, U+1EE00-1EEFF;
}
html[lang="ar"] body {
  font-family: "CZ Noto Sans Arabic", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html[lang="ar"] body.ui-error-page { font-family: "CZ Noto Sans Arabic", system-ui; }
html[lang="ar"] .home-mode-tab,
html[lang="ar"] .status-pill,
html[lang="ar"] th,
html[lang="ar"] .field label,
html[lang="ar"] .filter-field label,
html[lang="ar"] .discovery-filter-title,
html[lang="ar"] .discovery-filter-search label,
html[lang="ar"] .section-heading h1,
html[lang="ar"] .section-heading h2 { letter-spacing: normal; }
html[lang="ar"] .ui-language-form select { width:89px; min-width:89px; max-width:89px; }
/* Keep the full Arabic picker and guest account actions clear of the brand. */
@media (max-width:480px) {
  html[lang="ar"] .site-header:has(.header-actions > .btn-small) {
    grid-template-columns:minmax(0,1fr); gap:6px; padding-block:8px;
  }
  html[lang="ar"] .header-actions:has(> .btn-small) { justify-self:end; }
}
