.tm-language-corner {
  position: fixed;
  z-index: 45;
  inset-inline-end: max(16px, env(safe-area-inset-right));
  inset-block-end: max(16px, env(safe-area-inset-bottom));
  color: var(--tm-deep);
  font-size: .875rem;
  line-height: 1.25;
}
.tm-language-corner summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 17px;
  min-width: 115px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--tm-line);
  border-radius: 9px;
  background: var(--tm-paper);
  box-shadow: 0 4px 16px #173d2a24;
  color: var(--tm-green);
  font-weight: 620;
  white-space: nowrap;
  cursor: pointer;
}
.tm-language-corner summary::-webkit-details-marker { display: none; }
.tm-language-corner summary::after {
  content: '';
  width: 7px;
  height: 7px;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: translateY(2px) rotate(225deg);
}
.tm-language-corner[open] summary::after { transform: translateY(-2px) rotate(45deg); }
.tm-language-corner .tm-language-options {
  position: absolute;
  inset-inline-end: 0;
  inset-block-end: calc(100% + 8px);
  min-width: 146px;
  margin: 0;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--tm-line);
  border-radius: 9px;
  background: var(--tm-paper);
  box-shadow: 0 7px 20px #173d2a23;
}
.tm-language-options :is(a,span) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 5px;
  color: var(--tm-deep);
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}
.tm-language-options a:hover,
.tm-language-options [aria-current="true"] { background: var(--tm-stone); color: var(--tm-green); }
.tm-language-options [aria-current="true"]::after {
  content: '';
  width: 9px;
  height: 5px;
  border-inline-start: 1.6px solid currentColor;
  border-block-end: 1.6px solid currentColor;
  transform: rotate(-45deg);
}
.tm-language-corner :is(summary,a):focus-visible { outline: 2px solid var(--tm-green); outline-offset: 2px; }
@media (max-width: 990px) {
  #header [data-device="mobile"] [data-row="middle"] [data-column="start"] > [data-items] {
    justify-content: center;
  }
  #header [data-device="mobile"] [data-row="middle"] > .ct-container::after {
    content: '';
    flex: 0 0 64px;
  }
}
@media (max-width: 780px) {
  #header [data-device="mobile"] [data-row="middle"] > .ct-container::after { flex-basis: 48px; }
  .tm-language-corner {
    inset-inline-end: max(12px, env(safe-area-inset-right));
    inset-block-end: max(12px, env(safe-area-inset-bottom));
  }
}
