/* Shared language control; existing Persian layout and theme remain the baseline. */
.top .nav { flex-wrap: wrap; gap: 12px; }
.top .brand { margin-inline-end: auto; }
.top .links { flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
.top .language-switch { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 3px; padding: 3px; border: 1px solid rgba(36,18,52,.18); border-radius: 999px; background: #fffdf6; direction: ltr; }
.language-switch a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 52px; padding: 7px 11px; border-radius: 999px; color: #241234; font: 700 13px/1.2 Tahoma, Arial, sans-serif; white-space: nowrap; text-decoration: none; }
.language-switch a[aria-current="page"] { color: #fffdf6; background: #241234; }
.language-switch a:hover:not([aria-current]) { background: #ffe39a; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #783b88; outline-offset: 4px; }
html[lang="en"] body { font-family: "Segoe UI", Arial, sans-serif; font-size: 16px; }
html[lang="en"] p { line-height: 1.75; }
html[lang="en"] .top .brand > span > span { font-size: .8rem; }
html[lang="en"] .top .links a { padding-inline: 9px; font-size: .84rem; }
html[lang="en"] .blog-pagination { direction: ltr; }
html[lang="en"] .article-table th, html[lang="en"] .article-table td,
html[lang="en"] .directory-table th, html[lang="en"] .directory-table td { text-align: start; }
html[lang="en"] .rank-name, html[lang="en"] .hero-meta { direction: ltr; }
html[lang="en"] .article-body { min-width: 0; overflow-wrap: anywhere; }
html[lang="en"] .article-table-wrap { max-width: 100%; }
html[lang="en"] .games-copy, html[lang="en"] .section-heading,
html[lang="en"] .server-address-row b, html[lang="en"] .badge-card small,
html[lang="en"] .rank-card small, html[lang="en"] .return-card-heading bdi { text-align: start; }
html[lang="en"] .uncle-head .section-title, html[lang="en"] .uncle-badge { direction: ltr; text-align: left; }
html[lang="en"] .uncle-head .section-title { order: 1; }
html[lang="en"] .uncle-badge { order: 2; }
html[lang="en"] .quote:after, html[lang="en"] .uncle-wrap:after,
html[lang="en"] .why-shell:after { content: "Hello?"; }
html[lang="en"] .rule:before { margin-left: 0; margin-right: 10px; }
html[lang="en"] .step:before { left: auto; right: 18px; }
html[lang="en"] .referral-code-box, html[lang="en"] .claim-code { direction: ltr; }
html[lang="en"] .bubble { max-width: 230px; font-size: .9rem; }
html[lang="en"] .random { max-width: 300px; font-size: .9rem; }

/* English labels need intrinsic space; do not reuse fixed Persian button widths. */
html[lang="en"] #home > .hero .actions {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  align-items: stretch !important;
  width: 100%;
  max-width: 38rem;
  gap: 14px !important;
}
html[lang="en"] .hero .actions #mainConnectBtn,
html[lang="en"] .hero .actions #copyBtn {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 60px !important;
  padding: 14px 20px !important;
  font-size: 1.125rem !important;
  line-height: 1.35 !important;
  white-space: normal !important;
}
html[lang="en"] .hero .actions #mainConnectBtn .btn-label,
html[lang="en"] .hero .actions #copyBtn .btn-label {
  max-width: 100%;
  line-height: 1.35 !important;
  transform: none !important;
}
html[lang="en"] .hero-meta {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
html[lang="en"] .ts-card { grid-template-columns: minmax(0, 1fr); }
html[lang="en"] .ts-card .stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  gap: 12px;
  padding: 8px 10px;
}
html[lang="en"] .ts-card .stat-row > span { min-width: 0; white-space: normal; line-height: 1.4; }
html[lang="en"] .ts-card .stat-row i { flex: 0 0 20px; }
html[lang="en"] .ts-card .stat-row b { min-width: 0; font-size: 1rem; white-space: nowrap; text-align: end; }
html[lang="en"] .server-address-row .address-caption { white-space: normal; }
html[lang="en"] .reward-tier small { text-align: start; }
@media (min-width: 921px) {
  .top .links { flex: 1 0 auto; }
  .top .language-switch { order: 3; }
  .top .nav { min-height: 96px; }
}
@media (min-width: 921px) and (max-width: 1180px) {
  .top .links { flex-basis: 100%; justify-content: center; order: 4; }
}
@media (max-width: 920px) {
  .top .nav { min-height: 80px; }
  .top .links { display: flex; flex-basis: 100%; min-width: 0; flex-wrap: nowrap; justify-content: flex-start; order: 4; overflow-x: auto; padding-top: 5px; border-top: 1px solid rgba(36,18,52,.1); }
  .top .links a { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 44px; white-space: nowrap; }
  .top .language-switch { margin-inline-start: auto; }
}
@media (max-width: 430px) {
  .top .brand-mark { width: 40px; height: 40px; }
  .top .brand b { font-size: 1.05rem; }
  .language-switch a { min-width: 46px; padding-inline: 8px; }
  .top .nav { gap: 6px; padding: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
