nav .hb-language-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  line-height: 1;
  font-family: Monospace, Arial, sans-serif;
  z-index: 120;
}

nav .hb-language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 12px 14px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(244, 162, 97, 0.10);
  color: #f4a261;
  font: 900 12px/1 Monospace, Arial, sans-serif;
  letter-spacing: 0.35px;
  cursor: pointer;
}

nav .hb-language-toggle:hover,
nav .hb-language-toggle[aria-expanded="true"] {
  background: #313131;
  color: #ffd7b6;
}

nav .hb-language-toggle:focus-visible,
nav .hb-language-option:focus-visible {
  outline: 3px solid rgba(244, 162, 97, 0.75);
  outline-offset: -3px;
}

nav .hb-language-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

nav .hb-language-chevron {
  width: 10px;
  height: 10px;
  transition: transform 0.15s ease;
}

nav .hb-language-toggle[aria-expanded="true"] .hb-language-chevron {
  transform: rotate(180deg);
}

nav .hb-language-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  width: 190px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  background: #151515;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.55);
  text-align: left;
}

nav .hb-language-menu[hidden] {
  display: none !important;
}

nav .hb-language-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e8e8e8;
  font: 800 12px/1.2 Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}

nav .hb-language-option:hover {
  background: rgba(244, 162, 97, 0.12);
  color: #f4a261;
}

nav .hb-language-option[aria-checked="true"] {
  background: rgba(244, 162, 97, 0.16);
  color: #ffd7b6;
}

nav .hb-language-check {
  color: #7cff9b;
  opacity: 0;
}

nav .hb-language-option[aria-checked="true"] .hb-language-check {
  opacity: 1;
}

nav .hb-language-credit {
  display: block;
  margin: 6px 5px 2px;
  color: #888;
  font: 10px/1.3 Arial, sans-serif;
  text-align: center;
}

.hb-translation-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10000;
  max-width: min(420px, calc(100vw - 28px));
  transform: translate(-50%, 14px);
  padding: 11px 14px;
  border: 1px solid rgba(244, 162, 97, 0.45);
  border-radius: 11px;
  background: #151515;
  color: #f1f1f1;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  font: 800 12px/1.4 Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.hb-translation-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 700px) {
  nav .hb-language-switcher {
    width: 100%;
    justify-content: center;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }

  nav .hb-language-toggle {
    width: 100%;
    border-left: 0;
  }

  nav .hb-language-menu {
    position: static;
    width: min(260px, calc(100% - 20px));
    margin: 7px auto;
    transform: none;
  }
}
