/* زبان‌ها — سوییچر فشرده و جهت صفحه */
.lang-switch { position: relative; }
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid var(--line, #e2e8f0);
  background: #fff;
  border-radius: 999px;
  padding: .25rem .55rem .25rem .4rem;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: var(--brand-dark, #134e4a);
  max-width: 148px;
  line-height: 1.1;
}
.lang-switch-btn:hover { background: var(--brand-soft, #f0fdfa); }
.lang-switch-code {
  font-size: .68rem;
  letter-spacing: .04em;
  background: #0f766e;
  color: #fff;
  border-radius: 999px;
  padding: .18rem .38rem;
  font-weight: 800;
}
.lang-switch-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .8rem;
}
.lang-switch-caret { font-size: .68rem; color: #64748b; }
.lang-switch-drop {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  max-height: min(70vh, 420px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15,23,42,.12);
  padding: .4rem;
  z-index: 90;
}
.lang-switch.open .lang-switch-drop { display: block; }
.lang-switch-drop a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
  padding: .45rem .7rem;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 650;
  color: #0f172a;
  text-decoration: none;
}
.lang-switch-drop a small {
  font-weight: 500;
  color: #64748b;
  font-size: .75rem;
}
.lang-switch-drop a:hover { background: #f1f5f9; }
.lang-switch-drop a.is-on {
  background: #ecfdf5;
  color: #0f766e;
}
html[dir="ltr"] .lang-switch-drop,
html[dir="ltr"] .user-menu-drop {
  left: auto;
  right: 0;
}
html[dir="ltr"] body { text-align: start; }
html[lang="zh"] body,
html[lang="ja"] body,
html[lang="ko"] body {
  font-family: "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", Vazirmatn, "Segoe UI", sans-serif;
}
@media (max-width: 720px) {
  .lang-switch-name { display: none; }
  .lang-switch-btn { max-width: none; padding: .25rem .4rem; }
}
