/* language button with flags */
.lang { position: relative; flex: none; align-self: center; }
.bar { gap: 10px; align-items: center; }
.lang-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--accent, #8a8a96); box-shadow: 0 0 0 3px rgb(255 255 255 / 0.1); }
.flag { width: 22px; height: 15px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.15); flex: none; }
.lang-list {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  margin: 0; padding: 4px; list-style: none; min-width: 190px;
  background: #1b1b20; border: 1px solid var(--edge, #3a3a44); border-radius: 12px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.5);
}
.lang-list[hidden] { display: none; }
.lang-list button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.lang-list button:hover { background: rgb(255 255 255 / 0.08); }
.lang-list button.on { background: rgb(255 255 255 / 0.12); font-weight: 600; }
.top-r { display: flex; align-items: center; gap: 14px; }
.top-r .lang-list { left: auto; right: 0; }
