/* A small typographic choice, with full touch targets and no visible container. */
.invitation-language-switcher {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  z-index: 21;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: flex-end;
  gap: 0;
  margin: 0;
  color: var(--muted);
  font: 400 12px/1 var(--serif);
  letter-spacing: .04em;
  white-space: nowrap;
}
.invitation-language-switcher[hidden] { display: none; }
.invitation-language-switcher button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}
.invitation-language-switcher > span { margin-inline: -2px; opacity: .5; }
.invitation-language-switcher button[aria-pressed="true"] {
  color: var(--plum);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.invitation-language-switcher button:hover { color: var(--plum); }
.invitation-language-switcher button:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: -5px;
}
.review-ribbon span[data-inv-i18n] { margin: 0; }
.game-close-button .invitation-game-close-label { font: inherit; }
/* The language choice owns the top corner; the existing floating music
   control sits immediately below it, with separate 44 px touch targets. */
.site-header:has(.invitation-language-switcher) .music-toggle {
  top: calc(66px + env(safe-area-inset-top, 0px));
}
.review-ribbon:not([hidden]) {
  min-height: calc(64px + env(safe-area-inset-top, 0px));
  padding-top: calc(9px + env(safe-area-inset-top, 0px));
}
.review-ribbon:not([hidden]) + .site-header .invitation-language-switcher,
.review-ribbon:not([hidden]) + .site-header .invitation-language-switcher button[aria-pressed="true"],
.review-ribbon:not([hidden]) + .site-header .invitation-language-switcher button:hover {
  color: var(--ivory);
}
.site-header:has(.invitation-language-switcher) .music-controls {
  padding-top: calc(104px + env(safe-area-inset-top, 0px));
}
.review-ribbon:not([hidden]) + .site-header .music-controls { padding-top: 48px; }
@media (min-width: 760px) {
  .invitation-language-switcher { right: max(24px, env(safe-area-inset-right, 0px)); }
}
@media (max-width: 480px) {
  .site-header:has(.invitation-language-switcher) { gap: 10px; }
  .site-header:has(.invitation-language-switcher) .music-credit { white-space: normal; }
}
@media print { .invitation-language-switcher { display: none; } }
