.lv-language {
  position: relative;
  display: inline-block;
  flex: none;
  --language-ink: #4e3286;
  --language-background: #fff;
  --language-border: #817394;
  --language-icon-border: #e4e1da;
  --language-hover: #f4eefc;
  color-scheme: light;
}

html[data-theme="dark"] .lv-language {
  --language-ink: #e5d6ff;
  --language-background: #292235;
  --language-border: #9887ad;
  --language-icon-border: #3c334b;
  --language-hover: #3a2e4a;
  color-scheme: dark;
}

.lv-language summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--language-border);
  border-radius: 8px;
  background: var(--language-background);
  color: var(--language-ink);
  list-style: none;
  white-space: nowrap;
  font: 700 12px/1.2 'Trebuchet MS', Arial, 'Nirmala UI', sans-serif;
  cursor: pointer;
}
.lv-language summary::-webkit-details-marker { display: none; }
.lv-language-globe {
  position: relative;
  display: block;
  flex: 0 0 16px;
  inline-size: 16px;
  block-size: 16px;
  box-sizing: border-box;
  border: 1.25px solid currentColor;
  border-radius: 50%;
}
.lv-language-globe::before,
.lv-language-globe::after {
  position: absolute;
  content: "";
}
.lv-language-globe::before {
  inset: -1px 3px;
  border-inline: 1px solid currentColor;
  border-radius: 50%;
}
.lv-language-globe::after {
  inset: 50% 0 auto;
  border-top: 1px solid currentColor;
  transform: translateY(-50%);
}
.lv-language summary::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1px solid;
  border-bottom: 1px solid;
  transform: translateY(-1px) rotate(45deg);
}
.lv-language summary:hover,
.lv-language[open] summary,
.lv-language a:hover,
.lv-language a[aria-current] { background: var(--language-hover); }
.lv-language :is(summary, a):focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.lv-language > ul {
  position: absolute;
  inset: calc(100% + 4px) 0 auto auto;
  z-index: 100;
  min-width: max-content;
  max-height: min(65vh, 420px);
  margin: 0;
  padding: 4px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--language-border);
  border-radius: 8px;
  list-style: none;
  background: var(--language-background);
  box-shadow: 0 8px 20px #21163126;
}
.lv-language > ul > li { margin: 0; padding: 0; }
.lv-language > ul a {
  display: block;
  min-height: 30px;
  padding: 7px 12px;
  border-radius: 4px;
  color: var(--language-ink);
  text-align: start;
  text-decoration: none;
  font: 600 13px/1.3 'Trebuchet MS', Arial, 'Nirmala UI', sans-serif;
}
.lv-player-overview {
  max-width: 68ch;
  margin: 24px auto;
  padding: 0 20px;
  color: var(--lv-play-text);
  text-align: start;
  font: 1rem/1.6 system-ui, sans-serif;
}
.lv-player-overview h2 { font-size: 1.2rem; margin: 0 0 8px; }
.lv-player-overview p { margin: 0; }
.lv-player-overview > details { margin-top: 12px; }
.lv-player-overview > details > summary { cursor: pointer; font-weight: 700; }

html:not([lang="en"]) .lv-header nav,
html:not([lang="en"]) .hero-buttons,
html:not([lang="en"]) .hero-note { flex-wrap: wrap; }
html:not([lang="en"]) .hero-copy h1 { font-size: clamp(42px, 6vw, 82px); letter-spacing: -.06em; }
html:lang(hi, bn, te, kn, mr, zh, ko, th) :is(.hero-copy h1, .masthead, .poll h2) {
  letter-spacing: normal;
  line-height: 1.28;
}
html:not([lang="en"]) .play-word > svg { right: -45px; width: 34px; }
html:not([lang="en"]) .play-strip { justify-content: flex-start; }
html:lang(hi, bn, te, kn, mr, zh, ko, th) :is(.lv-eyebrow, .collection-intro h1, .wonder-copy h2) {
  letter-spacing: normal;
}

@media (max-width: 600px) {
  .lv-language summary {
    justify-content: center;
    box-sizing: border-box;
    inline-size: 30px;
    min-block-size: 30px;
    padding: 0;
    border-color: var(--language-icon-border);
    border-radius: 50%;
    background: transparent;
  }
  .lv-language summary::after,
  .lv-language-name { display: none; }
  .lv-header .header-actions { gap: 8px; }
  #lv-game-tools .lv-play-control { min-width: 36px; padding-inline: 5px; font-size: .75rem; }
  #lv-game-tools > a.lv-play-control {
    display: block;
    min-width: 18px;
    min-height: 0;
    padding-block: 8px;
    padding-inline: 0;
    overflow: hidden;
    text-align: start;
    text-overflow: ellipsis;
  }
}

@media (max-width: 450px) {
  .lv-header:has(.lv-language:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    height: auto;
    min-height: 76px;
    padding-block: 10px 4px;
    row-gap: 2px;
  }
  .lv-header:has(.lv-language:not([hidden])) nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: center;
  }
  .lv-header nav > a { padding-block: 9px; }
  .lv-header nav > a[aria-current]::after { bottom: 1px; }
}

@media (max-width: 360px) {
  #lv-game-tools .lv-play-actions { gap: 2px; }
  #lv-game-tools :is(#lv-play-favorite, #theme-toggle) { min-width: 30px; }
  #lv-game-tools #lv-show-play-help {
    max-inline-size: 84px;
    overflow-wrap: anywhere;
    white-space: normal;
    text-align: center;
  }
}
