.lang-sel { position: relative; }
.lang-sel-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.2rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(13, 20, 36, 0.55);
  color: #c5d6ea;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.lang-sel-btn:hover,
.lang-sel-btn[aria-expanded="true"] {
  border-color: rgba(61, 142, 240, 0.45);
  color: #fff;
}
.lang-sel-flag { font-size: 0.95rem; line-height: 1; }
.lang-sel-caret { opacity: 0.7; font-size: 0.7rem; }
.lang-sel-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 0.4rem);
  min-width: 15.5rem;
  max-width: min(18rem, calc(100vw - 2rem));
  max-height: min(70vh, 16.5rem);
  overflow-y: auto;
  padding: 0.3rem;
  border-radius: 12px;
  border: 1px solid rgba(61, 142, 240, 0.28);
  background: rgba(13, 20, 36, 0.95);
  box-shadow: 0 16px 40px rgba(5, 10, 22, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 40;
}
.lang-sel-menu[hidden] { display: none; }
.lang-sel-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c5d6ea;
  font-family: inherit;
  font-size: 0.86rem;
  text-align: start;
  cursor: pointer;
}
.lang-sel-option:hover,
.lang-sel-option:focus-visible {
  background: rgba(61, 142, 240, 0.12);
  color: #fff;
  outline: none;
}
.lang-sel-option.is-active {
  background: rgba(61, 142, 240, 0.16);
  color: #fff;
}
.lang-sel-code {
  width: 1.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #9bb4ce;
}
.lang-sel-label { flex: 1 1 auto; min-width: 0; }
.lang-sel-check { color: #5ca3f5; font-size: 0.85rem; }

.soon { margin-inline-start: 0.35rem; margin-left: 0; }

html[dir="rtl"] .nav-links.is-open {
  align-items: flex-end;
}

@media (max-width: 680px) {
  .lang-sel-menu { inset-inline-end: 0; }
}
