html { font-size: 106.25%; } /* 17px base — scales with system accessibility settings */

/* ── Language Picker ──────────────────────────────────────────────────────── */

.lang-wrap {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 0;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.lang-btn:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.lang-btn svg {
  pointer-events: none;
}

.lang-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  padding: 6px;
  min-width: 170px;
  z-index: 1000;
  animation: lang-pop 0.15s ease;
}

@keyframes lang-pop {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.lang-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
}

.lang-option:hover {
  background: var(--bg-subtle);
}

.lang-option.active {
  color: var(--accent, #007AFF);
  font-weight: 600;
}
