.language-selector {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #ffffff24;
  border-radius: 10px;
  background: #0c1428;
}

.language-selector button {
  min-width: 40px;
  min-height: 44px;
  padding: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.language-selector button:hover {
  color: var(--white);
  background: #ffffff0a;
}

.language-selector button[aria-pressed="true"] {
  background: var(--orange);
  color: var(--bg);
}

/* Translation wrappers inherit the original non-accented text colour. */
h2 > span[data-i18n],
.nav-cta > span[data-i18n],
.float-label > span[data-i18n] {
  color: inherit;
}

/* Artwork and Latin wordmarks retain their original visual direction. */
.logo,
.art,
.game-visual {
  direction: ltr;
}

[dir="rtl"] body {
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] .eyebrow,
[dir="rtl"] .game-meta,
[dir="rtl"] .badge,
[dir="rtl"] .pill,
[dir="rtl"] .board-center small {
  letter-spacing: normal;
}

[dir="rtl"] h1,
[dir="rtl"] h2 {
  line-height: 1.45;
}

[dir="rtl"] .game-info,
[dir="rtl"] .about-copy,
[dir="rtl"] .benefit,
[dir="rtl"] .section-head {
  text-align: start;
}

[dir="rtl"] .game h3 {
  text-align: right;
  font-family: Arial, Helvetica, sans-serif;
}

[dir="rtl"] .mobile-greeting h1,
[dir="rtl"] .logo {
  letter-spacing: -1px;
  font-family: Arial, Helvetica, sans-serif;
}

[dir="rtl"] .mobile-greeting h1 {
  text-align: right;
  line-height: 1.2;
}

[dir="rtl"] .soon .pill {
  margin-left: 0;
  margin-inline-start: auto;
}

.nav-cta span {
  margin-left: 0;
}

.nav-cta > span:last-child {
  margin-inline-start: 12px;
}

@media (min-width: 651px) {
  .nav {
    gap: 20px;
  }

  .links {
    gap: clamp(12px, 1.6vw, 24px);
  }
}

/* Tablet headers use the compact menu before translated navigation crowds. */
@media (min-width: 651px) and (max-width: 1100px) {
  .menu {
    display: block;
    min-height: 44px;
  }

  .links {
    display: none;
    position: absolute;
    top: 94px;
    inset-inline: 0;
    padding: 20px 5%;
    flex-direction: column;
    align-items: stretch;
    background: #10192e;
    box-shadow: 0 12px 20px #0004;
  }

  .links.open {
    display: flex;
  }

  .links > a {
    padding: 10px;
  }

  .language-selector {
    align-self: flex-start;
  }
}

@media (max-width: 650px) {
  .language-selector {
    align-self: flex-start;
    margin: 8px 12px;
  }

  .links.open {
    max-height: calc(100dvh - 150px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
  }

  #featured .section-head > div {
    min-width: 0;
  }

  #featured .section-head h2 {
    font-size: 14px;
  }

  #featured .text-link {
    flex-shrink: 0;
  }

  [dir="rtl"] .game-meta {
    font-size: 10px;
    line-height: 1.5;
  }

  [dir="rtl"] .game-bottom .button {
    font-size: 13px;
  }

  [dir="rtl"] .game h3 {
    font-size: clamp(17px, 4.6vw, 24px);
    letter-spacing: -.5px;
    line-height: 1.2;
  }
}
